/*===========================================================
  MI AL HUSAIN — ADMIN PANEL
  Design System: Mengikuti warna & gaya halaman utama
  Primary: #facc15 (Yellow/Gold)
  Dark:    #0f172a (Navy)
  Font:    Inter + Outfit (sama dengan pages)
===========================================================*/

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

:root {
    --primary:       #facc15;
    --primary-dark:  #eab308;
    --primary-glow:  rgba(250, 204, 21, 0.25);
    --dark:          #0f172a;
    --dark2:         #1e293b;
    --dark3:         #0c1222;
    --text:          #334155;
    --muted:         #64748b;
    --light:         #f8fafc;
    --white:         #ffffff;
    --border:        rgba(0,0,0,0.06);
    --sidebar-w:     270px;
    --sidebar-mini:  78px;
    --topbar-h:      72px;
    --ease:          cubic-bezier(0.165, 0.84, 0.44, 1);
    --transition:    all 0.38s var(--ease);
}

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

body {
    font-family: 'Inter', sans-serif;
    background: var(--light);
    color: var(--text);
    overflow-x: hidden;
}

/*────────────────────────────────────────
  SIDEBAR
────────────────────────────────────────*/
#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-w);
    height: 100vh;
    /* Same dark navy as the page footer/header */
    background-color: var(--dark3);
    background-image: radial-gradient(circle at 2px 2px, rgba(250,204,21,0.03) 1px, transparent 0);
    background-size: 28px 28px;
    display: flex;
    flex-direction: column;
    z-index: 1050;
    transition: width 0.38s var(--ease);
    overflow: hidden;
    border-right: 1px solid rgba(255,255,255,0.04);
}

/* ── Logo Area ── */
#sidebar-header {
    height: var(--topbar-h);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    padding: 0 22px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    overflow: hidden;
    white-space: nowrap;
}

#sidebar-logo-img {
    width: 38px; height: 38px;
    object-fit: contain;
    flex-shrink: 0;
    filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
    mix-blend-mode: luminosity;
    transition: var(--transition);
}

.sidebar-brand-text {
    margin-left: 13px;
    overflow: hidden;
    transition: var(--transition);
    white-space: nowrap;
}
.sidebar-brand-text h6 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--primary);
    font-size: 1rem;
    margin: 0;
    letter-spacing: 0.5px;
    white-space: nowrap;
}
.sidebar-brand-text small {
    color: rgba(255,255,255,0.3);
    font-size: 0.58rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Scrollable Menu Area ── */
#sidebar-menu-area {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 20px 12px 30px;
}
/* Custom scrollbar (thin gold-tinted) */
#sidebar-menu-area::-webkit-scrollbar       { width: 3px; }
#sidebar-menu-area::-webkit-scrollbar-track { background: transparent; }
#sidebar-menu-area::-webkit-scrollbar-thumb { background: rgba(250,204,21,0.2); border-radius: 10px; }

/* Section dividers */
.nav-section-title {
    color: rgba(255,255,255,0.22);
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 22px 14px 8px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.3s, max-height 0.3s;
}

/* Menu links */
.nav-link-item {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    border-radius: 10px;
    text-decoration: none;
    color: rgba(255,255,255,0.55);
    font-size: 0.88rem;
    font-weight: 500;
    margin-bottom: 3px;
    transition: var(--transition);
    white-space: nowrap;
    overflow: hidden;
    position: relative;
}

.nav-icon {
    width: 36px; height: 36px;
    border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
    background: rgba(255,255,255,0.04);
    color: rgba(255,255,255,0.5);
    transition: var(--transition);
}

.nav-label {
    margin-left: 12px;
    transition: opacity 0.3s, transform 0.3s;
    opacity: 1;
}

.nav-link-item:hover {
    background: rgba(250,204,21,0.08);
    color: var(--primary);
    padding-left: 18px;
}
.nav-link-item:hover .nav-icon {
    background: rgba(250,204,21,0.12);
    color: var(--primary);
}

/* Active state — same yellow as pages primary */
.nav-link-item.active {
    background: linear-gradient(90deg, var(--primary), #fde047);
    color: var(--dark) !important;
    font-weight: 700;
    box-shadow: 0 8px 20px var(--primary-glow);
}
.nav-link-item.active .nav-icon {
    background: rgba(0,0,0,0.12);
    color: var(--dark);
}

/* Logout */
.nav-link-item.logout-link {
    color: #fca5a5;
    background: rgba(239,68,68,0.07);
}
.nav-link-item.logout-link:hover {
    background: rgba(239,68,68,0.14);
    color: #f87171;
    padding-left: 18px;
}

/*────────────────────────────────────────
  SIDEBAR MINI (COLLAPSED) STATE
────────────────────────────────────────*/
body.sidebar-mini #sidebar          { width: var(--sidebar-mini); }
body.sidebar-mini .main-content     { margin-left: var(--sidebar-mini); }
body.sidebar-mini .sidebar-brand-text,
body.sidebar-mini .nav-label,
body.sidebar-mini .nav-section-title { opacity: 0; pointer-events: none; transform: translateX(-8px); }
body.sidebar-mini .nav-link-item    { justify-content: center; padding: 11px 0; }
body.sidebar-mini .nav-icon         { width: 40px; height: 40px; font-size: 1.05rem; }
body.sidebar-mini #sidebar-header   { justify-content: center; padding: 0; }

/* Tooltip in mini mode */
body.sidebar-mini .nav-link-item::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-mini) + 12px);
    background: var(--dark);
    border: 1px solid rgba(250,204,21,0.2);
    color: var(--primary);
    padding: 5px 13px;
    border-radius: 7px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.18s;
    z-index: 999;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
body.sidebar-mini .nav-link-item:hover::after { opacity: 1; }

/*────────────────────────────────────────
  MAIN CONTENT
────────────────────────────────────────*/
.main-content {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left 0.38s var(--ease);
}

/*────────────────────────────────────────
  TOPBAR  (white + blur — same as navbar on pages)
────────────────────────────────────────*/
.admin-topbar {
    height: var(--topbar-h);
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(15,23,42,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 36px;
    position: sticky; top: 0; z-index: 1000;
    flex-shrink: 0;
}

/* Hamburger button */
.btn-toggle {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none; border-radius: 10px;
    color: var(--dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; cursor: pointer;
    margin-right: 16px;
    transition: var(--transition);
    box-shadow: 0 4px 12px var(--primary-glow);
    flex-shrink: 0;
}
.btn-toggle:hover { transform: scale(1.1); box-shadow: 0 6px 18px var(--primary-glow); }

.topbar-title {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    font-size: 1.05rem;
    color: var(--dark);
    margin: 0;
}
.topbar-sub { font-size: 0.72rem; color: var(--muted); margin-top: 1px; }

.admin-avatar {
    width: 42px; height: 42px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    box-shadow: 0 4px 12px var(--primary-glow);
    object-fit: cover;
}

/*────────────────────────────────────────
  CONTENT BODY
────────────────────────────────────────*/
.content-body { padding: 36px 40px; flex: 1; }

/*────────────────────────────────────────
  STAT CARDS  (same hover-lift as pages)
────────────────────────────────────────*/
.stat-card {
    background: var(--white);
    border-radius: 16px;
    padding: 26px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(15,23,42,0.04);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    height: 100%;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: -20px; right: -20px;
    width: 90px; height: 90px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.04;
    transition: var(--transition);
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(15,23,42,0.1);
    border-color: rgba(250,204,21,0.3);
}
.stat-card:hover::after { transform: scale(1.6); opacity: 0.07; }

.stat-icon-box {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.35rem;
    margin-bottom: 20px;
    /* Yellow accent — same as page badge */
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    box-shadow: 0 6px 18px var(--primary-glow);
}

.stat-num {
    font-family: 'Outfit', sans-serif;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 6px;
}
.stat-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
}
.stat-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid rgba(0,0,0,0.05);
    font-size: 0.8rem;
    color: var(--muted);
}

/* Coloured variants */
.stat-card.s-blue  .stat-icon-box { background: linear-gradient(135deg,#3b82f6,#2563eb); color:#fff; box-shadow: 0 6px 18px rgba(59,130,246,0.25); }
.stat-card.s-green .stat-icon-box { background: linear-gradient(135deg,#22c55e,#16a34a); color:#fff; box-shadow: 0 6px 18px rgba(34,197,94,0.25); }
.stat-card.s-red   .stat-icon-box { background: linear-gradient(135deg,#f87171,#dc2626); color:#fff; box-shadow: 0 6px 18px rgba(248,113,113,0.25); }

/*────────────────────────────────────────
  SECTION CARDS  (same .card pattern)
────────────────────────────────────────*/
.section-card {
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: 0 4px 20px rgba(15,23,42,0.04);
    overflow: hidden;
    height: 100%;
}
.sc-header {
    padding: 22px 26px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    display: flex; align-items: center; justify-content: space-between;
}
.sc-title { font-family:'Outfit',sans-serif; font-weight:700; font-size:1rem; color:var(--dark); margin:0; }
.sc-sub   { font-size:0.78rem; color:var(--muted); margin-top:2px; }

/*── Premium Table ──*/
.p-table { width:100%; border-collapse:collapse; }
.p-table thead th {
    background: #f8fafc;
    color: var(--muted);
    font-size:0.7rem;
    font-weight:700;
    text-transform:uppercase;
    letter-spacing:1px;
    padding: 14px 18px;
    border:none;
}
.p-table tbody tr { border-bottom:1px solid #f1f5f9; transition:background 0.2s; }
.p-table tbody tr:last-child { border-bottom:none; }
.p-table tbody tr:hover { background:#fefdf5; }
.p-table tbody td { padding:16px 18px; border:none; vertical-align:middle; font-size:0.88rem; }

/*── Status Badges (same pill style as pages) ──*/
.badge-pill {
    padding: 5px 14px;
    border-radius: 50px;
    font-size:0.7rem;
    font-weight:700;
    letter-spacing:0.3px;
    display:inline-block;
    box-shadow: 0 3px 8px rgba(0,0,0,0.08);
}
.bp-pending { background:#fef3c7; color:#92400e; }
.bp-done    { background:#dcfce7; color:#166534; }
.bp-reject  { background:#fee2e2; color:#991b1b; }

/*────────────────────────────────────────
  DARK WIDGET  (footer style dark)
────────────────────────────────────────*/
.dark-widget {
    background-color: var(--dark3);
    background-image: radial-gradient(circle at 2px 2px, rgba(250,204,21,0.04) 1px, transparent 0);
    background-size: 28px 28px;
    border-radius: 16px;
    padding: 26px;
    color: #94a3b8;
    border-top: 3px solid var(--primary);
    position: relative;
    overflow: hidden;
}
.dark-widget::before {
    content: '\f084';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    right: -5px; bottom: -5px;
    font-size: 6rem;
    color: var(--primary);
    opacity: 0.06;
    line-height: 1;
}
.dark-widget h5 {
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--white);
    margin-bottom: 4px;
}

/*── Session info rows ──*/
.info-item {
    display:flex; align-items:center;
    background:#f8fafc;
    border-radius:10px;
    padding:12px 14px;
    margin-bottom:10px;
    transition:background 0.2s;
}
.info-item:hover { background:#f1f5f9; }
.info-item-icon {
    width:36px; height:36px;
    border-radius:9px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    display:flex; align-items:center; justify-content:center;
    font-size:0.9rem;
    flex-shrink:0;
    margin-right:13px;
    box-shadow: 0 4px 10px var(--primary-glow);
}
.info-item-label { font-size:0.65rem; font-weight:700; color:var(--muted); text-transform:uppercase; letter-spacing:0.5px; }
.info-item-value { font-size:0.88rem; font-weight:700; color:var(--dark); margin-top:1px; }

/*── Btn yellow (same as .btn-admin on pages) ──*/
.btn-yellow {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--dark);
    border: none;
    border-radius: 50px;
    padding: 10px 22px;
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 14px var(--primary-glow);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}
.btn-yellow:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 22px var(--primary-glow);
    color: var(--dark);
}

.btn-outline-yellow {
    background: transparent;
    color: var(--primary-dark);
    border: 1.5px solid var(--primary);
    border-radius: 50px;
    padding: 7px 18px;
    font-weight: 700;
    font-size: 0.82rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-outline-yellow:hover {
    background: var(--primary);
    color: var(--dark);
}

/* AOS utility — make AOS work even if page doesn't load */
[data-aos] { transition-property: transform, opacity !important; }
