/* ===================================================================
   SGI-M — Stylesheet
   =================================================================== */

/* ===== VARIABLES ===== */
:root {
    --yellow-primary: #D4940B;
    --yellow-light: #F5D062;
    --yellow-soft: #FFF8E7;
    --yellow-pale: #FFFCF5;
    --yellow-accent: #E8A817;
    --yellow-dark: #8B5E00;
    --yellow-gradient: linear-gradient(135deg, #E8A817 0%, #D4940B 50%, #C2850A 100%);
    --bg-main: #F5F2EB;
    --bg-white: #FFFFFF;
    --bg-sidebar: #0F2923;
    --bg-sidebar-hover: #1A4237;
    --bg-card: #FFFFFF;
    --bg-input: #F5F5F7;
    --bg-dropdown: #FFFFFF;
    --bg-overlay: rgba(0, 0, 0, 0.45);
    --bg-submenu: #0A1F1A;
    --text-dark: #1C1C1E;
    --text-medium: #4A4A50;
    --text-light: #8E8E93;
    --text-white: #F0F0F0;
    --text-sidebar: #C8D6D3;
    --text-dropdown: #1C1C1E;
    --border-light: #E8E8EC;
    --border-soft: #F0EDE4;
    --border-dropdown: #E8E8EC;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.04);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.10);
    --shadow-dropdown: 0 10px 30px rgba(0,0,0,0.13);
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 18px;
    --sidebar-width: 250px;
    --right-sidebar-width: 310px;
    --header-height: 64px;
    --transition-fast: 0.2s ease;
    --transition-smooth: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-color: 0.28s ease;
    --green-500: #10B981;
    --green-100: #ECFDF5;
    --amber-500: #F59E0B;
    --amber-100: #FFFBEB;
    --red-500: #EF4444;
    --red-100: #FEF2F2;
    --blue-500: #3B82F6;
    --blue-100: #EFF6FF;
    --purple-500: #8B5CF6;
    --purple-100: #F5F3FF;
}

/* ===== DARK MODE ===== */
body.dark-mode {
    --bg-main: #0F1412;
    --bg-white: #1C1C1E;
    --bg-card: #252528;
    --bg-input: #2A2A2D;
    --bg-dropdown: #2A2A2D;
    --bg-overlay: rgba(0,0,0,0.7);
    --bg-submenu: #04100D;
    --bg-sidebar: #061612;
    --bg-sidebar-hover: #0D2620;
    --text-dark: #E8E8EC;
    --text-medium: #B8B8BE;
    --text-light: #8A8A90;
    --text-dropdown: #E0E0E4;
    --text-sidebar: #B0B8B5;
    --border-light: #2E2E32;
    --border-soft: #2A2A2E;
    --border-dropdown: #353538;
    --shadow-xs: 0 1px 2px rgba(0,0,0,0.22);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.28);
    --shadow-md: 0 6px 20px rgba(0,0,0,0.35);
    --shadow-lg: 0 12px 32px rgba(0,0,0,0.40);
    --shadow-dropdown: 0 10px 30px rgba(0,0,0,0.50);
    --yellow-soft: #2E2618;
    --yellow-pale: #1E1C16;
    --green-100: #1A2E24;
    --amber-100: #2E2618;
    --red-100: #2E1C1C;
    --blue-100: #1A2332;
    --purple-100: #221F2E;
}

    /* Dark mode component overrides */
    body.dark-mode .search-box {
        background: #2A2A2D;
    }

        body.dark-mode .search-box:focus-within {
            background: #1C1C1E;
        }

    body.dark-mode .btn-icon {
        background: #252528;
        border-color: #353538;
        color: #C0C0C6;
    }

        body.dark-mode .btn-icon:hover {
            background: #2E2618;
            border-color: #8B5E00;
            color: #F5D062;
        }

    body.dark-mode .header-user-btn {
        background: #252528;
        border-color: #353538;
    }

        body.dark-mode .header-user-btn:hover {
            border-color: #8B5E00;
            background: #2E2618;
        }

    body.dark-mode .header-user-name {
        color: #E8E8EC;
    }

    body.dark-mode .header-user-role {
        color: #8A8A90;
    }

    body.dark-mode .header-user-avatar {
        background: #3A3A3E;
        color: #D0D0D0;
    }

    body.dark-mode .header-separator {
        background: #353538;
    }

    body.dark-mode .header-unit-indicator {
        background: #252528;
        border-color: #353538;
    }

        body.dark-mode .header-unit-indicator:hover {
            border-color: #8B5E00;
        }

    body.dark-mode .unit-indicator-name {
        color: #E8E8EC;
    }

    body.dark-mode .unit-indicator-icon {
        background: #2E2618;
        color: #F5D062;
    }

    body.dark-mode .notification-dropdown, body.dark-mode .user-dropdown {
        background: #2A2A2D;
        border-color: #353538;
    }

    body.dark-mode .notification-item:hover {
        background: #1E1E21;
    }

    body.dark-mode .user-dropdown a:hover {
        background: #1E1E21;
    }

    body.dark-mode .right-sidebar {
        background: #1C1C1E;
        border-left-color: #2E2E32;
    }

    body.dark-mode .module-item:hover {
        background: #252528;
    }

    body.dark-mode .module-item.active-module {
        background: #2E2618;
        border-color: #8B5E00;
    }

    body.dark-mode .submenu a:hover {
        background: #0D2620;
    }

    body.dark-mode .bottom-nav {
        background: #1C1C1E;
        border-top-color: #2E2E32;
    }

        body.dark-mode .bottom-nav a {
            color: #8A8A90;
        }

            body.dark-mode .bottom-nav a.active {
                color: #F5D062;
            }

    body.dark-mode .search-expandable input {
        background: #2A2A2D;
        color: #E8E8EC;
    }

    body.dark-mode .toggle-switch {
        background: #F5D062;
    }

        body.dark-mode .toggle-switch::after {
            transform: translateX(19px);
            background: #1C1C1E;
        }

    body.dark-mode .sidebar-logo .logo-text {
        color: #E8E8EC;
    }

        body.dark-mode .sidebar-logo .logo-text span {
            color: #A0A0A8;
        }

    body.dark-mode .welcome-banner {
        background: linear-gradient(135deg, #0F2923 0%, #1A4237 50%, #0D352C 100%);
    }

    body.dark-mode .welcome-greeting, body.dark-mode .welcome-name {
        color: #F0F0F0;
    }

    body.dark-mode .welcome-subtitle {
        color: #A0B0AB;
    }

    body.dark-mode .welcome-meta {
        color: #6B8A82;
    }

    body.dark-mode .welcome-module {
        background: rgba(255,255,255,0.08);
    }

    body.dark-mode .welcome-decor-circle {
        opacity: 0.08;
    }

    body.dark-mode .welcome-avatar {
        background: rgba(255,255,255,0.08);
        border-color: rgba(255,255,255,0.15);
    }

        body.dark-mode .welcome-avatar span {
            color: #E0E0E0;
        }

    body.dark-mode .dash-card {
        background: #252528;
        border-color: #2E2E32;
    }

    body.dark-mode .dash-card-header h3 {
        color: #E8E8EC;
    }

    body.dark-mode .metric-item {
        background: #252528;
        border-color: #2E2E32;
    }

    body.dark-mode .metric-value {
        color: #E8E8EC;
    }

    body.dark-mode .metric-label {
        color: #8A8A90;
    }

    body.dark-mode .qa-card {
        background: #252528;
        border-color: #2E2E32;
    }

        body.dark-mode .qa-card:hover {
            border-color: #8B5E00;
            background: #2E2618;
        }

    body.dark-mode .qa-label {
        color: #E8E8EC;
    }

    body.dark-mode .qa-hint {
        color: #8A8A90;
    }

    body.dark-mode .qa-icon-wrap {
        background: #2E2618;
        color: #F5D062;
    }

    body.dark-mode .timeline-body strong {
        color: #E8E8EC;
    }

    body.dark-mode .timeline-body p {
        color: #A0A0A8;
    }

    body.dark-mode .timeline-body time {
        color: #6A6A70;
    }

    body.dark-mode .timeline-dot {
        border-color: #252528;
    }

    body.dark-mode .section-label {
        color: #8A8A90;
    }

    body.dark-mode .page-heading {
        color: #E8E8EC;
    }

    body.dark-mode .page-breadcrumb {
        color: #8A8A90;
    }

    body.dark-mode .see-all-link {
        color: #F5D062;
    }

    body.dark-mode .chart-period-badge {
        background: #2E2618;
        color: #F5D062;
    }

    body.dark-mode .timeline-item:not(:last-child)::before {
        background: #2E2E32;
    }

    body.dark-mode .page-datetime {
        background: #252528;
        border-color: #2E2E32;
    }

        body.dark-mode .page-datetime i {
            color: #F5D062;
        }

    body.dark-mode .datetime-date {
        color: #B8B8BE;
    }

    body.dark-mode .datetime-time {
        color: #E8E8EC;
    }

/* ===== RESET ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--bg-main);
    color: var(--text-dark);
    display: flex;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
    transition: background var(--transition-color), color var(--transition-color);
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior: none;
}

/* ===== OVERLAY ===== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 90;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
    backdrop-filter: blur(2px);
}

    .sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

/* ===== SIDEBAR ESQUERDA ===== */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 24px rgba(0,0,0,0.18);
    border-right: 1px solid rgba(255,255,255,0.06);
    transition: transform 0.35s cubic-bezier(0.4,0,0.2,1), background var(--transition-color);
}
/* ===== SIDEBAR — Logo da Instituição ===== */
.sidebar-logo {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    flex-shrink: 0;
}

.sidebar-logo-img {
    width: 140px;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius-xs);
    transition: transform 0.3s ease, filter var(--transition-color);
    background: #fff;
}

    .sidebar-logo-img:hover {
        transform: scale(1.03);
    }

/* Ajuste de brilho no dark mode */
body.dark-mode .sidebar-logo-img {
    filter: brightness(1.1);
}

/* Badge SGE-M sutil abaixo do logotipo na sidebar */
.sidebar-sge-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 0 4px;
    font-size: 9px;
    font-weight: 700;
    color: #5A7A72;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

    .sidebar-sge-badge i {
        font-size: 8px;
        color: var(--yellow-accent);
        opacity: 0.5;
    }


.sidebar-nav {
    flex: 1;
    padding: 6px 10px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

    .sidebar-nav .nav-section {
        font-size: 9.5px;
        text-transform: uppercase;
        color: #6B8A82;
        padding: 14px 12px 5px;
        font-weight: 700;
    }

    .sidebar-nav a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 11px 13px;
        border-radius: var(--radius-xs);
        text-decoration: none;
        color: var(--text-sidebar);
        font-size: 13px;
        font-weight: 500;
        transition: var(--transition-fast);
        cursor: pointer;
        min-height: 44px;
    }

        .sidebar-nav a i {
            width: 19px;
            text-align: center;
            font-size: 15px;
            opacity: 0.75;
            flex-shrink: 0;
        }

        .sidebar-nav a .submenu-arrow {
            margin-left: auto;
            font-size: 10px;
            opacity: 0.6;
            transition: transform 0.25s;
        }

        .sidebar-nav a:hover {
            background: var(--bg-sidebar-hover);
            color: #E0E0E0;
        }

            .sidebar-nav a:hover i {
                opacity: 1;
            }

        .sidebar-nav a.active {
            background: rgba(232,168,23,0.15);
            color: var(--yellow-light);
            font-weight: 600;
            box-shadow: inset 3px 0 0 var(--yellow-accent);
        }

            .sidebar-nav a.active i {
                color: var(--yellow-light);
                opacity: 1;
            }

        .sidebar-nav a .badge {
            margin-left: auto;
            background: #E53935;
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 3px 8px;
            border-radius: 20px;
        }

.submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease;
    background: var(--bg-submenu);
    border-radius: 0 0 var(--radius-xs) var(--radius-xs);
    margin: 0 6px;
}

    .submenu.expanded {
        max-height: 300px;
    }

    .submenu a {
        padding: 10px 13px 10px 42px;
        font-size: 12.5px;
        color: #A0A8A5;
        min-height: 42px;
    }

        .submenu a:hover {
            background: var(--bg-sidebar-hover);
            color: #D8D8DC;
        }

.nav-item.has-submenu.expanded > a .submenu-arrow {
    transform: rotate(180deg);
    opacity: 1;
}

.sidebar-user {
    padding: 14px;
    border-top: 1px solid rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    gap: 10px;
}

    .sidebar-user .avatar {
        width: 38px;
        height: 38px;
        border-radius: 50%;
        background: #2A4A40;
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 15px;
        color: #D0D0D0;
        border: 2px solid rgba(255,255,255,0.12);
    }

    .sidebar-user .user-info {
        font-size: 11px;
        color: #B0B8B5;
        line-height: 1.3;
    }

        .sidebar-user .user-info strong {
            display: block;
            color: #E0E0E0;
            font-weight: 600;
            font-size: 12.5px;
        }

/* ===== MAIN CONTENT ===== */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-right var(--transition-smooth), margin-left 0.35s ease;
}

    .main-content.shifted {
        margin-right: var(--right-sidebar-width);
    }

/* ===== HEADER ===== */
.top-header {
    height: var(--header-height);
    background: var(--bg-white);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-xs);
    gap: 10px;
    transition: background var(--transition-color), border-color var(--transition-color);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

.hamburger-btn {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 18px;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

    .hamburger-btn:hover {
        background: var(--yellow-soft);
        border-color: var(--yellow-light);
        color: var(--yellow-dark);
    }

.header-separator {
    width: 1px;
    height: 28px;
    background: var(--border-light);
    flex-shrink: 0;
    transition: background var(--transition-color);
}

/* Search (desktop — left) */
.search-box {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border-radius: 24px;
    padding: 9px 15px;
    gap: 8px;
    border: 1px solid transparent;
    transition: var(--transition-fast);
    min-width: 200px;
    max-width: 260px;
    flex-shrink: 0;
}

    .search-box:focus-within {
        border-color: var(--yellow-accent);
        background: var(--bg-white);
        box-shadow: 0 0 0 3px rgba(232,168,23,0.08);
    }

    .search-box input {
        border: none;
        background: transparent;
        outline: none;
        font-size: 13px;
        font-family: 'Inter', sans-serif;
        color: var(--text-dark);
        width: 100%;
    }

    .search-box i {
        color: var(--text-light);
        font-size: 14px;
    }

/* Search mobile */
.search-expandable {
    display: none;
}

.search-toggle-btn {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 14px;
    transition: var(--transition-fast);
}

    .search-toggle-btn:hover {
        background: var(--yellow-soft);
        border-color: var(--yellow-light);
        color: var(--yellow-dark);
    }

.search-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    left: 10px;
    right: 10px;
    z-index: 250;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    transition: 0.2s ease;
    pointer-events: none;
}

    .search-dropdown.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

    .search-dropdown input {
        width: 100%;
        padding: 13px 16px;
        border-radius: var(--radius-md);
        border: 1px solid var(--border-dropdown);
        background: var(--bg-dropdown);
        font-family: 'Inter', sans-serif;
        font-size: 14px;
        color: var(--text-dark);
        box-shadow: var(--shadow-dropdown);
        outline: none;
    }

/* ===== HEADER: UNIT INDICATOR ===== */
.header-unit-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-left: 3px solid var(--yellow-accent);
    border-radius: var(--radius-sm);
    padding: 6px 14px 6px 10px;
    cursor: pointer;
    transition: var(--transition-fast);
    position: relative;
    flex-shrink: 0;
    max-width: 340px;
}

    .header-unit-indicator:hover {
        border-color: var(--yellow-accent);
        box-shadow: 0 0 0 3px rgba(232,168,23,0.08);
        background: var(--yellow-pale);
    }

.unit-active-dot {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--green-500);
    border: 2px solid var(--bg-white);
    box-shadow: 0 0 6px rgba(16,185,129,0.5);
    transition: background var(--transition-color), border-color var(--transition-color);
}

.unit-indicator-icon {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-xs);
    background: var(--yellow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--yellow-dark);
    font-size: 14px;
    flex-shrink: 0;
    transition: background var(--transition-color), color var(--transition-color);
}

.unit-indicator-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.unit-indicator-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.3;
    transition: color var(--transition-color);
}

.unit-indicator-sub {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
}

/* ===== HEADER: USER INFO ===== */
.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.btn-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-medium);
    font-size: 16px;
    position: relative;
    flex-shrink: 0;
    transition: var(--transition-fast);
}

    .btn-icon:hover {
        background: var(--yellow-soft);
        border-color: var(--yellow-light);
        color: var(--yellow-dark);
    }

    .btn-icon .dot {
        position: absolute;
        top: 6px;
        right: 6px;
        width: 9px;
        height: 9px;
        border-radius: 50%;
        background: #E53935;
        border: 2px solid var(--bg-white);
        transition: border-color var(--transition-color);
    }

.header-user-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 5px 14px 5px 5px;
    border-radius: 28px;
    border: 1px solid var(--border-light);
    background: var(--bg-white);
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
    min-height: 44px;
}

    .header-user-btn:hover {
        border-color: var(--yellow-accent);
        box-shadow: var(--shadow-sm);
        background: var(--yellow-pale);
    }

.header-user-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--yellow-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 12px;
    color: #1C1C1E;
    flex-shrink: 0;
    transition: background var(--transition-color);
}

.header-user-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.header-user-name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    white-space: nowrap;
    line-height: 1.2;
    transition: color var(--transition-color);
}

.header-user-role {
    font-size: 10px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    transition: color var(--transition-color);
}

.header-user-chevron {
    font-size: 9px;
    color: var(--text-light);
    margin-left: 2px;
    flex-shrink: 0;
}

/* ===== DROPDOWNS ===== */
.dropdown-wrapper {
    position: relative;
}

.notification-dropdown, .user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--bg-dropdown);
    border: 1px solid var(--border-dropdown);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-dropdown);
    min-width: 310px;
    z-index: 300;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: 0.22s ease;
    pointer-events: none;
}

    .notification-dropdown.active, .user-dropdown.active {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        pointer-events: auto;
    }

.notification-dropdown {
    min-width: 330px;
    right: -10px;
}

.user-dropdown {
    min-width: 220px;
    right: 0;
}

.notif-header {
    display: flex;
    justify-content: space-between;
    padding: 14px 16px 10px;
    border-bottom: 1px solid var(--border-dropdown);
    font-weight: 700;
    font-size: 14px;
    color: var(--text-dark);
}

    .notif-header a {
        font-size: 11px;
        font-weight: 600;
        color: var(--yellow-dark);
        text-decoration: none;
    }

.notification-list {
    max-height: 260px;
    overflow-y: auto;
}

.notification-item {
    display: flex;
    gap: 11px;
    padding: 12px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-soft);
    align-items: flex-start;
    transition: background var(--transition-fast);
}

    .notification-item:hover {
        background: var(--yellow-pale);
    }

.notif-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--yellow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: var(--yellow-dark);
    flex-shrink: 0;
}

.notif-content {
    flex: 1;
    font-size: 12.5px;
    color: var(--text-medium);
    line-height: 1.4;
}

    .notif-content strong {
        display: block;
        color: var(--text-dark);
        font-weight: 600;
        font-size: 13px;
    }

.notif-time {
    font-size: 10px;
    color: var(--text-light);
    margin-top: 3px;
}

.user-dropdown .user-dropdown-header {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-dropdown);
    display: flex;
    gap: 10px;
}

.user-dropdown .avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #3A3A3E;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    color: #D0D0D0;
}

.user-dropdown .user-detail strong {
    font-size: 13px;
    color: var(--text-dark);
}

.user-dropdown .user-detail span {
    font-size: 11px;
    color: var(--text-light);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 16px;
    text-decoration: none;
    color: var(--text-medium);
    font-size: 13px;
    font-weight: 500;
    transition: var(--transition-fast);
    cursor: pointer;
    min-height: 44px;
}

    .user-dropdown a:hover {
        background: var(--yellow-pale);
        color: var(--text-dark);
    }

.user-dropdown .dropdown-divider {
    height: 1px;
    background: var(--border-dropdown);
    margin: 4px 0;
}

.theme-toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 11px 16px;
    font-size: 13px;
    color: var(--text-medium);
    font-weight: 500;
    cursor: pointer;
    min-height: 44px;
}

.toggle-switch {
    width: 44px;
    height: 25px;
    background: #D1D1D6;
    border-radius: 25px;
    position: relative;
    cursor: pointer;
    transition: 0.3s;
}

    .toggle-switch::after {
        content: '';
        position: absolute;
        width: 21px;
        height: 21px;
        background: #fff;
        border-radius: 50%;
        top: 2px;
        left: 2px;
        transition: transform 0.3s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
    }

/* ===== RIGHT SIDEBAR ===== */
.right-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    z-index: 180;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

    .right-sidebar-overlay.active {
        opacity: 1;
        visibility: visible;
    }

.right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: var(--right-sidebar-width);
    background: var(--bg-white);
    z-index: 200;
    box-shadow: -6px 0 30px rgba(0,0,0,0.15);
    border-left: 1px solid var(--border-light);
    transform: translateX(100%);
    transition: transform 0.35s ease, background var(--transition-color);
    display: flex;
    flex-direction: column;
}

    .right-sidebar.open {
        transform: translateX(0);
    }

.right-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid var(--border-light);
    font-weight: 700;
    font-size: 16px;
    color: var(--text-dark);
}

    .right-sidebar-header .close-btn {
        width: 36px;
        height: 36px;
        border-radius: 50%;
        border: 1px solid var(--border-light);
        background: transparent;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-medium);
        font-size: 14px;
        transition: var(--transition-fast);
    }

        .right-sidebar-header .close-btn:hover {
            background: #FEE2E2;
            border-color: #FECACA;
            color: #DC2626;
        }

.right-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.module-section-title {
    font-size: 10px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    padding: 8px 8px 4px;
}

.module-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: var(--transition-fast);
    font-weight: 500;
    font-size: 13px;
    color: var(--text-medium);
    border: 1px solid transparent;
    text-decoration: none;
    min-height: 48px;
}

    .module-item:hover {
        background: var(--yellow-soft);
        border-color: #F0E4C0;
        color: var(--text-dark);
    }

    .module-item.active-module {
        background: var(--yellow-soft);
        border-color: var(--yellow-accent);
        color: var(--yellow-dark);
        font-weight: 600;
    }

.module-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 15px;
    background: #F9F7F2;
    color: var(--yellow-dark);
}

/* ===== BOTTOM NAV ===== */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    z-index: 55;
    padding: 6px 8px;
    padding-bottom: max(6px, env(safe-area-inset-bottom));
    box-shadow: 0 -2px 12px rgba(0,0,0,0.06);
}

.bottom-nav-inner {
    display: flex;
    justify-content: space-around;
}

.bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    text-decoration: none;
    color: var(--text-light);
    font-size: 10px;
    font-weight: 500;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
    flex: 1;
    text-align: center;
    min-height: 48px;
    justify-content: center;
}

    .bottom-nav a i {
        font-size: 18px;
    }

    .bottom-nav a.active {
        color: var(--yellow-dark);
        font-weight: 600;
    }

        .bottom-nav a.active i {
            color: var(--yellow-accent);
        }

.bottom-nav .badge-dot {
    position: relative;
}

    .bottom-nav .badge-dot::after {
        content: '';
        position: absolute;
        top: -2px;
        right: -6px;
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #E53935;
    }


/* ===================================================================
   DASHBOARD STYLES
   =================================================================== */

.dashboard-content {
    padding: 22px 24px 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
    width: 100%;
}

/* --- Page Header --- */
.page-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    padding-bottom: 4px;
    gap: 16px;
}

.page-header-left {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.page-heading {
    font-size: 22px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.03em;
    line-height: 1.2;
    transition: color var(--transition-color);
}

.page-breadcrumb {
    font-size: 12px;
    color: var(--text-light);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color var(--transition-color);
}

    .page-breadcrumb i {
        font-size: 10px;
    }

/* --- Page Header: Date/Time --- */
.page-header-right {
    flex-shrink: 0;
}

.page-datetime {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-sm);
    padding: 8px 16px 8px 12px;
    transition: background var(--transition-color), border-color var(--transition-color);
}

    .page-datetime i {
        font-size: 18px;
        color: var(--yellow-accent);
        flex-shrink: 0;
        transition: color var(--transition-color);
    }

.datetime-info {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
}

.datetime-date {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    text-transform: capitalize;
    transition: color var(--transition-color);
}

.datetime-time {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-dark);
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.02em;
    transition: color var(--transition-color);
}

/* --- Welcome Banner --- */
.welcome-banner {
    background: linear-gradient(135deg, #0F2923 0%, #1A4237 40%, #163D34 100%);
    border-radius: var(--radius-lg);
    padding: 28px 30px;
    position: relative;
    overflow: hidden;
    animation: fadeUp 0.5s ease both;
}

.welcome-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    z-index: 2;
    gap: 16px;
}

.welcome-left {
    display: flex;
    align-items: center;
    gap: 18px;
}

.welcome-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(255,255,255,0.08);
    border: 2px solid rgba(255,255,255,0.18);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 22px;
    color: #C0D0CC;
    flex-shrink: 0;
    overflow: hidden;
    transition: background var(--transition-color), border-color var(--transition-color);
}

    .welcome-avatar img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

.welcome-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.welcome-greeting {
    font-size: 13px;
    color: #7FB8A9;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.welcome-name {
    font-size: 26px;
    font-weight: 800;
    color: #F0F0F0;
    letter-spacing: -0.03em;
    line-height: 1.2;
}

.welcome-subtitle {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12.5px;
    color: #8EAFA4;
    font-weight: 500;
    margin-top: 4px;
}

    .welcome-subtitle i {
        font-size: 13px;
        color: var(--yellow-light);
    }

.welcome-sep {
    color: #4A7A6D;
}

.welcome-status {
    display: flex;
    align-items: center;
    gap: 5px;
}

.welcome-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34D399;
    box-shadow: 0 0 6px rgba(52,211,153,0.5);
}

.welcome-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 6px;
    flex-shrink: 0;
}

.welcome-date {
    font-size: 12px;
    color: #8EAFA4;
    font-weight: 500;
    text-align: right;
    text-transform: capitalize;
}

.welcome-module {
    font-size: 10.5px;
    font-weight: 600;
    color: var(--yellow-light);
    background: rgba(245,208,98,0.12);
    padding: 5px 12px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .welcome-module i {
        font-size: 9px;
    }

/* Decorative circles */
.welcome-decor {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

.welcome-decor-circle {
    position: absolute;
    border-radius: 50%;
    background: var(--yellow-light);
    opacity: 0.06;
}

    .welcome-decor-circle.c1 {
        width: 200px;
        height: 200px;
        top: -60px;
        right: -40px;
    }

    .welcome-decor-circle.c2 {
        width: 120px;
        height: 120px;
        bottom: -30px;
        right: 120px;
    }

    .welcome-decor-circle.c3 {
        width: 80px;
        height: 80px;
        top: 20px;
        right: 200px;
    }

/* --- Metrics Strip --- */
.metrics-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
}

.metric-item {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    transition: var(--transition-smooth);
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}

    .metric-item:nth-child(1) {
        animation-delay: 0.08s;
    }

    .metric-item:nth-child(2) {
        animation-delay: 0.14s;
    }

    .metric-item:nth-child(3) {
        animation-delay: 0.20s;
    }

    .metric-item:nth-child(4) {
        animation-delay: 0.26s;
    }

    .metric-item:hover {
        box-shadow: var(--shadow-md);
        transform: translateY(-1px);
    }

.metric-icon {
    width: 42px;
    height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    flex-shrink: 0;
}

    .metric-icon.mi-yellow {
        background: var(--amber-100);
        color: var(--yellow-dark);
    }

    .metric-icon.mi-blue {
        background: var(--blue-100);
        color: var(--blue-500);
    }

    .metric-icon.mi-green {
        background: var(--green-100);
        color: var(--green-500);
    }

    .metric-icon.mi-purple {
        background: var(--purple-100);
        color: var(--purple-500);
    }

.metric-data {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.metric-value {
    font-size: 20px;
    font-weight: 800;
    color: var(--text-dark);
    letter-spacing: -0.02em;
    line-height: 1.1;
    transition: color var(--transition-color);
}

.metric-label {
    font-size: 11px;
    color: var(--text-light);
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color var(--transition-color);
}

.metric-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}

    .metric-badge.positive {
        background: var(--green-100);
        color: var(--green-500);
    }

    .metric-badge.neutral {
        background: var(--bg-input);
        color: var(--text-light);
    }

/* --- Section Label --- */
.section-label {
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-light);
    font-weight: 700;
    letter-spacing: 0.04em;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color var(--transition-color);
}

    .section-label i {
        color: var(--yellow-accent);
        font-size: 12px;
    }

/* --- Quick Access Grid --- */
.quick-access-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 12px;
}

.qa-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    padding: 20px 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
    animation: fadeUp 0.5s ease forwards;
}

    .qa-card:nth-child(1) {
        animation-delay: 0.10s;
    }

    .qa-card:nth-child(2) {
        animation-delay: 0.15s;
    }

    .qa-card:nth-child(3) {
        animation-delay: 0.20s;
    }

    .qa-card:nth-child(4) {
        animation-delay: 0.25s;
    }

    .qa-card:nth-child(5) {
        animation-delay: 0.30s;
    }

    .qa-card:nth-child(6) {
        animation-delay: 0.35s;
    }

    .qa-card:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        border-color: var(--yellow-accent);
        background: var(--yellow-pale);
    }

.qa-icon-wrap {
    width: 46px;
    height: 46px;
    border-radius: var(--radius-sm);
    background: var(--yellow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    color: var(--yellow-dark);
    transition: var(--transition-fast);
}

.qa-card:hover .qa-icon-wrap {
    background: var(--yellow-gradient);
    color: #1C1C1E;
    box-shadow: 0 4px 12px rgba(212,148,11,0.3);
}

.qa-label {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.3;
    transition: color var(--transition-color);
}

.qa-hint {
    font-size: 10.5px;
    color: var(--text-light);
    line-height: 1.2;
    transition: color var(--transition-color);
}

/* --- Dashboard Columns --- */
.dashboard-columns {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 14px;
}

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: background var(--transition-color), border-color var(--transition-color);
}

.dash-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-soft);
}

    .dash-card-header h3 {
        font-size: 14px;
        font-weight: 700;
        color: var(--text-dark);
        display: flex;
        align-items: center;
        gap: 8px;
        transition: color var(--transition-color);
    }

        .dash-card-header h3 i {
            color: var(--yellow-accent);
            font-size: 14px;
        }

.see-all-link {
    font-size: 11.5px;
    font-weight: 600;
    color: var(--yellow-dark);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: var(--transition-fast);
}

    .see-all-link:hover {
        color: var(--yellow-primary);
        gap: 8px;
    }

.chart-period-badge {
    font-size: 10px;
    font-weight: 600;
    background: var(--yellow-soft);
    color: var(--yellow-dark);
    padding: 4px 10px;
    border-radius: 20px;
    transition: background var(--transition-color), color var(--transition-color);
}

/* --- Activity Timeline --- */
.activity-timeline {
    padding: 8px 20px 16px;
    display: flex;
    flex-direction: column;
}

.timeline-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    position: relative;
    align-items: flex-start;
}

    .timeline-item:not(:last-child) {
        border-bottom: 1px solid var(--border-soft);
    }

        .timeline-item:not(:last-child)::before {
            content: '';
            position: absolute;
            left: 7px;
            top: 36px;
            bottom: -1px;
            width: 1px;
            background: var(--border-soft);
            transition: background var(--transition-color);
        }

.timeline-dot {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    flex-shrink: 0;
    margin-top: 2px;
    border: 3px solid var(--bg-card);
    box-shadow: 0 0 0 1px var(--border-light);
    transition: border-color var(--transition-color);
}

    .timeline-dot.td-success {
        background: var(--green-500);
        box-shadow: 0 0 0 1px var(--green-500);
    }

    .timeline-dot.td-warning {
        background: var(--amber-500);
        box-shadow: 0 0 0 1px var(--amber-500);
    }

    .timeline-dot.td-danger {
        background: var(--red-500);
        box-shadow: 0 0 0 1px var(--red-500);
    }

.timeline-body {
    flex: 1;
    min-width: 0;
}

    .timeline-body strong {
        display: block;
        font-size: 13px;
        font-weight: 600;
        color: var(--text-dark);
        line-height: 1.3;
        transition: color var(--transition-color);
    }

    .timeline-body p {
        font-size: 12px;
        color: var(--text-medium);
        margin-top: 2px;
        line-height: 1.4;
        transition: color var(--transition-color);
    }

        .timeline-body p em {
            font-style: normal;
            font-weight: 600;
            color: var(--yellow-dark);
        }

    .timeline-body time {
        display: flex;
        align-items: center;
        gap: 4px;
        font-size: 10.5px;
        color: var(--text-light);
        margin-top: 4px;
        font-weight: 500;
        transition: color var(--transition-color);
    }

        .timeline-body time i {
            font-size: 9px;
        }

.chart-body {
    padding: 16px 20px 20px;
}

/* ── Logout form dentro do dropdown ── */

.dropdown-logout-form {
    padding: 0;
    margin: 0;
}

.dropdown-logout-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 11px 16px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: #DC2626;
    text-align: left;
    min-height: 44px;
    transition: var(--transition-fast);
    border-radius: 0;
}

    .dropdown-logout-btn i {
        width: 16px;
        text-align: center;
        font-size: 14px;
    }

    .dropdown-logout-btn:hover {
        background: #FEF2F2;
        color: #B91C1C;
    }

body.dark-mode .dropdown-logout-btn {
    color: #EF4444;
}

    body.dark-mode .dropdown-logout-btn:hover {
        background: #2E1C1C;
        color: #F87171;
    }



/* ===================================================================
   RESPONSIVE
   =================================================================== */

@media (max-width: 1200px) {
    .metrics-strip {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1024px) {
    .sidebar {
        transform: translateX(-100%);
    }

        .sidebar.open {
            transform: translateX(0);
            box-shadow: 8px 0 40px rgba(0,0,0,0.3);
        }

    .main-content {
        margin-left: 0;
    }

    .hamburger-btn {
        display: flex;
    }

    .sidebar-overlay {
        z-index: 90;
    }

    .header-unit-indicator {
        display: none;
    }

    .header-separator:first-of-type {
        display: none;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 56px;
    }

    .search-box {
        display: none;
    }

    .header-separator {
        display: none;
    }

    .search-expandable {
        display: flex;
    }

    .dashboard-content {
        padding: 14px 12px 84px;
    }

    .page-heading {
        font-size: 19px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .page-header-right {
        align-self: stretch;
    }

    .page-datetime {
        width: 100%;
        justify-content: center;
    }

    .welcome-banner {
        padding: 20px 18px;
    }

    .welcome-name {
        font-size: 21px;
    }

    .welcome-content {
        flex-direction: column;
        gap: 12px;
    }

    .welcome-left {
        gap: 14px;
    }

    .welcome-avatar {
        width: 52px;
        height: 52px;
        font-size: 18px;
    }

    .welcome-meta {
        align-items: flex-start;
        flex-direction: row;
        gap: 12px;
    }

    .metrics-strip {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .metric-badge {
        display: none;
    }

    .quick-access-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .qa-card {
        padding: 14px 8px 12px;
    }

    .qa-hint {
        display: none;
    }

    .header-user-role {
        display: none;
    }

    .header-user-text {
        display: none;
    }

    .header-user-btn {
        padding: 5px;
        border-radius: 50%;
    }

    .header-user-chevron {
        display: none;
    }

    .bottom-nav {
        display: block;
    }

    .main-content {
        padding-bottom: 62px;
    }

    .right-sidebar {
        width: 85vw;
        max-width: 320px;
    }

    .notification-dropdown {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        bottom: 0;
        min-width: unset;
        border-radius: 0;
        max-height: calc(100vh - var(--header-height));
        overflow-y: auto;
    }

    .user-dropdown {
        right: 4px;
        min-width: 200px;
    }

    .dashboard-columns {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .quick-access-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .metrics-strip {
        grid-template-columns: 1fr;
    }

    .metric-item {
        padding: 12px 14px;
    }
}

/* ===== Animations ===== */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(16px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.sidebar-logo {
    padding: 20px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #001505;
}

.sidebar-logo-img {
    max-width: 280px;
    max-height: 96px;
    object-fit: contain;
    padding:10px;
    display: block;
}

.sidebar-logo-fallback {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-md);
    background: var(--yellow-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #1C1C1E;
    box-shadow: 0 4px 12px rgba(212,148,11,0.25);
}
/* ═══════════════════════════════════
   INDICADOR DA UNIDADE NO HEADER
   ═══════════════════════════════════ */
.header-unit-indicator {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    border-radius: 20px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.10);
    cursor: pointer;
    position: relative;
    transition: var(--transition-fast);
    text-decoration: none;
}

    .header-unit-indicator:hover {
        background: rgba(255,255,255,0.10);
        border-color: rgba(255,255,255,0.18);
    }

/* Estado vazio — chama atenção */
.header-unit-indicator--vazio {
    border-color: rgba(248,113,113,0.4);
    background: rgba(248,113,113,0.08);
    animation: pulse-vazio 2s ease-in-out infinite;
}

@keyframes pulse-vazio {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(248,113,113,0.0);
    }

    50% {
        box-shadow: 0 0 0 4px rgba(248,113,113,0.12);
    }
}

.header-unit-indicator--vazio:hover {
    background: rgba(248,113,113,0.15);
    border-color: rgba(248,113,113,0.6);
}

/* Dot */
.unit-active-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--green-500);
    flex-shrink: 0;
}

.unit-active-dot--vazio {
    background: #F87171;
}

/* Ícone */
.unit-indicator-icon {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    background: rgba(255,255,255,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    color: #C0D0CC;
    flex-shrink: 0;
}

.unit-indicator-icon--vazio {
    background: rgba(248,113,113,0.15);
    color: #F87171;
}

/* Logo no indicador */
.unit-indicator-logo {
    width: 28px;
    height: 28px;
    border-radius: var(--radius-xs);
    background: #FFFFFF;
    padding: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
}

    .unit-indicator-logo img {
        width: 100%;
        height: 100%;
        object-fit: contain;
    }

/* Texto */
.unit-indicator-info {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.unit-indicator-name {
    font-size: 12px;
    font-weight: 600;
    color: #1C1C1E;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    line-height: 1.3;
}

.unit-indicator-name--vazio {
    color: #FCA5A5;
}

.unit-indicator-sub {
    font-size: 10px;
    color: #6B8A82;
    font-weight: 500;
    line-height: 1.3;
}

.unit-indicator-chevron {
    font-size: 9px;
    color: rgba(255,255,255,0.35);
    margin-left: 2px;
    transition: var(--transition-fast);
}

.header-unit-indicator:hover .unit-indicator-chevron {
    color: rgba(255,255,255,0.6);
}

/* ═══════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════ */
@media (max-width: 768px) {
    .unit-indicator-name {
        max-width: 120px;
    }

    .header-unit-indicator--vazio .unit-indicator-name {
        max-width: 100px;
    }
}


/* ═══════════════════════════════════════
   SCROLLBAR PERSONALIZADA — GLOBAL
   ═══════════════════════════════════════ */

/* Firefox — todas as áreas roláveis */
* {
    scrollbar-width: thin;
    scrollbar-color: #C8C4BC transparent;
}

body.dark-mode * {
    scrollbar-color: #3A3A3E transparent;
}

/* Webkit (Chrome, Edge, Safari, Opera) — global */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #C8C4BC;
    border-radius: 10px;
}

    ::-webkit-scrollbar-thumb:hover {
        background: #A8A49C;
    }

::-webkit-scrollbar-corner {
    background: transparent;
}

/* ═══════════════════════════════════════
   SCROLLBAR — SIDEBAR ESQUERDA
   ═══════════════════════════════════════ */

.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.12) transparent;
}

    .sidebar-nav::-webkit-scrollbar {
        width: 4px;
    }

    .sidebar-nav::-webkit-scrollbar-track {
        background: transparent;
        margin: 6px 0;
    }

    .sidebar-nav::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.12);
        border-radius: 10px;
    }

        .sidebar-nav::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.25);
        }

/* ═══════════════════════════════════════
   SCROLLBAR — RIGHT SIDEBAR
   ═══════════════════════════════════════ */

.right-sidebar-body {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

    .right-sidebar-body::-webkit-scrollbar {
        width: 4px;
    }

    .right-sidebar-body::-webkit-scrollbar-track {
        background: transparent;
        margin: 6px 0;
    }

    .right-sidebar-body::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 10px;
    }

        .right-sidebar-body::-webkit-scrollbar-thumb:hover {
            background: var(--text-light);
        }

/* ═══════════════════════════════════════
   SCROLLBAR — NOTIFICATION DROPDOWN
   ═══════════════════════════════════════ */

.notification-list {
    scrollbar-width: thin;
    scrollbar-color: var(--border-light) transparent;
}

    .notification-list::-webkit-scrollbar {
        width: 3px;
    }

    .notification-list::-webkit-scrollbar-track {
        background: transparent;
    }

    .notification-list::-webkit-scrollbar-thumb {
        background: var(--border-light);
        border-radius: 10px;
    }

        .notification-list::-webkit-scrollbar-thumb:hover {
            background: var(--text-light);
        }

/* ═══════════════════════════════════════
   SCROLLBAR — SUBMENU (quando expandido)
   ═══════════════════════════════════════ */

.submenu {
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}

    .submenu::-webkit-scrollbar {
        width: 3px;
    }

    .submenu::-webkit-scrollbar-track {
        background: transparent;
    }

    .submenu::-webkit-scrollbar-thumb {
        background: rgba(255,255,255,0.08);
        border-radius: 10px;
    }

        .submenu::-webkit-scrollbar-thumb:hover {
            background: rgba(255,255,255,0.18);
        }

/* ═══════════════════════════════════════
   SCROLLBAR — CONTEÚDO PRINCIPAL
   ═══════════════════════════════════════ */

.main-content {
    scrollbar-width: thin;
    scrollbar-color: #C8C4BC transparent;
}

body.dark-mode .main-content {
    scrollbar-color: #3A3A3E transparent;
}

.main-content::-webkit-scrollbar {
    width: 7px;
}

.main-content::-webkit-scrollbar-track {
    background: transparent;
}

.main-content::-webkit-scrollbar-thumb {
    background: #C8C4BC;
    border-radius: 10px;
    border: 1px solid transparent;
    background-clip: content-box;
}

    .main-content::-webkit-scrollbar-thumb:hover {
        background: #A8A49C;
        background-clip: content-box;
    }

body.dark-mode .main-content::-webkit-scrollbar-thumb {
    background: #3A3A3E;
    background-clip: content-box;
}

    body.dark-mode .main-content::-webkit-scrollbar-thumb:hover {
        background: #4A4A4E;
        background-clip: content-box;
    }

/* ═══════════════════════════════════════
   SCROLLBAR — DARK MODE GLOBAL
   ═══════════════════════════════════════ */

body.dark-mode ::-webkit-scrollbar-thumb {
    background: #3A3A3E;
}

    body.dark-mode ::-webkit-scrollbar-thumb:hover {
        background: #4A4A4E;
    }

/* ═══════════════════════════════════════
   SCROLLBAR — MOBILE: OCULTA POR DEFAULT
   ═══════════════════════════════════════ */

@media (max-width: 1024px) {
    * {
        scrollbar-width: none;
    }

        *::-webkit-scrollbar {
            width: 0;
            height: 0;
        }

    /* A sidebar mantém fina visível no mobile */
    .sidebar-nav::-webkit-scrollbar {
        width: 3px;
    }

    .sidebar-nav {
        scrollbar-width: thin;
    }
}