/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #f5f5f5;
}

/* Navigation Bar */
.navbar {
    background-color: #003366;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-left, .nav-right {
    display: flex;
    align-items: center;
    gap: 5px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 12px 15px;
    display: inline-block;
    transition: background-color 0.2s;
}

.nav-link:hover {
    background-color: #004080;
}

.user-info {
    color: white;
    margin-left: 15px;
    font-size: 13px;
}

.nbs-logo {
    background-color: white;
    color: #003366;
    padding: 5px 15px;
    margin-left: 15px;
    font-weight: bold;
    border-radius: 3px;
}

/* Search Bar */
.search-bar {
    background-color: #f5f5f5;
    padding: 10px 20px;
    border-bottom: 1px solid #ddd;
}

.search-bar label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
}

.search-bar input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    background-color: white;
}

/* Page Header */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.header-left {
    display: flex;
    align-items: baseline;
    gap: 15px;
}

.page-header h1 {
    font-size: 28px;
    font-weight: bold;
    color: #333;
    margin: 0;
}

.classic-link {
    color: #0066cc;
    text-decoration: none;
    font-size: 14px;
}

.classic-link:hover {
    text-decoration: underline;
}

.info-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    background-color: #0066cc;
    color: white;
    border-radius: 50%;
    text-align: center;
    line-height: 16px;
    font-size: 12px;
    margin-left: 3px;
}

/* Buttons */
.btn-primary, .btn-secondary {
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    border: 1px solid transparent;
    transition: all 0.2s;
}

.btn-primary {
    background-color: #0066cc;
    color: white;
    border-color: #0066cc;
}

.btn-primary:hover {
    background-color: #0052a3;
}

.btn-secondary {
    background-color: white;
    color: #0066cc;
    border-color: #0066cc;
}

.btn-secondary:hover {
    background-color: #f0f7ff;
}

.add-patient {
    display: flex;
    align-items: center;
    gap: 5px;
    background-color: #e0e0e0;
    color: #333;
    border-color: #ccc;
}

.add-patient .icon {
    font-size: 18px;
    font-weight: bold;
}

/* Content Layout */
.content-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 20px;
}

/* Sidebar */
.sidebar {
    background-color: #fafafa;
    padding: 0;
}

/* Collapsible Sections */
.collapsible-section {
    margin-bottom: 10px;
    border: 1px solid #ddd;
    background-color: white;
}

.section-header {
    background-color: #f0f0f0;
    padding: 12px 15px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    user-select: none;
    border-bottom: 1px solid #ddd;
}

.section-header:hover {
    background-color: #e8e8e8;
}

.section-header.collapsed {
    border-bottom: none;
}

.arrow {
    font-size: 12px;
    transition: transform 0.3s;
}

.section-header.collapsed .arrow {
    transform: rotate(-90deg);
}

.section-title {
    font-weight: bold;
    font-size: 14px;
}

.section-content {
    padding: 15px;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 1000px;
    }
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    color: #333;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input[type="text"]:focus,
.form-group select:focus {
    outline: none;
    border-color: #0066cc;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

/* Input with Select Prefix */
.input-with-select {
    display: flex;
    gap: 5px;
}

.select-prefix {
    width: 120px;
    flex-shrink: 0;
}

.input-with-select input {
    flex: 1;
}

/* Radio and Checkbox Groups */
.radio-group, .checkbox-group {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.radio-group label, .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 5px;
    font-weight: normal;
    cursor: pointer;
}

/* Date Inputs */
.date-inputs {
    display: flex;
    gap: 5px;
}

.date-input {
    flex: 1;
}

/* Form Actions */
.form-actions {
    display: flex;
    gap: 10px;
    padding: 15px;
    background-color: white;
    border-top: 1px solid #ddd;
}

.form-actions button {
    flex: 1;
}

/* Main Content */
.main-content {
    background-color: white;
    padding: 40px;
    border: 1px solid #ddd;
    min-height: 500px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state h2 {
    font-size: 20px;
    font-weight: normal;
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    font-size: 14px;
}

/* Dashboard Styles */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 20px;
}

.dashboard-widget {
    border: 1px solid #ddd;
    background-color: white;
}

.widget-header {
    background-color: #0066cc;
    color: white;
    padding: 12px 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.widget-content {
    padding: 15px;
    max-height: 300px;
    overflow-y: auto;
}

.widget-full-width {
    grid-column: 1 / -1;
}

/* Tree Menu Styles */
.tree-menu {
    list-style: none;
    padding-left: 0;
}

.tree-menu li {
    margin: 5px 0;
}

.tree-menu a {
    color: #0066cc;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 0;
}

.tree-menu a:hover {
    text-decoration: underline;
}

.tree-icon {
    width: 16px;
    text-align: center;
    font-weight: bold;
    cursor: pointer;
}

.tree-submenu {
    padding-left: 20px;
    display: none;
}

.tree-submenu.expanded {
    display: block;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .content-layout {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        order: 2;
    }
    
    .main-content {
        order: 1;
    }
    
    .dashboard-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        height: auto;
        padding: 10px;
    }
    
    .nav-left, .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}
