/* Layout: panel lateral carbón con el logo + área de trabajo clara; en celular, barra inferior. */
:root {
  --ink: #17181b;
  --ink-2: #4a4c53;
  --ink-3: #7c7f87;
  --bg: #f3f3f1;
  --surface: #ffffff;
  --surface-2: #f8f8f6;
  --line: #e2e2de;
  --line-2: #d0d0cb;
  --red: #d8262c;
  --red-ink: #b81d22;
  --red-soft: #fbe9e9;
  --rail: #ffffff;
  --rail-2: #f1f1ee;
  --rail-ink: #4a4c53;
  --carbon: #0b0b0c;
  --good: #1f8a4c;
  --good-soft: #e5f4ea;
  --warn: #b26a00;
  --warn-soft: #fdf1dc;
  --bad: #c42127;
  --bad-soft: #fbe6e6;
  --info: #2a5db0;
  --info-soft: #e7eefa;
  --wa: #1fa855;
  --wa-bg: #efe7dd;
  --wa-out: #d9fdd3;
  --wa-in: #ffffff;
  --shadow: 0 1px 2px rgba(20, 20, 24, .06), 0 4px 16px rgba(20, 20, 24, .06);
  --f-display: "Saira Semi Condensed", "Arial Narrow", system-ui, sans-serif;
  --f-body: "Barlow", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "JetBrains Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 10px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #ececea; --ink-2: #b9bbbf; --ink-3: #8b8e95;
    --bg: #121315; --surface: #1b1c1f; --surface-2: #222327;
    --line: #2e3034; --line-2: #3a3c41;
    --red: #ec4046; --red-ink: #ff6b70; --red-soft: #3a1b1d;
    --rail: #0c0c0e; --rail-2: #1a1b1e; --rail-ink: #b5b7bc;
    --good: #45c27a; --good-soft: #15301f; --warn: #e6a23c; --warn-soft: #34270f;
    --bad: #f0575c; --bad-soft: #3a1a1b; --info: #6f9be6; --info-soft: #18243a;
    --wa-bg: #0d1418; --wa-out: #005c4b; --wa-in: #1f2c33;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #ececea; --ink-2: #b9bbbf; --ink-3: #8b8e95;
  --bg: #121315; --surface: #1b1c1f; --surface-2: #222327;
  --line: #2e3034; --line-2: #3a3c41;
  --red: #ec4046; --red-ink: #ff6b70; --red-soft: #3a1b1d;
  --rail: #0c0c0e; --rail-2: #1a1b1e; --rail-ink: #b5b7bc;
  --good: #45c27a; --good-soft: #15301f; --warn: #e6a23c; --warn-soft: #34270f;
  --bad: #f0575c; --bad-soft: #3a1a1b; --info: #6f9be6; --info-soft: #18243a;
  --wa-bg: #0d1418; --wa-out: #005c4b; --wa-in: #1f2c33;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 4px 16px rgba(0,0,0,.3);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.5 var(--f-body); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { font-family: var(--f-display); margin: 0; line-height: 1.15; text-wrap: balance; font-weight: 600; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.3rem; }
h3 { font-size: 1.05rem; }
p { margin: 0; }
a { color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.mono { font-family: var(--f-mono); font-size: .88em; letter-spacing: -.01em; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
.small { font-size: .85rem; }
.eyebrow { font: 600 .72rem/1 var(--f-body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.between { justify-content: space-between; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.stack.lg { gap: 20px; }
.grow { flex: 1; min-width: 0; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 900px) { .grid4 { grid-template-columns: repeat(2, minmax(0,1fr)); } .grid3 { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .grid2, .grid4 { grid-template-columns: 1fr; } }

/* ---------- Botones y controles ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); padding: 9px 16px; border-radius: 8px; font-weight: 600; cursor: pointer; min-height: 40px; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--red); border-color: var(--red); color: #fff; }
.btn.primary:hover { background: var(--red-ink); border-color: var(--red-ink); }
.btn.dark { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.lg { min-height: 52px; padding: 12px 22px; font-size: 1.02rem; }
.btn.sm { min-height: 32px; padding: 5px 10px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 18px; height: 18px; flex: none; }

label.f { display: flex; flex-direction: column; gap: 5px; font-size: .82rem; font-weight: 600; color: var(--ink-2); min-width: 0; }
.input, select.input, textarea.input { width: 100%; border: 1px solid var(--line-2); background: var(--surface); border-radius: 8px; padding: 9px 12px; min-height: 42px; font-weight: 400; font-size: .95rem; color: var(--ink); }
textarea.input { min-height: 80px; resize: vertical; }
.input:focus { outline: none; border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.req::after { content: " *"; color: var(--red); }

.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 7px 12px; min-height: 36px; font-weight: 600; font-size: .85rem; cursor: pointer; color: var(--ink-2); }
.seg button + button { border-left: 1px solid var(--line-2); }
.seg button.on-ok { background: var(--good); color: #fff; }
.seg button.on-bad { background: var(--bad); color: #fff; }
.seg button.on-na { background: var(--ink-3); color: #fff; }
.seg button.on { background: var(--ink); color: var(--bg); }

.check { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--red); }

/* ---------- Pills de estado ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 99px; font-size: .78rem; font-weight: 600; white-space: nowrap; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.recibido { background: var(--info-soft); color: var(--info); border-color: transparent; }
.pill.instalacion { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.pill.revision { background: #efe6fb; color: #6b3fb5; border-color: transparent; }
.pill.listo { background: var(--good-soft); color: var(--good); border-color: transparent; }
.pill.entregado { background: var(--surface-2); color: var(--ink-2); }
.pill.devuelta { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
:root[data-theme="dark"] .pill.revision { background: #2b2140; color: #b79af0; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .pill.revision { background: #2b2140; color: #b79af0; } }
.tag { display: inline-block; padding: 2px 8px; border-radius: 5px; font-size: .75rem; font-weight: 600; background: var(--surface-2); border: 1px solid var(--line); color: var(--ink-2); }
.tag.red { background: var(--red-soft); color: var(--red-ink); border-color: transparent; }
.tag.good { background: var(--good-soft); color: var(--good); border-color: transparent; }
.tag.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }

/* ---------- Placa ---------- */
.plate { display: inline-flex; align-items: center; font: 700 .86rem/1 var(--f-mono); letter-spacing: .06em; padding: 4px 8px 4px 8px; border: 1.5px solid var(--ink); border-radius: 4px; background: var(--surface); color: var(--ink); white-space: nowrap; position: relative; }
.plate::before { content: "HN"; font-size: .55rem; letter-spacing: .04em; background: #1b4ea3; color: #fff; padding: 2px 3px; margin-right: 6px; border-radius: 2px; }

/* ---------- Login ---------- */
.login { min-height: 100%; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.login-brand { background: var(--carbon); color: #fff; padding-block: 48px; padding-left: max(40px, env(safe-area-inset-left, 0px)); padding-right: 40px; display: flex; flex-direction: column; justify-content: space-between; gap: 32px; position: relative; overflow: hidden; }
.login-brand img { width: 240px; max-width: 100%; }
.login-brand h1 { font-size: clamp(2rem, 4vw, 3.1rem); color: #fff; font-weight: 700; line-height: 1.05; max-width: 14ch; }
.login-brand h1 em { font-style: normal; color: var(--red); }
.login-brand p { color: #a9abb1; max-width: 42ch; }
.login-brand .route { position: absolute; right: -60px; bottom: -40px; width: 420px; opacity: .5; pointer-events: none; }
.login-side { padding-block: 48px; padding-left: max(16px, 40px); padding-right: max(16px, env(safe-area-inset-right, 0px), 40px); display: flex; flex-direction: column; justify-content: center; gap: 22px; max-width: 560px; }
.user-list { display: flex; flex-direction: column; gap: 8px; }
.user-pick { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; text-align: left; width: 100%; }
.user-pick:hover, .user-pick.sel { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }
.avatar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; font: 700 .9rem/1 var(--f-display); color: #fff; background: var(--ink-2); flex: none; }
.avatar.sm { width: 30px; height: 30px; font-size: .75rem; }
@media (max-width: 820px) {
  .login { grid-template-columns: 1fr; }
  .login-brand { padding-block: 28px; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .login-brand h1 { font-size: 1.9rem; }
  .login-brand .route { display: none; }
  .login-side { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 24px 40px; }
}

/* ---------- App shell ---------- */
.shell { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100%; }
.rail { background: var(--rail); color: var(--rail-ink); border-right: 1px solid var(--line); display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; padding-left: env(safe-area-inset-left, 0px); }
.rail-logo { padding: 18px 18px 14px; border-bottom: 1px solid var(--line); }
.rail-logo img { width: 168px; display: block; }
.rail nav { display: flex; flex-direction: column; gap: 2px; padding: 12px 10px; flex: 1; overflow-y: auto; }
.rail .nav-h { font: 600 .66rem/1 var(--f-body); letter-spacing: .14em; text-transform: uppercase; color: #6d6f76; padding: 14px 10px 6px; }
.nav-a { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 7px; color: var(--rail-ink); text-decoration: none; font-weight: 500; font-size: .93rem; cursor: pointer; border: 0; background: none; text-align: left; width: 100%; }
.nav-a svg { width: 18px; height: 18px; flex: none; opacity: .8; }
.nav-a:hover { background: var(--rail-2); color: var(--ink); }
.nav-a.on { background: var(--red-soft); color: var(--red-ink); box-shadow: inset 3px 0 0 var(--red); }
.nav-a .badge { margin-left: auto; background: var(--red); color: #fff; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 99px; }
.rail-user { padding: 12px 14px; border-top: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.rail-user .grow div:first-child { color: var(--ink); font-weight: 600; font-size: .9rem; }
.rail-user .grow div:last-child { font-size: .76rem; color: #8a8c93; }
.rail-user button { background: none; border: 0; color: #8a8c93; cursor: pointer; padding: 6px; border-radius: 6px; }
.rail-user button:hover { color: var(--ink); background: var(--rail-2); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: var(--bg); border-bottom: 1px solid var(--line); padding-block: 12px; padding-left: max(16px, 28px); padding-right: max(16px, env(safe-area-inset-right, 0px), 28px); display: flex; align-items: center; gap: 14px; }
.topbar .crumbs { font-size: .85rem; color: var(--ink-3); }
.topbar .crumbs b { color: var(--ink); font-weight: 600; }
.topbar .mobile-logo { display: none; }
.topbar .search { margin-left: auto; position: relative; width: min(320px, 40vw); }
.topbar .search input { padding-left: 36px; min-height: 38px; }
.topbar .search svg { position: absolute; left: 11px; top: 10px; width: 17px; color: var(--ink-3); }
.search-res { position: absolute; top: 44px; left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; z-index: 30; max-height: 360px; overflow: auto; }
.search-res button { display: flex; gap: 10px; align-items: center; width: 100%; padding: 8px; border: 0; background: none; border-radius: 6px; cursor: pointer; text-align: left; }
.search-res button:hover { background: var(--surface-2); }
.icon-btn { position: relative; width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 8px; cursor: pointer; color: var(--ink-2); flex: none; }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 8px; height: 8px; background: var(--red); border-radius: 50%; border: 2px solid var(--surface); }
.page { padding-block: 24px 48px; padding-left: max(16px, 28px); padding-right: max(16px, env(safe-area-inset-right, 0px), 28px); display: flex; flex-direction: column; gap: 20px; max-width: 1320px; width: 100%; }
.page-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-h .sub { color: var(--ink-3); margin-top: 4px; }

.bottomnav { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); background: var(--rail); border-bottom-color: var(--line); color: var(--ink); }
  body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--rail); }
  .topbar .crumbs { display: none; }
  .topbar .mobile-logo { display: block; height: 30px; }
  .topbar .search { display: none; }
  .topbar .icon-btn { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
  .topbar .icon-btn .dot { border-color: var(--surface-2); }
  .topbar .spacer { margin-left: auto; }
  .page { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); padding-block: 18px 96px; }
  .bottomnav { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: var(--surface); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom, 0px); padding-left: env(safe-area-inset-left, 0px); padding-right: env(safe-area-inset-right, 0px); }
  .bottomnav button { flex: 1; border: 0; background: none; padding: 8px 2px 9px; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .7rem; font-weight: 600; color: var(--ink-3); cursor: pointer; position: relative; }
  .bottomnav button svg { width: 21px; height: 21px; }
  .bottomnav button.on { color: var(--red); }
  .bottomnav .badge { position: absolute; top: 4px; left: calc(50% + 6px); background: var(--red); color: #fff; font-size: .62rem; padding: 0 5px; border-radius: 99px; }
}

/* ---------- Superficies ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.card-b { padding: 18px; }
.card-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card-h h3 { font-size: 1rem; }
.sec-title { display: flex; align-items: baseline; gap: 10px; }
.sec-title .n { font: 700 .95rem/1 var(--f-display); color: var(--red); }
.evidence { border: 1.5px solid var(--red); }
.evidence > .card-h { background: var(--red-soft); border-bottom-color: transparent; border-radius: 9px 9px 0 0; }

.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .v { font: 600 2rem/1.05 var(--f-display); font-variant-numeric: tabular-nums; }
.kpi .v small { font-size: .95rem; color: var(--ink-3); font-weight: 500; margin-left: 2px; }
.kpi .d { font-size: .8rem; color: var(--ink-3); }
.kpi .d .up { color: var(--good); font-weight: 600; }
.kpi .d .dn { color: var(--bad); font-weight: 600; }

/* ---------- Tablas ---------- */
.tbl-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .9rem; }
.tbl th { text-align: left; font: 600 .7rem/1 var(--f-body); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding: 12px 14px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--surface-2); }
.tbl td { padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover td { background: var(--surface-2); }
.tbl .r { text-align: right; }

/* ---------- Tablero de estados (kanban) ---------- */
.board { display: grid; grid-template-columns: repeat(5, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 6px; }
.lane { background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); display: flex; flex-direction: column; min-width: 0; }
.lane-h { padding: 12px 14px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--line); }
.lane-h b { font-family: var(--f-display); font-weight: 600; }
.lane-b { padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.ocard { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 7px; text-align: left; width: 100%; }
.ocard:hover { border-color: var(--ink-3); }
.ocard.late { box-shadow: inset 3px 0 0 var(--warn); }
.ocard.back { box-shadow: inset 3px 0 0 var(--bad); }

/* ---------- Wizard ---------- */
.steps { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.step { display: flex; align-items: center; gap: 8px; padding: 8px 12px 8px 8px; border-radius: 99px; background: var(--surface); border: 1px solid var(--line); font-size: .85rem; font-weight: 600; color: var(--ink-3); white-space: nowrap; cursor: pointer; }
.step i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--line-2); font-size: .75rem; }
.step.on { color: var(--ink); border-color: var(--ink); }
.step.on i { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.step.done { color: var(--ink-2); }
.step.done i { background: var(--good); color: #fff; border-color: var(--good); }
.wiz-foot { position: sticky; bottom: 0; background: var(--bg); border-top: 1px solid var(--line); padding-block: 12px; display: flex; gap: 10px; justify-content: space-between; z-index: 5; }
@media (max-width: 860px) { .wiz-foot { bottom: calc(58px + env(safe-area-inset-bottom, 0px)); } }
@media (max-width: 520px) { .wiz-foot .btn { min-width: 0; } .wiz-foot #wz-next { flex: 1 1 0; white-space: normal; line-height: 1.2; text-align: left; } }

/* ---------- Fotos ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.shot { aspect-ratio: 4/3; max-width: 100%; border: 1.5px dashed var(--line-2); border-radius: 9px; background: var(--surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; cursor: pointer; color: var(--ink-3); font-size: .82rem; font-weight: 600; position: relative; overflow: hidden; padding: 6px; text-align: center; }
.shot svg { width: 26px; height: 26px; }
.shot:hover { border-color: var(--red); color: var(--red-ink); }
.shot.has { border-style: solid; border-color: var(--line); padding: 0; }
.shot.has img { width: 100%; height: 100%; object-fit: cover; display: block; }
.shot .lbl { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.65); color: #fff; font-size: .7rem; padding: 2px 7px; border-radius: 4px; }
.shot .ok { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border-radius: 50%; background: var(--good); color: #fff; display: grid; place-items: center; }
.shot .ok svg { width: 14px; height: 14px; }
.shot.req-miss { border-color: var(--red); }
.thumbs { display: flex; gap: 6px; flex-wrap: wrap; }
.thumbs img { width: 76px; height: 57px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); cursor: zoom-in; }

/* ---------- Diagrama de daños ---------- */
.diagram-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 16px; }
@media (max-width: 760px) { .diagram-wrap { grid-template-columns: 1fr; } }
.diagram { background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px; position: relative; max-width: 100%; }
.diagram svg { width: 100%; height: auto; display: block; cursor: default; }
.diagram svg.ro { cursor: default; }
.car-line { fill: var(--surface); stroke: var(--ink-2); stroke-width: 1.6; stroke-linejoin: round; }
.car-glass { fill: color-mix(in srgb, var(--info) 14%, var(--surface-2)); stroke: var(--ink-3); stroke-width: 1.2; stroke-linejoin: round; }
.car-det { fill: none; stroke: var(--ink-3); stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; }
.car-hd { fill: var(--ink-3); }
.car-spoke { fill: none; stroke: var(--ink-3); stroke-width: 2.2; stroke-linecap: round; }
.car-tire { fill: var(--ink-2); }
.car-well { fill: var(--ink-2); opacity: .5; }
.car-rim { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1; }
.car-lite { fill: color-mix(in srgb, var(--warn) 22%, var(--surface)); stroke: var(--ink-3); stroke-width: 1.1; }
.car-tail { fill: color-mix(in srgb, var(--red) 45%, var(--surface)); stroke: var(--ink-3); stroke-width: 1.1; }
.car-grille { fill: var(--line); stroke: var(--ink-3); stroke-width: 1.1; }
.car-plate { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1; }
.car-bed { fill: var(--surface-2); stroke: var(--ink-3); stroke-width: 1.1; }
.car-shadow { fill: var(--ink-3); opacity: .16; }
.car-sep { stroke: var(--line); stroke-width: 1; stroke-dasharray: 3 4; }
.diagram svg .car * { vector-effect: non-scaling-stroke; }
.diagram svg:not(.ro) .car { cursor: crosshair; }
.diagram svg:not(.ro) .car:hover .car-line { fill: color-mix(in srgb, var(--red) 5%, var(--surface)); }
.diagram svg text { pointer-events: none; }
.car-txt { fill: var(--ink-3); font: 600 11px var(--f-body); letter-spacing: .1em; }
.car-kind { fill: var(--ink-2); font-weight: 700; }
.dmg-legend { display: flex; gap: 12px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.dmg-dot { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; color: #fff; font: 700 .68rem/1 var(--f-body); }
.dmg-golpe { background: var(--red); }
.dmg-rayon { background: #c77700; }
.dmg-abolladura { background: #5b46c2; }
.dmg-otro { background: var(--ink-2); }
.dmg-list { display: flex; flex-direction: column; gap: 8px; }
.dmg-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); }

/* ---------- Checklist eléctrico ---------- */
.chk-list { display: flex; flex-direction: column; }
.chk-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 14px; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); }
.chk-row:last-child { border-bottom: 0; }
.chk-row .nm { font-weight: 600; }
.chk-row .prev { font-size: .78rem; color: var(--ink-3); }
.chk-row.diff { background: var(--warn-soft); margin-inline: -12px; padding-inline: 12px; border-radius: 6px; }
.chk-row .note { grid-column: 1 / -1; }
@media (max-width: 520px) { .chk-row { grid-template-columns: 1fr; } }

/* ---------- Firma ---------- */
.sig { border: 1.5px solid var(--line-2); border-radius: 10px; background: #fff; position: relative; touch-action: none; }
.sig canvas { width: 100%; height: 190px; display: block; border-radius: 10px; cursor: crosshair; }
.sig .base { position: absolute; left: 24px; right: 24px; bottom: 44px; border-top: 1px solid #bbb; pointer-events: none; }
.sig .hint { position: absolute; left: 24px; bottom: 20px; font-size: .75rem; color: #888; pointer-events: none; }
.sig .clear { position: absolute; top: 8px; right: 8px; }
.sig-img { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px; height: 90px; display: flex; align-items: center; justify-content: center; }
.sig-img img { max-height: 78px; }

/* ---------- Timeline ---------- */
.tl { display: flex; flex-direction: column; }
.tl-i { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; position: relative; padding-bottom: 14px; }
.tl-i::before { content: ""; position: absolute; left: 10px; top: 20px; bottom: 0; width: 2px; background: var(--line); }
.tl-i:last-child::before { display: none; }
.tl-i .dot { width: 22px; height: 22px; border-radius: 50%; background: var(--surface); border: 2px solid var(--line-2); display: grid; place-items: center; }
.tl-i.done .dot { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tl-i.cur .dot { border-color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.tl-i .dot svg { width: 12px; height: 12px; }
.tl-i .t { font-weight: 600; font-size: .9rem; }
.tl-i .m { font-size: .78rem; color: var(--ink-3); }

/* ---------- Pruebas GPS ---------- */
.test { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.test .ic { width: 42px; height: 42px; border-radius: 10px; background: var(--surface-2); display: grid; place-items: center; color: var(--ink-2); }
.test .ic svg { width: 22px; height: 22px; }
.test.ok { border-color: var(--good); }
.test.ok .ic { background: var(--good-soft); color: var(--good); }
.test .res { grid-column: 1 / -1; }
.minimap { border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.minimap svg { display: block; width: 100%; height: auto; }
.spin { width: 18px; height: 18px; border: 2.5px solid var(--line-2); border-top-color: var(--red); border-radius: 50%; animation: sp .8s linear infinite; display: inline-block; }
@keyframes sp { to { transform: rotate(360deg); } }

/* ---------- Gráficos ---------- */
.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-r { display: grid; grid-template-columns: 128px minmax(0, 1fr) 58px; gap: 12px; align-items: center; font-size: .86rem; position: relative; }
.bar-l { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-r .v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.meter { height: 10px; border-radius: 5px; background: var(--surface-2); overflow: hidden; min-width: 40px; }
.meter i { display: block; height: 100%; border-radius: 5px; background: var(--ink-2); }
.meter i.hl { background: var(--red); }
.bar-r:hover .meter i { filter: brightness(1.2); }
/* tablero gerencial: cuadrícula de 12 columnas, tarjetas de igual alto por fila */
.pn { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pn-kpis { grid-column: span 12; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.pn-kpis .kpi { padding: 18px 20px; gap: 6px; }
.pn .s12 { grid-column: span 12; } .pn .s7 { grid-column: span 7; } .pn .s6 { grid-column: span 6; } .pn .s5 { grid-column: span 5; }
.pn-card { display: flex; flex-direction: column; min-width: 0; }
.pn-card > .card-h { min-height: 56px; flex-wrap: nowrap; }
.pn-card > .card-b { flex: 1; min-height: 0; }
.pn-meta { font-size: .8rem; color: var(--ink-3); white-space: nowrap; }
.pn-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pn-col .pn-grow { flex: 1; }
.pn-fill { display: flex; flex-direction: column; justify-content: center; gap: 16px; }
.pn-note { margin: 0; font-size: .8rem; color: var(--ink-3); border-top: 1px solid var(--line); padding-top: 12px; }
.pn-tbl th, .pn-tbl td { font-size: .86rem; }
.pn-tbl .pn-mcol { width: 20%; }
.pn-tbl th { letter-spacing: .06em; }
.pn-tbl td.num { white-space: nowrap; }
.pn-card > .card-b:has(> .pn-stretch) { display: flex; }
.pn-stretch { flex: 1; }
.pn-stretch table { height: 100%; }
.pn-list { padding-block: 4px; max-height: 360px; overflow-y: auto; }
.pn-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border: 0; border-bottom: 1px solid var(--line); background: none; width: 100%; text-align: left; color: inherit; font: inherit; }
.pn-item:last-child { border-bottom: 0; }
.pn-item-b { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.pn-item-t { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; }
.pn-inc { cursor: pointer; }
.pn-inc > svg { width: 16px; height: 16px; color: var(--ink-3); flex: none; }
.pn-inc:hover .pn-item-t b { color: var(--red); }
.pn-clamp { font-size: .84rem; color: var(--ink-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 1180px) { .pn-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .pn .s7, .pn .s6, .pn .s5 { grid-column: span 12; } }
@media (max-width: 620px) { .pn-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .pn-kpis .kpi:last-child { grid-column: span 2; } .bar-r { grid-template-columns: 104px minmax(0, 1fr) 50px; } .pn-tbl .pn-mcol { display: none; } }
.stage { display: flex; height: 34px; gap: 2px; border-radius: 6px; overflow: hidden; }
.stage > div { display: flex; align-items: center; justify-content: center; color: #fff; font-size: .75rem; font-weight: 600; min-width: 0; overflow: hidden; white-space: nowrap; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: .8rem; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { fill: var(--ink-3); font: 500 11px var(--f-body); }
.tip { position: fixed; z-index: 100; pointer-events: none; background: var(--ink); color: var(--bg); font-size: .8rem; padding: 6px 10px; border-radius: 6px; box-shadow: var(--shadow); white-space: nowrap; }
.stars { color: #e3a008; letter-spacing: 1px; }

/* ---------- Modal / hoja ---------- */
.ov { position: fixed; inset: 0; background: rgba(10, 10, 12, .55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 16px; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.modal { background: var(--surface); border-radius: 14px; width: min(560px, 100%); max-height: calc(100% - 20px); overflow: auto; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.modal.wide { width: min(860px, 100%); }
.modal-h { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 10px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.modal-b { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }

/* Cámara */
.cam { background: #000; border-radius: 14px; overflow: hidden; width: min(720px, 100%); color: #fff; }
.cam-view { position: relative; aspect-ratio: 4/3; background: #111; max-width: 100%; }
.cam-view video { width: 100%; height: 100%; object-fit: cover; display: block; }
.cam-view .frame { position: absolute; inset: 18px; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; pointer-events: none; }
.cam-view .frame::before, .cam-view .frame::after { content: ""; position: absolute; left: 50%; top: 50%; background: rgba(255,255,255,.5); }
.cam-view .frame::before { width: 26px; height: 1px; transform: translate(-50%, -50%); }
.cam-view .frame::after { width: 1px; height: 26px; transform: translate(-50%, -50%); }
.cam-view .meta { position: absolute; left: 12px; top: 12px; font: 600 .72rem/1.3 var(--f-mono); background: rgba(0,0,0,.45); padding: 5px 8px; border-radius: 5px; }
.cam-view .rec { position: absolute; right: 12px; top: 12px; font: 700 .8rem/1 var(--f-mono); background: rgba(0,0,0,.55); padding: 6px 9px; border-radius: 5px; display: flex; gap: 6px; align-items: center; }
.cam-view .rec[hidden] { display: none; }
.cam-view .rec::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: #ff3b3b; animation: blink 1s infinite; }
@keyframes blink { 50% { opacity: .2; } }
.cam-bar { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; padding: 16px 20px; gap: 10px; }
.cam-bar .t { font-weight: 600; }
.shutter { width: 66px; height: 66px; border-radius: 50%; border: 4px solid #fff; background: transparent; cursor: pointer; display: grid; place-items: center; padding: 0; }
.shutter::after { content: ""; width: 50px; height: 50px; border-radius: 50%; background: #fff; transition: transform .1s; }
.shutter:active::after { transform: scale(.88); }
.shutter.video::after { background: #ff3b3b; }
.shutter.video.on::after { border-radius: 8px; width: 28px; height: 28px; }
.cam-bar .btn { background: rgba(255,255,255,.12); border-color: transparent; color: #fff; }
.flash { position: absolute; inset: 0; background: #fff; animation: flash .25s forwards; pointer-events: none; }
@keyframes flash { to { opacity: 0; } }

/* Visor de imagen */
.lightbox img { max-width: 100%; max-height: 80vh; border-radius: 10px; display: block; }

/* ---------- Toast ---------- */
.toasts { position: fixed; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; }
@media (max-width: 860px) { .toasts { bottom: calc(76px + env(safe-area-inset-bottom, 0px)); left: max(16px, env(safe-area-inset-left, 0px)); } }
.toast { background: var(--ink); color: var(--bg); padding: 11px 14px; border-radius: 10px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; font-size: .9rem; max-width: 420px; animation: tin .2s; }
.toast svg { width: 18px; height: 18px; flex: none; }
.toast.wa svg { color: var(--wa); }
@keyframes tin { from { transform: translateY(8px); opacity: 0; } }

/* ---------- WhatsApp ---------- */
.wa-layout { display: grid; grid-template-columns: 360px minmax(0, 1fr); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); min-height: 600px; }
@media (max-width: 860px) { .wa-layout { grid-template-columns: 1fr; } .wa-layout.open .wa-list { display: none; } .wa-layout:not(.open) .wa-chat { display: none; } }
.wa-list { border-right: 1px solid var(--line); overflow-y: auto; max-height: 720px; }
.wa-lh { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 8px; }
.wa-lh h3 { font: 700 1.3rem/1.2 var(--f-display); margin: 0; }
.wa-lh-ic { display: flex; gap: 4px; }
.wa-ib { width: 36px; height: 36px; border-radius: 50%; border: 0; background: none; color: var(--ink-2); display: grid; place-items: center; cursor: pointer; }
.wa-ib:hover { background: var(--surface-2); }
.wa-ib svg { width: 20px; height: 20px; }
.wa-search { margin: 4px 12px 8px; display: flex; align-items: center; gap: 10px; background: var(--surface-2); border-radius: 999px; padding: 0 14px; height: 38px; color: var(--ink-3); }
.wa-search:focus-within { box-shadow: 0 0 0 2px color-mix(in srgb, var(--wa-green, #25a35a) 45%, transparent); }
.wa-search svg { width: 17px; height: 17px; flex: none; }
.wa-search input { border: 0; background: none; outline: 0; font: inherit; font-size: .9rem; color: var(--ink); width: 100%; min-width: 0; }
.wa-chips { display: flex; gap: 8px; padding: 2px 12px 10px; }
.wa-chips button { border: 0; border-radius: 999px; padding: 6px 13px; font: 500 .85rem/1 var(--f-body); background: var(--surface-2); color: var(--ink-2); cursor: pointer; }
.wa-chips button.on { background: color-mix(in srgb, #25a35a 16%, var(--surface)); color: #157a42; }
.wa-li { display: flex; align-items: center; gap: 13px; padding: 0 0 0 13px; min-height: 72px; cursor: pointer; background: none; border: 0; width: 100%; text-align: left; color: inherit; font: inherit; }
.wa-li:hover { background: var(--surface-2); }
.wa-li.on { background: color-mix(in srgb, var(--ink-3) 13%, var(--surface)); }
.wa-av { width: 48px; height: 48px; border-radius: 50%; flex: none; display: grid; place-items: center; color: #fff; font: 600 1rem/1 var(--f-body); }
.wa-av.sm { width: 40px; height: 40px; font-size: .88rem; }
.wa-li-b { flex: 1; min-width: 0; align-self: stretch; display: flex; flex-direction: column; justify-content: center; gap: 3px; padding-right: 14px; border-bottom: 1px solid var(--line); }
.wa-li-r { display: flex; align-items: center; gap: 8px; min-width: 0; }
.wa-li-n { flex: 1; min-width: 0; font-size: 1rem; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-li-t { font-size: .75rem; color: var(--ink-3); white-space: nowrap; }
.wa-li.unread .wa-li-t { color: #1a9a50; font-weight: 600; }
.wa-li-m { flex: 1; min-width: 0; font-size: .87rem; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wa-li-m svg { width: 16px; height: 16px; vertical-align: -3px; }
.wa-li.unread .wa-li-m { color: var(--ink-2); }
.wa-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: #1fa855; color: #fff; font: 700 .72rem/20px var(--f-body); text-align: center; }
.wa-chat { display: flex; flex-direction: column; background: var(--wa-bg); min-width: 0; }
.wa-head { background: var(--surface); padding: 10px 14px; display: flex; gap: 10px; align-items: center; border-bottom: 1px solid var(--line); }
.wa-body { flex: 1; padding: 18px; display: flex; flex-direction: column; gap: 8px; overflow-y: auto; max-height: 640px; }
.wa-day { align-self: center; font-size: .72rem; background: var(--surface); color: var(--ink-3); padding: 3px 10px; border-radius: 6px; box-shadow: 0 1px 1px rgba(0,0,0,.06); }
.bub { max-width: min(78%, 440px); padding: 7px 9px 6px; border-radius: 9px; font-size: .9rem; line-height: 1.4; box-shadow: 0 1px 1px rgba(0,0,0,.08); position: relative; white-space: pre-line; }
.bub.out { align-self: flex-end; background: var(--wa-out); border-top-right-radius: 2px; }
.bub.in { align-self: flex-start; background: var(--wa-in); border-top-left-radius: 2px; }
.bub .bt { display: flex; justify-content: flex-end; gap: 4px; align-items: center; font-size: .68rem; color: var(--ink-3); margin-top: 2px; }
.bub .ticks { width: 16px; height: 11px; }
.bub .ticks.read { color: #34b7f1; }
.bub .doc { display: flex; gap: 10px; align-items: center; background: rgba(0,0,0,.05); border-radius: 7px; padding: 9px; margin-bottom: 6px; cursor: pointer; }
.bub .doc .pdf { width: 34px; height: 40px; background: var(--red); color: #fff; border-radius: 3px; display: grid; place-items: center; font: 700 .62rem/1 var(--f-body); flex: none; }
.bub .btns { display: flex; flex-direction: column; margin: 8px -9px -6px; border-top: 1px solid rgba(0,0,0,.08); }
.bub .btns span { text-align: center; color: #0a84c6; font-weight: 600; padding: 8px; font-size: .85rem; }
.bub .btns span + span { border-top: 1px solid rgba(0,0,0,.08); }
.bub .tpl { font-size: .66rem; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 3px; }

/* Teléfono (vista del cliente) */
.phone { width: 360px; max-width: 100%; border-radius: 38px; background: #0b0b0c; padding: 12px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.phone-scr { border-radius: 28px; overflow: hidden; background: var(--wa-bg); height: 640px; display: flex; flex-direction: column; }
.phone .wa-head { background: #075e54; color: #fff; border: 0; }
:root[data-theme="dark"] .phone .wa-head { background: #1f2c33; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .phone .wa-head { background: #1f2c33; } }

/* ---------- Ficha (comprobante) ---------- */
.ficha { max-width: 920px; margin: 0 auto; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.ficha-top { background: var(--carbon); color: #fff; padding: 22px 26px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: center; border-bottom: 4px solid var(--red); }
.ficha-top img { height: 46px; }
.ficha-sec { padding: 20px 26px; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; }
.ficha-sec:last-child { border-bottom: 0; }
.ficha .kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px 20px; }
.kv > div > span { display: block; font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.kv > div > b { font-weight: 600; }
.cmp { display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px; gap: 0; font-size: .88rem; }
.cmp > div { padding: 7px 4px; border-bottom: 1px solid var(--line); }
.cmp .h { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); font-weight: 600; }
.okc { color: var(--good); font-weight: 600; }
.badc { color: var(--bad); font-weight: 600; }
@media (max-width: 560px) { .ficha-sec, .ficha-top { padding-left: 16px; padding-right: 16px; } }

.alert { display: flex; gap: 12px; padding: 12px 14px; border-radius: 10px; align-items: flex-start; font-size: .9rem; }
.alert svg { width: 20px; height: 20px; flex: none; margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: var(--warn); }
.alert.bad { background: var(--bad-soft); color: var(--bad); }
.alert.good { background: var(--good-soft); color: var(--good); }
.alert.info { background: var(--info-soft); color: var(--info); }
.alert b { color: inherit; }
.alert .txt { color: var(--ink); }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--ink-3); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs button.on { color: var(--ink); border-bottom-color: var(--red); }

.empty { padding: 36px 20px; text-align: center; color: var(--ink-3); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.empty svg { width: 34px; height: 34px; opacity: .6; }

.sel-card { border: 1.5px solid var(--line); border-radius: 10px; padding: 12px 14px; cursor: pointer; background: var(--surface); text-align: left; display: flex; flex-direction: column; gap: 3px; width: 100%; }
.sel-card:hover { border-color: var(--ink-3); }
.sel-card.on { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-soft); }

.notif { position: absolute; right: 0; top: 46px; width: min(360px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 50; overflow: hidden; }
.notif .it { padding: 11px 14px; border-bottom: 1px solid var(--line); font-size: .86rem; display: flex; gap: 10px; }
.notif .it:last-child { border-bottom: 0; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
.ocard .avatar { width: 22px; height: 22px; font-size: .6rem; }
@media (max-width: 1000px) { .od-grid { grid-template-columns: 1fr !important; } }
#app { min-height: 100vh; }
.login { min-height: 100vh; }

.plate { width: max-content; max-width: 100%; align-self: flex-start; }
.tbl td.mono, .tbl td .plate { white-space: nowrap; }
.row > .plate { align-self: center; }
.steps { scrollbar-width: none; }
.steps::-webkit-scrollbar { display: none; }
.diagram-wrap { align-items: start; }
