:root {
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-light: #a5b4fc;
    --accent-bg: #eef2ff;
    --sidebar-bg: #0f1629;
    --sidebar-text: rgba(255,255,255,0.65);
    --sidebar-active-bg: rgba(99,102,241,0.15);
    --sidebar-active-text: #a5b4fc;
    --sidebar-hover: rgba(255,255,255,0.06);
}

*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

.font-300 { font-weight: 300; }
.font-400 { font-weight: 400; }
.font-500 { font-weight: 500; }
.font-600 { font-weight: 600; }
.font-700 { font-weight: 700; }
.font-800 { font-weight: 800; }

/* SIDEBAR */
#sidebar {
    transition: transform 0.25s cubic-bezier(0.4,0,0.2,1);
}
#sidebar.hidden-mobile {
    transform: translateX(-100%);
}
@media (max-width: 1023px) {
    #sidebar {
        transform: translateX(-100%);
    }
    #sidebar.open {
        transform: translateX(0);
    }
}

.nav-group-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.2);
    padding: 14px 12px 6px;
    margin-top: 4px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 600;
    color: var(--sidebar-text);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    user-select: none;
    text-decoration: none;
    margin-bottom: 1px;
}
.nav-item:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.9);
}
.nav-item.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}
.nav-item .chevron {
    margin-left: auto;
    font-size: 9px;
    transition: transform 0.2s;
    color: rgba(255,255,255,0.25);
}
.nav-item.open .chevron {
    transform: rotate(90deg);
}
.nav-icon {
    width: 18px;
    text-align: center;
    font-size: 13px;
    flex-shrink: 0;
    opacity: 0.7;
}
.nav-item.active .nav-icon,
.nav-item:hover .nav-icon {
    opacity: 1;
}

.submenu {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.25s cubic-bezier(0.4,0,0.2,1);
}
.submenu.open {
    max-height: 300px;
}

.sub-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 500;
    color: rgba(255,255,255,0.45);
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    margin-bottom: 1px;
}
.sub-item:hover {
    background: var(--sidebar-hover);
    color: rgba(255,255,255,0.8);
}
.sub-item.active {
    color: var(--sidebar-active-text);
    background: var(--sidebar-active-bg);
}
.sub-dot {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    flex-shrink: 0;
    transition: background 0.15s;
}
.sub-item:hover .sub-dot,
.sub-item.active .sub-dot {
    background: var(--accent-light);
}

/* HEADER */
#header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid #e9ecf0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    z-index: 10;
}

.header-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 7px 12px;
    min-width: 220px;
    max-width: 320px;
    transition: border-color 0.15s, box-shadow 0.15s;
}
.header-search:hover {
    border-color: #c7d2fe;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.07);
}

.icon-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    border: 1px solid #e2e8f0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    flex-shrink: 0;
}
.icon-btn:hover {
    background: #f1f5f9;
    color: #374151;
    border-color: #cbd5e1;
}

.badge {
    position: absolute;
    top: -3px;
    right: -3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ef4444;
    color: white;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.avatar-btn {
    width: 34px;
    height: 34px;
    border-radius: 9px;
    background: var(--accent);
    color: white;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: opacity 0.15s;
    user-select: none;
}
.avatar-btn:hover { opacity: 0.85; }

.dropdown-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 200px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1), 0 2px 8px rgba(0,0,0,0.05);
    padding: 6px;
    z-index: 100;
    display: none;
    animation: dropIn 0.15s ease;
}
.dropdown-menu.open { display: block; }

@keyframes dropIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.dropdown-item:hover {
    background: #f8fafc;
    color: #1e293b;
}
.dropdown-item.danger { color: #ef4444; }
.dropdown-item.danger:hover { background: #fef2f2; }

.dropdown-divider {
    height: 1px;
    background: #f1f5f9;
    margin: 4px 0;
}

/* STAT CARDS */
.stat-card {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e8ecf2;
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    transition: box-shadow 0.2s, transform 0.2s;
}
.stat-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,0.07);
    transform: translateY(-1px);
}
.stat-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 14px;
    flex-shrink: 0;
}

/* FOOTER */
#footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: rgba(255,255,255,0.7);
    border-top: 1px solid #e8ecf2;
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
}
