/* Combustível manager portal. Proboscis login DNA + report-tables discipline:
   no vanity headers, muted clean rows, color = meaning. */

:root {
  --green: #1B8B3D;
  --green-dark: #146B2F;
  --green-pale: #E8F5E9;
  --ink: #212121;
  --body: #424242;
  --muted: #757575;
  --faint: #9E9E9E;
  --bg: #FAFAFA;
  --card: #FFFFFF;
  --line: #E0E0E0;
  --amber: #F57C00;
  --amber-pale: #FFF3E0;
  --red: #C62828;
  --red-pale: #FFEBEE;
  --font: 'Barlow', sans-serif;
  --cond: 'Barlow Condensed', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: var(--font); background: var(--bg); color: var(--body); font-size: 14px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
button { font-family: var(--font); cursor: pointer; }
.ghost { background: none; border: 1px solid var(--line); border-radius: 6px; padding: 6px 12px; color: var(--body); font-size: 13px; }
.ghost:hover { background: #F5F5F5; }
a.ghost { text-decoration: none; display: inline-block; }
.primary { background: #1B8B3D; border: 1px solid #1B8B3D; border-radius: 6px; padding: 6px 12px; color: #fff; font-size: 13px; font-weight: 600; }
.primary:hover { background: #146B2F; }

/* ── Login ─────────────────────────────────────────── */
#screen-login { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 40px 36px; width: 360px; text-align: center;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}
.login-logo { width: 72px; margin-bottom: 14px; }
.login-card h1 { font-weight: 800; font-size: 26px; color: var(--ink); letter-spacing: 0.01em; }
.login-sub { color: var(--muted); margin: 4px 0 22px; }
.login-card input {
  width: 100%; font-family: var(--font); font-size: 15px; padding: 12px 14px;
  border: 1.5px solid var(--line); border-radius: 8px; margin-bottom: 12px;
}
.login-card input:focus { outline: none; border-color: var(--green); }
.login-card label { display: block; text-align: left; margin-bottom: 6px; font-weight: 600; }
.login-card button {
  width: 100%; background: var(--green); color: #fff; border: none;
  border-radius: 8px; padding: 13px; font-size: 16px; font-weight: 700;
}
.login-card button:hover { background: var(--green-dark); }
.err { margin-top: 12px; color: var(--red); font-weight: 600; }

/* ── Topbar ────────────────────────────────────────── */
.topbar {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--card); border-bottom: 1px solid var(--line);
  padding: 10px 22px;
}
.topbar-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); }
.topbar-brand img { height: 30px; }
.topbar-right { display: flex; align-items: center; gap: 12px; color: var(--muted); }

main { max-width: 1280px; margin: 0 auto; padding: 20px 22px 60px; }

/* ── Completeness strip ─────────────────────────────── */
.strip-head { display: flex; align-items: center; gap: 14px; margin-bottom: 10px; }
.strip-head input { font-family: var(--font); padding: 7px 10px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
.strip-title { font-size: 12px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

/* Region-grouped strip: Sul -> Centro -> Norte (DEC-C-028) */
.tank-strip { display: flex; flex-direction: column; gap: 12px; margin-bottom: 22px; }
.tank-all-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.region-sec { border-left: 3px solid var(--line); padding-left: 12px; }
.region-sec.selected { border-left-color: var(--green); }
.region-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 6px; cursor: pointer; display: inline-block;
  padding: 2px 8px; border-radius: 5px;
}
.region-label:hover { background: var(--green-pale); color: var(--green-dark); }
.region-sec.selected .region-label { background: var(--green); color: #fff; }
.region-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.tank-name .legacy { font-size: 10px; font-weight: 400; color: var(--faint); text-transform: uppercase; letter-spacing: 0.05em; }
.tank-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; cursor: pointer; transition: border-color 120ms;
}
.tank-card:hover { border-color: var(--green); }
.tank-card.selected { border-color: var(--green); background: var(--green-pale); }
.tank-name { font-weight: 700; color: var(--ink); font-size: 14px; }
.tank-owner { font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--faint); }
.tank-count { font-family: var(--cond); font-weight: 700; font-size: 26px; color: var(--ink); margin-top: 4px; }
.tank-count small { font-family: var(--font); font-weight: 400; font-size: 12px; color: var(--muted); }
.tank-last { font-size: 12px; color: var(--muted); }
.tank-card.quiet .tank-count { color: var(--red); }
.tank-card.quiet { border-color: #F4C7C3; }

/* ── Filters ───────────────────────────────────────── */
.filters { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.filters select, .filters input[type="text"] {
  font-family: var(--font); font-size: 14px; padding: 7px 10px;
  border: 1px solid var(--line); border-radius: 6px; background: var(--card);
}
.filters input[type="text"] { width: 120px; text-transform: uppercase; }
.chk { display: flex; align-items: center; gap: 6px; color: var(--body); }
.spacer { flex: 1; }

/* ── Table ─────────────────────────────────────────── */
.table-wrap {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px;
  overflow-x: auto; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
thead th {
  text-align: left; font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted);
  padding: 10px 12px; border-bottom: 1px solid var(--line);
  white-space: nowrap; position: sticky; top: 0; background: var(--card);
}
tbody td { padding: 9px 12px; border-bottom: 1px solid #F0F0F0; white-space: nowrap; }
tbody tr:hover { background: #F7FAF7; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
td.plate { font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: 0.04em; color: var(--ink); }

tr.voided td { color: var(--faint); text-decoration: line-through; }
tr.voided td .pill { text-decoration: none; }

/* Day-grouped accordion rows (DEC-C-028) */
.day-row td {
  background: #F4F8F4; cursor: pointer; padding: 9px 12px;
  border-bottom: 1px solid var(--line); white-space: normal;
}
.day-row:hover td { background: #ECF4EC; }
.day-caret { display: inline-block; font-size: 10px; color: var(--muted); margin-right: 8px; transition: transform 120ms; }
.day-row.open .day-caret { transform: rotate(90deg); }
.day-date { font-weight: 700; color: var(--ink); margin-right: 10px; }
.day-count { color: var(--muted); margin-right: 12px; }
.day-pills { display: inline-flex; gap: 6px; flex-wrap: wrap; vertical-align: middle; }

.pill {
  display: inline-block; border-radius: 999px; padding: 2px 10px;
  font-size: 12px; font-weight: 700;
}
.pill.ok { background: var(--green-pale); color: var(--green-dark); }
.pill.warn { background: var(--amber-pale); color: var(--amber); }
.pill.bad { background: var(--red-pale); color: var(--red); }
.pill.over { background: var(--red-pale); color: var(--red); }
.pill.partial { background: #F5F5F5; color: var(--muted); }
.pill.baseline { background: #E3F2FD; color: #1565C0; }
.pill.gap { background: var(--red-pale); color: var(--red); }
.pill.invalid { background: var(--amber-pale); color: var(--red); }
.pill.mixed { background: #EDE7F6; color: #5E35B1; }
.pill.offlist { background: var(--amber-pale); color: var(--amber); }
.pill.voided { background: #F5F5F5; color: var(--faint); }

.rowbtn { background: none; border: none; color: var(--green-dark); font-weight: 600; font-size: 13px; padding: 2px 6px; }
.rowbtn:hover { text-decoration: underline; }

/* ── Modal ─────────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; background: rgba(20, 30, 24, 0.45);
  display: flex; align-items: center; justify-content: center; z-index: 50;
}
.modal-box {
  background: var(--card); border-radius: 12px; width: min(640px, 92vw);
  max-height: 88vh; overflow-y: auto; padding: 20px 22px;
}
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; font-weight: 800; font-size: 17px; color: var(--ink); }
.modal-photo { width: 100%; border-radius: 8px; border: 1px solid var(--line); }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-bottom: 16px; }
.detail-grid div { display: flex; justify-content: space-between; border-bottom: 1px dashed #EEE; padding: 5px 0; }
.detail-grid dt { color: var(--muted); }
.detail-grid dd { font-weight: 600; color: var(--ink); }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions textarea {
  flex: 1; font-family: var(--font); font-size: 14px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 6px; resize: vertical; min-height: 38px;
}
.btn-danger { background: var(--red); color: #fff; border: none; border-radius: 6px; padding: 8px 16px; font-weight: 700; }
.edit-form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 18px; }
.edit-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.edit-field label { color: var(--ink); font-weight: 700; font-size: 13px; }
.edit-field input, .edit-field select, .edit-field textarea {
  width: 100%; font-family: var(--font); font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 6px; padding: 8px 9px; background: #fff;
}
.edit-field textarea { min-height: 64px; resize: vertical; }
.edit-field small { color: var(--muted); line-height: 1.35; }
.edit-wide { grid-column: 1 / -1; }
.edit-message { border-radius: 6px; padding: 8px 10px; font-size: 13px; }
.edit-message.error { color: var(--red); background: var(--red-pale); }
.edit-message.warning { color: var(--amber); background: var(--amber-pale); }
.edit-buttons { display: flex; justify-content: flex-end; gap: 10px; }
.edit-buttons button:disabled { cursor: not-allowed; opacity: 0.55; }
.edit-photo { margin-top: 2px; }
@media (max-width: 560px) {
  .detail-grid, .edit-form { grid-template-columns: 1fr; }
  .edit-wide { grid-column: 1; }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions textarea { flex-basis: 100%; }
}

/* HC | HL company toggle + ALL tank card (DEC-C-023) */
.seg-company { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segc { background: #fff; border: none; padding: 6px 12px; font-size: 13px; color: var(--body); cursor: pointer; white-space: nowrap; }
.segc.on { background: #1B8B3D; color: #fff; font-weight: 600; }
.segc + .segc { border-left: 1px solid var(--line); }
.tank-card.tank-all { border-style: dashed; }
.tank-card.tank-all.selected { border-style: solid; }

/* topbar neatening: keep each control intact (no mid-word wrap), condense on mobile;
   user-chip = bold first name + muted role (role hidden on small screens) */
.topbar { flex-wrap: wrap; row-gap: 8px; }
.topbar-right { flex-wrap: wrap; justify-content: flex-end; }
.topbar .ghost { white-space: nowrap; }
#user-chip { white-space: nowrap; display: inline-flex; align-items: baseline; gap: 6px; }
.uc-name { font-weight: 700; color: var(--ink); }
.uc-role { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
/* submitter column on the main table */
.by { color: var(--muted); font-size: 12.5px; white-space: nowrap; }
@media (max-width: 560px) {
  .topbar { padding: 9px 14px; }
  .topbar-brand { font-size: 16px; gap: 8px; }
  .topbar-brand img { height: 26px; }
  .topbar-right { gap: 8px; }
  .topbar .ghost { padding: 6px 10px; font-size: 13px; }
  .uc-role { display: none; }
}

/* defined topbar buttons (Submeter / Sign out) — obvious & tappable */
.hdr-btn {
  font-family: var(--font); font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; white-space: nowrap;
  background: #fff; color: var(--body);
  border: 1.5px solid var(--line); border-radius: 8px;
  padding: 7px 13px; cursor: pointer; text-decoration: none;
}
.hdr-btn:hover { background: #F5F5F5; }
.hdr-btn-accent { background: var(--green-pale); border-color: var(--green); color: var(--green-dark); }
.hdr-btn-accent:hover { background: #DCEFE0; }

/* plate type-ahead dropdown */
.plate-wrap { position: relative; display: inline-block; }
.plate-suggest {
  position: absolute; top: calc(100% + 4px); left: 0; z-index: 30;
  min-width: 170px; background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; box-shadow: 0 6px 18px rgba(0,0,0,0.12); overflow: hidden;
}
.ps-item {
  display: block; width: 100%; text-align: left; border: none; background: none;
  font-family: var(--cond); font-weight: 700; font-size: 15px; letter-spacing: 0.04em;
  color: var(--ink); padding: 9px 12px; cursor: pointer;
}
.ps-item:hover { background: var(--green-pale); }
@media (max-width: 560px) { .hdr-btn { padding: 6px 10px; } }

/* ── Tanks view: theoretical stock + supplier receipts ── */
.tank-level-head, .receipts-head {
  display: flex; justify-content: space-between; align-items: flex-end;
  gap: 16px; margin-bottom: 16px;
}
.tank-level-head h2, .receipts-head h2 {
  color: var(--ink); font-size: 20px; line-height: 1.2; margin-bottom: 3px;
}
.tank-level-regions { display: flex; flex-direction: column; gap: 18px; }
.tank-loading { padding: 22px; background: var(--card); border: 1px solid var(--line); border-radius: 8px; }
.tank-level-region .region-label { cursor: default; }
.tank-level-region .region-label:hover { color: var(--muted); background: transparent; }
.tank-level-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px;
}
.tank-level-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 15px; box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.level-card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.level-card-head h3 { color: var(--ink); font-size: 16px; line-height: 1.2; }
.level-card-head span {
  color: var(--faint); font-size: 10px; text-transform: uppercase;
  letter-spacing: 0.08em;
}
.level-card-head > strong {
  color: var(--muted); font-family: var(--cond); font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.level-number {
  margin-top: 12px; color: var(--ink); font-family: var(--cond);
  font-size: 38px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums;
}
.level-number small { color: var(--muted); font-size: 18px; }
.level-awaiting { margin-top: 5px; color: var(--amber); font-size: 12px; font-weight: 700; }
.capacity-track {
  height: 9px; margin-top: 14px; overflow: hidden; background: #EEEEEE; border-radius: 999px;
}
.capacity-track span { display: block; height: 100%; border-radius: inherit; }
.stock-good .capacity-track span { background: var(--green); }
.stock-low .capacity-track span { background: var(--amber); }
.stock-critical .capacity-track span { background: var(--red); }
.stock-over-capacity .capacity-track span { background: var(--red); }
.stock-unknown .capacity-track span { background: var(--faint); }
.stock-over-capacity .level-card-head > strong { color: var(--red); }
.level-over-capacity { margin-top: 7px; }
.capacity-caption { margin-top: 4px; color: var(--faint); font-size: 11px; text-align: right; }
.level-meta { margin-top: 12px; border-top: 1px solid #F0F0F0; padding-top: 5px; }
.level-meta > div {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  min-height: 29px; border-bottom: 1px dashed #EEEEEE; font-size: 12px;
}
.level-meta > div > span { color: var(--muted); }
.level-meta strong { color: var(--ink); text-align: right; font-weight: 600; }
.level-meta .pill { margin-left: 3px; padding: 1px 6px; font-size: 10px; }
.level-data-warning {
  margin-top: 9px; padding: 7px 8px; color: var(--red); background: var(--red-pale);
  border-radius: 6px; font-size: 11px; font-weight: 700;
}
.level-actions { display: flex; gap: 8px; margin-top: 12px; }
.level-actions button { flex: 1; }
.receipts-section { margin-top: 30px; border-top: 1px solid var(--line); padding-top: 24px; }
.receipt-month-label {
  display: flex; align-items: center; gap: 8px; color: var(--muted);
  font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em;
}
.receipt-month-label input {
  font-family: var(--font); padding: 7px 10px; color: var(--body);
  border: 1px solid var(--line); border-radius: 6px; background: var(--card);
}
.receipt-row { cursor: pointer; }
.receipt-no { color: var(--ink); font-family: var(--cond); font-size: 15px; font-weight: 700; }
.receipt-variance-detail {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 10px 0 16px;
}
.receipt-variance-detail > div {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px; color: var(--muted); background: #F8F8F8; border-radius: 7px;
}

/* ── View tabs + Activity view (DEC-C-025) ──────────── */
.view-tabs { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin-bottom: 16px; }
.vtab { background: #fff; border: none; padding: 8px 18px; font-size: 13px; font-weight: 700; color: var(--muted); }
.vtab + .vtab { border-left: 1px solid var(--line); }
.vtab.on { background: var(--green); color: #fff; }

.act-controls { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; flex-wrap: wrap; }
.seg-window { display: inline-flex; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.segw { background: #fff; border: none; padding: 6px 12px; font-size: 13px; color: var(--body); }
.segw + .segw { border-left: 1px solid var(--line); }
.segw.on { background: var(--green); color: #fff; font-weight: 600; }
.act-legend { display: flex; gap: 12px; font-size: 12px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.act-legend .lg { display: inline-flex; align-items: center; gap: 5px; }
.act-legend .sw { width: 14px; height: 12px; border-radius: 3px; display: inline-block; }
.act-legend .sw.act-1 { background: var(--green-pale); border: 1px solid #C8E6C9; }
.act-legend .sw.act-2 { background: #66BB6A; }
.act-legend .sw.act-3 { background: var(--green-dark); }
.act-legend .dot-hl, .act-legend .dot-hc { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.act-legend .dot-hl { background: var(--green-dark); }
.act-legend .dot-hc { background: #1565C0; }

#act-table { width: 100%; border-collapse: collapse; font-size: 13px; }   /* full page width, like the rest of the page */
#act-table thead th { text-align: center; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--muted); padding: 7px 4px; border-bottom: 1px solid var(--line); background: var(--card); white-space: nowrap; position: sticky; top: 0; }
#act-table thead th.col-person { text-align: left; padding-left: 16px; min-width: 130px; }
#act-table thead th.col-last { text-align: right; padding-right: 16px; }
.act-section td { background: #FAFAFA; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--faint); padding: 4px 16px; border-bottom: 1px solid var(--line); }
.act-person td { border-bottom: 1px solid #F0F0F0; padding: 0; height: 33px; vertical-align: middle; }
.act-person:hover { background: #F7FAF7; }
.act-person td.act-name { padding: 0 8px 0 16px; white-space: nowrap; }
.act-name .nm { font-weight: 700; color: var(--ink); }
.act-name .rl { font-size: 11px; color: var(--faint); margin-left: 6px; text-transform: uppercase; letter-spacing: 0.04em; }

.act-cell { text-align: center; }
.act-cell .c { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 22px; border-radius: 5px; font-family: var(--cond); font-weight: 700; font-size: 14px; }
.act-cell.has { cursor: pointer; }
.act-cell.has:hover .c { outline: 2px solid rgba(27,139,61,0.35); outline-offset: 1px; }
.act-cell .c.act-0 { background: #F0F0F0; min-width: 12px; height: 12px; }   /* empties recede; activity pops */
.act-cell .c.act-1 { background: var(--green-pale); color: var(--green-dark); }
.act-cell .c.act-2 { background: #66BB6A; color: #fff; }
.act-cell .c.act-3 { background: var(--green-dark); color: #fff; }
.act-cell.open .c { outline: 2px solid var(--green); outline-offset: 1px; }

.act-person td.act-last { text-align: right; padding-right: 16px; padding-left: 14px; font-family: var(--cond); font-weight: 700; font-size: 13px; white-space: nowrap; }
.act-foot { max-width: 840px; line-height: 1.45; margin-top: 10px; }
.act-last.today { color: var(--green-dark); }
.act-last.recent { color: var(--body); }
.act-last.stale { color: var(--red); }
.act-last.never { color: var(--faint); font-style: italic; font-family: var(--font); font-weight: 400; }

/* 24h timeline expansion (the batching lens) */
.tl-exp td { background: #FCFDFC; padding: 14px 18px 16px; border-bottom: 1px solid var(--line); }
.tl-title { font-size: 13px; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.tl-title .warn { color: var(--amber); font-weight: 700; margin-left: 10px; }
.tl-strip { position: relative; height: 42px; margin: 10px 6px 4px; }
.tl-axis { position: absolute; top: 16px; left: 0; right: 0; height: 2px; background: var(--line); }
.tl-tick { position: absolute; top: 22px; transform: translateX(-50%); font-size: 10px; color: var(--faint); font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-tick .tk { position: absolute; top: -8px; left: 50%; width: 1px; height: 6px; background: var(--line); }
.tl-dot { position: absolute; top: 10px; width: 13px; height: 13px; border-radius: 50%; transform: translateX(-50%); border: 2px solid #fff; box-shadow: 0 0 0 1px rgba(0,0,0,0.10); cursor: pointer; transition: transform 90ms; }
.tl-dot:hover { transform: translateX(-50%) scale(1.4); box-shadow: 0 0 0 3px rgba(27,139,61,0.30); z-index: 3; }
.tl-dot.c-hl { background: var(--green-dark); }
.tl-dot.c-hc { background: #1565C0; }

/* ── Phone usability (Chad VN 2026-07-23, DEC-C-028) ─────
   Secondary columns hide <=700px; day headers + detail modal carry the rest. */
@media (max-width: 700px) {
  .hide-sm { display: none !important; }
  main { padding: 14px 10px 50px; }
  table { font-size: 13px; }
  thead th { padding: 8px 8px; }
  tbody td { padding: 8px 8px; }
  td.plate { font-size: 14px; }
  .filters { gap: 8px; }
  .filters input[type="text"] { width: 96px; }
  .fill-row { cursor: pointer; }
  .pill { font-size: 10.5px; padding: 2px 6px; }
  table { font-size: 12.5px; }
  thead th { font-size: 9.5px; padding: 8px 3px; }
  tbody td { padding: 8px 3px; }
  td.plate { font-size: 12.5px; letter-spacing: 0.02em; }
  .fill-row td.drv, .fill-row td.tnk { max-width: 70px; overflow: hidden; text-overflow: ellipsis; }
  .fill-row td.resc { white-space: normal; min-width: 60px; }
  .fill-row td.resc .pill { display: inline-block; margin: 1px 0; }
  .tank-all-row, .region-cards { grid-template-columns: repeat(auto-fill, minmax(128px, 1fr)); }
  .tank-card { padding: 9px 10px; }
  .tank-count { font-size: 21px; }
  .tank-last { display: none; }
  .day-row td { padding: 10px 8px; }
  .tank-level-head, .receipts-head { align-items: flex-start; flex-direction: column; }
  .tank-level-grid { grid-template-columns: 1fr; }
  #receipts-table { min-width: 880px; }
  .receipt-variance-detail { grid-template-columns: 1fr; }
}
