/* OT-FIRMA · Página pública de firma y de verificación (celular primero) */
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; background: #e9edf2; color: #1c2430; min-height: 100vh; display: flex; flex-direction: column; align-items: center; padding: max(12px, env(safe-area-inset-top)) 10px 24px; }
.fp { width: 100%; max-width: 560px; background: #fff; border-radius: 16px; box-shadow: 0 18px 50px rgba(0,0,0,.14); overflow: hidden; }
.fp-cab { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 4px solid var(--c1, #1a1a1a); }
.fp-cab img { max-height: 40px; max-width: 90px; object-fit: contain; }
.fp-cab b { display: block; font-size: 1.05rem; line-height: 1.25; }
.fp-cab span { font-size: .82rem; color: #5d6b7c; }
.fp-cuerpo { padding: 14px 16px 10px; }
.fp-hola { margin: 0 0 10px; }
.fp-msg { background: #fff7e8; border-left: 4px solid #f5920c; padding: 8px 10px; border-radius: 6px; font-size: .9rem; margin-bottom: 12px; white-space: pre-line; }
.fp-doc { display: flex; align-items: center; gap: 10px; border: 1px solid #e1e4e9; border-radius: 10px; padding: 10px; margin-bottom: 12px; background: #fafbfc; }
.fp-doc-ico { flex: none; width: 42px; height: 50px; border-radius: 6px; background: #c0392b; color: #fff; font-weight: 800; font-size: .7rem; display: flex; align-items: center; justify-content: center; }
.fp-doc-txt { flex: 1; min-width: 0; }
.fp-doc-txt b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fp-doc-txt span { font-size: .8rem; color: #5d6b7c; }
.fp-sec-tit { display: flex; align-items: center; gap: 8px; font-weight: 700; margin: 14px 0 6px; }
.fp-num { width: 24px; height: 24px; border-radius: 50%; background: var(--c1, #1a1a1a); color: #fff; font-size: .8rem; display: inline-flex; align-items: center; justify-content: center; }
.fp-texto { max-height: 38vh; overflow-y: auto; border: 1px solid #e1e4e9; border-radius: 10px; padding: 10px 12px; background: #fafbfc; font-size: .86rem; line-height: 1.5; }
.fp-texto p { margin: 0 0 8px; }
.fp-paso[hidden] { display: none; }
.fp-nota { margin: 4px 0 10px; font-size: .88rem; color: #3b4656; }
.fp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 44px; padding: 10px 18px; border: 0; border-radius: 10px; background: var(--c1, #1a1a1a); color: #fff; font: inherit; font-weight: 700; cursor: pointer; text-decoration: none; }
.fp-btn.sec { background: #fff; color: #1c2430; border: 1px solid #c9ced6; }
.fp-btn.peq { min-height: 36px; padding: 6px 12px; font-size: .85rem; }
.fp-btn.grande { width: 100%; font-size: 1.05rem; margin-top: 8px; }
.fp-btn.rojo { background: #ae342c; }
.fp-btn:disabled { opacity: .6; cursor: default; }
.fp-enlace { background: none; border: 0; color: #1a56db; font: inherit; font-weight: 600; cursor: pointer; padding: 6px 4px; }
.fp-otp { margin-top: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.fp-otp[hidden] { display: none; }
.fp-otp label { flex: 1 1 160px; font-size: .8rem; font-weight: 700; color: #3b4656; }
.fp-otp input, .fp-rechazo-caja textarea { display: block; width: 100%; margin-top: 3px; font: inherit; font-size: 20px; letter-spacing: .3em; padding: 9px 10px; border: 1px solid #c9ced6; border-radius: 8px; }
.fp-rechazo-caja textarea { font-size: 15px; letter-spacing: 0; }
.fp-check { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; margin: 6px 0 10px; cursor: pointer; }
.fp-check input { width: 22px; height: 22px; flex: none; margin-top: 1px; accent-color: var(--c1, #1a1a1a); }
.fp-firma-tit { display: flex; justify-content: space-between; align-items: center; font-size: .8rem; font-weight: 700; color: #3b4656; }
.fp-firma-tit button { background: none; border: 0; color: #1a56db; font: inherit; font-weight: 600; cursor: pointer; padding: 4px; }
.fp-lienzo { position: relative; height: 180px; border: 2px dashed #b9c0ca; border-radius: 10px; background: #fff; margin-top: 4px; touch-action: none; }
.fp-lienzo canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.fp-linea { position: absolute; left: 8%; right: 8%; bottom: 36px; border-bottom: 1px solid #c9ced6; pointer-events: none; }
.fp-quien { text-align: center; font-size: .78rem; color: #5d6b7c; margin-top: 4px; }
.fp-error { color: #b42318; font-weight: 600; font-size: .9rem; min-height: 1.2em; margin: 8px 0 0; }
.fp-ok { color: #14532d; font-weight: 600; font-size: .9rem; margin: 4px 0 0; }
.fp-rechazo { text-align: center; margin: 14px 0 4px; }
.fp-rechazo-caja { border: 1px solid #f5c2bc; background: #fdecea; border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.fp-rechazo-caja[hidden] { display: none; }
.fp-rechazo-caja label { display: block; font-size: .8rem; font-weight: 700; margin-bottom: 8px; }
.fp-legal { font-size: .74rem; color: #6b7785; margin: 8px 0 0; }
.fp-estado { text-align: center; padding: 18px 0 8px; }
.fp-estado h1 { font-size: 1.3rem; margin: 0 0 6px; }
.fp-estado p { color: #5d6b7c; margin: 0 0 14px; }
.fp-estado + .fp-btn { display: flex; }
.fp-codigo { font-family: ui-monospace, Consolas, monospace; letter-spacing: .1em; }
.fp-pie { color: #6b7785; font-size: .75rem; text-align: center; padding: 12px; border-top: 1px solid #eef0f3; }
.fp-pie b { color: #1a1a1a; } .fp-pie b i { color: #f5920c; font-style: normal; }

/* ----- verificación ----- */
.val-estado { color: #fff; text-align: center; padding: 22px 16px 18px; }
.val-estado.vigente { background: #176448; } .val-estado.no_autorizado { background: #ae342c; } .val-estado.no_valido { background: #626568; }
.val-estado .ico { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.18); display: flex; align-items: center; justify-content: center; margin: 0 auto 8px; }
.val-estado h1 { margin: 0; font-size: 1.5rem; letter-spacing: .04em; } .val-estado p { margin: 4px 0 0; opacity: .92; }
.val-tit { font-size: 1.25rem; margin: 4px 0 6px; }
.ver-form { display: flex; gap: 8px; margin: 0 0 12px; }
.ver-form input { flex: 1; min-width: 0; font: inherit; font-size: 16px; padding: 10px 12px; border: 1px solid #c9ced6; border-radius: 10px; text-transform: uppercase; letter-spacing: .08em; font-family: ui-monospace, Consolas, monospace; }
.val-tabla { width: 100%; border-collapse: collapse; font-size: .9rem; margin: 6px 0 10px; }
.val-tabla td { padding: 7px 4px; border-bottom: 1px solid #eef0f3; vertical-align: top; }
.val-tabla td:first-child { color: #5d6b7c; width: 34%; }
.val-tabla .sub { color: #5d6b7c; font-weight: 400; font-size: .82rem; }
.val-tabla .mono { font-family: ui-monospace, Consolas, monospace; font-size: .78rem; word-break: break-all; }
.val-reloj { color: #8a94a0; font-size: .75rem; text-align: right; margin-top: 8px; }
.fp-canales { display: flex; flex-wrap: wrap; gap: 8px; }
.fp-canales .fp-btn { flex: 1 1 200px; }
.fp-canales[hidden] { display: none; }
