/* ============================================================
   Miss Millionaire VIP Admin Panel
   Premium Dark Brown & Gold Theme | Glassmorphism + Glow
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@400;600;700&family=Montserrat:wght@300;400;500;600&display=swap');

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
    --gold:         #d4af37;
    --gold-dim:     #aa8c2c;
    --gold-bright:  #f7e06a;
    --gold-glow:    rgba(212, 175, 55, 0.35);
    --bg-base:      #0a0705;
    --bg-dark:      #100d09;
    --bg-card:      rgba(22, 16, 10, 0.88);
    --bg-panel:     rgba(28, 20, 12, 0.95);
    --brown-mid:    #2a1f12;
    --brown-light:  #3d2d18;
    --border-gold:  rgba(212, 175, 55, 0.28);
    --border-hover: rgba(212, 175, 55, 0.7);
    --text:         #ede8df;
    --text-muted:   #9e8f7a;
    --sidebar-w:    260px;
    --radius:       12px;
    --shadow:       0 8px 40px rgba(0,0,0,0.6);
    --glow-card:    0 0 18px rgba(212, 175, 55, 0.08), 0 4px 30px rgba(0,0,0,0.5);
}

/* ── Reset / Base ──────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    color: var(--text);
    background-color: var(--bg-base);
    background-image:
        radial-gradient(ellipse at 20% 0%, rgba(100, 60, 10, 0.25) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 100%, rgba(80, 40, 0, 0.2) 0%, transparent 60%),
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23d4af37' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    min-height: 100vh;
}

/* ── Typography ────────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6, .brand-font {
    font-family: 'Cinzel', serif;
    color: var(--gold);
    letter-spacing: 0.5px;
}

.text-gold { color: var(--gold) !important; }
.text-gold-bright { color: var(--gold-bright) !important; }

/* ── Sidebar ───────────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-w);
    height: 100vh;
    position: fixed;
    top: 0; left: 0;
    z-index: 1000;
    overflow-y: auto;
    overflow-x: hidden;
    background: var(--bg-panel);
    border-right: 1px solid var(--border-gold);
    box-shadow: 4px 0 30px rgba(0,0,0,0.7);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease;
}

/* Sidebar scrollbar */
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-track { background: transparent; }
.sidebar::-webkit-scrollbar-thumb { background: var(--brown-light); border-radius: 4px; }

/* ── Sidebar Header/Avatar ─────────────────────────────────── */
.sidebar-header {
    padding: 28px 20px 22px;
    text-align: center;
    border-bottom: 1px solid var(--border-gold);
    background: linear-gradient(180deg, rgba(50, 30, 5, 0.9) 0%, rgba(20, 14, 6, 0.7) 100%);
    position: relative;
    flex-shrink: 0;
}

.sidebar-avatar-ring {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 14px;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold-bright), var(--gold-dim));
    padding: 3px;
    box-shadow: 0 0 22px var(--gold-glow), 0 0 8px rgba(0,0,0,0.5);
    animation: avatar-glow 3s ease-in-out infinite alternate;
}

@keyframes avatar-glow {
    from { box-shadow: 0 0 12px var(--gold-glow), 0 0 6px rgba(0,0,0,0.5); }
    to   { box-shadow: 0 0 28px rgba(212,175,55,0.55), 0 0 10px rgba(0,0,0,0.5); }
}

.sidebar-avatar-inner {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: linear-gradient(160deg, #2a1f12 0%, #1a1108 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.2rem;
    color: var(--gold);
}

.sidebar-brand {
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-bright);
    letter-spacing: 1px;
    text-shadow: 0 0 12px var(--gold-glow);
    line-height: 1.3;
}

.sidebar-subtitle {
    font-size: 0.68rem;
    color: var(--text-muted);
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: 3px;
}

.sidebar-owner-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--border-gold);
    border-radius: 20px;
    font-size: 0.72rem;
    color: var(--gold);
    text-decoration: none;
    transition: all 0.3s;
}
.sidebar-owner-badge:hover {
    background: rgba(212, 175, 55, 0.22);
    color: var(--gold-bright);
}

/* ── Sidebar Navigation ────────────────────────────────────── */
.nav-category {
    font-size: 0.65rem;
    font-family: 'Montserrat', sans-serif;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--gold-dim);
    padding: 18px 18px 6px;
    opacity: 0.8;
}

.sidebar a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 18px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    border-left: 3px solid transparent;
    transition: color 0.15s;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}

.sidebar a::before {
    content: '';
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 0;
    background: linear-gradient(90deg, rgba(212,175,55,0.15) 0%, transparent 100%);
    transition: width 0.25s ease;
}

.sidebar a:hover::before,
.sidebar a.active::before {
    width: 100%;
}

@media (hover: hover) {
    .sidebar a:hover {
        color: var(--gold-bright);
        border-left: 4px solid var(--gold);
        background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
        text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
    }
}

.sidebar a.active {
    color: var(--gold-bright);
    border-left: 4px solid var(--gold);
    background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%);
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}

.sidebar a i {
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.9rem;
    transition: transform 0.25s;
}
.sidebar a:hover i { transform: scale(1.15); }

.sidebar a.active i { color: var(--gold); }

.sidebar-divider {
    height: 1px;
    background: var(--border-gold);
    margin: 8px 18px;
    opacity: 0.5;
}

/* Logout link special styling */
.sidebar a.logout-link {
    color: #c0504a;
    margin-top: auto;
}
.sidebar a.logout-link:hover { color: #ff7070; border-left-color: #ff4444; }

/* ── Main Content ──────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-w);
    padding: 32px 32px 48px;
    min-height: 100vh;
}

/* ── Cards ─────────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    box-shadow: var(--glow-card);
    color: var(--text);
    margin-bottom: 1.4rem;
    transition: box-shadow 0.3s, border-color 0.3s;
    overflow: hidden;
}

.card:hover {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow: 0 0 28px rgba(212, 175, 55, 0.12), 0 8px 40px rgba(0,0,0,0.55);
}

.card-header {
    background: linear-gradient(90deg, rgba(42, 30, 12, 0.95) 0%, rgba(22, 16, 8, 0.9) 100%);
    border-bottom: 1px solid var(--border-gold);
    font-family: 'Cinzel', serif;
    font-size: 0.88rem;
    color: var(--gold);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.4px;
}

.card-body { padding: 20px; }

.card-footer {
    background: rgba(22, 16, 8, 0.6);
    border-top: 1px solid var(--border-gold);
    padding: 12px 20px;
}

/* Stat cards */
.stat-card {
    background: linear-gradient(135deg, rgba(42, 30, 12, 0.9) 0%, rgba(18, 12, 5, 0.95) 100%);
    border: 1px solid var(--border-gold);
    border-radius: var(--radius);
    padding: 22px 20px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: default;
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(212,175,55,0.04) 0%, transparent 60%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--gold-dim);
    transform: translateY(-3px);
    box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(212,175,55,0.12);
}

.stat-card .stat-number {
    font-family: 'Cinzel', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--gold-bright);
    text-shadow: 0 0 14px var(--gold-glow);
    line-height: 1;
}

.stat-card .stat-label {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
}

.stat-card .stat-icon {
    font-size: 1.8rem;
    color: var(--gold);
    opacity: 0.6;
    margin-bottom: 10px;
}

/* ── Colorful VIP Stat Cards ───────────────────────────────── */
.stat-card-1 {
    background: linear-gradient(135deg, rgba(20, 60, 40, 0.9) 0%, rgba(10, 30, 20, 0.95) 100%);
    border-color: rgba(40, 160, 90, 0.4);
}
.stat-card-1:hover { border-color: rgba(40, 160, 90, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(40, 160, 90, 0.2); }

.stat-card-2 {
    background: linear-gradient(135deg, rgba(30, 50, 80, 0.9) 0%, rgba(15, 25, 40, 0.95) 100%);
    border-color: rgba(50, 120, 200, 0.4);
}
.stat-card-2:hover { border-color: rgba(50, 120, 200, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(50, 120, 200, 0.2); }

.stat-card-3 {
    background: linear-gradient(135deg, rgba(80, 40, 80, 0.9) 0%, rgba(40, 20, 40, 0.95) 100%);
    border-color: rgba(180, 80, 180, 0.4);
}
.stat-card-3:hover { border-color: rgba(180, 80, 180, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(180, 80, 180, 0.2); }

.stat-card-4 {
    background: linear-gradient(135deg, rgba(80, 30, 20, 0.9) 0%, rgba(40, 15, 10, 0.95) 100%);
    border-color: rgba(220, 80, 40, 0.4);
}
.stat-card-4:hover { border-color: rgba(220, 80, 40, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(220, 80, 40, 0.2); }

.stat-card-5 {
    background: linear-gradient(135deg, rgba(70, 60, 20, 0.9) 0%, rgba(35, 30, 10, 0.95) 100%);
    border-color: rgba(200, 180, 50, 0.4);
}
.stat-card-5:hover { border-color: rgba(200, 180, 50, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(200, 180, 50, 0.2); }

.stat-card-6 {
    background: linear-gradient(135deg, rgba(20, 50, 60, 0.9) 0%, rgba(10, 25, 30, 0.95) 100%);
    border-color: rgba(40, 140, 180, 0.4);
}
.stat-card-6:hover { border-color: rgba(40, 140, 180, 0.8); box-shadow: 0 12px 36px rgba(0,0,0,0.5), 0 0 20px rgba(40, 140, 180, 0.2); }

/* ── VIP Panels (For large boxes) ───────────────────────────── */
.vip-panel-1 {
    background: linear-gradient(180deg, rgba(50, 20, 20, 0.85) 0%, rgba(25, 10, 10, 0.95) 100%);
    border: 1px solid rgba(220, 50, 50, 0.4);
    box-shadow: inset 0 0 20px rgba(220, 50, 50, 0.1);
}
.vip-panel-1 .card-header {
    background: rgba(220, 50, 50, 0.15); border-bottom: 1px solid rgba(220, 50, 50, 0.3); color: #ffbba1; font-weight: bold; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;
}
.vip-panel-1 .list-group-item { border-color: rgba(220, 50, 50, 0.2) !important; }

.vip-panel-2 {
    background: linear-gradient(180deg, rgba(60, 50, 15, 0.85) 0%, rgba(30, 25, 5, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 0 20px rgba(212, 175, 55, 0.1);
}
.vip-panel-2 .card-header {
    background: rgba(212, 175, 55, 0.15); border-bottom: 1px solid rgba(212, 175, 55, 0.3); color: var(--gold); font-weight: bold; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;
}
.vip-panel-2 .list-group-item, .vip-panel-2 .accordion-button, .vip-panel-2 .accordion-item { border-color: rgba(212, 175, 55, 0.2) !important; }

.vip-panel-3 {
    background: linear-gradient(180deg, rgba(20, 45, 60, 0.85) 0%, rgba(10, 20, 30, 0.95) 100%);
    border: 1px solid rgba(50, 150, 220, 0.4);
    box-shadow: inset 0 0 20px rgba(50, 150, 220, 0.1);
}
.vip-panel-3 .card-header {
    background: rgba(50, 150, 220, 0.15); border-bottom: 1px solid rgba(50, 150, 220, 0.3); color: #a1dfff; font-weight: bold; font-size: 1.1rem; text-transform: uppercase; letter-spacing: 1px;
}
.vip-panel-3 .list-group-item, .vip-panel-3 .accordion-button, .vip-panel-3 .accordion-item { border-color: rgba(50, 150, 220, 0.2) !important; }

/* ── Forms ─────────────────────────────────────────────────── */
.form-control,
.form-select {
    background-color: rgba(10, 7, 3, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.2);
    color: var(--text);
    border-radius: 8px;
    font-size: 0.875rem;
    transition: border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.form-control:focus,
.form-select:focus {
    background-color: rgba(10, 7, 3, 0.9);
    border-color: var(--gold);
    color: var(--text);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.18), 0 0 12px rgba(212, 175, 55, 0.1);
    outline: none;
}

.form-control::placeholder { color: rgba(158, 143, 122, 0.5); }

.form-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 6px;
}

.form-text {
    font-size: 0.73rem;
    color: #6a5c4a;
    margin-top: 5px;
}

.form-check-input:checked {
    background-color: var(--gold);
    border-color: var(--gold);
}

.form-check-input:focus {
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.25);
}

/* ── Buttons ───────────────────────────────────────────────── */
.btn {
    font-size: 0.825rem;
    font-weight: 600;
    letter-spacing: 0.4px;
    border-radius: 8px;
    padding: 0.45rem 1.1rem;
    transition: all 0.25s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--gold-dim) 0%, var(--gold) 50%, var(--gold-bright) 100%);
    border: none;
    color: #1a1000;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(212,175,55,0.3);
}
.btn-primary:hover, .btn-primary:focus {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-bright) 100%);
    color: #100b00;
    box-shadow: 0 6px 20px rgba(212,175,55,0.45);
    transform: translateY(-1px);
}

.btn-danger {
    background: rgba(100, 20, 20, 0.8);
    border: 1px solid rgba(220, 60, 60, 0.4);
    color: #ffbbbb;
}
.btn-danger:hover {
    background: rgba(140, 25, 25, 0.9);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ffe0e0;
    transform: translateY(-1px);
}

.btn-success {
    background: rgba(20, 90, 40, 0.8);
    border: 1px solid rgba(50, 170, 80, 0.4);
    color: #b0ffcc;
}
.btn-success:hover {
    background: rgba(25, 110, 50, 0.9);
    color: #ccffe0;
    transform: translateY(-1px);
}

.btn-secondary {
    background: rgba(50, 40, 25, 0.8);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--text-muted);
}
.btn-secondary:hover {
    background: rgba(65, 50, 28, 0.9);
    border-color: var(--gold-dim);
    color: var(--gold-bright);
}

.btn-outline-light {
    border-color: rgba(212, 175, 55, 0.3);
    color: var(--text-muted);
}
.btn-outline-light:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.btn-warning {
    background: rgba(180, 120, 0, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.5);
    color: #fff8e0;
}
.btn-warning:hover {
    background: rgba(210, 140, 0, 0.9);
    color: white;
    transform: translateY(-1px);
}

.btn-info {
    background: rgba(10, 80, 130, 0.8);
    border: 1px solid rgba(30, 140, 210, 0.4);
    color: #b0dfff;
}
.btn-info:hover {
    background: rgba(15, 100, 160, 0.9);
    color: white;
    transform: translateY(-1px);
}

.btn-outline-danger {
    border-color: rgba(200, 50, 50, 0.4);
    color: #ffaaaa;
    background: transparent;
}
.btn-outline-danger:hover {
    background: rgba(100, 20, 20, 0.5);
    border-color: rgba(255, 80, 80, 0.6);
    color: #ffbbbb;
}

.btn-outline-success {
    border-color: rgba(40, 160, 70, 0.4);
    color: #80dd99;
    background: transparent;
}
.btn-outline-success:hover {
    background: rgba(20, 90, 40, 0.4);
    border-color: rgba(50, 180, 80, 0.6);
    color: #aaffcc;
}

.btn-outline-warning {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--gold);
    background: transparent;
}
.btn-outline-warning:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
    color: var(--gold-bright);
}

.btn-outline-info {
    border-color: rgba(30, 140, 210, 0.35);
    color: #7ec8f0;
    background: transparent;
}
.btn-outline-info:hover {
    background: rgba(10, 80, 130, 0.3);
    color: #b0e0ff;
}

.btn-outline-primary {
    border-color: rgba(212, 175, 55, 0.4);
    color: var(--gold);
    background: transparent;
}
.btn-outline-primary:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold);
    color: var(--gold-bright);
}

/* ── Tables ─────────────────────────────────────────────────── */
.table-dark {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: rgba(255,255,255,0.02);
    --bs-table-hover-bg: rgba(212, 175, 55, 0.06);
    --bs-table-color: var(--text);
    --bs-table-border-color: rgba(212, 175, 55, 0.12);
    font-size: 0.85rem;
}

.table-dark th {
    color: var(--gold);
    font-family: 'Cinzel', serif;
    font-size: 0.78rem;
    letter-spacing: 0.5px;
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-gold) !important;
    background: rgba(30, 20, 8, 0.6);
    text-transform: uppercase;
}

.table-dark td {
    padding: 12px 16px;
    vertical-align: middle;
    border-bottom: 1px solid rgba(212, 175, 55, 0.07);
}

.table-hover tbody tr:hover { background: rgba(212, 175, 55, 0.06); }

/* ── Badges ─────────────────────────────────────────────────── */
.badge {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.3px;
    padding: 4px 8px;
    border-radius: 5px;
}

.badge-vip {
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #0a0700;
    font-weight: 700;
}

/* ── Alerts / Flash Messages ───────────────────────────────── */
.alert {
    border-radius: var(--radius);
    font-size: 0.875rem;
    font-weight: 500;
}

.alert-info {
    background: rgba(212, 175, 55, 0.12) !important;
    border: 1px solid rgba(212, 175, 55, 0.35) !important;
    color: var(--gold-bright) !important;
}

.alert-success {
    background: rgba(30, 100, 50, 0.25) !important;
    border: 1px solid rgba(60, 180, 90, 0.4) !important;
    color: #a0ffbb !important;
}

.alert-danger {
    background: rgba(100, 20, 20, 0.3) !important;
    border: 1px solid rgba(200, 50, 50, 0.4) !important;
    color: #ffcccc !important;
}

/* ── Modal ──────────────────────────────────────────────────── */
.modal-content {
    background: linear-gradient(160deg, rgba(28, 20, 10, 0.98) 0%, rgba(18, 12, 5, 0.99) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 14px;
    box-shadow: 0 24px 80px rgba(0,0,0,0.8), 0 0 40px rgba(212,175,55,0.08);
    color: var(--text);
}

.modal-header {
    border-bottom: 1px solid var(--border-gold);
    padding: 18px 24px;
}

.modal-title { color: var(--gold); }

.modal-footer {
    border-top: 1px solid var(--border-gold);
    padding: 14px 24px;
}

.modal-body { padding: 24px; }

.btn-close { filter: invert(1) opacity(0.6); }
.btn-close:hover { filter: invert(1) opacity(1); }

/* ── Glass Panel Utility ───────────────────────────────────── */
.glass-panel {
    background: rgba(20, 14, 6, 0.92) !important;
    backdrop-filter: blur(12px);
    border: 1px solid var(--border-gold) !important;
}

/* ── Page Title Row ─────────────────────────────────────────── */
.page-title {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    color: var(--gold-bright);
    text-shadow: 0 0 18px var(--gold-glow);
    letter-spacing: 1px;
}

/* ── Gold Divider ───────────────────────────────────────────── */
.gold-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold-dim), transparent);
    border: none;
    margin: 1.5rem 0;
    opacity: 0.6;
}

/* ── Scrollbar ──────────────────────────────────────────────── */
::-webkit-scrollbar { width: 7px; height: 7px; }
::-webkit-scrollbar-track { background: #080604; }
::-webkit-scrollbar-thumb { background: #3a2b18; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--gold-dim); }

/* ── Login Page ─────────────────────────────────────────────── */
.login-card {
    background: linear-gradient(160deg, rgba(25, 18, 8, 0.95) 0%, rgba(15, 10, 4, 0.98) 100%);
    border: 1px solid var(--border-gold);
    border-radius: 16px;
    box-shadow: 0 20px 80px rgba(0,0,0,0.8), 0 0 50px rgba(212,175,55,0.06);
    padding: 48px 40px;
    width: 100%;
    max-width: 400px;
}

.login-crown {
    font-size: 3.5rem;
    color: var(--gold);
    filter: drop-shadow(0 0 18px var(--gold-glow));
    margin-bottom: 12px;
}

/* ── Particle Sparkle Effect ────────────────────────────────── */
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
    50%       { opacity: 1; transform: scale(1) rotate(180deg); }
}

.sparkle {
    position: fixed;
    pointer-events: none;
    z-index: 0;
    width: 4px;
    height: 4px;
    background: var(--gold);
    border-radius: 50%;
    animation: sparkle 4s ease-in-out infinite;
}

/* ── Animated Gold Border ──────────────────────────────────── */
@keyframes border-shimmer {
    0%, 100% { border-color: rgba(212, 175, 55, 0.2); }
    50%       { border-color: rgba(212, 175, 55, 0.5); }
}

.card-glow { animation: border-shimmer 3s ease-in-out infinite; }

/* ── Opacity util ───────────────────────────────────────────── */
.opacity-50 { opacity: 0.5; }

/* ── Mobile ─────────────────────────────────────────────────── */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 14px; left: 14px;
    z-index: 1100;
    background: linear-gradient(135deg, var(--gold-dim), var(--gold));
    color: #0a0700;
    border: none;
    width: 40px; height: 40px;
    border-radius: 8px;
    font-size: 1.1rem;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
    transition: all 0.25s;
}

.mobile-toggle:hover { background: linear-gradient(135deg, var(--gold), var(--gold-bright)); }

.sidebar-close {
    display: none;
    position: absolute;
    top: 14px; right: 14px;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px;
    transition: color 0.2s;
}
.sidebar-close:hover { color: var(--gold); }

@media (max-width: 900px) {

    /* ── Sidebar ── */
    .sidebar {
        transform: translateX(-100%);
        width: 100%;
        max-width: 250px; /* Reduced width */
        box-shadow: none;
        overflow-x: hidden; /* Prevent horizontal spill */
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 6px 0 40px rgba(0,0,0,0.8);
    }
    
    /* Fix logo/avatar cutoff on mobile */
    .sidebar-header {
        padding: 75px 10px 15px !important; /* Fully increased top padding */
        overflow: visible !important;
    }
    .sidebar-avatar-ring {
        width: 62px !important; 
        height: 62px !important;
        margin-bottom: 12px !important;
        margin-top: 15px !important; /* Pushed down to avoid cutoff */
    }
    .sidebar-brand {
        font-size: 0.95rem !important;
    }

    /* Shrunk Owner/Admin ID box */
    .sidebar-vip-card {
        padding: 4px 10px !important;
        max-width: 160px;
        margin: 0 auto;
        border-radius: 6px;
    }
    .vip-id-number {
        font-size: 0.7rem !important;
    }
    .vip-id-label {
        font-size: 0.5rem !important;
    }
    
    /* Disable hover highlight on mobile to fix 'sticky selection' issue */
    .sidebar a:hover {
        background: transparent !important;
        border-left-color: transparent !important;
        color: var(--text-muted) !important;
        text-shadow: none !important;
    }
    .sidebar a.active {
        background: linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, transparent 100%) !important;
        color: var(--gold-bright) !important;
        border-left-color: var(--gold) !important;
    }
    
    .mobile-toggle { display: flex; align-items: center; justify-content: center; }
    .sidebar-close { display: block; top: 12px; right: 12px; }

    /* ── Main Content ── */
    .main-content {
        margin-left: 0;
        padding: 64px 14px 36px;
        overflow-x: hidden;
        width: 100%;
    }

    /* ── Stat Cards: 2 per row on phone ── */
    .row > [class*="col-md-2"],
    .row > [class*="col-md-3"],
    .row > [class*="col-md-4"] {
        flex: 0 0 50%;
        max-width: 50%;
    }

    /* ── Tables: horizontal scroll ── */
    .table-responsive {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* ── Login card: full width ── */
    .login-card {
        padding: 30px 18px;
        max-width: 100%;
    }

    /* ── Page title smaller ── */
    .page-title {
        font-size: 1.15rem !important;
    }
}

/* ── Very small phones only ─────────────────────────────────── */
@media (max-width: 480px) {
    .row > [class*="col-md-2"],
    .row > [class*="col-md-3"],
    .row > [class*="col-md-4"],
    .row > .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

/* ── Misc helpers ───────────────────────────────────────────── */
code, pre {
    color: var(--gold);
    background: rgba(212, 175, 55, 0.08);
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 0.82em;
}

a { color: var(--gold-dim); }
a:hover { color: var(--gold); }

.border-secondary { border-color: rgba(212, 175, 55, 0.15) !important; }

hr { border-color: rgba(212, 175, 55, 0.12); }

/* Ensure dark table select/input backgrounds */
select option { background: #1a1205; color: var(--text); }

/* ── VIP Identity Card Styling ─────────────────────────────── */
.sidebar-user-card-container {
    padding: 0 18px;
}

.sidebar-vip-card {
    display: block;
    position: relative;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none !important;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
    text-align: center;
}

.sidebar-vip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
}

.vip-card-glow {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.sidebar-vip-card:hover .vip-card-glow {
    opacity: 1;
}

.vip-card-content {
    position: relative;
    z-index: 2;
}



.vip-card-bottom {
    display: flex;
    flex-direction: column;
}

.vip-id-label {
    font-size: 0.6rem;
    color: rgba(255, 255, 255, 0.5);
    letter-spacing: 1.2px;
    margin-bottom: 3px;
    text-transform: uppercase;
    font-weight: 600;
}

.vip-id-number {
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Owner Card Theme */
.vip-card-owner {
    background: linear-gradient(135deg, rgba(77, 58, 26, 0.9) 0%, rgba(42, 31, 16, 0.95) 100%);
    border-color: rgba(212, 175, 55, 0.5);
}

.vip-card-owner .vip-role-tag {
    color: #ffd700;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.vip-card-owner .vip-status-icon {
    color: #ffd700;
}

.vip-card-owner .vip-id-number {
    color: #f7e06a;
}

.vip-card-owner:hover {
    border-color: rgba(212, 175, 55, 0.9);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.25);
}

/* Admin Card Theme */
.vip-card-admin {
    background: linear-gradient(135deg, rgba(13, 59, 102, 0.9) 0%, rgba(5, 22, 34, 0.95) 100%);
    border-color: rgba(79, 195, 247, 0.4);
}

.vip-card-admin .vip-role-tag {
    color: #4fc3f7;
    border: 1px solid rgba(79, 195, 247, 0.4);
}

.vip-card-admin .vip-status-icon {
    color: #4fc3f7;
}

.vip-card-admin .vip-id-number {
    color: #b3e5fc;
}

.vip-card-admin:hover {
    border-color: rgba(79, 195, 247, 0.9);
    box-shadow: 0 0 30px rgba(79, 195, 247, 0.25);
}

/* --- VIP GLOBAL UTILITIES --- */
.bg-gold-gradient {
    background: linear-gradient(135deg, #d4af37, #facd68) !important;
    color: #000 !important;
}

.btn-gold {
    background: linear-gradient(135deg, #d4af37, #facd68);
    border: none !important;
    color: #000 !important;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 10px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(212, 175, 55, 0.4);
}

.btn-outline-gold {
    border: 1px solid #d4af37 !important;
    color: #d4af37 !important;
    background: transparent !important;
    transition: all 0.3s ease;
}

.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.1) !important;
    color: #facd68 !important;
    border-color: #facd68 !important;
}

.vip-page-title {
    font-family: 'Cinzel', serif;
    letter-spacing: 2px;
    background: linear-gradient(to right, #fff, #d4af37);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
}

.alert-soft-warning {
    background: rgba(255, 193, 7, 0.1);
    border-left: 4px solid #ffc107;
    color: #ffca28;
}

.vip-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.5);
    font-weight: 600;
}
