/* ===== Rediseño 2026-09: base común (tokens del encargo de diseño; los usan style.css y landing.css) ===== */
/* Inter (OFL, public/fonts/OFL-Inter.txt), variable 400-700. latin-ext solo se descarga si la página usa esas letras. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(/fonts/inter-latin-ext.woff2) format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --brand-50: #ecfdf5; --brand-100: #d1fae5; --brand-200: #a7f3d0; --brand-500: #10b981; --brand-600: #059669; --brand-700: #047857; --brand-800: #065f46; --brand-900: #064e3b;
  --slate-0: #fff; --slate-25: #fcfcfd; --slate-50: #f8fafc; --slate-100: #f1f5f9; --slate-200: #e2e8f0; --slate-300: #cbd5e1; --slate-400: #94a3b8;
  --slate-500: #64748b; --slate-600: #475569; --slate-700: #334155; --slate-800: #1e293b; --slate-900: #0f172a;
  --success: #15803d; --success-bg: #f0fdf4; --success-border: #bbf7d0;
  --warning: #b45309; --warning-bg: #fffbeb; --warning-border: #fde68a;
  --danger-700: #b91c1c; --danger-bg: #fef2f2; --danger-border: #fecaca;
  --info: #1d4ed8; --info-bg: #eff6ff; --info-border: #bfdbfe;
  --brand-accent: #ffc414; /* solo el detalle del logotipo */
  --font-sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius-sm: 8px; --radius-md: 12px; --radius-lg: 16px; --radius-full: 999px;
  --shadow-xs: 0 1px 2px rgb(15 23 42 / .05);
  --shadow-sm: 0 1px 3px rgb(15 23 42 / .08), 0 1px 2px rgb(15 23 42 / .04);
  --shadow-md: 0 4px 12px rgb(15 23 42 / .08);
  --shadow-lg: 0 12px 32px rgb(15 23 42 / .12);
  --ease: cubic-bezier(.2, .8, .2, 1); --dur-fast: 150ms; --dur-med: 220ms;
  --control-h: 44px;
}
/* ===== Fin de la base común ===== */
/* ===== Web (salvo la portada): sistema de diseño, armazón y pantallas ===== */
/* Respaldo con las métricas de Inter (Arial ajustada): el texto no salta cuando llega la letra (font-display: swap) */
@font-face { font-family: "Inter Fallback"; src: local("Arial"), local("ArialMT"), local("Liberation Sans"), local("Arimo"); size-adjust: 107.1%; ascent-override: 90.4%; descent-override: 22.5%; line-gap-override: 0%; }
:root {
  --font-sans: "Inter", "Inter Fallback", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  /* Borde de campos, selectores, casillas y radios en reposo: #8190A6 (mezcla de slate-400 y slate-500), 3,2:1 sobre
     blanco (WCAG 1.4.11 pide 3:1 en el límite de un control; slate-300 solo da 1,5:1). El mismo que la app móvil. */
  --control-border: #8190a6;
  --side-w: 248px; --top-h: 56px; --tab-h: 64px; --page-max: 1200px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
  /* Iconos de los avisos y flechas (máscaras; el color lo pone el texto) */
  --ico-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 16v-4M12 8h.01'/%3E%3C/svg%3E");
  --ico-ok: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
  --ico-warn: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3'/%3E%3Cpath d='M12 9v4M12 17h.01'/%3E%3C/svg%3E");
  --ico-err: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='10'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
  --ico-chev: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  --ico-check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E");
  --select-arrow: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; font: 400 16px/1.5 var(--font-sans); color: var(--slate-900); background: var(--slate-0); -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body.app { background: var(--slate-50); }
h1, h2, h3, h4 { font-weight: 600; letter-spacing: -0.01em; color: var(--slate-900); }
h1 { font-size: 30px; line-height: 36px; margin: 0 0 16px; }
h2 { font-size: 24px; line-height: 32px; margin: 40px 0 12px; }
h3 { font-size: 20px; line-height: 28px; margin: 0 0 8px; }
h4 { font-size: 16px; line-height: 24px; margin: 0 0 4px; }
p { margin: 0 0 16px; }
a { color: var(--brand-700); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; text-decoration-color: color-mix(in srgb, currentColor 40%, transparent); transition: color var(--dur-fast) ease-out, text-decoration-color var(--dur-fast) ease-out; }
a:hover { color: var(--brand-800); text-decoration-color: currentColor; }
img, svg { max-width: 100%; }
strong, b { font-weight: 600; }
small, .small { font-size: 14px; line-height: 20px; }
code { font-family: var(--font-mono); font-size: .875em; background: var(--slate-100); color: var(--slate-800); padding: 1px 5px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--slate-200); margin: 24px 0; }
:focus-visible { outline: 2px solid var(--brand-600); outline-offset: 2px; }
::selection { background: var(--brand-100); color: var(--brand-900); }
.skip { position: absolute; left: 8px; top: -60px; z-index: 300; background: var(--slate-900); color: #fff; padding: 10px 16px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 8px; color: #fff; }

/* ---------- Utilidades ---------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.muted { color: var(--slate-600); }
.hint { font-size: 14px; line-height: 20px; color: var(--slate-600); margin: 4px 0 12px; }
.danger { color: var(--danger-700) !important; }
.hp { position: absolute; left: -9999px; }
.pre { white-space: pre-wrap; max-width: 420px; font-family: var(--font-mono); font-size: 13px; }
.nowrap { white-space: nowrap; }
.tnum, .num, .plate, table { font-variant-numeric: tabular-nums; }
.num { text-align: right; }
.break, code { overflow-wrap: anywhere; }
.row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; }
.between { justify-content: space-between; }
.gap { gap: 12px; }
.inline { display: inline; }
.inline-form { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 0; }
.narrow { max-width: 480px; margin: 24px auto; }
.narrow2 { max-width: 800px; }
.grid2, .grid2e, .grid3 { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.grid2 > *, .grid2e > *, .grid3 > * { min-width: 0; }
@media (min-width: 900px) {
  .grid2 { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); }
  .grid2e { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 767.98px) { .hide-m { display: none !important; } }
@media (min-width: 768px) { .show-m { display: none !important; } }
@media (max-width: 399.98px) { .hide-xs { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; } }
.h-sec { font-size: 18px; line-height: 28px; margin: 32px 0 8px; }
.kicker { font-size: 13px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--brand-700); margin: 0 0 8px; }

/* ---------- Iconos (sprite /icons.svg) ---------- */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.btn-sm .i, .menu-item .i, .tabs .i, .chip .i, .badge .i, .link-arrow .i, .back .i { width: 16px; height: 16px; }

/* ---------- Botones ---------- */
.btn { --b: var(--brand-700); display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--control-h); padding: 0 16px; border: 1px solid var(--b); border-radius: var(--radius-sm); background: var(--b); color: #fff; font: 600 15px/1.2 var(--font-sans); letter-spacing: -0.005em; text-decoration: none; cursor: pointer; white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent; box-shadow: var(--shadow-xs); transition: background-color var(--dur-fast) ease-out, border-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out, box-shadow var(--dur-fast) ease-out, transform var(--dur-fast) ease-out; }
.btn:hover { --b: var(--brand-800); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--slate-0); border-color: var(--slate-300); color: var(--slate-900); }
.btn-secondary:hover { background: var(--slate-50); border-color: var(--slate-400); color: var(--slate-900); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--slate-700); box-shadow: none; }
.btn-ghost:hover { background: var(--slate-100); border-color: transparent; color: var(--slate-900); }
.btn-danger { --b: var(--danger-700); }
.btn-danger:hover { --b: #991b1b; }
.btn-ghost.danger:hover, .btn-secondary.danger:hover { background: var(--danger-bg); }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 14px; gap: 6px; }
.btn-lg { min-height: 48px; padding: 0 20px; font-size: 16px; }
.btn-block { width: 100%; white-space: normal; text-align: center; padding-top: 8px; padding-bottom: 8px; }
.btn-icon { width: var(--control-h); padding: 0; }
.btn:disabled, .btn[aria-disabled="true"], button.link:disabled { opacity: .55; cursor: not-allowed; transform: none; }
form[data-busy] button:disabled { cursor: progress; }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-700); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
button.link:hover { color: var(--brand-800); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--slate-600); cursor: pointer; transition: background-color var(--dur-fast) ease-out, color var(--dur-fast) ease-out; }
.icon-btn:hover { background: var(--slate-100); color: var(--slate-900); }
.link-arrow { display: inline-flex; align-items: center; gap: 4px; font-weight: 500; text-decoration: none; }
.back { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 14px; font-weight: 500; color: var(--slate-600); text-decoration: none; }
.back:hover { color: var(--slate-900); }

/* ---------- Web pública: cabecera, menú y pie ---------- */
.wrap { max-width: var(--page-max); margin: 0 auto; padding: 0 24px; }
.site-head { position: sticky; top: 0; z-index: 50; background: rgb(255 255 255 / .85); -webkit-backdrop-filter: saturate(180%) blur(12px); backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--slate-200); }
.site-bar { display: flex; align-items: center; gap: 24px; height: 64px; }
.site-nav { display: none; align-items: center; gap: 4px; }
.site-nav a { padding: 8px 10px; border-radius: var(--radius-sm); color: var(--slate-600); font-size: 15px; font-weight: 500; text-decoration: none; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--slate-900); }
.site-cta { display: none; align-items: center; gap: 8px; margin-left: auto; }
.site-cta .btn-sm { min-height: 40px; }
.site-menu-btn { margin-left: auto; width: 44px; height: 44px; color: var(--slate-900); }
.site-menu-btn .i-close, .site-menu-btn[aria-expanded="true"] .i-open { display: none; }
.site-menu-btn[aria-expanded="true"] .i-close { display: block; }
.site-menu { border-top: 1px solid var(--slate-200); background: var(--slate-0); max-height: calc(100dvh - 56px); overflow-y: auto; animation: pop-in var(--dur-med) var(--ease); }
.site-menu nav { display: grid; padding-top: 8px; padding-bottom: 16px; }
.site-menu nav > a { display: flex; align-items: center; min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--slate-100); color: var(--slate-900); font-size: 16px; font-weight: 500; text-decoration: none; }
.site-menu-cta { display: grid; gap: 8px; padding-top: 16px; }
@media (min-width: 900px) {
  .site-nav, .site-cta { display: flex; }
  .site-menu-btn, .site-menu { display: none !important; }
}
@media (max-width: 899.98px) { .site-bar { height: 56px; } }
@media (max-width: 599.98px) { .wrap { padding: 0 16px; } }
.site-main { padding: 40px 0 72px; min-height: 60vh; }
@media (max-width: 599.98px) { .site-main { padding: 24px 0 56px; } }
.foot { background: var(--slate-50); border-top: 1px solid var(--slate-200); padding: 48px 0 32px; font-size: 14px; line-height: 20px; }
.foot-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
.foot-cols > div { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; min-width: 0; }
.foot-cols strong { margin-bottom: 8px; color: var(--slate-900); font-size: 14px; font-weight: 600; }
.foot-cols a { padding: 6px 0; color: var(--slate-600); text-decoration: none; }
.foot-cols a:hover { color: var(--slate-900); text-decoration: underline; }
.foot .wrap > p.muted.small { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--slate-200); font-size: 13px; line-height: 20px; color: var(--slate-500); }
.foot-compact { padding: 24px 0; }
.foot-compact .wrap > p.muted.small { margin: 0; padding: 0; border: 0; }
.foot-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0; }
.foot-links a { color: var(--slate-600); padding: 4px 0; }
@media (max-width: 719.98px) { .foot-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; } .foot { padding-top: 32px; } }
.doc-head .site-bar { height: 56px; }
.doc-main { padding-top: 24px; }

/* ---------- Transiciones entre páginas (View Transitions) ----------
   La activación (@view-transition) va en un <style> del <head> (src/views/layout.js): así se conoce antes de que llegue
   esta hoja (con el service worker llega un poco después y Chrome daba la transición por desactivada). Solo sin
   «reducir movimiento». Aquí, las partes fijas que no deben parpadear y la duración del fundido. */
.side { view-transition-name: side; }
.topbar { view-transition-name: topbar; }
.tabbar { view-transition-name: tabbar; }
.site-head { view-transition-name: site-head; }
::view-transition-old(root), ::view-transition-new(root) { animation-duration: var(--dur-fast); animation-timing-function: ease-out; }
::view-transition-group(side), ::view-transition-group(topbar), ::view-transition-group(tabbar), ::view-transition-group(site-head) { animation-duration: 0s; }

/* ---------- Menos movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .btn[data-loading]::after, .autosave-status.is-busy::before, .qr-box::before { animation-duration: 1.5s !important; animation-iteration-count: infinite !important; }
}

/* ---------- Impresión ---------- */
@media print {
  .side, .topbar, .tabbar, .site-head, .foot, .toasts, .ai-fab, .ai-panel, .actions, .page-actions, .form-index { display: none !important; }
  body, body.app { background: #fff; }
  .shell { display: block; }
  .card, .table-wrap { box-shadow: none; break-inside: avoid; }
}
