/* Panel Socket Studio · sistema visual del panel (admin y clientes).
   Menú en la tinta de la marca, área de trabajo en su papel cálido.
   Rojo Socket solo para acciones principales y estados que piden atención. */

:root {
  /* Marca, en OKLCH (tinta violeta, papel cálido, rojo Socket) */
  --ink: oklch(0.205 0.022 295);
  --ink-2: oklch(0.255 0.024 295);
  --ink-3: oklch(0.31 0.024 295);
  --side-text: oklch(0.88 0.01 295);
  --side-muted: oklch(0.68 0.016 295);

  --paper: oklch(0.972 0.005 75);
  --surface: oklch(0.993 0.003 75);
  --sunken: oklch(0.955 0.006 75);
  --line: oklch(0.905 0.007 75);
  --line-strong: oklch(0.84 0.009 75);

  --text: oklch(0.235 0.02 295);
  --text-2: oklch(0.42 0.018 295);
  --muted: oklch(0.54 0.015 295);

  --red: oklch(0.555 0.148 25);
  --red-hover: oklch(0.5 0.15 25);
  --red-soft: oklch(0.955 0.025 25);
  --red-text: oklch(0.47 0.15 25);

  --ok: oklch(0.56 0.105 158);
  --ok-soft: oklch(0.955 0.03 158);
  --ok-text: oklch(0.43 0.09 158);
  --warn: oklch(0.7 0.13 72);
  --warn-soft: oklch(0.965 0.04 85);
  --warn-text: oklch(0.47 0.1 60);
  --off-soft: oklch(0.94 0.006 295);
  --off-text: oklch(0.45 0.015 295);

  --focus: oklch(0.555 0.148 25 / 0.42);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Space Grotesk", "Inter", system-ui, sans-serif;
  --mono: ui-monospace, "Cascadia Code", Consolas, monospace;

  /* Escala tipográfica fija (1.2) */
  --t-xs: 0.75rem;
  --t-sm: 0.8125rem;
  --t-base: 0.875rem;
  --t-md: 1rem;
  --t-lg: 1.25rem;
  --t-xl: 1.5rem;

  --r-sm: 6px;
  --r: 8px;
  --r-lg: 12px;
  --side-w: 236px;
  --detail-w: 460px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--t-base);
  line-height: 1.5;
  color: var(--text);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }
.num { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--mono); font-size: var(--t-sm); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Estructura ---------- */
.app { display: grid; grid-template-columns: var(--side-w) 1fr; min-height: 100vh; }

.side {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  background: var(--ink); color: var(--side-text);
  padding: 18px 12px;
}
.brand { display: flex; align-items: baseline; gap: 8px; padding: 4px 10px 22px; text-decoration: none; }
.brand-mark { font-family: var(--font-brand); font-weight: 600; font-size: 1.125rem; letter-spacing: -0.01em; color: oklch(0.97 0.005 75); }
.brand-mark span { color: oklch(0.68 0.15 25); }
.brand-sub { font-size: var(--t-xs); color: var(--side-muted); letter-spacing: 0.04em; text-transform: uppercase; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-label { font-size: var(--t-xs); color: var(--side-muted); text-transform: uppercase; letter-spacing: 0.06em; padding: 14px 10px 6px; }
.nav a {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px; border-radius: var(--r);
  color: var(--side-text); text-decoration: none; font-weight: 500;
  transition: background-color 160ms var(--ease), color 160ms var(--ease);
}
.nav a svg { width: 17px; height: 17px; color: var(--side-muted); flex: none; }
.nav a:hover { background: var(--ink-2); }
.nav a[aria-current="page"] { background: var(--ink-3); color: oklch(0.98 0.004 75); }
.nav a[aria-current="page"] svg { color: oklch(0.72 0.14 25); }

.side-foot { margin-top: auto; border-top: 1px solid var(--ink-3); padding: 14px 6px 0; display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex: none;
  display: grid; place-items: center;
  background: var(--ink-3); color: oklch(0.95 0.01 75); font-weight: 600; font-size: var(--t-sm);
}
.who { min-width: 0; flex: 1; }
.who-name { font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who-role { font-size: var(--t-xs); color: var(--side-muted); }
.icon-btn {
  display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r);
  border: 0; background: transparent; color: inherit; cursor: pointer;
  transition: background-color 160ms var(--ease);
}
.icon-btn svg { width: 17px; height: 17px; }
.side .icon-btn:hover { background: var(--ink-2); }
.main .icon-btn:hover { background: var(--sunken); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar-mobile { display: none; }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding: 28px 32px 18px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: var(--t-xl); font-weight: 600; letter-spacing: -0.015em; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: var(--t-sm); }
.page-sub b { color: var(--text-2); font-weight: 600; }
.head-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- Controles ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  font-weight: 500; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease);
}
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: var(--sunken); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--red); border-color: var(--red); color: oklch(0.99 0.003 75); }
.btn-primary:hover { background: var(--red-hover); border-color: var(--red-hover); }
.btn-danger { color: var(--red-text); border-color: oklch(0.85 0.05 25); }
.btn-danger:hover { background: var(--red-soft); }
.btn-sm { height: 30px; padding: 0 10px; font-size: var(--t-sm); }

.search { position: relative; }
.search svg { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--muted); }
.input, .search input, select.input {
  height: 36px; width: 100%; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line-strong); background: var(--surface);
  transition: border-color 160ms var(--ease);
}
.search input { width: 280px; padding-left: 34px; }
.input:hover, .search input:hover { border-color: oklch(0.76 0.012 295); }
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: var(--t-sm); font-weight: 500; color: var(--text-2); }
.field .hint { font-size: var(--t-xs); color: var(--muted); }

/* ---------- Pestañas ---------- */
.tabs { display: flex; gap: 4px; padding: 0 32px; border-bottom: 1px solid var(--line); }
.tab {
  position: relative; border: 0; background: none; padding: 10px 12px 12px; cursor: pointer;
  color: var(--muted); font-weight: 500; display: inline-flex; gap: 8px; align-items: center;
}
.tab:hover { color: var(--text); }
.tab[aria-selected="true"] { color: var(--text); }
.tab[aria-selected="true"]::after { content: ""; position: absolute; left: 8px; right: 8px; bottom: -1px; height: 2px; background: var(--red); border-radius: 2px; }
.count { font-size: var(--t-xs); padding: 1px 7px; border-radius: 999px; background: var(--sunken); color: var(--text-2); font-variant-numeric: tabular-nums; }

/* ---------- Vista dividida: tabla + detalle ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr); flex: 1; min-height: 0; }
.workspace.con-detalle { grid-template-columns: minmax(0, 1fr) var(--detail-w); }
.list { min-width: 0; padding: 0 32px 40px; }

table.grid { width: 100%; border-collapse: collapse; }
table.grid th {
  position: sticky; top: 0; z-index: 1;
  text-align: left; font-size: var(--t-xs); font-weight: 600; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.05em;
  padding: 12px 12px 8px; background: var(--paper); border-bottom: 1px solid var(--line);
}
table.grid th.r, table.grid td.r { text-align: right; }
table.grid th button { all: unset; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.grid th button:hover { color: var(--text); }
table.grid th button[aria-sort="ascending"]::after { content: "↑"; }
table.grid th button[aria-sort="descending"]::after { content: "↓"; }
table.grid td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.grid tbody tr { cursor: pointer; transition: background-color 120ms var(--ease); }
table.grid tbody tr:hover { background: oklch(0.955 0.007 75); }
table.grid tbody tr[aria-selected="true"] { background: oklch(0.945 0.012 25); }
.cell-name { font-weight: 500; }
table.grid td .num, table.grid .cell-sub { white-space: nowrap; }
table.grid th button { white-space: nowrap; }
/* Con el detalle abierto, la tabla cede espacio: lo secundario ya está en el detalle. */
.workspace.con-detalle .col-opt { display: none; }
.cell-sub { font-size: var(--t-xs); color: var(--muted); }

.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px;
  border-radius: 999px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill.activa { background: var(--ok-soft); color: var(--ok-text); }
.pill.vencida { background: var(--warn-soft); color: var(--warn-text); }
.pill.inactiva { background: var(--off-soft); color: var(--off-text); }
.pill.revocado, .pill.alerta { background: var(--red-soft); color: var(--red-text); }

.empty { padding: 56px 24px; text-align: center; color: var(--muted); }
.empty strong { display: block; color: var(--text); font-weight: 600; margin-bottom: 4px; }

.skeleton { height: 12px; border-radius: 4px; background: linear-gradient(90deg, var(--sunken), oklch(0.93 0.006 75), var(--sunken)); background-size: 200% 100%; animation: brillo 1.2s linear infinite; }
@keyframes brillo { to { background-position: -200% 0; } }

/* ---------- Detalle ---------- */
.detail {
  border-left: 1px solid var(--line); background: var(--surface);
  height: calc(100vh - 0px); position: sticky; top: 0; overflow-y: auto;
  padding: 24px 24px 40px;
  animation: entra 220ms var(--ease);
}
@keyframes entra { from { opacity: 0; transform: translateX(12px); } }
.detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.detail-head h2 { margin: 0; font-size: var(--t-lg); font-weight: 600; letter-spacing: -0.01em; }
.detail-contact { margin: 2px 0 0; color: var(--muted); font-size: var(--t-sm); word-break: break-all; }
.detail-status { display: flex; align-items: center; gap: 10px; margin: 14px 0 20px; flex-wrap: wrap; font-size: var(--t-sm); color: var(--text-2); }

.section { padding: 18px 0; border-top: 1px solid var(--line); }
.section h3 { margin: 0 0 12px; font-size: var(--t-sm); font-weight: 600; color: var(--text-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.section h3 small { font-weight: 400; color: var(--muted); font-size: var(--t-xs); }

.token-box { display: flex; gap: 8px; align-items: center; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r); padding: 6px 6px 6px 12px; }
.token-box code { flex: 1; min-width: 0; font-family: var(--mono); font-size: var(--t-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.token-meta { margin: 8px 0 0; font-size: var(--t-xs); color: var(--muted); }
.notice { border-radius: var(--r); padding: 10px 12px; font-size: var(--t-sm); background: var(--warn-soft); color: var(--warn-text); }
.notice.err { background: var(--red-soft); color: var(--red-text); }

.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.inline-form { margin-top: 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); display: grid; gap: 12px; background: var(--paper); }
.inline-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.stat { padding: 10px 12px; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat dt { font-size: var(--t-xs); color: var(--muted); }
.stat dd { margin: 2px 0 0; font-size: var(--t-md); font-weight: 600; font-variant-numeric: tabular-nums; }

.chart { margin-top: 14px; }
.chart svg { display: block; width: 100%; height: 120px; }
.chart .bar { fill: oklch(0.8 0.03 295); transition: fill 120ms var(--ease); }
.chart .bar.hoy { fill: var(--red); }
.chart .bar:hover { fill: oklch(0.6 0.05 295); }
.chart-axis { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--muted); margin-top: 4px; }

table.mini { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
table.mini th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--t-xs); padding: 0 8px 6px 0; }
table.mini td { padding: 6px 8px 6px 0; border-top: 1px solid var(--line); }
table.mini .r { text-align: right; padding-right: 0; }

.gate-row { display: flex; justify-content: space-between; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); font-size: var(--t-sm); }
.gate-row:first-of-type { border-top: 0; }

/* ---------- Avisos ---------- */
.toasts { position: fixed; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 8px; z-index: 50; }
.toast { background: var(--ink); color: oklch(0.96 0.006 75); padding: 10px 14px; border-radius: var(--r); font-size: var(--t-sm); max-width: 360px; animation: entra 200ms var(--ease); }
.toast.err { background: var(--red-hover); }

/* ---------- Formularios de página (nueva venta, login) ---------- */
.form-page { padding: 8px 32px 48px; max-width: 760px; }
.form-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 24px; display: grid; gap: 18px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-foot { display: flex; justify-content: flex-end; gap: 10px; padding-top: 4px; }
.result { border: 1px solid oklch(0.86 0.05 158); background: var(--ok-soft); border-radius: var(--r-lg); padding: 18px; display: grid; gap: 10px; }

/* ---------- Responsivo ---------- */
@media (max-width: 1180px) {
  .workspace.con-detalle { grid-template-columns: minmax(0, 1fr); }
  .detail { position: fixed; inset: 0 0 0 auto; width: min(100%, var(--detail-w)); z-index: 40; box-shadow: -12px 0 32px oklch(0.2 0.02 295 / 0.14); }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; inset: 0 auto 0 0; width: min(82vw, 280px); z-index: 45; transform: translateX(-100%); transition: transform 220ms var(--ease); }
  .side.abierto { transform: none; }
  .topbar-mobile { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--ink); color: var(--side-text); position: sticky; top: 0; z-index: 30; }
  .page-head, .list, .form-page { padding-left: 16px; padding-right: 16px; }
  .tabs { padding: 0 16px; overflow-x: auto; }
  .search input { width: 100%; }
  .head-actions { width: 100%; }
  .head-actions .search { flex: 1; }
  .col-opt { display: none; }
  .list { overflow-x: auto; }
  table.grid { min-width: 520px; }
  .form-grid, .inline-form .row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(-n+2) { border-bottom: 1px solid var(--line); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}

/* ---------- Métricas ---------- */
/* Identidad de producto en todos los gráficos (validado: CVD ΔE 16.7, contraste ≥ 3:1). */
:root { --serie-cedula: #5a4a8c; --serie-ruc: #00927f; }
.metricas { padding: 0 32px 48px; display: grid; gap: 28px; }
.bloque h2 { margin: 0 0 4px; font-size: var(--t-md); font-weight: 600; }
.bloque > p { margin: 0 0 14px; color: var(--muted); font-size: var(--t-sm); max-width: 75ch; }
.resumen-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.resumen-cifras > div { padding: 14px 16px; border-right: 1px solid var(--line); }
.resumen-cifras > div:last-child { border-right: 0; }
.resumen-cifras dt { font-size: var(--t-xs); color: var(--muted); }
.resumen-cifras dd { margin: 4px 0 0; font-size: var(--t-lg); font-weight: 600; font-variant-numeric: tabular-nums; }
.resumen-cifras dd small { display: block; font-size: var(--t-xs); font-weight: 400; color: var(--muted); }
.par { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.figura { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 10px; min-width: 0; }
.figura-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 6px; }
.figura-head h3 { margin: 0; font-size: var(--t-sm); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.figura-head h3 i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.figura-head span { font-size: var(--t-xs); color: var(--muted); font-variant-numeric: tabular-nums; }
.barras svg { display: block; width: 100%; height: 150px; overflow: visible; }
.barras .eje text { font-size: 10px; fill: var(--muted); font-family: var(--font); }
.barras .eje line { stroke: var(--line); stroke-width: 1; }
.barras .golpe { fill: transparent; cursor: crosshair; }
.barras .golpe:hover + .barra, .barras .barra.hover { opacity: 0.75; }
.barras-fechas { display: flex; justify-content: space-between; font-size: var(--t-xs); color: var(--muted); margin-top: 4px; padding-left: 38px; }
.tooltip { position: fixed; pointer-events: none; z-index: 60; background: var(--ink); color: oklch(0.96 0.006 75); border-radius: var(--r-sm); padding: 6px 9px; font-size: var(--t-xs); white-space: nowrap; transform: translate(-50%, calc(-100% - 10px)); }
.tooltip b { font-variant-numeric: tabular-nums; }
.tabla-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow-x: auto; }
table.dato { width: 100%; border-collapse: collapse; font-size: var(--t-sm); }
table.dato th { text-align: left; font-size: var(--t-xs); font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
table.dato th button { all: unset; cursor: pointer; }
table.dato th button:hover { color: var(--text); }
table.dato th button[aria-sort="descending"]::after { content: " ↓"; }
table.dato th button[aria-sort="ascending"]::after { content: " ↑"; }
table.dato td { padding: 8px 12px; border-top: 1px solid var(--line); white-space: nowrap; }
table.dato tr:first-child td { border-top: 0; }
table.dato .r { text-align: right; font-variant-numeric: tabular-nums; }
.barra-celda { display: flex; align-items: center; gap: 8px; min-width: 150px; }
.barra-celda span { flex: 1; height: 8px; background: var(--sunken); border-radius: 0 4px 4px 0; overflow: hidden; }
.barra-celda span i { display: block; height: 100%; border-radius: 0 4px 4px 0; }
.barra-celda b { font-weight: 500; font-variant-numeric: tabular-nums; min-width: 72px; text-align: right; }
.faltan { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 12px; margin-bottom: 14px; }
.faltan > div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 12px 14px; }
.faltan h3 { margin: 0 0 8px; font-size: var(--t-sm); font-weight: 600; }
.faltan ol { margin: 0; padding-left: 18px; display: grid; gap: 4px; font-size: var(--t-sm); }
.faltan li span { color: var(--muted); font-variant-numeric: tabular-nums; }
.spark { display: block; width: 120px; height: 24px; }
.spark rect { fill: var(--serie-cedula); }
@media (max-width: 1100px) { .par { grid-template-columns: 1fr; } .resumen-cifras { grid-template-columns: repeat(2, 1fr); } .resumen-cifras > div:nth-child(2) { border-right: 0; } .resumen-cifras > div:nth-child(-n+2) { border-bottom: 1px solid var(--line); } }
@media (max-width: 860px) { .metricas { padding: 0 16px 40px; } }

/* ---------- Producto del token ---------- */
.chips { display: inline-flex; gap: 4px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 4px; font-size: var(--t-xs); font-weight: 600; white-space: nowrap; }
.chip.cedula { background: oklch(0.94 0.03 295); color: var(--serie-cedula); }
.chip.ruc { background: oklch(0.94 0.04 175); color: oklch(0.45 0.09 175); }
.chip.ninguno { background: var(--off-soft); color: var(--off-text); }
.chip.demo { background: var(--warn-soft); color: var(--warn-text); }
.opciones { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.opcion { position: relative; display: grid; gap: 2px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: var(--r); background: var(--surface); cursor: pointer; transition: border-color 160ms var(--ease), background-color 160ms var(--ease); }
.opcion input { position: absolute; opacity: 0; }
.opcion b { font-weight: 600; }
.opcion span { font-size: var(--t-xs); color: var(--muted); }
.opcion:hover { border-color: oklch(0.76 0.012 295); }
.opcion:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.opcion:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.grupo { border: 0; padding: 0; margin: 0; display: grid; gap: 12px; }
.grupo legend { font-size: var(--t-sm); font-weight: 600; color: var(--text-2); padding: 0; margin-bottom: 4px; }
.separador { border-top: 1px solid var(--line); margin: 4px 0; }
pre.json { margin: 0; max-height: 360px; overflow: auto; background: var(--ink); color: oklch(0.92 0.01 295); border-radius: var(--r); padding: 12px 14px; font-family: var(--mono); font-size: var(--t-xs); line-height: 1.6; }
.veredicto { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: var(--r); font-size: var(--t-sm); }
.veredicto.valido { background: var(--ok-soft); color: var(--ok-text); }
.veredicto.bloqueado { background: var(--red-soft); color: var(--red-text); }
.veredicto.error { background: var(--warn-soft); color: var(--warn-text); }
.veredicto b { display: block; font-size: var(--t-base); }
@media (max-width: 860px) { .opciones { grid-template-columns: 1fr; } }
