/* ============================================================================
   ADMIN NAV PANEL — Stripe/Vercel/Notion Inspired Navigation System
   Prefix: admin-nav-  |  admin-sidebar-
   ============================================================================ */

/* ── 1. Hide the old permanent left sidebar completely ─────────────────── */
.admin-container > .sidebar {
    display: none !important;
}

/* ── 2. Main content layout adjustment ─────────────────────────────────── */
.admin-container > .main-content {
    width: 100%;
    max-width: 100%;
    padding: 1.75rem 2rem;
    transition: padding 0.25s ease-in-out;
}

/* Hide old mobile sidebar toggle */
.sidebar-toggle {
    display: none !important;
}

/* ── 3. Premium Light Top Header (Stripe/Vercel style) ─────────────────── */
.admin-nav-topbar {
    display: flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 10px 20px;
    margin-bottom: 24px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.03), 0 2px 4px -1px rgba(0, 0, 0, 0.02);
    position: relative;
    z-index: 100;
    font-family: 'Outfit', sans-serif;
}

.admin-nav-logo {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #0f172a;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: -0.02em;
    padding: 6px 16px 6px 6px;
    margin-right: 12px;
    border-right: 1px solid #e2e8f0;
}

.admin-nav-logo i {
    color: #4f46e5;
    font-size: 1.2rem;
    filter: drop-shadow(0 2px 4px rgba(79, 70, 229, 0.15));
}

/* Top nav menu items */
.admin-nav-menu {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.admin-nav-item {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    background: transparent;
    border: none;
    color: #475569;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    text-decoration: none;
    position: relative;
}

.admin-nav-item i {
    font-size: 0.88rem;
    color: #64748b;
    transition: color 0.2s ease;
}

.admin-nav-item:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.admin-nav-item:hover i {
    color: #0f172a;
}

.admin-nav-item.admin-nav--active {
    background: #f5f3ff;
    color: #4f46e5;
    font-weight: 600;
}

.admin-nav-item.admin-nav--active i {
    color: #4f46e5;
}

/* Active bottom line indicator */
.admin-nav-item.admin-nav--active::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: #4f46e5;
    border-radius: 99px;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.4);
    animation: admin-pill-fade 0.2s ease-out;
}

@keyframes admin-pill-fade {
    from { opacity: 0; transform: scaleX(0.7); }
    to { opacity: 1; transform: scaleX(1); }
}

/* Right side of top bar */
.admin-nav-right {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    padding-left: 16px;
}

.admin-nav-page-title {
    color: #0f172a;
    font-weight: 600;
    font-size: 0.92rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
}

.admin-nav-date {
    color: #64748b;
    font-size: 0.85rem;
    white-space: nowrap;
    border-left: 1px solid #e2e8f0;
    padding-left: 16px;
}

.admin-nav-logout-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: #fef2f2;
    border: 1px solid #fee2e2;
    color: #ef4444;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.admin-nav-logout-btn:hover {
    background: #fee2e2;
    color: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.08);
}

/* ── 4. Translucent Backdrop Overlay ──────────────────────────────────── */
.admin-sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 1040;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease-in-out;
    backdrop-filter: blur(4px);
}

.admin-sidebar-overlay.admin-sidebar--visible {
    opacity: 1;
    pointer-events: all;
}

/* ── 5. Slide-in Left Sidebar Panel ───────────────────────────────────── */
.admin-sidebar-panel {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 280px;
    background: rgba(15, 23, 42, 0.96);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    padding: 0;
    transform: translateX(-100%);
    opacity: 0;
    transition:
        transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
        opacity   0.25s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 10px 0 40px rgba(0, 0, 0, 0.25);
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    will-change: transform, opacity;
    overflow: hidden;
}

.admin-sidebar-panel.admin-sidebar--open {
    transform: translateX(0);
    opacity: 1;
}

/* Panel header */
.admin-sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.admin-sidebar-header-title {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
}

.admin-sidebar-header-title i {
    color: #818cf8;
    font-size: 1.05rem;
}

.admin-sidebar-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.admin-sidebar-close:hover {
    background: rgba(255, 255, 255, 0.12);
    color: #f8fafc;
    transform: scale(1.05);
}

/* Panel nav list */
.admin-sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.admin-sidebar-nav::-webkit-scrollbar {
    width: 4px;
}
.admin-sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

/* Sidebar nav link */
.admin-sidebar-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: #94a3b8;
    font-family: 'Outfit', sans-serif;
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.admin-sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 0.92rem;
    flex-shrink: 0;
    opacity: 0.75;
    transition: transform 0.2s ease;
}

.admin-sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
}

.admin-sidebar-link:hover i {
    opacity: 1;
    transform: translateX(2px);
}

.admin-sidebar-link.admin-sidebar--link-active {
    background: rgba(79, 70, 229, 0.18);
    color: #c7d2fe;
    font-weight: 600;
    box-shadow: inset 3px 0 0 #6366f1;
}

.admin-sidebar-link.admin-sidebar--link-active i {
    opacity: 1;
    color: #a5b4fc;
}

/* Badge on sidebar link */
.admin-sidebar-badge {
    margin-left: auto;
    background: #ef4444;
    color: #ffffff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 99px;
    min-width: 22px;
    text-align: center;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 4px rgba(239, 68, 68, 0.2);
}

/* Panel footer */
.admin-sidebar-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(15, 23, 42, 0.3);
    flex-shrink: 0;
}

.admin-sidebar-user-icon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, #4f46e5, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(79, 70, 229, 0.25);
}

.admin-sidebar-user-info {
    flex: 1;
    overflow: hidden;
}

.admin-sidebar-user-name {
    color: #f8fafc;
    font-family: 'Outfit', sans-serif;
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-sidebar-user-role {
    color: #64748b;
    font-family: 'Outfit', sans-serif;
    font-size: 0.78rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-transform: capitalize;
}

/* Staggered entrance animation for links */
@keyframes admin-link-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.admin-sidebar-panel.admin-sidebar--open .admin-sidebar-link {
    animation: admin-link-in 0.22s cubic-bezier(0.4, 0, 0.2, 1) both;
}

.admin-sidebar-panel.admin-sidebar--open .admin-sidebar-link:nth-child(1) { animation-delay: 0.03s; }
.admin-sidebar-panel.admin-sidebar--open .admin-sidebar-link:nth-child(2) { animation-delay: 0.07s; }
.admin-sidebar-panel.admin-sidebar--open .admin-sidebar-link:nth-child(3) { animation-delay: 0.11s; }
.admin-sidebar-panel.admin-sidebar--open .admin-sidebar-link:nth-child(4) { animation-delay: 0.15s; }

/* ── 6. Responsive Adjustments ────────────────────────────────────────── */
@media (max-width: 768px) {
    .admin-nav-topbar {
        border-radius: 10px;
        padding: 6px 12px;
        margin-bottom: 16px;
    }

    .admin-nav-logo span {
        display: none;
    }

    .admin-nav-logo {
        padding-right: 12px;
        margin-right: 6px;
    }

    .admin-nav-item {
        padding: 8px 12px;
        font-size: 0.85rem;
        gap: 6px;
    }

    .admin-nav-item span {
        display: none;
    }

    .admin-nav-item i {
        font-size: 1.05rem;
        color: #475569;
    }

    .admin-nav-item.admin-nav--active i {
        color: #4f46e5;
    }

    .admin-nav-item.admin-nav--active::after {
        bottom: -6px;
        left: 8px;
        right: 8px;
    }

    .admin-nav-page-title,
    .admin-nav-date {
        display: none;
    }

    .admin-sidebar-panel {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .admin-nav-item {
        padding: 8px;
    }
}

/* Override old top-bar spacing when new bar is present */
.admin-nav-topbar ~ .top-bar,
body:has(.admin-nav-topbar) .top-bar {
    display: none !important;
}

