/*
 *  Modern UI/UX Design System
 *  Glassmorphism, Vibrant Gradients & Responsive Layout
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-main: #0f172a;
    --bg-card: rgba(30, 41, 59, 0.75);
    --bg-card-hover: rgba(51, 65, 85, 0.85);
    --border-card: rgba(255, 255, 255, 0.1);
    
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --accent: #38bdf8;
    
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    
    --status-lunas: #10b981;
    --status-belum: #f59e0b;
    --status-terlambat: #ef4444;

    --gradient-primary: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --gradient-card: linear-gradient(145deg, rgba(30, 41, 59, 0.8), rgba(15, 23, 42, 0.9));
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-main);
    color: var(--text-main);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .brand-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
}

/* Glassmorphism Card */
.glass-card {
    background: var(--gradient-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.45);
}

/* Dashboard Metric Cards */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.metric-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-radius: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border-card);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
}

.metric-card.primary::before { background: var(--primary); }
.metric-card.success::before { background: var(--status-lunas); }
.metric-card.warning::before { background: var(--status-belum); }
.metric-card.danger::before { background: var(--status-terlambat); }

.metric-info h4 {
    margin: 0;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.metric-info .value {
    font-size: 1.75rem;
    font-weight: 800;
    margin-top: 6px;
    color: #fff;
    font-family: 'Outfit', sans-serif;
}

.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
}

.metric-card.primary .metric-icon { background: rgba(99, 102, 241, 0.15); color: #818cf8; }
.metric-card.success .metric-icon { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.metric-card.warning .metric-icon { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }
.metric-card.danger .metric-icon { background: rgba(239, 68, 68, 0.15); color: #f87171; }

/* Status Badges */
.badge-status {
    padding: 6px 14px;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.badge-status.lunas {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.badge-status.belum {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-status.terlambat {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.badge-role {
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-role.admin {
    background: var(--gradient-primary);
    color: #fff;
}

.badge-role.karyawan {
    background: rgba(56, 189, 248, 0.2);
    color: var(--accent);
    border: 1px solid rgba(56, 189, 248, 0.4);
}

/* Modern Tables */
.modern-table-container {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid var(--border-card);
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    background: rgba(15, 23, 42, 0.6);
}

.modern-table th {
    padding: 16px 20px;
    background: rgba(30, 41, 59, 0.9);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-card);
}

.modern-table td {
    padding: 16px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
    color: #e2e8f0;
}

.modern-table tbody tr {
    transition: background 0.2s ease;
}

.modern-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

/* Modern Buttons */
.btn-modern {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-primary-modern {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.6);
    color: #fff;
}

.btn-success-modern {
    background: var(--gradient-success);
    color: #fff;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.btn-success-modern:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
    color: #fff;
}

.btn-danger-modern {
    background: var(--gradient-danger);
    color: #fff;
}

.btn-danger-modern:hover {
    opacity: 0.9;
    color: #fff;
}

.btn-sm-modern {
    padding: 6px 12px;
    font-size: 0.775rem;
    border-radius: 6px;
}

/* Forms Input Styling */
.form-group-modern {
    margin-bottom: 20px;
}

.form-group-modern label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.875rem;
    color: var(--text-muted);
}

.form-control-modern {
    width: 100%;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: #fff;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: all 0.2s ease;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Leaflet Custom Map Styling */
#leaflet-map, #map-picker {
    width: 100%;
    height: 500px;
    border-radius: 16px;
    border: 1px solid var(--border-card);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.custom-map-pin {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 3px solid #fff;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.6);
}

.custom-map-pin.red {
    background: #ef4444;
    animation: pulse-red 2s infinite;
}

.custom-map-pin.green {
    background: #10b981;
}

@keyframes pulse-red {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
    70% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: #f8fafc !important;
    border-radius: 12px !important;
    padding: 6px !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-popup-tip {
    background: #1e293b !important;
}

/* Quick User Role Banner */
.user-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(30, 41, 59, 0.6);
    backdrop-filter: blur(12px);
    padding: 16px 24px;
    border-radius: 14px;
    border: 1px solid var(--border-card);
    margin-bottom: 24px;
}

.user-banner-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.avatar-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
}

/* =============================================
   ROUTER SUB-NAVIGATION TABS
   ============================================= */
.router-subnav {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.825rem;
}

.router-subnav-label {
    color: var(--accent);
    font-weight: 600;
    margin-right: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.router-subnav .nav-tab {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
    white-space: nowrap;
}

.router-subnav .nav-tab:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    transform: translateY(-1px);
    border-color: rgba(255, 255, 255, 0.15);
}

.router-subnav .nav-tab.active {
    background: var(--gradient-primary);
    color: #fff;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
    border-color: transparent;
}

.router-subnav .nav-tab.tab-success {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.router-subnav .nav-tab.tab-success:hover {
    background: var(--gradient-success);
    color: #fff;
}

.router-subnav .nav-tab.tab-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.router-subnav .nav-tab.tab-warning:hover {
    background: var(--gradient-warning);
    color: #fff;
}

.router-subnav .nav-tab.tab-muted {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-muted);
}

.router-subnav .nav-tab.tab-muted:hover {
    color: #fff;
}

.router-subnav .nav-divider {
    width: 1px;
    height: 24px;
    background: rgba(255, 255, 255, 0.12);
    margin: 0 4px;
}

/* =============================================
   MODERN DASHBOARD METRIC CARDS (HOTSPOT)
   ============================================= */
.hotspot-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.hotspot-metric-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.hotspot-metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary);
    transition: height 0.3s ease;
}

.hotspot-metric-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
}

.hotspot-metric-card:hover::before {
    height: 4px;
}

.hotspot-metric-card.card-blue::before { background: #38bdf8; }
.hotspot-metric-card.card-green::before { background: #10b981; }
.hotspot-metric-card.card-yellow::before { background: #f59e0b; }
.hotspot-metric-card.card-red::before { background: #ef4444; }
.hotspot-metric-card.card-purple::before { background: #8b5cf6; }

.hotspot-metric-card .metric-number {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: #fff;
    line-height: 1;
    margin-bottom: 6px;
}

.hotspot-metric-card .metric-unit {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.hotspot-metric-card .metric-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-top: 8px;
}

.hotspot-metric-card.card-blue .metric-label { color: #38bdf8; }
.hotspot-metric-card.card-green .metric-label { color: #34d399; }
.hotspot-metric-card.card-yellow .metric-label { color: #fbbf24; }
.hotspot-metric-card.card-red .metric-label { color: #f87171; }
.hotspot-metric-card.card-purple .metric-label { color: #a78bfa; }

/* System Info Cards */
.system-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.system-info-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 18px 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: all 0.3s ease;
}

.system-info-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
}

.system-info-card .info-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
}

.system-info-card .info-icon.icon-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; }
.system-info-card .info-icon.icon-green { background: rgba(16, 185, 129, 0.15); color: #34d399; }
.system-info-card .info-icon.icon-orange { background: rgba(245, 158, 11, 0.15); color: #fbbf24; }

.system-info-card .info-content {
    flex: 1;
    min-width: 0;
}

.system-info-card .info-content span {
    display: block;
    font-size: 0.85rem;
    color: #e2e8f0;
    line-height: 1.6;
}

/* =============================================
   MODERN TABLE ENHANCEMENTS (for old Mikhmon pages)
   ============================================= */
.modern-data-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 16px;
    overflow: hidden;
}

.modern-data-card .data-card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-card);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.modern-data-card .data-card-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modern-data-card .data-card-body {
    padding: 20px 24px;
}

.modern-data-card .data-card-body .search-bar {
    max-width: 380px;
    margin-bottom: 16px;
}

.modern-data-card .data-card-body .search-bar input {
    width: 100%;
    padding: 10px 16px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid var(--border-card);
    border-radius: 10px;
    color: #fff;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.modern-data-card .data-card-body .search-bar input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* Status badge inline for table cells */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.status-badge.bound {
    background: rgba(16, 185, 129, 0.15);
    color: #34d399;
}

.status-badge.waiting {
    background: rgba(245, 158, 11, 0.15);
    color: #fbbf24;
}

.status-badge.dynamic {
    background: rgba(56, 189, 248, 0.15);
    color: #38bdf8;
}

.status-badge.static {
    background: rgba(139, 92, 246, 0.15);
    color: #a78bfa;
}

/* =============================================
   MASKED PASSWORD DISPLAY
   ============================================= */
.password-masked {
    font-family: 'Inter', monospace;
    letter-spacing: 2px;
    color: var(--text-muted);
    user-select: none;
}

.password-visible {
    font-family: 'Inter', monospace;
    color: #e2e8f0;
}

/* =============================================
   ACCESS DENIED OVERLAY
   ============================================= */
.access-denied-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    text-align: center;
    padding: 40px 20px;
}

.access-denied-overlay .denied-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: #f87171;
    margin-bottom: 24px;
    animation: pulse-denied 2s infinite;
}

@keyframes pulse-denied {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.3); }
    70% { box-shadow: 0 0 0 20px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.access-denied-overlay h2 {
    color: #f87171;
    margin-bottom: 8px;
    font-size: 1.5rem;
}

.access-denied-overlay p {
    color: var(--text-muted);
    max-width: 400px;
    margin-bottom: 24px;
}

/* =============================================
   RESPONSIVE HAMBURGER MENU
   ============================================= */
.mobile-menu-toggle {
    display: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 8px 12px;
    color: #fff;
    cursor: pointer;
    font-size: 1.1rem;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.15);
}

@media (max-width: 992px) {
    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .nav-primary-links {
        display: none;
        width: 100%;
        flex-direction: column;
        gap: 4px;
        padding-top: 12px;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: 8px;
    }

    .nav-primary-links.show {
        display: flex;
    }

    .nav-primary-links .btn-modern {
        justify-content: flex-start;
        width: 100%;
    }

    .router-subnav {
        flex-direction: row;
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 8px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    .router-subnav::-webkit-scrollbar {
        display: none;
    }

    .router-subnav .nav-tab {
        width: auto;
        flex-shrink: 0;
    }

    .router-subnav .nav-divider {
        display: inline-block;
        flex-shrink: 0;
        margin: 0 2px;
    }

    .hotspot-metrics {
        grid-template-columns: repeat(2, 1fr);
    }

    .system-info-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 576px) {
    .hotspot-metrics {
        grid-template-columns: 1fr;
    }
}

/* =============================================
   CARD ENTRANCE ANIMATION
   ============================================= */
@keyframes cardFadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hotspot-metric-card,
.system-info-card,
.modern-data-card,
.glass-card {
    animation: cardFadeIn 0.4s ease-out both;
}

.hotspot-metric-card:nth-child(1) { animation-delay: 0.05s; }
.hotspot-metric-card:nth-child(2) { animation-delay: 0.1s; }
.hotspot-metric-card:nth-child(3) { animation-delay: 0.15s; }
.hotspot-metric-card:nth-child(4) { animation-delay: 0.2s; }

.system-info-card:nth-child(1) { animation-delay: 0.05s; }
.system-info-card:nth-child(2) { animation-delay: 0.1s; }
.system-info-card:nth-child(3) { animation-delay: 0.15s; }

/* =============================================
   ROUTER SESSION CARD (for sessions.php)
   ============================================= */
.router-session-card {
    background: var(--gradient-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-card);
    border-radius: 14px;
    padding: 18px 20px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.router-session-card:hover {
    border-color: rgba(99, 102, 241, 0.4);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    transform: translateY(-2px);
}

.router-session-card .router-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.router-session-card .router-info {
    flex: 1;
    min-width: 0;
}

.router-session-card .router-info .router-name {
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    margin-bottom: 2px;
}

.router-session-card .router-info .router-session-name {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.router-session-card .router-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

/* Responsive Grid Adjustments */
@media (max-width: 992px) {
    .dashboard-grid-2col,
    .settings-grid-2col {
        grid-template-columns: 1fr !important;
    }
}

/* =============================================
   ROUTER SIDEBAR NAVIGATION STYLES
   ============================================= */
.router-sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1020;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.router-sidebar-overlay.open {
    display: block;
    opacity: 1;
}

.router-sidebar {
    position: fixed;
    top: 62px;
    left: -300px;
    width: 285px;
    height: calc(100vh - 62px);
    background: rgba(15, 23, 42, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    z-index: 1025;
    display: flex;
    flex-direction: column;
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
}

.router-sidebar.open {
    left: 0;
}

.sidebar-header {
    padding: 16px 16px 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(30, 41, 59, 0.6);
}

.sidebar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 8px;
}

.live-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #10b981;
    box-shadow: 0 0 10px #10b981;
    animation: pulseDot 1.8s infinite ease-in-out;
}

@keyframes pulseDot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.sidebar-subtitle {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 2px;
}

.sidebar-search-wrapper {
    position: relative;
    margin-top: 8px;
}

.sidebar-search-wrapper .search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.sidebar-search-wrapper input {
    width: 100%;
    padding: 7px 12px 7px 32px;
    background: rgba(15, 23, 42, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    color: #fff;
    font-size: 0.8rem;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.sidebar-search-wrapper input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.sidebar-close-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.4rem;
    cursor: pointer;
    line-height: 1;
    padding: 2px 6px;
    border-radius: 6px;
    transition: all 0.2s;
}

.sidebar-close-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-section {
    margin-bottom: 18px;
}

.sidebar-section-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 6px;
    padding-left: 8px;
    text-transform: uppercase;
}

.sidebar-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 9px;
    color: #cbd5e1;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 3px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.sidebar-item i {
    width: 18px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: color 0.2s;
}

.sidebar-item:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    transform: translateX(4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.sidebar-item:hover i {
    color: var(--accent);
}

.sidebar-item.active {
    background: var(--gradient-primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.35);
    border-left: 3px solid var(--accent);
}

.sidebar-item.active i {
    color: #fff;
}

.sidebar-item.tab-success {
    background: rgba(16, 185, 129, 0.12);
    color: #34d399;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.sidebar-item.tab-success i {
    color: #34d399;
}

.sidebar-item.tab-success:hover {
    background: var(--gradient-success);
    color: #fff;
}

.sidebar-item.tab-success:hover i {
    color: #fff;
}

.sidebar-item.tab-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fbbf24;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.sidebar-item.tab-warning i {
    color: #fbbf24;
}

.sidebar-item.tab-warning:hover {
    background: var(--gradient-warning);
    color: #fff;
}

.sidebar-item.tab-warning:hover i {
    color: #fff;
}

.sidebar-item.tab-muted {
    color: var(--text-muted);
}



