/*
 * speed.css — OverlayOS Admin Performance Override
 *
 * Goals:
 *  1. Eliminate 3 Google Font network requests (replaced by system fonts)
 *  2. Remove backdrop-filter: blur() — forces GPU compositing layers on every frame
 *  3. Kill ambient/rotating/pulsing continuous animations — constant CPU/GPU drain
 *  4. Strip glow box-shadow / text-shadow — repaints on every hover
 *  5. Flatten entrance animation stagger delays — content appears instantly
 *
 * All class names and layout rules are preserved; only paint/composite
 * cost properties are changed.
 */

/* ── 1. SYSTEM FONTS (zero network cost) ──────────────────────────── */
:root {
  --font-h: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-b: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-m: ui-monospace, 'SF Mono', 'Cascadia Code', 'Consolas', monospace;

  /* Tighten transitions globally — 0.18s → 0.1s */
  --trans:      0.1s ease;
  --trans-slow: 0.18s ease;
  --trans-bounce: 0.2s ease;
}

/* ── 2. REMOVE AMBIENT BACKGROUND ANIMATION ──────────────────────── */
body::before {
  display: none;
}

/* ── 3. KILL ALL CONTINUOUS / DECORATIVE ANIMATIONS ─────────────── */

/* Ambient rotate on login screen */
.login-bg::before {
  animation: none;
}

/* Live-pulse dot on topbar */
.topbar-chip::before {
  animation: none;
}

/* Toast dot pulse */
.toast-dot {
  animation: none;
}

/* Status dot pulse */
.status-dot.green {
  animation: none;
}

/* Unsaved indicator pulse */
.drawer-unsaved {
  animation: none;
}

/* ── 4. REMOVE backdrop-filter (forces compositing layer) ────────── */
#global-loading {
  backdrop-filter: none;
  background: rgba(6, 7, 8, 0.97);
}

.login-wrap {
  backdrop-filter: none;
  background: var(--bg1);
}

#confirm-dialog {
  backdrop-filter: none;
  background: rgba(0, 0, 0, 0.85);
}

.drawer-backdrop {
  backdrop-filter: none;
  background: rgba(0, 0, 0, 0.72);
}

.modal {
  backdrop-filter: none;
  background: rgba(0, 0, 0, 0.85);
}

#sidebar {
  backdrop-filter: none;
  background: var(--bg1);
}

.topbar {
  backdrop-filter: none;
  background: var(--bg1);
}

.sb-backdrop {
  backdrop-filter: none;
  background: rgba(0, 0, 0, 0.72);
}

/* ── 5. STRIP GLOW SHADOWS ────────────────────────────────────────── */

/* Stat value text-glow */
.stat-val.green  { text-shadow: none; }
.stat-val.amber  { text-shadow: none; }
.stat-val.blue   { text-shadow: none; }
.stat-val.red    { text-shadow: none; }
.stat-val.purple { text-shadow: none; }

/* Mini chart bar glow */
.smb.hi {
  box-shadow: none;
}

/* Loading spinner inner glow */
.loading-spinner {
  box-shadow: none;
}
.loading-spinner::after {
  display: none;
}

/* Status dot glow */
.status-dot.green { box-shadow: none; }
.status-dot.amber { box-shadow: none; }
.status-dot.red   { box-shadow: none; }

/* Sidebar logo glow */
.sb-logo-icon {
  box-shadow: none;
}
.sb-logo:hover .sb-logo-icon {
  box-shadow: none;
}

/* Login logo glow */
.login-logo-icon {
  box-shadow: none;
}

/* Active nav item accent glow */
.sb-item.active::before {
  box-shadow: none;
}

/* Button hover glow */
.btn-primary:hover  { box-shadow: none; }
.btn-danger:hover   { box-shadow: none; }
.btn-amber:hover    { box-shadow: none; }
.btn-approve:hover  { box-shadow: none; }
.btn-reject:hover   { box-shadow: none; }
.btn-login:hover    { box-shadow: none; }

/* Copy button transform */
.btn-copy:hover {
  transform: none;
}

/* Toggle glow */
.toggle.on {
  box-shadow: none;
}
.toggle.on::after {
  box-shadow: none;
}

/* Plan card featured glow */
.plan-card.featured {
  box-shadow: none;
}

/* Key display ambient glow */
.key-display {
  box-shadow: none;
}

/* Confirm icon glow */
.confirm-icon.danger {
  box-shadow: none;
}

/* Modal overlay shadow */
.modal-box {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.confirm-box {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

/* Drawer shadow */
#user-drawer {
  box-shadow: -8px 0 24px rgba(0, 0, 0, 0.35);
}

/* ── 6. STAT CARD radial gradient overlay → remove (paint cost) ──── */
.stat-card::before {
  display: none;
}
.referral-stat-card::before {
  display: none;
}

/* ── 7. COLLAPSE ENTRANCE ANIMATION STAGGER DELAYS ──────────────── */
/* Cards, rows, settings — all appear instantly instead of staggering */
.stat-card,
.stat-card:nth-child(1),
.stat-card:nth-child(2),
.stat-card:nth-child(3),
.stat-card:nth-child(4) {
  animation-delay: 0s;
}

.settings-card,
.settings-card:nth-child(1),
.settings-card:nth-child(2),
.settings-card:nth-child(3),
.settings-card:nth-child(4),
.settings-card:nth-child(5),
.settings-card:nth-child(6) {
  animation-delay: 0s;
}

.plan-card,
.plan-card:nth-child(1),
.plan-card:nth-child(2),
.plan-card:nth-child(3) {
  animation-delay: 0s;
}

.act-item,
.act-item:nth-child(1),
.act-item:nth-child(2),
.act-item:nth-child(3),
.act-item:nth-child(4),
.act-item:nth-child(5) {
  animation-delay: 0s;
}

tbody tr,
tbody tr:nth-child(1),
tbody tr:nth-child(2),
tbody tr:nth-child(3),
tbody tr:nth-child(4),
tbody tr:nth-child(5) {
  animation: none;
}

/* ── 8. SIMPLIFY ENTRANCE ANIMATIONS ──────────────────────────────── */
/* Replace bounce/overshoot cubic-bezier with simple fade */
@keyframes cardIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes modalIn {
  from { opacity: 0; transform: scale(0.97); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes toastIn {
  from { opacity: 0; transform: translateX(12px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Remove icon pop animation in confirm dialog */
.confirm-icon {
  animation: none;
}

/* Remove badge pop animation */
.sb-badge {
  animation: none;
}

/* ── 9. TOPBAR gradient → flat ───────────────────────────────────── */
.tbl-toolbar {
  background: var(--bg1);
}
.drawer-header {
  background: var(--bg2);
}

/* ── 10. TABLE ROW left-border pseudo — only animate on hover ──────── */
tbody tr::before {
  transition: none;
}

/* ── 11. STAT CARD hover — no transform (avoids layout shift cost) ─── */
.stat-card:hover {
  transform: none;
  box-shadow: none;
}
.plan-card:hover {
  transform: none;
  box-shadow: none;
}
.coupon-card:hover {
  transform: none;
}

/* ── 12. LOGIN page background — remove heavy conic-gradient ──────── */
.login-bg {
  display: none;
}
