:root {
  --ink: #16212e; --muted: #5d6b7a; --line: #d9e0e7; --bg: #f3f5f7; --card: #fff;
  --brand: #0f3d6e; --brand-2: #1763b0; --ok: #1a7f4e; --ok-bg: #e4f4ea; --warn: #9a5b00; --warn-bg: #fdf1d8;
  --bad: #b3261e; --bad-bg: #fbe5e3; --field: #fff7d6; --field-line: #d9b100; --unos: #e6f0fb;
  --r: 10px; --serif: Georgia, 'Times New Roman', serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font: 15px/1.45 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: var(--ink); background: var(--bg); }
h1 { font-size: 22px; margin: 0 0 4px; } h2 { font-size: 17px; margin: 0 0 10px; } h3 { font-size: 14px; margin: 0 0 6px; }
a { color: var(--brand-2); }
p { margin: 0 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12.5px; } .right { text-align: right; } .mono { font-family: ui-monospace, Menlo, monospace; font-size: 12px; word-break: break-all; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .sp { height: 14px; }

button, .btn { font: inherit; font-weight: 600; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 13px; border-radius: 8px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
button:hover, .btn:hover { border-color: #b4bfca; }
button.pri { background: var(--brand); border-color: var(--brand); color: #fff; } button.pri:hover { background: #0b3058; }
button.ok { background: var(--ok); border-color: var(--ok); color: #fff; }
button.danger { color: var(--bad); } button.link { border: 0; background: none; padding: 0; color: var(--brand-2); font-weight: 500; }
button.sm { padding: 4px 9px; font-size: 13px; } button:disabled { opacity: .5; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline: 2px solid var(--brand-2); outline-offset: 1px; }
input, select, textarea { font: inherit; color: inherit; border: 1px solid #c3ccd6; border-radius: 8px; padding: 8px 10px; background: #fff; width: 100%; }
label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 4px; } .f { margin-bottom: 12px; }
.err { background: var(--bad-bg); color: var(--bad); padding: 8px 11px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.info { background: var(--unos); padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }
.warnbox { background: var(--warn-bg); color: #5c3700; padding: 9px 12px; border-radius: 8px; margin-bottom: 12px; font-size: 14px; }

.top { background: var(--brand); color: #fff; padding: 0 16px; display: flex; align-items: center; gap: 6px; height: 52px; position: sticky; top: 0; z-index: 20; }
.top .logo { font-weight: 800; letter-spacing: .3px; margin-right: 14px; color: #fff; text-decoration: none; } .top .logo span { font-weight: 400; opacity: .8; }
.top nav { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.top nav a { color: #dbe7f5; text-decoration: none; padding: 7px 10px; border-radius: 7px; font-size: 14px; white-space: nowrap; }
.top nav a.on, .top nav a:hover { background: rgba(255,255,255,.15); color: #fff; }
.top .who { font-size: 13px; opacity: .9; white-space: nowrap; } .top button { background: transparent; color: #fff; border-color: rgba(255,255,255,.35); padding: 5px 10px; font-size: 13px; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 20px 16px 60px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: 14px; }
.auth { max-width: 420px; margin: 6vh auto; padding: 0 16px; } .auth .brand { text-align: center; margin-bottom: 18px; } .auth .brand b { font-size: 24px; color: var(--brand); }

.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 99px; background: #e8ecf0; color: #3c4855; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.unos { background: var(--unos); color: var(--brand); }
.tabs { display: flex; gap: 4px; margin: 12px 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 8px 12px; color: var(--muted); }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.doc-item { display: flex; gap: 12px; align-items: center; padding: 13px 14px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); margin-bottom: 8px; cursor: pointer; text-decoration: none; color: inherit; }
.doc-item:hover { border-color: var(--brand-2); } .doc-item .t { font-weight: 650; }
table.list { width: 100%; border-collapse: collapse; } table.list th, table.list td { text-align: left; padding: 8px 8px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 14px; } table.list th { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.scroll-x { overflow-x: auto; }

/* Visor de documento */
.viewer { display: flex; flex-direction: column; height: calc(100dvh - 52px); }
.vbar { background: #fff; border-bottom: 1px solid var(--line); padding: 8px 14px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.vbar .ttl { font-weight: 700; margin-right: 4px; } .vbar .acts { display: flex; gap: 6px; flex-wrap: wrap; margin-left: auto; }
.status { background: #fff; border-bottom: 1px solid var(--line); padding: 6px 14px; font-size: 13.5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.savebar { background: var(--warn-bg); border-bottom: 1px solid #ecd9a5; padding: 7px 14px; display: flex; gap: 10px; align-items: center; font-size: 14px; flex-wrap: wrap; }
.fieldbar { background: var(--unos); border-bottom: 1px solid #c9dcf1; padding: 6px 14px; display: flex; gap: 10px; align-items: center; font-size: 13.5px; flex-wrap: wrap; }
.vmain { flex: 1; display: flex; min-height: 0; }
.stage { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; padding: 14px 10px 0; }
.sheet { background: #e7e4dc; border: 1px solid var(--line); border-radius: 8px; overflow: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; width: 100%; flex: 1; min-height: 0; padding: 14px 10px; }
.sheet:focus-visible { outline: 2px solid var(--amber); outline-offset: -2px; }
.paper { margin: 0 auto; }
.pg { position: relative; box-sizing: border-box; background: #fff; border: 1px solid #cdc7b8; box-shadow: 0 2px 10px rgba(20,20,20,.14); margin: 0 0 26px; }
.pg:last-child { margin-bottom: 4px; }
.pg + .pg::before { content: ''; position: absolute; left: -10px; right: -10px; top: -14px; border-top: 1px dashed #9d9788; }
.pgh { position: absolute; top: 16px; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-bottom: 7px; border-bottom: 2px solid var(--amber); font: 11px/1.2 -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--muted); }
.pgh img { height: 22px; display: block; } .pgh span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.pgf { position: absolute; bottom: 16px; display: flex; justify-content: space-between; gap: 12px; padding-top: 7px; border-top: 1px solid #b9c2cc; font: 11px/1.2 -apple-system, 'Segoe UI', Arial, sans-serif; color: var(--muted); font-variant-numeric: tabular-nums; }
.pgf .pgn { font-weight: 600; color: var(--ink); white-space: nowrap; }
.flow { font-family: var(--serif); font-size: 14px; line-height: 1.55; }
.flow p { margin: 0 0 .7em; text-align: justify; overflow-wrap: anywhere; } .flow p.b { font-weight: 700; text-align: left; } .flow p.c { text-align: center; } .flow p.small { font-size: 11.5px; color: var(--muted); }
.flow p.li { padding-left: 1.5em; text-indent: -1em; } .flow p.li.l1 { padding-left: 3em; }
.flow table { width: 100%; border-collapse: collapse; margin: 0 0 1em; font-size: 13px; font-family: -apple-system, 'Segoe UI', Arial, sans-serif; }
.flow td, .flow th { border: 1px solid #b9c2cc; padding: 5px 7px; vertical-align: top; text-align: left; overflow-wrap: anywhere; } .flow th, .flow tr.hd td { background: #eef2f6; font-weight: 700; }
.flow .brk { display: none; }
.flow .ptitle { font-weight: 700; font-family: -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 13px; margin-bottom: 4px; }
.fld { font-family: -apple-system, 'Segoe UI', Arial, sans-serif; font-size: 13px; width: auto; max-width: 100%; padding: 1px 6px; border: 1px solid var(--field-line); background: var(--field); border-radius: 5px; text-indent: 0; }
.fld.up { text-transform: uppercase; } .fld::placeholder { color: #8a7a3a; text-transform: none; }
.val { background: #eef2f6; border-radius: 4px; padding: 0 4px; cursor: pointer; text-indent: 0; } .val.unos { background: var(--unos); } .val.empty { background: var(--bad-bg); color: var(--bad); font-family: -apple-system, Arial, sans-serif; font-size: 12px; }
.val.act, .fld.act { box-shadow: 0 0 0 2px var(--brand-2); } .hasnote { border-bottom: 2px dotted var(--bad); }
.pricing input { border: 1px solid var(--field-line); background: var(--field); padding: 2px 5px; border-radius: 4px; font-size: 13px; min-width: 60px; }
.pricing .x { border: 0; background: none; color: var(--bad); padding: 0 4px; font-size: 15px; }
.signs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 1.2em 0; break-inside: avoid; font-family: -apple-system, 'Segoe UI', Arial, sans-serif; }
.sig { text-align: center; font-size: 12px; } .sig .co { font-weight: 700; font-size: 11.5px; min-height: 2.4em; } .sig .ink { height: 46px; font-size: 30px; line-height: 46px; color: #12306b; white-space: nowrap; overflow: hidden; border-bottom: 1px solid var(--ink); margin: 0 8px 4px; } .sig .pend { color: var(--warn); }
.pager .sep { width: 1px; align-self: stretch; background: var(--line); margin: 0 4px; } .pager #pn { min-width: 62px; justify-content: center; }
.pager { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: center; padding: 9px 0 max(9px, env(safe-area-inset-bottom)); } .pager .n { font-variant-numeric: tabular-nums; }
.side { width: 360px; max-width: 100%; background: #fff; border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; }
.side .hd { padding: 11px 14px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 8px; } .side .hd h2 { margin: 0; flex: 1; }
.side .bd { padding: 14px; overflow-y: auto; flex: 1; }
.ver { border-left: 3px solid var(--line); padding: 0 0 12px 11px; margin-left: 4px; } .ver .chg { font-size: 13px; margin-top: 4px; } .ver del { color: var(--bad); background: var(--bad-bg); text-decoration: line-through; padding: 0 3px; border-radius: 3px; } .ver ins { color: var(--ok); background: var(--ok-bg); text-decoration: none; padding: 0 3px; border-radius: 3px; }
.note { border: 1px solid var(--line); border-radius: 8px; padding: 9px 10px; margin-bottom: 8px; font-size: 14px; } .note.done { opacity: .55; } .note .k { font-size: 12px; font-weight: 700; color: var(--brand); cursor: pointer; }

#modal:empty { display: none; }
#modal { position: fixed; inset: 0; background: rgba(15,25,40,.5); z-index: 50; display: flex; align-items: center; justify-content: center; padding: 14px; }
.dlg { background: #fff; border-radius: 14px; padding: 20px; width: 100%; max-width: 520px; max-height: 94dvh; overflow-y: auto; }
.fonts { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 12px; }
.fonts label { display: flex; align-items: center; gap: 10px; border: 1px solid var(--line); border-radius: 9px; padding: 4px 12px; margin: 0; cursor: pointer; font-weight: 400; }
.fonts label:has(input:checked) { border-color: var(--brand-2); background: var(--unos); } .fonts input { width: auto; }
.fonts .pv { font-size: 28px; line-height: 44px; height: 44px; color: #12306b; white-space: nowrap; overflow: hidden; flex: 1; } .fonts .fn { font-size: 11px; color: var(--muted); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; } .seg button { border: 0; border-radius: 0; padding: 6px 12px; } .seg button.on { background: var(--brand); color: #fff; }
.otp { font-size: 26px; letter-spacing: 8px; text-align: center; font-variant-numeric: tabular-nums; }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: #16212e; color: #fff; padding: 10px 16px; border-radius: 9px; font-size: 14px; z-index: 60; opacity: 0; pointer-events: none; transition: opacity .2s; max-width: 92vw; } #toast.on { opacity: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
pre.mail { white-space: pre-wrap; font: 13px/1.45 ui-monospace, Menlo, monospace; background: #f6f8fa; padding: 10px; border-radius: 8px; margin: 6px 0 0; overflow-wrap: anywhere; }

@media (max-width: 860px) {
  .side { position: fixed; inset: 52px 0 0 0; width: 100%; z-index: 30; border-left: 0; }
  .grid2 { grid-template-columns: 1fr; } .top .who { display: none; }
  .vbar .ttl { width: 100%; } .vbar .acts { margin-left: 0; } .stage { padding: 8px 6px 0; }
  .flow { font-size: 13.5px; } .signs { grid-template-columns: 1fr; }
}
@media (max-width: 860px) { .sheet { padding: 8px 6px; } }
[hidden] { display: none !important; }
@media (max-width: 1100px) { .top .who { display: none; } }
.pricing, .flow table { break-inside: avoid; }
.pricing button { font-family: -apple-system, 'Segoe UI', Arial, sans-serif; }
.pricing .ptitle input { width: 100%; font-weight: 700; }

/* ---- Identidad UNOSIOT: negro + ámbar del logo ---- */
:root { --brand: #111111; --brand-2: #8a6200; --amber: #fbc200; --amber-d: #e0ac00; --unos: #f4f1e8; --field: #fff8dc; --field-line: #e0ac00; --bg: #f5f4f1; }
.top { background: #fff; color: var(--ink); border-bottom: 3px solid var(--amber); height: 56px; }
.top .logo { display: flex; align-items: center; gap: 9px; color: var(--ink); } .top .logo img { height: 26px; display: block; } .top .logo span { font-weight: 600; opacity: 1; color: var(--muted); font-size: 13px; letter-spacing: .6px; text-transform: uppercase; border-left: 1px solid var(--line); padding-left: 9px; }
.top nav a { color: #3a3a3a; } .top nav a.on { background: var(--amber); color: #111; font-weight: 650; } .top nav a:hover { background: #f1efe8; color: #111; } .top nav a.on:hover { background: var(--amber); }
.top button { color: var(--ink); border-color: var(--line); }
.viewer { height: calc(100dvh - 56px); }
button.pri, .pri-l { background: var(--amber) !important; border-color: var(--amber-d) !important; color: #111 !important; } button.pri:hover, .pri-l:hover { background: var(--amber-d) !important; }
.tabs button.on { color: #111; border-bottom-color: var(--amber); }
.seg button.on { background: #111; color: var(--amber); }
.pill.unos { background: #111; color: var(--amber); }
.doc-item:hover { border-color: var(--amber-d); }
.fonts label:has(input:checked) { border-color: var(--amber-d); background: var(--field); }
.val.unos { background: #ecebe6; } .val.act, .fld.act { box-shadow: 0 0 0 2px #111; }
.fieldbar { background: #111; color: #fff; border-bottom: 0; } .fieldbar button:not(.pri) { background: transparent; color: #fff; border-color: #555; }
.info { background: var(--field); border-left: 3px solid var(--amber); }
.auth .brand img { height: 46px; } .auth .brand .muted { margin-top: 8px; letter-spacing: .4px; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, a:focus-visible { outline-color: #111; }
@media (max-width: 860px) { .side { inset: 56px 0 0 0; } .top .logo span { display: none; } }
@media (max-width: 860px) { .doc-item { flex-wrap: wrap; } .doc-item .grow { flex-basis: 100%; } .tabs { scrollbar-width: none; } }

/* Firma a mano alzada y marca de agua */
.sig .ink { position: relative; height: 58px; line-height: 58px; }
.ink .wm { position: absolute; inset: 0; font: 8px/11px -apple-system, Arial, sans-serif; color: #c2c2c2; white-space: normal; word-break: break-all; text-align: left; overflow: hidden; user-select: none; }
.ink .tx, .ink svg { position: relative; z-index: 1; } .ink svg { height: 100%; max-width: 100%; display: block; margin: 0 auto; }
.ink polyline { fill: none; stroke: #12306b; stroke-width: 9; stroke-linecap: round; stroke-linejoin: round; }
.dlg.wide { max-width: 680px; }
.pad { border: 2px dashed var(--amber-d); border-radius: 10px; overflow: hidden; background: #fff; }
.pad canvas { display: block; width: 100%; aspect-ratio: 10 / 3; touch-action: none; cursor: crosshair; }
.sig .ink:has(svg) { height: 78px; }

/* Firmantes en Nuevo documento */
.srow { display: grid; grid-template-columns: 1.3fr 1.5fr 1fr 1.2fr auto; gap: 0 10px; align-items: end; padding: 10px 12px 0; margin-bottom: 8px; border: 1px solid var(--line); border-radius: 9px; background: #fbfaf7; }
.srow > button { margin-bottom: 12px; }
@media (max-width: 860px) { .srow { grid-template-columns: 1fr 1fr; } .srow > button { justify-self: start; } }

/* Consentimientos, cámara y páginas legales */
.chk { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: 14px; margin: 0 0 12px; cursor: pointer; }
.chk input { width: 18px; height: 18px; flex: none; margin-top: 2px; accent-color: #111; }
.cam { display: flex; gap: 12px; align-items: center; margin: 0 0 10px; }
.camview { width: 150px; height: 112px; flex: none; background: #111; border-radius: 9px; overflow: hidden; }
.camview video, .camview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.camview video { transform: scaleX(-1); }
.camside { display: flex; flex-direction: column; gap: 7px; align-items: flex-start; }
.evi { display: flex; gap: 10px; align-items: flex-start; } .evi img { width: 64px; height: 64px; object-fit: cover; border-radius: 7px; flex: none; }
.legal h1 { margin-bottom: 2px; } .legal h3 { margin-top: 16px; } .legal p { max-width: 68ch; }

/* Texto de autorización al firmar: 30% más chico que el resto */
#cf .chk { font-size: 70%; line-height: 1.4; }

/* Estatus de firmas: panel lateral izquierdo */
.signbar { width: 250px; flex: none; background: #fff; border-right: 1px solid var(--line); padding: 16px 16px 18px; overflow-y: auto; }
.signbar h3 { margin: 0 0 12px; font-size: 12px; letter-spacing: .6px; text-transform: uppercase; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; }
.signbar h3 .cnt { font-weight: 600; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.signbar ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.signbar li { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.35; }
.signbar li b { font-weight: 650; overflow-wrap: anywhere; }
.signbar .dot { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%; border: 2px solid var(--amber-d); display: grid; place-items: center; font-size: 11px; font-weight: 700; line-height: 1; }
.signbar li.ok .dot { background: var(--ok, #1d7a46); border-color: var(--ok, #1d7a46); color: #fff; }
.signbar .who { font-size: 12px; color: var(--muted); }
.signbar .st { font-size: 12px; margin-top: 1px; font-variant-numeric: tabular-nums; } .signbar li.ok .st { color: var(--ok, #1d7a46); } .signbar li.wait .st { color: var(--warn, #8a5a00); }
.signbar .sum { margin: 14px 0 0; padding-top: 12px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.signbar .sum:empty { display: none; }
@media (max-width: 860px) {
  .vmain { flex-direction: column; }
  .signbar { width: 100%; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px 14px; max-height: 30vh; }
  .signbar h3 { margin-bottom: 8px; } .signbar ul { flex-direction: row; flex-wrap: nowrap; gap: 18px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: thin; } .signbar li { flex: none; max-width: 78vw; } .signbar h3 { margin-bottom: 6px; } .signbar .who { display: none; }
  .signbar .sum { margin-top: 6px; padding-top: 6px; }
  .signbar { max-height: 26vh; } .stage { min-height: 0; width: 100%; }
}
.signbar .me { margin: 14px 0 0; padding: 9px 10px; background: #fbfaf7; border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; line-height: 1.4; overflow-wrap: anywhere; } .signbar .you { font-size: 10.5px; padding: 0 6px; vertical-align: 1px; }
@media (max-width: 860px) { .signbar .me { margin-top: 6px; padding: 6px 9px; } }
@media (max-width: 860px) { .flow table { table-layout: fixed; } .flow td .fld, .pricing input { width: 100%; min-width: 0; box-sizing: border-box; } }
.pricing textarea { display: block; width: 100%; box-sizing: border-box; font: inherit; font-size: 13px; line-height: 1.35; border: 1px solid var(--field-line); background: var(--field); padding: 2px 5px; border-radius: 4px; resize: vertical; field-sizing: content; min-height: 24px; }
.pricing.xp td.xc { width: 26px; padding: 2px; text-align: center; border-color: transparent; background: none; } .pricing.xp tr.hd td.xc { background: none; }

/* Captura de fotografías al firmar: silueta guía, avance de la prueba de movimiento y miniaturas */
.cam { align-items: flex-start; flex-wrap: wrap; }
.camview { position: relative; width: min(320px, 100%); height: auto; aspect-ratio: 4 / 3; }
.camview svg { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: #fff; stroke-width: 2.5; stroke-dasharray: 7 6; stroke-linecap: round; opacity: .92; pointer-events: none; filter: drop-shadow(0 0 2px rgba(0,0,0,.6)); }
.camview svg text { fill: #fff; stroke: none; font: 700 17px -apple-system, 'Segoe UI', Arial, sans-serif; }
.cambar { position: absolute; left: 10px; right: 10px; bottom: 10px; height: 7px; border-radius: 4px; background: rgba(255,255,255,.35); overflow: hidden; }
.cambar i { display: block; height: 100%; width: 0; background: var(--amber); transition: width .12s linear; }
.camside { flex: 1; min-width: 190px; gap: 8px; } .camside b { font-size: 14px; }
.thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.thumb { position: relative; display: block; } .thumb img { width: 76px; height: 57px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); display: block; }
.thumb button { position: absolute; right: -6px; top: -6px; width: 22px; height: 22px; padding: 0; border-radius: 50%; justify-content: center; font-size: 13px; line-height: 1; background: #fff; }
.evcfg { margin: 14px 0 0; font-size: 12.5px; } .evcfg label { display: block; font-weight: 600; margin-bottom: 4px; color: var(--muted); } .evcfg select { width: 100%; font-size: 13px; padding: 5px 8px; }
@media (max-width: 860px) { .evcfg { margin-top: 8px; display: flex; gap: 8px; align-items: center; } .evcfg label { margin: 0; white-space: nowrap; } }

/* Traspaso al teléfono por código QR */
.qrbox { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: 0 0 10px; padding: 10px 12px; border: 1px dashed var(--line); border-radius: 9px; background: #fbfaf7; }
.qrbox > span, .qrbox > div:last-child { flex: 1; min-width: 200px; }
.qr { width: 148px; height: 148px; flex: none; background: #fff; padding: 6px; border: 1px solid var(--line); border-radius: 8px; } .qr svg { width: 100%; height: 100%; display: block; }

/* Validación en vivo de contraseña y confirmación */
.pwmsg { display: flex; flex-wrap: wrap; gap: 2px 14px; margin-top: 6px; line-height: 1.5; }
.pwmsg:empty { display: none; }
.pwmsg .ok { color: var(--ok); } .pwmsg .no { color: var(--bad); font-weight: 600; } .pwmsg .bad { color: var(--bad); font-weight: 600; flex-basis: 100%; } .pwmsg .ok:last-child { flex-basis: 100%; font-weight: 600; }

/* Ojo para mostrar u ocultar la contraseña */
.pwwrap { position: relative; } .pwwrap input { width: 100%; padding-right: 42px; }
.eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); border: 0; background: none; padding: 7px; color: var(--muted); border-radius: 6px; }
.eye:hover { color: var(--ink); border: 0; } .eye .slash { display: none; } .eye.on { color: var(--ink); } .eye.on .slash { display: block; }

/* El video ocupa todo el recuadro (Safari no resuelve alturas en % dentro de aspect-ratio) */
.camview video { position: absolute; inset: 0; width: 100%; height: 100%; }
.camview.tap::after { content: "Toca aquí para activar la cámara"; position: absolute; inset: auto 0 0 0; padding: 10px; text-align: center; color: #111; background: var(--amber); font-weight: 600; font-size: 13px; cursor: pointer; }
.doc-item .co { font-size: 13.5px; font-weight: 600; margin: 1px 0 2px; } .doc-item .co .muted { font-weight: 400; }

/* Tablas con campos: se ajustan al ancho de la hoja (los campos ocupan su celda en lugar de ensancharla) */
.flow table { table-layout: fixed; }
.flow td .fld, .pricing input { width: 100%; min-width: 0; box-sizing: border-box; }
.flow td { overflow-wrap: break-word; word-break: normal; }
.pricing tr.hd td:empty { width: 30px; padding: 2px; } .pricing td:has(> .x:only-child) { padding: 2px; text-align: center; }
