/* ============================================ */
/* ADMIN PANEL PREMIUM STYLES */
/* ============================================ */

:root {
    --bg: #060b1a;
    --bg2: #0b1120;
    --card: #0f172a;
    --blue: #3b82f6;
    --blue2: #2563eb;
    --blue3: #1d4ed8;
    --gold: #f59e0b;
    --w: #ffffff;
    --s: #94a3b8;
    --m: #64748b;
    --r: #ef4444;
    --g: #22c55e;
    --p: #8b5cf6;
    --c: #06b6d4;
    --grad: linear-gradient(135deg, #3b82f6, #2563eb);
    --shadow: 0 20px 60px rgba(0,0,0,0.5);
    --shadow-blue: 0 10px 30px rgba(59,130,246,0.15);
    --radius: 16px;
    --tr: 0.3s ease;
}

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

body {
    font-family: 'Segoe UI', system-ui, sans-serif;
    background: var(--bg);
    color: var(--w);
    min-height: 100vh;
    line-height: 1.6;
}

body.noscroll { overflow: hidden; }

/* Scrollbar */
::-webkit-scrollbar { width: 5px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--grad); border-radius: 3px; }

/* ============================================ */
/* TOPBAR */
/* ============================================ */
.admin-topbar {
    background: var(--bg2);
    padding: 0 30px;
    height: 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(59,130,246,0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-topbar h2 {
    font-size: 1.1rem;
    font-weight: 700;
}

.admin-topbar h2 span { color: var(--blue); }

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

.admin-topbar .topbar-right a {
    color: var(--s);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color var(--tr);
}

.admin-topbar .topbar-right a:hover { color: var(--blue); }

.admin-topbar .btn-logout {
    color: var(--r);
    font-weight: 600;
}

/* ============================================ */
/* CONTAINER */
/* ============================================ */
.admin-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 25px 20px;
}

/* ============================================ */
/* NAV LINKS */
/* ============================================ */
.admin-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 25px;
    padding: 5px;
    background: var(--card);
    border-radius: 14px;
    border: 1px solid rgba(59,130,246,0.08);
}

.admin-nav a {
    padding: 10px 20px;
    border-radius: 10px;
    color: var(--s);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all var(--tr);
    display: flex;
    align-items: center;
    gap: 8px;
}

.admin-nav a:hover { background: rgba(59,130,246,0.1); color: var(--blue); }

.admin-nav a.active {
    background: var(--grad);
    color: #fff;
    font-weight: 600;
    box-shadow: var(--shadow-blue);
}

/* ============================================ */
/* STATS CARDS */
/* ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 25px;
}

.stat-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid rgba(59,130,246,0.06);
    transition: all var(--tr);
    position: relative;
    overflow: hidden;
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(59,130,246,0.2);
    box-shadow: var(--shadow);
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0; right: 0;
    width: 80px; height: 80px;
    background: radial-gradient(circle, rgba(59,130,246,0.08), transparent);
    border-radius: 50%;
    transform: translate(30%, -30%);
}

.stat-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.stat-icon.blue { background: rgba(59,130,246,0.12); color: var(--blue); }
.stat-icon.green { background: rgba(34,197,94,0.12); color: var(--g); }
.stat-icon.purple { background: rgba(139,92,246,0.12); color: var(--p); }
.stat-icon.cyan { background: rgba(6,182,212,0.12); color: var(--c); }
.stat-icon.gold { background: rgba(245,158,11,0.12); color: var(--gold); }
.stat-icon.red { background: rgba(239,68,68,0.12); color: var(--r); }

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

.stat-card p {
    color: var(--m);
    font-size: 0.8rem;
}

/* ============================================ */
/* PANELS */
/* ============================================ */
.panel {
    background: var(--card);
    border-radius: var(--radius);
    padding: 22px;
    border: 1px solid rgba(59,130,246,0.06);
    margin-bottom: 20px;
}

.panel h4 {
    font-size: 1rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(59,130,246,0.08);
    display: flex;
    align-items: center;
    gap: 8px;
}

.panel h4 i { color: var(--blue); }

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* ============================================ */
/* TABLE */
/* ============================================ */
.table-wrap {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid rgba(59,130,246,0.06);
}

table {
    width: 100%;
    border-collapse: collapse;
}

th {
    background: var(--bg2);
    padding: 12px 16px;
    text-align: left;
    color: var(--s);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

td {
    padding: 10px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.02);
    font-size: 0.88rem;
}

tr:hover td { background: rgba(59,130,246,0.02); }

/* ============================================ */
/* BADGES */
/* ============================================ */
.badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 700;
    display: inline-block;
}

.badge-blue { background: rgba(59,130,246,0.12); color: var(--blue); }
.badge-green { background: rgba(34,197,94,0.12); color: var(--g); }
.badge-red { background: rgba(239,68,68,0.12); color: var(--r); }
.badge-gold { background: rgba(245,158,11,0.12); color: var(--gold); }
.badge-purple { background: rgba(139,92,246,0.12); color: var(--p); }

/* ============================================ */
/* FORMS */
/* ============================================ */
.form-card {
    background: var(--card);
    border-radius: var(--radius);
    padding: 25px;
    border: 1px solid rgba(59,130,246,0.06);
    margin-bottom: 25px;
}

.form-card h3 {
    font-size: 1.1rem;
    margin-bottom: 18px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(59,130,246,0.12);
    border-radius: 10px;
    color: var(--w);
    outline: none;
    font-size: 0.9rem;
    font-family: inherit;
    transition: all var(--tr);
}

textarea.form-input {
    min-height: 120px;
    resize: vertical;
}

.form-input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 15px rgba(59,130,246,0.08);
}

select.form-input {
    cursor: pointer;
}

.form-input::placeholder { color: var(--m); }

/* ============================================ */
/* BUTTONS */
/* ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 24px;
    background: var(--grad);
    color: #fff;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    transition: all var(--tr);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-blue);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 0.78rem;
    border-radius: 8px;
}

.btn-danger { background: rgba(239,68,68,0.12); color: var(--r); }
.btn-danger:hover { background: var(--r); color: #fff; }

.btn-warning { background: rgba(245,158,11,0.12); color: var(--gold); }
.btn-warning:hover { background: var(--gold); color: #000; }

.btn-success { background: rgba(34,197,94,0.12); color: var(--g); }
.btn-success:hover { background: var(--g); color: #fff; }

/* ============================================ */
/* MESSAGES */
/* ============================================ */
.msg {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 15px;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.msg-success {
    background: rgba(34,197,94,0.08);
    border: 1px solid rgba(34,197,94,0.2);
    color: var(--g);
}

.msg-error {
    background: rgba(239,68,68,0.08);
    border: 1px solid rgba(239,68,68,0.2);
    color: var(--r);
}

/* ============================================ */
/* LIST ITEMS */
/* ============================================ */
.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.02);
}

.list-item:last-child { border: none; }

.list-item img {
    width: 40px; height: 40px;
    border-radius: 8px;
    object-fit: cover;
}

.list-item .info { flex: 1; }

.list-item .info strong {
    display: block;
    font-size: 0.88rem;
    color: var(--w);
}

.list-item .info small {
    color: var(--m);
    font-size: 0.75rem;
}

/* ============================================ */
/* BACK LINK */
/* ============================================ */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--blue);
    text-decoration: none;
    font-size: 0.85rem;
    margin-bottom: 18px;
    transition: gap var(--tr);
}

.back-link:hover { gap: 10px; }

/* ============================================ */
/* RESPONSIVE */
/* ============================================ */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .admin-nav { overflow-x: auto; flex-wrap: nowrap; }
    .admin-topbar { padding: 0 15px; }
}