/* inspección seguridad — mobile first, big touch targets for gloves, high contrast outdoors; print = the PDF report */
:root { --ink: #14202b; --mute: #5b6875; --line: #d7dde3; --bg: #f4f6f8; --card: #fff; --navy: #16324f; --ok: #1f8a4c; --bad: #c0392b; --warn: #b7791f; --hi: #f2b705; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
.wrap { max-width: 860px; margin: 0 auto; padding: 14px 14px 60px; }
h1 { font-size: 1.45rem; line-height: 1.2; margin: .2em 0 .5em; color: var(--navy); }
h2 { font-size: 1.15rem; margin: 1.4em 0 .5em; color: var(--navy); }
h3 { font-size: 1rem; margin: 1em 0 .4em; }
.better { margin: 0 0 .6em; padding-left: 1.1em; }
.better li { margin: .25em 0; }
.lede { background: #fff8e1; border-left: 4px solid var(--hi); padding: .6em .8em; margin: .6em 0; border-radius: 4px; }
.keybar { font-size: .9rem; color: var(--mute); min-height: 1.2em; }
.keybar .on { color: var(--ok); font-weight: 600; }
.keybar .err { color: var(--bad); }
button, select, input { font: inherit; }
button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: .55em .9em; cursor: pointer; min-height: 44px; }
button.go { background: var(--navy); color: #fff; border-color: var(--navy); font-weight: 600; }
button.link { border: 0; background: none; color: var(--navy); text-decoration: underline; padding: 0; min-height: 0; }
.tabs { display: flex; gap: 4px; margin: .8em 0; border-bottom: 2px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; border-radius: 8px 8px 0 0; background: transparent; padding: .6em .9em; white-space: nowrap; }
.tabs button.on { background: var(--navy); color: #fff; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; margin: .6em 0; }
.result { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.badge { font-size: .85rem; color: var(--mute); margin: 0 0 .5em; }
.ban { font-weight: 700; padding: .7em .9em; border-radius: 8px; font-size: 1.05rem; }
.ban.stop { background: var(--bad); color: #fff; }
.ban.fix { background: #fdecc8; color: #6b4300; }
.ban.open { background: #e8edf2; color: var(--ink); }
.ban.ok { background: #d9f2e3; color: #0f5130; }
.tiles { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; margin: .7em 0; }
.tile { background: var(--bg); border-radius: 8px; padding: .5em; text-align: center; }
.tile b { display: block; font-size: 1.35rem; }
.tile span { font-size: .78rem; color: var(--mute); }
.tile.ok b { color: var(--ok); } .tile.bad b { color: var(--bad); }
.finds { list-style: none; padding: 0; margin: 0; }
.finds li { border-top: 1px solid var(--line); padding: .55em 0; }
.finds li.crit b { color: var(--bad); }
.finds .note { color: var(--ink); } .finds .who { color: var(--mute); font-size: .9rem; }
.finds li.none { color: var(--mute); }
.tag { display: inline-block; background: var(--bad); color: #fff; font-size: .7rem; font-weight: 700; padding: .1em .4em; border-radius: 4px; vertical-align: middle; }
.probar { display: flex; flex-wrap: wrap; gap: 8px; margin: .8em 0 .2em; align-items: center; }
.probar .rl { font-size: .9rem; }
.hint { color: var(--mute); font-size: .9rem; }
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-top: 1em; }
.form label { display: flex; flex-direction: column; font-size: .85rem; color: var(--mute); }
.form .full { grid-column: 1 / -1; margin: 0; }
.form input, .form select { padding: .55em; border: 1px solid var(--line); border-radius: 6px; color: var(--ink); min-height: 44px; background: #fff; }
.pts .pt { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 8px 0; }
.pts .pt.bad { border-color: var(--bad); box-shadow: inset 4px 0 0 var(--bad); }
.pq { font-weight: 600; } .pq .n { display: inline-block; min-width: 1.6em; color: var(--mute); }
.owntxt { width: 80%; padding: .4em; border: 1px solid var(--line); border-radius: 6px; }
.vb { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: .5em 0; }
.vb button.on.ok { background: var(--ok); color: #fff; border-color: var(--ok); }
.vb button.on.no { background: var(--bad); color: #fff; border-color: var(--bad); }
.vb button.on.na { background: #6b7785; color: #fff; border-color: #6b7785; }
.pn { display: flex; gap: 6px; flex-wrap: wrap; }
.pn input { flex: 1 1 200px; padding: .5em; border: 1px solid var(--line); border-radius: 6px; min-height: 44px; }
.cam { position: relative; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 0 .8em; min-height: 44px; background: #fff; cursor: pointer; font-size: .92rem; }
.cam input { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.ths { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.ths .th { position: relative; }
.ths img { width: 96px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); background: #e8edf2; }
.ths.small img { width: 120px; height: 80px; }
.ths .x { position: absolute; top: -8px; right: -8px; min-height: 0; width: 26px; height: 26px; padding: 0; border-radius: 50%; background: var(--bad); color: #fff; border: 0; }
.act { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 8px; background: #fdf3f2; padding: 8px; border-radius: 8px; }
.act b { grid-column: 1 / -1; color: var(--bad); font-size: .9rem; }
.act input { padding: .5em; border: 1px solid var(--line); border-radius: 6px; min-height: 40px; width: 100%; }
.act label { font-size: .85rem; color: var(--mute); display: flex; flex-direction: column; }
.sigrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sigbox { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.sigbox > span { font-size: .85rem; color: var(--mute); }
.sigbox input { padding: .5em; border: 1px solid var(--line); border-radius: 6px; }
.sigbox canvas { width: 100%; height: auto; border: 1px dashed #aab4be; border-radius: 6px; touch-action: none; background: #fff; }
.sigex { font: italic 1.4rem/2.8 Georgia, serif; border: 1px dashed #aab4be; border-radius: 6px; padding: 0 .5em; }
.rules { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; margin-top: 1em; }
.rules summary { font-weight: 600; cursor: pointer; }
.rules ul { padding-left: 1.1em; } .rules li { margin: .5em 0; font-size: .92rem; }
.rules q { color: var(--mute); font-style: italic; }
.rules a { word-break: break-all; }
.acts, .due, .hist { list-style: none; padding: 0; }
.acts li, .due li, .hist li { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin: 6px 0; }
.acts li.bad, .due li.bad { border-left: 4px solid var(--bad); }
.hist li.stop { border-left: 4px solid var(--bad); } .hist li.fix { border-left: 4px solid var(--warn); } .hist li.ok { border-left: 4px solid var(--ok); }
.hist button, .acts button { min-height: 36px; padding: .3em .7em; margin-top: 4px; }
.audit { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 10px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.audit input, .audit select { padding: .45em; border: 1px solid var(--line); border-radius: 6px; min-height: 40px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 6px 0; }
.faq summary { font-weight: 600; cursor: pointer; }
.net { color: var(--mute); font-size: .85rem; }
.modal { position: fixed; inset: 0; background: rgba(10, 20, 30, .55); display: flex; align-items: flex-start; justify-content: center; padding: 16px; overflow-y: auto; z-index: 50; }
.modal[hidden] { display: none; }
.modal .box { background: #fff; border-radius: 12px; padding: 18px; max-width: 520px; width: 100%; }
.plans { display: grid; gap: 8px; margin: .8em 0; }
.plan { display: block; border: 2px solid var(--navy); border-radius: 10px; padding: .7em .9em; color: var(--ink); text-decoration: none; }
.plan b { display: block; color: var(--navy); } .plan small { color: var(--mute); }
.key { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: .9rem; }
.key input { flex: 1 1 160px; padding: .5em; border: 1px solid var(--line); border-radius: 6px; min-height: 44px; }
.close { margin-top: .6em; }
.msg { min-height: 1.2em; font-size: .9rem; }
.print { display: none; }
@media (max-width: 560px) {
  h1 { font-size: 1.25rem; }
  .tiles { grid-template-columns: repeat(3, 1fr); }
  .form, .sigrow, .act { grid-template-columns: minmax(0,1fr); }
}
/* ---------- print = the PDF report ---------- */
@media print {
  body.printing > *:not(.print) { display: none !important; }
  body.printing .print { display: block; }
  body { background: #fff; font-size: 11pt; }
  .rep { page-break-after: always; }
  .rep:last-child { page-break-after: auto; }
  .rep h1 { font-size: 16pt; margin: 0 0 6pt; color: #000; }
  .rep h2 { font-size: 12pt; margin: 10pt 0 4pt; color: #000; }
  .rep table { width: 100%; border-collapse: collapse; margin: 4pt 0; }
  .rep th, .rep td { border: 1px solid #999; padding: 3pt 5pt; text-align: left; vertical-align: top; font-size: 10pt; }
  .rep th { background: #eee; }
  .rep tr.bad td { background: #fbe9e7; }
  .rep .rst { font-weight: 700; padding: 4pt 6pt; border: 2px solid #000; }
  .rep .rst.stop { border-color: #c0392b; color: #c0392b; }
  .rep .pp img { width: 150pt; max-height: 110pt; object-fit: cover; margin: 3pt 3pt 0 0; border: 1px solid #999; }
  .rep .sigs { display: flex; gap: 20pt; margin-top: 10pt; }
  .rep .sigs div { flex: 1; border-top: 1px solid #000; padding-top: 3pt; display: flex; flex-direction: column; }
  .rep .sigs img { height: 50pt; width: auto; object-fit: contain; align-self: flex-start; }
  .rep .l2 { color: #555; }
  .rep .tag { background: none; color: #c0392b; border: 1px solid #c0392b; }
  .rep .src, .rep .foot { font-size: 8pt; color: #444; word-break: break-all; }
}
