/* =====================================================================
   CSA Cossio Medellín · página del cliente
   La placa amarilla es la protagonista; todo lo demás es tranquilo.
   ===================================================================== */
:root {
  --plate: #F7D117; --ink: #1B1D20; --graphite: #4A4D52; --steel: #ECEEF1; --paper: #FFFFFF;
  --ok: #1E9E3E; --soft: #5B6068; --line: #D4D7DC; --warn: #B07F00; --bad: #C0231A;
  --font: 'Barlow', 'Segoe UI', Roboto, Arial, sans-serif;
  --cond: 'Barlow Condensed', 'Arial Narrow', 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--steel); font-size: 17px; line-height: 1.5; }
:focus-visible { outline: 3px solid #1A5FD0; outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.page { max-width: 560px; margin: 0 auto; padding: 0 0 calc(32px + env(safe-area-inset-bottom)); background: var(--paper); min-height: 100vh; }
.loading { padding: 48px 24px; color: var(--soft); }

/* Encabezado: la placa */
.hero { background: var(--graphite); color: #fff; padding: calc(28px + env(safe-area-inset-top)) 24px 26px; }
.shop { font-family: var(--cond); font-weight: 600; font-size: 1.05rem; letter-spacing: .02em; color: #D6D8DC; margin: 0 0 18px; }
.plate-big { display: inline-flex; flex-direction: column; align-items: center; background: var(--plate); color: #000; border: 3px solid #000;
  border-radius: 10px; padding: 6px 22px 4px; box-shadow: 0 0 0 3px var(--plate); margin: 3px; }
.plate-big .num { font-family: var(--cond); font-weight: 700; font-size: clamp(2.6rem, 13vw, 3.6rem); line-height: 1; letter-spacing: .06em; }
.plate-big .city { font-family: var(--cond); font-weight: 600; font-size: .78rem; letter-spacing: .3em; margin-top: 2px; }
.model { margin: 16px 0 0; font-size: 1.05rem; color: #E8E9EC; }
.status { margin: 6px 0 0; font-family: var(--cond); font-weight: 700; font-size: 1.9rem; line-height: 1.15; color: #fff; }
.hero .meta { margin: 8px 0 0; color: #D6D8DC; font-size: .98rem; }

/* Secciones */
.sec { padding: 26px 24px; border-bottom: 1px solid var(--line); }
.sec h2 { font-family: var(--cond); font-weight: 700; font-size: 1.45rem; margin: 0 0 12px; line-height: 1.2; }
.sec.attention { background: #FFF8D6; border-left: 6px solid var(--plate); padding-left: 18px; }
.muted { color: var(--soft); }
.small { font-size: .9rem; }

/* Ruta de la moto */
.route { list-style: none; margin: 0; padding: 0; position: relative; }
.route li { position: relative; padding: 0 0 18px 34px; color: var(--soft); }
.route li:last-child { padding-bottom: 0; }
.route li::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: -6px; width: 3px; background: var(--line); }
.route li:last-child::before { display: none; }
.route li.past::before { background: var(--ok); }
.route .dot { position: absolute; left: 0; top: 2px; width: 21px; height: 21px; border-radius: 50%; border: 3px solid var(--line); background: var(--paper); }
.route li.past .dot { border-color: var(--ok); background: var(--ok); }
.route li.past .dot::after { content: '✓'; color: #fff; font-size: 12px; font-weight: 700; position: absolute; inset: 0; display: grid; place-items: center; }
.route li.now { color: var(--ink); font-weight: 600; }
.route li.now .dot { border-color: #000; background: var(--plate); }
.route .when { display: block; font-weight: 400; font-size: .88rem; color: var(--soft); }

/* Avance */
.bar { height: 12px; background: var(--steel); border-radius: 6px; overflow: hidden; margin: 6px 0 14px; }
.bar > span { display: block; height: 100%; background: var(--ok); }
.tasks { list-style: none; padding: 0; margin: 0; }
.tasks li { padding: 6px 0 6px 28px; position: relative; border-bottom: 1px dashed var(--line); }
.tasks li:last-child { border-bottom: 0; }
.tasks li::before { content: '○'; position: absolute; left: 4px; color: var(--soft); }
.tasks li.done::before { content: '✓'; color: var(--ok); font-weight: 700; }
.tasks li.done { color: var(--soft); }

/* Informe técnico */
.report h3 { font-family: var(--cond); font-size: 1.1rem; margin: 14px 0 2px; }
.report h3:first-of-type { margin-top: 0; }
.report p { margin: 0; white-space: pre-wrap; }

/* Cotización y valores */
.lines { width: 100%; border-collapse: collapse; margin: 4px 0 10px; }
.lines td { padding: 7px 0; border-bottom: 1px solid var(--steel); vertical-align: top; }
.lines td.v { text-align: right; white-space: nowrap; padding-left: 12px; font-variant-numeric: tabular-nums; }
.lines tr.sub td { font-weight: 700; border-bottom: 2px solid var(--ink); }
.lines tr.grand td { font-family: var(--cond); font-size: 1.35rem; font-weight: 700; border-bottom: 0; padding-top: 12px; }
.group { font-family: var(--cond); font-weight: 700; font-size: 1.1rem; margin: 14px 0 0; }
.callout { background: var(--steel); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.ok-note { color: var(--ok); font-weight: 600; }

/* Botones */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px; border-radius: 10px; font: 600 1.05rem var(--font);
  border: 2px solid var(--ink); cursor: pointer; text-decoration: none; }
.btn.solid { background: var(--ink); color: #fff; }
.btn.ghost { background: transparent; color: var(--ink); }
.btn.plate { background: var(--plate); color: #000; border-color: #000; }
.btn[disabled] { opacity: .5; cursor: default; }
.actions { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.file-btn input { position: absolute; width: 1px; height: 1px; opacity: 0; }

/* Encuesta */
.nps-scale { display: grid; grid-template-columns: repeat(11, 1fr); gap: 4px; margin: 12px 0 4px; }
.nps-scale button { min-height: 48px; border: 2px solid var(--line); background: var(--paper); border-radius: 8px; font: 700 1.05rem var(--cond); cursor: pointer; padding: 0; }
.nps-scale button[aria-pressed="true"] { background: var(--plate); border-color: #000; }
.nps-ends { display: flex; justify-content: space-between; font-size: .85rem; color: var(--soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chips button { border: 2px solid var(--line); background: var(--paper); border-radius: 999px; padding: 8px 14px; font: 500 .95rem var(--font); cursor: pointer; min-height: 44px; }
.chips button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
textarea { width: 100%; min-height: 90px; border: 2px solid var(--line); border-radius: 8px; padding: 10px; font: inherit; }
@media (max-width: 380px) { .nps-scale { grid-template-columns: repeat(6, 1fr); } }

/* Pie */
.foot { padding: 26px 24px 8px; color: var(--soft); font-size: .92rem; }
.foot a { color: var(--ink); }
.foot .actions { margin: 0 0 16px; }

/* Política */
.doc { padding: 26px 24px; }
.doc h1, .doc h2 { font-family: var(--cond); line-height: 1.2; }
.doc h2 { font-size: 1.9rem; margin-top: 0; }
.doc h3 { font-family: var(--cond); font-size: 1.3rem; margin: 26px 0 8px; }
.doc .md-table { overflow-x: auto; }
.doc table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; text-align: left; vertical-align: top; }
.doc blockquote { margin: 10px 0; padding: 10px 14px; background: var(--steel); border-left: 4px solid var(--plate); }

/* Mensajes */
.toast { position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: #fff;
  padding: 12px 18px; border-radius: 10px; max-width: calc(100% - 32px); z-index: 10; }
.confirm { border: 0; border-radius: 12px; padding: 22px; max-width: 420px; width: calc(100% - 32px); }
.confirm::backdrop { background: rgba(27, 29, 32, .55); }
.confirm h2 { font-family: var(--cond); margin: 0 0 8px; }
.confirm-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
