/* ODYSSEY admin — SINGLE CSS BUNDLE (admin.css + futuristic-admin.css). */

/* ========== admin.css ========== */

:root {
    --bg-dark: #0d0d17;
    --sidebar-bg: #0a0a12;
    --card-bg: rgba(255, 255, 255, 0.04);
    --primary-cyan: #00f5ff;
    --secondary-green: #00ff88;
    --warning: #f59e0b;
    --danger: #ef4444;
    --text-main: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: rgba(0, 245, 255, 0.2);
    
    --font-sans: 'Inter', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
}

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

body {
    font-family: var(--font-sans);
    background-color: var(--bg-dark);
    color: var(--text-main);
    line-height: 1.5;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-sans);
    font-weight: 600;
    color: #fff;
    margin-bottom: 1rem;
}

code, .id-text {
    font-family: var(--font-mono);
}

/* Utilities */
.text-cyan { color: var(--primary-cyan); }
.text-green { color: var(--secondary-green); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--text-muted); }

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    font-family: var(--font-sans);
}

.btn-primary {
    background-color: rgba(0, 245, 255, 0.1);
    color: var(--primary-cyan);
    border: 1px solid var(--primary-cyan);
    box-shadow: 0 0 10px rgba(0, 245, 255, 0.2);
}
.btn-primary:hover {
    background-color: var(--primary-cyan);
    color: #000;
    box-shadow: 0 0 15px rgba(0, 245, 255, 0.4);
}

.btn-secondary {
    background-color: rgba(0, 255, 136, 0.1);
    color: var(--secondary-green);
    border: 1px solid var(--secondary-green);
}
.btn-secondary:hover {
    background-color: var(--secondary-green);
    color: #000;
}

.btn-danger {
    background-color: rgba(239, 68, 68, 0.1);
    color: var(--danger);
    border: 1px solid var(--danger);
}
.btn-danger:hover {
    background-color: var(--danger);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-main);
}
.btn-outline:hover {
    border-color: var(--text-main);
    background: rgba(255,255,255,0.05);
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}
.btn-block {
    width: 100%;
}

/* Google sign-in button + divider on the admin login box. */
.login-divider { display: flex; align-items: center; gap: .75rem; margin: 1rem 0; color: var(--text-muted); font-size: .8rem; }
.login-divider::before, .login-divider::after { content: ""; flex: 1; height: 1px; background: var(--border-color, rgba(255,255,255,.1)); }
.btn-google { display: flex; align-items: center; justify-content: center; gap: .6rem;
  background: #fff; color: #1f1f1f; border: none; font-weight: 600; transition: transform .15s ease, box-shadow .15s ease; }
.btn-google i { color: #4285F4; }
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.35); }
.btn-google:disabled { opacity: .7; cursor: default; transform: none; }
@media (prefers-reduced-motion: reduce) { .btn-google { transition: none; } .btn-google:hover { transform: none; } }

.icon-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 1.1rem;
    transition: color 0.2s;
}
.icon-btn:hover {
    color: var(--primary-cyan);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}
.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
}
.form-control, input, select, textarea {
    width: 100%;
    padding: 0.5rem;
    background-color: rgba(0,0,0,0.2);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 4px;
    color: var(--text-main);
    font-family: var(--font-sans);
}
.form-control:focus, input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--primary-cyan);
    box-shadow: 0 0 5px rgba(0, 245, 255, 0.2);
}

/* View Containers */
.view-container {
    display: none;
    min-height: 100vh;
}
.view-container.active {
    display: flex;
}

/* Login View */
#login-view {
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1a1a2e 0%, var(--bg-dark) 100%);
}
.login-box {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    padding: 2rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    width: 100%;
    max-width: 400px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
}
.login-box .logo {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-cyan);
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.error-text {
    color: var(--danger);
    font-size: 0.875rem;
    margin-bottom: 1rem;
    text-align: center;
}

/* Layout */
#admin-layout {
    display: flex;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background-color: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    position: fixed;
    z-index: 100;
}
.sidebar-header {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sidebar-header .logo {
    color: var(--primary-cyan);
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 1rem 0;
}
.nav-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}
.nav-item:hover, .nav-item.active {
    background-color: rgba(0, 245, 255, 0.05);
    color: var(--primary-cyan);
}
.nav-item.active {
    border-left-color: var(--primary-cyan);
}
.nav-item i {
    width: 20px;
    text-align: center;
}

/* Main Content Area */
.main-content {
    flex: 1;
    margin-left: 250px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.topbar {
    height: 60px;
    background-color: rgba(10, 10, 18, 0.8);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 90;
}
.breadcrumb {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-muted);
}
#current-section-name {
    color: var(--primary-cyan);
    font-weight: 600;
}
.topbar-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}
.admin-profile {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.content-wrapper {
    padding: 2rem;
    flex: 1;
}

/* Section Container */
.section {
    display: none;
    animation: fadeIn 0.3s ease;
}
.section.active {
    display: block;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Cards */
.card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 0.5rem;
}
.card-title {
    margin: 0;
    font-size: 1.1rem;
}

/* Grid Layouts */
.grid-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}
.stat-card {
    background: var(--card-bg);
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
}
.stat-card .title {
    color: var(--text-muted);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}
.stat-card .value {
    font-size: 1.8rem;
    font-weight: 700;
    font-family: var(--font-mono);
    color: #fff;
}
.stat-card.cyan { border-top: 3px solid var(--primary-cyan); }
.stat-card.green { border-top: 3px solid var(--secondary-green); }
.stat-card.warning { border-top: 3px solid var(--warning); }

/* Clickable KPI cards — open the section they summarise. */
.stat-card--link { position: relative; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.stat-card--link:hover { transform: translateY(-4px); box-shadow: 0 12px 30px rgba(0,0,0,.35), 0 0 0 1px var(--primary-cyan); border-color: var(--primary-cyan); }
.stat-card--link:focus-visible { outline: 2px solid var(--primary-cyan); outline-offset: 2px; }
.stat-card--link:active { transform: translateY(-1px); }
.stat-card__go { position: absolute; top: 1rem; right: 1rem; opacity: 0; color: var(--primary-cyan); transition: opacity .18s ease, transform .18s ease; transform: translateX(-4px); }
.stat-card--link:hover .stat-card__go { opacity: 1; transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .stat-card--link, .stat-card__go { transition: none; } .stat-card--link:hover { transform: none; } }

.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--card-bg);
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
th, td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
th {
    background: rgba(0,0,0,0.2);
    color: var(--text-muted);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
}
tr:hover td {
    background: rgba(0, 245, 255, 0.02);
}
.table-actions {
    display: flex;
    gap: 0.5rem;
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
}
.badge-success { background: rgba(0, 255, 136, 0.1); color: var(--secondary-green); border: 1px solid rgba(0, 255, 136, 0.2); }
.badge-success::before { background: var(--secondary-green); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); border: 1px solid rgba(245, 158, 11, 0.2); }
.badge-warning::before { background: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); border: 1px solid rgba(239, 68, 68, 0.2); }
.badge-danger::before { background: var(--danger); }
.badge-info { background: rgba(0, 245, 255, 0.1); color: var(--primary-cyan); border: 1px solid rgba(0, 245, 255, 0.2); }
.badge-info::before { background: var(--primary-cyan); }

/* Modals */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}
.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}
.modal-card {
    background: var(--bg-dark);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 0 30px rgba(0, 245, 255, 0.1);
    transform: scale(0.95);
    transition: transform 0.3s;
}
.modal-overlay.active .modal-card {
    transform: scale(1);
}
.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.modal-header h3 { margin: 0; }
.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
}
.modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}
.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

/* Toasts */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    background: var(--card-bg);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 1rem 1.5rem;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease forwards;
}
.toast.success { border-left: 4px solid var(--secondary-green); }
.toast.error { border-left: 4px solid var(--danger); }
.toast.warning { border-left: 4px solid var(--warning); }
.toast.info { border-left: 4px solid var(--primary-cyan); }
@keyframes slideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Tabs */
.tabs {
    display: flex;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
    overflow-x: auto;
}
.tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
    white-space: nowrap;
}
.tab-btn:hover { color: #fff; }
.tab-btn.active {
    color: var(--primary-cyan);
    border-bottom-color: var(--primary-cyan);
}

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.3s ease; }

/* Responsive */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0; }
    .mobile-toggle { display: block; }
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
}

/* ========== futuristic-admin.css ========== */

/**
 * ODYSSEY ADMIN — DESIGN SYSTEM v3 ("Nebula Command")
 * ===================================================
 * Authoritative layer, loaded AFTER admin.css. Redefines the token VALUES
 * (variable NAMES kept — JS inlines var(--primary-cyan) etc.) and restyles
 * every contract class into a dense, professional command-center look with
 * volumetric glass, depth, and precise data density. Zero markup/JS change.
 */

/* ── Re-skin the existing token values to the Nebula palette ── */
:root {
  --bg-dark: #06070f;
  --sidebar-bg: #070812;
  --card-bg: rgba(22, 27, 52, 0.55);
  --primary-cyan: #22e5ff;
  --secondary-green: #34ffb0;
  --warning: #fbbf24;
  --danger: #fb5c7d;
  --text-main: #eef2ff;
  --text-muted: #8090b6;
  --border-color: rgba(120, 160, 255, 0.16);

  /* new helpers (additive) */
  --violet: #8b5cf6;
  --indigo: #6366f1;
  --sky: #38bdf8;
  --surface: rgba(22, 27, 52, 0.55);
  --surface-2: rgba(30, 36, 70, 0.7);
  --hairline: rgba(120, 160, 255, 0.16);
  --hairline-2: rgba(120, 160, 255, 0.3);
  --grad-brand: linear-gradient(135deg, #22e5ff 0%, #6366f1 55%, #8b5cf6 100%);
  --grad-hot: linear-gradient(135deg, #34ffb0 0%, #22e5ff 50%, #6366f1 100%);
  --grad-text: linear-gradient(100deg, #22e5ff, #8b5cf6, #34ffb0, #22e5ff);
  --e1: 0 2px 10px rgba(0,0,0,.35);
  --e2: 0 12px 36px rgba(0,0,0,.5);
  --e3: 0 24px 70px rgba(0,0,0,.6);
  --glow-cyan: 0 0 28px rgba(34,229,255,.32);
  --glow-violet: 0 0 28px rgba(139,92,246,.36);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-md: 16px;
}

/* ── BASE / BACKDROP ── */
body {
  background: var(--bg-dark) !important;
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: ""; position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(1000px 640px at 14% -8%, rgba(34,229,255,.08), transparent 55%),
    radial-gradient(900px 620px at 100% 4%, rgba(139,92,246,.12), transparent 55%),
    radial-gradient(900px 800px at 60% 120%, rgba(52,255,176,.05), transparent 60%),
    linear-gradient(180deg, #06070f, #080a18 60%, #06070f);
}
body::after {
  content: ""; position: fixed; inset: -25%; z-index: -1; pointer-events: none;
  background:
    radial-gradient(36% 36% at 22% 28%, rgba(34,229,255,.1), transparent 70%),
    radial-gradient(32% 32% at 82% 20%, rgba(139,92,246,.13), transparent 70%);
  filter: blur(36px); animation: adAurora 28s ease-in-out infinite alternate;
}
@keyframes adAurora {
  0% { transform: translate3d(0,0,0) scale(1); }
  100% { transform: translate3d(-3%,2%,0) scale(1.07); }
}

/* ── LOGIN ── */
#login-view { background: radial-gradient(circle at 50% 35%, #0c1233 0%, #06070f 72%) !important; }
.login-box {
  background: rgba(18,22,44,.72) !important;
  backdrop-filter: blur(22px) saturate(150%); -webkit-backdrop-filter: blur(22px) saturate(150%);
  border: 1px solid var(--hairline) !important; border-radius: 20px !important;
  box-shadow: var(--e3), 0 0 60px rgba(34,229,255,.12), inset 0 1px 0 rgba(255,255,255,.06);
  padding: 2.4rem !important;
}
.login-box .logo, .sidebar-header .logo { gap: .6rem; }
.login-box .logo span, .sidebar-header .logo span {
  background: var(--grad-text); background-size: 300% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: adBrand 8s linear infinite;
}
@keyframes adBrand { to { background-position: 300% center; } }

/* ── SIDEBAR ── */
.sidebar {
  background: rgba(7,8,18,.82) !important;
  backdrop-filter: blur(20px) saturate(140%); -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-right: 1px solid var(--hairline) !important;
}
.sidebar-header { border-bottom: 1px solid var(--hairline) !important; padding: 1.2rem 1.2rem !important; }
.nav-item {
  position: relative; border-left: none !important; border-radius: 10px; margin: 2px 10px;
  padding: .7rem 1rem !important; font-weight: 500;
  transition: color .25s, background .25s, transform .2s var(--ease) !important;
}
.nav-item::before {
  content: ""; position: absolute; left: -10px; top: 18%; height: 64%; width: 3px; border-radius: 3px;
  background: var(--grad-hot); transform: scaleY(0); transform-origin: center; transition: transform .3s var(--ease);
}
.nav-item:hover { transform: translateX(3px); background: rgba(34,229,255,.06) !important; color: var(--text-main) !important; }
.nav-item.active {
  background: rgba(34,229,255,.1) !important; color: var(--primary-cyan) !important;
  box-shadow: inset 0 0 22px rgba(34,229,255,.1);
}
.nav-item.active::before { transform: scaleY(1); }
.nav-item i { width: 22px; }

/* ── TOPBAR ── */
.topbar {
  background: rgba(7,9,20,.62) !important;
  backdrop-filter: blur(18px) saturate(150%); -webkit-backdrop-filter: blur(18px) saturate(150%);
  border-bottom: 1px solid var(--hairline) !important; height: 64px !important;
}
.breadcrumb { color: var(--text-muted); }
#current-section-name {
  background: var(--grad-text); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  animation: adBrand 6s linear infinite;
}
.icon-btn, .admin-profile { transition: transform .2s, color .25s; }
.icon-btn:hover { transform: translateY(-2px); color: var(--primary-cyan); }
.admin-profile { padding: .35rem .8rem; border: 1px solid var(--hairline); border-radius: 999px; background: rgba(255,255,255,.03); }

@keyframes emptyFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (prefers-reduced-motion: reduce) { [style*="emptyFloat"], .admin-empty-ic { animation: none !important; } }

.admin-avatar-preset { transition: transform .2s, border-color .2s, box-shadow .2s; }
.admin-avatar-preset:hover {
  transform: rotateY(14deg) rotateX(-6deg) scale(1.08);
  box-shadow: 0 6px 20px rgba(0,212,255,.35), 0 0 0 1px rgba(0,212,255,.25);
}

/* Custom uploaded avatar icons */
.admin-custom-icon { transition: border-color .2s, transform .2s, box-shadow .2s; }
.admin-custom-icon:hover {
  transform: rotateY(10deg) rotateX(-5deg) scale(1.1);
  box-shadow: 0 4px 14px rgba(0,255,102,.3);
  border-color: var(--primary-cyan) !important;
}

/* 3D model placeholder cards */
.admin-3d-model { transition: transform .25s, border-color .2s, box-shadow .25s; }
.admin-3d-model:hover {
  transform: rotateY(18deg) rotateX(-8deg) translateY(-4px);
  box-shadow: 0 10px 28px rgba(178,38,255,.35), 0 0 0 1px rgba(178,38,255,.3);
  border-color: rgba(178,38,255,.7) !important;
}

/* Rotating 3D preview panel (used for full-size 3D avatar display) */
.ody-3d-preview {
  perspective: 800px;
  display: inline-block;
}
.ody-3d-preview__inner {
  transition: transform .4s;
  animation: ody3dSpin 6s linear infinite;
}
@keyframes ody3dSpin {
  0%   { transform: rotateY(0deg); }
  100% { transform: rotateY(360deg); }
}

/* ── CARDS ── */
.card {
  background: var(--surface) !important;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--hairline) !important; border-radius: var(--r-md) !important;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .4s var(--ease), box-shadow .4s, border-color .3s;
}
.card:hover { border-color: var(--hairline-2) !important; box-shadow: var(--e3), var(--glow-cyan); }
.card-header { border-bottom: 1px solid var(--hairline) !important; }
.card-title { font-weight: 700; letter-spacing: -.01em; }

/* ── STAT CARDS (dense, glowing metric tiles) ── */
.stat-card {
  background: var(--surface) !important;
  backdrop-filter: blur(16px) saturate(140%); -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--hairline) !important; border-radius: var(--r-md) !important;
  padding: 1.4rem 1.5rem !important; position: relative; overflow: hidden;
  box-shadow: var(--e2), inset 0 1px 0 rgba(255,255,255,.05);
  transition: transform .4s var(--ease), box-shadow .4s, border-color .3s;
}
.stat-card::after {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; opacity: .9;
  background: var(--grad-brand);
}
.stat-card.cyan::after { background: linear-gradient(90deg, var(--primary-cyan), var(--sky)); }
.stat-card.green::after { background: linear-gradient(90deg, var(--secondary-green), var(--primary-cyan)); }
.stat-card.warning::after { background: linear-gradient(90deg, var(--warning), #ff8a3d); }
.stat-card { border-top: none !important; }
.stat-card:hover { transform: translateY(-4px); box-shadow: var(--e3), var(--glow-cyan); border-color: var(--hairline-2) !important; }
.stat-card .title { color: var(--text-muted); font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; }
.stat-card .value {
  font-family: 'JetBrains Mono', monospace; font-size: 2rem; font-weight: 700;
  background: var(--grad-text); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.grid-cards { gap: 1.2rem !important; }

/* staggered entrance for grids */
.grid-cards > *, .grid-2 > *, .grid-3 > * { animation: adCardIn .5s var(--ease) both; }
.grid-cards > *:nth-child(2) { animation-delay: .04s; }
.grid-cards > *:nth-child(3) { animation-delay: .08s; }
.grid-cards > *:nth-child(4) { animation-delay: .12s; }
.grid-cards > *:nth-child(5) { animation-delay: .16s; }
.grid-cards > *:nth-child(6) { animation-delay: .2s; }
.grid-cards > *:nth-child(7) { animation-delay: .24s; }
.grid-cards > *:nth-child(8) { animation-delay: .28s; }
@keyframes adCardIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

/* content section entrance */
#admin-content > * { animation: adIn .45s var(--ease); }
@keyframes adIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* ── BUTTONS ── */
.btn { border-radius: 10px; font-weight: 600; transition: transform .22s var(--spring), box-shadow .3s, background .3s, color .2s; }
.btn-primary {
  background: var(--grad-brand) !important; background-size: 180% 180% !important;
  color: #041018 !important; border: none !important; position: relative; overflow: hidden;
  box-shadow: 0 6px 20px rgba(34,229,255,.25), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-primary:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 12px 32px rgba(34,229,255,.45); filter: brightness(1.06); color: #041018 !important; }
.btn-primary::after {
  content: ""; position: absolute; top: 0; left: -130%; width: 55%; height: 100%;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.55), transparent);
  transform: skewX(-20deg); transition: left .6s var(--ease);
}
.btn-primary:hover::after { left: 150%; }
.btn-secondary { background: rgba(52,255,176,.1) !important; color: var(--secondary-green) !important; border: 1px solid rgba(52,255,176,.4) !important; }
.btn-secondary:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(52,255,176,.3); }
.btn-danger { background: rgba(251,92,125,.12) !important; color: var(--danger) !important; border: 1px solid rgba(251,92,125,.45) !important; }
.btn-danger:hover { transform: translateY(-2px); box-shadow: 0 0 18px rgba(251,92,125,.35); }
.btn-outline { background: rgba(255,255,255,.03) !important; border: 1px solid var(--hairline-2) !important; color: var(--text-main) !important; }
.btn-outline:hover { transform: translateY(-2px); border-color: var(--primary-cyan) !important; box-shadow: var(--glow-cyan); }

/* ── FORMS ── */
.form-control, input, select, textarea {
  background: rgba(8,11,26,.75) !important; border: 1px solid var(--hairline) !important;
  border-radius: 10px !important; color: var(--text-main) !important; padding: .6rem .75rem !important;
  transition: border-color .3s, box-shadow .3s, background .3s !important;
}
.form-control:focus, input:focus, select:focus, textarea:focus {
  outline: none !important; border-color: var(--primary-cyan) !important;
  box-shadow: 0 0 0 3px rgba(34,229,255,.13), 0 0 22px rgba(34,229,255,.18) !important;
  background: rgba(8,11,26,.96) !important;
}
.form-group label { color: var(--text-muted); font-weight: 500; }
::placeholder { color: #4c5c7e !important; }

/* ── TABLES (dense, precise) ── */
.table-container {
  background: var(--surface) !important; border: 1px solid var(--hairline) !important;
  border-radius: var(--r-md) !important; box-shadow: var(--e2); overflow: hidden;
}
table.data-table, .table-container table { width: 100%; border-collapse: collapse; }
.data-table th, .table-container th {
  position: sticky; top: 0; z-index: 1;
  background: rgba(10,13,30,.94) !important; backdrop-filter: blur(8px);
  color: var(--text-muted) !important; font-size: .76rem; letter-spacing: .06em; text-transform: uppercase;
  border-bottom: 1px solid var(--hairline) !important; padding: .8rem 1rem !important;
}
.data-table td, .table-container td { border-bottom: 1px solid rgba(120,160,255,.07) !important; padding: .8rem 1rem !important; }
.data-table tbody tr, .table-container tbody tr { transition: background .18s; }
.data-table tbody tr:hover td, .table-container tbody tr:hover td { background: rgba(34,229,255,.05) !important; }
.table-actions { display: flex; gap: .4rem; }

/* ── BADGES ── */
.badge { border-radius: 999px; padding: .28rem .65rem; font-size: .72rem; letter-spacing: .04em; backdrop-filter: blur(6px); transition: transform .2s, box-shadow .3s; }
.badge:hover { transform: translateY(-1px); }
.badge-success { background: rgba(52,255,176,.12) !important; color: var(--secondary-green) !important; border: 1px solid rgba(52,255,176,.3) !important; }
.badge-success:hover { box-shadow: 0 0 14px rgba(52,255,176,.35); }
.badge-info { background: rgba(34,229,255,.12) !important; color: var(--primary-cyan) !important; border: 1px solid rgba(34,229,255,.3) !important; }
.badge-info:hover { box-shadow: 0 0 14px rgba(34,229,255,.35); }
.badge-warning { background: rgba(251,191,36,.12) !important; color: var(--warning) !important; border: 1px solid rgba(251,191,36,.3) !important; }
.badge-danger { background: rgba(251,92,125,.12) !important; color: var(--danger) !important; border: 1px solid rgba(251,92,125,.3) !important; }

/* ── TABS ── */
.tabs { border-bottom: 1px solid var(--hairline) !important; gap: .2rem; }
.tab-btn { position: relative; border-radius: 8px 8px 0 0; font-weight: 500; transition: color .25s, background .25s; }
.tab-btn:hover { color: var(--text-main); background: rgba(255,255,255,.03); }
.tab-btn.active { color: var(--primary-cyan) !important; border-bottom-color: transparent !important; }
.tab-btn.active::after {
  content: ""; position: absolute; left: .6rem; right: .6rem; bottom: -1px; height: 2px;
  background: var(--grad-hot); border-radius: 2px; box-shadow: 0 0 10px rgba(34,229,255,.6);
}

/* ── MODALS ── */
.modal-overlay { background: rgba(3,4,10,.78) !important; backdrop-filter: blur(8px) !important; }
.modal-card {
  background: rgba(14,17,36,.92) !important;
  backdrop-filter: blur(24px) saturate(150%); -webkit-backdrop-filter: blur(24px) saturate(150%);
  border: 1px solid var(--hairline-2) !important; border-radius: 20px !important;
  box-shadow: var(--e3), 0 0 60px rgba(34,229,255,.1);
}
.modal-header { border-bottom: 1px solid var(--hairline) !important; }
.modal-footer { border-top: 1px solid var(--hairline) !important; }
.modal-close:hover { color: var(--primary-cyan); }

/* ── TOASTS ── */
.toast {
  background: rgba(14,17,36,.9) !important; backdrop-filter: blur(14px);
  border: 1px solid var(--hairline-2) !important; border-radius: 12px !important;
  box-shadow: var(--e2);
}
.toast.success { border-left: 4px solid var(--secondary-green) !important; }
.toast.error { border-left: 4px solid var(--danger) !important; }
.toast.warning { border-left: 4px solid var(--warning) !important; }
.toast.info { border-left: 4px solid var(--primary-cyan) !important; }

/* ── ANIMATIONS ── */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes sk-load {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ── SKELETONS ── */
.sk {
    background: linear-gradient(90deg, #0d0d17 25%, #1a1a2e 50%, #0d0d17 75%);
    background-size: 200% 100%;
    animation: sk-load 1.5s infinite;
    border-radius: 4px;
}
.sk-card {
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    animation: fadeInUp .3s ease;
}
.sk-card__thumb {
    width: 100%;
    aspect-ratio: 16/9;
    border-radius: 6px;
    background: linear-gradient(90deg, #0d0d17 25%, #1a1a2e 50%, #0d0d17 75%);
    background-size: 200% 100%;
    animation: sk-load 1.5s infinite;
}
.sk-card__line {
    height: 12px;
    border-radius: 4px;
    background: linear-gradient(90deg, #0d0d17 25%, #1a1a2e 50%, #0d0d17 75%);
    background-size: 200% 100%;
    animation: sk-load 1.5s infinite;
}
.sk-card__line--sm { width: 50%; }
.sk-card__line--md { width: 75%; }
.sk-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(0,245,255,.08);
    animation: fadeInUp .3s ease;
}
.sk-row__ic {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    flex-shrink: 0;
    background: linear-gradient(90deg, #0d0d17 25%, #1a1a2e 50%, #0d0d17 75%);
    background-size: 200% 100%;
    animation: sk-load 1.5s infinite;
}
.sk-row__body { flex: 1; display: flex; flex-direction: column; gap: 7px; }
.sk-row__line { height: 11px; border-radius: 4px; background: linear-gradient(90deg, #0d0d17 25%, #1a1a2e 50%, #0d0d17 75%); background-size: 200% 100%; animation: sk-load 1.5s infinite; }
.sk-row__line--sm { width: 55%; }

/* ── MISC ── */
canvas { border-radius: 10px; }
.spin { border-top-color: var(--primary-cyan) !important; }
::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: var(--bg-dark); }
::-webkit-scrollbar-thumb { background: linear-gradient(var(--primary-cyan), var(--violet)); border-radius: 7px; border: 3px solid var(--bg-dark); }
::selection { background: rgba(34,229,255,.3); color: #fff; }
:focus-visible { outline: 2px solid var(--primary-cyan); outline-offset: 2px; }

/* quota widget in topbar */
#quota-widget { transition: transform .2s; }
#quota-widget:hover { transform: translateY(-1px); }

@media (prefers-reduced-motion: reduce) {
  body::after, .login-box .logo span, .sidebar-header .logo span, #current-section-name { animation: none !important; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ── Default-theme picker (Settings → Brand) ── */
.admin-theme-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:.7rem;margin-top:.5rem}
.admin-theme-swatch{display:flex;flex-direction:column;align-items:center;gap:.5rem;padding:.8rem .5rem;background:rgba(255,255,255,.03);border:1px solid rgba(255,255,255,.1);border-radius:10px;cursor:pointer;transition:transform .16s,border-color .16s,box-shadow .16s}
.admin-theme-swatch:hover{transform:translateY(-2px)}
.admin-theme-swatch.active{border-color:var(--secondary-green,#00ff9d);box-shadow:0 0 0 1px var(--secondary-green,#00ff9d)}
.admin-theme-mini{display:flex;gap:4px;align-items:center;justify-content:center;width:100%;height:32px;border-radius:7px;border:1px solid}
.admin-theme-mini span{width:11px;height:18px;border-radius:3px}
.admin-theme-name{font-size:.76rem;color:var(--text-muted,#94a3b8)}
.admin-theme-swatch.active .admin-theme-name{color:var(--text,#e2e8f0)}
