/* ========== ENHANCED DASHBOARD STYLES ========== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
.account-switcher {
    position: relative;
    margin-right: 8px;
}

.account-dropdown {
    position: absolute;
    right: 0;
    top: 110%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(15,23,42,0.25);
    min-width: 260px;
    z-index: 50;
    padding: 8px 0;
}

.account-item {
    padding: 8px 12px;
    cursor: pointer;
    font-size: 13px;
}

.account-item:hover {
    background: #f3f4f6;
}
.account-item__name {
    font-weight: 600;
}
.account-item__id {
    font-size: 11px;
    color: #6b7280;
}

:root {
    /* Premium Color Palette */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1E40AF;
    --secondary: #1E293B;
    --success: #16A34A;
    --success-light: #22C55E;
    --warning: #EA580C;
    --warning-light: #FB923C;
    --danger: #DC2626;
    --danger-light: #EF4444;
    --critical: #991B1B;
    
    /* Neutrals */
    --white: #FFFFFF;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1E293B;
    --gray-900: #0F172A;
    
    /* Spacing */
    --xs: 0.25rem;
    --sm: 0.5rem;
    --md: 1rem;
    --lg: 1.5rem;
    --xl: 2rem;
    --2xl: 3rem;
    
    /* Border radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    --shadow-2xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    /* Fonts */
    --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', sans-serif;
    --font-mono: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
}

html, body {
    font-family: var(--font-family);
    background: linear-gradient(135deg, var(--gray-50) 0%, #f0ecec 100%);
    line-height: 1.05;
    min-height: 100vh;
    height: 100%;
}

/* ========== LAYOUT ========== */

.layout {
    display: flex;
    min-height: 100vh;
    background: var(--gray-50);
}

/* ========== SIDEBAR ========== */

.layout__sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 240px;
    z-index: 1000;
    overflow-y: auto;

    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--secondary) 100%);
    border-right: 1px solid rgba(0, 0, 0, 0.1);
    padding: var(--lg) 0;
    box-shadow: var(--shadow-xl);
}

.sidebar__logo {
    padding: var(--md) var(--lg);
    margin-bottom: var(--lg);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}
.group-dropdowns {
    display: flex;
    gap: 12px;
}

.header__input {
    width: 220px;
    padding: 8px 36px 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    background: #fff;
}

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 40px;
    left: 0;
    width: 240px;
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
}

.dropdown-item {
    padding: 10px 14px;
    font-size: 14px;
    cursor: pointer;
}

.dropdown-item:hover {
    background: #f1f3f4;
}

.dropdown-item.active {
    background: #e8f0fe;
    color: #1a73e8;
    font-weight: 500;
}

.dropdown-footer {
    border-top: 1px solid #eee;
    padding: 10px 14px;
}

.create-view {
    color: #1a73e8;
    cursor: pointer;
    font-size: 13px;
}

.icon {
    margin-right: 6px;
}

.hidden { display: none; }
.dropdown-menu { display: none; }
.dropdown-menu.show { display: block; }
.dropdown-item.active { background:#e8f0fe; }
.hidden { display: none; }

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.35);
    z-index: 99;
}

.modal {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    width: 420px;
    background: #fff;
    border-radius: 12px;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0,0,0,.2);
}

.modal-header {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    border-bottom: 1px solid #eee;
}

.modal-body {
    padding: 12px 16px;
}

.modal-item {
    padding: 10px;
    cursor: pointer;
    border-radius: 6px;
}
.modal-item:hover, .modal-item.active {
    background: #e8f0fe;
}

.modal-footer {
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
}

.link-btn {
    background: none;
    border: none;
    color: #1a73e8;
    cursor: pointer;
}

.primary {
    background: #1a73e8;
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 6px;
}

.chip {
    background: #f1f3f4;
    padding: 6px 10px;
    border-radius: 16px;
    margin-right: 6px;
    display: inline-block;
}

.search {
    width: 100%;
    margin: 12px 0;
    padding: 8px;
}

.list-item {
    padding: 10px;
    border-radius: 6px;
}


.sidebar__logo a {
    display: flex;
    align-items: center;
    gap: var(--md);
    color: var(--white);
    text-decoration: none;
    font-size: 1.25rem;
    font-weight: 700;
    transition: all 0.3s ease;
}

.sidebar__logo a:hover {
    transform: scale(1.05);
}

.sidebar__dropdown {
    margin-bottom: 10px;
    position: relative;
}

.sidebar__dropdown-toggle {
    width: 100%;
    border: none;
    padding: 12px 14px;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 15px;
    transition: background 0.2s;
    text-align: left;
    
}

/* Arrow icon in dropdown */
.sidebar__arrow {
    margin-left: auto;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

/* Inner dropdowns (Age, Gender, etc.) */
.sidebar__dropdown--inner {
    margin-left: 12px;
}

.sidebar__dropdown--inner > .sidebar__dropdown-toggle {
    padding-left: 18px;
    font-size: 0.9rem;
}

/* default: all dropdown menus hidden */
.sidebar__dropdown > .sidebar__dropdown-menu {
    display: none;
    flex-direction: column;
    border-radius: 8px;
    margin-top: 6px;
    padding: 8px 0;
    position: relative;
}

/* show ONLY the direct child menu when that dropdown is active */
.sidebar__dropdown.active > .sidebar__dropdown-menu {
    display: flex;
}

.sidebar__nav {
    display: flex;
    flex-direction: column;
    gap: var(--xs);
    padding: 0 var(--sm);
}

/* unified sidebar item styles */
.sidebar__item {
    display: flex;
    align-items: center;
    gap: var(--md);
    padding: 10px 14px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: var(--radius-lg);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    margin: 0 var(--sm);
}

.sidebar__item:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transform: translateX(4px);
}


.sidebar__item.active {
    color: var(--white);
    font-weight: 600;
}

.sidebar__item-icon {
    font-size: 1.25rem;
    display: flex;
    align-items: center;
}

/* ========== HEADER ========== */

.layout__header {
    grid-row: 1;
    grid-column: 2;
    background: var(--white);
    border-bottom: 2px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 var(--2xl);
    box-shadow: var(--shadow-md);
}

.header__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: 0;
}

.header__actions {
    display: flex;
    gap: var(--lg);
    align-items: center;
}

.header__button {
    display: flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--sm) var(--lg);
    background: var(--primary-light);
    color: var(--white);
    border: none;
    border-radius: var(--radius-lg);
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.header__button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

/* ========== MAIN CONTENT ========== */

.layout__content {
    grid-row: 2;
    grid-column: 2;
    padding: var(--2xl);
    overflow-y: auto;
    background: linear-gradient(135deg, var(--gray-50) 0%, #F0F9FF 100%);
}

/* ========== CARDS & CONTAINERS ========== */

.card {
    background: var(--white);
    border-radius: var(--radius-xl);
    padding: var(--lg);
    border: 1px solid var(--gray-200);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.card--compact {
    padding: var(--md);
}

/* ========== FILTERS ========== */

.filters {
    display: flex;
    gap: var(--lg);
    margin-bottom: var(--2xl);
    flex-wrap: wrap;
    background: var(--white);
    padding: var(--lg);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--gray-200);
}
.table table {
    table-layout: auto !important;   /* Allow flexible column width */
    width: 100%;
}

.table th,
.table td {
    padding: 12px 14px;
    vertical-align: top;
    text-align: left;
    word-break: break-word;
}

.table th {
    white-space: nowrap;
    font-weight: 600;
}

.table td {
    width: auto;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--sm);
}
.ai-section {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ai-line {
    display: flex;
    align-items: flex-start;
    font-size: 13px;
    line-height: 1.4;
    color: #0f172a;
}

.ai-line-bullet {
    font-weight: 600;
    margin-right: 6px;
    min-width: 12px;
}

.ai-line-text {
    flex: 1;
    word-break: break-word;
    white-space: normal;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--gray-700);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    padding: var(--sm) var(--md);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-family: var(--font-family);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background: var(--white);
    color: var(--gray-900);
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: var(--white);
}

/* ========== KPI CARDS ========== */

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--xl);
    margin-bottom: var(--2xl);
}

.kpi-card {
    background: linear-gradient(135deg, var(--white) 0%, var(--gray-50) 100%);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius-xl);
    padding: var(--xl);
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary-dark));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.kpi-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.kpi-card:hover::before {
    transform: scaleX(1);
}

.kpi-card__label {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: 600;
    margin-bottom: var(--sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-card__value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--sm);
}

.kpi-card__change {
    font-size: 0.9rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: var(--sm);
}

.kpi-card__change.positive {
    color: var(--success);
}

.kpi-card__change.negative {
    color: var(--danger);
}

.kpi-card__change.neutral {
    color: var(--gray-500);
}

/* ========== INSIGHT CARDS ========== */

.section-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--gray-900);
    margin: var(--2xl) 0 var(--lg) 0;
    padding-bottom: var(--md);
    border-bottom: 2px solid var(--gray-200);
}

.insights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--lg);
    margin-bottom: var(--2xl);
}

.insight {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-left: 4px solid var(--gray-400);
    border-radius: var(--radius-lg);
    padding: var(--lg);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

.insight.critical {
    border-left-color: var(--critical);
    background: linear-gradient(135deg, rgba(153, 27, 27, 0.02), rgba(153, 27, 27, 0.05));
}

.insight.warning {
    border-left-color: var(--warning);
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.02), rgba(234, 88, 12, 0.05));
}

.insight.success {
    border-left-color: var(--success);
    background: linear-gradient(135deg, rgba(22, 163, 74, 0.02), rgba(22, 163, 74, 0.05));
}

.insight.info {
    border-left-color: var(--primary-light);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(37, 99, 235, 0.05));
}

.insight:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
}

.insight__header {
    display: flex;
    align-items: flex-start;
    gap: var(--md);
    margin-bottom: var(--md);
}

.insight__icon {
    font-size: 1.5rem;
    min-width: 1.5rem;
}

.insight__title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--gray-900);
    line-height: 1.4;
}

.insight__description {
    font-size: 0.9rem;
    color: var(--gray-600);
    margin-bottom: var(--md);
    line-height: 1.5;
}

.insight__recommendation {
    background: rgba(0, 0, 0, 0.03);
    padding: var(--md);
    border-radius: var(--radius-md);
    font-size: 0.85rem;
    color: var(--gray-700);
    border-left: 2px solid var(--primary-light);
    line-height: 1.5;
}

/* ========== TABLES ========== */

.table-container {
    background: var(--white);
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--gray-200);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-light) 0%, var(--primary-dark) 100%);
    color: var(--white);
}

.table th {
    padding: var(--lg);
    text-align: left;
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table tbody tr {
    border-bottom: 1px solid var(--gray-200);
    transition: all 0.2s ease;
}

.table tbody tr:hover {
    background-color: var(--gray-50);
}

.table td {
    padding: var(--lg);
    color: var(--gray-700);
}

.table tbody tr.critical {
    background-color: rgba(153, 27, 27, 0.05);
}

.table tbody tr.critical:hover {
    background-color: rgba(153, 27, 27, 0.1);
}

.table tbody tr.warning {
    background-color: rgba(234, 88, 12, 0.05);
}

.table tbody tr.warning:hover {
    background-color: rgba(234, 88, 12, 0.1);
}

/* ========== BADGES ========== */

.badge {
    display: inline-block;
    padding: var(--xs) var(--md);
    border-radius: var(--radius-lg);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
}

.badge-critical {
    background-color: rgba(153, 27, 27, 0.15);
    color: var(--critical);
    border: 1px solid var(--critical);
}

.badge-warning {
    background-color: rgba(234, 88, 12, 0.15);
    color: var(--warning);
    border: 1px solid var(--warning);
}

.badge-success {
    background-color: rgba(22, 163, 74, 0.15);
    color: var(--success);
    border: 1px solid var(--success);
}

.badge-info {
    background-color: rgba(37, 99, 235, 0.15);
    color: var(--primary);
    border: 1px solid var(--primary);
}

/* ========== BUTTONS ========== */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--sm);
    padding: var(--sm) var(--lg);
    border: none;
    border-radius: var(--radius-lg);
    font-family: var(--font-family);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-900);
}

.btn-secondary:hover {
    background: var(--gray-300);
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-light), var(--danger));
    color: var(--white);
}

.btn-danger:hover {
    background: linear-gradient(135deg, var(--danger), var(--danger-light));
    transform: translateY(-2px);
}

/* ========== LOADING STATES ========== */

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top: 4px solid var(--primary-light);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.skeleton {
    background: linear-gradient(90deg, var(--gray-200) 25%, var(--gray-100) 50%, var(--gray-200) 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: var(--radius-md);
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ========== RESPONSIVE ========== */

@media (max-width: 1024px) {
    .layout {
        grid-template-columns: 220px 1fr;
    }
    
    .kpi-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: var(--lg);
    }
    
    .insights-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
}

@media (max-width: 768px) {
    .layout {
        grid-template-columns: 1fr;
        grid-template-rows: 60px 1fr;
    }
    
    .layout__content {
        padding: var(--lg);
    }
    
    .kpi-grid {
        grid-template-columns: 1fr;
    }
    
    .insights-grid {
        grid-template-columns: 1fr;
    }
    
    .filters {
        flex-direction: column;
    }
    
    .table {
        font-size: 0.85rem;
    }
    
    .table th,
    .table td {
        padding: var(--md);
    }
}

@media (max-width: 480px) {
    .layout__header {
        padding: 0 var(--lg);
    }
    
    .header__title {
        font-size: 1.125rem;
    }
    
    .header__actions {
        gap: var(--sm);
    }
    
    .btn {
        padding: var(--xs) var(--md);
        font-size: 0.85rem;
    }
    
    .sidebar__item {
        padding: var(--md);
        font-size: 0.85rem;
    }
}

/* ========== UTILITIES ========== */

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: var(--xs); }
.mt-2 { margin-top: var(--sm); }
.mt-4 { margin-top: var(--md); }
.mt-6 { margin-top: var(--lg); }
.mt-8 { margin-top: var(--xl); }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: var(--xs); }
.mb-2 { margin-bottom: var(--sm); }
.mb-4 { margin-bottom: var(--md); }
.mb-6 { margin-bottom: var(--lg); }
.mb-8 { margin-bottom: var(--xl); }

.hidden {
    display: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ========== SCROLLBAR ========== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--gray-100);
}

::-webkit-scrollbar-thumb {
    background: var(--gray-300);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--gray-400);
}

/* --- Fixed sidebar layout + toggle behaviour --- */

/* MAIN AREA PUSHED RIGHT (Desktop default) */
.layout__main {
    margin-left: 240px;
    width: calc(100% - 240px);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* TOGGLE BUTTON – sits at edge of sidebar */
.sidebar-toggle {
    position: fixed;
    top: 18px;
    left: 240px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid #374151;
    background: #111827;
    color: #4ae00ffd;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    z-index: 2000;
    transition: all 0.25s ease;
}

.sidebar-toggle:hover {
    background: #1f2937;
}

/* Collapsed state (desktop) – body gets .sidebar-collapsed */
body.sidebar-collapsed .layout__sidebar {
    width: 72px;
}

body.sidebar-collapsed .layout__main {
    margin-left: 72px;
    width: calc(100% - 72px);
}

body.sidebar-collapsed .sidebar-toggle {
    left: 72px;
}

/* Hide text labels when collapsed – icons only */
body.sidebar-collapsed .sidebar__item {
    justify-content: center;
}

body.sidebar-collapsed .sidebar__item-icon {
    margin-right: 0;
}

body.sidebar-collapsed .sidebar__item span:nth-child(2) {
    display: none;
}

/* HEADER FIXED TOP INSIDE MAIN */
.layout__header {
    position: sticky;
    top: 0;
    z-index: 900;
    background: #f9fafb;
}

/* ONLY CONTENT SCROLLS */
.content {
    flex: 1;
    overflow-y: auto;
    padding: 24px 32px;
    box-sizing: border-box;
}

/* MOBILE – sidebar slide in/out */
@media (max-width: 768px) {
    .layout__sidebar {
        left: 0;
        width: 240px;
        transition: left 0.3s ease;
    }

    body.sidebar-collapsed .layout__sidebar {
        left: -260px;
    }

    .layout__main {
        margin-left: 0;
        width: 100%;
    }

    .sidebar-toggle {
        left: 16px;
    }

    body.sidebar-collapsed .sidebar-toggle {
        left: 16px;
    }
}

/* ===== Remove White Background from Sidebar Buttons ===== */

/* Main sidebar container */
.layout__sidebar {
    background: linear-gradient(135deg, #1E40AF, #020617) !important;
}

.account-dropdown {
  position: absolute;
  top: 44px;
  left: 0;
  width: 320px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0,0,0,.2);
  max-height: 520px;
  overflow-y: auto;
  display: none;
  z-index: 999;
}

.account-dropdown.show {
  display: block;
}

.account-section {
  padding: 8px 0;
  border-bottom: 1px solid #e5e7eb;
}

.account-title {
  padding: 8px 16px;
  font-size: 12px;
  color: #6b7280;
  font-weight: 600;
}

.account-item {
  padding: 10px 16px;
  display: flex;
  justify-content: space-between;
  cursor: pointer;
}

.account-item:hover {
  background: #f1f3f4;
}

.account-name {
  font-size: 14px;
}

.account-id {
  font-size: 12px;
  color: #6b7280;
}
.account-switcher {
    position: relative;
}

.account-trigger {
    border: 1px solid #d1d5db;
    background: #fff;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    gap: 6px;
}

.account-dropdown {
    display: none;
    position: absolute;
    top: 40px;
    width: 280px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    z-index: 999;
}

.account-dropdown.open {
    display: block;
}

.section-title {
    font-size: 11px;
    color: #6b7280;
    padding: 8px;
}

.account-item {
    padding: 8px 10px;
    cursor: pointer;
}

.account-item:hover {
    background: #f3f4f6;
}

.account-item .name {
    font-size: 13px;
    font-weight: 500;
}

.account-item .id {
    font-size: 11px;
    color: #6b7280;
}

/* Dropdown button (white background remove) */
.sidebar__dropdown-toggle {
    background: transparent !important;
    color: #fff !important;
    border: none !important;
    box-shadow: none !important;
}

/* All sidebar items (Keywords, Demography, etc.) */
.sidebar__item,
.sidebar__nav a,
.sidebar__dropdown-menu a {
    background: transparent !important;
    color: rgba(255,255,255,0.85) !important;
    border: none !important;
}

/* Active sidebar item */
.sidebar__item.active {
    background: rgba(4, 79, 241, 0.884) !important;
    color: #ffffff !important;
}

/* Hover effect */
.sidebar__item:hover,
.sidebar__dropdown-toggle:hover {
    background: rgba(255,255,255,0.12) !important;
    color: #ffffff !important;
}

/* Dropdown menu background remove */
.sidebar__dropdown-menu {
    background: transparent !important;
    box-shadow: none !important;
}

/* Remove white border */
.sidebar__dropdown-toggle,
.sidebar__item {
    border: 1px solid transparent !important;
}
