/* =====================================================================
   Campa Fuel · estilos
   Blanco, tipografía Manrope, iconos de trazo, azul como color principal.
   ===================================================================== */
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Manrope"; font-style: normal; font-display: swap; font-weight: 200 800;
  src: url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2-variations"), url("../fonts/manrope-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface-2: #f6f7f9;
  --ink: #111827;
  --ink-2: #4b5563;
  --ink-3: #8a94a3;
  --line: #e5e8ec;
  --line-2: #d8dde3;

  --primary: #1f6fe0;
  --primary-d: #185bbd;
  --primary-50: #eaf2fd;
  --primary-100: #d4e4fb;

  --diesel: #1f6fe0;
  --diesel-50: #eaf2fd;
  --gasolina: #f29d0c;
  --gasolina-50: #fff5e3;
  --gasolina-ink: #b46f00;

  --ok: #16a34a;
  --ok-d: #128a3e;
  --ok-50: #e8f7ee;
  --bad: #dc2626;
  --bad-d: #b91c1c;
  --bad-50: #fdecec;
  --warn-50: #fff4e5;
  --warn-ink: #9a4b00;

  --r-sm: 8px;
  --r: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 1px 1px rgba(17, 24, 39, .02);
  --shadow-btn: 0 1px 2px rgba(17, 24, 39, .08);
  --shadow-pop: 0 14px 36px rgba(17, 24, 39, .16);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);

  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink);
  -webkit-text-size-adjust: 100%;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); }
body { min-height: 100vh; -webkit-tap-highlight-color: transparent; font-size: 15px; line-height: 1.45; }
button, input, select { font: inherit; color: inherit; }
button { cursor: pointer; }
[hidden] { display: none !important; }
.muted { color: var(--ink-3); }
.small { font-size: .88rem; }

/* ---------- Iconos ---------- */
.ic { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Piezas comunes ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.brand { display: flex; align-items: center; gap: 10px; }
.logo { width: 36px; height: 36px; border-radius: 9px; background: var(--primary); color: #fff; display: grid; place-items: center; }
.logo .ic { width: 22px; height: 22px; }
.brand-name { font-size: 1.3rem; font-weight: 800; letter-spacing: -.01em; }
.brand-name b { font-weight: 800; }
.brand.big .logo { width: 40px; height: 40px; }
.brand.big .brand-name b { color: var(--primary); }

.badge { width: 34px; height: 34px; border-radius: 8px; background: var(--primary-50); color: var(--primary); display: inline-grid; place-items: center; flex: none; }
.badge .ic { width: 19px; height: 19px; }
.badge.green { background: var(--ok-50); color: var(--ok); }

.input {
  width: 100%; height: 46px; padding: 0 14px; border: 1px solid var(--line-2); border-radius: var(--r-sm);
  background: #fff; font-size: 1rem; transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: #9aa3af; }
.input::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }
input[type="date"].input::-webkit-calendar-picker-indicator { display: block !important; opacity: .6; }
.input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-100); }
.input.sm { height: 38px; font-size: .9rem; width: auto; }
.input.invalid, .combo.invalid .input { border-color: var(--bad); box-shadow: 0 0 0 3px var(--bad-50); }
.select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer; font-size: .92rem; height: 40px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center;
}

.btn-primary, .btn-success, .btn-ghost, .btn-outline, .btn-danger {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--r-sm); border: 1px solid transparent; padding: 0 16px; height: 42px;
  font-weight: 700; font-size: .95rem; white-space: nowrap; transition: background .15s, transform .06s;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-d); }
.btn-success { background: var(--ok); color: #fff; }
.btn-success:hover { background: var(--ok-d); }
.btn-ghost { background: var(--surface-2); border-color: var(--line); color: var(--ink); }
.btn-outline { background: #fff; border-color: var(--line-2); color: var(--ink); box-shadow: var(--shadow-btn); font-weight: 600; }
.btn-outline.active { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }
.btn-primary:active, .btn-success:active, .btn-ghost:active { transform: translateY(1px); }
.btn-primary:disabled, .btn-success:disabled { opacity: .55; cursor: default; }
.btn-block { width: 100%; }
.btn-lg { height: 50px; font-size: 1rem; }
.btn-xl { height: 56px; font-size: 1.05rem; letter-spacing: .02em; font-weight: 800; }
.btn-link { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; color: var(--ink-2); font-weight: 600; font-size: .9rem; padding: 6px 4px; white-space: nowrap; }
.btn-link:hover { color: var(--ink); }
.btn-link .ic { width: 18px; height: 18px; }

.square-btn {
  flex: none; width: 48px; height: 46px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink); box-shadow: var(--shadow-btn);
}
.square-btn:active { transform: translateY(1px); }
.icon-btn { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink-2); }

.netpill {
  display: inline-flex; align-items: center; gap: 7px; border: 0; border-radius: 999px; padding: 5px 11px;
  font-size: .76rem; font-weight: 700; white-space: nowrap; background: var(--ok-50); color: var(--ok-d);
}
.netpill i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.netpill.off { background: var(--warn-50); color: var(--warn-ink); }
.netpill.err { background: var(--bad-50); color: var(--bad-d); }
.netpill.sync { background: var(--primary-50); color: var(--primary-d); }
.netpill.demo { background: var(--surface-2); color: var(--ink-2); }
.netpill.light { margin-top: 10px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }
.dot.ok { background: var(--ok); } .dot.bad { background: var(--bad); }
.dot-diesel { background: var(--diesel); } .dot-gasolina { background: var(--gasolina); }
.sq { display: inline-block; width: 9px; height: 9px; border-radius: 2px; flex: none; }
.sq-diesel { background: var(--diesel); } .sq-gasolina { background: var(--gasolina); }

.tag-pending { font-size: .7rem; background: var(--warn-50); color: var(--warn-ink); padding: 2px 7px; border-radius: 6px; font-weight: 700; }

/* =====================================================================
   VISTA CAMPA (móvil)
   ===================================================================== */
.campa { max-width: 560px; margin: 0 auto; min-height: 100vh; background: var(--bg); }
.m-head {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: calc(var(--safe-t) + 14px) 18px 14px; background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.m-head-right { display: flex; align-items: center; gap: 8px; }
.m-main { padding: 14px 16px calc(96px + var(--safe-b)); }
.m-main .tab-hide { display: none !important; }
.m-sub { margin: 0 2px 14px; color: var(--ink-2); font-size: .92rem; }

.stock-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stock-card {
  background: #fff; border: 1px solid var(--line); border-top: 3px solid var(--diesel); border-radius: var(--r-lg);
  padding: 14px 16px 12px; box-shadow: var(--shadow); color: var(--diesel);
}
.stock-card[data-fuel="gasolina"] { border-top-color: var(--gasolina); color: var(--gasolina); }
.sc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; color: var(--ink-2); font-size: .9rem; font-weight: 600; line-height: 1.3; }
.sc-head .ic { color: var(--diesel); width: 22px; height: 22px; }
.stock-card[data-fuel="gasolina"] .sc-head .ic { color: var(--gasolina); }
.sc-value { color: var(--ink); font-size: 2.3rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin: 10px 0 12px; font-variant-numeric: tabular-nums; }
.sc-value small { font-size: 1rem; font-weight: 600; color: var(--ink-3); margin-left: 6px; }
.sc-bar { height: 5px; border-radius: 99px; background: #eef0f3; overflow: hidden; }
.sc-bar i { display: block; height: 100%; width: 0; background: currentColor; border-radius: 99px; transition: width .4s; }
.sc-cap { margin-top: 8px; font-size: .78rem; font-weight: 600; color: var(--diesel); }
.stock-card[data-fuel="gasolina"] .sc-cap { color: var(--gasolina-ink); }
.stock-card.low { border-top-color: var(--bad); color: var(--bad); }
.stock-card.low .sc-value { color: var(--bad); }
.stock-card.low .sc-cap { color: var(--bad); }

.low-alert {
  display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 12px 14px; border-radius: var(--r);
  background: var(--bad-50); border: 1px solid #f6c7c7; color: var(--bad-d); font-weight: 800; font-size: .92rem; line-height: 1.3;
}
.low-alert .ic { width: 22px; height: 22px; }

.btn-restock {
  width: 100%; margin-top: 14px; height: 58px; border: 0; border-radius: var(--r);
  display: flex; align-items: center; justify-content: center; gap: 10px;
  color: #fff; font-size: 1.05rem; font-weight: 800; letter-spacing: .03em; box-shadow: var(--shadow-btn); transition: background .2s;
}
.btn-restock.ok { background: #16a34a; }
.btn-restock.low { background: #dc2626; }
.btn-restock:active { transform: translateY(1px); }

.form { margin-top: 14px; padding: 18px; }
.card-title { display: flex; align-items: center; gap: 12px; margin: 0 0 18px; font-size: 1.08rem; font-weight: 800; }
.card-sub-title { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: .95rem; font-weight: 700; }
.card-sub-title .ic { width: 18px; height: 18px; color: var(--ink-3); }
.field { display: block; margin-bottom: 18px; }
.lbl { display: block; font-size: .88rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.row-gap { display: flex; gap: 10px; }
.row-gap > .input, .row-gap > .combo { flex: 1; min-width: 0; }
.row-2 { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; margin-top: 6px; }
.row-2 > * { min-width: 0; }
.row-2 .btn-success, .row-2 .btn-primary { white-space: normal; line-height: 1.2; padding: 0 12px; }
.row-2 .btn-ghost { height: 50px; }

.plate-input { text-transform: uppercase; font-weight: 800; letter-spacing: .1em; font-size: 1.15rem; }
.plate-input::placeholder { font-weight: 700; letter-spacing: .1em; }

.ocr-box { display: flex; gap: 10px; margin-top: 10px; padding: 10px; border-radius: var(--r); background: var(--surface-2); border: 1px dashed var(--line-2); }
.ocr-box img { width: 92px; height: 68px; object-fit: cover; border-radius: 6px; background: var(--line); }
.ocr-info { flex: 1; min-width: 0; }
.ocr-status { font-size: .86rem; color: var(--ink-2); font-weight: 600; }
.ocr-status.ok { color: var(--ok-d); } .ocr-status.err { color: var(--bad-d); }
.progress { height: 5px; background: var(--line); border-radius: 99px; margin: 7px 0; overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: var(--primary); transition: width .2s; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line-2); background: #fff; border-radius: 999px; padding: 5px 12px; font-weight: 800; letter-spacing: .06em; font-size: .9rem; }
.chip.active { background: var(--primary-50); color: var(--primary); border-color: var(--primary); }

/* Opciones seleccionables (combustible, litros) */
.fuel-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.opt, .liter-btn, .rl-quick button {
  display: flex; align-items: center; justify-content: center; gap: 8px; height: 50px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink);
  font-size: 1rem; font-weight: 600; box-shadow: var(--shadow-btn); transition: background .12s, border-color .12s, color .12s;
}
.opt[aria-checked="true"], .liter-btn[aria-pressed="true"], .rl-quick button[aria-pressed="true"] {
  background: var(--primary-50); border-color: var(--primary); color: var(--primary); box-shadow: none;
}
.opt[data-fuel="gasolina"][aria-checked="true"], .opt[data-rfuel="gasolina"][aria-checked="true"] {
  background: var(--gasolina-50); border-color: var(--gasolina); color: var(--gasolina-ink);
}
.fuel-toggle.invalid .opt { border-color: var(--bad); }
.liters-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.liters-manual { margin-top: 10px; }
.rl-quick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stepper { display: flex; align-items: center; justify-content: center; gap: 18px; margin: 16px 0 12px; }
.stepper .square-btn { width: 52px; height: 52px; border-radius: 50%; }
.stepper-val { min-width: 120px; text-align: center; }
.stepper-val output { font-size: 2.4rem; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.stepper-val small { font-size: 1.05rem; color: var(--ink-3); font-weight: 600; margin-left: 4px; }

/* Combo empresa */
.combo { position: relative; }
.combo .input { padding-right: 44px; }
.combo-ic { position: absolute; right: 14px; top: 13px; color: var(--ink-3); pointer-events: none; }
.combo-clear { position: absolute; right: 8px; top: 8px; width: 30px; height: 30px; display: grid; place-items: center; border: 0; border-radius: 50%; background: var(--surface-2); color: var(--ink-2); }
.combo-clear .ic { width: 16px; height: 16px; }
.combo-clear:not([hidden]) ~ .combo-ic { display: none; }
.combo.selected .input { border-color: var(--primary); background: var(--primary-50); color: var(--primary-d); font-weight: 700; }
.combo-list {
  position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none;
  background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); max-height: 280px; overflow: auto;
}
.combo-list li { padding: 11px 12px; border-radius: 6px; cursor: pointer; }
.combo-list li[aria-selected="true"], .combo-list li:hover { background: var(--surface-2); }
.combo-list li.create { display: flex; align-items: center; gap: 8px; color: var(--primary); font-weight: 700; border-top: 1px solid var(--line); margin-top: 4px; }
.combo-list li.create .ic { width: 18px; height: 18px; }
.combo-list li.empty { color: var(--ink-3); cursor: default; }

.recent { margin-top: 14px; padding: 16px 18px; }
.recent-list { list-style: none; margin: 0; padding: 0; }
.recent-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: .92rem; }
.recent-list li:first-child { border-top: 0; }
.recent-list li.muted { color: var(--ink-3); }
.recent-list .rp { font-weight: 800; letter-spacing: .05em; }
.recent-list .rl { margin-left: auto; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.recent-list .rm { color: var(--ink-3); font-size: .8rem; }

/* Barra inferior */
.tabbar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; z-index: 25; width: 100%; max-width: 560px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  padding: 8px 12px calc(8px + var(--safe-b)); background: #fff; border-top: 1px solid var(--line);
}
.tabbar button {
  display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 8px 4px; border: 0; border-radius: var(--r);
  background: transparent; color: var(--ink-3); font-size: .78rem; font-weight: 600;
}
.tabbar button.active { background: var(--primary-50); color: var(--primary); font-weight: 700; }

/* =====================================================================
   VISTA OFICINA (escritorio)
   ===================================================================== */
.office { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  padding: 26px 20px 20px; background: #fff; border-right: 1px solid var(--line);
}
.side-loc { display: flex; align-items: center; gap: 6px; margin: 14px 0 0 4px; font-size: .82rem; color: var(--ink-2); }
.side-loc .ic { width: 15px; height: 15px; }
.side-label { margin: 32px 0 10px 8px; font-size: .7rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--ink-2); }
.side-nav { display: grid; gap: 4px; }
.side-nav button {
  display: flex; align-items: center; gap: 12px; height: 44px; padding: 0 14px; border: 0; border-radius: var(--r);
  background: none; color: var(--ink-2); font-weight: 600; font-size: .93rem; text-align: left; white-space: nowrap;
}
.side-nav button .ic { width: 19px; height: 19px; }
.side-nav button:hover { background: var(--surface-2); color: var(--ink); }
.side-nav button.active { background: var(--primary-50); color: var(--primary); font-weight: 700; }
.side-foot { margin-top: auto; border-top: 1px solid var(--line); padding-top: 18px; }
.side-status { padding: 0 6px 14px; }
.ss-title { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .9rem; }
.ss-title.bad { color: var(--bad-d); }
.ss-sub { font-size: .76rem; color: var(--primary); margin-top: 3px; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; padding: 10px 8px; border-radius: var(--r-sm); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.side-link:hover { background: var(--surface-2); color: var(--ink); }

.office-main { padding: 40px clamp(20px, 3.5vw, 52px) 48px; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.page-head h1 { margin: 0; font-size: 1.9rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.15; }
.page-head p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
.page-head .btn-primary { height: 44px; }

.toolbar { padding: 14px 18px; }
.tb-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.tb-row.filters { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 4px; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 7px; font-weight: 600; font-size: .9rem; color: var(--ink-2); }
.seg button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(17,24,39,.12); font-weight: 700; }
.btn-outline .ic { width: 17px; height: 17px; }
.custom-range { display: flex; gap: 10px; }
.custom-range label { display: flex; align-items: center; gap: 6px; font-size: .85rem; color: var(--ink-2); font-weight: 600; }
.tb-date { margin-left: auto; display: flex; align-items: center; gap: 8px; color: var(--ink-2); font-size: .88rem; }
.tb-date .ic { width: 16px; height: 16px; }
.tb-date span::first-letter { text-transform: uppercase; }
.tb-note { margin-top: 10px; font-size: .85rem; color: var(--warn-ink); background: var(--warn-50); padding: 8px 12px; border-radius: var(--r-sm); }

.sec { margin-top: 20px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.kpi { padding: 20px 22px; min-height: 168px; }
.kpi-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; font-size: .9rem; font-weight: 600; color: var(--ink-2); }
.kpi-value { font-size: 2.1rem; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; margin-top: 14px; font-variant-numeric: tabular-nums; }
.kpi-value small { font-size: .95rem; font-weight: 600; color: var(--ink-3); margin-left: 5px; }
.kpi-value.sm { font-size: 1.7rem; margin-top: 6px; }
.kpi-value.low { color: var(--bad); }
.kpi-sub { margin-top: 12px; font-size: .8rem; color: var(--primary); font-weight: 500; }
.kpi-sub .d { color: var(--diesel); } .kpi-sub .g { color: var(--gasolina-ink); }
.kpi-sub .bad { color: var(--bad-d); font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.kpi-sub .bad .ic { width: 15px; height: 15px; }
.kpi-pair { display: grid; grid-template-columns: 1fr 1fr; margin-top: 10px; }
.kpi-pair > div + div { border-left: 1px solid var(--line); padding-left: 18px; }
.kp-lbl { display: flex; align-items: center; gap: 7px; font-size: .8rem; color: var(--primary); font-weight: 600; }
.kpi-pair > div + div .kp-lbl { color: var(--gasolina-ink); }

.charts { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 0; margin-top: 20px; }
.charts .chart-card:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.charts .chart-card:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; border-left: 0; }
.chart-card { padding: 22px 24px; min-width: 0; }
.chart-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.chart-head h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.chart-head p { margin: 4px 0 0; font-size: .82rem; color: var(--ink-2); }
.legend { display: flex; gap: 14px; font-size: .8rem; color: var(--ink-2); padding-top: 4px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.chart-box { position: relative; height: 300px; }
.chart-empty { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink-3); font-size: .92rem; text-align: center; padding: 0 20px; }

.donut-wrap { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 22px; align-items: center; min-height: 300px; }
.donut-box { position: relative; width: 170px; height: 170px; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; pointer-events: none; }
.donut-center b { font-size: 1.7rem; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.donut-center span { font-size: .74rem; color: var(--ink-3); }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.donut-legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; gap: 10px; align-items: start; }
.donut-legend .sq { margin-top: 5px; }
.donut-legend .dl-name { font-weight: 700; font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.donut-legend .dl-l { font-size: .76rem; color: var(--ink-3); }
.donut-legend .dl-p { font-weight: 800; font-size: .86rem; font-variant-numeric: tabular-nums; }
.donut-legend li.muted { display: block; color: var(--ink-3); font-size: .9rem; }

/* Tablas */
.table-card { padding: 20px 22px; }
.sec.table-card, .sec .table-card { margin-top: 20px; }
.table-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.table-head h3 { margin: 0; font-size: 1.02rem; font-weight: 800; }
.count { color: var(--ink-3); font-weight: 600; font-size: .88rem; }
.table-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.search { position: relative; }
.search .ic { position: absolute; left: 12px; top: 11px; width: 18px; height: 18px; color: var(--ink-3); }
.search .input { width: 320px; height: 40px; padding-left: 38px; font-size: .92rem; }
.export { position: relative; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); z-index: 10; min-width: 200px; padding: 6px; background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow-pop); }
.menu button { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 6px; font-weight: 600; }
.menu button:hover { background: var(--surface-2); }
.menu .ic { width: 18px; height: 18px; color: var(--ink-2); }
.table-wrap { overflow: auto; max-height: 620px; border: 1px solid var(--line); border-radius: var(--r); }
.table-wrap.short { max-height: 420px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.data-table th { position: sticky; top: 0; background: var(--surface-2); text-align: left; padding: 11px 14px; font-size: .78rem; font-weight: 700; color: var(--ink-2); border-bottom: 1px solid var(--line); white-space: nowrap; user-select: none; }
.data-table th[data-sort] { cursor: pointer; }
.data-table th[data-sort]:hover { color: var(--ink); }
.data-table th.sorted::after { content: " ↓"; } .data-table th.sorted.asc::after { content: " ↑"; }
.data-table td { padding: 11px 14px; border-bottom: 1px solid #f0f2f4; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: #fafbfc; }
.data-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.data-table .plate { font-weight: 800; letter-spacing: .05em; }
.data-table .strong { font-weight: 700; }
.data-table td.empty { text-align: center; padding: 34px; color: var(--ink-3); }
.fuel-tag { display: inline-flex; align-items: center; gap: 7px; font-weight: 600; }
.pct-bar { display: inline-block; width: 70px; height: 5px; border-radius: 99px; background: #eef0f3; vertical-align: middle; margin-right: 8px; overflow: hidden; }
.pct-bar i { display: block; height: 100%; background: var(--primary); }
.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; font-size: .86rem; color: var(--ink-2); }
.pager button { border: 1px solid var(--line-2); background: #fff; border-radius: var(--r-sm); padding: 6px 12px; margin-left: 6px; font-weight: 600; }
.pager button:disabled { opacity: .4; cursor: default; }

.stock-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stock-card.big { padding: 20px 22px; }
.stock-card.big .sc-value { font-size: 2.4rem; }

/* ---------- Modal ---------- */
.modal { border: 0; padding: 0; border-radius: 16px; width: min(440px, calc(100vw - 24px)); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal::backdrop { background: rgba(17, 24, 39, .45); }
.modal-body { padding: 22px; }

/* ---------- Avisos ---------- */
.toast-zone { position: fixed; left: 50%; bottom: calc(92px + var(--safe-b)); transform: translateX(-50%); z-index: 100; display: grid; gap: 8px; width: min(520px, calc(100vw - 24px)); }
body[data-view="oficina"] .toast-zone { bottom: 24px; }
.toast { display: flex; align-items: center; gap: 10px; background: var(--ink); color: #fff; padding: 13px 16px; border-radius: var(--r); font-weight: 600; font-size: .92rem; box-shadow: var(--shadow-pop); animation: tin .2s ease-out; }
.toast .ic { width: 19px; height: 19px; }
.toast.ok { background: #14532d; } .toast.warn { background: #7c3d00; } .toast.err { background: #7f1d1d; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) { .toast { animation: none; } }

/* ---------- Responsive ---------- */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .charts .chart-card:first-child, .charts .chart-card:last-child { border-radius: var(--r-lg); border-left: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .office { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: sticky; z-index: 20; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px 14px; border-right: 0; border-bottom: 1px solid var(--line); }
  .side-loc, .side-label, .ss-sub, .ss-title { display: none; }
  .side-nav { order: 3; width: 100%; display: flex; overflow-x: auto; gap: 6px; scrollbar-width: none; }
  .side-nav button { height: 38px; flex: none; font-size: .86rem; padding: 0 12px; }
  .side-foot { margin: 0 0 0 auto; border: 0; padding: 0; display: flex; align-items: center; gap: 6px; }
  .side-status { padding: 0; } .netpill.light { margin: 0; }
  .side-link { padding: 8px; font-size: 0; gap: 0; } .side-link .ic { width: 20px; height: 20px; }
  .office-main { padding: 20px 14px 40px; }
  .page-head h1 { font-size: 1.5rem; }
  .tb-row.filters { grid-template-columns: minmax(0, 1fr); }
  .tb-date { margin-left: 0; width: 100%; }
  .stock-big { grid-template-columns: minmax(0, 1fr); }
  .search .input { width: 100%; } .search { flex: 1; min-width: 200px; }
}
@media (max-width: 560px) {
  .kpis { grid-template-columns: minmax(0, 1fr); }
  .donut-wrap { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .donut-legend { width: 100%; }
  .page-head { flex-direction: column; }
}
@media (max-width: 380px) {
  .brand-name { font-size: 1.1rem; }
  .sc-value { font-size: 1.9rem; }
  .m-main { padding-left: 12px; padding-right: 12px; }
}

/* =====================================================================
   Matrícula / bastidor + escáner en directo
   ===================================================================== */
.lbl-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; }
.lbl-row .lbl { margin: 0; }
.mini-seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 8px; padding: 3px; }
.mini-seg button { border: 0; background: transparent; padding: 5px 10px; border-radius: 6px; font-size: .78rem; font-weight: 600; color: var(--ink-2); white-space: nowrap; }
.mini-seg button[aria-checked="true"] { background: #fff; color: var(--primary); box-shadow: 0 1px 3px rgba(17,24,39,.12); font-weight: 700; }
.plate-input.vin { font-size: .98rem; letter-spacing: .06em; }
.scan-btn-main { background: var(--primary); border-color: var(--primary); color: #fff; }
.hint { margin-top: 7px; font-size: .8rem; font-weight: 600; color: var(--ink-3); }
.hint.ok { color: var(--ok-d); } .hint.warn { color: var(--warn-ink); }
.tag-vin { display: inline-block; margin-left: 6px; font-size: .68rem; font-weight: 700; color: var(--primary); background: var(--primary-50); padding: 1px 6px; border-radius: 5px; letter-spacing: 0; vertical-align: 1px; }

body.scanning { overflow: hidden; }
.scanner { position: fixed; inset: 0; z-index: 200; background: #000; color: #fff; }
.scanner video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.scan-frame { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.scan-box {
  position: relative; width: min(88vw, 560px); aspect-ratio: 4.2 / 1; border-radius: 10px;
  box-shadow: 0 0 0 200vmax rgba(0, 0, 0, .55);
}
.scan-box .c { position: absolute; width: 26px; height: 26px; border: 4px solid #fff; }
.scan-box .tl { left: -2px; top: -2px; border-right: 0; border-bottom: 0; border-radius: 10px 0 0 0; }
.scan-box .tr { right: -2px; top: -2px; border-left: 0; border-bottom: 0; border-radius: 0 10px 0 0; }
.scan-box .bl { left: -2px; bottom: -2px; border-right: 0; border-top: 0; border-radius: 0 0 0 10px; }
.scan-box .br { right: -2px; bottom: -2px; border-left: 0; border-top: 0; border-radius: 0 0 10px 0; }
.scan-line { position: absolute; left: 8px; right: 8px; top: 50%; height: 2px; background: rgba(31, 111, 224, .9); box-shadow: 0 0 12px rgba(31,111,224,.9); animation: scanline 1.8s ease-in-out infinite; }
@keyframes scanline { 0%, 100% { transform: translateY(-34px); } 50% { transform: translateY(34px); } }
@media (prefers-reduced-motion: reduce) { .scan-line { animation: none; } }
.scan-top { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: calc(var(--safe-t) + 14px) 16px 14px; background: linear-gradient(rgba(0,0,0,.6), transparent); }
.scan-title { font-weight: 800; font-size: 1.05rem; }
.scan-round { width: 46px; height: 46px; border-radius: 50%; border: 0; background: rgba(255,255,255,.18); color: #fff; display: grid; place-items: center; backdrop-filter: blur(6px); }
.scan-round.on { background: #fff; color: #111; }
.scan-bottom { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 16px calc(var(--safe-b) + 18px); background: linear-gradient(transparent, rgba(0,0,0,.75) 35%); display: grid; gap: 12px; justify-items: center; text-align: center; }
.scan-status { font-weight: 700; font-size: .95rem; max-width: 420px; }
.scan-status.ok { color: #8fd3ff; } .scan-status.err { color: #ffb4b4; }
.scan-sugg { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 8px; }
.scan-chip { display: grid; gap: 1px; border: 0; border-radius: 10px; background: #fff; color: var(--ink); padding: 8px 14px; font-weight: 800; letter-spacing: .06em; font-size: 1rem; }
.scan-chip small { font-size: .66rem; letter-spacing: 0; color: var(--ink-3); font-weight: 700; }
.scan-photo { display: inline-flex; align-items: center; gap: 8px; border: 1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff; border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: .9rem; }

/* =====================================================================
   v3 · Acceso, roles, correcciones, avisos, equipo, ajustes, panel Tariac
   ===================================================================== */
:root { --badge-gap: 0px; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; letter-spacing: .04em; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.textarea { height: auto; padding: 12px 14px; resize: vertical; min-height: 84px; font: inherit; }
.hint { display: block; margin-top: 6px; font-size: .8rem; color: var(--ink-3); font-weight: 500; }
.neg { color: var(--bad-d) !important; } .pos { color: var(--ok-d) !important; }
.wrap { white-space: normal !important; } .nowrap { white-space: nowrap; }
.btn-link.inline { padding: 0; font-weight: 700; color: var(--primary); }
.btn-danger { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: var(--r-sm); padding: 0 16px; height: 42px; background: var(--bad); color: #fff; font-weight: 800; }
.btn-danger:hover { background: var(--bad-d); }
.btn-outline.danger { color: var(--bad-d); border-color: #f2c4c4; }
.btn-mini { display: inline-flex; align-items: center; gap: 5px; height: 30px; padding: 0 10px; border: 1px solid var(--line-2); border-radius: 7px; background: #fff; font-size: .78rem; font-weight: 700; color: var(--ink); white-space: nowrap; }
.btn-mini .ic { width: 15px; height: 15px; }
.btn-mini.danger { color: var(--bad-d); border-color: #f2c4c4; }
.btn-mini:hover { background: var(--surface-2); }
.check { display: inline-flex; align-items: center; gap: 7px; font-size: .86rem; color: var(--ink-2); font-weight: 600; white-space: nowrap; cursor: pointer; }
.check input { width: 17px; height: 17px; accent-color: var(--primary); }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; }
.two-col > .card { margin-top: 0; }
.sec-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mini-field { flex: 1; display: grid; gap: 4px; font-size: .8rem; font-weight: 700; color: var(--ink-2); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 10px 18px; margin: 0 0 14px; font-size: .92rem; }
.kv dt { color: var(--ink-2); font-weight: 600; } .kv dd { margin: 0; }
.big-code { font-family: ui-monospace, Menlo, monospace; font-size: 1.15rem; font-weight: 800; letter-spacing: .12em; background: var(--primary-50); color: var(--primary-d); padding: 3px 9px; border-radius: 7px; }
.msg-box { white-space: pre-wrap; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; font-size: .84rem; font-family: inherit; margin: 8px 0 12px; }

/* Etiquetas de estado */
.tag-annul, .tag-edit, .tag-low, .tag-ok { display: inline-block; font-size: .7rem; font-weight: 800; padding: 2px 7px; border-radius: 6px; white-space: nowrap; }
.tag-annul { background: var(--bad-50); color: var(--bad-d); }
.tag-edit { background: var(--primary-50); color: var(--primary-d); }
.tag-low { background: var(--warn-50); color: var(--warn-ink); }
.tag-ok { background: var(--ok-50); color: var(--ok-d); }
tr.annulled td, li.annulled .rp, li.annulled .rl { color: var(--ink-3); }
tr.annulled td.plate, li.annulled .rp { text-decoration: line-through; }
.data-table td.act, .data-table th.act { width: 1%; text-align: right; }
.row-btn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink-2); margin-left: 4px; }
.row-btn:hover { color: var(--primary); border-color: var(--primary); }
.row-btn .ic { width: 16px; height: 16px; }
.data-table td.msg { max-width: 280px; font-size: .84rem; }
.nav-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; background: var(--bad); color: #fff; font-size: .72rem; font-weight: 800; display: inline-grid; place-items: center; }
.seg .nav-badge { margin-left: 6px; }

/* ---------- Acceso ---------- */
.auth { min-height: 100vh; display: grid; place-items: start center; padding: calc(var(--safe-t) + 28px) 16px 40px; background: linear-gradient(180deg, #fff 0, var(--bg) 320px); }
.auth-card { width: min(440px, 100%); }
.auth-brand { justify-content: center; margin: 6px 0 22px; }
.auth-brand .logo { width: 46px; height: 46px; border-radius: 12px; }
.auth-brand .brand-name { font-size: 1.7rem; }
.auth-brand .brand-name b { color: var(--primary); }
.auth-pane { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: var(--shadow); }
.auth-seg { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 18px; }
.auth-seg button { padding: 10px; font-size: .95rem; }
.auth-title { margin: 0 0 6px; font-size: 1.25rem; }
.auth-form { margin-top: 6px; }
.auth-note, .auth-foot { font-size: .84rem; color: var(--ink-2); text-align: center; margin: 14px 0 0; }
.auth-foot { margin-top: 18px; }
.auth-msg { margin-top: 12px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); color: var(--ink-2); font-weight: 600; font-size: .9rem; }
.auth-msg.err { background: var(--bad-50); color: var(--bad-d); }
.auth-msg.ok { background: var(--ok-50); color: var(--ok-d); }
.code-input { text-transform: uppercase; font-weight: 800; letter-spacing: .18em; font-size: 1.15rem; }
.pin-dots { display: flex; gap: 12px; justify-content: center; margin: 4px 0 14px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line-2); transition: background .1s, border-color .1s; }
.pin-dots i.on { background: var(--primary); border-color: var(--primary); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 18px; }
.pinpad button { height: 58px; border: 1px solid var(--line-2); border-radius: 12px; background: var(--surface-2); font-size: 1.45rem; font-weight: 700; box-shadow: var(--shadow-btn); }
.pinpad button:active { background: var(--primary-50); }
.pinpad button.ok { background: var(--primary); color: #fff; border-color: var(--primary); font-size: 1.05rem; font-weight: 800; }
.demo-creds { margin-top: 16px; padding: 12px; border: 1px dashed var(--primary-100); border-radius: var(--r); background: #f7faff; font-size: .82rem; display: grid; gap: 6px; }
.demo-creds b { color: var(--primary-d); }
.demo-fill { text-align: left; border: 1px solid var(--line); border-radius: 8px; background: #fff; padding: 8px 10px; font-size: .8rem; color: var(--ink-2); }
.demo-fill code { color: var(--ink); font-weight: 700; }
.btn-primary.loading, .btn-primary:disabled.loading { opacity: .7; }

/* ---------- Usuario ---------- */
.user-wrap { position: relative; }
.user-btn { border: 0; background: none; padding: 0; }
.avatar { width: 38px; height: 38px; border-radius: 50%; background: var(--primary-50); color: var(--primary-d); display: grid; place-items: center; font-weight: 800; font-size: .88rem; border: 1px solid var(--primary-100); flex: none; }
.user-menu { right: 0; top: calc(100% + 8px); min-width: 230px; }
.um-head { display: grid; padding: 8px 12px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.um-head span { font-size: .78rem; color: var(--ink-3); }
.who-chip { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; font-weight: 700; color: var(--ink-2); background: var(--surface-2); border: 1px solid var(--line); padding: 4px 10px; border-radius: 99px; }
.who-chip .ic { width: 15px; height: 15px; }
.who-chip:empty { display: none; }
.side-user { display: flex; align-items: center; gap: 10px; margin-top: 12px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.su-text { display: grid; min-width: 0; flex: 1; }
.su-text b { font-size: .88rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.su-text span { font-size: .74rem; color: var(--ink-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Avisos de suscripción ---------- */
.sub-banner { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; font-size: .9rem; line-height: 1.4; }
.sub-banner .ic { width: 20px; height: 20px; margin-top: 1px; }
.sub-banner.err { background: var(--bad-50); color: var(--bad-d); border-bottom: 1px solid #f6c7c7; }
.sub-banner.warn { background: var(--warn-50); color: var(--warn-ink); border-bottom: 1px solid #f7dcb4; }
.sub-banner.office { border-radius: var(--r); border: 1px solid; margin-bottom: 18px; }
.low-alert.acked { background: var(--warn-50); border-color: #f4d6a8; color: var(--warn-ink); }
.low-alert span { font-weight: 600; }

/* ---------- Ventanas ---------- */
.modal.danger .modal-body { text-align: center; }
.stock-modal-icon { width: 64px; height: 64px; margin: 4px auto 10px; border-radius: 50%; background: var(--bad-50); color: var(--bad); display: grid; place-items: center; }
.stock-modal-icon .ic { width: 34px; height: 34px; }
.modal.danger h2 { margin: 0 0 8px; color: var(--bad-d); font-size: 1.3rem; line-height: 1.25; }
.modal.danger p { color: var(--ink-2); margin: 0 0 18px; }
.modal-stack { display: grid; gap: 10px; }
.btn-xl.btn-danger { height: 60px; font-size: 1.05rem; letter-spacing: .02em; }
.ed-deadline { margin: -8px 0 14px; font-size: .86rem; color: var(--ink-2); }
.ed-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; margin-top: 16px; }
.ed-actions .btn-ghost { margin-right: auto; }
.ed-annul { margin-top: 10px; padding: 12px; border-radius: var(--r); background: var(--bad-50); }
.ed-history { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 12px; max-height: 220px; overflow: auto; }
.ed-history h4 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: .88rem; }
.ed-history h4 .ic { width: 16px; height: 16px; }
.ed-history ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: .82rem; }
.ed-history li { padding: 8px 10px; background: var(--surface-2); border-radius: 8px; }
.adj-now { margin: 12px 0; font-size: .9rem; color: var(--ink-2); }
.adj-diff { margin: -4px 0 14px; font-size: .92rem; min-height: 1.2em; }
.modal { max-height: calc(100vh - 24px); overflow: auto; }

/* ---------- Mis últimos (tocar para corregir) ---------- */
.recent-list li[data-id] { cursor: pointer; border-radius: 8px; }
.recent-list li[data-id]:active { background: var(--surface-2); }
.edit-hint { color: var(--ink-3); display: grid; place-items: center; }
.edit-hint .ic { width: 16px; height: 16px; }

/* ---------- Equipo / panel Tariac ---------- */
.team-card .table-head { align-items: flex-start; }
.team-card .table-head > div:first-child { flex: 1; min-width: 220px; }
.team-card p { margin: 4px 0 0; }
.org-code-box { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface-2); }
.org-code-box span { font-size: .76rem; color: var(--ink-2); font-weight: 600; }
.org-code-box b { font-family: ui-monospace, Menlo, monospace; font-size: 1.2rem; letter-spacing: .14em; color: var(--primary-d); }
.org-code-box .icon-btn { width: 32px; height: 32px; }
#tariac-seg { margin-bottom: 16px; }

/* Hueco bajo la barra para la etiqueta "Powered by Netlify" */
.tabbar { padding-bottom: calc(8px + var(--safe-b) + var(--badge-gap)); }
.m-main { padding-bottom: calc(110px + var(--safe-b) + var(--badge-gap)); }
.toast-zone { bottom: calc(92px + var(--safe-b) + var(--badge-gap)); }

@media (max-width: 900px) {
  .two-col { grid-template-columns: minmax(0, 1fr); }
  .side-user { display: none; }
  .table-actions .check { order: 3; }
}
@media (max-width: 560px) {
  .ed-actions { justify-content: stretch; } .ed-actions > * { flex: 1; }
  .kv { grid-template-columns: minmax(0, 1fr); gap: 2px 0; } .kv dd { margin-bottom: 8px; }
}
#po-body td.act, #pr-body td.act { white-space: normal; min-width: 200px; }
#po-body .btn-mini, #pr-body .btn-mini { margin: 2px 0 2px 4px; }
html { scroll-padding-top: 80px; scroll-padding-bottom: calc(96px + var(--safe-b, 0px) + var(--badge-gap, 0px)); }
.m-head .brand { min-width: 0; }
.m-head-right { min-width: 0; flex: none; }
.m-head .netpill { max-width: 46vw; overflow: hidden; }
.m-head .netpill span { overflow: hidden; text-overflow: ellipsis; }

/* ---------- Legal, ayuda y soporte ---------- */
.legal-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin-top: 22px; font-size: .82rem; }
.legal-links a, .support-line a, .auth-note a, .check-line a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 2px; }
.legal-links a:hover { color: var(--ink); }
.support-line { text-align: center; font-size: .82rem; color: var(--ink-3); margin: 10px 0 0; }
.support-line:empty { display: none; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: .84rem; color: var(--ink-2); line-height: 1.45; cursor: pointer; }
.check-line input { width: 20px; height: 20px; margin: 1px 0 0; flex: none; accent-color: var(--primary); }
.auth-note.left { text-align: left; }
.menu a.menu-a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 6px; font-weight: 600; color: var(--ink); text-decoration: none; }
.menu a.menu-a:hover { background: var(--surface-2); }
.menu a.menu-a[hidden], .side-link[hidden] { display: none; }
a.side-link { text-decoration: none; }
