:root {
    --primary: #dc2626;
    --primary-dark: #991b1b;
    --secondary: #111827;
    --accent: #f59e0b;
    --success: #10b981;
    --info: #0ea5e9;
    --bg: #f8fafc;
    --white: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: rgba(0, 0, 0, 0.06);
    --shadow: 0 10px 30px rgba(0,0,0,0.08);
    --shadow-soft: 0 6px 18px rgba(0,0,0,0.06);
    --radius: 18px;
    --radius-sm: 12px;
    --transition: all .25s ease-in-out;
}

body {
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    color: var(--text);
}

/* =========================
   SIDEBAR
========================= */
.admin-sidebar {
    min-height: 100vh;
    background: linear-gradient(180deg, #0f172a, #111827, #1e293b);
    color: white;
    border-radius: 0 24px 24px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    padding-top: 24px !important;
    z-index: 100;
}

.admin-sidebar .brand-box {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding: 0 10px;
}

.admin-sidebar .brand-box img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 14px;
    background: rgba(255,255,255,.08);
    padding: 6px;
}

.admin-sidebar .brand-title {
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.2;
    margin: 0;
    color: white;
}

.admin-sidebar .brand-subtitle {
    font-size: 0.8rem;
    color: rgba(255,255,255,.65);
    margin: 0;
}

.admin-sidebar .user-box {
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 14px 16px;
    border-radius: 18px;
    margin-bottom: 28px;
    backdrop-filter: blur(12px);
}

.admin-sidebar .role-badge {
    display: inline-block;
    margin-top: 6px;
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(220, 38, 38, 0.2);
    color: #fecaca;
    border: 1px solid rgba(255,255,255,.08);
}

.admin-sidebar a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 16px;
    margin-bottom: 10px;
    color: rgba(255,255,255,0.88);
    text-decoration: none;
    border-radius: 14px;
    transition: var(--transition);
    font-weight: 500;
}

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

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: linear-gradient(90deg, rgba(220,38,38,.18), rgba(245,158,11,.14));
    color: #fff;
    transform: translateX(4px);
    box-shadow: 0 8px 20px rgba(220, 38, 38, 0.15);
}

/* =========================
   MAIN
========================= */
.admin-main {
    padding: 24px;
}

/* =========================
   TOPBAR
========================= */
.admin-topbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(255,255,255,0.6);
    box-shadow: var(--shadow-soft);
    border-radius: 22px;
    padding: 18px 22px;
    margin-bottom: 26px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.admin-topbar h5 {
    margin: 0;
    font-weight: 700;
    color: var(--secondary);
}

.admin-topbar p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

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

.top-icon-btn {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    border: none;
    background: white;
    box-shadow: var(--shadow-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    color: var(--secondary);
}

.top-icon-btn:hover {
    transform: translateY(-2px);
    background: #fff7ed;
}

.account-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: white;
    border-radius: 999px;
    padding: 8px 14px;
    box-shadow: var(--shadow-soft);
}

.account-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), #f97316);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
}

/* =========================
   CARD
========================= */
.admin-card {
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(255,255,255,0.65);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    transition: var(--transition);
}

.admin-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
}

.stat-card {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    padding: 24px;
    color: white;
    min-height: 150px;
}

.stat-card::before {
    content: "";
    position: absolute;
    width: 160px;
    height: 160px;
    background: rgba(255,255,255,0.08);
    border-radius: 50%;
    top: -40px;
    right: -40px;
}

.stat-card h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.stat-card p {
    margin: 0;
    opacity: .9;
    font-weight: 500;
    color: white;
}

.stat-red { background: linear-gradient(135deg, #dc2626, #f97316); }
.stat-blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.stat-green { background: linear-gradient(135deg, #059669, #10b981); }
.stat-yellow { background: linear-gradient(135deg, #d97706, #f59e0b); }

/* =========================
   BUTTON
========================= */
.btn-main {
    background: linear-gradient(135deg, var(--primary), #f97316);
    border: none;
    color: white;
    padding: 10px 20px;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 10px 20px rgba(220, 38, 38, 0.18);
    transition: var(--transition);
}

.btn-main:hover {
    transform: translateY(-2px);
    color: white;
    opacity: .95;
}

/* =========================
   TABLE
========================= */
.table thead th {
    border: none !important;
    font-size: 14px;
    letter-spacing: .3px;
    vertical-align: middle;
}

.table tbody td {
    vertical-align: middle;
    border-color: rgba(0,0,0,0.05);
}

.table-hover tbody tr:hover {
    background: rgba(220, 38, 38, 0.03);
}

/* =========================
   FORM
========================= */
.form-control,
.form-select,
textarea {
    border-radius: 14px !important;
    border: 1px solid rgba(0,0,0,0.08) !important;
    padding: 12px 14px !important;
    box-shadow: none !important;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(220,38,38,.4) !important;
    box-shadow: 0 0 0 4px rgba(220,38,38,.08) !important;
}

/* =========================
   MOBILE
========================= */
@media (max-width: 991px) {
    .admin-sidebar {
        min-height: auto;
        border-radius: 0 0 24px 24px;
        position: relative;
    }

    .admin-main {
        padding: 18px;
    }

    .admin-topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }
}