/* =====================================================================
   FREIRE FINANÇAS — design system
   Grafite industrial + laranja de segurança (cores do logo). Mobile-first.
   Princípio: poucos elementos, grandes, legíveis; cor sempre com texto.
   ===================================================================== */
:root {
  --font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  --bg: #f3f4f6; --surface: #ffffff; --surface-2: #f8f9fb; --surface-3: #eef0f3;
  --border: #e3e6ea; --border-strong: #c9ced6;
  --text: #15181b; --text-2: #4b545e; --text-3: #5d6671; --text-inverse: #ffffff;

  --brand: #15181b; --brand-2: #2a2f34;
  --accent: #ea580c; --accent-hover: #c2410c; --accent-soft: #fff1e8; --accent-text: #9a3412;

  --green: #16a34a; --green-soft: #e6f6ec; --green-text: #15803d;
  --red: #dc2626; --red-soft: #fdeaea; --red-text: #b91c1c;
  --yellow: #d97706; --yellow-soft: #fff5e0; --yellow-text: #92400e;
  --blue: #2563eb; --blue-soft: #e8efff; --blue-text: #1d4ed8;

  --radius-xl: 22px; --radius: 16px; --radius-sm: 12px; --radius-xs: 8px;
  --shadow-sm: 0 1px 2px rgba(21,24,27,.05);
  --shadow: 0 1px 2px rgba(21,24,27,.04), 0 6px 20px rgba(21,24,27,.06);
  --shadow-lg: 0 20px 60px rgba(21,24,27,.22);
  --ring: 0 0 0 3px rgba(234,88,12,.28);

  --nav-h: 64px; --top-h: 56px;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2,.8,.2,1); --dur: 220ms; --dur-fast: 150ms;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1113; --surface: #181b1f; --surface-2: #1f2328; --surface-3: #262b31;
    --border: #2a3036; --border-strong: #3a424a;
    --text: #f2f3f5; --text-2: #b7bec7; --text-3: #8d96a0;
    --brand: #f2f3f5; --brand-2: #262b31;
    --accent: #f97316; --accent-hover: #fb923c; --accent-soft: #3a2316; --accent-text: #fdba74;
    --green: #22c55e; --green-soft: #142a1c; --green-text: #4ade80;
    --red: #ef4444; --red-soft: #341818; --red-text: #fca5a5;
    --yellow: #f59e0b; --yellow-soft: #352a12; --yellow-text: #fcd34d;
    --blue: #3b82f6; --blue-soft: #16233a; --blue-text: #93c5fd;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
    --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1113; --surface: #181b1f; --surface-2: #1f2328; --surface-3: #262b31;
  --border: #2a3036; --border-strong: #3a424a;
  --text: #f2f3f5; --text-2: #b7bec7; --text-3: #8d96a0;
  --brand: #f2f3f5; --brand-2: #262b31;
  --accent: #f97316; --accent-hover: #fb923c; --accent-soft: #3a2316; --accent-text: #fdba74;
  --green: #22c55e; --green-soft: #142a1c; --green-text: #4ade80;
  --red: #ef4444; --red-soft: #341818; --red-text: #fca5a5;
  --yellow: #f59e0b; --yellow-soft: #352a12; --yellow-text: #fcd34d;
  --blue: #3b82f6; --blue-soft: #16233a; --blue-text: #93c5fd;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 20px rgba(0,0,0,.35);
  --shadow-lg: 0 20px 60px rgba(0,0,0,.6);
  color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* `hidden` tem que vencer qualquer display do design system (um .field escondido aparecia mesmo assim) */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; height: 100%; }
body { margin: 0; min-height: 100dvh; font-family: var(--font); font-size: clamp(15px, 4.1vw, 17px); line-height: 1.5; color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased; overscroll-behavior-y: none; touch-action: manipulation; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: clamp(19px, 5.6vw, 24px); font-weight: 800; letter-spacing: -.02em; line-height: 1.2; }
h2 { font-size: clamp(15px, 4.4vw, 18px); font-weight: 700; letter-spacing: -.01em; }
h3 { font-size: clamp(14px, 4vw, 16px); font-weight: 700; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; text-decoration: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--text-2); } .small { font-size: clamp(13px, 3.6vw, 14.5px); } .tiny { font-size: clamp(12px, 3.3vw, 13.5px); color: var(--text-3); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: none; box-shadow: var(--ring); }
svg.ic { width: 22px; height: 22px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 18px; height: 18px; } .ic-lg { width: 28px; height: 28px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ---------- shell ---------- */
.app { min-height: 100dvh; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(160%) blur(14px); -webkit-backdrop-filter: saturate(160%) blur(14px);
  padding: calc(var(--sat) + 10px) 16px 10px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: calc(var(--top-h) + var(--sat)); }
.topbar .title { flex: 1 1 auto; min-width: 0; }
.topbar .right { display: flex; align-items: center; gap: 2px; flex: none; margin-left: auto; }
.topbar .title h1 { font-size: clamp(18px, 5.2vw, 22px); overflow-wrap: normal; }
.topbar .title .sub { font-size: clamp(12px, 3.4vw, 13.5px); color: var(--text-3); margin-top: 1px; overflow-wrap: break-word; }
.icon-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--text-2); transition: background var(--dur-fast); flex: none; }
.icon-btn:active, .icon-btn:hover { background: var(--surface-3); }
.content { flex: 1; padding: 4px 16px calc(var(--nav-h) + var(--sab) + 92px); max-width: 720px; width: 100%; margin: 0 auto; }
@media (min-width: 900px) { .content { max-width: 860px; } }

/* ---------- bottom nav ---------- */
.bottom-nav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: grid; grid-template-columns: 1fr 1fr 84px 1fr 1fr; align-items: end;
  height: calc(var(--nav-h) + var(--sab)); padding-bottom: var(--sab); background: var(--surface); border-top: 1px solid var(--border); }
.bottom-nav a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; height: var(--nav-h); font-size: clamp(10.5px, 3vw, 12px); font-weight: 600; color: var(--text-3); transition: color var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.bottom-nav a.active { color: var(--accent); }
.bottom-nav a svg { width: 24px; height: 24px; }
.fab-slot { display: flex; justify-content: center; align-items: flex-end; height: var(--nav-h); }
.fab { width: 60px; height: 60px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; transform: translateY(-16px);
  box-shadow: 0 8px 24px rgba(234,88,12,.45), 0 2px 6px rgba(0,0,0,.2); transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); }
.fab svg { width: 30px; height: 30px; stroke-width: 2.4; }
.fab:active { transform: translateY(-16px) scale(.94); background: var(--accent-hover); }
@media (min-width: 900px) {
  .bottom-nav { left: 50%; transform: translateX(-50%); width: 560px; bottom: 16px; border-radius: 999px; border: 1px solid var(--border); box-shadow: var(--shadow-lg); padding-bottom: 0; height: var(--nav-h); }
}

/* ---------- cards & kpis ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.card.pad { padding: 16px; }
.section { margin-top: 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; gap: 10px; }
.section-head h2 { font-size: clamp(13px, 3.8vw, 15px); color: var(--text-2); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.section-head a, .section-head button { font-size: clamp(13px, 3.7vw, 14.5px); font-weight: 600; color: var(--accent-text); }

.hero { background: linear-gradient(160deg, #1b1f24 0%, #0f1113 100%); color: #fff; border-radius: var(--radius-xl); padding: 20px 20px 18px; position: relative; overflow: hidden; box-shadow: var(--shadow); }
.hero::after { content: ''; position: absolute; right: -60px; top: -70px; width: 220px; height: 220px; border-radius: 50%; background: radial-gradient(circle, rgba(249,115,22,.35), transparent 65%); pointer-events: none; }
.hero .label { font-size: clamp(11.5px, 3.3vw, 13.5px); color: rgba(255,255,255,.66); font-weight: 600; text-transform: uppercase; letter-spacing: .08em; }
.hero .big { font-size: clamp(32px, 9vw, 40px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin-top: 4px; }
.hero .big.neg { color: #fca5a5; }
.hero .row { display: flex; gap: 10px; margin-top: 16px; }
.hero .pill { flex: 1; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-sm); padding: 10px 12px; min-width: 0; }
.hero .pill .l { font-size: clamp(11px, 3.2vw, 12.5px); color: rgba(255,255,255,.6); display: flex; align-items: center; gap: 5px; }
.hero .pill .v { font-size: clamp(14px, 4.4vw, 18px); font-weight: 700; margin-top: 2px; overflow-wrap: break-word; }
.hero .pill.in .l { color: #86efac; } .hero .pill.out .l { color: #fdba74; }
.hero .accounts { display: flex; gap: 14px; margin-top: 14px; flex-wrap: wrap; font-size: clamp(12px, 3.4vw, 13.5px); color: rgba(255,255,255,.7); }
.hero .accounts b { color: #fff; font-weight: 700; }
.month-nav { display: flex; align-items: center; justify-content: center; gap: 4px; margin: 14px 0 6px; }
.month-nav b { min-width: 150px; text-align: center; font-size: clamp(15px, 4.2vw, 17px); }
.month-nav .icon-btn { width: 40px; height: 40px; }

.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.kpi .l { font-size: clamp(12px, 3.4vw, 13.5px); color: var(--text-2); font-weight: 600; display: flex; align-items: flex-start; gap: 6px; }
.kpi .dot { margin-top: .45em; }
.kpi .v { font-size: clamp(15px, 5vw, 21px); font-weight: 800; letter-spacing: -.02em; overflow-wrap: break-word; }
.kpi .h { font-size: clamp(11.5px, 3.2vw, 13px); color: var(--text-3); }
.kpi.red .v { color: var(--red-text); } .kpi.green .v { color: var(--green-text); } .kpi.yellow .v { color: var(--yellow-text); }
.kpi .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.kpi.red .dot { background: var(--red); } .kpi.green .dot { background: var(--green); } .kpi.yellow .dot { background: var(--yellow); }

/* progress bar (categoria vs teto) */
.bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; margin-top: 8px; }
.bar > i { display: block; height: 100%; background: var(--accent); border-radius: 99px; transition: width 400ms var(--ease); }
.bar.warn > i { background: var(--yellow); } .bar.over > i { background: var(--red); }

/* ---------- lists ---------- */
.list { display: flex; flex-direction: column; }
.day-head { font-size: clamp(11.5px, 3.2vw, 13px); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .06em; padding: 18px 4px 6px; display: flex; justify-content: space-between; }
.day-head:first-child { padding-top: 6px; }
.item { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; text-align: left; width: 100%;
  transition: transform var(--dur-fast) var(--ease), background var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.item:active { transform: scale(.985); background: var(--surface-2); }
.item .glyph { width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 20px; background: var(--surface-3); flex: none; }
.item.entrada .glyph { background: var(--green-soft); } .item.saida .glyph { background: var(--accent-soft); }
.item .body { flex: 1; min-width: 0; }
.item .t { font-weight: 600; font-size: clamp(14px, 4vw, 16px); overflow-wrap: break-word; }
.item .s { font-size: clamp(12px, 3.4vw, 13.5px); color: var(--text-3); overflow-wrap: break-word; margin-top: 1px; }
.item .amt { font-weight: 800; font-size: clamp(13.5px, 3.9vw, 16px); white-space: nowrap; letter-spacing: -.01em; text-align: right; flex: none; }
.item.entrada .amt { color: var(--green-text); } .item.saida .amt { color: var(--text); }
.item .amt small { display: block; font-size: clamp(10.5px, 3vw, 12px); font-weight: 600; color: var(--text-3); }
.item.pendente .amt small { color: var(--yellow-text); } .item.atrasado .amt small { color: var(--red-text); }
.item.pendente { border-style: dashed; }
.item.atrasado { border-color: color-mix(in srgb, var(--red) 45%, var(--border)); }
.item .chk { width: 44px; height: 44px; margin: -10px -8px -10px -4px; display: grid; place-items: center; border-radius: 50%; color: var(--text-3); flex: none; }
.item .chk:active { background: var(--surface-3); }
.item .chk.on { color: var(--green); }

.empty { text-align: center; padding: 34px 20px; color: var(--text-3); }
.empty svg { width: 44px; height: 44px; stroke-width: 1.5; margin-bottom: 8px; color: var(--text-3); }
.empty b { display: block; color: var(--text-2); font-size: clamp(15px, 4.2vw, 17px); margin-bottom: 3px; }

.cat-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.cat-row:last-child { border-bottom: 0; }
.cat-row .glyph { width: 36px; height: 36px; border-radius: 10px; background: var(--surface-3); display: grid; place-items: center; font-size: 17px; flex: none; }
.cat-row .body { flex: 1; min-width: 0; }
.cat-row .t { font-weight: 600; font-size: clamp(14px, 4vw, 16px); display: flex; justify-content: space-between; gap: 10px; overflow-wrap: break-word; }
.cat-row .t b { white-space: nowrap; }

/* ---------- chips / filters / tabs ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 4px 0 8px; scrollbar-width: none; -webkit-overflow-scrolling: touch; margin: 0 -16px; padding-left: 16px; padding-right: 16px; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex: none; height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); font-size: clamp(13px, 3.7vw, 14.5px); font-weight: 600; color: var(--text-2); display: inline-flex; align-items: center; gap: 6px; transition: all var(--dur-fast); white-space: nowrap; }
.chip.on { background: var(--brand); color: var(--bg); border-color: var(--brand); }
.chip:active { transform: scale(.96); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-3); border-radius: 14px; padding: 4px; gap: 4px; }
.seg button { height: 44px; border-radius: 11px; font-weight: 700; font-size: clamp(14px, 4vw, 16px); color: var(--text-2); transition: all var(--dur-fast) var(--ease); display: flex; align-items: center; justify-content: center; gap: 6px; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.seg button.on.saida { color: var(--accent-text); } .seg button.on.entrada { color: var(--green-text); }
.search { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 0 12px; height: 46px; margin-bottom: 10px; }
.search input { flex: 1; border: 0; background: none; height: 100%; min-width: 0; font-size: 16px; outline: none; }
.search svg { color: var(--text-3); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field label { font-size: clamp(12.5px, 3.6vw, 14px); font-weight: 600; color: var(--text-2); }
.field .help { font-size: 12.5px; color: var(--text-3); }
.field .err { font-size: 13px; color: var(--red-text); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; height: 50px; padding: 0 14px; border: 1px solid var(--border-strong); border-radius: 13px; background: var(--surface); font-size: 16px; outline: none; transition: border-color var(--dur-fast), box-shadow var(--dur-fast); -webkit-appearance: none; appearance: none; }
textarea.input { height: auto; min-height: 80px; padding: 12px 14px; resize: vertical; }
.input:focus { border-color: var(--accent); box-shadow: var(--ring); }
.input.invalid { border-color: var(--red); }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236b7480' stroke-width='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; padding-right: 40px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.amount-wrap { display: flex; align-items: baseline; justify-content: center; gap: 6px; padding: 10px 0 6px; }
.amount-wrap .cur { font-size: 22px; font-weight: 700; color: var(--text-3); }
.amount-wrap input { width: 100%; max-width: 280px; border: 0; background: none; font-size: clamp(38px, 11vw, 48px); font-weight: 800; letter-spacing: -.03em; text-align: left; outline: none; padding: 0; color: var(--text); min-width: 0; }
.amount-wrap input::placeholder { color: var(--border-strong); }
.amount-wrap.entrada input { color: var(--green-text); } .amount-wrap.saida input { color: var(--text); }
.cat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.cat-grid button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; border-radius: 14px; border: 1px solid var(--border); background: var(--surface); font-size: clamp(10.5px, 3.1vw, 12.5px); font-weight: 600; color: var(--text-2); line-height: 1.2; text-align: center; transition: all var(--dur-fast); min-height: 72px; }
.cat-grid button span.e { font-size: 24px; line-height: 1; }
.cat-grid button span.n { overflow-wrap: break-word; }
.cat-grid button.on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); box-shadow: inset 0 0 0 1px var(--accent); }
.cat-grid button:active { transform: scale(.95); }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; min-height: 48px; }
.toggle .l { font-weight: 600; font-size: clamp(14px, 4vw, 16px); } .toggle .h { font-size: clamp(11.5px, 3.3vw, 13px); color: var(--text-3); }
.switch { width: 52px; height: 32px; border-radius: 999px; background: var(--border-strong); position: relative; transition: background var(--dur-fast); flex: none; }
.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform var(--dur-fast) var(--ease); }
.switch.on { background: var(--green); } .switch.on::after { transform: translateX(20px); }
.disclosure { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 12px 0; font-weight: 600; color: var(--accent-text); font-size: 15px; min-height: 48px; }
.disclosure svg { transition: transform var(--dur) var(--ease); }
.disclosure[aria-expanded="true"] svg { transform: rotate(180deg); }
.photo-box { border: 1.5px dashed var(--border-strong); border-radius: 14px; padding: 14px; display: flex; align-items: center; gap: 12px; color: var(--text-2); font-weight: 600; cursor: pointer; min-height: 60px; }
.photo-box img { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; }
.photo-view { width: 100%; border-radius: 14px; display: block; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 20px; border-radius: 14px; font-weight: 700; font-size: clamp(15px, 4.2vw, 16.5px); transition: transform var(--dur-fast) var(--ease), background var(--dur-fast), opacity var(--dur-fast); -webkit-tap-highlight-color: transparent; text-align: center; }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(234,88,12,.3); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--brand); color: var(--bg); }
.btn-success { background: var(--green); color: #fff; }
.btn-secondary { background: var(--surface-3); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-danger { background: var(--red-soft); color: var(--red-text); }
.btn-block { width: 100%; }
.btn-sm { height: 40px; padding: 0 14px; font-size: 14px; border-radius: 11px; }
.btn .spin { width: 18px; height: 18px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.actions { display: flex; gap: 10px; margin-top: 16px; }
.actions .btn { flex: 1; }

/* ---------- sheet (modal de baixo) ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 50; display: flex; align-items: flex-end; justify-content: center; }
.sheet-wrap .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.5); animation: fade var(--dur) var(--ease); }
.sheet { position: relative; width: 100%; max-width: 640px; max-height: calc(100dvh - var(--sat) - 20px); background: var(--surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0; display: flex; flex-direction: column; animation: up 280ms var(--ease); box-shadow: var(--shadow-lg); }
@media (min-width: 900px) { .sheet-wrap { align-items: center; padding: 20px; } .sheet { border-radius: var(--radius-xl); max-height: calc(100dvh - 40px); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 99px; background: var(--border-strong); margin: 10px auto 0; }
.sheet .head { display: flex; align-items: center; gap: 8px; padding: 8px 10px 8px 20px; }
.sheet .head h2 { flex: 1; font-size: clamp(16px, 4.6vw, 19px); }
.sheet .bodyx { overflow-y: auto; padding: 4px 20px 20px; -webkit-overflow-scrolling: touch; }
.sheet .foot { padding: 12px 20px calc(var(--sab) + 14px); border-top: 1px solid var(--border); background: var(--surface); display: flex; gap: 10px; }
.sheet .foot .btn { flex: 1; }
.sheet.closing { animation: down 180ms ease-in forwards; } .sheet-wrap.closing .scrim { animation: unfade 180ms ease-in forwards; }
@keyframes up { from { transform: translateY(40px); opacity: 0; } } @keyframes down { to { transform: translateY(60px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } } @keyframes unfade { to { opacity: 0; } }

/* confirm dialog */
.dialog-wrap { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 20px; }
.dialog-wrap .scrim { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fade var(--dur); }
.dialog { position: relative; background: var(--surface); border-radius: var(--radius-xl); padding: 22px 20px 16px; width: 100%; max-width: 380px; box-shadow: var(--shadow-lg); animation: pop 200ms var(--ease); }
.dialog h3 { font-size: clamp(16px, 4.6vw, 19px); margin-bottom: 6px; } .dialog p { color: var(--text-2); font-size: clamp(14px, 3.9vw, 15.5px); }
@keyframes pop { from { transform: scale(.94); opacity: 0; } }

/* toast */
.toast { position: fixed; width: max-content; left: 50%; bottom: calc(var(--nav-h) + var(--sab) + 18px); transform: translateX(-50%); z-index: 70; background: var(--brand); color: var(--bg); padding: 12px 18px; border-radius: 22px; font-weight: 600; font-size: clamp(13.5px, 3.8vw, 15px); box-shadow: var(--shadow-lg); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 32px); animation: toastin 240ms var(--ease); }
.toast button { color: var(--accent); font-weight: 800; }
.toast.err { background: var(--red); color: #fff; }
@keyframes toastin { from { transform: translate(-50%, 16px); opacity: 0; } }

/* skeleton */
.sk { background: linear-gradient(90deg, var(--surface-3) 25%, var(--surface-2) 50%, var(--surface-3) 75%); background-size: 200% 100%; animation: sk 1.2s infinite; border-radius: 12px; }
@keyframes sk { to { background-position: -200% 0; } }

/* ---------- login ---------- */
.login { min-height: 100dvh; display: grid; place-items: center; padding: 24px; background: linear-gradient(160deg, #1b1f24, #0f1113); }
.login .box { width: 100%; max-width: 400px; background: var(--surface); border-radius: var(--radius-xl); padding: 28px 24px; box-shadow: var(--shadow-lg); }
.login .logo { display: block; max-width: 190px; margin: 0 auto 8px; }
.login .box p.sub { text-align: center; color: var(--text-3); font-size: clamp(13px, 3.7vw, 14.5px); margin-bottom: 22px; }
.login .fine { text-align: center; color: rgba(255,255,255,.45); font-size: 12.5px; margin-top: 18px; }

/* ---------- more page ---------- */
.menu { display: flex; flex-direction: column; }
.menu button, .menu a { display: flex; align-items: center; gap: 14px; padding: 14px 16px; min-height: 56px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 8px; width: 100%; text-align: left; font-weight: 600; font-size: clamp(14.5px, 4vw, 16px); transition: background var(--dur-fast); }
.menu button:active, .menu a:active { background: var(--surface-2); }
.menu .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; color: var(--text-2); flex: none; }
.menu .ico.accent { background: var(--accent-soft); color: var(--accent-text); }
.menu .lbl { flex: 1; min-width: 0; } .menu .lbl small { display: block; font-weight: 500; color: var(--text-3); font-size: clamp(11.5px, 3.3vw, 13px); }
.menu .chev { color: var(--text-3); }
.menu .danger { color: var(--red-text); }

/* ---------- report chart ---------- */
.chart { display: grid; grid-template-columns: repeat(12, 1fr); gap: 4px; align-items: end; height: 150px; padding-top: 10px; }
.chart .col { display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; gap: 2px; }
.chart .col .bars { display: flex; align-items: flex-end; gap: 2px; width: 100%; flex: 1; justify-content: center; }
.chart .col i { display: block; width: 45%; max-width: 14px; border-radius: 4px 4px 0 0; min-height: 2px; }
.chart .col i.in { background: var(--green); } .chart .col i.out { background: var(--accent); }
.chart .col span { font-size: clamp(9.5px, 2.8vw, 11px); color: var(--text-3); font-weight: 600; }
.legend { display: flex; gap: 14px; font-size: clamp(12px, 3.4vw, 13.5px); color: var(--text-2); margin-top: 8px; }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.table { width: 100%; border-collapse: collapse; font-size: clamp(13px, 3.7vw, 15px); }
.table th { text-align: left; font-size: 12px; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; padding: 8px 6px; border-bottom: 1px solid var(--border); }
.table td { padding: 10px 6px; border-bottom: 1px solid var(--border); }
.table td.r, .table th.r { text-align: right; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: clamp(11px, 3.2vw, 12.5px); font-weight: 700; }
.badge.green { background: var(--green-soft); color: var(--green-text); } .badge.red { background: var(--red-soft); color: var(--red-text); }
.badge.yellow { background: var(--yellow-soft); color: var(--yellow-text); } .badge.gray { background: var(--surface-3); color: var(--text-2); }

.offline { position: fixed; top: calc(var(--sat) + 8px); left: 50%; transform: translateX(-50%); z-index: 80; background: var(--yellow); color: #1a1a1a; padding: 6px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.install-banner { display: flex; align-items: center; gap: 12px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 30%, transparent); border-radius: var(--radius); padding: 12px 14px; margin-bottom: 14px; }
.install-banner .lbl { flex: 1; font-size: 14px; } .install-banner .lbl b { display: block; color: var(--accent-text); }
.fade-in { animation: fadein 260ms var(--ease); } @keyframes fadein { from { opacity: 0; transform: translateY(6px); } }

/* ---------- lançar por frase ---------- */
.frase { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 6px 6px 6px 14px; margin: 0 0 14px; box-shadow: var(--shadow-sm); }
.frase svg { color: var(--accent); }
.frase input { flex: 1; min-width: 0; border: 0; background: none; height: 40px; font-size: clamp(14px, 3.9vw, 16px); outline: none; }
.frase input::placeholder { color: var(--text-3); }

/* ---------- avisos ---------- */
.aviso { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); margin-bottom: 8px; font-size: clamp(13.5px, 3.8vw, 15px); line-height: 1.45; border: 1px solid transparent; }
.aviso svg { flex: none; margin-top: 1px; }
.aviso.yellow { background: var(--yellow-soft); color: var(--yellow-text); border-color: color-mix(in srgb, var(--yellow) 35%, transparent); }
.aviso.red { background: var(--red-soft); color: var(--red-text); border-color: color-mix(in srgb, var(--red) 35%, transparent); }

/* ---------- comprometido ---------- */
.comp-row { display: grid; grid-template-columns: 36px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; }
.comp-m { font-weight: 700; font-size: clamp(12.5px, 3.5vw, 14px); color: var(--text-2); }
.comp-bars { display: flex; flex-direction: column; gap: 4px; }
.comp-bars .bar { margin: 0; height: 7px; } .bar.green > i { background: var(--green); }
.comp-v { font-size: clamp(11.5px, 3.3vw, 13px); font-weight: 700; text-align: right; line-height: 1.3; }
.green-t { color: var(--green-text); }

/* ---------- calendário da agenda ---------- */
.cal { margin-top: 12px; padding: 10px 10px 8px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; padding: 0 2px 4px; }
.cal-head b { flex: 1; text-align: center; font-size: clamp(15px, 4.2vw, 17px); }
.cal-head .icon-btn { width: 40px; height: 40px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cal-wd { text-align: center; font-size: clamp(10.5px, 3vw, 12px); font-weight: 700; color: var(--text-3); padding: 4px 0 6px; }
.cal-cell { position: relative; aspect-ratio: 1; min-height: 40px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 600; font-size: clamp(13px, 3.7vw, 15px); color: var(--text); transition: background var(--dur-fast), transform var(--dur-fast); -webkit-tap-highlight-color: transparent; }
.cal-cell.pad { pointer-events: none; }
.cal-cell:active { transform: scale(.92); }
.cal-cell.passado { color: var(--text-3); }
.cal-cell.hoje .n { background: var(--brand); color: var(--bg); border-radius: 50%; width: 28px; height: 28px; display: grid; place-items: center; }
.cal-cell.sel { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); color: var(--accent-text); }
.cal-cell.atr .n { color: var(--red-text); }
.cal-cell .dots { display: flex; gap: 3px; height: 6px; }
.cal-cell .dots i, .cal-legend i { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.cal-cell .dots i.o, .cal-legend i.o { background: var(--accent); } .cal-cell .dots i.g, .cal-legend i.g { background: var(--green); } .cal-cell .dots i.r, .cal-legend i.r { background: var(--text-3); }
.cal-legend { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: clamp(11.5px, 3.2vw, 13px); color: var(--text-2); padding: 8px 4px 2px; }
.cal-legend i { margin-right: 5px; vertical-align: 1px; }
.cal-legend button { margin-left: auto; color: var(--accent-text); font-weight: 700; min-height: 32px; }

.empty .btn svg { width: 18px; height: 18px; margin: 0; color: inherit; }
.empty .actions { gap: 8px; }

.passos { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 12px; font-size: clamp(14.5px, 4vw, 16px); line-height: 1.5; }

/* ---------- equipamentos ---------- */
.cat-grp { display: flex; align-items: center; gap: 6px; font-size: clamp(12px, 3.4vw, 13px); font-weight: 700; color: var(--text-3); text-transform: uppercase; letter-spacing: .05em; margin: 10px 0 6px; }
.cat-grp:first-child { margin-top: 0; }
.equip-card { display: block; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; margin-bottom: 10px; box-shadow: var(--shadow-sm); transition: transform var(--dur-fast) var(--ease); }
.equip-card:active { transform: scale(.985); }
.eq-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.eq-name { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: clamp(15px, 4.2vw, 17px); }
.eq-res { font-size: clamp(12.5px, 3.5vw, 14px); font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.eq-res.pos { background: var(--green-soft); color: var(--green-text); } .eq-res.neg { background: var(--red-soft); color: var(--red-text); }
.eq-row { display: grid; grid-template-columns: 56px 1fr auto; gap: 10px; align-items: center; font-size: clamp(12.5px, 3.5vw, 14px); color: var(--text-2); padding: 3px 0; }
.eq-row .bar { margin: 0; } .eq-row b { color: var(--text); font-size: clamp(13px, 3.7vw, 14.5px); }

/* ---------- microfone (lançar por voz) ---------- */
.mic-btn { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); flex: none; transition: background var(--dur-fast), transform var(--dur-fast); }
.mic-btn:active { transform: scale(.93); }
.mic-btn.on { background: var(--red); color: #fff; animation: pulso 1.2s ease-in-out infinite; }
@keyframes pulso { 0%, 100% { box-shadow: 0 0 0 0 rgba(220,38,38,.45); } 50% { box-shadow: 0 0 0 10px rgba(220,38,38,0); } }
.frase { padding-left: 12px; gap: 6px; }

/* ---------- diárias do dia (lote) ---------- */
.atalho { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 12px 14px; margin: -4px 0 14px; box-shadow: var(--shadow-sm); min-height: 56px; transition: transform var(--dur-fast) var(--ease); }
.atalho:active { transform: scale(.985); }
.atalho > svg:first-child { color: var(--accent); }
.atalho span { flex: 1; min-width: 0; } .atalho b { display: block; font-size: clamp(14.5px, 4vw, 16px); }
.atalho small { display: block; color: var(--text-3); font-size: clamp(12px, 3.3vw, 13px); }
.lote-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.lote-nome { flex: 1; min-width: 0; } .lote-nome b { display: block; font-size: clamp(14.5px, 4vw, 16px); overflow-wrap: break-word; }
.lote-nome small { color: var(--text-3); font-size: clamp(12px, 3.3vw, 13px); }
.lote-sug { color: var(--accent-text); font-weight: 700; font-size: clamp(12px, 3.4vw, 13.5px); min-height: 28px; }
.lote-valor { display: flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 12px; padding: 0 12px; height: 48px; width: 46%; max-width: 180px; flex: none; background: var(--surface); }
.lote-valor:focus-within { border-color: var(--accent); box-shadow: var(--ring); }
.lote-valor span { color: var(--text-3); font-weight: 600; font-size: 14px; }
.lote-valor input { border: 0; background: none; outline: none; width: 100%; min-width: 0; font-size: 17px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.lote-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0 4px; font-weight: 600; color: var(--text-2); }
.lote-total b { font-size: clamp(19px, 5.4vw, 23px); color: var(--green-text); letter-spacing: -.02em; }

/* ---------- atividade da equipe ---------- */
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--brand); color: var(--bg); display: grid; place-items: center; font-weight: 800; font-size: 14px; flex: none; letter-spacing: .02em; }
.item.act { align-items: flex-start; }
.item.act .t { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 500; }
.item.act .s { margin-top: 3px; }
.item.act .s:first-of-type { color: var(--text-2); font-size: clamp(13.5px, 3.8vw, 15px); }

.cal-cell .dots i.m, .cal-legend i.m { background: var(--blue); }

/* ---------- frota agora (painel de operação) ---------- */
:root { --orange-soft: var(--accent-soft); --orange-text: var(--accent-text); }
.frota { padding: 14px; margin-bottom: 14px; }
.frota-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.frota-nums { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; margin-bottom: 10px; }
.frota-nums > div { border-radius: 14px; padding: 10px 8px; text-align: center; }
.frota-nums b { display: block; font-size: clamp(22px, 6.4vw, 28px); font-weight: 800; line-height: 1.1; letter-spacing: -.02em; }
.frota-nums span { font-size: clamp(11.5px, 3.2vw, 13px); font-weight: 600; }
.frota-nums .orange { background: var(--accent-soft); color: var(--accent-text); } .frota-nums .green { background: var(--green-soft); color: var(--green-text); }
.frota-nums .blue { background: var(--blue-soft); color: var(--blue-text); } .frota-nums .gray { background: var(--surface-3); color: var(--text-2); }
.frota-row { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; padding: 10px 2px; border-top: 1px solid var(--border); min-height: 56px; -webkit-tap-highlight-color: transparent; }
.frota-row:active { background: var(--surface-2); }
.frota-row.solo { border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; margin: 4px 0 12px; }
.frota-txt { flex: 1; min-width: 0; } .frota-txt b { display: block; font-size: clamp(14.5px, 4vw, 16px); overflow-wrap: break-word; }
.frota-txt small { display: block; font-size: clamp(12.5px, 3.5vw, 14px); color: var(--text-2); overflow-wrap: break-word; } .frota-txt small.quando { color: var(--text-3); font-size: clamp(11.5px, 3.2vw, 12.5px); }
.st-ico { width: 38px; height: 38px; border-radius: 11px; display: grid; place-items: center; flex: none; }
.st-badge { font-size: clamp(11.5px, 3.2vw, 12.5px); font-weight: 700; padding: 4px 10px; border-radius: 999px; white-space: nowrap; flex: none; }
.st-ico.green, .st-badge.green { background: var(--green-soft); color: var(--green-text); } .st-ico.orange, .st-badge.orange { background: var(--accent-soft); color: var(--accent-text); }
.st-ico.blue, .st-badge.blue { background: var(--blue-soft); color: var(--blue-text); } .st-ico.gray, .st-badge.gray { background: var(--surface-3); color: var(--text-2); }
.st-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.st-opt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; min-height: 86px; border-radius: 16px; border: 1.5px solid var(--border); background: var(--surface); font-weight: 700; font-size: clamp(13.5px, 3.8vw, 15px); color: var(--text-2); text-align: center; padding: 10px 8px; transition: all var(--dur-fast); }
.st-opt svg { width: 26px; height: 26px; }
.st-opt.on.green { border-color: var(--green); background: var(--green-soft); color: var(--green-text); } .st-opt.on.orange { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.st-opt.on.blue { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-text); } .st-opt.on.gray { border-color: var(--text-3); background: var(--surface-3); color: var(--text); }
.st-opt:active { transform: scale(.97); }

/* ---------- gastos em detalhe ---------- */
.card.pad-s { padding: 4px 14px; }
.g-row { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); min-height: 60px; -webkit-tap-highlight-color: transparent; }
.g-row:last-child { border-bottom: 0; } .g-row:active { opacity: .7; }
.g-row .glyph { width: 40px; height: 40px; border-radius: 12px; background: var(--surface-3); display: grid; place-items: center; font-size: 19px; flex: none; }
.g-row .body { flex: 1; min-width: 0; }
.g-row .t { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; font-size: clamp(14.5px, 4vw, 16px); overflow-wrap: break-word; }
.g-row .t b { white-space: nowrap; }
.g-sub { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; font-size: clamp(12.5px, 3.5vw, 13.5px); color: var(--text-3); margin-top: 2px; }
.g-sub .deve { color: var(--yellow-text); font-weight: 700; }
.delta { font-weight: 700; white-space: nowrap; }
.delta.up { color: var(--red-text); } .delta.down { color: var(--green-text); } .delta.flat { color: var(--text-3); font-weight: 600; }
.section-head h2 svg { vertical-align: -3px; }
.section-head > b { font-size: clamp(15px, 4.2vw, 17px); }
a.cat-row { color: inherit; }
.chart.seis { grid-template-columns: repeat(6, 1fr); height: 170px; gap: 8px; }
.chart.seis .col b { font-size: clamp(10.5px, 3vw, 12px); font-weight: 700; color: var(--text-2); }
.chart.seis .col .bars { flex-direction: column-reverse; align-items: center; justify-content: flex-start; gap: 0; }
.chart.seis .col i { width: 62%; max-width: 34px; border-radius: 0; min-height: 0; }
.chart.seis .col i.out { border-radius: 0 0 0 0; min-height: 2px; } .chart.seis .col i.pend { background: var(--yellow); border-radius: 5px 5px 0 0; }
.chart.seis .col i.out:last-child { border-radius: 5px 5px 0 0; }

/* ---------- caixa em detalhe ---------- */
.hero[role="link"] { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.hero[role="link"]:active { filter: brightness(1.15); }
.hero .label { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.hero-go { display: inline-flex; align-items: center; gap: 2px; text-transform: none; letter-spacing: 0; font-weight: 600; color: rgba(255,255,255,.75); font-size: clamp(11.5px, 3.3vw, 13px); position: relative; z-index: 1; }
.hero .pill { position: relative; z-index: 1; }
.conta-eq { padding: 6px 16px 12px; margin-top: 4px; }
.ce-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--border); font-size: clamp(14.5px, 4vw, 16px); }
.ce-row span { display: inline-flex; align-items: center; gap: 6px; color: var(--text-2); font-weight: 600; }
.ce-row b { font-size: clamp(15.5px, 4.4vw, 18px); white-space: nowrap; }
.ce-row.in b, .ce-row.in span { color: var(--green-text); } .ce-row.out span { color: var(--accent-text); }
.ce-row.fim { border-bottom: 0; border-top: 2px solid var(--text); margin-top: -1px; padding-top: 13px; }
.ce-row.fim span { color: var(--text); font-weight: 700; } .ce-row.fim b { font-size: clamp(20px, 5.8vw, 24px); letter-spacing: -.02em; } .ce-row.fim b.neg { color: var(--red-text); }
.sub-h { font-size: clamp(12px, 3.4vw, 13px); text-transform: uppercase; letter-spacing: .05em; color: var(--text-3); margin-bottom: 2px; }
.sub-h .tiny { text-transform: none; letter-spacing: 0; font-weight: 500; }
tr[data-href], tr[data-conta] { cursor: pointer; } tr[data-href]:active, tr[data-conta]:active { background: var(--surface-2); }

button.g-row { width: 100%; text-align: left; }
/* tabelas nunca estouram a tela: a coluna de texto quebra, os números ficam inteiros */
.table { table-layout: auto; } .table td:first-child { overflow-wrap: anywhere; word-break: normal; hyphens: auto; -webkit-hyphens: auto; } .card { max-width: 100%; }
.content { overflow-x: clip; }

.g-row .t { flex-wrap: wrap; } .g-row .t span { min-width: 0; }

.cat-grid button { min-width: 0; } .cat-grid button span.n { overflow-wrap: anywhere; hyphens: auto; max-width: 100%; }

/* ---------- perguntar ---------- */
.chips.pergs { align-items: center; margin-top: -8px; padding-bottom: 12px; }
.chips.pergs .tiny { flex: none; font-weight: 700; }
.chips.pergs .chip { height: 34px; font-size: clamp(12.5px, 3.5vw, 13.5px); padding: 0 12px; font-weight: 500; }
.resp-num { font-size: clamp(34px, 10vw, 44px); font-weight: 800; letter-spacing: -.03em; line-height: 1.1; margin: 10px 0 6px; overflow-wrap: anywhere; }
.resp-frase { font-size: clamp(15.5px, 4.3vw, 17px); font-weight: 600; margin-bottom: 8px; }

/* ---------- texto e número em tela estreita ---------- */
/* palavra comprida quebra na sílaba, com hífen (o html é pt-BR); número não quebra: UI.fit encolhe a fonte */
.item .t, .item .s, .g-row .t span, .cat-row .t span, .frota-txt b, .frota-txt small, .lote-nome b, .menu .lbl, .cat-grid button span.n, .topbar .title h1, .kpi .l, .kpi .h { hyphens: auto; -webkit-hyphens: auto; }
.kpi .v, .hero .big, .hero .pill .v, .ce-row b, .resp-num, .table td.r, .item .amt, .g-row .t b, .cat-row .t b { white-space: nowrap; overflow: hidden; overflow-wrap: normal; }
.kpi { min-width: 0; } .kpi .v { max-width: 100%; }
.g-row .t { flex-wrap: nowrap; align-items: baseline; } .g-row .t span { flex: 1; min-width: 0; overflow-wrap: break-word; } .g-row .t b { flex: none; max-width: 58%; }
.cat-row .t span { flex: 1; min-width: 0; overflow-wrap: break-word; } .cat-row .t b { flex: none; max-width: 58%; }
.item .amt { max-width: 46%; } .item .amt small { white-space: nowrap; }
.table td.r { max-width: 44vw; }
.cat-grid button span.n { overflow-wrap: break-word; }
@media (max-width: 345px) { .cat-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } .content { padding-left: 12px; padding-right: 12px; } .topbar { padding-left: 12px; padding-right: 12px; } }

/* Início: bloco de ações (frase, perguntas, diárias, frota) logo abaixo do financeiro */
.acoes-inicio { margin-top: 18px; }

/* cabeçalho fixo cobre a tela de ponta a ponta (as fileiras de botões que rolam por baixo não escapam pelos lados) */
.topbar { margin-left: -16px; margin-right: -16px; }
@media (max-width: 345px) { .topbar { margin-left: -12px; margin-right: -12px; } }

/* acessos bloqueados: recolhidos */
.bloq { margin-top: 8px; } .bloq summary { min-height: 44px; display: flex; align-items: center; font-weight: 600; color: var(--text-2); cursor: pointer; font-size: clamp(13.5px, 3.8vw, 15px); } .bloq[open] summary { margin-bottom: 6px; }

/* ---------- alvos de toque: mínimo 44 px (auditoria 01/10) ---------- */
.chips.pergs .chip { height: 44px; }
.section-head { align-items: center; }
.section-head a, .section-head button { display: inline-flex; align-items: center; justify-content: flex-end; min-height: 44px; min-width: 44px; padding: 0 2px; margin: -10px -2px; }
.cal-legend button { min-height: 44px; padding: 0 4px; margin: -6px -4px -6px auto; }
.lote-sug { min-height: 44px; display: inline-flex; align-items: center; }
.month-nav .icon-btn, .cal-head .icon-btn { width: 44px; height: 44px; }
.toast button { min-height: 44px; padding: 0 6px; margin: -10px -6px; }
.disclosure, .bloq summary { min-height: 48px; }
.chip { height: 44px; }
.frase input { height: 44px; }
.lote-valor input { height: 100%; align-self: stretch; }
.search { height: 48px; }
/* o interruptor continua do mesmo tamanho; a área de toque cresce para 44 px */
.switch::before { content: ''; position: absolute; inset: -6px -4px; }
