/* 23.8.0 · NextAds Firma: páginas públicas para firmar y verificar. */
:root { --bg: #050814; --panel: #0b1430; --line: #1d2b55; --text: #e8eefc; --muted: #9aa8cc; --accent: #22d3ff; --accent2: #3b7bff; --ok: #34d399; --warn: #fbbf24; --bad: #f87171; color-scheme: dark; }
* { box-sizing: border-box; }
body.nf { margin: 0; min-height: 100vh; background: radial-gradient(1200px 600px at 10% -10%, #10204a 0%, transparent 60%), var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; display: flex; flex-direction: column; }
a { color: #7fd6ff; }
.nf-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(14px, env(safe-area-inset-top)) max(18px, env(safe-area-inset-right)) 14px max(18px, env(safe-area-inset-left)); border-bottom: 1px solid var(--line); }
.nf-brand { font-weight: 800; letter-spacing: .08em; color: #fff; text-decoration: none; font-size: 15px; }
.nf-brand span { color: var(--accent2); }
.nf-brand em { font-style: normal; font-weight: 600; letter-spacing: 0; color: var(--accent); margin-left: 6px; }
.nf-verify-link { font-size: 14px; }
.nf-main { flex: 1; width: 100%; max-width: 1180px; margin: 0 auto; padding: 22px 16px 40px; }
.nf-loading, .nf-muted { color: var(--muted); }
.nf-small { font-size: 13px; margin: 18px 0 6px; text-transform: uppercase; letter-spacing: .06em; }
.nf-grid { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 22px; align-items: start; }
.nf-grid aside { position: sticky; top: 16px; }
.nf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 22px; max-width: 640px; margin: 0 auto; }
.nf-grid .nf-card { max-width: none; }
.nf-card.is-ok { border-color: rgba(52, 211, 153, .5); }
.nf-card.is-warn { border-color: rgba(251, 191, 36, .45); }
.nf-card.is-bad { border-color: rgba(248, 113, 113, .5); }
h1 { font-size: 22px; margin: 0 0 4px; line-height: 1.25; overflow-wrap: anywhere; }
h2 { font-size: 18px; margin: 0 0 6px; }
.nf-doc { min-width: 0; }
.nf-doc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; margin-bottom: 12px; }
.nf-doc-head p { margin: 0; }
.nf-msg { background: rgba(34, 211, 255, .07); border: 1px solid rgba(34, 211, 255, .25); border-radius: 12px; padding: 10px 14px; margin: 0 0 12px; white-space: pre-wrap; }
.nf-frame { width: 100%; height: 72vh; min-height: 420px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.nf-signers { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.nf-signers li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 255, 255, .02); }
.nf-signers li span { overflow-wrap: anywhere; }
.nf-signers em { font-style: normal; font-size: 13px; color: var(--muted); white-space: nowrap; }
.nf-signers li.is-firmado em { color: var(--ok); }
.nf-signers li.is-rechazado em { color: var(--bad); }
.nf-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 20px; border: 0; border-radius: 999px; background: linear-gradient(90deg, var(--accent), var(--accent2)); color: #04121c; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; width: 100%; margin-top: 10px; }
.nf-btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); width: auto; margin-top: 0; white-space: nowrap; }
.nf-btn:disabled { opacity: .6; cursor: progress; }
.nf-link { background: none; border: 0; color: #7fd6ff; font: inherit; font-size: 14px; cursor: pointer; padding: 6px 0; }
.nf-tabs { display: flex; gap: 6px; margin: 14px 0 10px; background: rgba(255, 255, 255, .04); padding: 4px; border-radius: 999px; }
.nf-tabs button { flex: 1; border: 0; border-radius: 999px; padding: 8px; background: transparent; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.nf-tabs button.is-on { background: #fff; color: #0b1430; }
.nf-pad-wrap { position: relative; background: #fff; border-radius: 14px; overflow: hidden; }
#nf-pad { display: block; width: 100%; height: auto; aspect-ratio: 640 / 220; touch-action: none; cursor: crosshair; }
#nf-pad.is-typed { cursor: default; }
.nf-pad-line { position: absolute; left: 8%; right: 8%; bottom: 24%; border-bottom: 1px dashed #b7c0d6; pointer-events: none; }
.nf-typed input, .nf-form input:not([type=file]), .nf-code input, textarea { width: 100%; margin-top: 8px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: #070d22; color: var(--text); font: inherit; font-size: 16px; }
.nf-code input { letter-spacing: .4em; font-size: 22px; text-align: center; }
.nf-row { display: flex; justify-content: flex-end; }
.nf-check { display: flex; gap: 10px; align-items: flex-start; margin: 10px 0 4px; font-size: 14px; color: #c9d4f0; cursor: pointer; }
.nf-check input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.nf-err { color: var(--bad); min-height: 1.2em; margin: 8px 0 0; font-size: 14px; }
.nf-reject { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.nf-reject summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.nf-reject .nf-btn { margin-top: 10px; }
.nf-form { display: grid; gap: 10px; margin-top: 16px; }
.nf-form label { font-size: 14px; color: var(--muted); }
.nf-drop { display: block; border: 1.5px dashed var(--line); border-radius: 14px; padding: 22px; text-align: center; cursor: pointer; }
.nf-drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nf-drop span { color: var(--text); font-weight: 600; overflow-wrap: anywhere; }
.nf-or { text-align: center; color: var(--muted); margin: 0; }
.nf-result { margin-top: 18px; border-radius: 14px; padding: 16px; border: 1px solid var(--line); }
.nf-result strong { font-size: 18px; }
.nf-result.is-ok { border-color: rgba(52, 211, 153, .55); background: rgba(52, 211, 153, .07); }
.nf-result.is-ok strong { color: var(--ok); }
.nf-result.is-warn { border-color: rgba(251, 191, 36, .5); background: rgba(251, 191, 36, .06); }
.nf-result.is-warn strong { color: var(--warn); }
.nf-result.is-bad { border-color: rgba(248, 113, 113, .55); background: rgba(248, 113, 113, .07); }
.nf-result.is-bad strong { color: var(--bad); }
.nf-result .nf-signers { margin: 12px 0; }
.nf-hash { font: 12px/1.4 ui-monospace, Consolas, monospace; overflow-wrap: anywhere; color: var(--muted); margin: 6px 0; }
.nf-foot { padding: 18px 16px max(18px, env(safe-area-inset-bottom)); border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; text-align: center; }
.nf-foot p { max-width: 760px; margin: 0 auto; }
@media (max-width: 900px) {
    .nf-grid { grid-template-columns: 1fr; }
    .nf-grid aside { position: static; }
    .nf-frame { height: 60vh; min-height: 320px; }
}
@media (max-width: 520px) {
    .nf-main { padding: 16px 12px 32px; }
    .nf-card { padding: 18px 16px; border-radius: 16px; }
    .nf-doc-head { flex-direction: column; }
    .nf-doc-head .nf-btn.ghost { width: 100%; }
    .nf-verify-link { font-size: 13px; }
}

/* 26.2.0 · Día y noche (js/tema.js pone data-theme en <html>). */
.nf-tema { width: 38px; height: 38px; display: inline-grid; place-items: center; border-radius: 12px; border: 1px solid var(--line); background: transparent; color: var(--text); cursor: pointer; font-size: 15px; }
.nf-top-end { display: flex; align-items: center; gap: 12px; }
:root[data-theme="light"] { --bg: #f5f7fc; --panel: #ffffff; --line: #d9e0f0; --text: #0d1530; --muted: #5a6788; --accent: #0891b2; --accent2: #2563eb; --ok: #059669; --warn: #b45309; --bad: #dc2626; color-scheme: light; }
:root[data-theme="light"] body.nf { background: radial-gradient(1200px 600px at 10% -10%, #dfe8ff 0%, transparent 60%), var(--bg); }
:root[data-theme="light"] a, :root[data-theme="light"] .nf-link { color: #2563eb; }
:root[data-theme="light"] .nf-brand { color: var(--text); }
:root[data-theme="light"] .nf-signers li { background: rgba(20, 35, 80, .03); }
:root[data-theme="light"] .nf-tabs { background: rgba(20, 35, 80, .06); }
:root[data-theme="light"] .nf-tabs button.is-on { background: #0d1530; color: #fff; }
:root[data-theme="light"] .nf-pad-wrap, :root[data-theme="light"] .nf-frame { border: 1px solid var(--line); }
