/* ============================================================
   Sitopeng Admin Panel — Custom Styles
   ============================================================ */

:root {
    --admin-sidebar-width: 260px;
    --admin-topbar-height: 60px;
    --charcoal:   #2C2C2C;
    --terracotta: #C0533A;
    --gold:       #C9A84C;
    --emerald:    #2D6A4F;
    --cream:      #F5EFE6;
    --sidebar-bg: #1E1E2E;
    --sidebar-hover: rgba(201, 168, 76, 0.15);
}

/* ============================================================
   Layout Admin
   ============================================================ */
body.admin-body {
    background-color: #F4F6F9;
    font-family: 'Inter', sans-serif;
    min-height: 100vh;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* ============================================================
   Sidebar
   ============================================================ */
.admin-sidebar {
    width: var(--admin-sidebar-width);
    background-color: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    transition: transform 0.3s ease;
}

.sidebar-brand {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    text-decoration: none;
}

.sidebar-brand .brand-name {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--gold);
    display: block;
}

.sidebar-brand .brand-sub {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.5);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.sidebar-nav {
    padding: 1rem 0;
    flex: 1;
}

.sidebar-label {
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.35);
    padding: 0.75rem 1.5rem 0.25rem;
    font-weight: 600;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: rgba(255,255,255,0.72);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: all 0.2s;
}

.sidebar-link:hover,
.sidebar-link.active {
    color: var(--gold);
    background-color: var(--sidebar-hover);
    border-left-color: var(--gold);
}

.sidebar-link i {
    width: 20px;
    text-align: center;
    font-size: 1rem;
}

/* ============================================================
   Main Content Area
   ============================================================ */
.admin-main {
    margin-left: var(--admin-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ============================================================
   Topbar
   ============================================================ */
.admin-topbar {
    height: var(--admin-topbar-height);
    background: white;
    border-bottom: 1px solid #E5E7EB;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 999;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}

.topbar-title {
    font-size: 1rem;
    font-weight: 600;
    color: var(--charcoal);
}

.topbar-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    color: var(--charcoal);
}

.topbar-user .avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: var(--terracotta);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.9rem;
}

.topbar-user .role-badge {
    font-size: 0.7rem;
    background-color: var(--gold);
    color: var(--charcoal);
    padding: 0.1rem 0.5rem;
    border-radius: 20px;
    font-weight: 600;
    text-transform: capitalize;
}

/* ============================================================
   Content Area
   ============================================================ */
.admin-content {
    padding: 1.75rem;
    flex: 1;
}

.page-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #E5E7EB;
}

.page-header h1 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    color: var(--charcoal);
    margin: 0;
}

/* ============================================================
   Stat Cards (Dashboard)
   ============================================================ */
.stat-card {
    background: white;
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    border-left: 4px solid var(--gold);
    transition: transform 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
}

.stat-card.terracotta { border-left-color: var(--terracotta); }
.stat-card.emerald    { border-left-color: var(--emerald); }
.stat-card.gold       { border-left-color: var(--gold); }

.stat-card .stat-icon {
    font-size: 2rem;
    width: 50px;
    text-align: center;
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--charcoal);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: #6B7280;
    font-weight: 500;
}

/* ============================================================
   Admin Tables
   ============================================================ */
.admin-table-wrapper {
    background: white;
    border-radius: 10px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.07);
    overflow: hidden;
}

.admin-table-wrapper .table {
    margin: 0;
}

.admin-table-wrapper .table thead th {
    background-color: #F9FAFB;
    border-bottom: 2px solid #E5E7EB;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6B7280;
    font-weight: 600;
    padding: 0.9rem 1rem;
}

/* ============================================================
   Alert Messages
   ============================================================ */
.alert-sitopeng {
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
}

/* ============================================================
   Login Page
   ============================================================ */
.login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--charcoal) 0%, #3D2B1F 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.login-card .login-logo {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--gold);
    text-align: center;
    margin-bottom: 0.25rem;
}

.login-card .login-subtitle {
    font-size: 0.8rem;
    color: #9CA3AF;
    text-align: center;
    margin-bottom: 2rem;
}

/* ============================================================
   Responsif
   ============================================================ */
@media (max-width: 991.98px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

    .admin-sidebar.show {
        transform: translateX(0);
    }

    .admin-main {
        margin-left: 0;
    }
}
