/**
 * AxiomPrime — Design System
 * Dark Luxury Theme
 * Fontes: Playfair Display (display) + DM Sans (body)
 */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;600;700&family=DM+Sans:wght@300;400;500;600&display=swap');

/* ── TOKENS ───────────────────────────────────────────────────── */
:root {
  /* Cores base */
  --bg:           #09090f;
  --surface:      #111118;
  --surface-2:    #18181f;
  --surface-3:    #1e1e28;
  --border:       #252530;
  --border-light: #2e2e3a;

  /* Accent */
  --accent:       #f43f75;
  --accent-dim:   rgba(244, 63, 117, 0.12);
  --accent-glow:  rgba(244, 63, 117, 0.25);
  --accent-hover: #ff5585;

  /* Texto */
  --text:         #f0f0f8;
  --text-2:       #a0a0b0;
  --text-3:       #606070;

  /* Semânticas */
  --success:      #22c55e;
  --success-dim:  rgba(34, 197, 94, 0.12);
  --warning:      #f59e0b;
  --warning-dim:  rgba(245, 158, 11, 0.12);
  --danger:       #ef4444;
  --danger-dim:   rgba(239, 68, 68, 0.12);
  --info:         #3b82f6;

  /* Tipografia */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body:    'DM Sans', 'Segoe UI', sans-serif;

  /* Espaçamento */
  --r-sm:   8px;
  --r-md:   12px;
  --r-lg:   16px;
  --r-xl:   20px;
  --r-full: 999px;

  /* Sombras */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.4);
  --shadow-md:  0 4px 16px rgba(0,0,0,0.5);
  --shadow-lg:  0 8px 32px rgba(0,0,0,0.6);
  --shadow-accent: 0 0 24px var(--accent-glow);

  /* Transições */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --t-fast:   150ms var(--ease);
  --t-normal: 220ms var(--ease);
  --t-slow:   350ms var(--ease);
}

/* ── RESET ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }

body {
  font-family: var(--font-body);
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  min-height: 100vh;
}

/* ── TIPOGRAFIA ───────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(22px, 4vw, 32px); }
h2 { font-size: clamp(16px, 3vw, 22px); }
h3 { font-size: 16px; }
p  { color: var(--text-2); line-height: 1.7; }
small { font-size: 12px; color: var(--text-3); }

/* ── BOTÕES ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--r-md);
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all var(--t-fast);
  white-space: nowrap;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 12px var(--accent-glow);
}
.btn-primary:hover {
  background: var(--accent-hover);
  box-shadow: 0 4px 20px var(--accent-glow);
  transform: translateY(-1px);
}
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: transparent;
  color: var(--text-2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  background: var(--surface-3);
  color: var(--text);
  border-color: var(--border-light);
}

.btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,0.2);
}
.btn-danger:hover { background: var(--danger); color: #fff; }

.btn-success {
  background: var(--success-dim);
  color: var(--success);
  border: 1px solid rgba(34,197,94,0.2);
}

.btn-sm { padding: 6px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn-lg { padding: 14px 28px; font-size: 15px; font-weight: 600; }
.btn-full { width: 100%; }

.btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  transform: none !important;
  box-shadow: none !important;
}

/* ── CARDS ────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 20px;
  transition: border-color var(--t-normal);
}
.card:hover { border-color: var(--border-light); }

.card-sm { padding: 14px 16px; border-radius: var(--r-lg); }
.card-accent {
  border-color: rgba(244, 63, 117, 0.3);
  background: linear-gradient(135deg, var(--surface), var(--surface-2));
}

/* ── INPUTS ───────────────────────────────────────────────────── */
.input {
  width: 100%;
  padding: 10px 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
  outline: none;
}
.input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.input::placeholder { color: var(--text-3); }

.label {
  display: block;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 6px;
  letter-spacing: 0.3px;
}

.form-group { margin-bottom: 16px; }

/* ── BADGES ───────────────────────────────────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 10px;
  border-radius: var(--r-full);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3px;
}
.badge-accent  { background: var(--accent-dim); color: var(--accent); border: 1px solid rgba(244,63,117,0.2); }
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-danger  { background: var(--danger-dim); color: var(--danger); }
.badge-neutral { background: var(--surface-3); color: var(--text-2); }

/* ── STAT CARD ────────────────────────────────────────────────── */
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-card .stat-value {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--text);
}
.stat-card .stat-label {
  font-size: 12px;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.stat-card .stat-delta {
  font-size: 12px;
  margin-top: 4px;
}
.stat-card .stat-delta.up   { color: var(--success); }
.stat-card .stat-delta.down { color: var(--danger); }

/* ── DIVIDER ──────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 20px 0;
}

/* ── TOAST ────────────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  padding: 12px 18px;
  background: var(--surface-3);
  border: 1px solid var(--border-light);
  border-left: 3px solid var(--accent);
  border-radius: var(--r-md);
  font-size: 13px;
  color: var(--text);
  box-shadow: var(--shadow-lg);
  transform: translateY(80px);
  opacity: 0;
  transition: all var(--t-normal);
  z-index: 9998;
  max-width: 320px;
}
.toast.show { transform: translateY(0); opacity: 1; }
.toast.success { border-left-color: var(--success); }
.toast.error   { border-left-color: var(--danger); }

/* ── SKELETON ─────────────────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: var(--r-md);
}
@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* ── LIVE DOT ─────────────────────────────────────────────────── */
.live-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: livepulse 1.4s ease infinite;
}
@keyframes livepulse {
  0%,100% { opacity: 1; transform: scale(1); }
  50%     { opacity: 0.4; transform: scale(0.85); }
}

/* ── SCROLLBAR ────────────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-3); }

/* ── UTILITIES ────────────────────────────────────────────────── */
.flex   { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2  { gap: 8px; }
.gap-3  { gap: 12px; }
.gap-4  { gap: 16px; }
.mt-1   { margin-top: 4px; }
.mt-2   { margin-top: 8px; }
.mt-4   { margin-top: 16px; }
.mb-4   { margin-bottom: 16px; }
.text-accent { color: var(--accent); }
.text-muted  { color: var(--text-2); }
.text-sm     { font-size: 12px; }
.font-display { font-family: var(--font-display); }
.truncate { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }

/* ── PAGE TRANSITIONS ─────────────────────────────────────────── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-up { animation: fadeUp var(--t-slow) var(--ease) both; }
.fade-up-2 { animation: fadeUp var(--t-slow) 80ms var(--ease) both; }
.fade-up-3 { animation: fadeUp var(--t-slow) 160ms var(--ease) both; }
.fade-up-4 { animation: fadeUp var(--t-slow) 240ms var(--ease) both; }
