/* ============================================================
   FEROCIA PLAYER PORTAL — base
   Hito 2 (14 de octubre) — decisiones §42–§45

   Lo común a todas las pantallas: letra, colores del portal,
   botones, campos, mensajes y la cabecera de la app.
   Los colores de la marca vienen de design-tokens.css (el mismo
   archivo que usan el sitio y el panel).
   ============================================================ */

:root {
  --pj-night:      #080f2e;   /* cabeceras y paneles oscuros */
  --pj-navy:       #0d1f4a;   /* títulos y tarjetas oscuras */
  --pj-ink:        #111827;
  --pj-muted:      #6B7280;
  --pj-soft:       #4B5563;
  --pj-line:       #E5E7EB;
  --pj-field:      #D1D5DB;
  --pj-bg:         #F8FAFC;
  --pj-lime:       #C6F221;
  --pj-blue:       #174CCC;
  --pj-blue-dk:    #0F3FB0;
  --pj-green-bg:   #D4F5ED;
  --pj-green-tx:   #0B6B53;
  --pj-red:        #B42318;
  --pj-red-bg:     #FEF3F2;
  --pj-radius:     12px;
  --pj-radius-lg:  20px;
  --pj-shadow-lg:  0 24px 60px rgba(8, 15, 46, 0.12);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--pj-ink);
  background: var(--pj-bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--pj-blue); }
a:hover { color: var(--pj-blue-dk); }
img { max-width: 100%; }
[hidden] { display: none !important; }

/* Sólo para lectores de pantalla. */
.pj-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Pantallas: sólo se ve la activa (pj-app.js) ── */
.pj-screen { display: none; min-height: 100vh; }
.pj-screen.is-active { display: block; }
.pj-screen.pj-split.is-active { display: flex; }

/* ── Botones ── */
.pj-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 28px;
  border: none; border-radius: 999px;
  font: 800 14px 'Inter', sans-serif; letter-spacing: 1px; text-transform: uppercase;
  text-decoration: none; cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s, opacity .15s;
}
.pj-btn:focus-visible { outline: 3px solid rgba(23, 76, 204, 0.35); outline-offset: 2px; }
.pj-btn[disabled] { opacity: .55; cursor: not-allowed; }
.pj-btn-primary { background: var(--pj-blue); color: #fff; box-shadow: 0 10px 24px rgba(23, 76, 204, 0.25); }
.pj-btn-primary:hover:not([disabled]) { background: var(--pj-blue-dk); color: #fff; }
.pj-btn-outline { background: #fff; color: var(--pj-blue); border: 1.5px solid var(--pj-blue); }
.pj-btn-outline:hover:not([disabled]) { background: rgba(23, 76, 204, 0.05); }
.pj-btn-quiet { background: #fff; color: var(--pj-ink); border: 1.5px solid var(--pj-field); }
.pj-btn-quiet:hover:not([disabled]) { border-color: #9CA3AF; }
.pj-btn-block { width: 100%; }
.pj-btn-sm { min-height: 44px; padding: 0 20px; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 700; }
.pj-btn svg { flex-shrink: 0; }

/* Botón con texto: un enlace que parece texto. */
.pj-link-btn {
  background: none; border: none; padding: 6px 0; min-height: 32px;
  font: 800 13px 'Inter', sans-serif; color: var(--pj-blue); cursor: pointer;
}
.pj-link-btn[disabled] { color: var(--pj-muted); cursor: default; font-weight: 700; }

/* ── Campos ── */
.pj-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pj-label {
  font-size: 11px; font-weight: 700; letter-spacing: .6px; text-transform: uppercase; color: var(--pj-muted);
}
.pj-input {
  height: 52px; width: 100%; min-width: 0;
  border: 1px solid var(--pj-field); border-radius: var(--pj-radius);
  padding: 0 16px; background: #fff;
  font: 600 16px 'Inter', sans-serif; color: var(--pj-ink);
}
.pj-input::placeholder { color: #9CA3AF; }
.pj-input:focus { outline: none; border-color: var(--pj-blue); box-shadow: 0 0 0 4px rgba(23, 76, 204, 0.12); }
.pj-input[aria-invalid="true"] { border-color: var(--pj-red); }
.pj-field-error { font-size: 12.5px; font-weight: 600; color: var(--pj-red); }
.pj-check { display: flex; gap: 12px; align-items: flex-start; font-size: 14px; line-height: 1.5; font-weight: 500; color: #374151; cursor: pointer; }
.pj-check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--pj-blue); flex-shrink: 0; }

/* ── Mensajes dentro de un formulario ── */
.pj-alert {
  padding: 12px 14px; border-radius: var(--pj-radius);
  font-size: 13.5px; line-height: 1.5; font-weight: 600;
}
.pj-alert-error { background: var(--pj-red-bg); color: var(--pj-red); border: 1px solid #FECDCA; }
.pj-alert-info { background: rgba(23, 76, 204, 0.06); color: #1E3A8A; border: 1px solid rgba(23, 76, 204, 0.15); }

/* ── Cabecera de la app (cuando ya ha entrado) ── */
.pj-topbar { background: var(--pj-night); border-bottom: 3px solid var(--pj-lime); }
.pj-topbar-in {
  max-width: 1200px; margin: 0 auto; padding: 0 24px; min-height: 76px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 36px;
}
.pj-logo { width: 132px; height: auto; display: block; }
.pj-nav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.pj-nav a {
  padding: 10px 16px; border-radius: 999px;
  color: rgba(255, 255, 255, .75); font-size: 14px; font-weight: 700; text-decoration: none;
}
.pj-nav a:hover { color: #fff; }
.pj-nav a[aria-current="page"] { background: rgba(198, 242, 33, .14); color: var(--pj-lime); font-weight: 800; }
.pj-me { display: flex; align-items: center; gap: 10px; color: #fff; font-size: 14px; font-weight: 700; }
.pj-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--pj-lime); color: var(--pj-night);
  display: flex; align-items: center; justify-content: center; font-size: 14px; font-weight: 900;
}

.pj-page { max-width: 820px; margin: 0 auto; padding: 40px 24px 64px; display: flex; flex-direction: column; gap: 20px; }
.pj-eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 2px; text-transform: uppercase; color: var(--pj-blue); }
.pj-h1 { margin: 0; font-size: 34px; font-weight: 900; letter-spacing: -.8px; color: var(--pj-navy); }

/* ── Aviso flotante ── */
.pj-toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  max-width: min(520px, calc(100vw - 32px));
  padding: 14px 18px; border-radius: var(--pj-radius);
  background: var(--pj-night); color: #fff; font-size: 14px; font-weight: 600; line-height: 1.45;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25); z-index: 50;
  transition: opacity .2s ease;
}
/* Siempre en la página (para que se lea en voz alta), invisible si no hay aviso. */
.pj-toast:not(.is-visible) { opacity: 0; pointer-events: none; box-shadow: none; padding: 0; }
.pj-toast.is-error { background: var(--pj-red); }

/* Los títulos reciben el foco al cambiar de pantalla (para el lector de
   pantalla). No se pueden pulsar, así que no llevan anillo. */
[data-focus-title]:focus { outline: none; }

/* ── Cargando ── */
.pj-loading { min-height: 100vh; align-items: center; justify-content: center; background: var(--pj-night); }
.pj-screen.pj-loading.is-active { display: flex; }
.pj-loading img { width: 150px; opacity: .9; }

@media (max-width: 600px) {
  .pj-topbar-in { padding: 0 16px; min-height: 64px; }
  .pj-me-name { display: none; }
  .pj-page { padding: 28px 16px 48px; }
  .pj-h1 { font-size: 28px; }
}

.pj-link-strong { font-weight: 800; text-decoration: none; }

/* ── Tarjetas en fila (ajustes de la cuenta) ── */
.pj-row-card {
  background: #fff; border: 1px solid var(--pj-line); border-radius: 18px; padding: 24px 26px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
}
.pj-row-ico { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.pj-row-ico-blue { background: rgba(23, 76, 204, .08); color: var(--pj-blue); }
.pj-row-ico-green { background: var(--pj-green-bg); color: var(--pj-green-tx); }
.pj-row-txt { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pj-row-label { margin: 0; font-size: 11px; font-weight: 800; letter-spacing: 1.2px; text-transform: uppercase; color: var(--pj-muted); }
.pj-row-value { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 17px; font-weight: 800; overflow-wrap: anywhere; }
.pj-row-help { font-size: 13px; font-weight: 500; color: var(--pj-muted); }
.pj-pill-ok { padding: 3px 8px; border-radius: 99px; background: var(--pj-green-bg); color: var(--pj-green-tx); font-size: 11px; font-weight: 800; }
