/* =========================================================================
   INSPECCIAUTOS S.A.S. — Identidad gráfica y sistema de diseño
   Paleta derivada del logo: negro tinta + magenta INSPECCIAUTOS + blanco.
   ========================================================================= */
:root {
  /* marca */
  --marca: #E0187F;
  --marca-hi: #C4107C;
  --marca-soft: #FDEBF4;
  --marca-line: #F8C9E1;
  --tinta: #111113;
  --tinta-2: #26262B;

  /* superficies */
  --bg: #F3F4F6;
  --surface: #FFFFFF;
  --surface-2: #F8F8FA;
  --line: #E4E4E8;
  --line-2: #D3D3D9;

  /* texto */
  --ink: #17171A;
  --ink-soft: #63636E;
  --ink-mute: #8A8A96;

  /* estados */
  --ok: #15803D;
  --ok-soft: #E7F6EC;
  --warn: #B45309;
  --warn-soft: #FDF3E3;
  --err: #C62828;
  --err-soft: #FCEDED;
  --info: #1D4ED8;
  --info-soft: #EAF0FE;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow: 0 1px 2px rgba(17,17,19,.05), 0 8px 24px -16px rgba(17,17,19,.35);
  --shadow-lg: 0 20px 50px -20px rgba(17,17,19,.45);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-num: "Segoe UI", ui-monospace, "SF Mono", Consolas, monospace;

  box-sizing: border-box;
  padding-top: env(safe-area-inset-top, 0px);
}
* , *::before, *::after { box-sizing: inherit; }
html { scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 14.5px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, .display {
  font-family: var(--font);
  font-weight: 800;
  letter-spacing: -.02em;
}
.mono, .num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
a { color: var(--marca-hi); }
::selection { background: var(--marca); color: #fff; }
#app { min-height: 100%; }
.scrollx { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 8px; top: 8px; background: #fff; padding: 8px 12px; z-index: 999; }

/* ---------------- formularios ---------------- */
input, select, textarea {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 15px;
  font-family: inherit;
  width: 100%;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}
input:hover, select:hover, textarea:hover { border-color: #BFBFC7; }
input:focus, select:focus, textarea:focus {
  border-color: var(--marca);
  box-shadow: 0 0 0 3px var(--marca-soft);
}
input[readonly] { background: var(--surface-2); color: var(--ink-soft); }
textarea { resize: vertical; min-height: 76px; line-height: 1.5; }
input[type="checkbox"], input[type="radio"] { width: auto; transform: scale(1.15); accent-color: var(--marca); }
input::placeholder, textarea::placeholder { color: var(--ink-mute); }
label.field-label {
  display: block; font-size: 11px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-soft); margin-bottom: 5px; font-weight: 700;
}
.field { margin-bottom: 14px; }
.field-hint { font-size: 11.5px; color: var(--ink-mute); margin-top: 4px; }
.req::after { content: " *"; color: var(--marca); }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px,1fr)); gap: 12px; }

/* ---------------- botones ---------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px 17px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700;
  cursor: pointer; border: 1px solid transparent; background: transparent; color: var(--ink);
  font-family: inherit; white-space: nowrap; text-decoration: none;
  transition: filter .15s ease, background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary { background: var(--marca); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--marca-hi); }
.btn-dark { background: var(--tinta); color: #fff; }
.btn-dark:hover:not(:disabled) { background: var(--tinta-2); }
.btn-outline { border-color: var(--line-2); background: var(--surface); }
.btn-outline:hover:not(:disabled) { border-color: var(--marca); color: var(--marca-hi); }
.btn-ghost { color: var(--ink-soft); }
.btn-ghost:hover:not(:disabled) { color: var(--ink); background: var(--surface-2); }
.btn-danger { border-color: var(--err); color: var(--err); }
.btn-danger:hover:not(:disabled) { background: var(--err); color: #fff; }
.btn-sm { padding: 6px 11px; font-size: 12.5px; }
.btn-lg { padding: 13px 22px; font-size: 15.5px; }
.btn-block { width: 100%; }

/* ---------------- tarjetas / secciones ---------------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
}
.card-pad { padding: 20px; }
.section-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  color: var(--marca-hi); border-bottom: 2px solid var(--marca-line);
  padding-bottom: 8px; margin: 0 0 16px;
}
.section-title::before { content: ""; width: 6px; height: 14px; background: var(--marca); border-radius: 2px; }
.section-note { font-size: 12.5px; color: var(--ink-soft); margin: -8px 0 14px; }

/* ---------------- pills / chips ---------------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 100px; font-size: 11.5px; font-weight: 800;
  letter-spacing: .02em; white-space: nowrap;
}
.pill-admin { background: var(--tinta); color: #FFD6EA; }
.pill-inspector { background: var(--marca-soft); color: var(--marca-hi); border: 1px solid var(--marca-line); }
.pill-ok { background: var(--ok-soft); color: var(--ok); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-err { background: var(--err-soft); color: var(--err); }
.pill-info { background: var(--info-soft); color: var(--info); }
.pill-mute { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }
.consecutivo {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--marca-soft); border: 2px solid var(--marca);
  border-radius: var(--radius-sm); padding: 6px 16px; line-height: 1.15;
}
.consecutivo small { font-size: 9.5px; font-weight: 800; letter-spacing: .1em; color: var(--marca-hi); }
.consecutivo b { font-family: var(--font-num); font-size: 17px; color: var(--tinta); }

/* ---------------- tablas ---------------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th {
  text-align: left; font-size: 10.5px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 800; padding: 11px 14px;
  border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap;
}
td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.actions { text-align: right; white-space: nowrap; }
.empty {
  padding: 34px 20px; text-align: center; color: var(--ink-soft); font-size: 14px;
}
.empty b { display: block; color: var(--ink); font-size: 15px; margin-bottom: 4px; }

/* ---------------- navegación / shell ---------------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 246px; flex: none; background: var(--tinta); color: #fff;
  display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh;
}
.brand-block { padding: 16px 16px 14px; border-bottom: 1px solid #2A2A30; }
.brand-logo {
  background: #fff; border-radius: 8px; padding: 7px 9px; display: block;
}
.brand-logo img { display: block; width: 100%; height: auto; }
.brand-sub {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #8C8C99; margin-top: 9px; font-weight: 700;
}
.nav { flex: 1; padding: 12px 0; overflow-y: auto; }
.nav-eyebrow {
  font-size: 9.5px; letter-spacing: .16em; text-transform: uppercase;
  color: #6E6E7A; font-weight: 800; padding: 10px 20px 6px;
}
.navlink {
  display: flex; align-items: center; gap: 11px; padding: 10px 18px; margin: 1px 8px;
  border-radius: 8px; color: #C9C9D4; font-size: 14px; font-weight: 600;
  cursor: pointer; border: none; background: none; width: calc(100% - 16px);
  text-align: left; font-family: inherit;
}
.navlink:hover { background: #1E1E23; color: #fff; }
.navlink.active { background: var(--marca); color: #fff; box-shadow: 0 6px 18px -8px var(--marca); }
.navlink .ico { width: 18px; text-align: center; font-size: 15px; opacity: .9; }
.navlink .badge {
  margin-left: auto; background: rgba(255,255,255,.16); color: #fff;
  border-radius: 100px; font-size: 10.5px; padding: 1px 7px; font-weight: 800;
}
.sidebar-foot { padding: 14px 16px calc(14px + env(safe-area-inset-bottom,0px)); border-top: 1px solid #2A2A30; }
.user-name { font-size: 13.5px; font-weight: 700; color: #fff; }
.user-role { margin: 6px 0 10px; }
.main { flex: 1; min-width: 0; padding: 24px 28px 72px; max-width: 1180px; }

.topbar { display: none; }

/* ---------------- encabezados de vista ---------------- */
.view-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 14px; flex-wrap: wrap; margin-bottom: 18px;
}
.view-head h1 { font-size: 23px; margin: 0 0 3px; }
.view-head p { color: var(--ink-soft); font-size: 13.5px; margin: 0; }
.head-actions { display: flex; gap: 9px; flex-wrap: wrap; }

/* ---------------- KPIs / dashboard ---------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px,1fr)); gap: 13px; margin-bottom: 20px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 15px 17px; position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--marca); }
.kpi.k-dark::after { background: var(--tinta); }
.kpi.k-ok::after { background: var(--ok); }
.kpi.k-warn::after { background: var(--warn); }
.kpi-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; margin-top: 3px; line-height: 1; }
.kpi-foot { font-size: 11.5px; color: var(--ink-mute); margin-top: 6px; }
.dash-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; margin-bottom: 18px; }
.chart-bars { display: flex; align-items: flex-end; gap: 10px; height: 168px; padding-top: 8px; }
.chart-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart-bar { width: 100%; max-width: 44px; background: linear-gradient(180deg, var(--marca), var(--marca-hi)); border-radius: 5px 5px 0 0; min-height: 3px; position: relative; }
.chart-bar b { position: absolute; top: -18px; left: 0; right: 0; text-align: center; font-size: 11px; color: var(--ink-soft); }
.chart-bar.zero { background: var(--line); }
.chart-x { font-size: 10.5px; color: var(--ink-mute); font-weight: 700; text-transform: uppercase; }
.rank-row { display: flex; align-items: center; gap: 11px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.rank-row:last-child { border-bottom: none; }
.rank-avatar {
  width: 32px; height: 32px; border-radius: 50%; background: var(--marca-soft);
  color: var(--marca-hi); display: grid; place-items: center; font-weight: 800; font-size: 12.5px; flex: none;
}
.rank-name { font-weight: 600; font-size: 13.5px; }
.rank-bar { flex: 1; height: 7px; background: var(--surface-2); border-radius: 100px; overflow: hidden; min-width: 60px; }
.rank-bar i { display: block; height: 100%; background: var(--marca); border-radius: 100px; }
.rank-val { font-weight: 800; font-size: 13px; min-width: 26px; text-align: right; }

/* ---------------- asistente de peritaje ---------------- */
.stepper { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; margin-bottom: 18px; }
.step {
  flex: 1; min-width: 122px; border: 1px solid var(--line); background: var(--surface);
  border-radius: var(--radius-sm); padding: 9px 11px; cursor: pointer; text-align: left;
  font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink-soft);
  display: flex; align-items: center; gap: 8px;
}
.step:hover { border-color: var(--marca-line); }
.step .n {
  width: 21px; height: 21px; border-radius: 50%; background: var(--surface-2);
  color: var(--ink-soft); display: grid; place-items: center; font-size: 11px; flex: none;
}
.step.active { border-color: var(--marca); background: var(--marca-soft); color: var(--marca-hi); }
.step.active .n { background: var(--marca); color: #fff; }
.step.done .n { background: var(--ok); color: #fff; }
.step.done { color: var(--ink); }
.wizard-foot {
  display: flex; justify-content: space-between; gap: 10px; margin-top: 18px;
  padding-top: 16px; border-top: 1px solid var(--line); flex-wrap: wrap;
}
.wizard-foot .right { display: flex; gap: 9px; margin-left: auto; flex-wrap: wrap; }

/* ---------------- checklist (revisión visual / mecánica) ---------------- */
.legend { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.legend-item {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 100px;
  padding: 3px 10px; color: var(--ink-soft); font-weight: 600;
}
.legend-item b { font-family: var(--font-num); color: var(--ink); }
.check-toolbar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  flex-wrap: wrap; margin-bottom: 10px;
}
.apply-all { display: flex; align-items: center; gap: 7px; }
.apply-all select { width: auto; min-width: 128px; padding: 6px 9px; font-size: 13px; }
.check-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px,1fr)); gap: 7px; }
.check-row {
  display: flex; align-items: center; gap: 9px; background: var(--surface-2);
  border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 9px;
}
.check-row .name { flex: 1; font-size: 13px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.check-row select, .check-row input { width: auto; min-width: 92px; padding: 5px 7px; font-size: 12.5px; font-weight: 700; }
.check-row input.marca-input { min-width: 84px; text-transform: uppercase; }
.section-block { margin-bottom: 22px; }
.section-block h3 {
  font-size: 12px; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 9px;
  color: var(--tinta); display: flex; align-items: center; gap: 8px;
}
.section-block h3 .count { color: var(--ink-mute); font-weight: 700; font-size: 11px; letter-spacing: 0; }

/* ---------------- fotos ---------------- */
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(158px,1fr)); gap: 12px; }
.photo-frame label { display: block; }
.photo-box {
  border: 1.5px dashed var(--line-2); border-radius: var(--radius-sm); background: var(--surface-2);
  aspect-ratio: 4/3; display: grid; place-items: center; overflow: hidden; position: relative;
  cursor: pointer; text-align: center; padding: 6px;
}
.photo-box:hover { border-color: var(--marca); background: var(--marca-soft); }
.photo-box img { width: 100%; height: 100%; object-fit: cover; }
.photo-box .hint { font-size: 11.5px; color: var(--ink-mute); font-weight: 600; }
.photo-box .del {
  position: absolute; top: 5px; right: 5px; background: var(--tinta); color: #fff;
  border: none; border-radius: 6px; width: 24px; height: 24px; cursor: pointer; font-size: 13px; line-height: 1;
}
.photo-box input[type=file] { display: none; }
.storage-bar { height: 6px; background: var(--surface-2); border-radius: 100px; overflow: hidden; margin-top: 6px; }
.storage-bar i { display: block; height: 100%; background: var(--ok); }
.storage-bar.warn i { background: var(--warn); }
.storage-bar.danger i { background: var(--err); }

/* ---------------- detalle ---------------- */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 15px 18px; }
.dt-label { font-size: 10px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-mute); }
.dt-value { font-size: 14.5px; margin-top: 2px; word-break: break-word; }
.dt-value.empty-v { color: var(--ink-mute); }
.state-tag { font-weight: 800; font-family: var(--font-num); font-size: 12px; padding: 2px 7px; border-radius: 5px; }
.st-ok { background: var(--ok-soft); color: var(--ok); }
.st-warn { background: var(--warn-soft); color: var(--warn); }
.st-err { background: var(--err-soft); color: var(--err); }
.st-mute { background: var(--surface-2); color: var(--ink-soft); border: 1px solid var(--line); }

/* ---------------- filtros ---------------- */
.filters {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 15px 17px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.filters-row { display: flex; gap: 11px; flex-wrap: wrap; align-items: flex-end; }
.filters-row .field { margin-bottom: 0; min-width: 150px; flex: 1; }
.filters-row .field.w-fixed { flex: 0 0 168px; }
.filters-actions { display: flex; gap: 8px; }

/* ---------------- modal / toast ---------------- */
.modal-backdrop {
  position: fixed; inset: 0; background: rgba(17,17,19,.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center; z-index: 300; padding: 16px;
  animation: fade .15s ease;
}
.modal {
  background: var(--surface); border-radius: 14px; width: 100%; max-width: 520px;
  padding: 22px; box-shadow: var(--shadow-lg); max-height: 90vh; overflow-y: auto;
  animation: pop .18s cubic-bezier(.2,.9,.3,1.2);
}
.modal.modal-lg { max-width: 760px; }
.modal.modal-firma { max-width: 640px; }
.firma-canvas-wrap {
  border: 1px solid var(--line); border-radius: 10px; overflow: hidden;
  background: #fff; box-shadow: inset 0 1px 4px rgba(17,17,19,.06);
}
.firma-canvas-wrap canvas {
  display: block; width: 100%; height: auto; touch-action: none;
  cursor: crosshair;
}
.firma-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.firma-card {
  border: 1px solid var(--line); border-radius: 10px; padding: 10px;
  background: var(--surface); display: flex; flex-direction: column; gap: 8px;
}
.firma-preview {
  height: 76px; border: 1px dashed var(--line); border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; overflow: hidden;
}
.firma-preview img { max-width: 100%; max-height: 72px; object-fit: contain; }
.firma-preview span { color: var(--ink-mute); font-size: 12.5px; }
.firma-meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.firma-meta b { font-size: 11.5px; letter-spacing: .04em; color: var(--ink-soft); }
.modal h2 { font-size: 18px; margin: 0 0 6px; }
.modal .modal-sub { color: var(--ink-soft); font-size: 13.5px; margin: 0 0 16px; }
.modal-actions { display: flex; gap: 9px; justify-content: flex-end; margin-top: 20px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.toast {
  position: fixed; bottom: calc(20px + env(safe-area-inset-bottom,0px)); left: 50%;
  transform: translateX(-50%); background: var(--tinta); color: #fff;
  padding: 11px 19px; border-radius: 100px; font-size: 13.5px; font-weight: 600;
  z-index: 400; box-shadow: var(--shadow-lg); opacity: 0; pointer-events: none;
  transition: opacity .2s ease, bottom .2s ease; max-width: 92vw; text-align: center;
}
.toast.show { opacity: 1; bottom: calc(34px + env(safe-area-inset-bottom,0px)); }
.toast.err { background: var(--err); }
.toast.ok { background: var(--ok); }

/* ---------------- resultado de guardado ---------------- */
.result-files { display: grid; gap: 10px; margin-top: 6px; }
.result-file {
  display: flex; align-items: center; gap: 12px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); padding: 12px 14px; background: var(--surface-2);
}
.result-file .ico {
  width: 38px; height: 38px; border-radius: 9px; background: var(--marca); color: #fff;
  display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none;
}
.result-file .meta { flex: 1; min-width: 0; }
.result-file .meta b { display: block; font-size: 13.5px; }
.result-file .meta span { font-size: 12px; color: var(--ink-soft); word-break: break-all; }

/* ---------------- login / consulta pública ---------------- */
.auth-wrap {
  min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr;
}
.auth-side {
  background: var(--tinta); color: #fff; padding: 46px; display: flex; flex-direction: column;
  justify-content: space-between; position: relative; overflow: hidden;
}
.auth-side::after {
  content: ""; position: absolute; right: -120px; bottom: -120px; width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(224,24,127,.42), transparent 65%);
}
.auth-side .logo-card { background: #fff; border-radius: 12px; padding: 16px 18px; max-width: 430px; }
.auth-side .logo-card img { width: 100%; display: block; }
.auth-side h1 { font-size: 34px; line-height: 1.1; margin: 34px 0 12px; max-width: 460px; }
.auth-side h1 em { color: var(--marca); font-style: normal; }
.auth-side p { color: #A9A9B6; font-size: 15px; max-width: 430px; margin: 0; }
.auth-side .features { display: grid; gap: 11px; margin-top: 26px; position: relative; z-index: 1; }
.auth-feature { display: flex; gap: 11px; align-items: flex-start; font-size: 13.5px; color: #D4D4DE; }
.auth-feature .tick {
  width: 21px; height: 21px; border-radius: 50%; background: var(--marca); color: #fff;
  display: grid; place-items: center; font-size: 11px; flex: none; font-weight: 800;
}
.auth-form { display: flex; align-items: center; justify-content: center; padding: 34px 26px; }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h2 { font-size: 24px; margin: 0 0 5px; }
.auth-card .sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 24px; }
.auth-hint {
  font-size: 12.5px; color: var(--ink-soft); background: var(--surface-2);
  border: 1px dashed var(--line-2); border-radius: var(--radius-sm); padding: 11px 13px; line-height: 1.6;
}
.auth-hint code { font-family: var(--font-num); background: #fff; border: 1px solid var(--line); padding: 1px 5px; border-radius: 4px; }
.auth-alt { display: flex; gap: 10px; margin-top: 14px; }
.auth-foot { text-align: center; font-size: 12px; color: var(--ink-mute); margin-top: 22px; line-height: 1.6; }
.mobile-brand { display: none; }

/* ---------------- consulta de cliente ---------------- */
.public-brand { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.public-brand img { height: 54px; }
.public-brand .t b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.01em; }
.public-brand .t span { font-size: 11.5px; color: var(--ink-soft); letter-spacing: .06em; text-transform: uppercase; }
.contact-strip { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 12px; margin-top: 16px; }
.contact-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.contact-item .dt-label { margin-bottom: 3px; }
.contact-item a { font-weight: 700; text-decoration: none; }

/* ---------------- responsive ---------------- */
@media (max-width: 980px) {
  .dash-grid { grid-template-columns: 1fr; }
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-side { display: none; }
  .mobile-brand { display: flex; }
}
@media (max-width: 860px) {
  .shell { display: block; }
  .sidebar {
    position: fixed; z-index: 250; left: 0; top: 0; bottom: 0; height: 100%;
    transform: translateX(-100%); transition: transform .22s ease; width: 268px;
  }
  .sidebar.open { transform: none; box-shadow: var(--shadow-lg); }
  .sidebar-scrim { position: fixed; inset: 0; background: rgba(17,17,19,.5); z-index: 240; }
  .topbar {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 200;
    background: var(--tinta); color: #fff; padding: 10px 14px;
    padding-top: calc(10px + env(safe-area-inset-top,0px));
  }
  .topbar button.burger { background: none; border: none; color: #fff; font-size: 21px; cursor: pointer; padding: 2px 6px; }
  .topbar .tb-title { font-weight: 800; font-size: 15px; flex: 1; }
  .topbar .tb-logo { height: 30px; background: #fff; border-radius: 5px; padding: 3px 6px; }
  .main { padding: 18px 15px 70px; }
  .view-head h1 { font-size: 20px; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
  .kpi-value { font-size: 25px; }
  .filters-row .field, .filters-row .field.w-fixed { flex: 1 1 100%; }
  .check-grid { grid-template-columns: 1fr; }
  .btn { padding: 10px 14px; }
}

/* ---------------- Guía Fasecolda: selector en cascada (paso 5) ---------------- */
.fc-visor { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; margin-top: 8px; }
.fc-filtros {
  background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 14px; align-self: start; position: sticky; top: 12px;
}
.fc-f-tit { font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; color: var(--ink); margin-bottom: 10px; }
.fc-f-campo { margin-bottom: 12px; }
.fc-f-campo label { display: block; font-size: 11px; font-weight: 700; letter-spacing: .05em; color: var(--ink-soft); margin-bottom: 5px; }
.fc-f-campo select {
  width: 100%; padding: 9px 10px; font-size: 13.5px; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--surface); color: var(--ink); font-family: inherit;
}
.fc-f-campo select:disabled { background: var(--surface-2); color: var(--ink-mute); }
.fc-estado { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.fc-estado button {
  padding: 9px 6px; font-size: 13.5px; font-weight: 700; border: 1px solid var(--line-2);
  border-radius: 8px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-family: inherit;
}
.fc-estado button.on { background: var(--marca); border-color: var(--marca); color: #fff; }
.fc-limpiar { width: 100%; margin-top: 2px; }
.fc-busca { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.fc-busca input {
  flex: 1; min-width: 0; padding: 11px 13px; font-size: 14px; border: 1px solid var(--line-2);
  border-radius: 9px; background: var(--surface); color: var(--ink); font-family: inherit;
}
.fc-cuenta { font-size: 12.5px; color: var(--ink-mute); white-space: nowrap; font-weight: 600; }
.fc-carga {
  font-size: 13px; color: var(--ink-soft); background: var(--surface-2); border: 1px dashed var(--line-2);
  border-radius: 8px; padding: 10px 12px; margin-bottom: 10px;
}
.fc-carga.err { color: var(--err); background: var(--err-soft); border-color: var(--err); }
.fc-hint { font-size: 13px; color: var(--ink-soft); background: var(--surface-2); border: 1px dashed var(--line-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 10px; }
.fc-lista { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; align-content: start; }
.fc-card {
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  padding: 13px 14px; display: flex; flex-direction: column; gap: 8px;
}
.fc-card.sin-valor { background: var(--surface-2); }
.fc-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fc-card-cod { font-size: 12px; font-weight: 700; color: var(--marca-hi); letter-spacing: .03em; }
.fc-card-tit { font-size: 14.5px; font-weight: 800; line-height: 1.3; color: var(--ink); }
.fc-card-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; font-size: 12.5px; color: var(--ink-soft); }
.fc-card-val { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.fc-card-modelo { font-size: 12.5px; color: var(--ink-mute); }
.fc-card-precio { font-size: 17px; font-weight: 800; color: var(--ink); }
.fc-card-precio i { color: var(--ink-mute); font-weight: 600; }
.fc-card .btn { align-self: flex-start; }

/* ---------------- Catálogo Fasecolda (admin) ---------------- */
.cat-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin: 14px 0 12px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cat-tab {
  padding: 8px 16px; font-size: 13.5px; font-weight: 700; border: 1px solid var(--line-2);
  border-radius: 999px; background: var(--surface); color: var(--ink-soft); cursor: pointer; font-family: inherit;
}
.cat-tab.active { background: var(--marca); border-color: var(--marca); color: #fff; }
.cat-filtros { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.cat-filtros input, .cat-filtros select {
  padding: 9px 11px; font-size: 13.5px; border: 1px solid var(--line-2); border-radius: 8px;
  background: var(--surface); color: var(--ink); font-family: inherit;
}
.cat-filtros input { flex: 1; min-width: 200px; }
.cat-cuenta { font-size: 12.5px; color: var(--ink-mute); font-weight: 600; margin-left: auto; }
.cat-pag { display: flex; gap: 12px; align-items: center; justify-content: center; margin-top: 12px; font-size: 13px; color: var(--ink-soft); }
.cat-anios { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-anio-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; font-size: 13px;
  font-weight: 700; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 999px; color: var(--ink);
}
.cat-anio-chip.extra { background: var(--marca-soft); border-color: var(--marca-line); color: var(--marca-hi); }
.cat-anio-chip.off { background: var(--err-soft); border-color: var(--err); color: var(--err); text-decoration: line-through; }
.cat-anio-chip button { border: none; background: none; cursor: pointer; font-size: 14px; line-height: 1; color: inherit; padding: 0 2px; }
.cat-anios-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.cat-anio-in { display: flex; flex-direction: column; gap: 3px; }
.cat-anio-in span { font-size: 11.5px; font-weight: 700; color: var(--ink-soft); }
.cat-anio-in input {
  padding: 7px 8px; font-size: 13px; border: 1px solid var(--line-2); border-radius: 7px;
  background: var(--surface); color: var(--ink); text-align: right; font-family: inherit;
}
.cat-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.modal.modal-xl { max-width: 940px; max-height: 92vh; overflow-y: auto; }

@media (max-width: 860px) {
  .fc-visor { grid-template-columns: 1fr; }
  .fc-filtros { position: static; }
}

/* ---------------- impresión (hoja CARTA) ---------------- */
@page { size: letter; margin: 12mm; }
@media print {
  html, body { background: #fff; }
  body { font-size: 11px; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .sidebar, .topbar, .view-head, .wizard-foot, .stepper, .no-print, .toast, .filters { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; max-width: none; }
  .card { border: none; box-shadow: none; padding: 0; }
  .card[hidden] { display: none !important; }
}
