*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    background: #f4f5f7;
    margin: 0;
    padding: 0;
}

/* ── Sidebar ── */
#sidebar {
    position: fixed;
    top: 0; left: 0;
    width: 240px;
    height: 100vh;
    background: #1e1e2d;
    color: #a0a0b8;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
}

#sidebar .sidebar-brand {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.07);
    text-decoration: none;
}
#sidebar .sidebar-logo {
    width: 38px;
    height: 38px;
    object-fit: contain;
    border-radius: 50%;
    border: 1.5px solid #c9a84c;
    flex-shrink: 0;
}
#sidebar .sidebar-brand-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0.08em;
    line-height: 1.2;
}
#sidebar .sidebar-brand-tag {
    font-size: 0.65rem;
    color: #c9a84c;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

#sidebar .nav-section {
    padding: 16px 24px 6px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #5a5a7a;
}

#sidebar a.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 24px;
    color: #a0a0b8;
    text-decoration: none;
    font-size: 0.875rem;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}
#sidebar a.nav-link:hover { color: #fff; background: rgba(255,255,255,0.05); }
#sidebar a.nav-link.active { color: #c9a96e; background: rgba(201,169,110,0.1); border-left-color: #c9a96e; }
#sidebar a.nav-link i { font-size: 1rem; width: 18px; }
#sidebar .nav-link.logout { color: #e07070; }
#sidebar .nav-link.logout:hover { color: #ff8080; background: rgba(224,112,112,0.08); }

/* ── Admin content area ── */
body.admin-body {
    background: #f4f5f7;
    margin: 0;
    padding: 0;
    display: block;
    min-height: 100vh;
}

#admin-content {
    margin-left: 240px;
    min-height: 100vh;
    background: #f4f5f7;
}

#admin-topbar {
    position: sticky;
    top: 0;
    background: #fff;
    border-bottom: 1px solid #e8e8f0;
    padding: 14px 24px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #1e1e2d;
    z-index: 100;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
#admin-topbar .topbar-title { font-size: 0.95rem; font-weight: 600; color: #1e1e2d; }

/* ── Topbar (legacy) ── */
#topbar {
    position: fixed;
    top: 0; left: 240px; right: 0;
    height: 56px;
    background: #fff;
    border-bottom: 1px solid #e8e8f0;
    display: flex;
    align-items: center;
    padding: 0 24px;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}
#topbar .page-title { font-size: 0.95rem; font-weight: 600; color: #333; }
#topbar .admin-name { margin-left: auto; font-size: 0.85rem; color: #666; }

/* ── Main content (legacy) ── */
#main-content {
    margin-left: 240px;
    margin-top: 56px;
    padding: 28px;
    min-height: calc(100vh - 56px);
}

/* ── Stat cards ── */
.stat-card {
    background: #fff;
    border-radius: 10px;
    padding: 20px 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}
.stat-card .stat-value { font-size: 1.8rem; font-weight: 700; color: #1e1e2d; line-height: 1; }
.stat-card .stat-label { font-size: 0.8rem; color: #888; margin-top: 4px; }
.stat-card .stat-link { font-size: 0.75rem; margin-top: 6px; display: inline-block; text-decoration: none; font-weight: 500; }

.admin-card {
    background: #fff;
    border-radius: 10px;
    padding: 24px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.06);
    margin-bottom: 24px;
}
.admin-card h5 { font-size: 0.95rem; font-weight: 600; color: #1e1e2d; margin-bottom: 16px; }

/* ── Login page ── */
body.login-page {
    /* background: linear-gradient(135deg, #1e1e2d 0%, #2d1a0e 100%); */
    background-image: url('../../assets/images/banner/login.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
}
body.login-page::before {
    content: '';
    position: fixed;
    inset: 0;
    /* background: rgba(15, 5, 2, 0.65); */
    z-index: 0;
}
body.login-page > * {
    position: relative;
    z-index: 1;
}

.login-box {
    background: #fff;
    border-radius: 12px;
    padding: 44px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.25);
    border-top: 4px solid #c9a84c;
}

.login-box .brand {
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    letter-spacing: 3px;
    color: #1a1208;
    margin-bottom: 4px;
    font-family: 'Playfair Display', 'Inter', sans-serif;
}
.login-box .brand span { color: #c9a84c; }

.login-box .subtitle {
    text-align: center;
    color: #888;
    font-size: 0.85rem;
    margin-bottom: 32px;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    #sidebar { transform: translateX(-100%); }
    #topbar, #main-content, #admin-content { left: 0; margin-left: 0; }
}
