/* ========================================================================
   ADMIN LAYOUT & SIDEBAR - Enhanced Design System
   ======================================================================== */

/* ========== CSS Variables ========== */
:root {
    /* Layout */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    --header-height: 70px;
    --transition-speed: 0.3s;
    --transition-curve: cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Colors - Anthracite / Green / Brick Red / White */
    --primary-color:   #2B2D42;
    --primary-light:   #3a3d59;
    --primary-dark:    #23253a;
    --primary-darker:  #1d1f30;
    --primary-pale:    #f1f3f5;
    --primary-soft:    #e9ecef;
    --crimson:         #C1121F;
    --crimson-light:   #d72638;
    --crimson-dark:    #940f18;
    --crimson-pale:    #fef2f2;
    --secondary-color: #0F5132;
    --danger-color:    #C1121F;
    --warning-color:   #2B2D42;
    --info-color:      #0F5132;

    /* Background - Light */
    --bg-dark: #ffffff;
    --bg-dark-light: #f8f9fa;
    --bg-dark-lighter: #eef1f3;
    --bg-dark-card: #ffffff;

    /* Text */
    --text-white: #2B2D42;
    --text-muted: #5c6176;
    --text-dark: #2B2D42;

    /* Effects */
    --accent-glow: rgba(15, 81, 50, 0.2);
    --crimson-glow: rgba(193, 18, 31, 0.22);
    --border-color: rgba(43, 45, 66, 0.16);
    --shadow-sm: 0 2px 8px rgba(43, 45, 66, 0.08);
    --shadow-md: 0 4px 16px rgba(43, 45, 66, 0.12);
    --shadow-lg: 0 8px 24px rgba(43, 45, 66, 0.14);
    --shadow-xl: 0 18px 45px rgba(43, 45, 66, 0.16);
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

/* ========== Global Resets ========== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== Admin Layout ========== */
.admin-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
}

.admin-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-width: 0;
    overflow-x: hidden;
    transition: margin-left var(--transition-speed) var(--transition-curve);
}

/* ========== Mobile Header ========== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    z-index: 1050;
    background: #111827;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    box-shadow: 0 4px 24px rgba(0,0,0,0.32);
    padding: 0 1rem;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    overflow: hidden;
}

.mobile-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: transparent;
    pointer-events: none;
}

.mobile-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.18) 50%, transparent 100%);
}

.mobile-header-brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    flex: 1;
    position: relative;
    z-index: 1;
}

.mobile-header-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 10px;
    flex-shrink: 0;
    background: #ffffff;
    border: 1px solid #d1d5db;
    padding: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

.mobile-header-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: none;
}

/* ========== Mobile Menu Toggle ========== */
.mobile-menu-toggle {
    position: fixed;
    bottom: 2rem;
    right: 1.5rem;
    z-index: 1051;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #2B2D42, #0F5132);
    border: none;
    border-radius: 50%;
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 32px var(--accent-glow), 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all var(--transition-speed) var(--transition-curve);
    overflow: hidden;
}

/* Inside header: stylized square button */
.mobile-header .mobile-menu-toggle {
    position: static;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    padding: 0;
    gap: 0;
    background: rgba(255,255,255,0.09);
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.1);
    flex-shrink: 0;
    bottom: unset;
    right: unset;
    overflow: hidden;
    position: relative;
    z-index: 1;
    transition: background 0.18s;
}

.mobile-header .mobile-menu-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, transparent 50%);
    border-radius: inherit;
}

.mobile-menu-toggle::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%);
    border-radius: inherit;
}

.mobile-menu-toggle::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    box-shadow: 0 0 0 0 var(--accent-glow);
    animation: pulse-ring 2s ease-out infinite;
}

.mobile-header .mobile-menu-toggle::after {
    display: none;
}

@keyframes pulse-ring {
    0%   { box-shadow: 0 0 0 0  rgba(15, 81, 50,0.5); }
    70%  { box-shadow: 0 0 0 15px rgba(15, 81, 50,0); }
    100% { box-shadow: 0 0 0 0  rgba(15, 81, 50,0); }
}

.mobile-menu-toggle:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 45px var(--accent-glow), 0 6px 20px rgba(0, 0, 0, 0.35);
}

.mobile-header .mobile-menu-toggle:hover {
    transform: translateY(-1px);
    background: rgba(255,255,255,0.15);
    box-shadow: none;
}

.mobile-header .mobile-menu-toggle:active {
    transform: scale(0.97);
}

.mobile-menu-toggle:active {
    transform: scale(0.95);
}

.mobile-menu-toggle i {
    font-size: 1.6rem;
    color: white;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-speed) ease;
}

.mobile-header .mobile-menu-toggle i {
    font-size: 1.15rem;
    position: relative;
    z-index: 1;
    transition: transform var(--transition-speed) ease;
}

.mobile-menu-toggle.active i {
    transform: rotate(180deg);
}

.mobile-header .mobile-menu-toggle.active i {
    transform: rotate(90deg);
}

.mobile-menu-toggle .menu-icon { display: block; }
.mobile-menu-toggle .close-icon { display: none; }
.mobile-menu-toggle.active .menu-icon { display: none; }
.mobile-menu-toggle.active .close-icon { display: block; }

/* ========== Sidebar Container ========== */
.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: 1040;
}

.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    display: flex;
    flex-direction: column;
    z-index: 1040;
    transition: all 0.4s var(--transition-curve);
    overflow: hidden;
    border-right: 1px solid #e5e7eb;
    box-shadow: 2px 0 16px rgba(15, 23, 42, 0.07);
}

/* ========== Sidebar Header ========== */
.sidebar-header {
    padding: 1rem;
    background: linear-gradient(180deg, #000000 0%, #0b0b0b 100%);
    border-left: 4px solid #0F5132;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid #1f2937;
}

.sidebar-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 81, 50,0.18) 0%, transparent 55%);
    pointer-events: none;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.22) 50%, transparent 100%);
}

.brand-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    position: relative;
    z-index: 2;
}

.brand-top-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.brand-logo {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    flex-shrink: 0;
    transition: transform var(--transition-speed) ease;
}

.brand-logo:hover {
    transform: scale(1.05);
}

.brand-logo img {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.brand-logo i {
    font-size: 1.3rem;
    color: #0F5132;
}

.brand-admin-badge {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.7rem;
    background: linear-gradient(135deg, rgba(15, 81, 50,0.18), rgba(43, 45, 66,0.22));
    border: 1px solid rgba(43, 45, 66,0.45);
    border-radius: var(--radius-sm);
    color: #e9ecef;
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.8px;
}

.brand-admin-badge i {
    font-size: 0.7rem;
    color: #adb5bd;
}

.brand-user-row {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.75rem;
    background: rgba(17, 24, 39, 0.62);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
}

.brand-user-avatar {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #0f172a, #1f2937);
    border: 1.5px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-user-avatar i {
    font-size: 0.8rem;
    color: #e5e7eb;
}

.brand-user-info {
    flex: 1;
    min-width: 0;
}

.brand-user-name {
    font-size: 0.78rem;
    font-weight: 700;
    color: #f9fafb;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.2px;
}

.brand-user-role {
    font-size: 0.58rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.brand-user-status {
    width: 8px;
    height: 8px;
    background: #0F5132;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(15, 81, 50,0.5);
    flex-shrink: 0;
    animation: statusPulse 2.5s ease-in-out infinite;
}

@keyframes statusPulse {
    0%, 100% { box-shadow: 0 0 6px rgba(15, 81, 50,0.35); }
    50%       { box-shadow: 0 0 14px rgba(15, 81, 50,0.7); }
}

/* ========== Navigation ========== */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 0.75rem 0.65rem;
}

.sidebar-nav::-webkit-scrollbar {
    width: 4px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #9ca3af, #d1d5db);
    border-radius: 4px;
}

/* Dashboard Section */
.nav-dashboard {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.nav-dashboard .nav-link {
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    border-radius: var(--radius-md);
    font-weight: 700;
    font-size: 0.78rem;
    color: var(--text-muted);
    letter-spacing: 0.3px;
}

.nav-dashboard .nav-link .nav-icon {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: #e5e7eb;
}

.nav-dashboard .nav-link .nav-icon i {
    font-size: 0.9rem;
    color: #0F5132;
}

.nav-dashboard .nav-link:hover {
    color: #111827;
    background: #f3f4f6;
}

.nav-dashboard .nav-link:hover .nav-icon {
    background: #e9ecef;
}

.nav-dashboard .nav-link.active {
    color: #111827;
    background: linear-gradient(135deg, #f3f4f7, #edf0f4);
    border: 1px solid #ced4da;
    box-shadow: 0 4px 12px rgba(15, 81, 50,0.13);
}

.nav-dashboard .nav-link.active .nav-icon {
    background: #e9ecef;
}

.nav-dashboard .nav-link.active .nav-icon i {
    color: #2B2D42;
}

/* Section Label */
.nav-section {
    margin-bottom: 0.25rem;
}

.nav-section-label {
    padding: 0.5rem 0.75rem 0.3rem;
    font-size: 0.6rem;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, rgba(15, 81, 50,0.35), transparent);
}

/* Collapsible Section Toggle */
.nav-section-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.7rem;
    font-size: 0.62rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    user-select: none;
    border: 1px solid transparent;
    position: relative;
}

.nav-section-toggle:hover {
    color: #111827;
    background: #f3f4f6;
    border-color: #e5e7eb;
}

.section-icon {
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 7px;
    background: #f1f3f5;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.section-icon i {
    font-size: 0.75rem;
    color: #0F5132;
    transition: all 0.25s ease;
}

.nav-section-toggle:hover .section-icon {
    background: #e9ecef;
}

.section-label {
    flex: 1;
}

.section-chevron {
    font-size: 0.6rem;
    transition: transform var(--transition-speed) var(--transition-curve);
    opacity: 0.4;
}

.nav-section-toggle:hover .section-chevron {
    opacity: 1;
}

.nav-section.open .nav-section-toggle {
    color: #111827;
    background: #edf7f1;
    border-color: #ced4da;
}

.nav-section.open .nav-section-toggle .section-icon {
    background: linear-gradient(135deg, #2B2D42, #0F5132);
    box-shadow: 0 3px 12px rgba(15, 81, 50,0.22);
}

.nav-section.open .nav-section-toggle .section-icon i {
    color: #fff;
}

.nav-section.open .nav-section-toggle .section-chevron {
    transform: rotate(90deg);
    opacity: 0.8;
}

/* Section Items */
.nav-section-items {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-speed) var(--transition-curve),
                opacity 0.2s ease,
                padding 0.25s ease;
    opacity: 0;
    padding-top: 0;
    padding-left: 0.2rem;
    border-left: 2px solid transparent;
    margin-left: 0.9rem;
}

.nav-section.open .nav-section-items {
    max-height: 500px;
    opacity: 1;
    padding-top: 0.2rem;
    border-left-color: rgba(15, 81, 50,0.3);
}

/* Active Section Indicator */
.section-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2B2D42, #0F5132);
    display: none;
    flex-shrink: 0;
    box-shadow: 0 0 10px var(--accent-glow);
    animation: dotPulse 2s ease-in-out infinite;
}

@keyframes dotPulse {
    0%, 100% { box-shadow: 0 0 6px var(--accent-glow); }
    50% { box-shadow: 0 0 14px var(--accent-glow); }
}

.nav-section.has-active .nav-section-toggle .section-dot {
    display: inline-block;
}

/* Section Collapse Behavior */
.nav-section.collapsible + .nav-section.collapsible {
    margin-top: 0.15rem;
}

/* Disabled: Allow multiple sections to be open simultaneously */
/* .sidebar-nav.has-open-section .nav-section.collapsible:not(.open) {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    margin: 0;
    padding: 0;
    pointer-events: none;
    transition: max-height 0.35s var(--transition-curve),
                opacity 0.25s ease,
                margin var(--transition-speed) ease;
} */

.sidebar-nav .nav-section.collapsible {
    max-height: 600px;
    opacity: 1;
    transition: max-height 0.35s var(--transition-curve),
                opacity 0.25s ease,
                margin var(--transition-speed) ease;
}

/* Nav Items */
.nav-item {
    margin-bottom: 0.15rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.7rem;
    text-decoration: none;
    color: var(--text-muted);
    border-radius: var(--radius-md);
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: linear-gradient(180deg, var(--crimson), var(--crimson-light));
    border-radius: 0 3px 3px 0;
    transition: height 0.25s ease;
}

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

.nav-link:hover::before {
    height: 50%;
}

.nav-link.active::before {
    height: 60%;
}

.nav-link.active {
    color: #111827;
    background: linear-gradient(135deg, #f3f4f7 0%, #edf0f4 100%);
    border: 1px solid #ced4da;
    box-shadow: 0 4px 14px rgba(15, 81, 50,0.12);
}

.nav-icon {
    width: 30px;
    height: 30px;
    background: #f3f4f6;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    flex-shrink: 0;
}

.nav-link:hover .nav-icon {
    background: #e9ecef;
}

.nav-link.active .nav-icon {
    background: #e9ecef;
}

.nav-icon i {
    font-size: 0.9rem;
    transition: transform 0.25s ease;
}

.nav-link:hover .nav-icon i {
    transform: scale(1.08);
}

.nav-text {
    flex: 1;
    font-size: 0.8rem;
    font-weight: 600;
}

.nav-badge {
    padding: 0.2rem 0.55rem;
    background: linear-gradient(135deg, #23253a, #0F5132);
    color: white;
    font-size: 0.6rem;
    font-weight: 700;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
    box-shadow: 0 2px 10px var(--crimson-glow);
    animation: badgePulse 2.5s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { box-shadow: 0 2px 10px var(--crimson-glow); }
    50% { box-shadow: 0 2px 18px rgba(15, 81, 50, 0.45); }
}

.nav-link.active .nav-badge {
    background: rgba(15, 81, 50, 0.15);
    color: #23253a;
    box-shadow: none;
}

/* ========== Sidebar Footer ========== */
.sidebar-footer {
    padding: 1rem 1.25rem 1.5rem;
    border-top: 1px solid transparent;
    border-image: linear-gradient(90deg, #1f2937, #374151) 1;
    background: #000000;
}

/* Language Switcher */
.sidebar-lang-switcher {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.9rem;
    background: linear-gradient(135deg, rgba(17,24,39,0.72) 0%, rgba(30,41,59,0.7) 100%);
    border: 1px solid rgba(43, 45, 66,0.35);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    position: relative;
    overflow: hidden;
}

.sidebar-lang-switcher::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 55%, rgba(15, 81, 50,0.18));
    border-radius: inherit;
    pointer-events: none;
}

.sidebar-lang-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.sidebar-lang-label i {
    font-size: 1rem;
    color: #adb5bd;
    opacity: 0.8;
}

.sidebar-lang-label span {
    font-size: 0.7rem;
    font-weight: 600;
    color: #d1d5db;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.sidebar-lang-indicator {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: auto;
    padding: 0.35rem 0.8rem;
    background: linear-gradient(135deg, #2B2D42, #C1121F);
    border-radius: var(--radius-sm);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px var(--accent-glow);
    position: relative;
    z-index: 1;
}

.lang-flag {
    font-size: 1rem;
    line-height: 1;
}

/* Mini drapeau RU — bandes horizontales blanc / bleu / rouge */
.lang-flag-ru {
    display: inline-block;
    width: 22px;
    height: 15px;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(255,255,255,0.3);
    background: linear-gradient(
        to bottom,
        #ffffff 0%, #ffffff 33.33%,
        #0039A6 33.33%, #0039A6 66.66%,
        #D52B1E 66.66%, #D52B1E 100%
    );
}
.lang-flag-ru span { display: none; }

/* Footer Actions */
.footer-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.footer-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 0.5rem;
    background: rgba(255, 255, 255, 0.07);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: var(--radius-md);
    text-decoration: none;
    color: #d1d5db;
    font-size: 0.78rem;
    font-weight: 500;
    transition: all var(--transition-speed) ease;
}

.footer-action-btn:hover {
    background: linear-gradient(135deg, rgba(255,255,255,0.14), rgba(193, 18, 31,0.28));
    border-color: #adb5bd;
    color: #ffffff;
    transform: translateY(-2px);
}

.footer-action-btn i {
    font-size: 0.95rem;
}

.logout-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.85rem;
    background: rgba(15, 81, 50, 0.2);
    border: 1px solid rgba(43, 45, 66, 0.55);
    border-radius: var(--radius-md);
    color: #e9ecef;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all var(--transition-speed) ease;
}

.logout-btn:hover {
    background: linear-gradient(135deg, #23253a, #0F5132);
    border-color: transparent;
    color: white;
    box-shadow: 0 8px 28px var(--crimson-glow);
    transform: translateY(-2px);
}

.logout-btn i {
    font-size: 1.05rem;
}

/* ========== Sidebar Overlay ========== */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 1035;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
}

.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========== Access Denied Page ========== */
.access-denied-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-dark) 0%, var(--bg-dark-light) 50%, var(--bg-dark-lighter) 100%);
    padding: 2rem;
    position: relative;
    overflow: hidden;
}

.access-denied-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 30% 30%, rgba(15, 81, 50, 0.12) 0%, transparent 50%),
                radial-gradient(circle at 70% 70%, rgba(107, 114, 128, 0.14) 0%, transparent 50%);
    animation: bgPulse 8s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { transform: scale(1) rotate(0deg); }
    50% { transform: scale(1.1) rotate(5deg); }
}

.access-denied-card {
    position: relative;
    z-index: 1;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    border: 1px solid #e5e7eb;
    border-radius: var(--radius-xl);
    padding: 3rem 2.5rem;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(255, 255, 255, 0.7) inset;
}

.access-denied-icon {
    width: 100px;
    height: 100px;
    margin: 0 auto 1.75rem;
    background: linear-gradient(135deg, rgba(15, 81, 50, 0.18) 0%, rgba(193, 18, 31, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

.access-denied-icon::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid rgba(15, 81, 50, 0.35);
    animation: iconRing 2s ease-out infinite;
}

@keyframes iconRing {
    0%   { transform: scale(1); opacity: 1; }
    100% { transform: scale(1.4); opacity: 0; }
}

.access-denied-icon i {
    font-size: 2.75rem;
    color: var(--crimson-light);
    filter: drop-shadow(0 0 20px var(--crimson-glow));
}

.access-denied-title {
    font-size: 1.75rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 0.75rem;
    letter-spacing: -0.5px;
}

.access-denied-subtitle {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.access-denied-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    background: #111827;
    color: #ffffff !important;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) var(--transition-curve);
    box-shadow: 0 8px 30px var(--accent-glow);
    position: relative;
    overflow: hidden;
}

.access-denied-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.access-denied-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(17, 24, 39, 0.35);
    color: #ffffff !important;
    background: #1f2937;
}

.access-denied-btn:hover::before {
    left: 100%;
}

.access-denied-btn i {
    font-size: 1.1rem;
    transition: transform var(--transition-speed) ease;
}

.access-denied-btn:hover i {
    transform: translateX(3px);
}

.access-denied-footer {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
}

.access-denied-footer a {
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}

.access-denied-footer a:hover {
    color: #0F5132;
}

/* Floating Particles */
.access-denied-particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(odd)  { background: rgba(15, 81, 50, 0.35); }
.particle:nth-child(even) { background: rgba(107, 114, 128, 0.45); }

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 25%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 50%; animation-delay: 4s; animation-duration: 16s; }
.particle:nth-child(4) { left: 75%; animation-delay: 6s; animation-duration: 13s; }
.particle:nth-child(5) { left: 90%; animation-delay: 8s; animation-duration: 15s; }

@keyframes particleFloat {
    0% { transform: translateY(100vh) scale(0); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100vh) scale(1); opacity: 0; }
}

/* ========== Responsive Design ========== */
@media (max-width: 991.98px) {
    .mobile-header {
        display: flex;
    }

    .admin-content {
        margin-left: 0;
        width: 100%;
        padding-top: 64px;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .sidebar {
        transform: translateX(-100%);
        box-shadow: none;
        top: 64px;
        height: calc(100vh - 64px);
    }
    
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 60px rgba(0, 0, 0, 0.6);
    }

    .sidebar-overlay {
        top: 64px;
    }
}

@media (max-width: 480px) {
    .access-denied-card {
        padding: 2rem 1.5rem;
        margin: 1rem;
    }
    
    .access-denied-icon {
        width: 80px;
        height: 80px;
    }
    
    .access-denied-icon i {
        font-size: 2.25rem;
    }
    
    .access-denied-title {
        font-size: 1.5rem;
    }
}

/* ── Access Denied — Mobile (768px) ── */
@media (max-width: 768px) {
    .access-denied-wrapper {
        height: 100dvh;
        min-height: 100dvh;
        padding: 2rem 1.25rem;
        background: linear-gradient(160deg, #f0f4ff 0%, #f8fafc 45%, #eef2ff 100%);
        align-items: center;
        justify-content: center;
    }
    .access-denied-wrapper::before {
        background: radial-gradient(circle at 20% 20%, rgba(99, 102, 241, 0.1) 0%, transparent 55%),
                    radial-gradient(circle at 80% 80%, rgba(16, 185, 129, 0.08) 0%, transparent 55%);
    }
    /* Particles sur fond clair */
    .particle:nth-child(odd)  { background: rgba(99, 102, 241, 0.2); }
    .particle:nth-child(even) { background: rgba(16, 185, 129, 0.18); }

    .access-denied-card {
        position: relative;
        z-index: 1;
        background: #ffffff;
        border: 1px solid #f3f4f6;
        border-radius: 24px;
        padding: 2.75rem 1.75rem 2.25rem;
        max-width: 100%;
        width: 100%;
        margin: 0;
        box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4), 0 4px 24px rgba(0, 0, 0, 0.25);
        animation: cardSlideUp 0.45s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    }
    @keyframes cardSlideUp {
        from { transform: translateY(40px) scale(0.96); opacity: 0; }
        to   { transform: translateY(0)    scale(1);    opacity: 1; }
    }

    /* Supprimer la barre de poignée (réservée au bottom sheet) */
    .access-denied-card::before {
        display: none;
    }

    .access-denied-icon {
        width: 80px;
        height: 80px;
        margin: 0 auto 1.4rem;
        background: linear-gradient(135deg, rgba(239, 68, 68, 0.12) 0%, rgba(239, 68, 68, 0.06) 100%);
        border: 1.5px solid rgba(239, 68, 68, 0.22);
        animation: iconFloat 3s ease-in-out infinite;
    }
    .access-denied-icon::before {
        border-color: rgba(239, 68, 68, 0.28);
    }
    .access-denied-icon i {
        font-size: 2.15rem;
    }

    .access-denied-title {
        font-size: 1.65rem;
        color: #111827;
        margin-bottom: 0.6rem;
    }
    .access-denied-subtitle {
        font-size: 0.9rem;
        margin-bottom: 1.75rem;
        color: #6b7280;
        line-height: 1.6;
    }

    .access-denied-btn {
        width: 100%;
        padding: 0.95rem 1.5rem;
        font-size: 1rem;
        border-radius: 14px;
        justify-content: center;
        background: #111827;
        color: #ffffff !important;
        box-shadow: 0 4px 20px rgba(17, 24, 39, 0.4);
    }
    .access-denied-btn:hover {
        background: #1f2937;
        color: #ffffff !important;
        transform: translateY(-2px);
        box-shadow: 0 8px 32px rgba(17, 24, 39, 0.5);
    }

    .access-denied-footer {
        margin-top: 1.5rem;
        padding-top: 1.25rem;
        border-top: 1px solid #f3f4f6;
    }
    .access-denied-footer a {
        font-size: 0.875rem;
        color: #9ca3af;
    }
    .access-denied-footer a:hover {
        color: #374151;
    }
}

/* ========== Print Styles ========== */
@media print {
    .sidebar,
    .sidebar-overlay,
    .mobile-menu-toggle {
        display: none !important;
    }
    
    .admin-content {
        margin-left: 0 !important;
        width: 100% !important;
    }
}
