/* ============================================================
   PulsApp — Design System
   Fuentes: Cormorant Garamond (display) + Outfit (body)
   Paleta: Dorado sobre negro profundo — luxe artesanal
============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,600;0,700;1,600&family=Outfit:wght@300;400;500;600;700&display=swap');

/* ── TOKENS ───────────────────────────────────────────────── */
:root {
  /* Superficie */
  --ink:    #09090C;
  --ink2:   #111116;
  --ink3:   #18181E;
  --ink4:   #1E1E26;
  /* Bordes */
  --wire:   rgba(255,255,255,0.055);
  --wire2:  rgba(212,168,67,0.20);
  --wire3:  rgba(212,168,67,0.40);
  /* Oro */
  --g1:     #D4A843;
  --g2:     #F2C84B;
  --g3:     #A07828;
  --g-grad: linear-gradient(125deg, #C49A30 0%, #F2C84B 45%, #C49A30 100%);
  /* Texto */
  --tx:     #F5F2EC;
  --tx2:    #9B9488;
  --tx3:    #5C564E;
  /* Estado */
  --red:    #E05252;
  --green:  #4CAF7D;
  --blue:   #5B8DEF;
  /* Radios */
  --r:      14px;
  --r2:     9px;
  --r3:     6px;
  /* Sombras */
  --sh-g:   0 4px 24px rgba(212,168,67,0.18);
  --sh-sm:  0 2px 12px rgba(0,0,0,0.4);
}

/* ── RESET ────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
  font-family: 'Outfit', sans-serif;
  background: var(--ink);
  color: var(--tx);
  min-height: 100vh;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { display: block; max-width: 100%; }
a { color: var(--g1); text-decoration: none; }
a:hover { color: var(--g2); }

/* ── SCROLLBAR ────────────────────────────────────────────── */
::-webkit-scrollbar { width: 3px; height: 3px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--g3); border-radius: 3px; }

/* ── TIPOGRAFÍA ──────────────────────────────────────────── */
.serif   { font-family: 'Cormorant Garamond', serif; }
.gold    { background: var(--g-grad); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.muted   { color: var(--tx2); }
.xs      { font-size: 11px; }
.sm      { font-size: 13px; }
.caption { font-size: 11px; font-weight: 600; letter-spacing: .8px; text-transform: uppercase; color: var(--tx3); }
.label   { font-size: 11px; font-weight: 600; letter-spacing: .6px; text-transform: uppercase; display: block; margin-bottom: 6px; color: var(--tx2); }

/* ── SUPERFICIES ─────────────────────────────────────────── */
.card    { background: var(--ink2); border: 1px solid var(--wire); border-radius: var(--r); padding: 22px; }
.card-g  { border-color: var(--wire2); }
.card2   { background: var(--ink3); border: 1px solid var(--wire); border-radius: var(--r2); padding: 14px; }
.surface { background: var(--ink2); border: 1px solid var(--wire); border-radius: var(--r); }

/* ── INPUTS ──────────────────────────────────────────────── */
.inp {
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--wire);
  border-radius: var(--r2);
  color: var(--tx);
  padding: 11px 14px;
  width: 100%;
  font-size: 13.5px;
  font-family: 'Outfit', sans-serif;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.inp:focus {
  border-color: var(--g1);
  box-shadow: 0 0 0 3px rgba(212,168,67,0.09);
}
.inp::placeholder { color: var(--tx3); }
select.inp option { background: var(--ink2); }
.inp-error { border-color: var(--red) !important; }

/* ── BOTONES ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-family: 'Outfit', sans-serif; font-weight: 600;
  border: none; border-radius: var(--r2); cursor: pointer;
  transition: all .18s; white-space: nowrap; text-decoration: none;
  padding: 11px 20px; font-size: 14px;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: var(--g-grad); background-size: 200%;
  color: var(--ink); padding: 12px 22px;
}
.btn-primary:hover { background-position: 100%; box-shadow: var(--sh-g); }
.btn-ghost {
  background: transparent; border: 1px solid var(--wire);
  color: var(--tx2); padding: 10px 18px;
}
.btn-ghost:hover { border-color: var(--wire2); color: var(--g1); }
.btn-danger {
  background: rgba(224,82,82,0.08); border: 1px solid rgba(224,82,82,0.2);
  color: #E09090; padding: 8px 14px; font-size: 13px;
}
.btn-danger:hover { background: rgba(224,82,82,0.16); }
.btn-success {
  background: rgba(76,175,125,0.08); border: 1px solid rgba(76,175,125,0.2);
  color: #6FD6A4; padding: 8px 14px; font-size: 13px;
}
.btn-success:hover { background: rgba(76,175,125,0.16); }
.btn-sm  { padding: 7px 13px !important; font-size: 12px !important; }
.btn-xl  { padding: 14px 30px !important; font-size: 15px !important; }
.btn-icon { background: none; border: none; cursor: pointer; color: var(--tx3); padding: 5px; font-size: 14px; border-radius: 6px; transition: color .15s; }
.btn-icon:hover { color: var(--g1); }

/* ── BADGE ───────────────────────────────────────────────── */
.badge        { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.badge-gold   { background: rgba(212,168,67,0.1); color: var(--g2); border: 1px solid var(--wire2); }
.badge-green  { background: rgba(76,175,125,0.1); color: #6FD6A4; border: 1px solid rgba(76,175,125,0.2); }
.badge-red    { background: rgba(224,82,82,0.1); color: #E09090; border: 1px solid rgba(224,82,82,0.2); }
.badge-blue   { background: rgba(91,141,239,0.1); color: #8DAAEF; border: 1px solid rgba(91,141,239,0.2); }
.badge-gray   { background: rgba(255,255,255,0.05); color: var(--tx3); border: 1px solid var(--wire); }

/* ── TABS ────────────────────────────────────────────────── */
.tab-bar { display: flex; gap: 2px; padding: 3px; background: rgba(0,0,0,0.5); border-radius: 10px; width: fit-content; }
.tab { padding: 7px 16px; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--tx3); transition: all .18s; border: 1px solid transparent; }
.tab.active { background: rgba(212,168,67,0.08); color: var(--g1); border-color: var(--wire2); }

/* ── STEP DOTS ───────────────────────────────────────────── */
.sdot { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; flex-shrink: 0; transition: all .2s; }

/* ── MODAL ───────────────────────────────────────────────── */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.82); z-index: 500;
  align-items: center; justify-content: center;
  padding: 18px; backdrop-filter: blur(6px);
}
.modal-overlay.open { display: flex; }
.modal-box {
  background: var(--ink2); border: 1px solid var(--wire2);
  border-radius: var(--r); padding: 26px; width: 100%;
  max-height: 90vh; overflow-y: auto;
  animation: mpop .18s ease-out;
}

/* ── TABLA ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; border-radius: var(--r); }
table.tbl   { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th     { padding: 10px 14px; text-align: left; font-size: 10.5px; font-weight: 600; letter-spacing: .7px; text-transform: uppercase; color: var(--tx3); border-bottom: 1px solid var(--wire); }
.tbl td     { padding: 12px 14px; border-bottom: 1px solid var(--wire); color: var(--tx2); vertical-align: middle; }
.tbl tr:last-child td { border: none; }
.tbl tr:hover td      { background: rgba(255,255,255,0.015); }

/* ── FORM FIELDS ─────────────────────────────────────────── */
.field       { margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field-row   { display: grid; gap: 14px; }
.field-row.cols-2 { grid-template-columns: 1fr 1fr; }
.field-row.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }

/* ── STATS ───────────────────────────────────────────────── */
.stat-grid    { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.stat-card    { background: var(--ink2); border: 1px solid var(--wire); border-radius: var(--r); padding: 18px; }
.stat-card.gold { border-color: var(--wire2); }
.stat-num     { font-size: 2rem; font-weight: 700; line-height: 1; margin-bottom: 6px; }
.stat-label   { font-size: 12px; color: var(--tx2); }
.stat-change  { font-size: 11px; margin-top: 4px; }
.stat-change.up   { color: var(--green); }
.stat-change.down { color: var(--red); }

/* ── SHIMMER ─────────────────────────────────────────────── */
.shimmer {
  background: linear-gradient(90deg, rgba(255,255,255,.025) 0%, rgba(255,255,255,.055) 50%, rgba(255,255,255,.025) 100%);
  background-size: 200% 100%; animation: sh 1.5s infinite; border-radius: var(--r2);
}

/* ── SLIDER ──────────────────────────────────────────────── */
input[type=range] { -webkit-appearance: none; height: 3px; background: rgba(255,255,255,.07); border-radius: 2px; outline: none; width: 100%; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 17px; height: 17px; background: var(--g-grad); border-radius: 50%; cursor: pointer; box-shadow: 0 0 8px rgba(212,168,67,.3); }

/* ── TOAST ───────────────────────────────────────────────── */
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); padding: 11px 20px; border-radius: 9px; font-weight: 500; font-size: 13px; z-index: 9999; white-space: nowrap; animation: tin .2s ease-out; }
.toast-ok  { background: var(--g-grad); color: var(--ink); }
.toast-err { background: rgba(224,82,82,.92); color: #fff; backdrop-filter: blur(4px); }
.toast-info{ background: rgba(91,141,239,.92); color: #fff; backdrop-filter: blur(4px); }

/* ── DIVIDERS ────────────────────────────────────────────── */
.hr  { height: 1px; background: var(--wire); margin: 18px 0; }
.hr2 { height: 1px; background: var(--wire2); margin: 18px 0; }

/* ── EMPTY STATE ─────────────────────────────────────────── */
.empty { text-align: center; padding: 44px 20px; border: 1px dashed rgba(255,255,255,.055); border-radius: var(--r); }
.empty-icon { font-size: 34px; margin-bottom: 12px; }
.empty-title { font-size: 15px; font-weight: 500; margin-bottom: 7px; }
.empty-sub   { font-size: 13px; color: var(--tx2); }

/* ── ALERT ───────────────────────────────────────────────── */
.alert     { padding: 11px 14px; border-radius: var(--r2); font-size: 13px; display: none; }
.alert-err { background: rgba(224,82,82,.08); border: 1px solid rgba(224,82,82,.2); color: #E08080; }
.alert-ok  { background: rgba(76,175,125,.08); border: 1px solid rgba(76,175,125,.2); color: #6FD6A4; }

/* ── GRID HELPERS ────────────────────────────────────────── */
.g2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.g3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.flex { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.flex-between { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }

/* ── ADS ─────────────────────────────────────────────────── */
.ad-slot { background: var(--ink3); border: 1px dashed rgba(212,168,67,.1); border-radius: 10px; overflow: hidden; cursor: pointer; transition: border-color .2s; }
.ad-slot:hover { border-color: var(--wire2); }
.ad-slot img, .ad-slot video { width: 100%; height: 100%; object-fit: cover; }

/* ── ANIMACIONES ─────────────────────────────────────────── */
@keyframes mpop  { from { opacity:0; transform:scale(.96) translateY(6px) } to { opacity:1; transform:scale(1) translateY(0) } }
@keyframes tin   { from { opacity:0; transform:translateX(-50%) translateY(8px) } to { opacity:1; transform:translateX(-50%) translateY(0) } }
@keyframes sh    { to { background-position: -200% 0; } }
@keyframes fup   { from { opacity:0; transform:translateY(10px) } to { opacity:1; transform:translateY(0) } }
@keyframes spin  { to { transform: rotate(360deg); } }
.fade-up { animation: fup .22s ease-out; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 640px) {
  .g2, .g3 { grid-template-columns: 1fr !important; }
  .hide-mobile { display: none !important; }
}
@media print {
  .no-print { display: none !important; }
  body { background: #fff; color: #000; }
}
