/* Torque — gestión para talleres mecánicos. Concreto claro, barra lateral grafito y acento naranja de señalización. */
:root {
  --bg: #eceae5; --surface: #ffffff; --surface-2: #f6f5f2; --surface-3: #e4e1db; --line: #dcd8d0; --line-2: #c9c4ba;
  --text: #121316; --muted: #5f636a; --faint: #8b8f96;
  --side: #0e0f11; --side-2: #17191c; --side-text: #eceae5;
  --accent: #ff5b14; --accent-d: #d94608; --accent-soft: #fff0e8;
  --ok: #1f9d5c; --ok-soft: #e4f5ec; --warn: #c27a00; --warn-soft: #fdf3dc; --bad: #d7372b; --bad-soft: #fde8e6; --info: #2f7de1; --info-soft: #e6f0fc;
  --disp: "Big Shoulders Display", Impact, sans-serif; --sans: "Chivo", system-ui, -apple-system, "Segoe UI", sans-serif; --mono: "Chivo Mono", ui-monospace, monospace;
  --r: 10px; --shadow: 0 20px 50px -30px rgba(14,15,17,.45);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 400 14.5px/1.5 var(--sans); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
h1, h2, h3, h4, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Layout */
.app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; background: var(--side); color: var(--side-text); display: flex; flex-direction: column; padding: 18px 12px; gap: 18px; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 10px; }
.brand svg { width: 34px; height: 34px; fill: none; stroke: var(--accent); stroke-width: 3; }
.brand svg circle:nth-child(2) { fill: var(--side-text); stroke: none; }
.brand span { display: grid; font: 900 26px/.9 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.brand small { font: 500 9.5px/1.6 var(--mono); letter-spacing: .14em; opacity: .55; }
.side-nav { display: grid; gap: 2px; }
.side-nav a { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 8px; font-weight: 500; color: rgba(236,234,229,.72); transition: background .2s, color .2s; }
.side-nav a i { font-style: normal; width: 18px; text-align: center; opacity: .8; }
.side-nav a:hover { background: var(--side-2); color: #fff; }
.side-nav a.is-on { background: var(--side-2); color: #fff; box-shadow: inset 3px 0 0 var(--accent); }
.nb { margin-left: auto; min-width: 20px; padding: 1px 6px; border-radius: 99px; background: var(--accent); color: #fff; font: 600 11px/1.5 var(--mono); text-align: center; }
.nb:empty { display: none; }
.side-shop { margin-top: auto; padding: 12px; border-radius: 10px; background: var(--side-2); display: grid; gap: 2px; font-size: 12.5px; }
.side-shop span { color: rgba(236,234,229,.55); }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 14px 26px; background: rgba(236,234,229,.92); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.top h1 { font: 800 28px/1 var(--disp); text-transform: uppercase; letter-spacing: .01em; white-space: nowrap; }
.top-menu { display: none; font-size: 22px; width: 40px; height: 40px; border-radius: 8px; }
.search { position: relative; margin-left: auto; display: flex; align-items: center; gap: 8px; width: min(380px, 40vw); padding: 0 12px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); }
.search span { color: var(--faint); font-size: 18px; }
.search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 10px 0; outline: none; }
.search-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; display: grid; gap: 2px; max-height: 60vh; overflow: auto; }
.search-res a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; }
.search-res a:hover, .search-res a.is-on { background: var(--surface-2); }
.search-res small { color: var(--muted); margin-left: auto; font-size: 12px; }
.demo-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 9px 26px; background: var(--side); color: rgba(236,234,229,.8); font-size: 13px; }
.demo-bar button { color: var(--accent); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.demo-bar .x { margin-left: auto; color: #fff; text-decoration: none; font-size: 18px; line-height: 1; }
.view { padding: 24px 26px 60px; outline: none; display: grid; gap: 20px; align-content: start; }
.tabbar { display: none; }

/* Botones y controles */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 16px; border-radius: 8px; font-weight: 600; font-size: 14px; line-height: 1.1; white-space: nowrap; transition: background .2s, box-shadow .2s, color .2s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-d); }
.btn-dark { background: var(--text); color: #fff; }
.btn-dark:hover { background: #2a2c31; }
.btn-ghost { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--text); }
.btn-wa { background: #1faa59; color: #fff; }
.btn-wa:hover { background: #178a48; }
.btn-sm { padding: 7px 11px; font-size: 13px; }
.btn-xs { padding: 4px 8px; font-size: 12px; border-radius: 6px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.icon-btn { width: 30px; height: 30px; border-radius: 6px; display: inline-grid; place-items: center; color: var(--muted); }
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
input.f, select.f, textarea.f { width: 100%; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--surface); outline: none; transition: border-color .2s, box-shadow .2s; }
input.f:focus, select.f:focus, textarea.f:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,91,20,.15); }
textarea.f { min-height: 80px; resize: vertical; }
.fl { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { padding: 6px 12px; border-radius: 99px; font-size: 13px; font-weight: 600; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); transition: all .2s; }
.chip.is-on { background: var(--text); color: #fff; box-shadow: none; }
.chip i { font-style: normal; display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.sp { margin-left: auto; }
.muted { color: var(--muted); }
.mono { font-family: var(--mono); }
.small { font-size: 12.5px; }

/* Tarjetas */
.card { background: var(--surface); border-radius: var(--r); border: 1px solid var(--line); padding: 18px; display: grid; gap: 14px; align-content: start; min-width: 0; }
.card-h { display: flex; align-items: center; gap: 10px; }
.card-h h2, .card-h h3 { font: 800 20px/1 var(--disp); text-transform: uppercase; letter-spacing: .02em; }
.card-h .sp { font-size: 13px; }
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: grid; gap: 2px; }
.kpi small { font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.kpi b { font: 800 32px/1.05 var(--disp); }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.hot { background: var(--side); color: #fff; border-color: var(--side); }
.kpi.hot small, .kpi.hot span { color: rgba(236,234,229,.6); }
.kpi.hot b { color: var(--accent); }

/* Patente */
.plate { display: inline-flex; align-items: center; gap: 0; padding: 2px 7px 2px 0; border-radius: 4px; background: #fafafa; border: 1.5px solid #111; font: 700 14px/1.2 var(--mono); letter-spacing: .06em; color: #111; white-space: nowrap; }
.plate::before { content: ""; width: 5px; align-self: stretch; margin-right: 6px; background: #1a3c8f; border-radius: 2px 0 0 2px; }
.plate.lg { font: 800 30px/1 var(--disp); letter-spacing: .08em; padding: 4px 12px 4px 0; border-width: 2.5px; border-radius: 6px; }
.plate.lg::before { width: 9px; margin-right: 10px; }

/* Estados */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 99px; font: 600 11.5px/1.3 var(--mono); text-transform: uppercase; letter-spacing: .04em; background: var(--surface-3); color: var(--muted); white-space: nowrap; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.s-recepcion { background: #eceff3; color: #56606e; }
.s-diagnostico { background: var(--info-soft); color: var(--info); }
.s-aprobacion { background: var(--accent-soft); color: var(--accent-d); }
.s-repuestos { background: var(--warn-soft); color: var(--warn); }
.s-reparacion { background: #efe9fb; color: #6a45c9; }
.s-calidad { background: #e3f4f6; color: #12808f; }
.s-listo { background: var(--ok-soft); color: var(--ok); }
.s-entregado { background: var(--surface-3); color: var(--faint); }

/* Kanban */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 12px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.col { background: var(--surface-3); border-radius: var(--r); padding: 10px; display: grid; gap: 8px; align-content: start; min-height: 260px; scroll-snap-align: start; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 6px; font: 600 12px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.col-h b { margin-left: auto; min-width: 22px; text-align: center; padding: 1px 6px; border-radius: 99px; background: var(--surface); color: var(--text); }
.col-h i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.oc { position: relative; background: var(--surface); border-radius: 8px; padding: 11px 12px; display: grid; gap: 7px; box-shadow: 0 1px 0 var(--line); border-left: 3px solid var(--line-2); cursor: pointer; transition: transform .2s, box-shadow .2s; }
.oc:hover { transform: translateY(-2px); box-shadow: 0 12px 24px -16px rgba(14,15,17,.5); }
.oc-top { display: flex; align-items: center; gap: 8px; }
.oc-top small { margin-left: auto; font: 500 11px var(--mono); color: var(--faint); }
.oc h4 { font-weight: 600; font-size: 14px; line-height: 1.25; }
.oc p { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.oc-bot { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.oc-bot b { margin-left: auto; font: 600 12.5px var(--mono); }
.av { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; color: #fff; font: 700 10px var(--sans); flex: none; }
.oc-adv { position: absolute; right: 8px; bottom: 34px; width: 28px; height: 28px; border-radius: 6px; background: var(--surface-2); color: var(--muted); font-size: 15px; display: grid; place-items: center; opacity: 0; transition: opacity .2s, background .2s; }
.oc:hover .oc-adv, .oc:focus-within .oc-adv { opacity: 1; }
.oc-adv:hover { background: var(--accent); color: #fff; }
.oc.is-late { border-left-color: var(--accent); }
.flag { font: 600 10.5px var(--mono); text-transform: uppercase; color: var(--accent-d); }
.dash { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; }
.list { display: grid; }
.list > * { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.list > *:last-child { border-bottom: 0; }
.list .grow { flex: 1; min-width: 0; }
.list .grow b, .list .grow span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list .grow span { font-size: 12.5px; color: var(--muted); }
.time { font: 600 13px var(--mono); min-width: 46px; }
.alert { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 8px; background: var(--surface-2); }
.alert b { font: 800 26px/1 var(--disp); min-width: 30px; }
.alert.a1 b { color: var(--accent); } .alert.a2 b { color: var(--warn); } .alert.a3 b { color: var(--info); }
.alert span { font-size: 13px; color: var(--muted); flex: 1; }

/* Orden */
.oh { display: grid; grid-template-columns: auto 1fr auto; gap: 18px; align-items: center; }
.oh h2 { font: 800 30px/1 var(--disp); text-transform: uppercase; }
.oh-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 13px; color: var(--muted); margin-top: 6px; }
.oh-meta b { color: var(--text); font-weight: 600; }
.back { font-size: 13px; color: var(--muted); font-weight: 600; }
.back:hover { color: var(--accent); }
.steps { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 4px; }
.step { display: grid; gap: 6px; padding: 0; text-align: left; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.step i { height: 5px; border-radius: 3px; background: var(--surface-3); transition: background .3s; }
.step.ok { color: var(--muted); } .step.ok i { background: var(--text); }
.step.now { color: var(--accent-d); } .step.now i { background: var(--accent); }
.step:hover i { background: var(--line-2); }
.step.ok:hover i { background: #333; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { padding: 10px 14px; font-weight: 600; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.is-on { color: var(--text); border-color: var(--accent); }
.ol { display: grid; grid-template-columns: 1fr 340px; gap: 16px; align-items: start; }
.lines { width: 100%; border-collapse: collapse; }
.lines th { text-align: left; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 8px 6px; border-bottom: 1px solid var(--line); }
.lines td { padding: 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.lines tr.off td { opacity: .45; }
.lines tr.off td.t { text-decoration: line-through; }
.lines input { width: 100%; border: 1px solid transparent; background: transparent; padding: 7px 8px; border-radius: 6px; }
.lines input:hover { border-color: var(--line); }
.lines input:focus { border-color: var(--accent); background: #fff; outline: none; }
.lines .n { width: 70px; text-align: right; }
.lines .u { width: 110px; text-align: right; }
.lines td.t { text-align: right; font: 600 13px var(--mono); white-space: nowrap; }
.kind { display: inline-grid; place-items: center; width: 28px; height: 22px; border-radius: 5px; font: 700 10.5px var(--mono); }
.kind.rep { background: var(--info-soft); color: var(--info); }
.kind.mo { background: var(--accent-soft); color: var(--accent-d); }
.okb { padding: 3px 8px; border-radius: 99px; font: 600 10.5px var(--mono); text-transform: uppercase; white-space: nowrap; }
.okb.y { background: var(--ok-soft); color: var(--ok); }
.okb.n { background: var(--bad-soft); color: var(--bad); }
.okb.p { background: var(--warn-soft); color: var(--warn); }
.adders { display: flex; flex-wrap: wrap; gap: 8px; }
.picker { position: relative; }
.picker-res { position: absolute; z-index: 20; left: 0; top: calc(100% + 4px); width: min(440px, 80vw); background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); padding: 6px; max-height: 320px; overflow: auto; }
.picker-res input { margin-bottom: 6px; }
.picker-res button { display: grid; grid-template-columns: 1fr auto; gap: 2px 10px; width: 100%; text-align: left; padding: 8px 10px; border-radius: 6px; }
.picker-res button:hover { background: var(--surface-2); }
.picker-res small { color: var(--muted); font-size: 12px; }
.picker-res em { font-style: normal; font: 600 12px var(--mono); grid-row: span 2; align-self: center; text-align: right; }
.sum { display: grid; gap: 0; }
.sum div { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.sum div b { font-family: var(--mono); font-weight: 600; }
.sum .tot { border-top: 2px solid var(--text); margin-top: 6px; padding-top: 12px; }
.sum .tot span { font-weight: 700; }
.sum .tot b { font: 900 32px/1 var(--disp); }
.sum .gain { color: var(--ok); }
.sum .pend { color: var(--warn); }
.box-dark { background: var(--side); color: var(--side-text); border-color: var(--side); }
.box-dark .muted { color: rgba(236,234,229,.6); }

/* Recepción */
.rec { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; align-items: start; }
.carmap { width: 100%; max-width: 360px; justify-self: center; }
.carmap .z { fill: #f2f1ee; stroke: #9a9ea6; stroke-width: 1.2; cursor: pointer; transition: fill .2s; }
.carmap .z:hover { fill: #e6e3dc; }
.carmap .z.rayon { fill: #ffe0a8; stroke: var(--warn); }
.carmap .z.abolladura { fill: #ffc6b0; stroke: var(--accent-d); }
.carmap .z.trizadura { fill: #c9defa; stroke: var(--info); }
.carmap .glass { fill: #dfe7ef; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12.5px; color: var(--muted); }
.legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.fuel { display: grid; gap: 6px; }
.fuel-bar { display: grid; grid-template-columns: repeat(8, 1fr); gap: 3px; }
.fuel-bar button { height: 26px; border-radius: 4px; background: var(--surface-3); }
.fuel-bar button.on { background: var(--accent); }
.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ck { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 8px; background: var(--surface-2); font-size: 13.5px; cursor: pointer; }
.ck input { accent-color: var(--accent); width: 16px; height: 16px; }

/* Notas / historial */
.notes { display: grid; gap: 10px; }
.note { padding: 12px 14px; border-radius: 8px; background: var(--surface-2); display: grid; gap: 4px; }
.note small { color: var(--muted); font-size: 12px; }
.tl { display: grid; }
.tl > div { display: grid; grid-template-columns: 90px 1fr auto; gap: 12px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tl > div:last-child { border-bottom: 0; }
.tl time { font: 500 12px var(--mono); color: var(--muted); }

/* Tablas genéricas */
.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font: 500 11px var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tbody tr { cursor: pointer; transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl .r { text-align: right; }
.tbl .num { font-family: var(--mono); font-size: 13px; white-space: nowrap; }
.tbl-wrap { overflow-x: auto; margin: 0 -18px; padding: 0 18px; }
.low td { background: #fff7f2; }
.stk { display: inline-flex; align-items: center; gap: 2px; border-radius: 6px; background: var(--surface-2); }
.stk button { width: 26px; height: 26px; border-radius: 6px; font-weight: 700; }
.stk button:hover { background: var(--surface-3); }
.stk b { min-width: 28px; text-align: center; font: 600 13px var(--mono); }
.due { font: 600 11px var(--mono); text-transform: uppercase; padding: 3px 8px; border-radius: 99px; white-space: nowrap; }
.due.over { background: var(--bad-soft); color: var(--bad); }
.due.soon { background: var(--warn-soft); color: var(--warn); }
.due.okd { background: var(--ok-soft); color: var(--ok); }

/* Agenda */
.week { display: grid; grid-template-columns: 54px repeat(6, minmax(120px, 1fr)); overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.wk-h { position: sticky; top: 0; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 12.5px; font-weight: 600; text-align: center; background: var(--surface); }
.wk-h b { display: block; font: 800 22px/1 var(--disp); }
.wk-h.today { color: var(--accent-d); }
.wk-hours { display: grid; }
.wk-hours div { height: 52px; font: 500 11px var(--mono); color: var(--faint); text-align: right; padding: 2px 8px 0 0; border-top: 1px solid var(--line); }
.wk-day { position: relative; border-left: 1px solid var(--line); background: repeating-linear-gradient(180deg, transparent 0 51px, var(--line) 51px 52px); }
.wk-day.today { background-color: #fffaf6; }
.ap { position: absolute; left: 4px; right: 4px; border-radius: 6px; padding: 5px 7px; font-size: 11.5px; line-height: 1.25; overflow: hidden; cursor: pointer; border-left: 3px solid; transition: transform .15s; }
.ap:hover { transform: scale(1.02); z-index: 2; }
.ap b { display: block; font: 600 11px var(--mono); }
.ap.e1 { background: #fff0e8; border-color: var(--accent); }
.ap.e2 { background: var(--info-soft); border-color: var(--info); }
.ap.e3 { background: var(--ok-soft); border-color: var(--ok); }
.ap.d1 { background: #efe9fb; border-color: #6a45c9; }
.ap.atendida { opacity: .55; }
.now-line { position: absolute; left: 0; right: 0; height: 2px; background: var(--accent); z-index: 3; }
.now-line::before { content: ""; position: absolute; left: -4px; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }

/* Reportes */
.rep { display: grid; grid-template-columns: 1.4fr 1fr; gap: 16px; }
.bars { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; align-items: end; height: 220px; padding-top: 10px; }
.bars div { display: grid; gap: 6px; align-items: end; height: 100%; grid-template-rows: 1fr auto; }
.bars i { display: block; border-radius: 5px 5px 2px 2px; background: var(--text); position: relative; min-height: 3px; transition: height .6s cubic-bezier(.16,1,.3,1); }
.bars div:last-child i { background: var(--accent); }
.bars i span { position: absolute; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); font: 600 10.5px var(--mono); white-space: nowrap; color: var(--muted); }
.bars small { text-align: center; font: 500 11px var(--mono); color: var(--muted); }
.hbars { display: grid; gap: 10px; }
.hbars > div { display: grid; grid-template-columns: 110px 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hbars em { height: 10px; border-radius: 5px; background: var(--surface-3); overflow: hidden; display: block; }
.hbars em i { display: block; height: 100%; background: var(--accent); border-radius: 5px; }
.hbars b { font: 600 12.5px var(--mono); }
.split-bar { display: flex; height: 14px; border-radius: 7px; overflow: hidden; }
.split-bar i:first-child { background: var(--info); } .split-bar i:last-child { background: var(--accent); }

/* Modal y toast */
.modal-wrap { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(14,15,17,.55); backdrop-filter: blur(3px); animation: fade .2s; }
.modal { width: min(560px, 100%); max-height: calc(100vh - 40px); overflow: auto; background: var(--surface); border-radius: 14px; padding: 22px; display: grid; gap: 14px; box-shadow: 0 40px 100px -30px rgba(0,0,0,.6); animation: pop .25s cubic-bezier(.16,1,.3,1); }
.modal h2 { font: 800 26px/1 var(--disp); text-transform: uppercase; }
.modal-f { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding-top: 6px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } }
.toast { position: fixed; left: 50%; bottom: 24px; z-index: 120; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; padding: 12px 18px; border-radius: 10px; background: var(--side); color: #fff; font-weight: 500; box-shadow: var(--shadow); transition: all .3s cubic-bezier(.16,1,.3,1); max-width: calc(100vw - 32px); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.empty { padding: 30px; text-align: center; color: var(--muted); }
.more-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.more-grid a { padding: 18px; border-radius: var(--r); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; font-weight: 600; }
.more-grid a i { font-style: normal; font-size: 22px; color: var(--accent); }

/* Responsivo */
@media (max-width: 1240px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis .kpi:nth-child(n+4) { display: none; } .dash, .rep, .ol { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .app { grid-template-columns: 1fr; }
  .side { position: fixed; z-index: 90; left: 0; top: 0; width: 260px; transform: translateX(-100%); transition: transform .3s cubic-bezier(.16,1,.3,1); }
  .side-open .side { transform: none; box-shadow: 0 0 0 100vmax rgba(0,0,0,.4); }
  .top-menu { display: grid; place-items: center; }
  .top { padding: 10px 14px; gap: 10px; flex-wrap: wrap; }
  .top h1 { font-size: 24px; }
  .top > .btn-primary { display: none; }
  .search { order: 5; width: 100%; margin-left: 0; }
  .demo-bar { padding: 8px 14px; font-size: 12px; }
  .view { padding: 16px 14px 100px; }
  .rec { grid-template-columns: 1fr; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; z-index: 40; left: 0; right: 0; bottom: 0; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--side); }
  .tabbar a { display: grid; justify-items: center; gap: 2px; padding: 6px 0; font-size: 11px; color: rgba(236,234,229,.6); }
  .tabbar a i { font-style: normal; font-size: 18px; }
  .tabbar a.is-on { color: #fff; }
  .tabbar a.is-on i { color: var(--accent); }
  .tab-new { justify-self: center; width: 50px; height: 50px; margin-top: -18px; border-radius: 14px; background: var(--accent); color: #fff; font-size: 28px; box-shadow: 0 10px 24px -8px rgba(255,91,20,.7); }
  .oh { grid-template-columns: 1fr; gap: 10px; }
  .steps { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 10px; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis .kpi:nth-child(n+4) { display: grid; }
  .kpis .kpi:nth-child(5) { display: none; }
  .grid3 { grid-template-columns: 1fr 1fr; }
  .lines thead { display: none; }
  .lines tr { display: grid; grid-template-columns: 34px 64px 1fr auto; gap: 6px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line); }
  .lines td { border: 0; padding: 0; }
  .lines td.d { grid-column: 2 / -1; }
  .lines td.q { grid-column: 2; } .lines td.p { grid-column: 3; } .lines td.t { grid-column: 4; }
  .lines td.k { grid-column: 2 / 4; } .lines td.x { grid-column: 4; justify-self: end; }
  .lines .n, .lines .u { width: 100%; }
  .bars span { display: none; }
  .tl > div { grid-template-columns: 70px 1fr; }
  .tl > div > :last-child { grid-column: 2; }
  .hide-m { display: none; }
}
@media print {
  .side, .top, .tabbar, .demo-bar, .tabs, .adders, .no-print, .steps { display: none !important; }
  .app { display: block; } .view { padding: 0; } .ol { grid-template-columns: 1fr; } .card { border: 0; padding: 0; }
  body { background: #fff; }
}
