/* =====================================================================
   Financeiro do Vendedor — estilos
   ===================================================================== */
:root {
  --bg: #050505;
  --surface: #0c0e0d;
  --surface-2: #121514;
  --surface-3: #1a1e1c;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --text: #f1f4f2;
  --text-2: #a9b1ac;
  --text-3: #707873;
  --accent: #31ff72;
  --accent-ink: #03140a;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 28%, transparent);
  --danger: #ff5d5d;
  --warn: #ffb547;
  --info: #5ab8ff;
  --r-xl: 22px;
  --r-lg: 18px;
  --r: 14px;
  --r-sm: 10px;
  --sat: env(safe-area-inset-top, 0px);
  --sab: env(safe-area-inset-bottom, 0px);
  --sal: env(safe-area-inset-left, 0px);
  --sar: env(safe-area-inset-right, 0px);
  --tabbar-h: 64px;
  --gutter: 16px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Sora', 'Manrope', system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0; min-height: 100dvh; background: var(--bg); color: var(--text);
  font: 500 15px/1.45 var(--font); -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent; overflow-x: hidden;
}
body.no-scroll { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); text-decoration: none; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
.ic { flex: none; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }
.muted { color: var(--text-2); }
.small { font-size: 13px; }
.center { text-align: center; }
.pad { padding: 12px 4px; }
.pos { color: var(--accent); }
.neg, .txt-danger { color: var(--danger); }
.warn { color: var(--warn); }
.strike { text-decoration: line-through; opacity: 0.6; }
.amount, .stat-value, .hero-value, .big-num, .proj-value, .inv-total, .result-value, .pl-value, .goal-value { font-variant-numeric: tabular-nums; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ------------------------------------------------------------------ boot */
.boot { min-height: 100dvh; display: grid; place-items: center; }
.boot-mark { width: 36px; height: 36px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--accent); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------------ estrutura */
.app-shell { min-height: 100dvh; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  padding-top: var(--sat);
  background: rgba(5, 5, 5, 0.86);
  -webkit-backdrop-filter: saturate(140%) blur(14px); backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid transparent;
}
.topbar-inner {
  min-height: 60px; display: flex; align-items: center; gap: 6px;
  padding: 6px calc(var(--gutter) + var(--sar)) 6px calc(var(--gutter) + var(--sal));
  max-width: 1180px; margin: 0 auto;
}
.back-btn { margin-left: -10px; }
.topbar-title { flex: 1; min-width: 0; }
.topbar-title h1 { font-size: 21px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-actions { display: flex; align-items: center; gap: 6px; flex: none; }
.hello { display: flex; flex-direction: column; }
.hello-app { font-size: 12px; color: var(--text-3); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hello h1 { font-size: 21px; }

.content { outline: none; overflow-x: clip; }
.page {
  max-width: 1180px; margin: 0 auto;
  padding: 8px calc(var(--gutter) + var(--sar)) calc(var(--tabbar-h) + var(--sab) + 28px) calc(var(--gutter) + var(--sal));
  display: flex; flex-direction: column; gap: 14px;
}
.page > * { min-width: 0; }

.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--tabbar-h) + var(--sab)); padding: 0 var(--sar) var(--sab) var(--sal);
  background: rgba(8, 9, 8, 0.94);
  -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;
  color: var(--text-3); font-size: 11px; font-weight: 600; position: relative; min-width: 0;
}
.tab .ic { width: 22px; height: 22px; }
.tab::before {
  content: ''; position: absolute; top: 8px; width: 46px; height: 28px; border-radius: 999px;
  background: transparent; transition: background 0.2s;
}
.tab > * { position: relative; }
.tab.active { color: var(--accent); }
.tab.active::before { background: var(--accent-soft); }

.sidebar { display: none; }
.offline-bar {
  position: fixed; left: 50%; transform: translateX(-50%); z-index: 45;
  bottom: calc(var(--tabbar-h) + var(--sab) + 10px);
  display: flex; gap: 8px; align-items: center; padding: 8px 14px; border-radius: 999px;
  background: #2a1d0b; color: var(--warn); border: 1px solid rgba(255, 181, 71, 0.3); font-size: 13px;
  max-width: calc(100% - 32px);
}

@media (min-width: 1024px) {
  .sidebar {
    display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0; width: 252px; z-index: 35;
    padding: calc(20px + var(--sat)) 14px 18px; border-right: 1px solid var(--line); background: #070807;
  }
  .brand { display: flex; align-items: center; gap: 10px; padding: 4px 10px 22px; }
  .brand-name { font-family: var(--display); font-weight: 600; font-size: 15px; line-height: 1.2; }
  .side-nav { display: flex; flex-direction: column; gap: 2px; }
  .side-link {
    display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 12px;
    color: var(--text-2); font-weight: 600;
  }
  .side-link:hover { background: var(--surface-2); color: var(--text); }
  .side-link.active { background: var(--accent-soft); color: var(--accent); }
  .side-logout { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 11px 12px; color: var(--text-3); border-radius: 12px; font-weight: 600; }
  .side-logout:hover { background: var(--surface-2); color: var(--text); }
  .main-col { margin-left: 252px; }
  .tabbar { display: none; }
  .page { padding-bottom: 48px; padding-left: 32px; padding-right: 32px; }
  .topbar-inner { padding-left: 32px; padding-right: 32px; }
  .offline-bar { bottom: 20px; }
  .fab, .fab-space { display: none !important; }
}
@media (max-width: 1023px) { .hide-mobile { display: none !important; } }

.brand-mark {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: var(--accent); color: var(--accent-ink);
}

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: 14px; font-weight: 700; font-size: 15px;
  border: 1px solid transparent; transition: background 0.15s, border-color 0.15s, transform 0.1s; white-space: nowrap;
}
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.6; pointer-events: none; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface-2); border-color: var(--line-2); color: var(--text); }
.btn-ghost:hover { background: var(--surface-3); }
.btn-quiet { color: var(--text-2); background: transparent; }
.btn-quiet:hover { color: var(--text); background: var(--surface-2); }
.btn-danger { background: rgba(255, 93, 93, 0.12); color: var(--danger); border-color: rgba(255, 93, 93, 0.3); }
.btn-block { width: 100%; }
.btn-lg { min-height: 54px; font-size: 16px; border-radius: 16px; }
.btn-sm { min-height: 38px; padding: 0 12px; font-size: 14px; border-radius: 12px; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 12px; display: inline-grid; place-items: center; flex: none;
  color: var(--text-2); position: relative;
}
.icon-btn:hover { background: var(--surface-2); color: var(--text); }
.link-btn { color: var(--accent); font-weight: 700; font-size: 14px; display: inline-flex; gap: 6px; align-items: center; padding: 6px 2px; }
.link-btn.center { align-self: center; margin-top: 8px; }
.plain { display: block; width: 100%; text-align: left; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid currentColor; border-right-color: transparent; animation: spin 0.7s linear infinite; }

.fab {
  position: fixed; z-index: 25; right: calc(18px + var(--sar)); bottom: calc(var(--tabbar-h) + var(--sab) + 16px);
  width: 58px; height: 58px; border-radius: 18px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(255, 255, 255, 0.04);
}
.fab-space { height: 84px; }

/* ------------------------------------------------------------------ painéis */
.panel {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 16px;
}
.panel-head { display: flex; align-items: center; justify-content: space-between; color: var(--text-2); }
.panel-head h2 { font-size: 15px; color: var(--text-2); font-family: var(--font); font-weight: 700; }
.card-tap { cursor: pointer; text-align: left; transition: border-color 0.15s, background 0.15s; width: 100%; }
.card-tap:hover { border-color: var(--line-2); }
.card-tap:active { background: var(--surface-2); }
.sec-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 2px 2px 8px; min-height: 40px; }
.sec-head h2 { font-size: 16px; }
.sec-link { display: inline-flex; align-items: center; gap: 2px; font-size: 14px; font-weight: 700; color: var(--accent); padding: 8px 0 8px 8px; }
.list-panel { padding: 12px 8px 6px; }
.list-panel .sec-head { padding: 0 8px 4px; }
.list-panel .pad { padding: 4px 8px 14px; }
.group-title { font-size: 13px; color: var(--text-3); font-family: var(--font); font-weight: 700; padding: 10px 4px 0; }

/* ------------------------------------------------------------------ início */
.dash { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl); padding: 18px 18px 16px;
  background:
    radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--accent) 10%, transparent) 0%, transparent 45%),
    var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--line));
}
.hero-top { display: flex; align-items: center; justify-content: space-between; margin: -6px -8px 0 0; }
.hero-label { font-weight: 700; color: var(--text-2); font-size: 14px; }
.hero-value { font-family: var(--display); font-weight: 600; font-size: clamp(32px, 9.5vw, 44px); letter-spacing: -0.02em; line-height: 1.1; margin: 4px 0 10px; overflow-wrap: anywhere; }
.hero-value.neg { color: var(--danger); }
.hero-foot { display: flex; justify-content: space-between; align-items: center; color: var(--text-3); font-size: 13px; font-weight: 600; }

.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.qa {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 12px 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); text-align: left; font-weight: 700; font-size: 14.5px; line-height: 1.25;
}
.qa:hover { border-color: var(--accent-line); }
.qa:active { background: var(--surface-2); }
.qa-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--text); }
.qa-ic.pos { background: var(--accent-soft); color: var(--accent); }
.qa-ic.neg { background: rgba(255, 107, 107, 0.12); color: #ff8a8a; }
.qa > span:last-child::before { content: '+ '; color: var(--accent); }

.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); min-width: 0; text-align: left;
}
.stat-label { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 13px; font-weight: 600; line-height: 1.25; }
.stat-label .ic { color: var(--text-3); }
.stat-value { font-family: var(--display); font-size: clamp(15px, 4.6vw, 19px); font-weight: 600; overflow-wrap: normal; line-height: 1.2; }
.stat-value.sm { font-size: 16px; }
.stat-sub { font-size: 12.5px; color: var(--text-3); font-weight: 600; }

.projection .proj-value { font-family: var(--display); font-size: 28px; font-weight: 600; margin: 8px 0 4px; }
.proj-lines { margin: 12px 0 0; display: grid; gap: 0; }
.proj-lines div { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.proj-lines dt { color: var(--text-2); }
.proj-lines dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.proj-lines .hl dt { color: var(--text); font-weight: 700; }

.goal-row { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 10px; flex-wrap: wrap; }
.goal-value { font-family: var(--display); font-size: 24px; font-weight: 600; }
.goal p { margin-top: 8px; }
.goal .btn { margin-top: 12px; }

.alerts { display: flex; flex-direction: column; gap: 8px; }
.alert-item {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--r); text-align: left;
  font-weight: 600; font-size: 14px; border: 1px solid; min-height: 48px;
}
.alert-item span { flex: 1; }
.alert-item.warn { background: rgba(255, 181, 71, 0.08); border-color: rgba(255, 181, 71, 0.25); color: #ffd08a; }
.alert-item.danger { background: rgba(255, 93, 93, 0.08); border-color: rgba(255, 93, 93, 0.28); color: #ff9a9a; }
.alert-item.info { background: rgba(96, 165, 250, 0.08); border-color: rgba(96, 165, 250, 0.25); color: #a8cbff; }
.alert-item.ok { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent); }

.onboarding h2 { font-size: 18px; margin-bottom: 4px; }
.steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.steps li { display: flex; align-items: center; gap: 12px; padding: 12px; background: var(--surface-2); border-radius: var(--r); }
.steps li > div { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.steps li span:not(.step-n) { color: var(--text-2); font-size: 13px; }
.step-n { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font-weight: 700; font-size: 13px; flex: none; }

@media (min-width: 760px) {
  .quick { grid-template-columns: repeat(4, 1fr); }
  .stats { grid-template-columns: repeat(4, 1fr); }
}
@media (min-width: 1024px) {
  .dash { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
  .dash > * { grid-column: span 12; }
  .dash > .hero { grid-column: span 5; }
  .dash > .quick { grid-column: span 7; grid-template-columns: 1fr 1fr; }
  .dash > .projection, .dash > .goal { grid-column: span 6; }
  .dash > .list-panel { grid-column: span 6; }
  .dash > .list-panel.recent { grid-column: span 12; }
  .qa { min-height: 72px; }
}

/* ------------------------------------------------------------------ listas */
.rows { list-style: none; margin: 0; padding: 0; }
.rows.panel { padding: 4px 6px; }
.row { display: flex; align-items: center; gap: 2px; border-top: 1px solid var(--line); }
.rows > .row:first-child, .rows > .row-date + .row { border-top: 0; }
.row.dim { opacity: 0.55; }
.row-main {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 6px; text-align: left; border-radius: 12px; min-height: 60px;
}
.row-main:hover { background: rgba(255, 255, 255, 0.02); }
.row-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.row-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; align-items: center; gap: 6px; }
.row-title .flag { color: var(--text-3); }
.row-sub { color: var(--text-2); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-end { display: flex; flex-direction: column; align-items: flex-end; gap: 3px; flex: none; max-width: 48%; }
.amount { font-weight: 700; font-size: 15px; white-space: nowrap; }
.amount.neutral { color: var(--text-2); }
.row .dots { width: 40px; height: 44px; color: var(--text-3); }
.row-date { padding: 12px 8px 2px; font-size: 12.5px; font-weight: 700; color: var(--text-3); }
.tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-3); border: 1px solid var(--line-2); border-radius: 999px; padding: 1px 7px; }

.cat-chip {
  border-radius: 13px; display: grid; place-items: center; flex: none;
  color: var(--c); background: color-mix(in srgb, var(--c) 15%, transparent);
}

.badge {
  display: inline-flex; align-items: center; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700;
  background: var(--surface-3); color: var(--text-2); white-space: nowrap;
}
.badge.ok { background: var(--accent-soft); color: var(--accent); }
.badge.warn { background: rgba(255, 181, 71, 0.12); color: var(--warn); }
.badge.danger { background: rgba(255, 93, 93, 0.12); color: var(--danger); }
.badge.info { background: rgba(90, 184, 255, 0.12); color: var(--info); }
.badge.muted { color: var(--text-3); }

.empty { text-align: center; padding: 36px 20px; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.empty-ic { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); border: 1px solid var(--line); margin-bottom: 4px; }
.empty h3 { font-size: 18px; }
.empty p { color: var(--text-2); max-width: 380px; }
.empty .btn { margin-top: 8px; }

.skel-wrap { display: grid; gap: 12px; }
.skel { height: 84px; border-radius: var(--r-lg); background: linear-gradient(90deg, var(--surface) 0%, var(--surface-2) 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.3s infinite; }
.skel:first-child { height: 140px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------ chips, filtros */
.chips { display: flex; gap: 8px; }
.chips.wrap { flex-wrap: wrap; }
.chips.scroll {
  overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter);
  -webkit-overflow-scrolling: touch; scroll-padding: var(--gutter);
}
.chips.scroll::-webkit-scrollbar { display: none; }
@media (min-width: 1024px) { .chips.scroll { margin: 0; padding: 2px 0; flex-wrap: wrap; } }
.chip {
  flex: none; min-height: 40px; padding: 0 15px; border-radius: 999px; font-weight: 700; font-size: 14px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text-2); display: inline-flex; align-items: center; gap: 6px;
}
.chip.sm { min-height: 36px; font-size: 13.5px; padding: 0 13px; }
.chip.active { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip.removable { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }

.search-bar { display: flex; gap: 8px; align-items: center; }
.search {
  flex: 1; display: flex; align-items: center; gap: 10px; height: 48px; padding: 0 14px; border-radius: 14px;
  background: var(--surface); border: 1px solid var(--line-2); color: var(--text-3); min-width: 0;
}
.search input { flex: 1; min-width: 0; background: none; border: 0; outline: none; font-size: 16px; color: var(--text); }
.search:focus-within { border-color: var(--accent-line); }
.filter-btn { border: 1px solid var(--line-2); background: var(--surface); height: 48px; width: 48px; border-radius: 14px; }
.filter-btn.on { color: var(--accent); border-color: var(--accent-line); }
.filter-btn i { position: absolute; top: 6px; right: 6px; min-width: 16px; height: 16px; border-radius: 8px; background: var(--accent); color: var(--accent-ink); font-size: 10px; font-style: normal; font-weight: 800; display: grid; place-items: center; }
.active-filters { align-items: center; }

.summary-strip {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
}
.summary-strip.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary-strip div { padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.summary-strip div + div { border-left: 1px solid var(--line); }
.summary-strip span { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.summary-strip b { font-family: var(--display); font-weight: 600; font-size: clamp(13px, 3.9vw, 16px); overflow-wrap: normal; font-variant-numeric: tabular-nums; }

.day-group { display: flex; flex-direction: column; gap: 6px; }
.day-head { display: flex; justify-content: space-between; font-family: var(--font); font-size: 13px; font-weight: 700; color: var(--text-3); padding: 4px 4px 0; }

/* ------------------------------------------------------------------ formulários */
.form, .tx-fields, .sub-fields, .received-block:not(:empty), .rate-field { display: flex; flex-direction: column; gap: 16px; }
.received-block:empty, .commission-result:empty { display: none; }
.form-intro { color: var(--text-2); font-size: 14px; background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.form-section { font-size: 14px; color: var(--text-3); font-family: var(--font); font-weight: 700; margin-top: 4px; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field-label { font-size: 13.5px; font-weight: 700; color: var(--text-2); }
.field-label em { font-style: normal; font-weight: 500; color: var(--text-3); }
.field-hint { font-size: 12.5px; color: var(--text-3); line-height: 1.4; }
.field-hint.block { display: flex; gap: 6px; align-items: flex-start; }
.field-hint.block .ic { margin-top: 1px; }
.field-hint.warn { color: var(--warn); }
.field-error { font-size: 13px; color: var(--danger); font-weight: 600; }
.has-error .input, .has-error .money-wrap, .has-error .segmented { border-color: rgba(255, 93, 93, 0.6) !important; }
.input {
  width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; font-size: 16px;
  background: var(--surface-2); border: 1px solid var(--line-2); color: var(--text); outline: none; appearance: none; -webkit-appearance: none;
}
.input:focus { border-color: var(--accent-line); background: var(--surface-3); }
.input:disabled { opacity: 0.6; }
.input::placeholder { color: var(--text-3); }
textarea.input { resize: vertical; min-height: 84px; }
input[type='date'].input, input[type='time'].input { min-height: 50px; color-scheme: dark; }
input[type='date'].input::-webkit-date-and-time-value { text-align: left; }
.file-input { padding: 11px 12px; font-size: 14px; }
.file-input::file-selector-button { margin-right: 10px; border: 0; border-radius: 10px; padding: 8px 12px; background: var(--surface-3); color: var(--text); font-weight: 700; }
.select-wrap { position: relative; }
.select-wrap select { padding-right: 40px; }
.select-caret { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text-3); }
.money-wrap { display: flex; align-items: center; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding-left: 14px; }
.money-wrap:focus-within { border-color: var(--accent-line); }
.money-wrap .input { border: 0; background: none; padding-left: 8px; }
.money-prefix { color: var(--text-3); font-weight: 700; }
.field-money-big .money-wrap { padding: 4px 4px 4px 16px; border-radius: 18px; }
.field-money-big .input { font-family: var(--display); font-size: 30px; font-weight: 600; min-height: 60px; }
.field-money-big .money-prefix { font-size: 18px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.suffix-wrap { display: flex; align-items: center; gap: 10px; }
.suffix-wrap .input { max-width: 120px; }
.suffix-wrap span { color: var(--text-2); font-weight: 600; }
.check-row { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); min-height: 44px; }
.check-row input, .check-inline input { width: 20px; height: 20px; accent-color: var(--accent); }
.check-inline { display: inline-flex; gap: 6px; align-items: center; margin-left: 12px; }
.attach-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }

.segmented { display: flex; background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 14px; padding: 4px; gap: 4px; }
.seg { flex: 1; position: relative; min-width: 0; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-height: 42px; padding: 4px 6px; border-radius: 10px; font-weight: 700; font-size: 13.5px; color: var(--text-2); line-height: 1.2; }
.seg input:checked + span { background: var(--surface); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.seg input:checked + span { color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); }
.segmented.compact { display: inline-flex; }
.segmented.compact .seg span { padding: 4px 16px; }
.seg-row { display: flex; }

.chip-radio { position: relative; }
.chip-radio input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.chip-radio span { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--surface-2); font-weight: 700; font-size: 14px; color: var(--text-2); }
.chip-radio input:checked + span { background: var(--accent-soft); color: var(--accent); border-color: var(--accent-line); }
.chip-radio input:focus-visible + span { outline: 2px solid var(--accent); }

.type-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: -4px -16px 0; padding: 0 16px 4px; }
.type-tabs::-webkit-scrollbar { display: none; }
.type-tab { flex: none; min-height: 38px; padding: 0 14px; border-radius: 999px; font-weight: 700; font-size: 14px; color: var(--text-2); border: 1px solid var(--line-2); }
.type-tab.active { background: var(--text); color: var(--bg); border-color: var(--text); }

.swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.swatch { position: relative; }
.swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.swatch span { display: block; width: 36px; height: 36px; border-radius: 50%; background: var(--sw); border: 2px solid rgba(255, 255, 255, 0.12); }
.swatch input:checked + span { box-shadow: 0 0 0 3px var(--bg), 0 0 0 5px var(--text); }
.accent-list { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.accent-opt { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line-2); font-weight: 600; font-size: 14px; cursor: pointer; }
.accent-opt input { position: absolute; opacity: 0; }
.accent-opt span { width: 22px; height: 22px; border-radius: 50%; background: var(--sw); flex: none; }
.accent-opt:has(input:checked) { border-color: var(--text); }

.inline-note { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--line-2); color: var(--text-2); font-size: 14px; }
.inline-note span { flex: 1; min-width: 160px; }
.installment-preview { background: var(--accent-soft); color: var(--text); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.installment-preview b { color: var(--accent); }
.calc-box { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--line-2); }
.calc-box span { color: var(--text-2); font-weight: 600; font-size: 14px; }
.calc-box b { font-family: var(--display); font-size: 20px; color: var(--accent); }
.calc-box.big { flex-direction: column; align-items: flex-start; }
.calc-box.big b { font-size: 30px; }
.sub-block { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 16px; border: 1px solid var(--accent-line); background: color-mix(in srgb, var(--accent) 4%, transparent); }
.form-msg { color: var(--danger); font-size: 14px; font-weight: 600; }
.form-msg.ok { color: var(--accent); }
.foot-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 10px; }
.custom-range .field-label { font-size: 12.5px; }

/* ------------------------------------------------------------------ camadas (sheets, diálogos, menus) */
.layer { position: fixed; inset: 0; z-index: 100; display: flex; }
.layer-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.66); opacity: 0; transition: opacity 0.18s; }
.layer.in .layer-backdrop { opacity: 1; }
.sheet-layer, .menu-layer { align-items: flex-end; justify-content: center; }
.sheet {
  position: relative; width: 100%; max-height: calc(100dvh - var(--sat) - 10px); display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0;
  transform: translateY(24px); opacity: 0; transition: transform 0.2s ease, opacity 0.2s ease;
}
.layer.in .sheet { transform: none; opacity: 1; }
.layer.out .sheet, .layer.out .dialog, .layer.out .action-menu { opacity: 0; transform: translateY(16px); }
.sheet-head { display: flex; align-items: center; gap: 6px; padding: 10px 10px 6px 8px; border-bottom: 1px solid var(--line); flex: none; }
.sheet-head::before { content: ''; position: absolute; top: 6px; left: 50%; width: 40px; height: 4px; margin-left: -20px; border-radius: 4px; background: var(--line-2); }
.sheet-title { flex: 1; font-size: 17px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-top: 4px; }
.sheet-close { padding-top: 4px; }
.sheet-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px 16px 20px; -webkit-overflow-scrolling: touch; }
.sheet-foot { flex: none; padding: 12px 16px calc(12px + var(--sab)); border-top: 1px solid var(--line); background: var(--surface); }
@media (min-width: 700px) {
  .sheet-layer { align-items: center; padding: 24px; }
  .sheet { max-width: 560px; max-height: min(88vh, 900px); border-radius: 24px; border-bottom: 1px solid var(--line-2); }
  .sheet-head::before { display: none; }
  .sheet-foot { padding-bottom: 14px; border-radius: 0 0 24px 24px; }
}

.dialog-layer { align-items: center; justify-content: center; padding: 20px; }
.dialog {
  position: relative; width: 100%; max-width: 420px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 22px; padding: 22px 18px 14px;
  transform: scale(0.97); opacity: 0; transition: transform 0.16s ease, opacity 0.16s ease; max-height: calc(100dvh - 40px - var(--sat)); overflow-y: auto;
}
.layer.in .dialog { transform: none; opacity: 1; }
.dialog-title { font-size: 18px; margin-bottom: 8px; }
.dialog-msg { color: var(--text-2); font-size: 14.5px; display: flex; flex-direction: column; gap: 8px; }
.dialog-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; }

.action-menu {
  position: relative; width: 100%; background: var(--surface); border: 1px solid var(--line-2); border-bottom: 0; border-radius: 24px 24px 0 0;
  padding: 10px 10px calc(10px + var(--sab)); transform: translateY(20px); opacity: 0; transition: transform 0.18s ease, opacity 0.18s ease;
  max-height: calc(100dvh - var(--sat) - 10px); overflow-y: auto;
}
.layer.in .action-menu { transform: none; opacity: 1; }
.action-menu-title { padding: 10px 12px 8px; color: var(--text-3); font-weight: 700; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.action-item { width: 100%; display: flex; align-items: center; gap: 14px; min-height: 52px; padding: 0 14px; border-radius: 14px; font-weight: 700; font-size: 15.5px; text-align: left; }
.action-item:hover, .action-item:focus-visible { background: var(--surface-2); }
.action-item .ic { color: var(--text-2); }
.action-item.danger, .action-item.danger .ic { color: var(--danger); }
.action-item.cancel { justify-content: center; color: var(--text-2); margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 14px 14px; }
@media (min-width: 700px) {
  .menu-layer { align-items: center; }
  .action-menu { max-width: 380px; border-radius: 20px; border-bottom: 1px solid var(--line-2); padding-bottom: 10px; }
}

.toast {
  position: fixed; z-index: 200; left: 50%; top: calc(var(--sat) + 12px); transform: translate(-50%, -20px); opacity: 0; pointer-events: none;
  display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: 14px; max-width: calc(100% - 32px); width: max-content;
  background: #141816; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); font-weight: 600; font-size: 14px;
  transition: transform 0.2s, opacity 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok .ic { color: var(--accent); }
.toast.error { border-color: rgba(255, 93, 93, 0.4); }
.toast.error .ic { color: var(--danger); }

/* ------------------------------------------------------------------ cartões */
.card-list { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 760px) { .card-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1280px) { .card-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card-item { display: flex; flex-direction: column; gap: 12px; padding: 12px; }
.plastic {
  aspect-ratio: 1.7; max-height: 210px; width: 100%; border-radius: 16px; padding: 16px 18px; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 92%, white 8%) 0%, var(--cc) 45%, color-mix(in srgb, var(--cc) 60%, black) 100%);
  color: #fff; border: 1px solid rgba(255, 255, 255, 0.1); position: relative; overflow: hidden;
}
.plastic::after { content: ''; position: absolute; width: 60%; aspect-ratio: 1; right: -18%; top: -40%; border-radius: 50%; background: rgba(255, 255, 255, 0.06); }
.plastic.big { max-height: 230px; }
.pl-top { display: flex; justify-content: space-between; gap: 8px; font-weight: 700; }
.pl-name { font-family: var(--display); font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pl-brand { font-size: 13px; opacity: 0.85; flex: none; }
.pl-mid { display: flex; flex-direction: column; }
.pl-label { font-size: 12px; opacity: 0.8; font-weight: 600; }
.pl-value { font-family: var(--display); font-size: 24px; font-weight: 600; }
.pl-bot { display: flex; justify-content: space-between; font-size: 12.5px; opacity: 0.85; font-weight: 600; }
.card-preview {
  height: 110px; border-radius: 16px; padding: 16px; display: flex; justify-content: space-between; align-items: flex-start; color: #fff; font-weight: 700;
  background: linear-gradient(135deg, color-mix(in srgb, var(--cc) 90%, white 10%), color-mix(in srgb, var(--cc) 65%, black)); border: 1px solid rgba(255, 255, 255, 0.1);
}
.cp-name { font-family: var(--display); font-size: 17px; }
.usage { display: flex; flex-direction: column; gap: 8px; }
.usage.panel { margin-top: 12px; }
.usage-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13.5px; font-weight: 600; color: var(--text-2); }
.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > div { height: 100%; border-radius: inherit; background: var(--accent); transition: width 0.3s; }
.progress.danger > div { background: var(--danger); }
.progress.done > div { background: var(--accent); }
.mini-alert { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 600; padding: 9px 12px; border-radius: 12px; margin-top: 8px; }
.mini-alert.warn { background: rgba(255, 181, 71, 0.1); color: #ffd08a; }
.mini-alert.danger { background: rgba(255, 93, 93, 0.1); color: #ff9a9a; }
.inv-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; border-radius: 14px; background: var(--surface-2); text-align: left; min-height: 56px; }
.inv-line > span { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
.inv-line small { width: 100%; color: var(--text-3); font-size: 12.5px; font-weight: 600; }
.inv-line > b { font-family: var(--display); font-weight: 600; white-space: nowrap; }
.card-item-actions { display: flex; gap: 8px; align-items: center; }
.card-item-actions .btn { flex: 1; min-width: 0; padding: 0 8px; }
.invoice-box { display: flex; flex-direction: column; gap: 12px; margin-top: 10px; }
.inv-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.inv-total { font-family: var(--display); font-size: 30px; font-weight: 600; }
.inv-tabs { margin-top: 0; }
.detail-grid { display: grid; gap: 14px; }
.detail-grid > div { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
@media (min-width: 1024px) { .detail-grid { grid-template-columns: 360px minmax(0, 1fr); align-items: start; gap: 20px; } }
.mini-list { list-style: none; padding: 0; margin: 8px 0 0; }
.mini-list li { display: flex; justify-content: space-between; padding: 9px 2px; border-top: 1px solid var(--line); font-size: 14px; }
.mini-list li b { font-variant-numeric: tabular-nums; }
details.archived summary { cursor: pointer; color: var(--text-2); font-weight: 700; padding: 10px 4px; list-style: none; }
details.archived summary::-webkit-details-marker { display: none; }
details.archived summary::before { content: '▸ '; }
details.archived[open] summary::before { content: '▾ '; }

/* ------------------------------------------------------------------ vendas */
.sales-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.month-stepper { display: flex; align-items: center; gap: 4px; }
.ms-label { font-family: var(--display); font-weight: 600; font-size: 17px; min-width: 150px; text-align: center; }
.sales-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.sales-stats .stat.big { grid-column: span 2; }
.sales-stats .stat.big .stat-value { font-size: 30px; }
.sales-stats.three .stat.big .stat-value { font-size: 26px; }
@media (min-width: 760px) { .sales-stats { grid-template-columns: 2fr 1fr 1fr 1fr; } .sales-stats .stat.big { grid-column: auto; } .sales-stats.three { grid-template-columns: 2fr 1fr 1fr; } }
.sales-hero .stat-value { font-size: 34px; }
.sale-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 1024px) { .sale-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.sale-item { padding: 0; overflow: hidden; transition: border-color 0.3s; }
.sale-item.highlight { border-color: var(--accent); }
.sale-main { display: flex; flex-direction: column; gap: 6px; width: 100%; padding: 14px 14px 10px; text-align: left; }
.sale-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.sale-car { font-family: var(--display); font-weight: 600; font-size: 16.5px; min-width: 0; }
.sale-car em { font-style: normal; color: var(--text-3); font-weight: 500; }
.sale-client { color: var(--text-2); font-size: 13.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sale-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid var(--line); }
.sale-nums div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sale-nums span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.sale-nums b { font-size: 14px; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sale-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 0 8px 10px 14px; flex-wrap: wrap; }
.sale-actions .btn-ghost { margin-right: auto; }

/* ------------------------------------------------------------------ agenda */
.agenda-grid { display: grid; gap: 16px; }
.agenda-grid > div { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
@media (min-width: 1024px) { .agenda-grid { grid-template-columns: 380px minmax(0, 1fr); align-items: start; } }
.calendar { display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.calendar .month-stepper { justify-content: space-between; }
.cal-week, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 2px; }
.cal-week span { text-align: center; font-size: 12px; font-weight: 700; color: var(--text-3); padding: 4px 0; }
.cal-cell { min-height: 46px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; font-weight: 700; font-size: 14.5px; font-variant-numeric: tabular-nums; }
.cal-cell.empty { pointer-events: none; }
.cal-cell:hover { background: var(--surface-2); }
.cal-cell.today span:first-child { color: var(--accent); }
.cal-cell.sel { background: var(--accent); color: var(--accent-ink); }
.cal-cell.sel span:first-child { color: var(--accent-ink); }
.cal-dots { display: flex; gap: 3px; height: 5px; }
.cal-dots i { width: 5px; height: 5px; border-radius: 50%; }
.cal-cell.sel .cal-dots i { background: var(--accent-ink) !important; }

/* ------------------------------------------------------------------ relatórios */
.report-grid { display: grid; gap: 14px; }
@media (min-width: 900px) { .report-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.rep-title { font-size: 16px; margin-bottom: 10px; }
.result-card { display: flex; flex-direction: column; gap: 4px; }
.result-value { font-family: var(--display); font-size: 34px; font-weight: 600; }
.big-num { font-family: var(--display); font-size: 26px; font-weight: 600; margin-bottom: 10px; }
.big-num small { font-size: 14px; color: var(--text-2); font-family: var(--font); font-weight: 600; }
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .zero { stroke: var(--line-2); stroke-dasharray: 3 3; }
.chart .axis { fill: var(--text-3); font-size: 10px; font-family: var(--font); font-weight: 600; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 8px; font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; }
.donut-wrap { display: flex; justify-content: center; padding: 4px 0 12px; }
.donut .donut-label { fill: var(--text-3); font-size: 11px; font-weight: 600; font-family: var(--font); }
.donut .donut-value { fill: var(--text); font-size: 15px; font-weight: 600; font-family: var(--display); }
.hbars { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.hb-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.hb-label { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 600; }
.hb-label i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.hb-val { font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.hb-val em { font-style: normal; color: var(--text-3); font-weight: 600; font-size: 12.5px; }
.hb-track { height: 6px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.hb-fill { height: 100%; border-radius: inherit; }
.goal-line { margin-bottom: 14px; display: flex; flex-direction: column; gap: 6px; }

/* ------------------------------------------------------------------ mais / config */
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 760px) { .tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.tile { display: flex; flex-direction: column; gap: 4px; min-height: 120px; color: var(--text); }
.tile:hover { border-color: var(--line-2); }
.tile-ic { width: 42px; height: 42px; border-radius: 13px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 8px; }
.tile-t { font-weight: 700; font-size: 15px; }
.tile-s { color: var(--text-3); font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logout-btn { margin-top: 6px; }
.settings .row-main { min-height: 64px; }
.set-ic { width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--text-2); flex: none; }
.settings .chev { color: var(--text-3); }
.hero-mini { display: flex; flex-direction: column; gap: 2px; }
.hero-mini .big-num { margin: 0; }

/* ------------------------------------------------------------------ login */
.auth {
  min-height: 100dvh; display: grid; place-items: center;
  padding: calc(24px + var(--sat)) calc(18px + var(--sar)) calc(24px + var(--sab)) calc(18px + var(--sal));
  background: radial-gradient(80% 50% at 50% 0%, color-mix(in srgb, var(--accent) 7%, transparent), transparent 70%), var(--bg);
}
.auth-card { width: 100%; max-width: 400px; position: relative; display: flex; flex-direction: column; gap: 10px; }
.auth-brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; }
.auth-app { font-family: var(--display); font-weight: 600; font-size: 15px; }
.auth-title { font-size: 28px; }
.auth-sub { color: var(--text-2); margin-bottom: 12px; }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-forgot { align-self: flex-end; font-weight: 700; font-size: 14px; padding: 4px 0; margin-top: -4px; }
.auth-switch { text-align: center; color: var(--text-2); margin-top: 14px; }
.auth-switch a { font-weight: 700; }
.auth-back { margin: 0 0 4px -10px; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 52px; }
.pw-toggle { position: absolute; right: 3px; top: 3px; }
.auth-done { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 12px 0; color: var(--text-2); }
.auth-done .ic { color: var(--accent); }
.auth-done h2 { color: var(--text); font-size: 20px; }
.setup-steps { color: var(--text-2); padding-left: 20px; display: grid; gap: 8px; }
.setup-steps code { color: var(--accent); }

@media (max-width: 360px) {
  :root { --gutter: 12px; }
  .qa { padding: 10px; gap: 10px; font-size: 13.5px; }
  .qa-ic { width: 34px; height: 34px; }
  .stat-value { font-size: 17px; }
  .summary-strip b { font-size: 13.5px; }
  .summary-strip div { padding: 10px; }
  .sale-nums { grid-template-columns: 1fr 1fr; }
  .ms-label { min-width: 120px; font-size: 15px; }
}

/* =====================================================================
   v2 — SaaS, vendas com abas, datas BR
   ===================================================================== */

/* data dd/mm/aaaa + calendário nativo */
.date-wrap { position: relative; }
.date-wrap .date-text { padding-right: 52px; font-variant-numeric: tabular-nums; }
.date-wrap .date-text.invalid { border-color: rgba(255, 93, 93, 0.6); }
.date-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; display: grid; place-items: center; color: var(--text-2); pointer-events: none; }
.date-native {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px;
  opacity: 0; cursor: pointer; padding: 0; margin: 0; border: 0; color-scheme: dark; font-size: 16px;
}
.date-native::-webkit-calendar-picker-indicator { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }

/* grupos do início */
.group { display: flex; flex-direction: column; gap: 10px; }
.group-h { font-size: 15px; font-family: var(--font); font-weight: 700; color: var(--text-2); padding: 0 2px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.group-h span { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.commission-group .stat { background: linear-gradient(180deg, rgba(255, 181, 71, 0.03), transparent), var(--surface); }
@media (min-width: 760px) { .stats.two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) {
  .dash > .group { grid-column: span 6; }
  .dash > .plan-banner { grid-column: span 12; }
}

/* faixa do plano */
.plan-banner {
  display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: var(--r); color: var(--text);
  background: rgba(90, 184, 255, 0.07); border: 1px solid rgba(90, 184, 255, 0.25); font-size: 14px; min-height: 48px;
}
.plan-banner .ic { color: var(--info); }
.plan-banner > span:nth-child(2) { flex: 1; min-width: 0; }
.plan-banner.warn { background: rgba(255, 181, 71, 0.08); border-color: rgba(255, 181, 71, 0.3); }
.plan-banner.warn .ic { color: var(--warn); }
.plan-banner.danger { background: rgba(255, 93, 93, 0.08); border-color: rgba(255, 93, 93, 0.3); }
.plan-banner.danger .ic { color: var(--danger); }
.pb-cta { font-weight: 800; color: var(--accent); flex: none; }

/* meu plano */
.plan-card { display: flex; flex-direction: column; gap: 14px; }
.plan-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.plan-name { font-size: 20px; margin-top: 2px; }
.plan-price, .pw-price { font-family: var(--display); font-size: 34px; font-weight: 600; letter-spacing: -0.02em; }
.plan-price small, .pw-price small { font-size: 15px; color: var(--text-2); font-family: var(--font); font-weight: 600; letter-spacing: 0; }
.plan-status { padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 6px; }
.plan-status p { color: var(--text-2); font-size: 14px; }
.plan-status.bad { background: rgba(255, 93, 93, 0.07); border: 1px solid rgba(255, 93, 93, 0.25); }
.plan-actions { display: flex; flex-direction: column; gap: 8px; }
.benefits { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; text-align: left; }
.benefits li { display: flex; gap: 12px; align-items: flex-start; font-size: 14.5px; color: var(--text-2); }
.benefits .ic { color: var(--accent); margin-top: 1px; }

/* tela de assinatura (bloqueio) */
.paywall { max-width: 460px; width: 100%; margin: 8px auto 0; display: flex; flex-direction: column; gap: 14px; align-items: stretch; text-align: center; }
.pw-ic { width: 68px; height: 68px; border-radius: 22px; display: grid; place-items: center; margin: 4px auto 4px; color: var(--accent); background: var(--accent-soft); border: 1px solid var(--accent-line); }
.pw-title { font-size: 26px; }
.pw-text { color: var(--text-2); }
.paywall .benefits { padding: 16px; border: 1px solid var(--line); border-radius: var(--r-lg); background: var(--surface); }
.app-shell.is-blocked .tabbar { display: none; }
.app-shell.is-blocked .page { padding-bottom: calc(32px + var(--sab)); }
.app-shell.is-blocked .side-logout { display: flex; }

/* venda: cabeçalho e abas */
.sale-hero { display: flex; flex-direction: column; gap: 12px; }
.sale-hero-title { font-size: 22px; }
.sale-hero-nums { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.sale-hero-nums div { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; min-width: 0; }
.sale-hero-nums span:first-child { font-size: 12.5px; color: var(--text-3); font-weight: 600; }
.sale-hero-nums b { font-family: var(--display); font-size: clamp(17px, 5vw, 21px); font-weight: 600; }
.tabs {
  display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line);
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab-btn { flex: 1 0 auto; min-height: 42px; padding: 0 14px; border-radius: 10px; font-weight: 700; font-size: 14px; color: var(--text-2); white-space: nowrap; }
.tab-btn.active { background: var(--surface-3); color: var(--text); box-shadow: inset 0 0 0 1px var(--accent-line); }
.tab-btn i { font-style: normal; font-size: 11px; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 1px 6px; margin-left: 4px; }
.tab-body { display: flex; flex-direction: column; gap: 14px; }
.proj-lines.first { margin-top: 0; }
.proj-lines.first > div:first-child { border-top: 0; }
.proj-lines .total { border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: 2px; }
.proj-lines .total dt { font-size: 15px; }
.proj-lines .total dd { font-family: var(--display); font-size: 20px; display: flex; flex-direction: column; align-items: flex-end; }
.proj-lines .total dd small { font-family: var(--font); font-size: 12px; color: var(--text-3); font-weight: 600; }
.link-btn.inline { padding: 0 0 0 6px; font-size: 13px; }
.note-box { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 14px; white-space: pre-wrap; }
.btn-row { display: flex; flex-wrap: wrap; gap: 8px; }
.btn-row .btn { flex: 1 1 160px; }
.privacy-note { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: 12px; font-size: 13.5px; color: var(--text-2); background: var(--surface); border: 1px dashed var(--line-2); }
.privacy-note .ic { margin-top: 1px; color: var(--text-3); }
.cost-group { display: flex; flex-direction: column; gap: 6px; }

/* envio de documentos */
.file-hidden { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.field.drop { position: relative; }
.drop-box { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 14px; border: 1.5px dashed var(--line-2); background: var(--surface-2); color: var(--accent); min-height: 72px; }
.field.drop:focus-within .drop-box { border-color: var(--accent-line); }
.drop-text { display: flex; flex-direction: column; color: var(--text); min-width: 0; }
.drop-text b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.drop-text small { color: var(--text-3); font-size: 12.5px; }
.has-error .drop-box { border-color: rgba(255, 93, 93, 0.6); }
.upload-area { display: flex; flex-direction: column; gap: 8px; }
.upload-row { display: flex; justify-content: space-between; font-size: 14px; font-weight: 600; color: var(--text-2); }
.upload-progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.upload-progress > div { height: 100%; background: var(--accent); border-radius: inherit; transition: width 0.15s; }

/* admin */
.admin-stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 900px) { .admin-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.plan-admin { display: flex; flex-direction: column; gap: 6px; }
.mono-break { word-break: break-all; color: var(--text-2); }
@media (max-width: 519px) {
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: visible; }
  .tabs.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tab-btn { padding: 0 8px; }
}
.admin-row .row-text .badge { align-self: flex-start; margin-top: 4px; }
.admin-row .row-sub { white-space: normal; overflow-wrap: anywhere; }

/* =====================================================================
   v3 — vendas genéricas, limite do cartão, investimentos, pagamentos
   ===================================================================== */
.limit-block { display: flex; flex-direction: column; gap: 10px; }
.limit-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.limit-nums div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.limit-nums span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.limit-nums b { font-family: var(--display); font-weight: 600; font-size: clamp(13px, 3.8vw, 16px); font-variant-numeric: tabular-nums; }

.cat-tag { display: inline-flex; align-items: center; gap: 5px; padding: 1px 8px; border-radius: 999px; font-size: 12px; font-weight: 700;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); margin-right: 4px; }
.field-row-action { display: flex; align-items: flex-end; gap: 8px; }
.field-row-action .field { flex: 1; }
.field-row-action .btn { min-height: 50px; }
.vehicle-box { border: 1px solid var(--line-2); border-radius: 14px; background: var(--surface-2); }
.vehicle-box summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 8px; padding: 14px; font-weight: 700; color: var(--text-2); font-size: 14px; }
.vehicle-box summary::-webkit-details-marker { display: none; }
.vehicle-box summary em { font-style: normal; font-weight: 500; color: var(--text-3); }
.vehicle-box .form.inner { padding: 0 14px 14px; }

.summary-strip.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.summary-strip.four div:nth-child(3) { border-left: 0; }
.summary-strip.four div:nth-child(n+3) { border-top: 1px solid var(--line); }
@media (min-width: 760px) {
  .summary-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .summary-strip.four div:nth-child(3) { border-left: 1px solid var(--line); }
  .summary-strip.four div:nth-child(n+3) { border-top: 0; }
}
.inv-totals { display: flex; flex-direction: column; gap: 10px; }
.inv-totals .stat.big .stat-value { font-size: clamp(26px, 8vw, 34px); }
.inv-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
@media (min-width: 1024px) { .inv-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.inv-item { padding: 0; overflow: hidden; }
.inv-main { display: flex; flex-direction: column; gap: 10px; width: 100%; padding: 14px 14px 10px; text-align: left; }
.inv-head { display: flex; align-items: center; gap: 12px; min-width: 0; }
.inv-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding-top: 10px; border-top: 1px solid var(--line); }
.inv-nums div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.inv-nums span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.inv-nums b { font-size: 14px; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.inv-hero { display: flex; flex-direction: column; gap: 10px; }
.row-title.big { font-family: var(--display); font-size: 19px; white-space: normal; }
.invest-card .proj-value { font-family: var(--display); font-size: 26px; font-weight: 600; margin: 8px 0 0; }
@media (min-width: 1024px) { .dash > .invest-card { grid-column: span 12; } }

.row-main.static { cursor: default; }
.row-main.static:hover { background: none; }
.row-end .link-btn.small { font-size: 12.5px; padding: 2px 0; }
.benefits.plain li { color: var(--text-2); }
.benefits.plain .ic { color: var(--text-3); }
.paywall .btn { width: 100%; }

/* =====================================================================
   v4 — receitas recorrentes e cortesia
   ===================================================================== */
.filter-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.filter-row .input { min-height: 44px; font-size: 14px; }
.row .quick-ok { width: 40px; height: 44px; color: var(--accent); }
.rec-nums { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; padding: 0 8px 10px; }
.rec-nums div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rec-nums span { font-size: 12px; color: var(--text-3); font-weight: 600; }
.rec-nums b { font-family: var(--display); font-weight: 600; font-size: clamp(13px, 3.8vw, 17px); font-variant-numeric: tabular-nums; }
@media (min-width: 1024px) { .dash > .recurring-card { grid-column: span 12; } }
.courtesy-box { background: color-mix(in srgb, #FFC247 8%, transparent); border: 1px solid color-mix(in srgb, #FFC247 30%, transparent); }
.badge.gold { background: rgba(255, 194, 71, 0.14); color: #FFC247; }
.badge-row { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.rec-row .row-title, .rec-row .row-sub { white-space: normal; overflow-wrap: anywhere; display: block; }
.rec-row .row-title .tag { display: inline-block; margin-left: 2px; }
.rec-row .row-end { max-width: 40%; }
@media (max-width: 640px) {
  .entry-row .row-main { flex-wrap: wrap; row-gap: 6px; }
  .entry-row .row-text { flex: 1 1 calc(100% - 52px); }
  .entry-row .row-end { flex: 1 1 100%; max-width: none; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; padding-left: 50px; }
}
@media (max-width: 400px) { .filter-row { grid-template-columns: 1fr !important; } }
