/* FokoCool · estilos. Paleta de Foko (violeta sobre negro violáceo), bajada un
   tono para leer números todo el día sin cansar la vista. */

:root {
  color-scheme: dark;

  --bg: #0c0616;
  --bg-side: #0f0919;
  --surface: #160e27;
  --surface-hi: #1a1030;
  --surface-2: #1f1436;
  --surface-3: #291b47;
  --field: #120a21;
  --line: #2a1c45;
  --line-2: #3a2860;
  --line-soft: rgba(58, 40, 96, 0.55);

  --text: #f2ecff;
  --text-2: #b4a6d2;
  --text-3: #7f71a1;

  --accent: #8b5cf6;
  --accent-2: #a57cff;
  --accent-3: #c9a9ff;
  --accent-soft: rgba(139, 92, 246, 0.14);
  --accent-ring: rgba(139, 92, 246, 0.28);

  --good: #4ade80;
  --good-soft: rgba(74, 222, 128, 0.12);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.12);
  --bad: #fb7185;
  --bad-soft: rgba(251, 113, 133, 0.12);
  --info: #7cb4ff;

  /* datos: validados contra la superficie de las tarjetas */
  --series-1: #9373f2;
  --series-neg: #e8587e;
  --heat-0: rgba(255, 255, 255, 0.04);
  --heat-1: #563c95;
  --heat-2: #6f4dc2;
  --heat-3: #8a63e6;
  --heat-4: #a98cfa;
  --heat-5: #cdb8ff;
  --grid: rgba(127, 113, 161, 0.14);

  --r: 14px;
  --r-sm: 10px;
  --shadow: 0 1px 0 rgba(255, 255, 255, 0.025) inset, 0 12px 32px rgba(3, 0, 10, 0.35);
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.45;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  font-feature-settings: 'cv11', 'ss01';
  background:
    radial-gradient(1100px 620px at 8% -12%, rgba(84, 40, 160, 0.20), transparent 62%),
    radial-gradient(900px 520px at 105% -5%, rgba(60, 22, 118, 0.18), transparent 58%),
    var(--bg);
  background-attachment: fixed;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
input, select, textarea { font: inherit; color: inherit; }
svg { flex: none; }
::selection { background: rgba(139, 92, 246, 0.4); }
:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 2px; border-radius: 6px; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b1e47; border-radius: 99px; border: 2px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background: #3a2860; background-clip: padding-box; border: 2px solid transparent; }
::-webkit-scrollbar-track { background: transparent; }

.num, .tabular { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.good { color: var(--good); }
.bad { color: var(--bad); }
.warn { color: var(--warn); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ------------------------------------------------------------ esqueleto */

.app { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  padding: 18px 14px 14px;
  background: linear-gradient(180deg, rgba(20, 12, 36, 0.92), rgba(13, 8, 24, 0.96));
  border-right: 1px solid var(--line);
  z-index: 40;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 18px; }
.brand img { width: 36px; height: 36px; border-radius: 11px; box-shadow: 0 6px 20px rgba(139, 92, 246, 0.35); }
.brand b { display: block; font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.brand b span { background: linear-gradient(135deg, #c9a9ff, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-3); padding: 16px 12px 7px; font-weight: 600; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 12px; border-radius: 10px;
  color: var(--text-2); font-weight: 500; font-size: 13.5px;
  transition: background 0.12s, color 0.12s;
}
.nav a svg { color: var(--text-3); transition: color 0.12s; }
.nav a:hover { background: rgba(255, 255, 255, 0.035); color: var(--text); }
.nav a:hover svg { color: var(--text-2); }
.nav a.on { background: linear-gradient(90deg, rgba(139, 92, 246, 0.22), rgba(139, 92, 246, 0.06)); color: #fff; }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.nav a.on svg { color: var(--accent-3); }
.nav .count { margin-left: auto; font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.nav .pulse { margin-left: auto; width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 0 0 rgba(165, 124, 255, 0.6); animation: pulse 1.6s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 7px rgba(165, 124, 255, 0); } 100% { box-shadow: 0 0 0 0 rgba(165, 124, 255, 0); } }

.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.sync-card { border: 1px solid var(--line); border-radius: 12px; padding: 12px 13px; background: rgba(26, 16, 48, 0.6); }
.sync-card .row { display: flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; }
.sync-card p { margin: 5px 0 0; font-size: 11.5px; color: var(--text-3); line-height: 1.5; }
.sync-card .bar { height: 4px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-top: 9px; }
.sync-card .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent-3)); border-radius: 99px; transition: width 0.4s; }
.me { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; }
.me:hover { background: rgba(255, 255, 255, 0.03); }
.me .who { min-width: 0; flex: 1; }
.me b { display: block; font-size: 13px; font-weight: 600; }
.me small { display: block; font-size: 11.5px; color: var(--text-3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { display: none; }
.page { width: 100%; max-width: 1480px; margin: 0 auto; padding: 30px 34px 72px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 25px; font-weight: 700; letter-spacing: -0.025em; line-height: 1.15; }
.page-head p { margin: 5px 0 0; color: var(--text-2); font-size: 13.5px; }
.page-head .actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.crumbs { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-3); margin-bottom: 8px; }
.crumbs a:hover { color: var(--text-2); }

.scrim { display: none; }

@media (max-width: 960px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 264px; transform: translateX(-100%); transition: transform 0.2s; }
  .app.menu-open .sidebar { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.5); }
  .app.menu-open .scrim { display: block; position: fixed; inset: 0; background: rgba(5, 2, 12, 0.6); z-index: 39; }
  .topbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(12, 6, 22, 0.9); backdrop-filter: blur(10px); }
  .topbar img { width: 28px; height: 28px; border-radius: 8px; }
  .topbar b { font-size: 15px; }
  .page { padding: 20px 16px 60px; }
  .selbar { top: 66px; }
}

/* ------------------------------------------------------------ superficies */

.card {
  background: linear-gradient(180deg, var(--surface-hi), var(--surface));
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 16px 18px 0; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-head p { margin: 3px 0 0; font-size: 12px; color: var(--text-3); }
.card-body { padding: 14px 18px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.card.pad { padding: 18px; }

.grid { display: grid; gap: 16px; }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 10px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }
.section-title { display: flex; align-items: center; gap: 10px; margin: 28px 0 12px; }
.section-title h2 { margin: 0; font-size: 16px; font-weight: 650; letter-spacing: -0.015em; }

@media (max-width: 1200px) { .g-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g-main { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .g-4, .g-3, .g-2 { grid-template-columns: minmax(0, 1fr); } }

/* ------------------------------------------------------------ controles */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r-sm);
  font-size: 13.5px; font-weight: 550; white-space: nowrap;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text);
  transition: background 0.12s, border-color 0.12s, transform 0.12s, box-shadow 0.12s, opacity 0.12s;
}
.btn:hover:not(:disabled) { background: var(--surface-3); border-color: #4b3478; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.btn:disabled { opacity: 0.5; cursor: default; }
.btn svg { color: var(--text-2); }
.btn-primary { background: linear-gradient(135deg, #8b5cf6, #a57cff); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(139, 92, 246, 0.26); }
.btn-primary svg { color: #fff; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg, #9466f8, #b08bff); border-color: transparent; box-shadow: 0 10px 24px rgba(139, 92, 246, 0.36); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn-ghost:hover:not(:disabled) { background: rgba(255, 255, 255, 0.04); border-color: transparent; color: var(--text); }
.btn-danger { background: var(--bad-soft); border-color: rgba(251, 113, 133, 0.25); color: #fda4af; }
.btn-danger svg { color: #fda4af; }
.btn-danger:hover:not(:disabled) { background: rgba(251, 113, 133, 0.2); border-color: rgba(251, 113, 133, 0.4); }
.btn.on { background: rgba(139, 92, 246, 0.16); border-color: rgba(165, 124, 255, 0.5); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; gap: 6px; }
.btn-icon { width: 36px; padding: 0; }
.btn-sm.btn-icon { width: 30px; }
.btn-block { width: 100%; }
.btn .spin { animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.input, .select, .textarea {
  height: 36px; width: 100%;
  padding: 0 12px; border-radius: var(--r-sm);
  background: var(--field); border: 1px solid var(--line-2);
  color: var(--text); font-size: 13.5px;
  transition: border-color 0.12s, box-shadow 0.12s;
}
.textarea { height: auto; min-height: 120px; padding: 10px 12px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--text-3); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
.select { appearance: none; padding-right: 32px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%237f71a1' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; }
.select option { background: #1a1030; }
.input-sm { height: 30px; font-size: 12.5px; border-radius: 8px; }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--text-3); pointer-events: none; }
.input-icon .input { padding-left: 34px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 12.5px; font-weight: 550; color: var(--text-2); }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.5; }
.range { display: flex; align-items: center; gap: 6px; }
.range .input { width: 100%; min-width: 0; }
.range span { color: var(--text-3); }

.seg { display: inline-flex; background: var(--field); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { height: 28px; padding: 0 11px; border-radius: 7px; color: var(--text-2); font-size: 12.5px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; transition: background 0.12s, color 0.12s; }
.seg button:hover { color: var(--text); }
.seg button.on { background: rgba(139, 92, 246, 0.2); color: #e4d8ff; box-shadow: inset 0 0 0 1px rgba(165, 124, 255, 0.32); }

.switch { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--surface-3); border: 1px solid var(--line-2); transition: background 0.15s; flex: none; }
.switch::after { content: ''; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #cfc3ea; transition: transform 0.15s; }
.switch.on { background: var(--accent); border-color: transparent; }
.switch.on::after { transform: translateX(16px); background: #fff; }

.check { width: 17px; height: 17px; border-radius: 5px; border: 1.5px solid #52407a; background: var(--field); display: inline-grid; place-items: center; flex: none; cursor: pointer; transition: background 0.1s, border-color 0.1s; }
.check:hover { border-color: var(--accent-2); }
.check.on { background: var(--accent); border-color: var(--accent); }
.check.on svg { color: #fff; }
.check.part { background: var(--accent); border-color: var(--accent); }

/* ------------------------------------------------------------ piezas */

.badge { display: inline-flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-3); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-soft); color: #86efac; }
.badge.bad { background: var(--bad-soft); color: #fda4af; }
.badge.warn { background: var(--warn-soft); color: #fcd34d; }
.badge.accent { background: var(--accent-soft); color: var(--accent-3); }
.badge.outline { background: transparent; border: 1px solid var(--line-2); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }

.tag { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 550; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line-2); color: var(--text); white-space: nowrap; max-width: 100%; }
.tag .dot { background: var(--c, var(--accent-2)); }
.tag button { color: var(--text-3); display: grid; place-items: center; margin-right: -3px; }
.tag button:hover { color: var(--text); }
.tag.add { border-style: dashed; color: var(--text-3); background: transparent; }
.tag.add:hover { color: var(--text); border-color: var(--accent-2); }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }

.avatar { width: 34px; height: 34px; border-radius: 50%; object-fit: cover; background: var(--surface-3); flex: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.06); }
.avatar.sm { width: 26px; height: 26px; }
.avatar.lg { width: 64px; height: 64px; }
.avatar.xl { width: 76px; height: 76px; box-shadow: 0 0 0 3px var(--surface-hi), 0 0 0 5px rgba(139, 92, 246, 0.45); }
.initials { display: grid; place-items: center; font-size: 12.5px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #7c4ddf, #a57cff); }
.acct { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acct .who { min-width: 0; }
.acct b { display: flex; align-items: center; gap: 5px; font-weight: 600; font-size: 13.5px; }
.acct small { display: block; color: var(--text-3); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.empty { text-align: center; padding: 48px 20px; color: var(--text-2); }
.empty .ico { width: 52px; height: 52px; border-radius: 16px; margin: 0 auto 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-3); }
.empty h3 { margin: 0 0 6px; color: var(--text); font-size: 15px; font-weight: 600; }
.empty p { margin: 0 auto 16px; max-width: 420px; font-size: 13px; line-height: 1.55; }

.notice { display: flex; gap: 11px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; background: var(--accent-soft); border: 1px solid rgba(139, 92, 246, 0.25); color: #ddd0fb; }
.notice svg { margin-top: 1px; color: var(--accent-3); }
.notice.warn { background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.25); color: #fde68a; }
.notice.warn svg { color: var(--warn); }
.notice.bad { background: var(--bad-soft); border-color: rgba(251, 113, 133, 0.25); color: #fecdd3; }
.notice.bad svg { color: var(--bad); }
.notice b { color: #fff; }

.skeleton { position: relative; overflow: hidden; background: rgba(255, 255, 255, 0.04); border-radius: 8px; }
.skeleton::after { content: ''; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.05), transparent); animation: shimmer 1.4s infinite; }
@keyframes shimmer { to { transform: translateX(100%); } }
.loading-frame { opacity: 0.55; transition: opacity 0.2s; pointer-events: none; }

.kbd { font-size: 11px; padding: 1px 6px; border-radius: 5px; border: 1px solid var(--line-2); color: var(--text-3); }
hr.sep { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }

/* ------------------------------------------------------------ métricas */

.stat { padding: 16px 18px 17px; position: relative; overflow: hidden; }
.stat-label { font-size: 12.5px; color: var(--text-2); display: flex; align-items: center; gap: 8px; font-weight: 500; }
.stat-label .ico { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-3); }
.stat-value { font-size: 27px; font-weight: 700; letter-spacing: -0.03em; margin-top: 12px; line-height: 1.05; }
.stat-value small { font-size: 14px; color: var(--text-3); font-weight: 600; letter-spacing: 0; margin-left: 4px; }
.stat-foot { font-size: 12px; color: var(--text-3); margin-top: 8px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.stat .spark { position: absolute; right: 14px; bottom: 14px; width: 96px; height: 34px; opacity: 0.9; }
.stat.mini { padding: 14px 16px; }
.stat.mini .stat-value { font-size: 21px; margin-top: 8px; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 650; font-variant-numeric: tabular-nums; }
.delta.up { color: var(--good); }
.delta.down { color: var(--bad); }
.delta.flat { color: var(--text-3); }

/* ------------------------------------------------------------ tablas */

.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.table th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-weight: 600; color: var(--text-3);
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em;
  padding: 11px 12px; border-bottom: 1px solid var(--line); background: #170e29; white-space: nowrap;
}
.table th.sortable { cursor: pointer; user-select: none; }
.table th.sortable:hover { color: var(--text-2); }
.table th.sorted { color: var(--accent-3); }
.table th .th { display: inline-flex; align-items: center; gap: 4px; }
.table td { padding: 11px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover td { background: rgba(139, 92, 246, 0.045); }
.table tbody tr.sel td { background: rgba(139, 92, 246, 0.08); }
.table tbody tr.click { cursor: pointer; }
.table .r { text-align: right; font-variant-numeric: tabular-nums; }
.table th.r .th { justify-content: flex-end; }
.table .c { text-align: center; }
.table .w0 { width: 1%; white-space: nowrap; }
.table td.sub small { display: block; font-size: 11.5px; color: var(--text-3); }

.pager { display: flex; align-items: center; gap: 6px; }
.table tr.group-row td { background: rgba(139, 92, 246, 0.06); border-bottom: 1px solid var(--line); padding: 9px 12px; }
.table tbody tr.group-row:hover td { background: rgba(139, 92, 246, 0.06); }
.group-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 12.5px; }
.group-name { font-weight: 700; font-size: 14px; color: var(--text); }
a.group-name:hover { color: var(--accent-3); }
.group-stat { color: var(--text-2); white-space: nowrap; }
.group-stat b { color: var(--text); }
.form-row { display: flex; gap: 14px; align-items: flex-start; flex-wrap: wrap; }
.form-row > .field { flex: 1; min-width: 200px; }
.form-row > .field:last-child:not(:first-child) { flex: 0 0 auto; }
.acct small .badge { height: 17px; font-size: 10px; padding: 0 6px; }
.pager .of { font-size: 12.5px; color: var(--text-3); padding: 0 6px; }

/* ------------------------------------------------------------ menús y modales */

.menu-anchor { position: relative; display: inline-flex; }
.menu {
  position: absolute; z-index: 60; top: calc(100% + 6px); right: 0; min-width: 210px;
  background: #1c1233; border: 1px solid var(--line-2); border-radius: 12px; padding: 5px;
  box-shadow: 0 18px 40px rgba(3, 0, 10, 0.55); animation: pop 0.12s ease-out;
}
.menu.left { right: auto; left: 0; }
.menu.up { top: auto; bottom: calc(100% + 6px); }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 10px; height: 34px; padding: 0 10px; border-radius: 8px; font-size: 13px; color: var(--text); text-align: left; }
.menu button:hover, .menu a:hover { background: rgba(139, 92, 246, 0.14); }
.menu button svg, .menu a svg { color: var(--text-3); }
.menu button.danger { color: #fda4af; }
.menu button.danger svg { color: #fda4af; }
.menu .sep { height: 1px; background: var(--line); margin: 5px 4px; }
.menu .menu-label { font-size: 11px; color: var(--text-3); padding: 6px 10px 4px; text-transform: uppercase; letter-spacing: 0.08em; font-weight: 600; }
.menu .scroll { max-height: 260px; overflow: auto; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(0.98); } }

.modal-back { position: fixed; inset: 0; background: rgba(6, 2, 14, 0.72); backdrop-filter: blur(3px); z-index: 80; display: grid; place-items: center; padding: 20px; animation: fade 0.12s; }
.modal { width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; background: linear-gradient(180deg, #1d1236, #170e29); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: pop 0.14s ease-out; }
.modal.wide { max-width: 720px; }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 17px; font-weight: 650; letter-spacing: -0.015em; }
.modal-head p { margin: 4px 0 0; color: var(--text-2); font-size: 13px; }
.modal-body { padding: 18px 22px; display: flex; flex-direction: column; gap: 16px; }
.modal-foot { padding: 14px 22px 20px; display: flex; justify-content: flex-end; gap: 8px; align-items: center; }
@keyframes fade { from { opacity: 0; } }

.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 260px; max-width: 420px; padding: 12px 14px; border-radius: 12px; background: #221640; border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); font-size: 13px; animation: pop 0.15s ease-out; }
.toast svg { color: var(--accent-3); }
.toast.good svg { color: var(--good); }
.toast.bad svg { color: var(--bad); }

.progress { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent-3)); transition: width 0.3s; }

/* ------------------------------------------------------------ gráficos */

.chart { position: relative; width: 100%; user-select: none; }
.chart svg { display: block; overflow: visible; }
.chart .axis text { fill: var(--text-3); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart .gridline { stroke: var(--grid); stroke-width: 1; }
.chart .baseline { stroke: rgba(127, 113, 161, 0.35); stroke-width: 1; }
.chart .crosshair { stroke: rgba(201, 169, 255, 0.45); stroke-width: 1; }
.chart .bar { transition: opacity 0.12s; }
.chart .bar.dim { opacity: 0.45; }
.chart-empty { display: grid; place-items: center; color: var(--text-3); font-size: 12.5px; border: 1px dashed var(--line-2); border-radius: 10px; }
.tip {
  position: absolute; z-index: 5; pointer-events: none;
  min-width: 140px; padding: 9px 11px; border-radius: 10px;
  background: rgba(24, 14, 44, 0.97); border: 1px solid var(--line-2);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45); font-size: 12px;
  transform: translate(-50%, calc(-100% - 12px)); white-space: nowrap;
}
.tip .t-title { color: var(--text-3); font-size: 11.5px; margin-bottom: 5px; }
.tip .t-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.tip .t-key { width: 12px; height: 2px; border-radius: 2px; background: var(--k, var(--series-1)); }
.tip .t-val { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.tip .t-name { color: var(--text-2); }
.chart-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.chart-legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); }

.heat { display: grid; gap: 3px; align-items: center; font-size: 12px; }
.heat .h-label { display: flex; align-items: center; gap: 8px; min-width: 0; padding-right: 10px; }
.heat .h-label a { font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.heat .h-label a:hover { color: var(--accent-3); }
.heat .cell { height: 26px; border-radius: 5px; background: var(--heat-0); display: grid; place-items: center; font-size: 11px; font-weight: 650; color: rgba(255, 255, 255, 0.85); font-variant-numeric: tabular-nums; cursor: default; transition: transform 0.08s, box-shadow 0.08s; }
.heat .cell:hover { box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--accent-3); }
.cell.l1 { background: var(--heat-1); }
.cell.l2 { background: var(--heat-2); }
.cell.l3 { background: var(--heat-3); }
.cell.l4 { background: var(--heat-4); color: #1a1030; }
.cell.l5 { background: var(--heat-5); color: #1a1030; }
.heat .cell.today { box-shadow: inset 0 0 0 1px rgba(201, 169, 255, 0.35); }
.cell.marked { position: relative; }
.cell.marked::after { content: ''; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; background: var(--good); box-shadow: 0 0 0 1.5px var(--surface); }
.heat .h-day { text-align: center; color: var(--text-3); font-size: 10.5px; font-variant-numeric: tabular-nums; }
.heat .h-day.today { color: var(--accent-3); font-weight: 650; }
.heat .h-total { text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); padding-left: 10px; }
.heat-legend { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.heat-legend .cell { width: 16px; height: 16px; border-radius: 4px; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 700; color: rgba(255, 255, 255, 0.85); }
.heat .cell.nd { background: var(--heat-0); color: var(--text-2); }
.heat .cell.tippable { cursor: pointer; }
.cell.hot { position: relative; }
.cell.hot::before { content: ''; position: absolute; top: 3px; left: 3px; width: 6px; height: 6px; border-radius: 50%; background: #fbbf24; box-shadow: 0 0 0 1.5px var(--surface), 0 0 6px rgba(251, 191, 36, 0.8); }
.heat-legend .cell.hot::before { top: 5px; left: 5px; }

.spoofer-hero { display: flex; gap: 22px; align-items: center; padding: 24px; margin-bottom: 16px; flex-wrap: wrap;
  background: radial-gradient(420px 200px at 0% 0%, rgba(139, 92, 246, 0.2), transparent 70%), linear-gradient(180deg, var(--surface-hi), var(--surface)); }
.spoofer-hero img { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 12px 34px rgba(139, 92, 246, 0.35); }
.spoofer-info { flex: 1 1 320px; min-width: 0; }
.spoofer-info h2 { margin: 0; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; display: flex; align-items: center; gap: 10px; }
.spoofer-info p { margin: 6px 0 0; color: var(--text-2); font-size: 13.5px; }
.spoofer-steps { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-2); }
.spoofer-steps b { color: var(--text); }

.cal-card { margin: 16px 0; }
/* La columna de nombres queda fija cuando el calendario se desplaza de costado. */
.cal-card .heat .h-label, .cal-card .heat > div:first-child { position: sticky; left: 0; z-index: 2; background: #1a1030; align-self: stretch; }
.cal-card .heat .h-label::after { content: ''; position: absolute; top: 0; bottom: 0; right: -8px; width: 8px; background: linear-gradient(90deg, #1a1030, transparent); }
.cal-head { align-items: center; flex-wrap: wrap; gap: 10px 16px; }
.cal-head h3 { display: flex; align-items: center; gap: 8px; margin-right: auto; }
.cal-head h3 svg { color: var(--accent-3); }

.heat-tip { position: fixed; z-index: 95; width: 280px; max-height: 380px; overflow-y: auto; padding: 11px 12px; border-radius: 12px;
  background: rgba(22, 13, 41, 0.98); border: 1px solid var(--line-2); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.55); font-size: 12.5px; }
.heat-tip .tip-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.heat-tip .tip-head span { color: var(--text-3); font-size: 11.5px; }
.heat-tip .tip-gain { padding: 8px 10px; border-radius: 9px; background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.2); margin-bottom: 8px; }
.heat-tip .tip-gain span { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); font-weight: 600; margin-bottom: 3px; }
.heat-tip .tip-gain.faint { background: none; border-style: dashed; font-size: 12px; }
.heat-tip .tip-line { color: var(--text-2); }
.heat-tip .tip-reels { display: flex; flex-direction: column; gap: 6px; }
.heat-tip .tip-reel { display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: center; padding: 5px; border-radius: 9px; }
.heat-tip .tip-reel:hover { background: rgba(255, 255, 255, 0.04); }
.heat-tip .tip-reel img { width: 38px; height: 66px; object-fit: cover; border-radius: 6px; background: var(--heat-0); }
.heat-tip .tip-reel div { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 12px; color: var(--text-2); }
.heat-tip .tip-reel b { color: var(--text); font-size: 13.5px; }
.heat-tip .tip-reel b span { font-weight: 500; font-size: 11.5px; color: var(--text-3); }
.hot-txt { color: #fbbf24; font-weight: 650; }

/* ------------------------------------------------------------ reels */

.filters { display: flex; flex-direction: column; gap: 14px; }
.filter-row { display: flex; gap: 22px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.filter-group > .label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-3); font-weight: 600; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { height: 30px; padding: 0 12px; border-radius: 99px; background: var(--field); border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; font-weight: 550; display: inline-flex; align-items: center; gap: 6px; transition: 0.12s; }
.chip:hover { color: var(--text); border-color: #4b3478; }
.chip.on { background: rgba(139, 92, 246, 0.2); border-color: rgba(165, 124, 255, 0.55); color: #ece4ff; }
.chip svg { color: currentColor; opacity: 0.8; }

.selbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(26, 16, 48, 0.7); flex-wrap: wrap; position: sticky; top: 10px; z-index: 20; backdrop-filter: blur(8px); }
.selbar.active { border-color: rgba(165, 124, 255, 0.45); background: rgba(46, 28, 84, 0.85); }
.selbar .count { font-size: 13px; font-weight: 600; }

.reel-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(262px, 1fr)); gap: 16px; }
.reel { display: flex; flex-direction: column; background: linear-gradient(180deg, var(--surface-hi), var(--surface)); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; transition: border-color 0.15s, box-shadow 0.15s; }
.reel:hover { border-color: #43306c; }
.reel.sel { border-color: var(--accent-2); box-shadow: 0 0 0 1px var(--accent-2), 0 12px 30px rgba(139, 92, 246, 0.18); }
.reel-head { display: flex; align-items: center; gap: 9px; padding: 11px 12px; }
.reel-head .acct { flex: 1; }
.reel-head .acct b { font-size: 13px; }
.reel-head .tools { display: flex; gap: 2px; }
.reel-media { position: relative; aspect-ratio: 9 / 16; background: #0e0819; margin: 0 10px; border-radius: 12px; overflow: hidden; }
.reel-media img, .reel-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reel-media video { object-fit: contain; background: #000; }
.reel-media .play { position: absolute; inset: 0; display: grid; place-items: center; background: linear-gradient(180deg, rgba(0, 0, 0, 0.1), transparent 30%, transparent 60%, rgba(0, 0, 0, 0.55)); opacity: 1; transition: background 0.15s; }
.reel-media .play span { width: 54px; height: 54px; border-radius: 50%; display: grid; place-items: center; background: rgba(12, 6, 22, 0.55); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.18); transition: transform 0.15s, background 0.15s; }
.reel-media .play:hover span { transform: scale(1.06); background: rgba(139, 92, 246, 0.7); }
.reel-media .ov { position: absolute; display: flex; gap: 6px; }
.reel-media .ov.tl { top: 10px; left: 10px; }
.reel-media .ov.tr { top: 10px; right: 10px; }
.reel-media .ov.bl { bottom: 10px; left: 10px; right: 10px; flex-wrap: wrap; }
.pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 8px; border-radius: 8px; font-size: 11.5px; font-weight: 650; background: rgba(12, 6, 22, 0.66); backdrop-filter: blur(6px); color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); font-variant-numeric: tabular-nums; }
.pill.hot { background: linear-gradient(135deg, rgba(139, 92, 246, 0.92), rgba(176, 124, 255, 0.92)); border-color: transparent; }
.pill.fire { background: linear-gradient(135deg, rgba(232, 88, 126, 0.95), rgba(251, 146, 60, 0.95)); border-color: transparent; }
.pill.done { background: rgba(22, 101, 52, 0.75); border-color: rgba(74, 222, 128, 0.4); }
.reel-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 10px 10px 0; }
.rs { padding: 9px 10px; border-radius: 10px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(58, 40, 96, 0.5); min-width: 0; }
.rs .k { display: flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-3); font-weight: 550; }
.rs .v { font-size: 16px; font-weight: 700; letter-spacing: -0.02em; margin-top: 3px; font-variant-numeric: tabular-nums; }
.rs .s { font-size: 11px; color: var(--text-3); margin-top: 1px; }
.rs.lead { grid-column: span 2; display: flex; align-items: center; justify-content: space-between; background: linear-gradient(135deg, rgba(139, 92, 246, 0.16), rgba(139, 92, 246, 0.04)); border-color: rgba(139, 92, 246, 0.28); }
.rs.lead .v { font-size: 20px; }
.reel-meta { display: flex; justify-content: space-between; gap: 8px; padding: 10px 12px 0; font-size: 11.5px; color: var(--text-3); }
.reel-caption { margin: 8px 12px 0; font-size: 12.5px; color: var(--text-2); line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 37px; word-break: break-word; }
.reel-caption.open { -webkit-line-clamp: unset; }
.reel-tags { padding: 10px 12px 0; }
.reel-foot { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 8px; padding: 12px; margin-top: auto; }

.thumb { width: 38px; height: 66px; border-radius: 7px; object-fit: cover; background: var(--surface-3); display: block; }

/* ------------------------------------------------------------ detalle */

.profile-head { display: flex; align-items: center; gap: 18px; padding: 22px; flex-wrap: wrap; }
.profile-head h1 { margin: 0; font-size: 24px; font-weight: 700; letter-spacing: -0.025em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-head p { margin: 5px 0 0; color: var(--text-2); font-size: 13px; max-width: 640px; }
.profile-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.creator-photo { object-fit: cover; flex: none; display: block; background: var(--surface-3); box-shadow: 0 0 0 1px color-mix(in srgb, var(--c, #8b5cf6) 45%, transparent); }
.creator-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; background: color-mix(in srgb, var(--c, #8b5cf6) 22%, transparent); color: var(--c, #c9a9ff); border: 1px solid color-mix(in srgb, var(--c, #8b5cf6) 40%, transparent); font-size: 24px; font-weight: 700; }
.note-box { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; padding: 9px 12px; border-radius: 10px; background: rgba(255, 255, 255, 0.03); border: 1px dashed var(--line-2); font-size: 12.5px; color: var(--text-2); white-space: pre-wrap; max-width: 640px; }
.note-box svg { color: var(--text-3); margin-top: 2px; flex: none; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 6px 0 20px; }
.tabs button { position: relative; height: 40px; padding: 0 14px; color: var(--text-2); font-weight: 550; font-size: 13.5px; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: #fff; }
.tabs button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: var(--accent-2); }
.tabs .n { margin-left: 6px; font-size: 11.5px; color: var(--text-3); }

.creator-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
.creator-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; cursor: pointer; transition: border-color 0.15s, transform 0.15s; }
.creator-card:hover { border-color: #4b3478; transform: translateY(-1px); }
.creator-card .top { display: flex; align-items: center; gap: 12px; }
.creator-card .creator-ico { width: 44px; height: 44px; border-radius: 13px; font-size: 17px; }
.creator-card h3 { margin: 0; font-size: 15.5px; font-weight: 650; }
.creator-card .kv { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.kv .k { font-size: 11px; color: var(--text-3); }
.kv .v { font-size: 15px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }

.list { display: flex; flex-direction: column; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line-soft); }
.list-item:last-child { border-bottom: 0; }
.list-item .grow { flex: 1; min-width: 0; }
.alert-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; flex: none; }
.alert-ico.warn { background: var(--warn-soft); color: var(--warn); }
.alert-ico.bad { background: var(--bad-soft); color: var(--bad); }
.alert-ico.good { background: var(--good-soft); color: var(--good); }

.top-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.top-reel { position: relative; border-radius: 12px; overflow: hidden; aspect-ratio: 9 / 14; background: var(--surface-3); border: 1px solid var(--line); display: block; }
.top-reel img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.25s; }
.top-reel:hover img { transform: scale(1.03); }
.top-reel .shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, 0.35), transparent 30%, transparent 50%, rgba(8, 3, 18, 0.92)); }
.top-reel .info { position: absolute; left: 10px; right: 10px; bottom: 9px; }
.top-reel .info b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.top-reel .info small { display: block; font-size: 11.5px; color: rgba(255, 255, 255, 0.72); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.top-reel .pill { position: absolute; top: 8px; left: 8px; }
.top-reel .dl { position: absolute; top: 8px; right: 8px; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: rgba(12, 6, 22, 0.6); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.14); color: #fff; opacity: 0; transition: opacity 0.15s; }
.top-reel:hover .dl, .top-reel .dl:focus-visible { opacity: 1; }

/* ------------------------------------------------------------ login */

.auth-simple { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden;
  background: radial-gradient(640px 420px at 50% 20%, rgba(139, 92, 246, 0.22), transparent 70%), var(--bg); }
.auth-star { position: absolute; width: 720px; height: 720px; left: 50%; top: 50%; transform: translate(-50%, -54%); opacity: 0.05; pointer-events: none; }
.auth-card { position: relative; width: 100%; max-width: 380px; padding: 30px 28px 28px; border-radius: 18px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(29, 18, 54, 0.92), rgba(22, 14, 39, 0.92)); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.45); backdrop-filter: blur(8px); }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 22px; }
.auth-brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 6px 20px rgba(139, 92, 246, 0.4); }
.auth-brand b { font-size: 18px; font-weight: 700; letter-spacing: -0.02em; }
.auth-brand b span { background: linear-gradient(135deg, #c9a9ff, #8b5cf6); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-card h1 { margin: 0 0 18px; font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.auth-card form { display: flex; flex-direction: column; gap: 14px; }
.auth-card .btn { height: 42px; margin-top: 4px; }

.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.auth-art { position: relative; overflow: hidden; padding: 44px 52px; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line);
  background: radial-gradient(700px 520px at 30% 30%, rgba(139, 92, 246, 0.35), transparent 65%), radial-gradient(600px 500px at 90% 90%, rgba(201, 169, 255, 0.12), transparent 60%), #0e0719; }
.auth-art .glow-star { position: absolute; right: -60px; top: 50%; width: 460px; height: 460px; transform: translateY(-50%); opacity: 0.16; }
.auth-art h2 { font-size: 36px; line-height: 1.12; letter-spacing: -0.035em; margin: 0 0 14px; font-weight: 700; max-width: 460px; }
.auth-art h2 span { background: linear-gradient(135deg, #e9dcff, #a57cff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-art p { color: var(--text-2); max-width: 420px; line-height: 1.6; margin: 0; }
.auth-points { display: grid; gap: 12px; margin-top: 28px; max-width: 440px; }
.auth-points div { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: var(--text-2); }
.auth-points svg { color: var(--accent-3); margin-top: 2px; }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-box { width: 100%; max-width: 380px; }
.auth-box h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -0.025em; }
.auth-box > p { margin: 0 0 24px; color: var(--text-2); font-size: 13.5px; }
.auth-box form { display: flex; flex-direction: column; gap: 14px; }
.auth-box .btn { height: 42px; margin-top: 6px; }
.auth-mobile-brand { display: none; }
@media (max-width: 900px) {
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-art { display: none; }
  .auth-mobile-brand { display: flex; padding: 0 0 28px; }
}

/* ------------------------------------------------------------ panel (centro) */

.creator-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.ctab { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 12px 0 6px; border-radius: 99px; border: 1px solid var(--line-2); background: var(--field); color: var(--text-2); font-size: 13px; font-weight: 600; transition: 0.12s; }
.ctab:first-child { padding-left: 14px; }
.ctab:hover { color: var(--text); border-color: #4b3478; }
.ctab.on { background: rgba(139, 92, 246, 0.18); border-color: rgba(165, 124, 255, 0.55); color: #fff; }
.ctab .n { font-size: 11px; color: var(--text-3); font-weight: 600; }

.alert-strip { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 18px; }
.alert-pill { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border-radius: 99px; font-size: 12.5px; font-weight: 600; border: 1px solid; max-width: 100%; }
.alert-pill.bad { background: var(--bad-soft); border-color: rgba(251, 113, 133, 0.3); color: #fecdd3; }
.alert-pill.warn { background: var(--warn-soft); border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.alert-pill.good { background: var(--good-soft); border-color: rgba(74, 222, 128, 0.3); color: #bbf7d0; }
.alert-pill:hover { filter: brightness(1.15); }

.creator-section { margin-bottom: 22px; }
.creator-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.creator-section-head h2 { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -0.015em; }
.creator-section-head .faint { font-size: 12px; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.acc-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 14px; border: 1px solid var(--line); background: linear-gradient(180deg, var(--surface-hi), var(--surface)); transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; min-width: 0; }
.acc-card:hover { border-color: rgba(165, 124, 255, 0.55); transform: translateY(-1px); box-shadow: 0 10px 26px rgba(3, 0, 10, 0.35); }
.acc-top { display: flex; align-items: center; gap: 10px; min-width: 0; }
.acc-top .who { min-width: 0; flex: 1; }
.acc-top b { display: block; font-size: 13.5px; font-weight: 650; }
.acc-top .who > span { display: flex; gap: 5px; margin-top: 3px; }
.acc-top .badge { height: 18px; font-size: 10.5px; padding: 0 7px; }
.acc-main { display: flex; align-items: baseline; gap: 8px; }
.acc-main b { font-size: 22px; font-weight: 700; letter-spacing: -0.03em; }
.acc-main span { font-size: 12.5px; font-weight: 650; }
.acc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.acc-stats > div { padding: 7px 8px; border-radius: 9px; background: rgba(255, 255, 255, 0.025); border: 1px solid rgba(58, 40, 96, 0.45); min-width: 0; }
.acc-stats span { display: block; font-size: 10.5px; color: var(--text-3); font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; }
.acc-stats b { display: block; font-size: 15px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.acc-stats small { font-size: 11px; font-weight: 600; color: var(--text-3); }
.acc-stats em { display: block; font-style: normal; font-size: 10.5px; color: var(--text-3); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acc-stats em.good { color: var(--good); }
.acc-redir { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11.5px; color: var(--text-3); padding: 7px 9px; border-radius: 9px; background: rgba(52, 211, 153, 0.05); border: 1px solid rgba(52, 211, 153, 0.14); }
.acc-redir svg { color: var(--good); }
.acc-redir span { margin-left: auto; white-space: nowrap; }
.acc-redir b { color: var(--text); font-weight: 700; }
.acc-flags { display: flex; gap: 5px; flex-wrap: wrap; }
.acc-flags .badge { height: 20px; font-size: 10.5px; }
.acc-pending { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 12.5px; padding: 12px 0; }

/* ------------------------------------------------------------ historias */

.story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.story { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.story-media { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: var(--surface-3); border: 1px solid var(--line); }
.story.linked .story-media { border-color: rgba(74, 222, 128, 0.55); box-shadow: 0 0 0 1px rgba(74, 222, 128, 0.25); }
.story-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.story-top { position: absolute; top: 7px; left: 7px; right: 7px; display: flex; justify-content: space-between; gap: 5px; }
.story-top .pill { height: 22px; font-size: 10.5px; padding: 0 7px; max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.story-top .pill.link { background: rgba(22, 101, 52, 0.85); border-color: rgba(74, 222, 128, 0.5); }
.story-top .pill.muted { color: rgba(255, 255, 255, 0.7); }
.story-dl { position: absolute; bottom: 8px; right: 8px; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: rgba(12, 6, 22, 0.65); backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, 0.15); color: #fff; opacity: 0; transition: opacity 0.15s; }
.story:hover .story-dl, .story-dl:focus-visible { opacity: 1; }
.story-foot { display: flex; flex-direction: column; min-width: 0; padding: 0 2px; }
.story-foot b { font-size: 12.5px; font-weight: 600; }
.story-foot span { font-size: 11.5px; color: var(--text-3); }
.story-summary { display: flex; gap: 14px; font-size: 13px; color: var(--text-2); flex-wrap: wrap; }
.story-summary b { color: var(--text); }
@media (hover: none) { .story-dl { opacity: 1; } }

/* ------------------------------------------------------------ selector de creadoras */

.picker { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px; max-height: 320px; overflow: auto; padding: 2px; }
.pick { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-2); background: var(--field); text-align: left; transition: border-color 0.12s, background 0.12s; }
.pick:hover { border-color: #4b3478; }
.pick.on { border-color: rgba(165, 124, 255, 0.6); background: rgba(139, 92, 246, 0.14); }
.pick .creator-ico { width: 30px; height: 30px; border-radius: 9px; font-size: 12.5px; flex: none; }
.pick-name { flex: 1; min-width: 0; }
.pick-name b { display: block; font-size: 13px; font-weight: 600; }
.pick-name small { display: block; font-size: 11.5px; color: var(--text-3); }
.pick-check { width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #52407a; display: grid; place-items: center; flex: none; }
.pick.on .pick-check { background: var(--accent); border-color: var(--accent); color: #fff; }

/* ------------------------------------------------------------ bienvenida */

.page-loading { min-height: 60vh; display: grid; place-content: center; justify-items: center; gap: 14px; color: var(--text-3); font-size: 13px; }
.page-loading img { width: 44px; height: 44px; border-radius: 13px; animation: breathe 1.6s ease-in-out infinite; box-shadow: 0 10px 34px rgba(139, 92, 246, 0.4); }

.welcome { max-width: 760px; margin: 5vh auto 0; padding: 40px 40px 34px; text-align: center; position: relative; overflow: hidden;
  background: radial-gradient(520px 240px at 50% -10%, rgba(139, 92, 246, 0.22), transparent 70%), linear-gradient(180deg, var(--surface-hi), var(--surface)); }
.welcome-logo { width: 64px; height: 64px; border-radius: 18px; box-shadow: 0 14px 40px rgba(139, 92, 246, 0.45); }
.welcome-logo.spinning { animation: breathe 1.6s ease-in-out infinite; }
.welcome h1 { margin: 18px 0 8px; font-size: 26px; font-weight: 700; letter-spacing: -0.03em; }
.welcome > p { margin: 0 auto 26px; max-width: 520px; color: var(--text-2); font-size: 14px; line-height: 1.6; }
.steps { display: flex; flex-direction: column; gap: 10px; text-align: left; }
.step { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--line); background: rgba(12, 6, 22, 0.35); transition: border-color 0.15s, background 0.15s; }
.step.current { border-color: rgba(165, 124, 255, 0.55); background: rgba(139, 92, 246, 0.1); }
.step.done { opacity: 0.75; }
.step-n { width: 32px; height: 32px; border-radius: 50%; flex: none; display: grid; place-items: center; font-weight: 700; font-size: 13.5px; background: var(--surface-3); color: var(--text-2); }
.step.current .step-n { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; box-shadow: 0 6px 16px rgba(139, 92, 246, 0.35); }
.step.done .step-n { background: var(--good-soft); color: var(--good); }
.step-body { flex: 1; min-width: 0; }
.step-body b { display: block; font-size: 14.5px; font-weight: 650; }
.step-body span { display: block; font-size: 12.5px; color: var(--text-2); margin-top: 3px; line-height: 1.5; }
.step-body small { display: block; font-size: 11.5px; color: var(--warn); margin-top: 4px; }
.step-action { flex: none; }
.welcome-progress { display: flex; align-items: center; gap: 12px; max-width: 420px; margin: 0 auto; }
.welcome-progress .progress { flex: 1; }
.welcome-progress span { font-size: 12.5px; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 64px; text-align: right; }
@media (max-width: 640px) {
  .welcome { padding: 28px 18px; }
  .step { flex-wrap: wrap; }
  .step-action { width: 100%; padding-left: 46px; }
}

.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 54px; height: 54px; border-radius: 16px; animation: breathe 1.6s ease-in-out infinite; box-shadow: 0 10px 40px rgba(139, 92, 246, 0.45); }
@keyframes breathe { 50% { transform: scale(0.94); opacity: 0.7; } }
