/* ==========================================================================
   CSS Admin Dashboard - Modern, Elegant & Professional
   ========================================================================== */

:root {
    --admin-bg: #F8FAFC;
    --navy-primary: #0B1F3A;
    --navy-dark: #071527;
    --gold-primary: #C9A24B;
    --gold-hover: #b8923e;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;
    --card-shadow: 0 10px 25px -5px rgba(11, 31, 58, 0.05), 0 8px 10px -6px rgba(11, 31, 58, 0.03);
}

body.admin {
    background-color: var(--admin-bg);
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* Sidebar Modern Styles */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
    height: 100vh;
    max-height: 100vh;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    padding: 1.5rem 1rem 2.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
    z-index: 1040;
    box-shadow: 4px 0 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar::-webkit-scrollbar {
    width: 6px;
}
.sidebar::-webkit-scrollbar-track {
    background: transparent;
}
.sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
}
.sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.35);
}

.sidebar .brand {
    color: #fff;
    font-family: 'Fraunces', serif;
    font-size: 1.2rem;
    font-weight: 600;
    padding: .5rem .75rem 1.5rem;
    display: flex;
    gap: .75rem;
    align-items: center;
    text-decoration: none;
    letter-spacing: -0.01em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    margin-bottom: 1rem;
}

.sidebar .brand i {
    color: var(--gold-primary);
    font-size: 1.3rem;
}

.sidebar .nav-i {
    display: flex;
    gap: .85rem;
    align-items: center;
    color: #94A3B8;
    padding: .75rem 1rem;
    border-radius: 12px;
    text-decoration: none;
    font-size: .9rem;
    font-weight: 500;
    margin-bottom: 4px;
    transition: all 0.2s ease;
}

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

.sidebar a.nav-i:hover {
    background: rgba(255, 255, 255, 0.06);
    color: #fff;
    transform: translateX(3px);
}

.sidebar a.nav-i.active {
    background: var(--gold-primary);
    color: var(--navy-primary);
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(201, 162, 75, 0.25);
}

.sidebar .btn-logout,
.sidebar button.nav-i {
    width: 100%;
    display: flex;
    gap: .85rem;
    align-items: center;
    color: #F87171 !important;
    background: rgba(239, 68, 68, 0.12) !important;
    border: 1px solid rgba(239, 68, 68, 0.25) !important;
    padding: .75rem 1rem;
    border-radius: 12px;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: .5rem;
}

.sidebar .btn-logout:hover,
.sidebar button.nav-i:hover {
    background: #DC2626 !important;
    color: #FFFFFF !important;
    border-color: #DC2626 !important;
    transform: translateX(3px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.35);
}

.sidebar .btn-logout i,
.sidebar button.nav-i i {
    color: inherit;
    font-size: 1.05rem;
    width: 20px;
    text-align: center;
}

.sidebar .grp {
    color: #64748B;
    font-size: .7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
    padding: 1.25rem 1rem .5rem;
}

/* Main Content Area */
.admin-main {
    margin-left: 260px;
    padding: 2rem 2.5rem;
    transition: margin 0.3s ease;
}

.admin-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.75rem;
    gap: 1rem;
    flex-wrap: wrap;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.admin-top h1 {
    font-family: 'Fraunces', serif;
    font-size: 1.75rem;
    color: var(--navy-primary);
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Panels & Cards */
.panel {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
    transition: box-shadow 0.2s ease;
}

.panel:hover {
    box-shadow: 0 15px 30px -5px rgba(11, 31, 58, 0.08);
}

.kpi {
    background: #fff;
    border-radius: 20px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    display: flex;
    gap: 1.25rem;
    align-items: center;
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.kpi:hover {
    transform: translateY(-3px);
    border-color: rgba(201, 162, 75, 0.4);
}

.kpi .ico {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: var(--navy-primary);
    color: var(--gold-primary);
    display: grid;
    place-items: center;
    font-size: 1.35rem;
    box-shadow: 0 8px 16px rgba(11, 31, 58, 0.15);
}

.kpi .n {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy-primary);
    line-height: 1.1;
    margin-bottom: 2px;
}

.kpi small {
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 500;
}

/* Tables Customization */
.table {
    margin-bottom: 0;
}

.table thead th {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: #F8FAFC;
    border-bottom: 2px solid var(--border-color);
    padding: 0.85rem 1rem;
    white-space: nowrap;
}

.table tbody td {
    padding: 1rem;
    vertical-align: middle;
    color: var(--text-main);
    border-bottom-color: var(--border-color);
}

/* Responsive Behaviour */
.menu-btn {
    display: none;
    background: #fff;
    border: 1px solid var(--border-color);
    color: var(--navy-primary);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.03);
}

@media(max-width: 991px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: none;
    }
    .admin-main {
        margin-left: 0;
        padding: 1.25rem;
    }
    .menu-btn {
        display: grid;
    }
}

/* Login Wrapper Styles */
.login-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, var(--navy-primary) 0%, var(--navy-dark) 100%);
    padding: 1.5rem;
}

.login-card {
    background: #fff;
    border-radius: 24px;
    padding: 2.5rem;
    width: 100%;
    max-width: 420px;
    border-top: 6px solid var(--gold-primary);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}