/* ── Admin CSS ── */
@import url('https://fonts.googleapis.com/css2?family=Sora:wght@300;400;600;700;800&family=DM+Sans:wght@300;400;500&display=swap');

:root {
    --primary: #00d4aa;
    --primary-dark: #00b894;
    --accent: #ff6b9d;
    --accent2: #a78bfa;
    --bg-dark: #040d1a;
    --bg-sidebar: rgba(6, 16, 32, 0.98);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --bg-glass-strong: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.09);
    --border-primary: rgba(0, 212, 170, 0.3);
    --text-primary: #f0f8ff;
    --text-secondary: rgba(240, 248, 255, 0.6);
    --text-muted: rgba(240, 248, 255, 0.38);
    --sidebar-w: 240px;
}

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

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: radial-gradient(ellipse 70% 50% at 70% 20%, rgba(0, 212, 170, 0.05), transparent 60%);
    pointer-events: none;
}

/* ─── Sidebar ─── */
.admin-sidebar {
    width: var(--sidebar-w);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-glass);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 200;
    display: flex;
    flex-direction: column;
    backdrop-filter: blur(20px);
    transition: transform 0.3s ease;
}

.sidebar-logo {
    padding: 24px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-logo .logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(0, 212, 170, 0.25);
}

.sidebar-logo span {
    font-family: 'Sora', sans-serif;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--primary);
}

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}

.nav-section-title {
    font-size: 0.65rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 12px 8px 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    transition: all 0.2s;
    cursor: pointer;
    margin-bottom: 2px;
}

.nav-item .nav-icon {
    font-size: 1.1rem;
    width: 24px;
    text-align: center;
}

.nav-item:hover {
    background: var(--bg-glass-strong);
    color: var(--text-primary);
}

.nav-item.active {
    background: rgba(0, 212, 170, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 170, 0.2);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-glass);
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ─── Main content ─── */
.admin-main {
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    padding: 0;
}

.admin-topbar {
    background: rgba(4, 13, 26, 0.9);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    padding: 14px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
}

.topbar-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.admin-content {
    padding: 28px;
}

/* ─── Cards ─── */
.a-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 16px;
    overflow: hidden;
}

.a-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.a-card-header h6 {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    margin: 0;
}

.a-card-body {
    padding: 20px;
}

/* ─── Stats ─── */
.a-stat {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: 14px;
    padding: 20px;
    transition: all 0.25s;
}

.a-stat:hover {
    border-color: var(--border-primary);
    transform: translateY(-2px);
}

.a-stat .icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.a-stat .value {
    font-family: 'Sora', sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.a-stat .label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* ─── Table ─── */
.a-table {
    width: 100%;
    color: var(--text-primary);
    font-size: 0.87rem;
}

.a-table th {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px 16px;
    background: rgba(255, 255, 255, 0.02);
}

.a-table td {
    padding: 13px 16px;
    border-top: 1px solid var(--border-glass);
    vertical-align: middle;
}

.a-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* ─── Btn ─── */
.btn-a-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #040d1a;
    border: none;
    border-radius: 9px;
    padding: 9px 20px;
    font-family: 'Sora', sans-serif;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-a-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 212, 170, 0.3);
}

.btn-a-danger {
    background: rgba(255, 107, 157, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 157, 0.3);
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-a-danger:hover {
    background: rgba(255, 107, 157, 0.25);
}

.btn-a-secondary {
    background: var(--bg-glass-strong);
    color: var(--text-secondary);
    border: 1px solid var(--border-glass);
    border-radius: 9px;
    padding: 7px 14px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-a-secondary:hover {
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ─── Modal ─── */
.modal-content {
    background: rgba(6, 16, 32, 0.97) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 20px !important;
    color: var(--text-primary) !important;
    backdrop-filter: blur(30px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.7) !important;
}

.modal-header {
    border-bottom: 1px solid var(--border-glass) !important;
}

.modal-footer {
    border-top: 1px solid var(--border-glass) !important;
}

.modal-title {
    font-family: 'Sora', sans-serif;
    font-weight: 700;
}

.modal-body .form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.modal-body .form-control,
.modal-body .form-select {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid var(--border-glass) !important;
    border-radius: 9px !important;
    color: var(--text-primary) !important;
    font-size: 0.9rem;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
    border-color: rgba(0, 212, 170, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(0, 212, 170, 0.1) !important;
}

.modal-body .form-control::placeholder {
    color: var(--text-muted);
}

.modal-body .form-select option {
    background: #0d1b2a;
}

.modal-body .invalid-feedback {
    color: var(--accent);
    font-size: 0.78rem;
}

.btn-close {
    filter: invert(1) opacity(0.5) !important;
}

/* ─── Badge ─── */
.badge-taken {
    background: rgba(76, 175, 80, 0.15);
    color: #81c784;
    border: 1px solid rgba(76, 175, 80, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-pending {
    background: rgba(255, 193, 7, 0.15);
    color: #ffc107;
    border: 1px solid rgba(255, 193, 7, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-missed {
    background: rgba(255, 107, 157, 0.15);
    color: var(--accent);
    border: 1px solid rgba(255, 107, 157, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-active {
    background: rgba(0, 212, 170, 0.12);
    color: var(--primary);
    border: 1px solid rgba(0, 212, 170, 0.3);
    padding: 3px 10px;
    border-radius: 100px;
    font-size: 0.72rem;
    font-weight: 700;
}

/* ─── Toast ─── */
.toast {
    background: rgba(6, 16, 32, 0.97) !important;
    border: 1px solid var(--border-glass) !important;
    color: var(--text-primary) !important;
    border-radius: 12px !important;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 3px;
}

/* ─── Responsive sidebar ─── */
@media (max-width: 991px) {
    .admin-sidebar {
        transform: translateX(-100%);
    }

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

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

    .sidebar-overlay {
        display: block;
    }
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 199;
    backdrop-filter: blur(2px);
}
