/* Folio · identidad «Cajetín»: cada pantalla es una hoja de plano con su cajetín y una tira REV al pie. */

@font-face { font-family: "Barlow"; src: url(fonts/barlow-400-latin.woff2) format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-500-latin.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-600-latin.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow"; src: url(fonts/barlow-700-latin.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-500-latin.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-600-latin.woff2) format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(fonts/barlow-condensed-700-latin.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }

:root {
  --paper: #f4f4f1; --sheet: #ffffff; --sheet-2: #eef0ec; --ink: #1d2024; --ink-2: #4b5560; --ink-3: #6b7480;
  --rule: #d9dcd6; --rule-2: #e7e9e4; --frame: #1d2024;
  --cyan: #143e66; --cyan-2: #0f3254; --cyan-ink: #dbe6f2; --cyan-ink-2: #9fb8d2;
  --mark: #ffe600; --mark-2: #f2db00; --red: #b8231f; --red-bg: #fbe9e8; --green: #1f6b3a; --green-bg: #e4f1e8; --blue: #1f4e8a; --blue-bg: #e7eef8;
  --rail: 212px; --rev: 54px;
  --cond: "Barlow Condensed", "Barlow", system-ui, sans-serif; --sans: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --t-fast: 120ms; --t: 180ms;
}
@media (prefers-reduced-motion: reduce) { :root { --t-fast: 0ms; --t: 0ms; } }

* { box-sizing: border-box; }
html { background: var(--paper); -webkit-text-size-adjust: 100%; }
body { margin: 0; color: var(--ink); font: 14px/1.45 var(--sans); font-variant-numeric: tabular-nums; }
::selection { background: var(--mark); color: var(--ink); }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, p { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); }
.nowrap { white-space: nowrap; }
.k, .label { display: block; font: 600 11px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }

/* Icons: SVG masks painted with the text colour. */
.i { display: inline-block; flex: none; width: 18px; height: 18px; background: currentColor; -webkit-mask: var(--i) center / contain no-repeat; mask: var(--i) center / contain no-repeat; vertical-align: -4px; }
.i.sm { width: 14px; height: 14px; vertical-align: -2px; } .i.lg { width: 22px; height: 22px; }
.i-home { --i: url(icons/home.svg); } .i-users { --i: url(icons/users.svg); } .i-wallet { --i: url(icons/wallet.svg); } .i-clock { --i: url(icons/clock.svg); }
.i-contract { --i: url(icons/contract.svg); } .i-sliders { --i: url(icons/sliders.svg); } .i-key { --i: url(icons/key.svg); } .i-user { --i: url(icons/user.svg); }
.i-org { --i: url(icons/org.svg); } .i-exchange { --i: url(icons/exchange.svg); } .i-menu { --i: url(icons/menu.svg); } .i-x { --i: url(icons/x.svg); }
.i-chevron-right { --i: url(icons/chevron-right.svg); } .i-chevron-left { --i: url(icons/chevron-left.svg); } .i-chevron-down { --i: url(icons/chevron-down.svg); }
.i-plus { --i: url(icons/plus.svg); } .i-search { --i: url(icons/search.svg); } .i-logout { --i: url(icons/logout.svg); } .i-check { --i: url(icons/check.svg); }
.i-alert { --i: url(icons/alert.svg); } .i-info { --i: url(icons/info.svg); } .i-download { --i: url(icons/download.svg); } .i-printer { --i: url(icons/printer.svg); }
.i-calendar { --i: url(icons/calendar.svg); } .i-sort { --i: url(icons/sort.svg); } .i-arrow-up { --i: url(icons/arrow-up.svg); } .i-arrow-down { --i: url(icons/arrow-down.svg); }
.i-eye { --i: url(icons/eye.svg); } .i-eye-off { --i: url(icons/eye-off.svg); } .i-send { --i: url(icons/send.svg); } .i-file { --i: url(icons/file.svg); } .i-inbox { --i: url(icons/inbox.svg); }
.i-filter-x { --i: url(icons/filter-x.svg); } .i-pin { --i: url(icons/pin.svg); } .i-signature { --i: url(icons/signature.svg); } .i-megaphone { --i: url(icons/megaphone.svg); }

/* ------------------------------------------------------------------ shell */
.app { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100dvh; overflow-y: auto; background: var(--cyan); color: var(--cyan-ink); display: flex; flex-direction: column; padding: 16px 0 12px; }
.rail .brand { display: flex; flex-direction: column; padding: 0 22px 10px; color: #fff; }
.rail .brand strong { font: 700 24px/1 var(--cond); letter-spacing: .02em; }
.rail .brand small { font: 500 12px/1.3 var(--sans); color: var(--cyan-ink-2); margin-top: 4px; letter-spacing: .02em; }
.rail nav { flex: 1; margin-top: 10px; }
.rail .mod { display: block; width: 100%; text-align: left; padding: 9px 22px; border: 0; background: transparent; color: var(--cyan-ink); font: 600 15px/1.2 var(--cond); letter-spacing: .04em; text-transform: uppercase; cursor: pointer; transition: background var(--t-fast); }
.rail .mod:hover { background: var(--cyan-2); color: #fff; text-decoration: none; }
.rail .mod.on { background: var(--mark); color: var(--ink); }
.rail .mod[aria-expanded="true"]:not(.on) { color: #fff; }
.rail .screens { list-style: none; margin: 0; padding: 4px 0 8px; background: var(--cyan-2); }
.rail .screens a { display: block; padding: 6px 22px 6px 30px; color: var(--cyan-ink); font: 500 13.5px/1.3 var(--sans); }
.rail .screens a:hover { color: #fff; text-decoration: none; background: rgba(255, 255, 255, .06); }
.rail .screens a.on { color: var(--ink); background: var(--mark); font-weight: 600; }
.rail .co { padding: 12px 22px 0; border-top: 1px solid rgba(255, 255, 255, .18); margin-top: 10px; font-size: 12.5px; color: var(--cyan-ink-2); }
.rail .co b { display: block; color: #fff; font-size: 13px; }
.rail .co .who { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.rail .co .logout { margin-left: auto; background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: #fff; padding: 4px 8px; font: 600 11.5px/1 var(--cond); letter-spacing: .06em; text-transform: uppercase; cursor: pointer; }
.rail .co .logout:hover { background: #fff; color: var(--cyan); }
.skip { position: absolute; left: -999px; top: 8px; background: var(--mark); color: var(--ink); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.main { min-width: 0; }
.page { padding: 18px 26px calc(var(--rev) + 24px); max-width: 1480px; }

/* ----------------------------------------------------------- the title block */
.cajetin { display: grid; grid-template-columns: minmax(220px, 2.2fr) repeat(auto-fit, minmax(120px, 1fr)); border: 2px solid var(--frame); background: var(--sheet); }
/* the client counts the data cells so no empty track is left to the right of the block */
.cajetin.cols-0 { grid-template-columns: minmax(220px, 1fr); }
.cajetin.cols-1 { grid-template-columns: minmax(220px, 2.2fr) minmax(120px, 1fr); }
.cajetin.cols-2 { grid-template-columns: minmax(220px, 2.2fr) repeat(2, minmax(120px, 1fr)); }
.cajetin.cols-3 { grid-template-columns: minmax(220px, 2.2fr) repeat(3, minmax(120px, 1fr)); }
.cajetin.cols-4 { grid-template-columns: minmax(220px, 2.2fr) repeat(4, minmax(120px, 1fr)); }
.cajetin.cols-5 { grid-template-columns: minmax(220px, 2.2fr) repeat(5, minmax(120px, 1fr)); }
.cajetin.cols-6 { grid-template-columns: minmax(220px, 2.2fr) repeat(6, minmax(120px, 1fr)); }
.cajetin.cols-7 { grid-template-columns: minmax(220px, 2.2fr) repeat(7, minmax(120px, 1fr)); }
.cajetin.cols-8 { grid-template-columns: minmax(220px, 2.2fr) repeat(8, minmax(120px, 1fr)); }
.cajetin > .cell { padding: 5px 10px; border-right: 1.5px solid var(--frame); min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.cajetin > .cell:last-child { border-right: 0; }
.cajetin .cell .v { font: 600 16px/1.3 var(--sans); overflow-wrap: anywhere; }
.cajetin .cell .v.big { font: 700 22px/1.15 var(--cond); letter-spacing: .01em; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-height: 40px; }
.cajetin .cell .v.big .st { font-size: 11.5px; }
.cajetin .cell .v.big .ttl { display: flex; align-items: center; gap: 8px; min-width: 0; max-width: 100%; }
.cajetin .cell .v.big .ttl > span { overflow-wrap: anywhere; }
.cajetin > .cell.actions { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; border-right: 0; border-top: 1.5px solid var(--frame); padding: 6px 10px; }
.cajetin > .cell.acts { grid-column: span 2; flex-direction: row; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; padding: 6px 10px; }
.cajetin.compact .cell .v { font-size: 14px; }
.strip { display: flex; flex-wrap: wrap; gap: 6px 26px; padding: 10px 2px 0; font-size: 13px; color: var(--ink-2); }
.strip b { color: var(--ink); font-weight: 600; }
.strip a { color: var(--cyan); }

/* ------------------------------------------------------------------ cells */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-top: 16px; }
.kpi { display: block; background: var(--sheet); border: 1.5px solid var(--frame); padding: 10px 12px; color: inherit; transition: background var(--t-fast); }
a.kpi:hover { background: var(--sheet-2); text-decoration: none; }
.kpi .v { font: 700 26px/1.15 var(--cond); margin-top: 2px; letter-spacing: .005em; }
.kpi .s { font-size: 12.5px; color: var(--ink-2); margin-top: 2px; }
.kpi.now { background: var(--mark); } .kpi.now .s, .kpi.now .k { color: var(--ink); }

/* ----------------------------------------------------------------- sheets */
/* taste-skill-ignore: las reglas de 1 px de esta hoja viven en tablas, celdas de formulario y barras de herramientas reales. */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(420px, 1fr)); gap: 16px; margin-top: 16px; align-items: start; }
.tb { background: var(--sheet); border: 1.5px solid var(--frame); min-width: 0; }
.tb + .tb, .page > .tb { margin-top: 16px; }
.grid2 > .tb { margin-top: 0; }
.tb > h2, .tb > .band { display: flex; align-items: center; gap: 10px; padding: 7px 12px; border-bottom: 1.5px solid var(--frame); font: 700 15px/1.25 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.tb > .band h2 { font: inherit; }
.tb > h2 .meta, .tb > .band .meta { margin-left: auto; font: 500 12.5px/1.3 var(--sans); text-transform: none; letter-spacing: 0; color: var(--ink-2); display: flex; align-items: center; gap: 8px; }
.tb .body { padding: 10px 12px; }
.tb .foot { padding: 10px 12px 12px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; border-top: 1px solid var(--rule); }
.table-wrap { overflow-x: auto; }
table.grid { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.grid th { text-align: left; font: 600 11px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); padding: 6px 10px; background: var(--sheet-2); white-space: nowrap; }
table.grid th .sort { background: transparent; border: 0; padding: 0; font: inherit; color: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; display: inline-flex; align-items: center; gap: 4px; }
table.grid th .sort .i { opacity: .5; } table.grid th[aria-sort] .sort .i { opacity: 1; }
table.grid td { padding: 6px 10px; border-top: 1px solid var(--rule); vertical-align: middle; height: 34px; }
table.grid tfoot td { border-top: 1.5px solid var(--frame); font-weight: 700; background: var(--sheet-2); }
table.grid .num { text-align: right; white-space: nowrap; }
table.grid .date, table.grid .nowrap { white-space: nowrap; }
table.grid .ellipsis { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
table.grid tr.link { cursor: pointer; }
table.grid tr.link:hover { background: var(--sheet-2); }
table.grid tr.link:focus-visible { outline: 2px solid var(--ink); outline-offset: -2px; }
table.grid tr.void td { color: var(--ink-3); } table.grid tr.void td:first-child, table.grid tr.void td.keycol { text-decoration: line-through; }
table.grid td.empty { text-align: center; padding: 28px 12px; color: var(--ink-2); }
table.grid td.empty strong { display: block; margin: 6px 0 2px; color: var(--ink); }
table.grid .refkey { color: var(--ink-2); margin-right: 6px; }
table.grid td.tagcell { white-space: nowrap; }
table.grid.lines td { padding: 5px 6px; }
table.grid.lines input, table.grid.lines select { width: 100%; min-width: 140px; border: 1px solid var(--rule); padding: 5px 7px; background: var(--sheet); }
table.grid.lines input.qty { min-width: 70px; max-width: 110px; } table.grid.lines input.money-in { min-width: 100px; max-width: 150px; text-align: right; }
table.grid.lines input[type="date"] { min-width: 150px; max-width: 170px; } table.grid.lines input[type="checkbox"] { min-width: 0; width: 18px; }
table.grid.lines td.num { width: 1%; }
table.grid.lines td.invalid input { border-color: var(--red); }
table.grid.lines .form-error { font-size: 11.5px; color: var(--red); }

/* states: rectangular tags, always with text */
.st { display: inline-block; font: 600 11.5px/1.25 var(--cond); letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border: 1.5px solid var(--frame); color: var(--ink); background: var(--sheet); white-space: nowrap; }
.st.ok, .tone-ok { background: var(--frame); color: #fff; border-color: var(--frame); }
.st.now, .tone-warn { background: var(--mark); color: var(--ink); border-color: var(--frame); }
.st.bad, .tone-danger { background: var(--sheet); color: var(--red); border-color: var(--red); }
.st.info, .tone-info { background: var(--sheet); color: var(--ink); border-color: var(--frame); }
.st.good { background: var(--green-bg); color: var(--green); border-color: var(--green); }
.st.muted, .tone-muted { background: var(--sheet); color: var(--ink-3); border-color: var(--ink-3); }
.tag { display: inline-block; font: 600 11.5px/1.25 var(--cond); letter-spacing: .05em; text-transform: uppercase; padding: 2px 6px; border: 1.5px solid var(--frame); background: var(--sheet); white-space: nowrap; }

/* --------------------------------------------------------------- buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: 1.5px solid var(--frame); background: var(--sheet); color: var(--ink); font: 600 13px/1 var(--sans); cursor: pointer; white-space: nowrap; transition: background var(--t-fast), transform var(--t-fast); }
.btn:hover { background: var(--sheet-2); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--frame); color: #fff; }
.btn.primary:hover { background: #000; }
.btn.danger { color: var(--red); border-color: var(--red); }
.btn.danger:hover { background: var(--red-bg); }
.btn.ghost { border-color: transparent; }
.btn.ghost:hover { border-color: var(--rule); }
.btn.small { height: 30px; padding: 0 10px; font-size: 12.5px; }
.btn.xl { height: 48px; padding: 0 20px; font-size: 15px; }
.btn.block { width: 100%; justify-content: center; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .55; cursor: wait; }
.rail .menu-btn { display: none; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border: 1px solid transparent; background: transparent; cursor: pointer; color: var(--ink-2); }
.icon-btn:hover { border-color: var(--rule); color: var(--ink); }
.icon-btn.small { width: 26px; height: 26px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

/* ----------------------------------------------------------------- forms */
input[type="text"], input[type="search"], input[type="number"], input[type="date"], input[type="month"], input[type="password"], input[type="email"], select, textarea {
  width: 100%; border: 1px solid var(--rule); background: var(--sheet); padding: 7px 9px; min-height: 36px; color: var(--ink);
}
select { padding-right: 28px; background-image: url(icons/select-light.svg); background-repeat: no-repeat; background-position: right 8px center; background-size: 14px; -webkit-appearance: none; appearance: none; }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 0; border-color: var(--ink); }
input[disabled], select[disabled], textarea[disabled] { background: var(--sheet-2); color: var(--ink-2); }
input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); border: 1.5px solid var(--frame); background: var(--sheet); margin: 0; }
.form-grid .field { padding: 6px 10px 8px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.form-grid .field label, .form-grid .field .label { font: 600 11px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.form-grid .field .req { color: var(--red); margin-left: 3px; }
.form-grid .field.wide { grid-column: 1 / -1; }
.form-grid .field .ro { min-height: 24px; padding: 2px 0; font-weight: 600; overflow-wrap: anywhere; }
.form-grid .field.check { flex-direction: row; align-items: center; gap: 10px; padding-top: 12px; }
.form-grid .field.check label { text-transform: none; letter-spacing: 0; font: 500 13.5px/1.3 var(--sans); color: var(--ink); }
.form-grid .field.invalid { background: var(--red-bg); }
.form-grid .field .err { font-size: 12px; color: var(--red); display: flex; gap: 4px; align-items: center; }
.form-grid .field .help { font-size: 12px; color: var(--ink-3); }
.form-grid .field .money { position: relative; }
.form-grid .field .money input { text-align: right; }
.form-grid .field .money-echo { font-size: 12px; color: var(--ink-3); text-align: right; }
.form-error { color: var(--red); font-size: 13px; display: flex; gap: 6px; align-items: center; }
.form-error:empty { display: none; }
.tb .form-grid { border: 0; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.toolbar .search { position: relative; flex: 1 1 220px; max-width: 360px; display: flex; align-items: center; }
.toolbar .search .i { position: absolute; left: 10px; color: var(--ink-3); }
.toolbar .search input { padding-left: 34px; }
.toolbar select, .toolbar input[type="date"], .toolbar input[type="month"] { width: auto; min-width: 150px; }
.chip { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--rule); padding: 3px 6px 3px 8px; font-size: 12.5px; background: var(--sheet-2); }
.chip button { border: 0; background: transparent; padding: 0; display: inline-flex; cursor: pointer; }
.pager { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-top: 1px solid var(--rule); font-size: 12.5px; color: var(--ink-2); }
.notice { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--frame); background: var(--sheet); margin-top: 16px; font-size: 13.5px; }
.notice.warn { border-color: var(--red); background: var(--red-bg); }
.notice .btn { margin-left: auto; }
.empty { padding: 28px 12px; text-align: center; color: var(--ink-2); }
.empty.small { padding: 16px 12px; }
.hint { font-size: 12.5px; color: var(--ink-3); }

/* workspace */
.ws { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 16px; margin-top: 16px; align-items: start; }
.ws.no-side { grid-template-columns: minmax(0, 1fr); }
.ws .stack { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.ws .stack .tb { margin-top: 0; }
.ws-side { position: sticky; top: 16px; }
.totals .trows { display: flex; flex-direction: column; }
.totals .trow { display: flex; justify-content: space-between; gap: 12px; padding: 7px 12px; border-top: 1px solid var(--rule); align-items: center; }
.totals .trow:first-child { border-top: 0; }
.totals .trow span { color: var(--ink-2); font-size: 13px; }
.totals .trow strong { font-weight: 600; }
.totals .trow.grand { background: var(--frame); color: #fff; }
.totals .trow.grand span { color: var(--cyan-ink); } .totals .trow.grand strong { font: 700 20px/1.2 var(--cond); }
.totals .trow input { width: 140px; text-align: right; min-height: 30px; padding: 4px 8px; }
.totals .est { font-size: 11.5px; color: var(--ink-3); padding: 6px 12px 8px; }
.dirty { font: 600 11.5px/1.25 var(--cond); letter-spacing: .05em; text-transform: uppercase; color: var(--ink); background: var(--mark); padding: 3px 7px; }
.risk { margin-top: 20px; border: 1.5px solid var(--red); background: var(--sheet); }
.risk-row { display: flex; gap: 16px; align-items: center; justify-content: space-between; padding: 10px 12px; border-top: 1px solid var(--rule); }
.risk-row:first-child { border-top: 0; }
.risk-row h2 { font: 600 14px/1.3 var(--sans); } .risk-row p { font-size: 12.5px; color: var(--ink-2); }
.back { display: inline-flex; align-items: center; color: var(--ink); }
.title-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* steps of the month and to-dos */
.steps td.state { white-space: nowrap; }
.todo { list-style: none; margin: 0; padding: 0; }
.todo li { display: flex; gap: 10px; align-items: center; padding: 7px 12px; border-top: 1px solid var(--rule); }
.todo li:first-child { border-top: 0; }
.todo li a { color: inherit; flex: 1; }
.todo li .when { color: var(--ink-2); font-size: 12.5px; white-space: nowrap; }
.bars { padding: 10px 12px; display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 70px 1fr 110px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-row .track { height: 14px; background: var(--sheet-2); border: 1px solid var(--rule); }
.bar-row .bar { height: 100%; background: var(--cyan); }
.bar-row .bar.now { background: var(--mark); }
.bar-row .val { text-align: right; font-weight: 600; }

/* the REV strip */
.rev { position: fixed; left: var(--rail); right: 0; bottom: 0; height: var(--rev); display: grid; grid-template-columns: 64px repeat(4, 1fr) 190px; border-top: 2px solid var(--frame); background: var(--sheet); z-index: 20; }
.rev > div { padding: 5px 10px; border-right: 1.5px solid var(--frame); min-width: 0; overflow: hidden; font-size: 12.5px; }
.rev > div:last-child { border-right: 0; }
.rev .h { background: var(--frame); color: #fff; font: 700 13px/1 var(--cond); letter-spacing: .1em; display: flex; align-items: center; justify-content: center; }
.rev .k { font-size: 10.5px; }
.rev .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.rev .enter { animation: rev-in var(--t) ease-out; }
@keyframes rev-in { from { transform: translateX(-12px); opacity: 0; } to { transform: none; opacity: 1; } }

/* --------------------------------------------------------------- dialogs */
.modal { border: 2px solid var(--frame); padding: 0; max-width: min(640px, 94vw); width: 100%; background: var(--sheet); color: var(--ink); }
.modal::backdrop { background: rgba(29, 32, 36, .45); }
.dialog-head { display: flex; align-items: center; justify-content: space-between; padding: 8px 10px 8px 14px; border-bottom: 1.5px solid var(--frame); }
.dialog-head h2 { font: 700 15px/1.25 var(--cond); letter-spacing: .06em; text-transform: uppercase; }
.dialog-body { padding: 14px; display: flex; flex-direction: column; gap: 12px; max-height: 70vh; overflow: auto; }
.dialog-body .form-grid { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.dialog-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--rule); }
#toasts { position: fixed; top: 14px; right: 14px; display: flex; flex-direction: column; gap: 8px; z-index: 60; max-width: min(420px, 90vw); }
.toast { /* taste-skill-ignore: aviso flotante, un overlay real */ display: flex; align-items: center; gap: 8px; padding: 9px 10px 9px 12px; border: 1.5px solid var(--frame); background: var(--sheet); font-size: 13.5px; box-shadow: 0 6px 18px rgba(29, 32, 36, .18); animation: rev-in var(--t) ease-out; }
.toast.error { border-color: var(--red); color: var(--red); }
.toast span { white-space: pre-line; flex: 1; }

/* ------------------------------------------------------------------ login */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.login-box { width: min(440px, 100%); }
.login-box .brandline { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.login-box .brandline img { width: 44px; height: 44px; }
.login-box .brandline strong { font: 700 26px/1 var(--cond); display: block; }
.login-box .brandline small { font-size: 13px; color: var(--ink-2); }
.login-box .form-grid { grid-template-columns: 1fr; }
.login-box .pass { display: flex; gap: 6px; align-items: center; }
.login-box .pass input { flex: 1; }
.login-box .demo { font-size: 12.5px; color: var(--ink-2); margin-top: 12px; }

/* --------------------------------------------------------------- reports */
.report-params { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--rule); align-items: end; }
.report-params .field label { font: 600 11px/1.3 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); display: block; margin-bottom: 3px; }
.report-notes { list-style: none; margin: 0; padding: 8px 12px; font-size: 12.5px; color: var(--ink-2); border-top: 1px solid var(--rule); }
.section-title { font: 700 15px/1.25 var(--cond); letter-spacing: .06em; text-transform: uppercase; margin: 22px 0 0; }
.exports { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.exports .tb { margin-top: 0; }
.exports .desc { font-size: 13px; color: var(--ink-2); padding: 10px 12px 0; }
.file-pick { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.file-pick .name { font-size: 13px; color: var(--ink-2); }
textarea.csv { /* taste-skill-ignore: contenido CSV literal */ font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; min-height: 110px; }
.result-errors { margin-top: 8px; }

/* -------------------------------------------------------------- narrow */
@media (max-width: 980px) {
  .app { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 8px 12px; gap: 6px; }
  .rail .brand { padding: 4px 8px; }
  .rail nav { flex: 1 1 100%; display: none; margin-top: 0; }
  .rail.open nav { display: block; }
  .rail .co { border-top: 0; margin: 0 0 0 auto; padding: 0 8px; }
  .rail .co b, .rail .co .rut { display: none; }
  .rail .menu-btn { display: inline-flex; background: transparent; color: #fff; border-color: rgba(255, 255, 255, .35); }
  .rail .menu-btn:hover { background: var(--cyan-2); }
  .page { padding: 14px 14px calc(var(--rev) + 20px); }
  .rev { left: 0; grid-template-columns: 50px 1fr 1fr; }
  .rev > div:nth-child(n + 4) { display: none; }
  .cajetin > .cell.actions { justify-content: flex-start; }
  .cajetin > .cell.acts { grid-column: 1 / -1; justify-content: flex-start; border-right: 0; border-top: 1.5px solid var(--frame); }
  .ws { grid-template-columns: 1fr; } .ws-side { position: static; }
  .cajetin[class] { grid-template-columns: 1fr 1fr; }
  .cajetin > .cell:first-child { grid-column: 1 / -1; border-right: 0; border-bottom: 1.5px solid var(--frame); }
  .grid2 { grid-template-columns: 1fr; }
  table.grid.responsive thead { display: none; }
  table.grid.responsive tr { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 10px; padding: 8px 10px; border-top: 1px solid var(--rule); }
  table.grid.responsive td { display: block; border: 0; padding: 2px 0; height: auto; }
  table.grid.responsive td::before { content: attr(data-label); display: block; font: 600 10.5px/1.2 var(--cond); letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
  table.grid.responsive td.num { text-align: left; }
}
