/* Panel del afiliado — identidad v1 (22-nov-2026). Tema claro: negro, blanco y grises zinc; el verde, solo para dinero y estados positivos. */
:root {
  --bg: #FFFFFF; --bg-alt: #FAFAFA; --surface: #FFFFFF; --surface-raised: #F4F4F5; --border: #E4E4E7; --border-strong: #D4D4D8;
  --ink: #09090B; --ink-muted: #52525B; --ink-subtle: #71717A; --action: #10B981; --action-hover: #059669; --on-action: #09090B;
  --action-text: #047857; --action-soft: #ECFDF5; --action-soft-border: #A7F3D0; --focus-ring: rgba(16, 185, 129, 0.45);
  --notify: #DC2626; --danger-soft: #FEF2F2; --danger-border: #FECACA; --radius-md: 10px; --radius-lg: 16px;
  --shadow: 0 1px 2px rgba(9, 9, 11, 0.04), 0 4px 16px rgba(9, 9, 11, 0.04);
  --font-display: 'Plus Jakarta Sans', Inter, system-ui, sans-serif; --font-body: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif;
}
@font-face { font-family: 'Inter'; src: url('fuentes/Inter-400.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fuentes/Inter-500.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('fuentes/Inter-600.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Plus Jakarta Sans'; src: url('fuentes/PlusJakartaSans-700.woff2') format('woff2'); font-weight: 700; font-display: swap; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); background: var(--bg-alt); color: var(--ink); font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--font-display); letter-spacing: -0.02em; line-height: 1.2; }
h1 { font-size: 28px; } h2 { font-size: 18px; margin-bottom: 12px; } h3 { font-size: 15px; margin-bottom: 6px; }
a { color: var(--ink); text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; box-shadow: 0 0 0 5px var(--focus-ring); border-radius: 4px; }
.cargando { padding: 60px 20px; text-align: center; color: var(--ink-muted); }
.oculto { display: none !important; }

.barra { background: var(--bg); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 10; }
.barra-in { max-width: 1040px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.barra img { height: 26px; width: auto; display: block; }
.etiqueta { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-muted); border: 1px solid var(--border-strong); border-radius: 999px; padding: 2px 9px; }
.hueco { flex: 1; }
.idiomas { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 999px; overflow: hidden; }
.idiomas button { border: 0; background: transparent; padding: 5px 11px; font: inherit; font-size: 12px; font-weight: 600; color: var(--ink-muted); cursor: pointer; }
.idiomas button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.pagina { max-width: 1040px; margin: 0 auto; padding: 28px 20px 60px; }
.estrecha { max-width: 460px; }
.media { max-width: 760px; }
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 24px; margin-bottom: 16px; box-shadow: var(--shadow); }
.panel > p { margin-bottom: 10px; }
.suave { color: var(--ink-muted); }
.pequeno { font-size: 13px; }
.aviso { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.aviso.mal { background: var(--danger-soft); border-color: var(--danger-border); color: #991B1B; }
.aviso.bien { background: var(--action-soft); border-color: var(--action-soft-border); color: var(--action-text); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; padding: 9px 18px; border-radius: var(--radius-md); border: 1px solid var(--ink); background: var(--ink); color: #fff; font: inherit; font-weight: 600; font-size: 14px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #27272A; }
.btn.sec { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn.sec:hover { background: var(--surface-raised); }
.btn.ancho { width: 100%; }
.btn.mini { min-height: 34px; padding: 5px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: default; }
.enlace { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

.campo { margin-bottom: 14px; }
.campo label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 5px; }
.campo input, .campo select, .campo textarea { width: 100%; padding: 11px 12px; border: 1px solid var(--border-strong); border-radius: var(--radius-md); font: inherit; font-size: 16px; color: var(--ink); background: var(--surface); }
.campo input:focus, .campo select:focus, .campo textarea:focus { outline: none; border-color: var(--action); box-shadow: 0 0 0 3px var(--focus-ring); }
.campo .ayuda { font-size: 12px; color: var(--ink-subtle); margin-top: 4px; }
.casilla { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; margin: 14px 0; }
.casilla input { width: 18px; height: 18px; margin-top: 2px; flex-shrink: 0; accent-color: var(--ink); }
.trampa { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cifras { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.cifra { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px; box-shadow: var(--shadow); }
.cifra .n { font-family: var(--font-display); font-size: 26px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cifra .t { font-size: 12px; color: var(--ink-muted); font-weight: 500; margin-top: 2px; }
.cifra .s { font-size: 12px; color: var(--ink-subtle); margin-top: 4px; }
.cifra.dinero .n { color: var(--action-text); }
.dos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.tres { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }

.copia { display: flex; gap: 8px; align-items: stretch; margin-bottom: 10px; }
.copia code { flex: 1; min-width: 0; background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 10px 12px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 14px; overflow-wrap: anywhere; display: flex; align-items: center; }
.codigo-grande { font-family: var(--font-display); font-size: 30px; font-weight: 700; letter-spacing: .04em; }
.texto-compartir { background: var(--surface-raised); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 12px 14px; font-size: 14px; white-space: pre-wrap; margin-bottom: 8px; }

.barras { display: flex; align-items: flex-end; gap: 6px; height: 140px; margin: 8px 0 4px; }
.barras .b { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; min-width: 0; }
.barras .b i { display: block; width: 100%; max-width: 34px; background: var(--ink); border-radius: 4px 4px 0 0; min-height: 2px; }
.barras .b.cero i { background: var(--border-strong); }
.barras .b em { font-style: normal; font-size: 10px; color: var(--ink-muted); margin-bottom: 2px; white-space: nowrap; }
.barras .b span { font-size: 11px; color: var(--ink-subtle); margin-top: 4px; white-space: nowrap; }

table { width: 100%; border-collapse: collapse; font-size: 14px; }
th, td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--border); }
th { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-muted); font-weight: 600; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: 0; }

.legal { max-height: min(340px, 50vh); overflow-y: auto; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 18px; background: var(--bg-alt); font-size: 14px; }
.legal h3 { margin-top: 14px; } .legal h3:first-child { margin-top: 0; } .legal p { margin-bottom: 8px; color: #27272A; }
.pasos { counter-reset: paso; list-style: none; }
.pasos li { counter-increment: paso; padding: 0 0 12px 38px; position: relative; }
.pasos li::before { content: counter(paso); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.aire { margin-top: 16px; }
.fila { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pie { text-align: center; font-size: 12px; color: var(--ink-subtle); margin-top: 24px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 18px; border-radius: 999px; font-size: 14px; z-index: 50; box-shadow: 0 8px 30px rgba(0,0,0,.25); }

@media (pointer: coarse) { .btn.mini, .idiomas button { min-height: 44px; } .idiomas button { min-width: 44px; } summary { padding: 12px 0; } }
@media (max-width: 860px) { .cifras { grid-template-columns: repeat(2, 1fr); } .dos, .tres { grid-template-columns: 1fr; } }
@media (max-width: 480px) {
  h1 { font-size: 23px; } .pagina { padding: 18px 14px 50px; } .panel { padding: 18px 16px; } .cifra { padding: 13px; } .cifra .n { font-size: 22px; }
  .copia { flex-direction: column; } .codigo-grande { font-size: 26px; } .barra-in { padding: 10px 14px; } .etiqueta { display: none; }
  .tabla-ancha { overflow-x: auto; }
}
