/* ==========================================================================
   Estacionamento — visual mobile-first, roxo, com modo escuro automático
   ========================================================================== */

/* A fonte é servida pelo próprio app, não pelo Google Fonts.
   O estacionamento precisa abrir mesmo com a internet oscilando, e um
   <link> para fonts.googleapis.com fazia cada carregamento esperar o DNS
   antes de cair na fonte do sistema. Este é o arquivo variável do Inter,
   subset latino — 48 KB cobrem todo o português. */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/fonts/inter-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  color-scheme: light;
  --bg: #f5f3fb;
  --surface: #ffffff;
  --surface-2: #f3f0fa;
  --surface-3: #e9e4f6;
  --text: #1a1530;
  --text-2: #57516f;
  --muted: #8a84a1;
  --line: #e8e4f2;
  --line-2: #d9d3ea;

  --primary: #6d28d9;
  --primary-hover: #5b21b6;
  --primary-text: #6d28d9;
  --primary-soft: #efe9fe;
  --primary-soft-2: #ddd0fd;
  --grad: linear-gradient(135deg, #7c3aed 0%, #6027cf 45%, #3f1391 100%);

  --good: #0ca30c; --good-soft: #e5f6e5; --good-text: #006300;
  --warn: #fab219; --warn-soft: #fff4dc; --warn-text: #8a5700;
  --crit: #d03b3b; --crit-soft: #fdeaea; --crit-text: #b42323;

  /* séries do gráfico (validadas para daltonismo) */
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --grid: #eeebf5;
  --axis: #cdc7dc;

  --shadow-sm: 0 1px 2px rgba(30, 16, 70, .06);
  --shadow: 0 1px 2px rgba(30, 16, 70, .05), 0 8px 24px rgba(76, 29, 149, .08);
  --shadow-lg: 0 24px 60px rgba(40, 14, 100, .25);

  --r-lg: 22px;
  --r: 18px;
  --tab-h: 66px;
  --sb: env(safe-area-inset-bottom, 0px);
  --st: env(safe-area-inset-top, 0px);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Roboto Mono", Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0f0d17;
    --surface: #1a1726;
    --surface-2: #231f33;
    --surface-3: #2d283f;
    --text: #f3f1fa;
    --text-2: #bfb9d4;
    --muted: #8b85a3;
    --line: #2a2539;
    --line-2: #3a3450;
    --primary: #8b5cf6;
    --primary-hover: #7c3aed;
    --primary-text: #b9a2fb;
    --primary-soft: #261e40;
    --primary-soft-2: #3a2d66;
    --good-soft: #12301a; --good-text: #4ade80;
    --warn-soft: #33270b; --warn-text: #fbbf24;
    --crit-soft: #3a1717; --crit-text: #f87171;
    --series-1: #3987e5;
    --series-2: #d95926;
    --grid: #26223a;
    --axis: #3a3550;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

/* ---------- base ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}
body { min-height: 100dvh; overflow-x: hidden; -webkit-tap-highlight-color: transparent; }
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
input, select, textarea { font-size: 16px; } /* 16px evita o zoom automático do iPhone */
a { color: var(--primary-text); text-decoration: none; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
p { margin: 0; }
dl, dd { margin: 0; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid color-mix(in srgb, var(--primary) 45%, transparent); outline-offset: 2px; }
.ic { flex-shrink: 0; display: inline-block; vertical-align: middle; }

.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.grow { flex: 1; min-width: 0; }
.trunc { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.label { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 8px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.cols-2 { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; align-items: start; }

/* ---------- estrutura ---------- */

.app { display: flex; min-height: 100dvh; }
.rail { display: none; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(var(--st) + 14px) 16px 10px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
}
.topbar-txt { min-width: 0; }
.topbar h1 { font-size: 24px; font-weight: 800; line-height: 1.15; }
.topbar p { font-size: 13px; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar p:empty { display: none; }
.topbar-acoes { display: flex; gap: 8px; flex-shrink: 0; }

.content {
  width: 100%; max-width: 1180px; margin: 0 auto;
  padding: 6px 16px calc(var(--tab-h) + var(--sb) + 28px);
  display: flex; flex-direction: column; gap: 14px;
}

/* barra de abas do celular */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr));
  height: calc(var(--tab-h) + var(--sb));
  padding: 6px 4px var(--sb);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  min-width: 0; color: var(--muted); font-size: 11.5px; font-weight: 600;
}
.nav-ic { display: grid; place-items: center; width: 56px; height: 30px; border-radius: 999px; transition: background .2s, color .2s; }
.nav-lbl { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab.on { color: var(--primary-text); }
.tab.on .nav-ic { background: var(--primary-soft); }

/* menu lateral (tablet / PC) */
.rail-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; overflow-y: auto; }
.rail-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px; width: 100%;
  padding: 6px 2px; border: 0; border-radius: 14px; background: none; cursor: pointer;
  color: var(--text-2); font-size: 11px; font-weight: 600; text-align: center;
}
.rail-item:hover .nav-ic { background: var(--surface-2); }
.rail-item.on { color: var(--primary-text); }
.rail-item.on .nav-ic { background: var(--primary-soft); }
.brand { display: flex; align-items: center; justify-content: center; gap: 12px; }
.brand-logo {
  width: 44px; height: 44px; border-radius: 14px; flex-shrink: 0;
  display: grid; place-items: center; color: #fff; background: var(--grad);
  box-shadow: 0 8px 20px -6px rgba(109, 40, 217, .55);
}
.brand-txt { display: none; flex-direction: column; min-width: 0; }
.brand-txt strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.brand-txt small { color: var(--text-2); font-size: 12px; }
.rail-foot { display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line); padding-top: 12px; }
.rail-user { display: flex; align-items: center; justify-content: center; gap: 10px; }
.rail-user-txt { display: none; flex-direction: column; min-width: 0; }
.rail-user-txt strong { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-user-txt small { font-size: 12px; color: var(--text-2); }

/* ---------- botões ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 0 18px; border-radius: 14px; border: 1px solid transparent;
  font-weight: 650; font-size: 15px; cursor: pointer; white-space: nowrap; user-select: none;
  transition: transform .08s, background .15s, box-shadow .15s, opacity .15s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn.is-busy { opacity: .7; cursor: progress; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 8px 18px -8px rgba(109, 40, 217, .7); }
.btn-primary:hover:not(:disabled) { background: var(--primary-hover); }
.btn-soft { background: var(--primary-soft); color: var(--primary-text); }
.btn-soft:hover:not(:disabled) { background: var(--primary-soft-2); }
.btn-danger { background: var(--crit); color: #fff; }
.btn-sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 11px; }
.btn-lg { min-height: 52px; font-size: 16px; border-radius: 16px; }
.btn-xl { min-height: 60px; font-size: 17px; border-radius: 18px; }
.btn-block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-row > * { flex: 1 1 140px; }
.icon-btn {
  width: 44px; height: 44px; flex-shrink: 0; display: inline-grid; place-items: center;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2); cursor: pointer;
}
.icon-btn:hover:not(:disabled) { background: var(--surface-2); }
.icon-btn:disabled { opacity: .35; cursor: default; }
.icon-btn.danger { color: var(--crit-text); }
.link {
  display: inline-flex; align-items: center; gap: 6px; padding: 10px 4px;
  border: 0; background: none; color: var(--primary-text); font-weight: 600; font-size: 14px; cursor: pointer;
}
.link.danger { color: var(--crit-text); }
.only-wide { display: none !important; }

/* ---------- cartões e formulários ---------- */

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); min-width: 0; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.card-head h2 { font-size: 17px; font-weight: 750; }
.card-head p { font-size: 13px; }
.card-head-l { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); }
.chart-card .card-head, .card > .card-head:not(:only-child) { margin-bottom: 14px; }
.card.stack > .card-head { margin-bottom: 0; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 13px; font-weight: 600; color: var(--text-2); }
.field input, .field select, .field textarea {
  width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 14px;
  border: 1.5px solid var(--line-2); background: var(--surface); color: var(--text);
  outline: none; -webkit-appearance: none; appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 72px; }
.field select {
  padding-right: 38px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%238a84a1' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent);
}
.input-group { position: relative; }
.input-group input { padding-right: 52px; }
.input-group .icon-btn { position: absolute; right: 2px; top: 2px; }
.affix {
  display: flex; align-items: center; min-height: 48px; padding-left: 14px;
  border: 1.5px solid var(--line-2); border-radius: 14px; background: var(--surface);
  transition: border-color .15s, box-shadow .15s;
}
.affix > span { color: var(--muted); font-weight: 650; flex-shrink: 0; }
.field .affix input { border: 0; box-shadow: none; background: transparent; padding-left: 8px; min-width: 0; min-height: 44px; }
.affix-r { padding-left: 0; padding-right: 14px; }
.field .affix-r input { padding-left: 14px; }
.affix:focus-within { border-color: var(--primary); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primary) 18%, transparent); }
.form-erro { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--crit-soft); color: var(--crit-text); font-size: 14px; }
.hint { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13px; line-height: 1.4; }
.hint .ic { margin-top: 1px; }

.search {
  display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: 14px; background: var(--surface); color: var(--muted);
}
.search:focus-within { border-color: var(--primary); }
.search input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--text); }
.toolbar { display: flex; flex-direction: column; gap: 10px; min-width: 0; }

.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips-scroll { overflow-x: auto; scrollbar-width: none; margin: 0 -16px; padding: 2px 16px; }
.chips-scroll::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 16px;
  border: 1.5px solid var(--line-2); border-radius: 999px; background: var(--surface);
  color: var(--text-2); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap;
}
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }

.seg { display: flex; gap: 4px; padding: 4px; border-radius: 16px; background: var(--surface-2); }
.seg button {
  flex: 1; min-width: 0; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 12px; background: transparent; color: var(--text-2);
  font-weight: 650; font-size: 14px; cursor: pointer; transition: background .15s, color .15s, box-shadow .15s;
}
.seg button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--primary-text); box-shadow: var(--shadow-sm), 0 0 0 1px var(--line); }
.seg-lg .seg button { min-height: 62px; flex-direction: column; gap: 4px; font-size: 13.5px; }

.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; cursor: pointer; }
.switch-row + .switch-row { border-top: 1px solid var(--line); }
.switch-row strong { display: block; font-size: 15px; font-weight: 600; }
.switch-row small { display: block; font-size: 13px; color: var(--text-2); }
.switch {
  -webkit-appearance: none; appearance: none; position: relative; flex-shrink: 0; margin: 0;
  width: 50px; height: 30px; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .2s;
}
.switch::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch:checked { background: var(--primary); }
.switch:checked::after { transform: translateX(20px); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.b-good { background: var(--good-soft); color: var(--good-text); }
.b-warn { background: var(--warn-soft); color: var(--warn-text); }
.b-crit { background: var(--crit-soft); color: var(--crit-text); }
.b-mute { background: var(--surface-2); color: var(--text-2); }
.b-primary { background: var(--primary-soft); color: var(--primary-text); }

.notice { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.35; }
.notice .ic { margin-top: 1px; }
.n-good { background: var(--good-soft); color: var(--good-text); }
.n-warn { background: var(--warn-soft); color: var(--warn-text); }
.n-crit { background: var(--crit-soft); color: var(--crit-text); }
.n-info { background: var(--primary-soft); color: var(--primary-text); }
.n-mute { background: var(--surface-2); color: var(--text-2); }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text-2); font-size: 13px; white-space: nowrap; }
.pill b { color: var(--text); }

.avatar { width: 42px; height: 42px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary-text); font-weight: 800; font-size: 15px; }
.avatar.sm { width: 36px; height: 36px; border-radius: 12px; font-size: 13px; }
.avatar.lg { width: 56px; height: 56px; border-radius: 18px; font-size: 19px; background: var(--grad); color: #fff; }

/* ---------- placa Mercosul ---------- */

.plate {
  display: inline-flex; flex-direction: column; flex-shrink: 0; min-width: 108px; overflow: hidden;
  border: 2px solid #1f2430; border-radius: 7px; background: #fff;
}
.plate-top { background: linear-gradient(#1e4fc2, #133a99); color: #fff; font-size: 8px; font-weight: 700; letter-spacing: .3em; line-height: 1; text-align: center; padding: 3px 0 2px; }
.plate-num { color: #111; font-family: var(--mono); font-weight: 800; font-size: 19px; letter-spacing: .06em; line-height: 1.15; text-align: center; padding: 2px 10px 3px; }
.plate.lg { min-width: 170px; }
.plate.lg .plate-top { font-size: 10px; padding: 4px 0 3px; }
.plate.lg .plate-num { font-size: 29px; }
.plate-xl { display: flex; width: 100%; max-width: 360px; margin: 0 auto; border-width: 3px; border-radius: 12px; }
.plate-xl .plate-top { font-size: 11px; padding: 6px 0 5px; }
.plate-xl input.plate-input {
  width: 100%; min-width: 0; border: 0; outline: 0; border-radius: 0; background: #fff; color: #111;
  font-family: var(--mono); font-weight: 800; font-size: clamp(34px, 11vw, 48px);
  letter-spacing: .08em; text-align: center; text-transform: uppercase; padding: 10px 8px 12px;
}
.plate-xl input.plate-input::placeholder { color: #c9c9d1; }
.plate-xl:focus-within { box-shadow: 0 0 0 5px color-mix(in srgb, var(--primary) 28%, transparent); }
.tag-barraca {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; min-width: 0; padding: 6px 12px;
  border-radius: 10px; background: var(--warn-soft); color: var(--warn-text); font-weight: 700; font-size: 15px;
}
.tag-barraca span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tag-barraca.lg { font-size: 20px; padding: 10px 16px; }

/* ---------- pátio ---------- */

.occ { position: relative; overflow: hidden; border: 0; background: var(--grad); color: #fff; box-shadow: 0 18px 40px -20px rgba(76, 29, 149, .8); }
.occ::after, .hero::after {
  content: ""; position: absolute; right: -70px; top: -70px; width: 220px; height: 220px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .2), transparent 70%); pointer-events: none;
}
.occ-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; position: relative; z-index: 1; }
.occ .eyebrow { color: rgba(255, 255, 255, .78); }
.occ-num { display: flex; align-items: baseline; gap: 8px; margin-top: 4px; }
.occ-num strong { font-size: 46px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.occ-num span { color: rgba(255, 255, 255, .82); font-size: 15px; font-weight: 500; }
.clock { text-align: right; }
.clock strong { display: block; font-size: 22px; font-weight: 750; font-variant-numeric: tabular-nums; }
.clock small { color: rgba(255, 255, 255, .75); font-size: 12px; text-transform: capitalize; }
.meter { height: 8px; margin: 14px 0 12px; overflow: hidden; border-radius: 999px; background: rgba(255, 255, 255, .22); position: relative; z-index: 1; }
.meter span { display: block; height: 100%; width: 0; border-radius: inherit; background: #fff; transition: width .5s; }
.meter span[data-nivel="warn"] { background: var(--warn); }
.meter span[data-nivel="crit"] { background: #ff9b9b; }
.occ-tipos { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: rgba(255, 255, 255, .85); position: relative; z-index: 1; }
.occ-tipo { display: inline-flex; align-items: center; gap: 5px; }
.occ-tipo b { color: #fff; }
.occ-livres { margin-left: auto; }

.vlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.vcard {
  display: flex; flex-direction: column; gap: 12px; width: 100%; padding: 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; box-shadow: var(--shadow-sm);
  transition: transform .1s, box-shadow .15s, border-color .15s;
}
.vcard:hover { border-color: var(--primary-soft-2); box-shadow: var(--shadow); }
.vcard:active { transform: scale(.99); }
.vcard-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-width: 0; }
.vcard-valor { font-size: 21px; font-weight: 800; letter-spacing: -.02em; white-space: nowrap; }
.vcard-bottom { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); }
.vcard-desc { display: flex; align-items: center; gap: 6px; min-width: 0; }
.vcard-tempo { display: inline-flex; align-items: center; gap: 5px; flex-shrink: 0; font-weight: 650; color: var(--text); }
.vcard-tempo small { color: var(--muted); font-weight: 500; }
.vcard-tempo.is-long { color: var(--warn-text); }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--tab-h) + var(--sb) + 16px); z-index: 35;
  display: inline-flex; align-items: center; gap: 8px; height: 58px; padding: 0 22px 0 18px;
  border-radius: 20px; background: var(--grad); color: #fff; font-weight: 700; font-size: 16px;
  box-shadow: 0 14px 30px -8px rgba(91, 33, 182, .7);
}
.fab:active { transform: scale(.97); }
.v-patio .vlist { padding-bottom: 64px; }

/* ---------- entrada ---------- */

.entrada { display: flex; flex-direction: column; gap: 14px; width: 100%; max-width: 640px; margin: 0 auto; }
.entrada-card { display: flex; flex-direction: column; gap: 18px; }
.entrada-hora { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.entrada-hora strong { color: var(--text); font-variant-numeric: tabular-nums; }
.more { padding: 0; }
.more summary { display: flex; align-items: center; gap: 8px; padding: 16px; list-style: none; font-weight: 600; cursor: pointer; }
.more summary::-webkit-details-marker { display: none; }
.more[open] summary { border-bottom: 1px solid var(--line); }
.more .stack { padding: 16px; }

/* ---------- folhas (bottom sheet / modal) ---------- */

.sheet-wrap { position: fixed; inset: 0; z-index: 100; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(15, 8, 35, .5); opacity: 0; transition: opacity .22s; }
.sheet {
  position: relative; width: 100%; max-height: 92dvh; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 26px 26px 0 0; box-shadow: var(--shadow-lg);
  padding-bottom: var(--sb); transform: translateY(100%); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
}
.sheet-wrap.open .sheet-backdrop { opacity: 1; }
.sheet-wrap.open .sheet { transform: none; }
.sheet-grip { flex-shrink: 0; width: 42px; height: 5px; margin: 8px auto 0; border-radius: 99px; background: var(--line-2); }
.sheet-head { flex-shrink: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 6px 10px 2px 20px; }
.sheet-head h2 { min-width: 0; font-size: 18px; font-weight: 750; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sheet-body { display: flex; flex-direction: column; gap: 16px; padding: 8px 20px 22px; overflow-y: auto; overscroll-behavior: contain; }
.sheet-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 20px; margin-top: -6px; }

.saida-head { display: flex; flex-direction: column; align-items: center; gap: 10px; padding-top: 2px; }
.saida-tipo { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 14px; }
.timeline {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 6px 4px;
  padding: 14px; border-radius: 18px; background: var(--surface-2); text-align: center;
}
.timeline span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.timeline strong { display: block; font-size: 23px; font-weight: 800; font-variant-numeric: tabular-nums; }
.timeline small { color: var(--muted); font-size: 12px; }
.tl-sep { color: var(--muted); }
.tl-dur { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; margin-top: 4px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.tl-dur strong { font-size: 18px; }
.total { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--primary-soft); color: var(--primary-text); }
.total span { font-weight: 650; }
.total strong { font-size: 32px; font-weight: 850; letter-spacing: -.02em; white-space: nowrap; }
.total.is-free { background: var(--good-soft); color: var(--good-text); }
.pay-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 72px;
  border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--surface); color: var(--text-2);
  font-weight: 650; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s, color .15s;
}
.pay-btn.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary-text); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 16%, transparent); }
.cash { display: flex; flex-direction: column; gap: 10px; margin-top: 12px; }
.troco { font-size: 16px; text-align: right; }
.troco:empty { display: none; }
.troco strong { font-size: 22px; }
.t-crit { color: var(--crit-text); font-weight: 700; }
.kv-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 16px; }
.kv-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 12px 14px; }
.kv-list > div + div { border-top: 1px solid var(--line); }
.kv-list dt { color: var(--text-2); font-size: 14px; flex-shrink: 0; }
.kv-list dd { min-width: 0; font-size: 14px; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

/* ---------- histórico ---------- */

.daybar { display: flex; align-items: center; gap: 8px; padding: 4px; border: 1px solid var(--line); border-radius: 16px; background: var(--surface); }
.daybar-date { position: relative; flex: 1; padding: 8px; border-radius: 12px; text-align: center; font-weight: 750; font-size: 16px; text-transform: capitalize; cursor: pointer; }
.daybar-date small { display: block; font-size: 12px; font-weight: 500; color: var(--text-2); text-transform: none; }
.daybar-date input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; border: 0; cursor: pointer; }
.summary { display: flex; flex-wrap: wrap; gap: 8px; }
.hlist { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.hrow {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 0; border-top: 1px solid var(--line); background: none; color: inherit;
}
.hrow:first-child { border-top: 0; }
.hrow:hover { background: var(--surface-2); }
.hrow-ic { width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); color: var(--text-2); }
.hrow-main { flex: 1; min-width: 0; display: block; }
.hrow-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.hrow-top strong { font-family: var(--mono); font-size: 15px; letter-spacing: .03em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow-main small { display: block; font-size: 13px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hrow-val { flex-shrink: 0; text-align: right; }
.hrow-val strong { display: block; font-size: 15px; white-space: nowrap; }
.hrow-val small { display: block; font-size: 12px; color: var(--muted); }
.is-cancel .hrow-top strong, .is-cancel .hrow-val strong { text-decoration: line-through; color: var(--muted); }

/* ---------- painel ---------- */

.range { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.hero {
  position: relative; overflow: hidden; padding: 20px; border-radius: var(--r-lg);
  background: var(--grad); color: #fff; box-shadow: 0 18px 40px -18px rgba(76, 29, 149, .75);
}
.hero .eyebrow { color: rgba(255, 255, 255, .8); position: relative; z-index: 1; }
.hero-num { position: relative; z-index: 1; margin: 6px 0 16px; font-size: clamp(40px, 12vw, 56px); font-weight: 800; letter-spacing: -.035em; line-height: 1.05; overflow-wrap: anywhere; }
.hero-split { position: relative; z-index: 1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hero-split > div { min-width: 0; padding: 12px; border-radius: 16px; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .16); }
.hero-split span { display: block; font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, .8); }
.hero-split strong { display: block; margin-top: 2px; font-size: 19px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hero-split small { display: block; margin-top: 2px; font-size: 11.5px; line-height: 1.3; color: rgba(255, 255, 255, .72); }
.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.stat { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 14px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.stat-lbl { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--text-2); }
.stat-lbl .ic { color: var(--primary-text); }
.stat-val { font-size: 24px; font-weight: 800; letter-spacing: -.02em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-sub { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin-bottom: 8px; font-size: 13px; color: var(--text-2); }
.lg-item { display: inline-flex; align-items: center; gap: 6px; }
.lg-item i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.chart-plot { position: relative; width: 100%; }
.chart-plot svg { display: block; width: 100%; height: auto; touch-action: pan-y; }
.chart-plot .grid { stroke: var(--grid); stroke-width: 1; }
.chart-plot .axis { stroke: var(--axis); stroke-width: 1; }
.chart-plot .tick { fill: var(--muted); font-size: 11px; font-family: var(--font); font-variant-numeric: tabular-nums; }
.chart-plot .hover-band { fill: var(--primary-soft); transition: opacity .12s; }
.chart-tip {
  position: absolute; top: 0; z-index: 5; min-width: 150px; padding: 10px 12px; border-radius: 12px;
  background: var(--text); color: var(--bg); font-size: 13px; box-shadow: var(--shadow-lg); pointer-events: none;
}
.tip-row { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.tip-row i { width: 8px; height: 8px; border-radius: 2px; }
.tip-row span { flex: 1; opacity: .8; }
.tip-row b { font-variant-numeric: tabular-nums; }
.tip-total { margin-top: 6px; padding-top: 6px; border-top: 1px solid color-mix(in srgb, var(--bg) 25%, transparent); }
.tbl-wrap { max-height: 320px; margin-top: 12px; overflow: auto; border: 1px solid var(--line); border-radius: 12px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th, .tbl td { padding: 8px 12px; text-align: right; white-space: nowrap; border-top: 1px solid var(--line); }
.tbl th:first-child, .tbl td:first-child { text-align: left; }
.tbl thead th { position: sticky; top: 0; border-top: 0; background: var(--surface-2); color: var(--text-2); font-weight: 600; }

.bars { display: flex; flex-direction: column; gap: 12px; }
.bar-row { display: grid; grid-template-columns: 92px minmax(0, 1fr) 96px; align-items: center; gap: 10px; font-size: 14px; }
.bar-lbl { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; }
.bar-track { display: block; height: 10px; overflow: hidden; border-radius: 999px; background: var(--surface-2); }
.bar-fill { display: block; height: 100%; border-radius: 0 4px 4px 0; background: var(--primary); }
.bar-val { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }

.team-list { display: flex; flex-direction: column; }
.team-row { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 10px 12px; padding: 14px 0; border-top: 1px solid var(--line); }
.team-row:first-child { border-top: 0; padding-top: 0; }
.team-info strong { display: block; }
.team-info small { font-size: 13px; color: var(--text-2); }
.team-nums { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.team-nums dt { font-size: 11.5px; font-weight: 600; color: var(--text-2); }
.team-nums dd { font-size: 15px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- mensalistas / equipe ---------- */

.mstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.mstat { min-width: 0; padding: 10px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.mstat span { display: block; font-size: 11.5px; font-weight: 600; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mstat strong { font-size: 20px; font-weight: 800; }
.mstat-wide { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; border-color: transparent; background: var(--primary-soft); }
.mstat-wide span, .mstat-wide strong { color: var(--primary-text); }
.mstat-wide span { font-size: 13px; }
.mstat-wide strong { font-size: 18px; }
.mlist { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.mcard {
  display: flex; align-items: center; gap: 12px; width: 100%; padding: 12px 14px; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); color: inherit; box-shadow: var(--shadow-sm);
}
.mcard:hover { border-color: var(--primary-soft-2); }
.mcard.is-off { opacity: .55; }
.mcard-ic { width: 44px; height: 44px; flex-shrink: 0; display: grid; place-items: center; border-radius: 14px; background: var(--primary-soft); color: var(--primary-text); }
.mcard-ic.t-moto { background: var(--good-soft); color: var(--good-text); }
.mcard-ic.t-barraca { background: var(--warn-soft); color: var(--warn-text); }
.mcard-main { flex: 1; min-width: 0; }
.mcard-main strong, .mcard-main small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard-main small { font-size: 13px; color: var(--text-2); }
.mcard-side { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; max-width: 45%; }
.mcard-side small { font-size: 12px; color: var(--muted); white-space: nowrap; }
.mcard-side .badge { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.m-head { display: flex; align-items: center; gap: 12px; }
.m-head-main { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.info-grid > div { min-width: 0; padding: 10px 12px; border-radius: 14px; background: var(--surface-2); }
.info-grid span { display: block; font-size: 12px; font-weight: 600; color: var(--text-2); }
.info-grid strong { font-size: 15px; white-space: nowrap; }
.sub-card { display: flex; flex-direction: column; gap: 12px; padding: 14px; border: 1.5px solid var(--primary-soft-2); border-radius: 18px; background: color-mix(in srgb, var(--primary-soft) 45%, var(--surface)); }
.sub-card h3, .sec-title { font-size: 15px; font-weight: 750; }
.pag-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: 14px; }
.pag-row { display: flex; align-items: center; gap: 6px; padding: 8px 6px 8px 14px; }
.pag-row + .pag-row { border-top: 1px solid var(--line); }
.pag-row > div { flex: 1; min-width: 0; }
.pag-row small { display: block; font-size: 12px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pag-row > strong { white-space: nowrap; }

.opt-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; padding: 12px; text-align: left; cursor: pointer;
  border: 1.5px solid var(--line-2); border-radius: 16px; background: var(--surface); color: inherit;
  transition: border-color .15s, background .15s;
}
.opt-ic { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; background: var(--surface-2); color: var(--text-2); }
.opt strong { font-size: 14px; }
.opt small { font-size: 12px; line-height: 1.3; color: var(--text-2); }
.opt.on { border-color: var(--primary); background: var(--primary-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent); }
.opt.on .opt-ic { background: var(--primary); color: #fff; }

/* ---------- preços / impressora / mais ---------- */

.sim-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.sim-item { min-width: 0; padding: 8px 6px; border-radius: 12px; background: var(--surface-2); text-align: center; }
.sim-item span { display: block; font-size: 12px; color: var(--text-2); }
.sim-item strong { font-size: 14px; white-space: nowrap; }
.grid-ip { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.bt-status { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: var(--surface-2); }
.bt-status strong, .bt-status small { display: block; }
.bt-status small { font-size: 13px; color: var(--text-2); }
.dot { width: 10px; height: 10px; flex-shrink: 0; border-radius: 50%; background: var(--muted); }
.dot.on { background: var(--good); box-shadow: 0 0 0 4px var(--good-soft); }
.preview-paper { display: flex; justify-content: center; overflow-x: auto; padding: 18px; border-radius: 16px; background: var(--surface-3); }
.preview-paper .recibo { flex-shrink: 0; box-shadow: 0 12px 30px rgba(0, 0, 0, .15); }

.profile { display: flex; align-items: center; gap: 14px; }
.profile strong, .profile small { display: block; }
.menu-list { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; cursor: pointer;
  border: 0; background: none; color: var(--text); font-size: 15px; font-weight: 600;
}
.menu-item + .menu-item { border-top: 1px solid var(--line); }
.menu-item:hover { background: var(--surface-2); }
.menu-item > .ic { color: var(--muted); }
.menu-item .grow > span, .menu-item .grow > small { display: block; }
.menu-item small { font-size: 13px; font-weight: 500; color: var(--text-2); }
.mi-ic { width: 38px; height: 38px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--primary-soft); color: var(--primary-text); }
.menu-item.danger { color: var(--crit-text); }
.menu-item.danger .mi-ic { background: var(--crit-soft); color: var(--crit-text); }

/* ---------- estados ---------- */

.empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 36px 20px; text-align: center; color: var(--text-2); }
.empty-ic { width: 60px; height: 60px; margin-bottom: 4px; display: grid; place-items: center; border-radius: 20px; background: var(--primary-soft); color: var(--primary-text); }
.empty strong { font-size: 16px; color: var(--text); }
.empty p { max-width: 300px; font-size: 14px; }
.is-erro .empty-ic { background: var(--crit-soft); color: var(--crit-text); }
.vlist > .empty, .mlist > .empty, #lista > .empty { grid-column: 1 / -1; border: 1.5px dashed var(--line-2); border-radius: var(--r-lg); background: var(--surface); }
.skeleton-list { display: flex; flex-direction: column; gap: 10px; grid-column: 1 / -1; }
.skeleton { height: 76px; border-radius: var(--r); background: linear-gradient(90deg, var(--surface-2), var(--surface-3), var(--surface-2)); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.loading-page { display: grid; place-items: center; padding: 60px 0; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--primary-soft-2); border-top-color: var(--primary); animation: spin .8s linear infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- toasts ---------- */

#toasts {
  position: fixed; left: 12px; right: 12px; bottom: calc(var(--tab-h) + var(--sb) + 12px); z-index: 200;
  display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; width: 100%; max-width: 460px;
  padding: 12px 12px 12px 14px; border-radius: 16px; background: #1d1830; color: #fff;
  font-size: 14px; font-weight: 500; box-shadow: var(--shadow-lg);
  opacity: 0; transform: translateY(12px); transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: none; }
.toast-ic { width: 28px; height: 28px; flex-shrink: 0; display: grid; place-items: center; border-radius: 50%; background: rgba(12, 163, 12, .22); color: #4ade80; }
.toast-erro .toast-ic { background: rgba(208, 59, 59, .28); color: #ff9b9b; }
.toast-msg { flex: 1; min-width: 0; }
.toast-btn { flex-shrink: 0; padding: 8px 12px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .14); color: #fff; font-weight: 700; cursor: pointer; }

/* ---------- login ---------- */

.login-page {
  position: relative; overflow: hidden; min-height: 100dvh; display: grid; place-items: center;
  padding: calc(var(--st) + 24px) 18px calc(var(--sb) + 24px); background: var(--grad);
}
.login-glow {
  position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(600px 400px at 85% -10%, rgba(255, 255, 255, .25), transparent 60%),
    radial-gradient(520px 420px at -10% 110%, rgba(236, 72, 153, .35), transparent 60%);
}
.login-wrap { position: relative; width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: 22px; }
.login-brand { display: flex; flex-direction: column; align-items: center; gap: 8px; color: #fff; text-align: center; }
.login-logo { width: 64px; height: 64px; display: grid; place-items: center; border-radius: 20px; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .3); }
.login-brand h1 { font-size: 26px; font-weight: 800; }
.login-brand p { font-size: 14px; color: rgba(255, 255, 255, .8); }
.login-card { display: flex; flex-direction: column; gap: 14px; padding: 22px; border-radius: 26px; background: var(--surface); box-shadow: 0 30px 60px -20px rgba(20, 5, 60, .6); }
.login-card h2 { font-size: 20px; font-weight: 800; }
.login-hint { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); }

/* ---------- impressão pelo navegador ---------- */

#print-area { display: none; }
@media print {
  html, body { background: #fff !important; }
  body.imprimindo > *:not(#print-area) { display: none !important; }
  body.imprimindo #print-area { display: block; }
}

/* ---------- responsivo ---------- */

@media (max-width: 380px) {
  .hide-xs { display: none; }
  .topbar h1 { font-size: 22px; }
  .occ-num strong { font-size: 40px; }
  .sim-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .info-grid strong { font-size: 14px; }
}

@media (min-width: 480px) {
  .pay-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .team-nums { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (min-width: 640px) {
  .vlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* tablet: menu lateral compacto, sem barra inferior */
@media (min-width: 768px) {
  .tabbar, .fab { display: none; }
  .only-wide { display: inline-flex !important; }
  .rail {
    position: sticky; top: 0; z-index: 30; height: 100dvh; flex-shrink: 0;
    display: flex; flex-direction: column; gap: 16px; width: 96px; padding: 18px 10px;
    background: var(--surface); border-right: 1px solid var(--line);
  }
  .topbar { padding: calc(var(--st) + 22px) 28px 14px; }
  .topbar h1 { font-size: 28px; }
  .content { padding: 8px 28px 40px; gap: 18px; }
  .toolbar { flex-direction: row; align-items: center; }
  .toolbar .search { flex: 0 1 380px; }
  .toolbar .chips-scroll { flex: 1; min-width: 0; margin: 0; padding: 2px 0; }
  .chips-scroll { margin: 0; padding: 2px 0; }
  #toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; }
  .v-patio .vlist { padding-bottom: 0; }
  .mstats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .mstat-wide { grid-column: auto; display: block; }
  .mstat-wide strong { font-size: 20px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }

  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; max-height: 88dvh; border-radius: 26px; padding-bottom: 0; opacity: 0; transform: translateY(24px) scale(.98); transition: transform .22s, opacity .22s; }
  .sheet-wrap.open .sheet { opacity: 1; transform: none; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 16px; }
  .sheet-sm .sheet { max-width: 420px; }
}

@media (min-width: 1000px) {
  .cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
  .mlist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 18px; }
  .chart-card { grid-column: 1 / -1; }
}

/* PC / tablet deitado: menu lateral completo */
@media (min-width: 1180px) {
  .rail { width: 250px; padding: 22px 16px; }
  .brand { justify-content: flex-start; padding: 0 6px; }
  .brand-txt, .rail-user-txt { display: flex; }
  .rail-user { justify-content: flex-start; padding: 0 6px; }
  .rail-item { flex-direction: row; justify-content: flex-start; gap: 12px; padding: 10px 12px; font-size: 15px; text-align: left; }
  .rail-item .nav-ic { width: auto; height: auto; background: none !important; }
  .rail-item:hover { background: var(--surface-2); }
  .rail-item.on { background: var(--primary-soft); }
  .vlist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
