/* The shell of the prototype (ezho-v2-prototipo, Visão do Gestor v80). The
   prototype simulates the phone with .is-mobile; here it is a media query. */
:root {
  --ground: #f3f5f8;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --text: #14171c;
  --muted: #6b7280;
  --muted-2: #9aa1ab;
  --border: #e6e9ee;
  --border-2: #eef1f5;
  /* --accent, --accent-dark and --accent-soft come from /brand.css (deploy/<client>.yaml). */
  --accent: #1565cf;
  --accent-dark: #0b4da2;
  --accent-soft: #e8f0fc;
  --accent-deep: var(--accent-dark);
  --neg: #d8434a; --neg-bg: #fdeceb;
  --warn: #d9a216; --warn-deep: #b7791f; --warn-bg: #fdf6e3;
  --pos: #1f9d57; --pos-bg: #e8f6ee; --pos-deep: #157a43;
  --r-sm: 8px; --r-md: 12px; --r-lg: 16px; --r-pill: 999px;
  --sh-1: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --sh-2: 0 4px 16px rgba(16, 24, 40, .08);
  --sans: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Code", "Segoe UI Mono", Consolas, "SF Mono", monospace;
}

* { box-sizing: border-box; }

[x-cloak] { display: none !important; }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.45;
  background: var(--ground);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

button { font: inherit; cursor: pointer; }

.muted { color: var(--muted); }
.num { font-family: var(--mono); }

/* Page: the whole window on every screen size (the prototype's centered
   card is not kept). */
.stage { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; background: var(--surface); }
.device { flex: 1; display: flex; flex-direction: column; width: 100%; }
.device .main { flex: 1; }
.foot-note { color: var(--muted-2); font-size: 12px; text-align: center; margin: 0; padding: 12px 24px; border-top: 1px solid var(--border); }

/* Header. */
.hdr {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 13px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.burger {
  width: 38px; height: 38px; border-radius: 10px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  display: inline-grid; place-items: center; padding: 0;
}
.burger:hover { background: var(--surface-2); }
.brand { display: inline-flex; align-items: center; gap: 13px; text-decoration: none; }
.hdr .logo { height: 34px; width: auto; display: block; }
.brand-txt { font-weight: 800; letter-spacing: .04em; font-size: 16px; color: var(--accent-deep); }
.hdr .who { margin-left: auto; text-align: right; line-height: 1.15; }
.hdr .who b { font-size: 13.5px; }
.avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none;
  background: var(--accent-soft); color: var(--accent);
  display: inline-grid; place-items: center;
  font-weight: 700; font-size: 14px;
}

.ic { width: 18px; height: 18px; flex: none; }

/* Drawer (the side menu), over the page on every screen size. */
.scrim {
  position: fixed; inset: 0; z-index: 85;
  background: rgba(12, 17, 22, .42);
  opacity: 0; visibility: hidden; transition: .22s;
}
.drawer {
  position: fixed; top: 0; left: 0; bottom: 0; z-index: 90;
  width: 268px; max-width: 85vw; height: 100vh; height: 100dvh;
  display: flex; flex-direction: column;
  background: var(--surface); border-right: 1px solid var(--border);
  transform: translateX(-100%); transition: transform .24s ease;
}
.nav-open { overflow: hidden; }
.nav-open .scrim { opacity: 1; visibility: visible; }
.nav-open .drawer { transform: none; box-shadow: var(--sh-2); }
.drawer .dhead {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 16px 12px; border-bottom: 1px solid var(--border);
}
.drawer .dhead .logo { height: 30px; width: auto; }
.drawer .dhead .brand-txt { font-size: 14px; }
.drawer .x {
  margin-left: auto; width: 32px; height: 32px; padding: 0;
  border-radius: 8px; border: 1px solid var(--border);
  background: var(--surface); color: var(--muted);
  display: grid; place-items: center;
}
.dnav { flex: 1; overflow: auto; padding: 12px 10px; }
.dnav .grp {
  font-size: 10.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); padding: 12px 10px 6px;
}
.dnav a {
  display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border-radius: 9px;
  color: var(--text); text-decoration: none; font-size: 13.5px; font-weight: 500;
}
.dnav a:hover { background: var(--surface-2); }
.dnav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 700; }
.dnav a .ic, .dnav .dsec-hd .ic { color: var(--muted-2); }
.dnav a.active .ic { color: var(--accent); }
.dnav .dsec { margin: 1px 0; }
.dnav .dsec-hd {
  width: 100%; display: flex; align-items: center; gap: 11px;
  padding: 10px 11px; border: 0; border-radius: 9px; background: transparent;
  color: var(--text); font-size: 13.5px; font-weight: 600; text-align: left;
}
.dnav .dsec-hd:hover { background: var(--surface-2); }
.dnav .dsec-hd .chev { margin-left: auto; display: inline-grid; color: var(--muted-2); transition: transform .18s; }
.dnav .dsec-hd .chev .ic { width: 15px; height: 15px; }
.dnav .dsec.open > .dsec-hd,
.dnav .dsec.open > .dsec-hd .ic,
.dnav .dsec.open > .dsec-hd .chev { color: var(--accent); }
.dnav .dsec.open > .dsec-hd .chev { transform: rotate(180deg); }
.dnav .dsec-body { display: none; }
.dnav .dsec.open > .dsec-body { display: block; }
.dnav .dsec-body a { padding-left: 24px; position: relative; }
.dnav .dsec-body a::before {
  content: ""; position: absolute; left: 15px; top: 50%;
  width: 5px; height: 5px; margin-top: -2.5px; border-radius: 50%;
  background: var(--border);
}
.dnav .dsec-body a.active::before, .dnav .dsec-body a:hover::before { background: var(--accent); }
.dnav .dsec-body .dsec-hd { padding-left: 24px; }
.dnav .dsec-body .dsec-body a { padding-left: 38px; }
.dnav .dsec-body .dsec-body a::before { left: 28px; }
.duser {
  border-top: 1px solid var(--border); padding: 12px 14px;
  display: flex; align-items: center; gap: 10px;
}
.duser .avatar { width: 36px; height: 36px; }
.duser .nm { font-weight: 700; font-size: 13px; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.duser .pw { margin-left: auto; }
.duser form { margin: 0; }
.duser .out {
  width: 34px; height: 34px; padding: 0; border-radius: 8px;
  border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  display: grid; place-items: center;
}
.duser .out:hover { color: var(--neg); border-color: var(--neg-bg); background: var(--neg-bg); }
.duser .out.pw:hover { color: var(--accent); border-color: var(--accent-soft); background: var(--accent-soft); }

/* Back to top, once the page scrolled. */
.ezfab {
  position: fixed; z-index: 80;
  width: 46px; height: 46px; padding: 0; border-radius: 50%;
  border: 1px solid var(--border); background: var(--surface); color: var(--accent);
  box-shadow: var(--sh-2);
  display: grid; place-items: center;
}
.ezfab-top { right: 16px; bottom: 16px; }

/* Content. */
.main { padding: 22px 24px 30px; }
.page-title { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 3px; }
.page-title h1, .error-page h1 { font-size: 22px; font-weight: 700; margin: 0; letter-spacing: -.01em; }
.subline { color: var(--muted); font-size: 13px; margin: 0 0 16px; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft);
  padding: 3px 9px; border-radius: var(--r-pill);
}
.tb-btn {
  display: inline-flex; align-items: center; gap: 7px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 10px; padding: 8px 13px;
  font-size: 13px; font-weight: 600; text-decoration: none;
}
.tb-btn:hover { background: var(--surface-2); border-color: #d9dee6; }
.tb-btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.tb-btn.primary:hover { background: var(--accent-deep); }

.error-page { padding: 40px 0 24px; text-align: center; }
.error-page .subline { margin-top: 6px; }
.error-code { margin: 0 0 4px; font-family: var(--mono); font-size: 40px; font-weight: 700; color: var(--accent); }

@media (max-width: 640px) {
  .foot-note { padding: 12px 14px; }
  .hdr { padding: 11px 13px; }
  .hdr .who { display: none; }
  .hdr .avatar { margin-left: auto; }
  .main { padding: 16px 14px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer, .scrim, .dnav .dsec-hd .chev { transition: none; }
}

/* Login page. */
.login-page {
  --ground: #f3f5f8;
  --text: #14171c;
  --muted-2: #9aa1ab;
  --neg: #d8434a; --neg-bg: #fdeceb;
  --shadow: 0 4px 16px rgba(16, 24, 40, .08);
  background: var(--ground);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
.login {
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 24px 16px;
}
.login-card {
  width: 100%; max-width: 400px;
  background: #fff; border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow);
  padding: 28px 24px 24px;
}
.login-logo { display: block; height: 42px; width: auto; margin-bottom: 20px; }
.login-card h1 { margin: 0; font-size: 20px; letter-spacing: -.01em; }
.login-sub { margin: 4px 0 18px; color: var(--muted); font-size: 13px; }
.login-msg { border-radius: 12px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }
.login-msg p { margin: 0; }
.login-msg p + p { margin-top: 4px; }
.login-msg.error { background: var(--neg-bg); color: #a3262c; border: 1px solid #f6cfcd; }
.login-msg.info { background: var(--accent-soft); color: var(--accent-dark); border: 1px solid transparent; }
.field { display: block; margin-bottom: 14px; }
.field span {
  display: block; margin-bottom: 6px;
  font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2);
}
.field input {
  width: 100%;
  font: inherit; font-size: 15px; color: var(--text);
  background: #fff; border: 1px solid var(--border); border-radius: 10px;
  padding: 10px 12px;
}
.field input:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.btn-primary {
  width: 100%; margin-top: 6px;
  background: var(--accent); color: #fff;
  border: 1px solid var(--accent); border-radius: 10px;
  padding: 11px 14px; font-size: 14px; font-weight: 600;
}
.btn-primary:hover { background: var(--accent-dark); }
.login-foot { margin: 18px 0 0; color: var(--muted-2); font-size: 12px; }
.login-links { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin: 16px 0 0; font-size: 13px; }
.login-links a { color: var(--accent); font-weight: 600; text-decoration: none; }
.login-links a:hover { text-decoration: underline; }
.field input.code-input { font-family: var(--mono); font-size: 20px; letter-spacing: .4em; }

/* New password: the rules of the prototype's user form (Usuários e Perfis v1),
   marked as the user types. */
.pw-rules { list-style: none; margin: -6px 0 14px; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--muted); }
.pw-rules li::before { content: "○ "; }
.pw-rules li.ok { color: var(--pos-deep); font-weight: 700; }
.pw-rules li.ok::before { content: "✓ "; }
.password-card { max-width: 440px; padding: 22px; margin-top: 12px; }

/* ===== Reports (prototype Abastecimentos v7): filter bar, searchable combo,
   period popover, table, pagination, empty state and phone cards. ===== */
.report { margin: 0; }
.tb-btn .ic { width: 15px; height: 15px; }

/* Filter bar: full width over the content, as between the header and the
   page in the prototype. */
.topbar {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin: -22px -24px 20px; padding: 12px 20px;
  border-bottom: 1px solid var(--border); background: var(--surface-2);
}
.lvl-label { font-size: 11px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted-2); margin-right: 2px; }
.tb-actions { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; }
.filters { display: inline-flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.flt {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  padding: 5px 10px 5px 11px; font-size: 13px;
}
.flt.lock { background: var(--surface-2); }
.flt .fl { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); }
.flt.lock .lk { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.mobfilt-btn {
  display: none; align-items: center; gap: 6px;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  border-radius: 9px; padding: 7px 12px; font-size: 13px; font-weight: 700;
}
.mobfilt-btn .ic { width: 15px; height: 15px; }
.mobfilt-btn .mf-ca { font-size: 10px; color: var(--muted-2); transition: transform .18s; margin-left: 2px; }
.filters-open .mobfilt-btn .mf-ca { transform: rotate(180deg); }

/* Searchable combo. */
.cbx { position: relative; }
.cbx-trig {
  display: inline-flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 150px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  padding: 6px 10px; font-size: 12.5px; color: var(--text);
}
.cbx-trig:hover, .cbx.open .cbx-trig { border-color: var(--accent); }
.cbx-val { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 220px; }
.cbx-car { color: var(--muted-2); font-size: 10px; }
.cbx-pop {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 60;
  min-width: 236px; max-width: 340px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, .16);
}
.cbx.open .cbx-pop { display: block; }
.cbx-search {
  width: 100%; margin-bottom: 6px; padding: 7px 9px;
  border: 1px solid var(--border); border-radius: 7px; outline: none;
  font: inherit; font-size: 12.5px; color: var(--text); background: var(--surface);
}
.cbx-search:focus { border-color: var(--accent); }
.cbx-list { max-height: 244px; overflow-y: auto; display: flex; flex-direction: column; gap: 1px; }
.cbx-opt {
  flex: 0 0 auto; text-align: left; background: none; border: 0; border-radius: 6px;
  padding: 7px 9px; font-size: 12.5px; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cbx-opt:hover { background: var(--surface-2); }
.cbx-opt.on { background: var(--accent-soft); color: var(--accent-deep); font-weight: 700; }
.cbx-empty { padding: 8px 9px; color: var(--muted); font-size: 12px; }

/* Period popover. */
.pq-box { position: relative; padding: 0; border: 0; background: none; }
.pq-btn {
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
  border: 1px solid var(--border); background: var(--surface); color: var(--text);
  font-size: 12.5px; font-weight: 600; padding: 6px 11px; border-radius: 9px;
}
.pq-btn .ic { width: 14px; height: 14px; color: var(--muted-2); }
.pq-btn:hover, .pq-btn.open { border-color: var(--accent); color: var(--accent-deep); }
.pq-btn.open { background: var(--accent-soft); }
.pq-pop {
  display: none; position: absolute; top: calc(100% + 6px); left: 0; z-index: 60;
  min-width: 344px; padding: 12px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-2);
}
.pq-pop.open { display: block; }
.pq-h { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); margin: 0 0 7px; }
.pq-dates { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.pq-dates input[type=date] {
  min-width: 150px; padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--text); color-scheme: light;
}
.per-sep { color: var(--muted-2); font-size: 11.5px; font-weight: 600; }
.pq-n { font-size: 11px; color: var(--muted-2); margin: -4px 0 10px; }
.pq-quick { display: flex; flex-wrap: wrap; gap: 5px; }
.per-q {
  flex: 1 1 42%; border: 1px solid var(--border); background: var(--surface); color: var(--muted);
  font-size: 11.5px; font-weight: 700; padding: 5px 10px; border-radius: var(--r-pill);
}
.per-q:hover { background: var(--surface-2); color: var(--accent); }
.per-q.on { background: var(--accent); border-color: var(--accent); color: #fff; }

/* Table card. */
.rcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-1); }
.rhead {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--border); background: var(--surface-2);
  border-radius: var(--r-md) var(--r-md) 0 0;
}
.rhead .rt { font-weight: 700; font-size: 14.5px; }
.rhead .rc { font-size: 12px; color: var(--muted); }
.aftbl-wrap { overflow-x: auto; }
.aftbl { width: 100%; border-collapse: collapse; }
.aftbl th, .aftbl td { white-space: nowrap; font-size: 12.5px; padding: 8px 11px; border-bottom: 1px solid var(--border-2); text-align: left; }
.aftbl thead th {
  position: sticky; top: 0; z-index: 1; background: var(--surface-2); color: var(--muted);
  font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
}
/* While the page scrolls past the table, app.js moves the header cells down
   (stickyHead); .stuck draws the edge under them. */
.aftbl thead.stuck th { box-shadow: 0 1px 0 var(--border), 0 6px 10px -8px rgba(16, 24, 40, .35); }
.aftbl thead.stuck th:first-child { box-shadow: 1px 0 0 var(--border), 0 1px 0 var(--border), 0 6px 10px -8px rgba(16, 24, 40, .35); }
.aftbl thead th a { color: inherit; text-decoration: none; display: block; }
.aftbl thead th .sort { color: var(--muted-2); font-size: 9px; margin-left: 3px; }
.aftbl thead th.on, .aftbl thead th.on .sort { color: var(--accent); }
.aftbl td.r, .aftbl th.r { text-align: right; font-variant-numeric: tabular-nums; font-family: var(--mono); }
.aftbl tbody tr:hover td { background: var(--surface-2); }
.aftbl .cod { font-weight: 700; color: var(--accent); }
.aftbl .prod { font-weight: 600; }
.aftbl td.z { color: var(--muted-2); }
.aftbl td.pos { color: var(--pos-deep); font-weight: 700; }
.aftbl td.neg { color: var(--neg); }
.aftbl .totrow td { background: var(--surface-2); font-weight: 700; border-top: 2px solid var(--border); color: var(--muted); }
/* The first column stays while the table scrolls sideways. */
.aftbl thead th:first-child, .aftbl tbody td:first-child, .aftbl tr.totrow td:first-child {
  position: sticky; left: 0; z-index: 2; background: var(--surface); box-shadow: 1px 0 0 var(--border);
}
.aftbl thead th:first-child { z-index: 4; background: var(--surface-2); }
.aftbl tbody tr:hover td:first-child, .aftbl tr.totrow td:first-child { background: var(--surface-2); }
.tbl-mob { display: none; padding: 12px 13px; }

/* Pagination. */
.pagz {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2);
  border-radius: 0 0 var(--r-md) var(--r-md);
}
.pagz .pinfo { font-size: 12.5px; color: var(--muted); }
.pagz .sp { flex: 1; }
.pagz .pp { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); }
.pagz .pp select {
  border: 1px solid var(--border); background: var(--surface); border-radius: 8px;
  padding: 5px 8px; font: inherit; font-size: 12.5px; font-weight: 600;
}
.pag { display: inline-flex; gap: 4px; }
.pag .pg {
  display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 8px;
  border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font-size: 12.5px; font-weight: 600; color: var(--text); text-decoration: none;
}
.pag a.pg:hover { background: var(--accent-soft); color: var(--accent); }
.pag .pg.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.pag .pg.off { opacity: .4; }

/* Empty result. */
.empty-per { text-align: center; padding: 40px 20px; color: var(--muted); }
.empty-per .ep-ic { font-size: 34px; margin-bottom: 6px; }
.empty-per b { display: block; font-size: 15px; color: var(--text); margin-bottom: 4px; }
.empty-per span { display: block; font-size: 12.5px; margin-bottom: 14px; }

/* Phone cards instead of rows. */
.mcard { border: 1px solid var(--border); border-radius: var(--r-md); padding: 11px 13px; margin-bottom: 9px; background: var(--surface); box-shadow: var(--sh-1); }
.mcard .mc-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; }
.mcard .mc-cod { font-weight: 800; color: var(--accent); font-size: 13px; }
.mcard .mc-dt { margin-left: auto; font-size: 11.5px; color: var(--muted); font-family: var(--mono); }
.mcard .mc-prod { font-weight: 700; font-size: 13px; margin-bottom: 6px; }
.mcard .mc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px 12px; font-size: 12px; }
.mcard .mc-grid .k { color: var(--muted-2); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.mcard .mc-grid b { font-family: var(--mono); }

@media (max-width: 640px) {
  .topbar { margin: -16px -14px 16px; padding: 10px 13px; gap: 8px; }
  .lvl-label, .tb-only-desk { display: none; }
  .mobfilt-btn { display: inline-flex; }
  .topbar:not(.filters-open) .filters, .topbar:not(.filters-open) .tb-actions { display: none; }
  .filters-open .filters { display: flex; flex-direction: column; align-items: stretch; width: 100%; gap: 8px; }
  .filters-open .filters .flt { width: 100%; }
  .filters-open .cbx-trig { flex: 1; }
  .filters-open .tb-actions { display: flex; width: 100%; }
  .filters-open .tb-actions .tb-btn { flex: 1; justify-content: center; }
  .pq-pop { min-width: min(300px, 84vw); }
  .page-title h1 { font-size: 19px; }
  .tbl-desk { display: none; }
  .tbl-mob { display: block; }
  .pagz .pinfo { flex: 1 1 100%; }
}

@media print {
  .hdr, .drawer, .scrim, .topbar, .ezfab, .foot-note, .pagz .pag, .pagz .pp { display: none !important; }
  .main { padding: 0; }
  .rcard { box-shadow: none; }
}

/* Notices at the bottom of the page, as the prototype's toast (export to
   Excel). */
.toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 400; display: flex; flex-direction: column; align-items: center; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toasts.static { position: static; transform: none; margin: 18px auto 0; }
.toast { display: flex; align-items: center; gap: 12px; background: #0c1116; color: #fff; font-size: 13px; font-weight: 600; padding: 11px 16px; border-radius: 10px; box-shadow: var(--sh-2); }
.toast.bad { background: #8a1c1c; }
.toast-msg { line-height: 1.4; }
.toast-act { display: inline-flex; align-items: center; gap: 6px; color: #fff; background: var(--accent); border-radius: 8px; padding: 6px 10px; text-decoration: none; white-space: nowrap; }
.toast-act:hover { background: var(--accent-deep); }
.toast-act .ic, .toast-x .ic { width: 15px; height: 15px; }
.toast-x { background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; padding: 2px; display: inline-flex; }
.toast-x:hover { opacity: 1; }
.toast-spin { width: 14px; height: 14px; border: 2px solid rgba(255, 255, 255, .3); border-top-color: #fff; border-radius: 50%; animation: toast-spin .8s linear infinite; flex: none; }
@keyframes toast-spin { to { transform: rotate(360deg); } }
@media print { .toasts { display: none; } }

/* Usuários e perfis (prototype Usuários e Perfis v1): the tabs, the profile
   cards and the editor with the permission matrix. */
.profiles { --orange-bg: #fdf0e3; --orange-deep: #b85f17; --purple-bg: #efeafc; --purple-deep: #5b2ca8; }
.crumb { font-size: 12.5px; color: var(--muted); margin-bottom: 8px; }
.crumb b { color: var(--accent); }
.tipo-seg { display: inline-flex; background: #e8ecf1; border-radius: 11px; padding: 4px; gap: 2px; margin-bottom: 14px; }
.tipo-seg a { padding: 7px 15px; border-radius: 8px; font-weight: 600; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
.tipo-seg a.on { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.tipo-seg .ic { width: 14px; height: 14px; }
.tipo-seg .n { font-size: 10.5px; font-weight: 700; padding: 0 6px; border-radius: var(--r-pill); background: rgba(0,0,0,.06); }
.tipo-seg a.on .n { background: rgba(255,255,255,.22); }
.lvl { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; padding: 2px 7px; border-radius: var(--r-pill); }
.lvl.nac { background: var(--purple-bg); color: var(--purple-deep); }
.lvl.reg { background: var(--accent-soft); color: var(--accent-deep); }
.lvl.pos { background: var(--orange-bg); color: var(--orange-deep); }
.lockline { display: flex; gap: 8px; align-items: center; font-size: 12.5px; color: var(--muted); background: var(--surface-2); border: 1px dashed var(--border); border-radius: 10px; padding: 9px 12px; margin: 0 0 14px; }
.lockline .ic { width: 15px; height: 15px; flex: none; }
.backlink { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-weight: 700; font-size: 13px; margin: 0 0 10px; text-decoration: none; }
.backlink .ic { width: 15px; height: 15px; }
.pf-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; }
.pf-tools .sp { flex: 1; }
.pf-filter { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted-2); text-transform: uppercase; letter-spacing: .05em; }
.pf-filter select { border: 1px solid var(--border); border-radius: 9px; padding: 7px 10px; font: inherit; font-size: 13px; text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--text); background: var(--surface); max-width: 280px; }
.tb-btn.danger { color: var(--neg); }
.tb-btn.danger:hover { background: var(--neg-bg); border-color: var(--neg-bg); }
a.tb-btn { text-decoration: none; }

.pfgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 12px; }
.pfc { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-1); padding: 14px 15px; display: flex; flex-direction: column; gap: 9px; }
.pfc:hover { border-color: #cfd8e3; }
.pfc .t { display: flex; align-items: center; gap: 8px; }
.pfc .t b { font-size: 14.5px; }
.pfc .sp, .pfc .t .sp { flex: 1; }
.pfc .biz { font-size: 11.5px; font-weight: 700; color: var(--accent-deep); margin-top: -4px; }
.pfc .d { font-size: 12px; color: var(--muted); min-height: 32px; }
.pfc .meter { height: 6px; border-radius: var(--r-pill); background: var(--surface-2); overflow: hidden; }
.pfc .meter i { display: block; height: 100%; background: var(--accent); border-radius: var(--r-pill); }
.pfc .m { display: flex; gap: 14px; font-size: 12px; color: var(--muted); }
.pfc .m b { color: var(--text); font-family: var(--mono); }
.pfc .f { display: flex; gap: 6px; align-items: center; border-top: 1px solid var(--border-2); padding-top: 9px; }
.pfc .f small { font-size: 11px; color: var(--muted-2); }
.ib { width: 30px; height: 30px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; padding: 0; }
.ib:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-soft); }
.ib.del:hover { border-color: var(--neg-bg); color: var(--neg); background: var(--neg-bg); }
.ib:disabled { opacity: .35; cursor: not-allowed; background: var(--surface); color: var(--muted); border-color: var(--border); }
.ib .ic { width: 15px; height: 15px; }
.confirm { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--neg); }
.confirm button { border: 1px solid var(--border); background: var(--surface); border-radius: 7px; padding: 4px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.confirm button.yes { background: var(--neg); border-color: var(--neg); color: #fff; }

.fgrid { display: grid; grid-template-columns: repeat(12, 1fr); gap: 14px 16px; padding: 16px; }
.fld { display: flex; flex-direction: column; gap: 5px; grid-column: span 4; }
.fld.s2 { grid-column: span 2; } .fld.s3 { grid-column: span 3; } .fld.s4 { grid-column: span 4; } .fld.s6 { grid-column: span 6; } .fld.s8 { grid-column: span 8; } .fld.s12 { grid-column: span 12; }
.fld label { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.fld label .req { color: var(--neg); }
.fld input, .fld select { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); outline: 0; }
.fld input:focus, .fld select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.fld input:disabled, .fld select:disabled { background: var(--surface-2); color: var(--muted); }
.fld .hint { font-size: 11.5px; color: var(--muted); }
.fld .err { font-size: 11.5px; color: var(--neg); font-weight: 600; }
.fld.bad input, .fld.bad select { border-color: var(--neg); }
.fld .sw { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 9px 0; }
.fld .sw input { width: 18px; height: 18px; accent-color: var(--accent); }

.pf-matrix { margin-top: 14px; }
.mx-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.mx-tools .sp { flex: 1; }
.mx-cnt { font-size: 12px; color: var(--muted); }
.mx-cnt b { color: var(--accent-deep); font-family: var(--mono); }
.mx-err { margin: 0; padding: 10px 16px; color: var(--neg); font-weight: 600; font-size: 12.5px; border-bottom: 1px solid var(--border); }
.srch { display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 6px 10px; min-width: 240px; }
.srch input { border: 0; outline: 0; font: inherit; font-size: 13px; background: transparent; width: 100%; color: var(--text); }
.srch .ic { width: 15px; height: 15px; color: var(--muted-2); flex: none; }
.mxw { overflow-x: auto; }
.mx { width: 100%; border-collapse: collapse; min-width: 640px; }
.mx th, .mx td { font-size: 12.5px; padding: 7px 12px; border-bottom: 1px solid var(--border-2); text-align: center; }
.mx thead th { background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.mx th:first-child, .mx td:first-child { text-align: left; width: 46%; }
.mx tr.sec td { background: #f1f4f8; font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); padding-top: 10px; }
.mx tr.sec .all { float: right; text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 11.5px; color: var(--accent); background: none; border: 0; padding: 0; cursor: pointer; }
.mx tr.grp td { font-weight: 700; text-align: left; }
.mx tr.grp .gsub { font-weight: 500; color: var(--muted); font-size: 11.5px; margin-left: 6px; }
.mx tr.sub td:first-child { padding-left: 30px; position: relative; }
.mx tr.sub td:first-child::before { content: ""; position: absolute; left: 16px; top: 17px; width: 7px; height: 1px; background: var(--border); }
.mx .rl { font: inherit; font-weight: 600; color: inherit; background: none; border: 0; padding: 0; text-align: left; cursor: pointer; }
.mx tr.sub .rl { font-weight: 500; }
.mx span.rl { cursor: default; }
.mx .na { color: var(--border); font-weight: 700; }
.mx .note { display: block; font-size: 11px; color: var(--muted); font-weight: 500; }
.mx tbody tr[data-row]:hover td { background: var(--surface-2); }
.mx .xops { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; }
.xop { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--border); border-radius: var(--r-pill); padding: 2px 9px 2px 6px; font-size: 11.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.xop input { accent-color: var(--accent); margin: 0; }
.xop:has(input:checked) { border-color: var(--accent); color: var(--accent-deep); background: var(--accent-soft); }
.ck { position: relative; width: 20px; height: 20px; border-radius: 6px; border: 1.5px solid #c9d0da; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; color: #fff; transition: .12s; vertical-align: middle; }
.ck:hover { border-color: var(--accent); }
.ck input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: inherit; }
.ck .ic { width: 13px; height: 13px; display: none; stroke-width: 3.2; }
.ck .opn { display: none; }
.ck:has(input:checked) { background: var(--accent); border-color: var(--accent); }
.ck:has(input:checked) .ic { display: block; }
.ck:has(input:focus-visible) { box-shadow: 0 0 0 3px var(--accent-soft); }
.ck:has(input:disabled) { cursor: not-allowed; opacity: .55; }
.legacy-note { display: flex; gap: 9px; align-items: flex-start; margin: 0; padding: 12px 16px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--border); }
.legacy-note b { color: var(--text); }
.legacy-note .kept { margin: 6px 0 0; }
.ffoot { position: sticky; bottom: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 16px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--r-md) var(--r-md); }
.ffoot .sp { flex: 1; }
.ffoot .audit { font-size: 11.5px; color: var(--muted); }

@media (max-width: 640px) {
  .tipo-seg { display: flex; }
  .tipo-seg a { flex: 1; justify-content: center; }
  .fgrid { grid-template-columns: 1fr; padding: 14px; }
  .fld, .fld.s2, .fld.s3, .fld.s4, .fld.s6, .fld.s8, .fld.s12 { grid-column: auto; }
  .srch { min-width: 0; width: 100%; }
  .ffoot .tb-btn { flex: 1; justify-content: center; }
  .ffoot .audit { width: 100%; }
  /* The matrix as cards with chips, as the prototype on the phone. */
  .mx { min-width: 0; }
  .mx thead { display: none; }
  .mx, .mx tbody, .mx tr, .mx td { display: block; width: auto !important; }
  .mx td { border: 0; padding: 0; text-align: left; }
  .mx tr.sec td { padding: 10px 14px 4px; background: none; }
  .mx tr.grp td { padding: 8px 14px 0; }
  .mx tr[data-row] { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 14px 8px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 11px; }
  .mx tr[data-row] td:first-child { flex-basis: 100%; padding: 0 0 2px; }
  .mx tr.sub td:first-child::before { display: none; }
  .mx tr[data-row] td:has(.na) { display: none; }
  .ck { width: auto; height: auto; border-radius: var(--r-pill); padding: 5px 11px; color: var(--muted); font-size: 12px; font-weight: 700; }
  .ck .ic { display: none !important; }
  .ck .opn { display: inline; }
  .ck:has(input:checked) { color: #fff; }
}

/* Caixa do Dia Consolidado (prototype EZHO_v2_Prototipo.html, block
   "Caixa do Dia (integrado · escopo .cx)", lines 592-698). */
.cx{--crf:var(--accent);--crf-deep:var(--accent-deep);--crf-soft:var(--accent-soft);--ink:var(--text);--faint:var(--muted-2);--loss:var(--neg);--gain:var(--accent);--offline:var(--orange);--offline-bg:rgba(226,121,42,.14);--good:var(--pos);--r:12px;--r-lg:16px;color:var(--text)}
.cx .num{font-family:var(--mono);font-variant-numeric:tabular-nums}
.cx .r{text-align:right}
.cx .title{display:flex;align-items:center;gap:10px;padding:2px 0 4px}
.cx .title .ic{width:30px;height:30px;border-radius:8px;background:var(--crf-soft);color:var(--crf-deep);display:grid;place-items:center}
.cx .title h1{margin:0;font-size:20px;letter-spacing:-.01em}
.cx .ctxline{padding:10px 0 4px;color:var(--muted);font-size:13px}
.cx .ctxline b{color:var(--text)}
.cx .summary{display:grid;grid-template-columns:repeat(2,minmax(0,1fr)) 1.6fr;gap:14px;margin:14px 0 6px}
.cx .kpi{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:16px 18px;box-shadow:var(--sh-1)}
.cx .kpi .k-lab{font-size:12px;color:var(--muted);font-weight:600;text-transform:uppercase;letter-spacing:.05em}
.cx .kpi .k-val{font-family:var(--mono);font-variant-numeric:tabular-nums;font-size:30px;font-weight:600;letter-spacing:-.02em;margin-top:6px}
.cx .kpi .k-val small{font-size:15px;color:var(--muted);font-weight:500;margin-left:4px}
.cx .kpi.accent{background:linear-gradient(180deg,var(--crf-soft),var(--surface));border-color:#cfe0f7}
.cx .integrity{display:flex;flex-direction:column;gap:9px;justify-content:center}
.cx .integ-title{font-size:11px;font-weight:700;color:var(--muted);text-transform:uppercase;letter-spacing:.06em}
.cx .chip-row{display:flex;flex-wrap:wrap;gap:8px}
.cx .chip{display:inline-flex;align-items:center;gap:7px;background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:6px 11px;font-size:12.5px;color:var(--text)}
.cx .chip .dot{width:8px;height:8px;border-radius:50%}
.cx .chip.ok{background:var(--pos-bg);border-color:#bfe6cd}
.cx .chip.ok .dot{background:var(--good)}
.cx .chip.warn .dot{background:var(--offline)}
.cx .chip .v{font-family:var(--mono);font-weight:600}
.cx .chip .loss{color:var(--loss)}
.cx .card{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--sh-1);margin-top:16px;overflow:hidden}
.cx .card>header{display:flex;align-items:center;gap:12px;padding:14px 18px;cursor:pointer;user-select:none}
.cx .card>header .s-ic{width:30px;height:30px;border-radius:8px;background:var(--surface-2);display:grid;place-items:center;color:var(--crf-deep)}
.cx .card>header h2{margin:0;font-size:15px;font-weight:700}
.cx .card>header .sub{color:var(--muted);font-size:12.5px;font-weight:500}
.cx .card>header .spacer{flex:1}
.cx .hdr-actions{display:flex;gap:8px}
.cx .mini{height:32px;border-radius:8px;border:1px solid var(--border);background:var(--surface);color:var(--muted);padding:0 11px;font-size:12.5px;font-weight:600;display:inline-flex;align-items:center;gap:6px}
.cx .mini:hover{color:var(--text);border-color:var(--crf)}
.cx .mini.on{background:var(--crf-soft);color:var(--crf-deep);border-color:var(--crf)}
.cx .mini.cx-group{gap:5px;padding-right:8px}
.cx .mini select{border:0;background:transparent;font:inherit;font-weight:700;color:var(--crf-deep);outline:none;cursor:pointer}
.cx .chev{transition:transform .18s ease;color:var(--muted-2)}
.cx .card.collapsed .chev{transform:rotate(-90deg)}
.cx .card .body{padding:0 18px 18px}
.cx .card.collapsed .body{display:none}
.cx .tbl-wrap{overflow-x:auto;border:1px solid var(--border-2);border-radius:var(--r);margin-top:4px}
.cx table{border-collapse:collapse;width:100%;font-size:13px;min-width:640px}
.cx thead th{background:var(--surface-2);color:var(--muted);font-weight:600;font-size:11.5px;text-transform:uppercase;letter-spacing:.03em;padding:9px 12px;text-align:left;white-space:nowrap;border-bottom:1px solid var(--border)}
.cx thead th.r{text-align:right}
.cx .grp-head th{text-align:center;border-left:1px solid var(--border);color:var(--muted-2);font-size:11px;padding-bottom:6px}
.cx .grp-head th.g-on{color:var(--crf-deep)}
.cx .grp-head th.g-off{color:var(--offline)}
.cx tbody td{padding:9px 12px;border-bottom:1px solid var(--border-2);white-space:nowrap}
.cx tbody tr:last-child td{border-bottom:0}
.cx tbody tr:hover td{background:var(--surface-2)}
.cx td.fuel{font-weight:600}
.cx td.dim{color:var(--muted)}
.cx .grp-sep{border-left:1px solid var(--border)}
.cx tr.total td{background:var(--surface-2);font-weight:700;border-top:1px solid var(--border);border-bottom:0}
.cx .off-cell{background:var(--offline-bg)}
.cx .off-flag{display:inline-block;width:8px;height:8px;border-radius:50%;background:var(--offline);margin-left:6px;vertical-align:middle}
.cx .val-loss{color:var(--loss);font-weight:600}
.cx .val-gain{color:var(--gain);font-weight:600}
.cx .val-zero{color:var(--muted-2)}
.cx .tag-afer{color:var(--crf-deep);font-weight:600}
.cx .tbl-wrap.capped{max-height:360px;overflow:auto}
.cx .tbl-wrap.capped thead th{position:sticky;top:0;z-index:3}
.cx .tbl-wrap.capped tr.total td{position:sticky;bottom:0;z-index:2}
.cx tr.grp td{background:var(--surface-2);font-weight:700;cursor:pointer;border-top:1px solid var(--border);border-bottom:1px solid var(--border-2)}
.cx tr.grp .gname{display:inline-flex;align-items:center;gap:8px}
.cx tr.grp .gcount{color:var(--muted);font-weight:500;font-size:12px}
.cx tr.grp .gtri{transition:transform .16s ease;color:var(--crf-deep);display:inline-block}
.cx tr.grp.closed .gtri{transform:rotate(-90deg)}
.cx tr.gchild.hide{display:none}
.cx .count-badge{display:inline-flex;align-items:center;gap:5px;background:var(--surface-2);border:1px solid var(--border);border-radius:999px;padding:2px 9px;font-size:11.5px;font-weight:600;color:var(--muted);margin-left:2px}
.cx .mgrp{font-size:11px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;color:var(--muted);padding:8px 2px 2px;display:flex;justify-content:space-between;align-items:center;gap:8px}
.cx .mgrp .ms{font-family:var(--mono);color:var(--text)}
.cx .fchip{font-family:var(--mono);font-size:11px;font-weight:700;background:var(--crf-soft);border:1px solid #cfe0f7;border-radius:6px;padding:1px 6px;color:var(--crf-deep)}
.cx .eq{display:flex;align-items:center;gap:10px;flex-wrap:wrap;background:var(--surface-2);border:1px dashed var(--border);border-radius:var(--r);padding:11px 14px;margin-top:12px;font-size:13px;color:var(--muted)}
.cx .eq .op{color:var(--muted-2);font-weight:700}
.cx .eq b{color:var(--text);font-family:var(--mono)}
.cx .eq .lab{font-size:11px;text-transform:uppercase;letter-spacing:.04em}
.cx .mlist{display:flex;flex-direction:column;gap:10px;margin-top:6px}
.cx .mcard{border:1px solid var(--border);border-radius:var(--r);background:var(--surface);overflow:hidden;padding:0;margin:0;box-shadow:none}
.cx .mcard>.m-head{display:flex;align-items:center;gap:12px;padding:12px 14px;cursor:pointer}
.cx .m-head .m-main{flex:1;min-width:0}
.cx .m-head .m-t{font-weight:600;font-size:13.5px;display:flex;align-items:center;gap:8px}
.cx .m-head .m-s{font-size:12px;color:var(--muted);margin-top:2px}
.cx .m-head .m-fig{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums}
.cx .m-fig .big{font-size:17px;font-weight:600}
.cx .m-fig .small{font-size:12px;color:var(--muted)}
.cx .mcard .m-body{display:none;padding:0 14px 13px;border-top:1px solid var(--border-2)}
.cx .mcard.open .m-body{display:block}
.cx .mcard.open .chev{transform:rotate(-90deg)}
.cx .drow{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--border-2);font-size:13px}
.cx .drow:last-child{border-bottom:0}
.cx .drow .dl{color:var(--muted)}
.cx .drow .dv{font-family:var(--mono);font-variant-numeric:tabular-nums;font-weight:600}
.cx .subgrid{display:grid;grid-template-columns:1fr 1fr;gap:10px;padding-top:10px}
.cx .subbox{border:1px solid var(--border-2);border-radius:10px;padding:10px 12px}
.cx .subbox.off{background:var(--offline-bg);border-color:#f0c89e}
.cx .subbox .sb-t{font-size:11px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted);font-weight:700;display:flex;align-items:center;gap:6px}
.cx .subbox .sb-r{display:flex;justify-content:space-between;margin-top:6px;font-size:13px}
.cx .mtotal{display:flex;justify-content:space-between;align-items:center;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin-top:2px;font-weight:700}
.cx .mtotal .num{font-size:15px}
.cx .note{font-size:12px;color:var(--muted-2);margin-top:12px;display:flex;gap:8px;align-items:flex-start}

/* Not in the prototype's block: the filter and empty state of this page,
   the idle hoses, the readings that are not the midnight one, and the phone
   (the prototype's body.is-mobile). */
.cx { --orange: #e2792a; }
.cx .title { margin-top: 2px; }
.cx .title .ic { font-size: 16px; }
.cx .ctxline .upd { color: var(--muted-2); }
.cx .kpi .k-val small.pre { margin: 0 4px 0 0; }
.cx .chip .dot.test { background: var(--accent); }
.cx .chip .dot.bal { background: var(--neg); }
.cx .chip .v.val-gain, .cx .chip .v.val-loss { font-weight: 600; }
.cx .card > header h2 .sub { margin-left: 2px; }
.cx .card > header .hdr-actions .mini { cursor: pointer; text-decoration: none; }
.cx .card > header .hdr-actions .mini .ic { width: 14px; height: 14px; }
.cx thead th.bottom { vertical-align: bottom; }
.cx .eq .spacer { flex: 1; }
.cx .none { color: var(--muted); font-size: 13px; margin: 4px 0 0; }
.cx .idle { display: inline-block; margin-left: 6px; font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--warn-deep); background: var(--warn-bg); border: 1px solid #f0e3b8; border-radius: 6px; padding: 0 5px; vertical-align: 1px; }
.cx td.stale, .cx .dv.stale { color: #cc6666; }
.cx td.late { color: var(--neg); font-weight: 600; }
.cx .m-head.static { cursor: default; }
.cx .m-t .m-fuel { color: var(--muted); font-weight: 500; }
.cx .flt.date input { border: 0; background: transparent; font: inherit; color: var(--text); padding: 0; }
.flt-req { display: inline-flex; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--warn-deep); background: var(--warn-bg); border: 1px solid #f0e3b8; border-radius: var(--r-pill); padding: 3px 10px; }
.cx-empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.cx-empty .circ { width: 62px; height: 62px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-deep); display: grid; place-items: center; margin: 0 auto 14px; }
.cx-empty h3 { color: var(--text); margin: 0 0 6px; font-size: 16px; }
.cx-empty p { margin: 0 auto; max-width: 460px; font-size: 13px; }
.cx .view-mobile { display: none; }
@media (max-width: 640px) {
  .cx .view-desktop { display: none; }
  .cx .view-mobile { display: block; }
  .cx .summary { grid-template-columns: 1fr; }
  .cx .card > header { flex-wrap: wrap; }
  .cx .eq { font-size: 12px; }
}
@media print {
  .cx .card.collapsed .body { display: block; }
  .cx .tbl-wrap.capped { max-height: none; overflow: visible; }
  .cx .hdr-actions, .cx .chev, .cx .note { display: none; }
}
.cx .eq b.val-loss { color: var(--loss); }
.cx .eq b.val-gain { color: var(--gain); }

/* Usuários (prototype Usuários e Perfis v1): the indicators, the table with
   the fixed actions column, the situation badges and the form. */
.users .kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 4px 0 18px; }
.users .kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 13px 15px; box-shadow: var(--sh-1); }
.users .kpi .kl { font-size: 11px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.users .kpi .kv { font-size: 20px; font-weight: 800; margin-top: 3px; letter-spacing: -.01em; font-family: var(--mono); }
.users .kpi .ks { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.users .kpi.accent .kv { color: var(--accent-deep); }
.users .kpi.warn { border-color: #f3dfa9; }
.users .kpi.warn .kv { color: var(--warn-deep); }
.users .ushead { gap: 10px; }
.users .chips { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.users .chip { border: 1px solid var(--border); background: var(--surface); color: var(--muted); font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: var(--r-pill); text-decoration: none; }
.users .chip:hover { background: var(--surface-2); color: var(--accent); }
.users .chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.users .rsel { border: 1px solid var(--border); background: var(--surface); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--text); max-width: 240px; }
.ustbl { width: 100%; border-collapse: collapse; }
.ustbl th, .ustbl td { white-space: nowrap; font-size: 12.5px; padding: 9px 12px; border-bottom: 1px solid var(--border-2); text-align: left; vertical-align: middle; }
.ustbl thead th { background: var(--surface-2); color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.ustbl thead th a { color: inherit; text-decoration: none; }
.ustbl thead th .sort { color: var(--muted-2); font-size: 9px; margin-left: 3px; }
.ustbl thead th.on { color: var(--accent); }
.ustbl tbody tr:hover td { background: var(--surface-2); }
.ustbl tbody tr.off td, .ustbl tbody tr.off .unm b { color: var(--muted); }
.ustbl .r { text-align: right; }
.ustbl .mono { font-family: var(--mono); }
.ustbl td.wr { white-space: normal; min-width: 150px; max-width: 230px; }
.ustbl td.wr .biz { display: block; color: var(--muted); font-size: 11px; }
.ustbl th:last-child, .ustbl td:last-child { position: sticky; right: 0; background: var(--surface); box-shadow: -1px 0 0 var(--border-2); }
.ustbl thead th:last-child, .ustbl tbody tr:hover td:last-child { background: var(--surface-2); }
.unm { display: inline-flex; align-items: center; gap: 9px; }
.uav { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent); display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; flex: none; }
.unm b { display: block; font-size: 13px; line-height: 1.2; }
.unm small { display: block; color: var(--muted); font-size: 11.5px; }
.users .pf { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; }
.sit { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 11.5px; padding: 3px 9px; border-radius: var(--r-pill); white-space: nowrap; }
.sit::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.sit.on { background: var(--pos-bg); color: var(--pos-deep); }
.sit.off { background: var(--surface-2); color: var(--muted); }
.sit.blk { background: var(--neg-bg); color: var(--neg); }
.sit.exp { background: var(--warn-bg); color: var(--warn-deep); }
.exp-soon { color: var(--warn-deep); font-weight: 700; }
.exp-past { color: var(--neg); font-weight: 700; }
.users .nil { color: var(--muted-2); }
.users .acts, .users .acts-btns { display: inline-flex; gap: 5px; align-items: center; }
.users .mcard .mc-top .sit { margin-left: auto; }
.users .mc-acts { display: flex; justify-content: flex-end; margin-top: 8px; }
.users .fsec { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; margin-top: 6px; font-size: 12px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-deep); }
.users .fsec::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.users .fsec:first-child { margin-top: 0; }
.users .fld textarea { border: 1px solid var(--border); border-radius: 9px; padding: 9px 11px; font: inherit; font-size: 13.5px; color: var(--text); background: var(--surface); resize: vertical; }
.users .fld textarea:disabled { background: var(--surface-2); color: var(--muted); }
.users .fld .hint.pad { padding-top: 10px; }
.users .scope-box { grid-column: 1 / -1; display: flex; gap: 10px; align-items: flex-start; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; font-size: 12.5px; color: var(--muted); }
.users .scope-box b { color: var(--text); }
.usw { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 600; cursor: pointer; user-select: none; }
.usw input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.usw .tr { width: 38px; height: 22px; border-radius: var(--r-pill); background: #d4d9e1; position: relative; transition: .15s; flex: none; }
.usw .tr::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: .15s; }
.usw input:checked + .tr { background: var(--pos); }
.usw input:checked + .tr::after { left: 19px; }
.usw input:focus-visible + .tr { box-shadow: 0 0 0 3px var(--accent-soft); }
.usw input:disabled + .tr { opacity: .6; }
.users .linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); font-weight: 700; cursor: pointer; }
.users .pwset .pwrow { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.users .pwset .pw-rules { margin: 4px 0 0; }
.users .uhist { margin-top: 14px; }
.users .uhist .rt { display: inline-flex; align-items: center; gap: 7px; }
.users .uhist .rt .ic { width: 15px; height: 15px; }
.users .hist { list-style: none; margin: 0; padding: 4px 16px 14px; }
.users .hist li { display: flex; gap: 10px; align-items: baseline; padding: 7px 0; border-bottom: 1px solid var(--border-2); font-size: 12.5px; }
.users .hist li:last-child { border-bottom: 0; }
.users .hist .hd { font-family: var(--mono); font-size: 11.5px; color: var(--muted); flex: none; width: 128px; }
.users .hist .hw { color: var(--muted); }
.users .hist-empty { margin: 0; padding: 14px 16px; font-size: 12.5px; color: var(--muted); }
.users .pf-filter .hint { text-transform: none; letter-spacing: 0; font-weight: 500; color: var(--muted); }
@media (max-width: 640px) {
  .users .kpis { grid-template-columns: 1fr 1fr; }
  .users .srch { min-width: 0; flex: 1 1 100%; }
  .users .pwset .pwrow { grid-template-columns: 1fr; }
  .users .fld.s3, .users .fld.s6 { grid-column: span 12; }
}

/* ===== Visão do Gestor (prototype: shell of the Visão do Gestor v80). The
   classes are the prototype's, under .vg; .is-mobile of the prototype is the
   phone width here. ===== */
.vg { --orange: #e2792a; --orange-bg: #fdf0e3; --orange-deep: #b85f17; --purple: #7c45d6; --meta-ink: #3a4049; }
.vg .num { font-family: var(--mono); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.vg .page-title .dash-tools { margin: 0 0 0 auto; }
.vg .dash-tools { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.vg .cardmode-seg { display: inline-flex; align-items: center; gap: 4px; background: #e8ecf1; border-radius: 10px; padding: 4px; }
.vg .cardmode-seg .cms-l { font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 0 6px; }
.vg .cardmode-seg button { border: 0; background: transparent; padding: 6px 13px; border-radius: 7px; font: inherit; font-weight: 600; font-size: 12.5px; color: var(--muted); cursor: pointer; }
.vg .cardmode-seg button.on { background: var(--surface); color: var(--accent-deep); box-shadow: var(--sh-1); }
.vg .compact-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 6px 11px; font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.vg .compact-btn:hover { background: var(--surface-2); color: var(--accent); }
.vg .compact-btn[aria-pressed="true"] { background: var(--accent-soft); color: var(--accent-deep); border-color: #cfe0f7; }
.vg .legbox { position: relative; display: inline-flex; }
.vg .legbtn { width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface); display: inline-grid; place-items: center; color: var(--muted); cursor: pointer; }
.vg .legbox.open .legbtn, .vg .legbtn:hover { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); }
.vg .legpop { position: absolute; top: calc(100% + 8px); right: 0; width: 252px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; box-shadow: var(--sh-2); padding: 13px 15px; display: none; z-index: 70; }
.vg .legbox.open .legpop { display: block; }
.vg .legtitle { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 9px; }
.vg .legrow { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 4px 0; }
.vg .legrow .sw { width: 14px; height: 14px; border-radius: 4px; flex: none; }
.vg .legdiv { height: 1px; background: var(--border); margin: 9px 0; }

.vg .alert { display: flex; align-items: center; gap: 10px; background: var(--warn-bg); border: 1px solid #f0e3b8; color: var(--warn-deep); padding: 11px 14px; border-radius: var(--r-md); font-size: 13px; margin-bottom: 18px; }
.vg .tabs { display: none; }

/* Revenue cards. */
.vg .gfat-row { display: flex; gap: 14px; margin-bottom: 18px; }
.vg .gfat { flex: 1 1 0; min-width: 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--sh-1); }
.vg .gfat.primary { flex: 1.15 1 0; background: linear-gradient(180deg, var(--accent-soft), var(--surface) 62%); border-color: #cfe0f7; }
.vg .gfat-lab { font-size: 12px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); display: block; }
.vg .gfat-sub { font-size: 12px; color: var(--muted-2); display: block; margin-top: 2px; }
.vg .gfat-num { font-size: 26px; font-weight: 700; letter-spacing: -.02em; margin: 7px 0 2px; }
.vg .gfat .lyrow .lycell { background: var(--surface); }

/* Sections and cards. */
.vg .sec-h { display: flex; align-items: center; gap: 10px; margin: 26px 0 12px; flex-wrap: wrap; }
.vg .sec-h h2 { font-size: 14px; font-weight: 700; margin: 0; }
.vg .sec-note { margin-left: auto; font-size: 12px; color: var(--muted-2); }
.vg .ihint { position: relative; display: inline-grid; place-items: center; width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border); color: var(--muted-2); font-size: 10.5px; font-weight: 700; font-style: normal; line-height: 1; cursor: help; flex: none; user-select: none; }
.vg .ihint:hover, .vg .ihint:focus { color: var(--accent); border-color: var(--accent); background: var(--accent-soft); outline: none; }
.vg .ihint::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%; transform: translateX(-50%); background: #0c1116; color: #fff; font-size: 11.5px; font-weight: 500; line-height: 1.4; width: max-content; max-width: 230px; text-align: left; padding: 7px 10px; border-radius: 8px; box-shadow: var(--sh-2); opacity: 0; visibility: hidden; transition: .15s; z-index: 120; pointer-events: none; }
.vg .ihint:hover::after, .vg .ihint:focus::after { opacity: 1; visibility: visible; }
.vg .kgrid, .vg .pgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vg .piegrid { margin-top: 14px; grid-template-columns: repeat(2, 1fr); }
.vg .kcard, .vg .pcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 15px 16px; box-shadow: var(--sh-1); min-width: 0; }
.vg .kcard .top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.vg .knm { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.vg .kval { font-size: 21px; font-weight: 700; letter-spacing: -.02em; margin-top: 2px; }
.vg .kref { margin-top: 11px; font-size: 11.5px; color: var(--muted-2); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 8px 9px; text-align: center; }
.vg .pcard { padding: 14px 16px; }
.vg .pcard.left-vermelho { border-left: 3px solid var(--neg); }
.vg .pcard.left-laranja { border-left: 3px solid var(--orange); }
.vg .pcard.left-verde { border-left: 3px solid var(--pos); }
.vg .pcard.left-azul { border-left: 3px solid var(--accent); }
.vg .pcard .ph { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vg .pcard .pn { font-weight: 700; font-size: 14.5px; }
.vg .pcard .pv { font-weight: 700; font-size: 16px; }
.vg .pv.vermelho { color: var(--neg); } .vg .pv.laranja { color: var(--orange-deep); } .vg .pv.verde { color: var(--pos); } .vg .pv.azul { color: var(--accent); }

/* Last year (LY, LYc) and the goal bar. */
.vg .lyrow { display: flex; gap: 9px; margin-top: 10px; }
.vg .lycell { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 2px; background: var(--surface-2); border: 1px solid var(--border-2); border-radius: 10px; padding: 8px 10px; }
.vg .lycell .lyl { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); }
.vg .lycell b.num { font-size: 15px; line-height: 1.15; }
.vg .lycell .lyvar { font-size: 12px; font-weight: 700; font-style: normal; }
.vg .lycell .lyvar.up { color: var(--pos-deep); } .vg .lycell .lyvar.down { color: var(--neg); }
.vg .lycell small { font-size: 10px; color: var(--muted-2); line-height: 1.25; }
.vg .meta { margin-top: 12px; }
.vg .meta .track { position: relative; height: 10px; border-radius: var(--r-pill); background: #edf0f4; }
.vg .meta .fill { position: absolute; left: 0; top: 0; bottom: 0; border-radius: var(--r-pill); opacity: .7; }
.vg .meta .fill.vermelho { background: var(--neg); } .vg .meta .fill.laranja { background: var(--orange); }
.vg .meta .fill.verde { background: var(--pos); } .vg .meta .fill.azul { background: var(--accent); }
.vg .meta .mk { position: absolute; top: -8px; transform: translateX(-50%); line-height: 0; }
.vg .meta .legend { display: flex; flex-direction: column; gap: 6px; margin-top: 9px; }
.vg .meta .lg { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 6px 9px; }
.vg .meta .lg .nm { font-weight: 600; color: var(--text); }
.vg .meta .lg .v { font-family: var(--mono); font-variant-numeric: tabular-nums; margin-left: auto; font-weight: 600; }
.vg .meta .lg .st { font-family: var(--mono); font-size: 11px; font-weight: 700; margin-left: 6px; white-space: nowrap; }
.vg .meta .lg .st.ok { color: var(--pos); } .vg .meta .lg .st.miss { color: var(--neg); }

/* The curve of the day. */
.vg .chartwrap { position: relative; margin: 10px 0 2px; touch-action: none; }
.vg .chartwrap svg.line { display: block; width: 100%; height: 56px; }
.vg .chartwrap .cross { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--muted-2); opacity: .5; pointer-events: none; }
.vg .chartwrap .cdot { position: absolute; width: 9px; height: 9px; border-radius: 50%; border: 2px solid #fff; background: var(--accent); transform: translate(-50%, -50%); pointer-events: none; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.vg .chartwrap .ctip { position: absolute; bottom: calc(100% + 4px); transform: translateX(-50%); background: #0c1116; color: #fff; border-radius: 8px; padding: 6px 9px; font-size: 12px; white-space: nowrap; pointer-events: none; z-index: 20; box-shadow: var(--sh-2); }
.vg .chartwrap .ctip b { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vg .chartwrap .ctip .h { color: #9fc1f0; font-size: 10.5px; display: block; }
.vg .xaxis { display: flex; justify-content: space-between; font-size: 10px; color: var(--muted-2); font-family: var(--mono); margin-top: 3px; }

/* Pies. */
.vg .pie-wrap { display: flex; align-items: center; gap: 14px; margin-top: 12px; }
.vg .pie-svg { flex: none; }
.vg .pie { display: block; filter: drop-shadow(0 1px 2px rgba(16, 24, 40, .08)); }
.vg .pie-leg { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.vg .pl-row { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--muted); }
.vg .pl-dot { width: 9px; height: 9px; border-radius: 2px; flex: none; }
.vg .pl-nm { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg .pl-v { margin-left: auto; color: var(--text); font-weight: 600; white-space: nowrap; }
.vg .pl-pct { color: var(--muted-2); font-weight: 700; width: 48px; text-align: right; flex: none; }
.vg .pie-total { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border-2); font-size: 12px; color: var(--muted); font-weight: 600; }
.vg .pie-total b { font-size: 14px; color: var(--text); }

/* Compact cards: name and value only. */
.vg.is-compact .kcard:not(.piecard) > *:not(.knm):not(.kval) { display: none !important; }
.vg.is-compact .gfat > *:not(.gfat-head):not(.gfat-num) { display: none !important; }
.vg.is-compact .pcard > *:not(.ph) { display: none !important; }
.vg.is-compact .kcard, .vg.is-compact .pcard, .vg.is-compact .gfat { padding: 12px 13px; }

/* Rankings. */
.vg .rk-metric { margin-left: auto; display: inline-flex; align-items: center; gap: 7px; background: var(--surface); border: 1px solid var(--border); border-radius: 9px; padding: 4px 9px; }
.vg .rk-metric .fl { font-size: 10px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--muted-2); }
.vg .rk-metric select { border: 0; outline: 0; background: transparent; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--accent); }
.vg .rk-dir { border: 1px solid var(--border); background: var(--surface); border-radius: 9px; padding: 6px 11px; font: inherit; font-size: 12px; font-weight: 700; color: var(--accent); white-space: nowrap; cursor: pointer; }
.vg .rk-dir:hover { background: var(--accent-soft); border-color: var(--accent); }
.vg .rchart { display: flex; flex-direction: column; gap: 10px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-1); padding: 15px 16px; }
.vg .rc-row { display: grid; grid-template-columns: 36px 1fr; gap: 11px; align-items: center; }
.vg .rc-rank { font-weight: 700; font-size: 12.5px; color: var(--muted-2); text-align: right; }
.vg .rc-rank.t3 { color: var(--accent-deep); }
.vg .rc-top { display: flex; align-items: baseline; gap: 8px; margin-bottom: 5px; min-width: 0; }
.vg .rc-nm { font-weight: 700; font-size: 13.5px; }
.vg .rc-sub { font-size: 11.5px; color: var(--muted-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vg .rc-val { margin-left: auto; font-weight: 700; font-size: 13px; white-space: nowrap; }
.vg .rc-track { height: 12px; border-radius: var(--r-pill); background: #eef1f5; overflow: hidden; }
.vg .rc-fill { height: 100%; border-radius: var(--r-pill); background: var(--accent); opacity: .85; }
.vg .rc-fill.t3 { background: var(--accent-deep); opacity: 1; }
.vg .rc-note { margin: 10px 2px 0; font-size: 11.5px; color: var(--muted-2); }

/* Tables. */
.vg .disclose { margin-top: 12px; }
.vg .disclose summary { cursor: pointer; list-style: none; display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--accent); padding: 8px 0; }
.vg .disclose summary::-webkit-details-marker { display: none; }
.vg .disclose summary .ch { transition: transform .2s; }
.vg .disclose[open] summary .ch { transform: rotate(90deg); }
.vg .twrap { border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface); box-shadow: var(--sh-1); margin-top: 8px; }
.vg .tscroll { overflow-x: auto; }
.vg table { border-collapse: collapse; width: 100%; font-size: 13px; }
.vg thead th { background: #eef2f7; text-align: left; font-size: 11px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.vg thead th.grp-c { text-align: center; }
.vg tbody td { padding: 11px 12px; border-bottom: 1px solid var(--border-2); white-space: nowrap; }
.vg tbody tr:last-child td { border-bottom: 0; }
.vg tbody tr:hover td { background: var(--accent-soft); }
.vg td.n, .vg th.n { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vg .fxchip { display: inline-grid; place-items: center; min-width: 24px; height: 24px; padding: 0 5px; border-radius: 7px; background: var(--accent-soft); color: var(--accent); font-weight: 700; font-size: 12px; font-family: var(--mono); }
.vg .thint { display: flex; align-items: center; gap: 7px; padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--border-2); font-size: 11.5px; color: var(--muted); border-radius: 0 0 var(--r-md) var(--r-md); }
.vg thead.stuck th { box-shadow: 0 1px 0 var(--border), 0 6px 10px -8px rgba(16, 24, 40, .35); }
/* The detail by station: Faixa and Posto stay while the table scrolls
   sideways. */
.vg .twrap.pinned tbody td:nth-child(1), .vg .twrap.pinned thead tr:first-child th:nth-child(1) { position: sticky; left: 0; z-index: 4; width: 62px; min-width: 62px; }
.vg .twrap.pinned tbody td:nth-child(2), .vg .twrap.pinned thead tr:first-child th:nth-child(2) { position: sticky; left: 62px; z-index: 4; min-width: 104px; box-shadow: 1px 0 0 var(--border); }
.vg .twrap.pinned thead tr:first-child th:nth-child(1), .vg .twrap.pinned thead tr:first-child th:nth-child(2) { z-index: 6; }
.vg .twrap.pinned tbody td:nth-child(1), .vg .twrap.pinned tbody td:nth-child(2) { background: var(--surface); }
.vg .twrap.pinned tbody tr:hover td:nth-child(1), .vg .twrap.pinned tbody tr:hover td:nth-child(2) { background: var(--accent-soft); }
/* The attendants: the header and the name stay. */
.vg .twrap.colab .tscroll { max-height: min(70vh, 560px); overflow: auto; }
.vg .twrap.colab thead th { position: sticky; top: 0; z-index: 5; }
.vg .twrap.colab thead tr:nth-child(2) th { top: 37px; }
.vg .twrap.colab tbody td:nth-child(1), .vg .twrap.colab thead tr:first-child th:nth-child(1) { position: sticky; left: 0; z-index: 4; background: var(--surface); min-width: 172px; max-width: 220px; white-space: normal; }
.vg .twrap.colab thead tr:first-child th:nth-child(1) { z-index: 7; background: #eef2f7; }
.vg .vg-mob { display: none; }
.vg .det-msel { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; padding: 9px 11px; border-bottom: 1px solid var(--border); background: var(--surface-2); }
.vg .det-msel .dm-l { font-size: 12px; color: var(--muted); font-weight: 700; }
.vg .det-msel button { font: inherit; font-size: 12.5px; font-weight: 700; padding: 5px 13px; border-radius: var(--r-pill); border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.vg .det-msel button.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.vg .dm-reg { font-weight: 400; color: var(--muted-2); font-size: 11px; }
.vg .twrap.detmob .tscroll { max-height: 62vh; overflow: auto; }
.vg .twrap.detmob th:first-child, .vg .twrap.detmob td:first-child { position: sticky; left: 0; z-index: 3; background: var(--surface); min-width: 118px; box-shadow: 1px 0 0 var(--border); }
.vg .twrap.detmob thead th { position: sticky; top: 0; z-index: 2; }
.vg .twrap.detmob thead th:first-child { z-index: 4; background: #eef2f7; }

/* Diário: the pendencies of yesterday and the week's measurements. */
.vg .dgrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.vg .dcard { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--sh-1); display: flex; flex-direction: column; min-width: 0; }
.vg .dcard.sev-verde { border-left-color: var(--pos); } .vg .dcard.sev-laranja { border-left-color: var(--orange); } .vg .dcard.sev-vermelho { border-left-color: var(--neg); }
.vg .dcard .top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.vg .dbadge { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: var(--r-pill); white-space: nowrap; }
.vg .dbadge.verde { background: var(--pos-bg); color: var(--pos-deep); } .vg .dbadge.laranja { background: var(--orange-bg); color: var(--orange-deep); } .vg .dbadge.vermelho { background: var(--neg-bg); color: var(--neg); }
.vg .dbadge.just { background: var(--neg-bg); color: var(--neg); display: inline-flex; align-items: center; gap: 4px; }
.vg .dbadge.just::before { content: "!"; display: inline-grid; place-items: center; width: 12px; height: 12px; border-radius: 50%; background: var(--neg); color: #fff; font-size: 9px; line-height: 1; }
.vg .dcard .kval { font-size: 26px; margin: 8px 0 1px; line-height: 1; }
.vg .dcard .kval.verde { color: var(--pos-deep); } .vg .dcard .kval.laranja { color: var(--orange-deep); } .vg .dcard .kval.vermelho { color: var(--neg); }
.vg .dsub { font-size: 11.5px; color: var(--muted-2); }
.vg .dsplit { display: flex; gap: 8px; margin-top: 12px; }
.vg .dcell { flex: 1 1 0; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 7px 9px; }
.vg .dcell span { display: block; font-size: 10px; color: var(--muted-2); font-weight: 700; letter-spacing: .03em; text-transform: uppercase; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg .dcell b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 700; }
.vg .dcell.warnc { background: var(--warn-bg); border-color: #f2e3bd; }
.vg .dcell.warnc span { color: var(--warn-deep); } .vg .dcell.warnc b { color: #7a5a13; }
.vg .jbar { margin-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: var(--muted); }
.vg .jbar .track { flex: 1; height: 7px; border-radius: 4px; background: var(--pos-bg); overflow: hidden; }
.vg .jbar .track i { display: block; height: 100%; background: var(--neg); border-radius: 4px; }
.vg .jbar b { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; }
.vg .jbar .ok { color: var(--pos-deep); } .vg .jbar .miss { color: var(--neg); }
.vg .dtypes, .vg .drank { margin-top: 12px; border-top: 1px solid var(--border-2); padding-top: 10px; }
.vg .dtypes-h, .vg .drank-h { font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 7px; }
.vg .dtype-row { display: grid; grid-template-columns: auto 1fr 34px; align-items: center; gap: 8px; margin-bottom: 5px; }
.vg .dtype-nm { font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 170px; }
.vg .dtype-bar { height: 6px; background: var(--surface-2); border-radius: 4px; overflow: hidden; }
.vg .dtype-bar i { display: block; height: 100%; background: var(--muted-2); border-radius: 4px; }
.vg .dcard.sev-laranja .dtype-bar i { background: var(--orange); } .vg .dcard.sev-vermelho .dtype-bar i { background: var(--neg); } .vg .dcard.sev-verde .dtype-bar i { background: var(--pos); }
.vg .dtype-row.semmot .dtype-nm { font-weight: 700; color: var(--neg); }
.vg .dtype-row.semmot .dtype-bar i { background: var(--neg) !important; }
.vg .dtype-n, .vg .drank-n { font-family: var(--mono); font-variant-numeric: tabular-nums; font-weight: 700; font-size: 12px; text-align: right; }
.vg .drank-row { display: grid; grid-template-columns: 16px auto 1fr 34px; align-items: center; gap: 7px; margin-bottom: 5px; }
.vg .drank-pos { font-family: var(--mono); font-weight: 700; font-size: 10.5px; color: #fff; background: var(--muted-2); border-radius: 5px; width: 16px; height: 16px; display: grid; place-items: center; }
.vg .drank-pos.p1 { background: var(--warn-deep); } .vg .drank-pos.p2 { background: var(--muted); }
.vg .drank-cod { font-weight: 700; font-size: 12px; white-space: nowrap; }
.vg .drank-reg { font-size: 10.5px; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg.is-compact .dcard > *:not(.top):not(.kval) { display: none !important; }
.vg.is-compact .dcard { padding: 12px 13px; }

/* The switch between the day view and the Comparativo. */
.vg .viewbar { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; }
.vg .viewbar .lvl { display: inline-flex; background: #e8ecf1; border-radius: 11px; padding: 4px; font-size: 13px; letter-spacing: 0; text-transform: none; font-weight: 600; }
.vg .viewbar .lvl a { padding: 7px 16px; border-radius: 8px; color: var(--muted); text-decoration: none; }
.vg .viewbar .lvl a.on { background: var(--accent); color: #fff; box-shadow: var(--sh-1); }
.vg .flt.range { display: inline-flex; align-items: center; gap: 6px; }

/* Comparativo. */
.vg .cmp-hint { font-size: 12.5px; color: var(--muted); margin: 0 0 16px; max-width: 820px; }
.vg .cmpgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 14px; margin-bottom: 22px; }
.vg .cmpcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); padding: 14px 16px; box-shadow: var(--sh-1); }
.vg .cmpcard .knm { font-weight: 700; font-size: 13.5px; color: var(--text); margin-bottom: 10px; }
.vg .cmpcols { display: flex; gap: 10px; }
.vg .cmpcol { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 9px 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-2); }
.vg .cmpcol.cur { position: relative; background: linear-gradient(180deg, var(--accent-soft), #fff 88%); border: 1.5px solid var(--accent); box-shadow: 0 2px 10px rgba(21, 101, 207, .12); padding-top: 11px; }
.vg .cmpcol.cur::before { content: ""; position: absolute; top: 0; left: 10px; right: 10px; height: 3px; border-radius: 0 0 3px 3px; background: var(--accent); }
.vg .cmpcol .cl, .vg .lyc-row .cl { font-size: 10.5px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; color: var(--muted-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vg .cmpcol.cur .cl { color: var(--accent-deep); }
.vg .cmpcol b { font-size: 15.5px; white-space: nowrap; }
.vg .cmpcol.cur b { font-size: 18px; color: var(--accent-deep); letter-spacing: -.01em; }
.vg .cmpcol small, .vg .lyc-row .lyc-sub { font-size: 10.5px; color: var(--muted-2); }
.vg .cvar { font-size: 12px; font-weight: 700; font-style: normal; }
.vg .cvar.up { color: var(--pos-deep); } .vg .cvar.down { color: var(--neg); }
.vg .lyc-row { display: flex; align-items: center; gap: 9px; margin-top: 9px; padding: 8px 11px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border-2); }
.vg .lyc-row .sp { flex: 1; }
.vg .lyc-row .num { font-size: 15px; white-space: nowrap; }
.vg .cmprank { min-width: 640px; font-size: 12.5px; }
.vg .cmprank thead th.grp { text-align: center; }
.vg .cmprank .grp, .vg .cmprank td.g0 { border-left: 2px solid var(--border-2); }
.vg .cmprank td.up { color: var(--pos-deep); font-weight: 700; }
.vg .cmprank td.down { color: var(--neg); font-weight: 700; }

@media (max-width: 900px) {
  .vg .kgrid, .vg .pgrid, .vg .dgrid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .vg .page-title h1 { font-size: 19px; }
  .vg .page-title .dash-tools { margin-left: 0; width: 100%; justify-content: flex-start; }
  .vg .subline, .vg .alert { display: none; }
  .vg .tabs.jumpnav { display: flex; gap: 3px; width: 100%; background: var(--surface-2); border: 1px solid var(--border); padding: 4px; border-radius: 14px; margin-bottom: 14px; }
  .vg .tabs.jumpnav button { flex: 1; border: 0; background: transparent; padding: 9px 2px; border-radius: 10px; font: inherit; font-weight: 600; font-size: 11.5px; color: var(--muted); }
  .vg .gfat-row { flex-direction: column; }
  .vg .gfat-num { font-size: 23px; }
  .vg .kgrid, .vg .pgrid, .vg .piegrid, .vg .dgrid { grid-template-columns: 1fr; }
  .vg .chartwrap svg.line { height: 64px; }
  .vg .pie-wrap { flex-direction: column; align-items: stretch; gap: 12px; }
  .vg .pie-svg { align-self: center; }
  .vg .vg-desk { display: none; }
  .vg .viewbar .lvl { width: 100%; } .vg .viewbar .lvl a { flex: 1; text-align: center; }
  .vg .cmpgrid { grid-template-columns: 1fr; }
  .vg .cmpcols { flex-direction: column; }
  .vg .lyc-row { flex-wrap: wrap; gap: 4px 9px; }
  .vg .lyc-row .lyc-sub { flex: 1 1 100%; order: 5; }
  .vg .flt.range { flex-wrap: wrap; }
  .vg .vg-mob { display: block; }
}

/* Visão do Gestor: the Personalizar (prototype cfgModal). */
.vg .vg-cfg-btn { margin-left: auto; border: 1px solid var(--border); background: var(--surface); color: var(--accent); border-radius: var(--r-sm); padding: 5px 10px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.vg .vg-cfg-btn:hover { background: var(--accent-soft); border-color: var(--accent); }
.vg .addcard { display: block; margin-top: 12px; border: 1px dashed #c9d2dd; background: var(--surface-2); color: var(--accent); border-radius: 10px; padding: 10px 14px; font-size: 12.5px; font-weight: 600; width: 100%; cursor: pointer; }
.vg .addcard:hover { border-color: var(--accent); background: var(--accent-soft); }
.vg .pinbadge { margin-left: 5px; font-size: 11px; }
.vg-cfg { width: min(460px, 92vw); max-height: 84vh; padding: 0; border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-2); background: var(--surface); color: var(--text); }
.vg-cfg::backdrop { background: rgba(12, 17, 22, .45); }
.vg-cfg form { display: flex; flex-direction: column; max-height: 84vh; }
.vg-cfg .modal-h { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border-bottom: 1px solid var(--border); }
.vg-cfg .modal-h h3 { margin: 0; font-size: 15px; }
.vg-cfg .modal-h p { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.vg-cfg .modal-h .x { margin-left: auto; width: 32px; height: 32px; border-radius: var(--r-sm); border: 1px solid var(--border); background: var(--surface); color: var(--muted); cursor: pointer; }
.vg-cfg .modal-b { overflow: auto; padding: 6px 14px; }
.vg-cfg .modal-f { display: flex; gap: 10px; align-items: center; padding: 12px 18px; border-top: 1px solid var(--border); }
.vg-cfg .sp { flex: 1; }
.vg-cfg .cfg-grp .gl { font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted-2); padding: 12px 4px 4px; }
.vg-cfg .cfg-row { display: flex; align-items: center; gap: 10px; padding: 9px 6px; border-radius: 9px; }
.vg-cfg .cfg-row:hover { background: var(--surface-2); }
.vg-cfg .cfg-row .nm { font-size: 13.5px; font-weight: 600; }
.vg-cfg .lockmini { font-size: 10.5px; color: var(--muted-2); font-weight: 600; }
.vg-cfg .pinbtn { position: relative; flex: none; display: grid; place-items: center; width: 30px; height: 28px; border: 1px solid var(--border); background: var(--surface); border-radius: var(--r-sm); font-size: 13px; cursor: pointer; filter: grayscale(1); opacity: .55; }
.vg-cfg .pinbtn.none { visibility: hidden; }
.vg-cfg .pinbtn:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); filter: none; opacity: 1; }
.vg-cfg .pinbtn:has(input:focus-visible), .vg-cfg .sw:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
/* A hidden card cannot be pinned (the server ignores it too). */
.vg-cfg .cfg-row:has(.sw input:not(:checked)) .pinbtn { opacity: .3; pointer-events: none; }
.vg-cfg .pinbtn input, .vg-cfg .sw input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.vg-cfg .sw { position: relative; flex: none; cursor: pointer; }
.vg-cfg .sw-t { display: block; position: relative; width: 40px; height: 23px; border-radius: var(--r-pill); background: #d6dbe2; transition: background .18s; }
.vg-cfg .sw-t::after { content: ""; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; transition: left .18s; }
.vg-cfg .sw:has(input:checked) .sw-t { background: var(--accent); }
.vg-cfg .sw:has(input:checked) .sw-t::after { left: 19px; }
.vg-cfg .sw.locked { opacity: .45; cursor: not-allowed; }
