:root {
  color-scheme: dark;
  --bg: #070b16;
  --bg-card: #10172a;
  --bg-card-2: #16203a;
  --border: #223154;
  --border-light: rgba(148, 163, 184, 0.16);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --accent: #38bdf8;
  --accent-2: #6366f1;
  --green: #10b981;
  --green-soft: rgba(16, 185, 129, 0.14);
  --red: #f43f5e;
  --red-soft: rgba(244, 63, 94, 0.14);
  --amber: #f59e0b;
  --amber-soft: rgba(245, 158, 11, 0.14);
  --purple: #8b5cf6;
  --radius: 16px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  overflow-x: hidden;
}

body {
  font-family: 'Segoe UI', Inter, -apple-system, BlinkMacSystemFont, Roboto, sans-serif;
  background:
    radial-gradient(ellipse 80% 48% at 50% -12%, rgba(14, 165, 233, 0.15), transparent),
    radial-gradient(ellipse 50% 40% at 95% 10%, rgba(99, 102, 241, 0.11), transparent),
    var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.45;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

/* Scrollbar elegante no PC */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: #070b16; }
::-webkit-scrollbar-thumb { background: #1e2d4d; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #334c7c; }

/* Proteção da barra de status no iPhone (Notch / Dynamic Island) para o topo nunca embaçar ou cortar */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: env(safe-area-inset-top, 0px);
  background: #070b16;
  z-index: 920;
  pointer-events: none;
}

.app-shell {
  width: 100%;
  max-width: none;
  margin: 0;
  padding: calc(18px + env(safe-area-inset-top, 0px)) calc(18px + env(safe-area-inset-right, 0px)) 48px calc(18px + env(safe-area-inset-left, 0px));
  display: flex;
  flex-direction: row;
  min-height: 100vh;
  min-height: 100dvh;
}

.app-main {
  flex: 1;
  min-width: 0;
  width: 100%;
  max-width: 1260px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* ========================================== */
/* MENU LATERAL (SIDEBAR FIXA PC / GAVETA MOB)*/
/* ========================================== */
.sidebar-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 7, 18, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  z-index: 930;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease;
}
.sidebar-backdrop.show {
  opacity: 1;
  pointer-events: auto;
}

.app-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 254px;
  z-index: 935;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #0d162c 0%, #091022 55%, #070d1c 100%);
  border-right: 1px solid rgba(56, 189, 248, 0.16);
  box-shadow: 12px 0 36px rgba(2, 6, 23, 0.45);
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: env(safe-area-inset-bottom, 0px);
}

.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 18px 16px 15px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.12);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
}

.sidebar-logo-img {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.3));
}

.sidebar-brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.sidebar-brand-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #f8fafc;
  line-height: 1.15;
}

.sidebar-brand-sub {
  font-size: 0.71rem;
  color: var(--muted);
  font-weight: 500;
}

.sidebar-close-btn {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  background: rgba(255, 255, 255, 0.05);
  color: #e2e8f0;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.sidebar-close-btn:hover {
  background: rgba(244, 63, 94, 0.16);
  border-color: rgba(244, 63, 94, 0.4);
  color: #fecdd3;
}

.sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.sidebar-section {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-section-label {
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.9px;
  text-transform: uppercase;
  color: #64748b;
  padding: 0 11px 4px;
}

.side-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  border-radius: 11px;
  border: 1px solid transparent;
  background: transparent;
  color: #cbd5e1;
  font-size: 0.87rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  text-decoration: none;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
.side-nav-item .s-ico {
  width: 22px;
  text-align: center;
  font-size: 1.04rem;
  line-height: 1;
  flex-shrink: 0;
}
.side-nav-item .s-lbl {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.side-nav-item:hover {
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(56, 189, 248, 0.18);
  color: #f8fafc;
}
.side-nav-item:active {
  transform: scale(0.985);
}
.side-nav-item.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.22), rgba(16, 185, 129, 0.18));
  border-color: rgba(56, 189, 248, 0.48);
  color: #ffffff;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(14, 165, 233, 0.15);
}
.side-nav-accent {
  color: #6ee7b7;
}
.side-nav-accent:hover {
  background: rgba(16, 185, 129, 0.14);
  border-color: rgba(16, 185, 129, 0.34);
  color: #a7f3d0;
}
.side-nav-admin {
  color: #6ee7b7;
}
.side-nav-admin.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(14, 165, 233, 0.22));
  border-color: rgba(16, 185, 129, 0.52);
  color: #ffffff;
}
.side-count-pill {
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.28);
  color: #7dd3fc;
  flex-shrink: 0;
}

.sidebar-footer {
  padding: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: rgba(7, 11, 22, 0.55);
}
.side-nav-profile {
  color: #e2e8f0;
  background: rgba(255, 255, 255, 0.03);
}
.side-nav-logout {
  color: #fda4af;
}
.side-nav-logout:hover {
  background: rgba(244, 63, 94, 0.14);
  border-color: rgba(244, 63, 94, 0.35);
  color: #fecdd3;
}

/* BOTÃO MENU (3 TRAÇOS + TEXTO) NO TOPO (VISÍVEL NO CELULAR) */
.menu-toggle-btn {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 11px;
  border-radius: 10px;
  border: 1px solid rgba(56, 189, 248, 0.34);
  background: rgba(56, 189, 248, 0.12);
  color: #e0f2fe;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.menu-toggle-bars {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
  width: 15px;
}
.menu-toggle-bars span {
  display: block;
  width: 15px;
  height: 2px;
  border-radius: 99px;
  background: currentColor;
}
.menu-toggle-label {
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1;
}
.menu-toggle-btn:hover,
.menu-toggle-btn.active {
  background: linear-gradient(135deg, rgba(14, 165, 233, 0.26), rgba(16, 185, 129, 0.22));
  border-color: rgba(56, 189, 248, 0.6);
  color: #ffffff;
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.desktop-page-heading h1 {
  font-size: 1.18rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1.2;
}
.mobile-brand {
  display: none;
}

/* TOPBAR */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  background: rgba(17, 24, 44, 0.9);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px 18px;
  backdrop-filter: blur(12px);
}

.brand { display: flex; align-items: center; gap: 11px; }
.brand-logo-img {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  filter: drop-shadow(0 4px 12px rgba(16, 185, 129, 0.28));
}
.auth-brand-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  margin-bottom: 12px;
}
.auth-hero-logo {
  width: 235px;
  max-width: 100%;
  height: auto;
  border-radius: 14px;
  object-fit: contain;
  filter: drop-shadow(0 8px 24px rgba(16, 185, 129, 0.22));
}
.brand h1 { font-size: 1.16rem; font-weight: 800; letter-spacing: -0.3px; }
.brand-subtitle { font-size: 0.74rem; color: var(--muted); display: block; }

.topbar-main { display: flex; align-items: center; gap: 14px; }
.topbar-user { display: flex; align-items: center; gap: 8px; }
.topbar-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.topbar-tools { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }

.month-nav {
  display: flex; align-items: center; justify-content: space-between;
  background: var(--bg-card-2); border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden; height: 36px;
}
.month-nav button {
  background: transparent; border: none; color: var(--text);
  padding: 0 12px; height: 100%; cursor: pointer; font-weight: 700; font-size: 0.88rem;
  display: grid; place-items: center;
}
.month-nav button:hover { background: rgba(255,255,255,0.06); }
.month-label {
  padding: 0 10px; font-weight: 700; font-size: 0.85rem;
  min-width: 118px; text-align: center; text-transform: capitalize;
}

.btn {
  border: 1px solid var(--border); background: var(--bg-card-2); color: var(--text);
  padding: 8px 12px; border-radius: 10px; font-size: 0.82rem; font-weight: 600;
  cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: all 0.16s ease; text-decoration: none;
}
.btn:hover { border-color: var(--accent); background: #1c2a4d; }
.btn:active { transform: scale(0.97); }
.btn-primary { background: linear-gradient(135deg, #0ea5e9, #6366f1); border-color: transparent; color: #fff; }
.btn-green { background: linear-gradient(135deg, #059669, #10b981); border-color: transparent; color: #fff; }
.btn-purple { background: linear-gradient(135deg, #7c3aed, #6366f1); border-color: transparent; color: #fff; }
.btn-danger { background: var(--red-soft); border-color: rgba(244, 63, 94, 0.35); color: #fda4af; }

.live-dot {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 0.74rem; color: #6ee7b7; padding: 5px 10px; border-radius: 99px;
  background: rgba(16, 185, 129, 0.12); border: 1px solid rgba(16, 185, 129, 0.3);
}
.live-dot::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: #10b981; box-shadow: 0 0 8px #10b981;
}

/* PWA INSTALL BANNER */
.pwa-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: linear-gradient(90deg, rgba(16,185,129,0.18), rgba(14,165,233,0.18));
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 0.82rem;
}
.pwa-banner.show { display: flex; }

/* VOICE HERO */
.voice-hero {
  background: linear-gradient(135deg, #101b36 0%, #14264a 60%, #0e2c3f 100%);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 16px; padding: 16px 18px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}
.voice-row { display: flex; gap: 14px; align-items: center; }
.mic-btn {
  width: 58px; height: 58px; min-width: 58px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #0ea5e9, #10b981); color: #fff; font-size: 24px;
  cursor: pointer; display: grid; place-items: center; transition: transform 0.15s ease;
}
.mic-btn:hover { transform: scale(1.05); }
.mic-btn.listening {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  animation: pulse-ring 1.3s infinite;
}
@keyframes pulse-ring {
  0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.65); }
  70% { box-shadow: 0 0 0 18px rgba(244, 63, 94, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); }
}

.voice-input-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.voice-input-bar { display: flex; gap: 8px; align-items: stretch; }
.voice-input-bar input {
  flex: 1; min-width: 0; background: rgba(8, 13, 26, 0.72); border: 1px solid var(--border);
  border-radius: 11px; padding: 11px 14px; color: var(--text); font-size: 0.95rem; outline: none;
}
.voice-input-bar input:focus { border-color: var(--accent); }
.voice-meta { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 10px; padding-left: 72px; }

.invite-qr-row { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.invite-qr-info { flex: 1; min-width: 180px; }

.chips {
  display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1; font-size: 0.74rem; padding: 5px 11px; border-radius: 99px;
  cursor: pointer; white-space: nowrap; flex-shrink: 0;
}
.chip:hover { border-color: var(--accent); color: #fff; }

.mic-meter-bar { margin-top: 10px; display: none; align-items: center; gap: 10px; font-size: 0.78rem; color: #cbd5e1; }
.mic-meter-bar.active { display: flex; }
.mic-meter-track { flex: 1; max-width: 260px; height: 8px; background: rgba(15, 23, 42, 0.85); border: 1px solid var(--border); border-radius: 99px; overflow: hidden; }
.mic-meter-fill { height: 100%; width: 0%; background: linear-gradient(90deg, #10b981, #38bdf8); transition: width 0.06s linear; }

.voice-feedback {
  margin-top: 10px; padding: 10px 14px; border-radius: 10px; font-size: 0.86rem;
  display: none; align-items: center; justify-content: space-between; gap: 12px;
}
.voice-feedback.show { display: flex; }
.voice-feedback.ok { background: var(--green-soft); border: 1px solid rgba(16, 185, 129, 0.4); color: #a7f3d0; }
.voice-feedback.err { background: var(--red-soft); border: 1px solid rgba(244, 63, 94, 0.4); color: #fecdd3; }
.voice-feedback.info { background: rgba(56, 189, 248, 0.14); border: 1px solid rgba(56, 189, 248, 0.4); color: #bae6fd; }

/* BADGE DE CONTADOR NAS ABAS E PAINÉIS */
.tab-badge { background: var(--red); color: #fff; font-size: 0.68rem; font-weight: 800; padding: 2px 7px; border-radius: 99px; flex-shrink: 0; }

.tab-panel { display: none; flex-direction: column; gap: 16px; }
.tab-panel.active { display: flex; }

/* CARDS & GRIDS */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi-footer { display: flex; flex-direction: column; gap: 6px; margin-top: auto; }
.overview-grid { display: grid; grid-template-columns: 376px minmax(0, 1fr); gap: 16px; align-items: stretch; }
.overview-form-card { display: flex; flex-direction: column; }
.overview-tx-form { flex: 1; display: flex; flex-direction: column; }
.overview-submit-btn { width: 100%; justify-content: center; padding: 11px; margin-top: auto; }
.overview-charts-col { display: grid; grid-template-rows: 1fr 1fr; gap: 16px; min-width: 0; }
.overview-chart-card { display: flex; flex-direction: column; min-width: 0; }
.chart-body-center { flex: 1; display: flex; align-items: center; width: 100%; }
.charts-grid { display: grid; grid-template-columns: 1fr 1.25fr; gap: 14px; }
.main-grid { display: grid; grid-template-columns: 350px 1fr; gap: 14px; align-items: start; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.cards-right-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cards-deck-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(310px, 1fr)); gap: 16px; align-items: stretch; }

.card {
  background: linear-gradient(180deg, rgba(20, 30, 56, 0.92) 0%, rgba(15, 22, 41, 0.96) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 10px 28px rgba(2, 6, 23, 0.42);
}
.card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; gap: 8px; }
.card-head h2 { font-size: 1rem; font-weight: 700; letter-spacing: -0.2px; }

.kpi-title { font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.6px; color: var(--muted); font-weight: 700; }
.kpi-val { font-size: 1.45rem; font-weight: 800; margin: 5px 0 3px; letter-spacing: -0.4px; }
.kpi-sub { font-size: 0.76rem; color: var(--muted); }

.text-green { color: #34d399; }
.text-red { color: #fb7185; }
.text-blue { color: #38bdf8; }
.text-purple { color: #c084fc; }

.budget-bar { width: 100%; height: 7px; background: #1e293b; border-radius: 99px; overflow: hidden; margin-top: 8px; }
.budget-fill { height: 100%; background: linear-gradient(90deg, #10b981, #38bdf8); transition: width 0.3s ease; }
.budget-fill.warn { background: linear-gradient(90deg, #f59e0b, #f43f5e); }

.donut-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.cat-legend { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 160px; }
.cat-item { display: flex; justify-content: space-between; align-items: center; font-size: 0.82rem; }
.cat-left { display: flex; align-items: center; gap: 8px; }
.cat-dot { width: 10px; height: 10px; border-radius: 3px; }

/* FORMS */
.form-group { margin-bottom: 11px; }
.form-group label { display: block; font-size: 0.77rem; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.form-group input, .form-group select {
  width: 100%; background: #0b1224; border: 1px solid var(--border);
  border-radius: 10px; padding: 10px 12px; color: var(--text); font-size: 0.92rem; outline: none;
}
.form-group input:focus, .form-group select:focus { border-color: var(--accent); }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row-date { display: grid; grid-template-columns: 74px 1fr 88px; gap: 8px; }

/* Caixa de Recorrência em Contas Fixas */
.rec-repeat-box {
  background: rgba(14, 165, 233, 0.08);
  border: 1px solid rgba(56, 189, 248, 0.34);
  border-radius: 12px;
  padding: 11px 12px;
  margin-bottom: 12px;
  transition: border-color 0.16s, background 0.16s;
}
.rec-repeat-box.once-mode {
  background: rgba(245, 158, 11, 0.08);
  border-color: rgba(245, 158, 11, 0.36);
}
.rec-switch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.rec-switch-row input[type="checkbox"] {
  width: 20px !important;
  height: 20px !important;
  accent-color: #10b981;
  cursor: pointer;
  flex-shrink: 0;
}
.rec-switch-texts {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.rec-switch-texts strong {
  font-size: 0.84rem;
  color: var(--text);
}
.rec-switch-texts span {
  font-size: 0.73rem;
  color: #94a3b8;
  line-height: 1.3;
}
.rec-repeat-box select {
  width: 100%;
  background: #0b1224;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 10px;
  color: var(--text);
  font-size: 0.84rem;
  outline: none;
}

/* Pílulas de Filtro Rápido das Contas Fixas */
.rec-filter-pills {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 4px;
  margin-bottom: 12px;
  scrollbar-width: none;
}
.rec-filter-pills::-webkit-scrollbar { display: none; }
.rec-pill {
  background: #0b1224;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 99px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}
.rec-pill:hover { border-color: var(--accent); color: var(--text); }
.rec-pill.active {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--accent);
  color: #e0f2fe;
}
.badge-fixed { background: rgba(99, 102, 241, 0.18); color: #c7d2fe; border: 1px solid rgba(99, 102, 241, 0.34); }
.badge-var { background: rgba(245, 158, 11, 0.15); color: #fde68a; border: 1px solid rgba(245, 158, 11, 0.34); }
.badge-once { background: rgba(236, 72, 153, 0.15); color: #fbcfe8; border: 1px solid rgba(236, 72, 153, 0.34); }
.rec-date-pill {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  padding: 5px 8px;
  border-radius: 10px;
  background: #0b1224;
  border: 1px solid var(--border);
  line-height: 1.15;
}
.rec-date-pill strong { font-size: 0.92rem; color: #f8fafc; }
.rec-date-pill small { font-size: 0.66rem; text-transform: uppercase; color: #38bdf8; font-weight: 700; letter-spacing: 0.4px; }

.type-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.type-btn { padding: 10px; border-radius: 10px; border: 1px solid var(--border); background: #0b1224; color: var(--muted); font-weight: 700; cursor: pointer; }
.type-btn.active-expense { background: var(--red-soft); border-color: var(--red); color: #fda4af; }
.type-btn.active-income { background: var(--green-soft); border-color: var(--green); color: #6ee7b7; }

/* TABLES (DESKTOP) & MOBILE LIST CARDS */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.filters input, .filters select {
  background: #0b1224; border: 1px solid var(--border); border-radius: 9px;
  padding: 8px 10px; color: var(--text); font-size: 0.84rem;
}
.filters input { flex: 1; min-width: 150px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.84rem; }
th { text-align: left; color: var(--muted); font-size: 0.73rem; text-transform: uppercase; letter-spacing: 0.5px; padding: 9px 8px; border-bottom: 1px solid var(--border); }
td { padding: 10px 8px; border-bottom: 1px solid rgba(34, 48, 82, 0.55); vertical-align: middle; }
tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Mobile Transaction Cards (hidden on desktop, active on mobile!) */
.mobile-tx-list { display: none; flex-direction: column; gap: 9px; }
.m-tx-card {
  background: #0c1428;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.m-tx-left { display: flex; align-items: center; gap: 11px; min-width: 0; flex: 1; }
.m-tx-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(56, 189, 248, 0.12);
  display: grid; place-items: center; font-size: 1.05rem; flex-shrink: 0;
}
.m-tx-info { min-width: 0; flex: 1; }
.m-tx-title { font-weight: 700; font-size: 0.9rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-tx-meta { font-size: 0.74rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-top: 2px; }
.m-tx-right { text-align: right; flex-shrink: 0; }
.m-tx-val { font-weight: 800; font-size: 0.95rem; white-space: nowrap; }
.m-tx-actions { display: flex; gap: 6px; justify-content: flex-end; margin-top: 5px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 0.72rem; font-weight: 600; background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.badge-voice { background: rgba(16, 185, 129, 0.15); color: #6ee7b7; }
.badge-credit { background: rgba(139, 92, 246, 0.2); color: #ddd6fe; }
.badge-overdue { background: var(--red-soft); color: #fda4af; border: 1px solid rgba(244,63,94,0.4); }
.badge-soon { background: var(--amber-soft); color: #fde68a; border: 1px solid rgba(245,158,11,0.4); }
.badge-paid { background: var(--green-soft); color: #6ee7b7; }

.row-actions { display: flex; gap: 5px; justify-content: flex-end; }
.icon-btn { background: transparent; border: 1px solid var(--border); color: var(--muted); border-radius: 8px; padding: 5px 9px; cursor: pointer; font-size: 0.78rem; }
.icon-btn:hover { color: #fff; border-color: var(--accent); }
.icon-btn.del:hover { color: #fda4af; border-color: var(--red); }

.cc-box {
  background: linear-gradient(135deg, #1b1947 0%, #2b2774 58%, #182338 100%);
  border: 1px solid rgba(139, 92, 246, 0.48);
  border-radius: var(--radius);
  padding: 18px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 10px 28px rgba(2, 6, 23, 0.42);
}
.cc-head-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 30px;
}
.cc-cycle-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.77rem;
  color: #cbd5e1;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}
.cc-invoices-stack {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.cc-invoice-pill {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  border-radius: 9px;
  padding: 6px 10px;
}
.cc-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  background: rgba(9, 14, 29, 0.56);
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  padding: 9px 10px;
}
.cc-metric-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.cc-metric-cell small {
  font-size: 0.68rem;
  color: #94a3b8;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cc-metric-cell strong {
  font-size: 0.88rem;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.aligned-tx-table,
.aligned-card-table {
  table-layout: fixed;
  width: 100%;
}
.aligned-tx-table td,
.aligned-card-table td {
  overflow: hidden;
  text-overflow: ellipsis;
}
.qr-container { background: #ffffff; padding: 12px; border-radius: 12px; width: 130px; height: 130px; display: grid; place-items: center; }
.qr-container svg { width: 100%; height: 100%; }
.empty-state { text-align: center; padding: 28px 14px; color: var(--muted); font-size: 0.86rem; }
.tx-time { font-size: 0.7rem; color: #64748b; font-weight: 600; margin-top: 2px; white-space: nowrap; }
.tx-time-inline { color: #94a3b8; font-weight: 600; white-space: nowrap; }

/* AUTH OVERLAY */
.auth-overlay {
  position: fixed; inset: 0; z-index: 9999;
  background: radial-gradient(circle at top, #13254c 0%, #070b16 70%);
  display: none; align-items: center; justify-content: center;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 18px calc(18px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.auth-overlay.show { display: flex; }
.auth-box {
  width: 100%; max-width: 420px; background: var(--bg-card);
  border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 18px;
  padding: 24px 22px; box-shadow: 0 20px 50px rgba(0,0,0,0.55);
}
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 16px 0; }
.user-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99, 102, 241, 0.16); border: 1px solid rgba(99, 102, 241, 0.38);
  color: #c7d2fe; padding: 5px 11px; border-radius: 99px; font-size: 0.76rem; font-weight: 700;
  cursor: pointer; transition: border-color 0.15s;
}
.user-pill:hover { border-color: var(--accent); color: #fff; }

.pass-wrap { position: relative; display: flex; align-items: center; }
.pass-wrap input { padding-right: 40px; }
.pass-eye {
  position: absolute; right: 8px; background: transparent; border: none;
  color: var(--muted); cursor: pointer; font-size: 0.95rem; padding: 4px;
}

.modal-backdrop {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(5, 9, 20, 0.84); backdrop-filter: blur(6px);
  display: none; align-items: center; justify-content: center; padding: 16px;
}
.modal-backdrop.show { display: flex !important; }
.modal-card {
  width: 100%; max-width: 460px; max-height: 90vh; overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid rgba(56, 189, 248, 0.4); border-radius: 16px; padding: 20px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.65);
}

/* MOBILE BOTTOM NAVIGATION BAR & FLOATING VOICE SHEET */
.mobile-bottom-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 900;
  background: rgba(11, 17, 34, 0.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  grid-template-columns: repeat(5, 1fr);
  align-items: end;
}
.m-nav-item {
  background: transparent; border: none; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 0.68rem; font-weight: 600; padding: 6px 2px; cursor: pointer; position: relative;
  border-radius: 10px; transition: background 0.15s ease, color 0.15s ease;
}
.m-nav-item .m-ico { font-size: 1.18rem; line-height: 1; }
.m-nav-item.active { color: var(--accent); }
.m-nav-dot {
  position: absolute;
  top: 4px;
  right: calc(50% - 14px);
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--red);
  box-shadow: 0 0 0 2px #0b1122;
}

.m-nav-voice-fab {
  display: none;
  background: linear-gradient(135deg, #0ea5e9, #10b981);
  color: #fff; border: 3px solid #080d1a;
  width: 54px; height: 54px; border-radius: 50%;
  place-items: center; font-size: 1.4rem;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.5);
  cursor: pointer;
}
.m-nav-voice-fab.listening {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  animation: pulse-ring 1.2s infinite;
}

/* MOBILE FULL VOICE SHEET (BOTTOM DRAWER) */
.voice-sheet-backdrop {
  position: fixed; inset: 0; z-index: 950;
  background: rgba(4, 8, 18, 0.78); backdrop-filter: blur(6px);
  display: none; align-items: flex-end; justify-content: center;
}
.voice-sheet-backdrop.show { display: flex; }
.voice-sheet {
  width: 100%; max-width: 500px;
  background: linear-gradient(180deg, #13203d 0%, #0b1224 100%);
  border-top: 1px solid rgba(56, 189, 248, 0.45);
  border-radius: 24px 24px 0 0;
  padding: 20px 20px calc(26px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  text-align: center;
  animation: slide-up 0.2s ease-out;
}
@keyframes slide-up {
  from { transform: translateY(100%); }
  to { transform: translateY(0); }
}
.sheet-mic-big {
  width: 82px; height: 82px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, #0ea5e9, #10b981); color: #fff;
  font-size: 34px; display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 8px 28px rgba(14, 165, 233, 0.4);
}
.sheet-mic-big.listening {
  background: linear-gradient(135deg, #f43f5e, #fb7185);
  animation: pulse-ring 1.2s infinite;
}
.sheet-wave-bar {
  width: 220px; height: 9px; background: #080d1a; border: 1px solid var(--border);
  border-radius: 99px; overflow: hidden;
}
.sheet-wave-fill {
  height: 100%; width: 0%; background: linear-gradient(90deg, #10b981, #38bdf8);
  transition: width 0.06s linear;
}

/* ========================================== */
/* ACABAMENTO PREMIUM DESKTOP (>= 821px)      */
/* ========================================== */
@media (min-width: 821px) {
  .app-shell {
    padding: 22px 26px 56px calc(254px + 26px);
  }
  .app-main {
    max-width: 1260px;
    gap: 18px;
  }
  .sidebar-backdrop {
    display: none !important;
  }

  /* Topbar executiva limpa (ferramentas e abas agora na sidebar fixa!) */
  .topbar {
    flex-wrap: nowrap;
    padding: 13px 20px;
    gap: 14px;
    background: linear-gradient(180deg, rgba(19, 28, 52, 0.94) 0%, rgba(14, 21, 40, 0.94) 100%);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 12px 32px rgba(2, 6, 23, 0.45);
  }
  .topbar-main {
    display: contents;
  }
  .topbar-left {
    order: 1;
    margin-right: auto;
  }
  .topbar-controls {
    order: 2;
    flex-wrap: nowrap;
    gap: 10px;
  }
  .topbar-user {
    order: 3;
    padding-left: 14px;
    margin-left: 2px;
    border-left: 1px solid rgba(148, 163, 184, 0.18);
    gap: 9px;
    flex-shrink: 0;
  }

  /* Controles do topo nivelados em 38px */
  .month-nav,
  .topbar-user > .btn,
  .user-pill,
  .live-dot {
    height: 38px;
    display: inline-flex;
    align-items: center;
  }
  .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.18);
  }
  .user-pill {
    padding: 0 13px;
    font-size: 0.8rem;
  }

  /* Hero de Comando de Voz estilo Spotlight */
  .voice-hero {
    padding: 20px 24px;
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(16, 28, 58, 0.96) 0%, rgba(19, 39, 74, 0.94) 55%, rgba(13, 45, 64, 0.95) 100%);
    border: 1px solid rgba(56, 189, 248, 0.36);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 14px 36px rgba(2, 6, 23, 0.45);
  }
  .voice-row { gap: 16px; }
  .mic-btn {
    width: 54px;
    height: 54px;
    min-width: 54px;
    box-shadow: 0 6px 22px rgba(14, 165, 233, 0.38);
  }
  .voice-input-bar input {
    height: 48px;
    padding: 0 16px;
    font-size: 0.96rem;
    border-radius: 12px;
    background: rgba(7, 11, 22, 0.78);
  }
  #voiceOkBtn {
    height: 48px;
    min-width: 72px;
    justify-content: center;
    border-radius: 12px;
    font-size: 0.88rem;
    font-weight: 700;
  }
  .voice-meta {
    padding-left: 70px;
    margin-top: 11px;
  }
  .chip {
    padding: 6px 13px;
    font-size: 0.76rem;
    transition: all 0.15s ease;
  }
  .chip:hover {
    background: rgba(56, 189, 248, 0.14);
    transform: translateY(-1px);
  }

  /* 4 Cards KPI 100% simétricos na mesma altura */
  .kpi-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
  }
  .kpi-grid .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 128px;
    padding: 18px 20px;
    transition: transform 0.18s ease, border-color 0.18s ease;
  }
  .kpi-grid .card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.42);
  }
  .kpi-title {
    min-height: 22px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .kpi-val {
    font-size: 1.56rem;
    margin: 6px 0 4px;
  }

  /* Grid principal com formulário ancorado (sticky) e proporção áurea */
  .overview-grid {
    grid-template-columns: 376px minmax(0, 1fr);
    gap: 18px;
    align-items: stretch;
  }
  .overview-charts-col {
    gap: 18px;
  }
  .main-grid {
    grid-template-columns: 376px minmax(0, 1fr);
    gap: 18px;
    align-items: start;
  }
  .main-grid > .card:first-child {
    position: sticky;
    top: 18px;
  }
  .cards-right-stack,
  .cards-deck-grid {
    gap: 18px;
  }
  .charts-grid {
    grid-template-columns: 1fr 1.35fr;
    gap: 18px;
    align-items: stretch;
  }
  .grid-2 {
    gap: 18px;
  }

  /* Nivelamento milimétrico de todos os inputs e selects no PC (42px) */
  .form-group input,
  .form-group select {
    height: 42px;
    padding: 0 13px;
    font-size: 0.9rem;
    transition: border-color 0.15s, box-shadow 0.15s;
  }
  .form-group input:focus,
  .form-group select:focus {
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.14);
  }
  .type-btn {
    height: 40px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  /* Barra de filtros do extrato nivelada em 38px */
  .filters {
    display: grid;
    grid-template-columns: 1fr 150px 180px;
    gap: 10px;
    margin-bottom: 14px;
  }
  .filters input,
  .filters select {
    height: 38px;
    padding: 0 12px;
    width: 100%;
    min-width: 0;
  }

  /* Tabela executiva com espaçamento respirável e botões quadrados alinhados */
  table {
    font-size: 0.86rem;
  }
  th {
    background: rgba(11, 18, 36, 0.7);
    padding: 11px 12px;
    font-size: 0.72rem;
    letter-spacing: 0.65px;
  }
  th:first-child { border-radius: 8px 0 0 8px; }
  th:last-child { border-radius: 0 8px 8px 0; }
  td {
    padding: 12px;
    border-bottom: 1px solid rgba(34, 49, 84, 0.5);
  }
  tr:hover td {
    background: rgba(56, 189, 248, 0.045);
  }
  .icon-btn {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }
  .donut-wrap {
    padding: 8px 4px;
    gap: 24px;
  }
  .cat-legend {
    gap: 9px;
  }
  .cat-item {
    padding-bottom: 6px;
    border-bottom: 1px dashed rgba(148, 163, 184, 0.12);
  }
  .cat-item:last-child { border-bottom: none; padding-bottom: 0; }
}

/* Ajuste intermediário (notebooks menores com sidebar fixa: 821px a 1160px) */
@media (min-width: 821px) and (max-width: 1160px) {
  .app-sidebar {
    width: 224px;
  }
  .app-shell {
    padding: 18px 18px 52px calc(224px + 18px);
  }
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .overview-grid,
  .main-grid {
    grid-template-columns: 1fr;
  }
  .main-grid > .card:first-child {
    position: static;
  }
}

/* ========================================== */
/* RESPONSIVIDADE MOBILE NATIVA (<= 820px)    */
/* ========================================== */
@media (max-width: 820px) {
  .app-shell {
    padding: calc(14px + env(safe-area-inset-top, 0px)) calc(12px + env(safe-area-inset-right, 0px)) calc(134px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px));
    flex-direction: column;
  }
  .app-main {
    gap: 11px;
  }

  /* GAVETA LATERAL DESLIZANTE NO CELULAR (ESTILO APP FINTECH MODERNO) */
  .app-sidebar {
    width: min(82vw, 300px);
    transform: translateX(-105%);
    transition: transform 0.24s cubic-bezier(0.22, 1, 0.36, 1);
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.65);
  }
  .app-sidebar.open {
    transform: translateX(0);
  }
  .sidebar-close-btn {
    display: grid;
    place-items: center;
  }
  .menu-toggle-btn {
    display: inline-flex;
  }
  .mobile-brand {
    display: flex;
  }
  .desktop-page-heading {
    display: none !important;
  }

  .brand-subtitle, .live-dot, .desktop-only {
    display: none !important;
  }

  /* Banners superiores compactos e alinhados */
  .pwa-banner {
    padding: 9px 11px;
    font-size: 0.77rem;
    line-height: 1.3;
    border-radius: 11px;
  }
  .pwa-banner .btn {
    flex-shrink: 0;
    height: 32px;
    padding: 0 11px !important;
  }

  /* TOPBAR ULTRA-LIMPA EM 2 FAIXAS NO CELULAR (MENU + MARCA + CONTA / SELETOR DE MÊS) */
  .topbar {
    flex-direction: column;
    align-items: stretch;
    padding: 11px 12px;
    gap: 10px;
    border-radius: 14px;
    background: #10172a;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
  }
  .topbar-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    width: 100%;
    min-width: 0;
  }
  .topbar-left {
    gap: 8px;
  }
  .brand { gap: 7px; flex-shrink: 0; }
  .brand h1 { font-size: 1.02rem; }
  .brand-logo-img { width: 30px; height: 30px; }
  .topbar-user { gap: 6px; min-width: 0; flex-shrink: 1; justify-content: flex-end; }
  .user-pill {
    height: 34px;
    padding: 0 10px;
    font-size: 0.77rem;
    font-weight: 700;
    color: #f8fafc;
    background: rgba(56, 189, 248, 0.16);
    border-color: rgba(56, 189, 248, 0.42);
    white-space: nowrap;
    max-width: 132px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar-controls {
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    width: 100%;
  }
  .month-nav {
    width: 100%;
    height: 38px;
    border-radius: 10px;
  }
  .month-nav button { width: 44px; padding: 0; font-size: 0.92rem; }
  .month-label { flex: 1; font-size: 0.85rem; padding: 0; min-width: 0; }

  /* Barra Inferior com 5 atalhos rápidos (Geral, Extrato, Cartões, Fixas, Metas) */
  .mobile-bottom-nav {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    gap: 4px;
    padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  }
  .m-nav-item {
    padding: 5px 2px;
    font-size: 0.68rem;
  }
  .m-nav-voice-fab {
    display: grid;
    position: fixed;
    right: 14px;
    bottom: calc(68px + env(safe-area-inset-bottom, 0px));
    z-index: 910;
    width: 50px;
    height: 50px;
    margin: 0;
    font-size: 1.3rem;
  }

  /* KPIs 2x2 SIMÉTRICOS COM MESMA ALTURA */
  .kpi-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px;
  }
  .kpi-grid .card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 98px;
    min-width: 0;
    padding: 12px 13px;
    border-radius: 13px;
  }
  .card { padding: 14px; border-radius: 14px; min-width: 0; }
  .kpi-title {
    font-size: 0.67rem;
    min-height: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
  .kpi-val {
    font-size: clamp(1.02rem, 4.5vw, 1.22rem);
    margin: 4px 0 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .kpi-sub {
    font-size: 0.69rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .overview-grid, .overview-charts-col, .charts-grid, .main-grid, .grid-2, .cards-deck-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    gap: 11px;
  }
  .aligned-tx-table, .aligned-card-table {
    table-layout: auto;
  }

  /* BARRA DE VOZ ALINHADA + CHIPS 100% LARGURA */
  .voice-hero { padding: 12px; border-radius: 14px; }
  .voice-row { gap: 9px; align-items: center; }
  .mic-btn { width: 44px; height: 44px; min-width: 44px; font-size: 19px; }
  .voice-input-bar { gap: 6px; }
  .voice-input-bar input {
    height: 44px;
    padding: 0 12px;
    font-size: 16px !important;
    border-radius: 10px;
  }
  #voiceOkBtn {
    height: 44px;
    padding: 0 13px;
    border-radius: 10px;
    flex-shrink: 0;
  }
  .voice-meta {
    padding-left: 0;
    margin-top: 9px;
    width: 100%;
  }
  .chips { width: 100%; gap: 6px; }

  /* FORMULÁRIOS E FILTROS 100% NIVELADOS (44px) */
  input, select, textarea {
    font-size: 16px !important;
  }
  .form-group input, .form-group select {
    height: 44px;
    padding: 0 11px;
    min-width: 0;
    max-width: 100%;
  }
  .form-row-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .form-row-date {
    grid-template-columns: 64px minmax(0, 1fr) 78px;
    gap: 6px;
  }

  /* Filtros do extrato: Busca 100% em cima + 2 selects 50%/50% embaixo! */
  .filters {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .filters input {
    grid-column: 1 / -1;
    width: 100%;
    min-width: 0;
    height: 42px;
  }
  .filters select {
    width: 100%;
    min-width: 0;
    height: 42px;
  }

  /* Substitui tabela larga por Cards Mobile elegantes! */
  .desktop-tx-table { display: none !important; }
  .mobile-tx-list { display: flex; }

  /* Gráfico de pizza empilhado com legenda 100% alinhada */
  .donut-wrap {
    flex-direction: column;
    align-items: center;
    gap: 14px;
  }
  .cat-legend {
    width: 100%;
    min-width: 0;
  }

  /* Card de convite QR centralizado no mobile */
  .invite-qr-row {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .invite-qr-info {
    width: 100%;
    min-width: 0;
  }

  /* Tabelas secundárias (Cartões e Fixas) compactas sem quebrar palavras */
  th, td { padding: 8px 6px; font-size: 0.78rem; }
  td:first-child, td:nth-child(4), td:last-child { white-space: nowrap; }
}

/* ========================================== */
/* ADMIN FINANCEIRO DE VENDAS & PAYWALL PIX   */
/* ========================================== */
.admin-subtabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.admin-subtab-btn {
  background: rgba(15, 23, 42, 0.72);
  border: 1px solid var(--border);
  color: #cbd5e1;
  padding: 9px 14px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.16s ease;
}
.admin-subtab-btn:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: #f8fafc;
}
.admin-subtab-btn.active {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(14, 165, 233, 0.24));
  border-color: rgba(52, 211, 153, 0.6);
  color: #f8fafc;
  box-shadow: 0 4px 14px rgba(16, 185, 129, 0.16);
}
.admin-subpanel { display: none; }
.admin-subpanel.active { display: flex; flex-direction: column; gap: 14px; }

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 12px;
}
.admin-kpi-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-kpi-card small {
  color: #94a3b8;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.admin-kpi-card strong {
  font-size: 1.38rem;
  font-weight: 800;
}
.admin-kpi-card .kpi-note {
  font-size: 0.74rem;
  color: #cbd5e1;
}

.sales-chart-bars {
  display: grid;
  gap: 8px;
  align-items: end;
  min-height: 210px;
  padding: 16px 8px 6px;
  border-radius: 12px;
  background: rgba(11, 18, 36, 0.65);
  border: 1px solid rgba(148, 163, 184, 0.14);
  overflow-x: auto;
}
.sales-bar-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  min-width: 36px;
}
.sales-bar-val {
  font-size: 0.68rem;
  font-weight: 800;
  color: #6ee7b7;
  white-space: nowrap;
}
.sales-bar-track {
  width: 100%;
  max-width: 38px;
  height: 132px;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(148, 163, 184, 0.08);
  border-radius: 8px;
  overflow: hidden;
}
.sales-bar-fill {
  width: 100%;
  border-radius: 8px 8px 3px 3px;
  background: linear-gradient(180deg, #34d399 0%, #0ea5e9 100%);
  transition: height 0.35s ease;
  min-height: 3px;
}
.sales-bar-fill.zero {
  background: rgba(148, 163, 184, 0.22);
  height: 3px !important;
}
.sales-bar-lbl {
  font-size: 0.69rem;
  color: #94a3b8;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}
.sales-bar-cnt {
  font-size: 0.64rem;
  color: #38bdf8;
  font-weight: 700;
}

.pix-paywall-overlay {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: radial-gradient(circle at top, rgba(16, 185, 129, 0.14), rgba(6, 10, 22, 0.97) 60%);
  display: none;
  align-items: center;
  justify-content: center;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
}
.pix-paywall-overlay.show {
  display: flex;
}
.pix-paywall-card {
  width: 100%;
  max-width: 440px;
  margin: auto;
  background: #0f172a;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 20px;
  padding: 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  display: flex;
  flex-direction: column;
  gap: 12px;
  text-align: center;
}
.pix-qr-frame {
  width: 210px;
  height: 210px;
  margin: 0 auto;
  background: #ffffff;
  border-radius: 14px;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 28px rgba(16, 185, 129, 0.2);
}
.pix-qr-frame svg {
  width: 100%;
  height: 100%;
}
.pix-copy-box {
  background: #0b1224;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 10px;
  font-family: monospace;
  font-size: 0.72rem;
  color: #38bdf8;
  word-break: break-all;
  max-height: 76px;
  overflow-y: auto;
  text-align: left;
}
.badge-warn {
  background: rgba(245, 158, 11, 0.18);
  color: #fbbf24;
  border: 1px solid rgba(245, 158, 11, 0.4);
}
.badge-danger {
  background: rgba(244, 63, 94, 0.18);
  color: #fda4af;
  border: 1px solid rgba(244, 63, 94, 0.4);
}

/* ==================================================
   TELA INICIAL DO CONVITE (LANDING PRÉ-CADASTRO)
   ================================================== */
.auth-overlay.invite-landing-mode {
  align-items: flex-start;
  justify-content: center;
  overflow-y: auto;
  padding: 0;
  background:
    radial-gradient(ellipse 85% 38% at 50% -8%, rgba(16, 185, 129, 0.13), transparent),
    #070c16;
  scroll-behavior: smooth;
}

.invite-landing {
  width: 100%;
  min-height: 100%;
  color: #f8fafc;
}

.inv-wrap {
  width: 100%;
  max-width: 470px;
  margin: 0 auto;
  padding: calc(22px + env(safe-area-inset-top, 0px)) 20px calc(44px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
}

.inv-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}

.inv-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.inv-brand-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.inv-brand-name {
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  color: #f8fafc;
}

.inv-login-link {
  background: transparent;
  border: 1px solid rgba(148, 163, 184, 0.22);
  color: #cbd5e1;
  border-radius: 99px;
  padding: 5px 12px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.16s ease;
}

.inv-login-link:hover {
  border-color: #34d399;
  color: #ffffff;
}

.inv-pill {
  align-self: flex-start;
  background: #10182b;
  border: 1px solid rgba(148, 163, 184, 0.2);
  color: #cbd5e1;
  font-size: 0.78rem;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  margin-bottom: 18px;
}

.inv-hero-title {
  font-size: 2.15rem;
  line-height: 1.08;
  font-weight: 900;
  letter-spacing: -0.8px;
  color: #ffffff;
  margin-bottom: 14px;
}

.inv-hero-sub {
  font-size: 0.98rem;
  line-height: 1.5;
  color: #94a3b8;
  margin-bottom: 22px;
}

/* CARD DEMO INTERATIVA POR VOZ */
.inv-demo-card {
  background: rgba(14, 21, 38, 0.9);
  border: 1.5px dashed rgba(148, 163, 184, 0.28);
  border-radius: 18px;
  padding: 18px 16px 14px;
  margin-bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.inv-demo-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-mic-circle {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #10b981);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45);
  animation: invMicPulse 2.2s infinite;
}

@keyframes invMicPulse {
  0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.45); }
  70% { box-shadow: 0 0 0 11px rgba(52, 211, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); }
}

.inv-speech-bubble {
  background: #141f38;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 99px;
  padding: 9px 16px;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.inv-demo-result {
  background: #0d1426;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 14px;
  padding: 14px 15px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.inv-demo-result.switching,
.inv-speech-bubble.switching {
  opacity: 0.25;
  transform: translateY(3px);
}

.inv-demo-res-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.inv-demo-res-left strong {
  font-size: 0.95rem;
  font-weight: 700;
  color: #f8fafc;
}

.inv-demo-res-left span {
  font-size: 0.78rem;
  color: #94a3b8;
}

.inv-demo-res-val {
  font-size: 0.98rem;
  font-weight: 800;
  white-space: nowrap;
}

.inv-demo-res-val.expense { color: #f87171; }
.inv-demo-res-val.income { color: #34d399; }

.inv-demo-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 2px;
}

.inv-demo-live-hint {
  font-size: 0.72rem;
  color: #64748b;
  font-weight: 600;
}

.inv-demo-dots {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-demo-dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  border: none;
  background: rgba(148, 163, 184, 0.3);
  cursor: pointer;
  padding: 0;
  transition: all 0.2s ease;
}

.inv-demo-dot.active {
  width: 20px;
  background: #34d399;
}

/* 3 CARDS DE BENEFÍCIOS */
.inv-features {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-bottom: 30px;
}

.inv-feature-card {
  background: #0f1628;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.inv-feat-icon {
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.inv-feat-body strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.inv-feat-body p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* SEÇÃO TUDO EM UMA TELA + MOCKUP REAL */
.inv-preview-section {
  margin-bottom: 28px;
}

.inv-section-title {
  font-size: 1.24rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.inv-section-sub {
  font-size: 0.88rem;
  color: #94a3b8;
  margin-bottom: 18px;
  line-height: 1.45;
}

.inv-phone-frame {
  max-width: 318px;
  margin: 0 auto;
  background: #050914;
  border: 1.5px solid rgba(148, 163, 184, 0.24);
  border-radius: 30px;
  padding: 11px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(52, 211, 153, 0.08);
}

.inv-phone-notch {
  width: 82px;
  height: 5px;
  background: #1e293b;
  border-radius: 99px;
  margin: 2px auto 10px;
}

.inv-phone-screen {
  background: #090f20;
  border-radius: 20px;
  padding: 12px 11px 10px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  border: 1px solid rgba(34, 49, 84, 0.7);
}

.inv-mock-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.74rem;
  font-weight: 700;
}

.inv-mock-brand { color: #f8fafc; }
.inv-mock-month {
  background: #101930;
  border: 1px solid #223154;
  color: #7dd3fc;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 0.65rem;
}

.inv-mock-kpis {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.inv-mock-kpi {
  background: #10182e;
  border: 1px solid rgba(34, 49, 84, 0.85);
  border-radius: 10px;
  padding: 8px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inv-mock-kpi small {
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #94a3b8;
  font-weight: 700;
}

.inv-mock-kpi strong {
  font-size: 0.84rem;
  font-weight: 800;
}

.inv-mock-kpi strong.blue { color: #38bdf8; }
.inv-mock-kpi strong.green { color: #34d399; }
.inv-mock-kpi strong.red { color: #fb7185; }
.inv-mock-kpi strong.purple { color: #c084fc; }

.inv-mock-card {
  background: #10182e;
  border: 1px solid rgba(34, 49, 84, 0.85);
  border-radius: 11px;
  padding: 9px 10px;
}

.inv-mock-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.69rem;
  font-weight: 700;
  color: #e2e8f0;
  margin-bottom: 8px;
}

.inv-mock-card-head small {
  font-size: 0.63rem;
  color: #94a3b8;
  font-weight: 600;
}

.inv-mock-donut-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.inv-mock-donut {
  flex-shrink: 0;
  transform: rotate(-90deg);
}

.inv-mock-legend {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.66rem;
  color: #cbd5e1;
}

.inv-mock-legend > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.inv-mock-legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
  flex-shrink: 0;
}

.inv-mock-legend span {
  margin-left: auto;
  font-weight: 700;
  color: #f8fafc;
}

.inv-mock-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 6px;
  height: 66px;
  align-items: end;
}

.inv-mb-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
}

.inv-mb-pair {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
}

.inv-mb-pair span {
  width: 7px;
  border-radius: 3px 3px 0 0;
}

.inv-mb-pair span.g { background: linear-gradient(180deg, #34d399, #059669); }
.inv-mb-pair span.r { background: linear-gradient(180deg, #fb7185, #e11d48); }

.inv-mb-col small {
  font-size: 0.58rem;
  color: #64748b;
  font-weight: 600;
}

.inv-mock-nav {
  display: flex;
  align-items: center;
  justify-content: space-around;
  background: #0b1224;
  border: 1px solid rgba(34, 49, 84, 0.8);
  border-radius: 14px;
  padding: 6px 4px;
  font-size: 0.85rem;
}

.inv-mock-mic {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #10b981);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

/* VITRINE INTERATIVA DE PLANOS + TESTE GRÁTIS 7 DIAS */
.inv-plans-section {
  margin-bottom: 28px;
}

.inv-plan-trial-card {
  width: 100%;
  text-align: left;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.16) 0%, rgba(14, 23, 42, 0.96) 100%);
  border: 1.5px solid rgba(52, 211, 153, 0.45);
  border-radius: 16px;
  padding: 14px 15px;
  margin-top: 14px;
  margin-bottom: 12px;
  cursor: pointer;
  color: #f8fafc;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.inv-plan-trial-card:hover {
  border-color: #34d399;
  transform: translateY(-1px);
}

.inv-plan-trial-card.selected {
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.28), 0 12px 26px rgba(16, 185, 129, 0.18);
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24) 0%, rgba(11, 24, 42, 0.98) 100%);
}

.inv-plan-trial-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.inv-plan-trial-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(52, 211, 153, 0.2);
  border: 1px solid rgba(52, 211, 153, 0.55);
  color: #6ee7b7;
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: 0.35px;
  padding: 3px 9px;
  border-radius: 99px;
}

.inv-plan-check {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(148, 163, 184, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 900;
  color: transparent;
  flex-shrink: 0;
  transition: all 0.15s ease;
}

.inv-plan-trial-card.selected .inv-plan-check,
.inv-plan-card.selected .inv-plan-check {
  background: #34d399;
  border-color: #34d399;
  color: #052017;
}

.inv-plan-trial-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inv-plan-trial-main strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 4px;
}

.inv-plan-trial-main p {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
  margin: 0;
}

.inv-plan-trial-price {
  text-align: right;
  flex-shrink: 0;
}

.inv-plan-trial-price span {
  display: block;
  font-size: 1.4rem;
  font-weight: 900;
  color: #34d399;
  line-height: 1.05;
}

.inv-plan-trial-price small {
  font-size: 0.72rem;
  color: #94a3b8;
  font-weight: 600;
}

.inv-plans-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.inv-plan-card {
  position: relative;
  text-align: left;
  background: #0f1628;
  border: 1.5px solid rgba(148, 163, 184, 0.2);
  border-radius: 15px;
  padding: 13px 12px;
  cursor: pointer;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.inv-plan-card:hover {
  border-color: rgba(56, 189, 248, 0.55);
  transform: translateY(-1px);
}

.inv-plan-card.inv-plan-highlight {
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.12) 0%, #0f1628 70%);
  border-color: rgba(52, 211, 153, 0.42);
}

.inv-plan-card.selected {
  border-color: #34d399;
  background: linear-gradient(155deg, rgba(16, 185, 129, 0.22) 0%, rgba(13, 24, 44, 0.98) 100%);
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.28), 0 10px 22px rgba(16, 185, 129, 0.16);
}

.inv-plan-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 3px;
}

.inv-plan-head strong {
  font-size: 0.9rem;
  font-weight: 800;
  color: #f8fafc;
}

.inv-plan-badge {
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
  border: 1px solid rgba(56, 189, 248, 0.35);
  font-size: 0.65rem;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 99px;
  white-space: nowrap;
}

.inv-plan-badge.best {
  background: rgba(245, 158, 11, 0.2);
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.45);
}

.inv-plan-price {
  font-size: 1.32rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.4px;
  line-height: 1.1;
}

.inv-plan-period {
  font-size: 0.74rem;
  color: #94a3b8;
  font-weight: 600;
}

.inv-plan-equiv {
  font-size: 0.72rem;
  color: #6ee7b7;
  font-weight: 700;
  margin-top: 2px;
}

.inv-plans-footnote {
  font-size: 0.75rem;
  color: #94a3b8;
  text-align: center;
  margin-top: 11px;
}

/* SELETOR COMPACTO DE PLANOS DENTRO DO FORMULÁRIO DE CADASTRO */
.reg-plan-selector {
  background: rgba(11, 18, 36, 0.75);
  border: 1px solid rgba(52, 211, 153, 0.3);
  border-radius: 13px;
  padding: 10px;
  margin-bottom: 13px;
}

.reg-plan-title {
  font-size: 0.76rem;
  font-weight: 800;
  color: #a7f3d0;
  margin-bottom: 8px;
}

.reg-plan-trial {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  text-align: left;
  background: rgba(16, 185, 129, 0.1);
  border: 1.5px solid rgba(52, 211, 153, 0.35);
  border-radius: 10px;
  padding: 8px 10px;
  margin-bottom: 7px;
  cursor: pointer;
  color: #f8fafc;
  transition: all 0.15s ease;
}

.reg-plan-trial.selected {
  background: rgba(16, 185, 129, 0.22);
  border-color: #34d399;
  box-shadow: 0 0 0 2px rgba(52, 211, 153, 0.24);
}

.reg-plan-trial .rpt-left strong {
  display: block;
  font-size: 0.82rem;
  font-weight: 800;
  color: #ffffff;
}

.reg-plan-trial .rpt-left span {
  display: block;
  font-size: 0.68rem;
  color: #cbd5e1;
  line-height: 1.3;
  margin-top: 1px;
}

.reg-plan-trial .rpt-price {
  font-size: 0.96rem;
  font-weight: 900;
  color: #34d399;
  flex-shrink: 0;
}

.reg-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.reg-plan-pill {
  text-align: left;
  background: #0f172a;
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 7px 8px;
  cursor: pointer;
  color: #f8fafc;
  transition: all 0.15s ease;
}

.reg-plan-pill:hover {
  border-color: rgba(56, 189, 248, 0.5);
}

.reg-plan-pill.selected {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  box-shadow: 0 0 0 1.5px rgba(52, 211, 153, 0.26);
}

.reg-plan-pill .rpp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}

.reg-plan-pill .rpp-top strong {
  font-size: 0.77rem;
  font-weight: 800;
}

.reg-plan-pill .rpp-tag {
  font-size: 0.6rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 99px;
  background: rgba(56, 189, 248, 0.16);
  color: #7dd3fc;
}

.reg-plan-pill .rpp-tag.best {
  background: rgba(245, 158, 11, 0.22);
  color: #fcd34d;
}

.reg-plan-pill .rpp-price {
  font-size: 0.94rem;
  font-weight: 900;
  color: #ffffff;
  margin-top: 2px;
}

.reg-plan-pill .rpp-sub {
  font-size: 0.65rem;
  color: #94a3b8;
  font-weight: 600;
}

/* SELETOR DE PLANOS DENTRO DO PAYWALL PIX */
.paywall-plan-wrap {
  background: rgba(11, 18, 36, 0.75);
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 12px;
  padding: 9px;
}

.paywall-plan-head {
  font-size: 0.73rem;
  font-weight: 700;
  color: #cbd5e1;
  margin-bottom: 7px;
  text-align: left;
}

.paywall-plan-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}

.pw-plan-btn {
  text-align: left;
  background: #0f172a;
  border: 1.5px solid rgba(148, 163, 184, 0.22);
  border-radius: 10px;
  padding: 7px 9px;
  cursor: pointer;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 1px;
  transition: all 0.15s ease;
}

.pw-plan-btn:hover {
  border-color: rgba(56, 189, 248, 0.55);
}

.pw-plan-btn.pw-best {
  border-color: rgba(245, 158, 11, 0.38);
}

.pw-plan-btn.active {
  background: rgba(16, 185, 129, 0.2);
  border-color: #34d399;
  box-shadow: 0 0 0 1.5px rgba(52, 211, 153, 0.28);
}

.pw-plan-btn:disabled {
  opacity: 0.6;
  cursor: wait;
}

.pw-plan-btn strong {
  font-size: 0.76rem;
  font-weight: 800;
  color: #f8fafc;
}

.pw-plan-btn span {
  font-size: 0.92rem;
  font-weight: 900;
  color: #34d399;
}

.pw-plan-btn small {
  font-size: 0.64rem;
  color: #94a3b8;
  font-weight: 600;
}

/* CARD DE PREÇO */
.inv-price-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14) 0%, rgba(14, 21, 38, 0.96) 100%);
  border: 1.5px solid #34d399;
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 28px;
  box-shadow: 0 12px 32px rgba(16, 185, 129, 0.14);
}

.inv-price-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 6px;
}

.inv-price-val {
  font-size: 2.15rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.8px;
  line-height: 1.05;
}

.inv-price-period {
  font-size: 0.95rem;
  color: #94a3b8;
  font-weight: 600;
}

.inv-price-sub {
  font-size: 0.84rem;
  color: #cbd5e1;
}

/* COMO FUNCIONA */
.inv-steps-section {
  margin-bottom: 24px;
}

.inv-steps-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 14px;
}

.inv-step-item {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.inv-step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #141f38;
  border: 1px solid rgba(148, 163, 184, 0.25);
  color: #f8fafc;
  font-size: 0.82rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}

.inv-step-item strong {
  display: block;
  font-size: 0.94rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 2px;
}

.inv-step-item p {
  font-size: 0.84rem;
  color: #94a3b8;
  line-height: 1.4;
}

/* PRIVACIDADE */
.inv-privacy-card {
  background: #0f1628;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 28px;
}

.inv-priv-icon {
  flex-shrink: 0;
  margin-top: 2px;
}

.inv-privacy-card strong {
  display: block;
  font-size: 0.92rem;
  font-weight: 700;
  color: #f8fafc;
  margin-bottom: 3px;
}

.inv-privacy-card p {
  font-size: 0.82rem;
  color: #94a3b8;
  line-height: 1.42;
}

/* CTAs FINAIS */
.inv-cta-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.inv-cta-primary {
  width: 100%;
  background: linear-gradient(135deg, #34d399, #10b981);
  color: #052017;
  border: none;
  border-radius: 13px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 10px 26px rgba(16, 185, 129, 0.34);
  transition: transform 0.15s ease, filter 0.15s ease;
}

.inv-cta-primary:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

.inv-cta-primary:active {
  transform: translateY(0);
}

.inv-cta-secondary {
  background: none;
  border: none;
  color: #34d399;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
  cursor: pointer;
  padding: 4px 8px;
}

.inv-cta-secondary:hover {
  color: #6ee7b7;
}

/* ==================================================
   MODAL PASSO A PASSO INTERATIVO (ÁREA DO CLIENTE)
   ================================================== */
.guide-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9700;
  background: rgba(4, 8, 18, 0.84);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 14px;
  overflow-y: auto;
}

.guide-modal-card {
  width: 100%;
  max-width: 560px;
  max-height: 90vh;
  margin: auto;
  background: #0f172a;
  border: 1px solid rgba(56, 189, 248, 0.42);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.72);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.guide-modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
}

.guide-progress-track {
  width: 100%;
  height: 5px;
  background: rgba(148, 163, 184, 0.16);
  overflow: hidden;
}

.guide-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #38bdf8, #34d399);
  transition: width 0.35s ease;
}

.guide-modal-body {
  padding: 14px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.guide-section-label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #7dd3fc;
  margin-bottom: 9px;
}

.guide-steps-stack {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.guide-step-row {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  background: #0b1224;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 12px;
  padding: 11px 12px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.guide-step-row.done {
  border-color: rgba(16, 185, 129, 0.42);
  background: rgba(16, 185, 129, 0.06);
}

.guide-step-badge {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.16);
  border: 1px solid rgba(56, 189, 248, 0.45);
  color: #7dd3fc;
  font-size: 0.78rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.guide-step-row.done .guide-step-badge {
  background: rgba(16, 185, 129, 0.22);
  border-color: rgba(52, 211, 153, 0.6);
  color: #34d399;
}

.guide-step-content {
  flex: 1;
  min-width: 0;
}

.guide-step-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.guide-step-top strong {
  font-size: 0.85rem;
  color: #f8fafc;
}

.guide-step-content p {
  font-size: 0.76rem;
  color: #94a3b8;
  line-height: 1.42;
  margin: 0 0 8px;
}

.guide-step-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.guide-mini-btn {
  padding: 5px 10px !important;
  font-size: 0.74rem !important;
  height: auto !important;
  border-radius: 8px !important;
}

.guide-examples-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.guide-example-chip {
  text-align: left;
  background: #0b1224;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 11px;
  padding: 9px 11px;
  cursor: pointer;
  color: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 3px;
  transition: border-color 0.18s ease, transform 0.15s ease, background 0.18s ease;
}

.guide-example-chip:hover {
  border-color: rgba(52, 211, 153, 0.55);
  background: rgba(16, 185, 129, 0.08);
  transform: translateY(-1px);
}

.guide-example-chip.guide-example-static {
  cursor: default;
  border-style: dashed;
}

.guide-example-chip.guide-example-static:hover {
  transform: none;
  border-color: rgba(56, 189, 248, 0.45);
  background: rgba(56, 189, 248, 0.06);
}

.guide-example-chip .ge-tag {
  font-size: 0.7rem;
  font-weight: 700;
  color: #7dd3fc;
}

.guide-example-chip strong {
  font-size: 0.77rem;
  color: #e2e8f0;
  line-height: 1.35;
}

.guide-tip-box {
  margin-top: 13px;
  background: rgba(14, 165, 233, 0.09);
  border: 1px solid rgba(56, 189, 248, 0.32);
  border-radius: 11px;
  padding: 10px 12px;
  font-size: 0.76rem;
  color: #cbd5e1;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.guide-modal-footer {
  padding: 12px 18px 15px;
  border-top: 1px solid rgba(148, 163, 184, 0.14);
}

@media (max-width: 600px) {
  .guide-modal-backdrop {
    padding: 8px;
  }
  .guide-modal-card {
    max-height: 92vh;
    border-radius: 15px;
  }
  .guide-modal-header,
  .guide-modal-body,
  .guide-modal-footer {
    padding-left: 13px;
    padding-right: 13px;
  }
  .guide-examples-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .inv-hero-title { font-size: 1.9rem; }
  .inv-price-val { font-size: 1.95rem; }
}

@media (max-width: 390px) {
  .menu-toggle-btn {
    height: 34px;
    padding: 0 9px;
    gap: 6px;
  }
  .menu-toggle-label {
    font-size: 0.74rem;
  }
  .topbar-left {
    gap: 6px;
  }
  .brand h1 {
    font-size: 0.96rem;
  }
  .brand-logo-img {
    width: 28px;
    height: 28px;
  }
  .user-pill {
    max-width: 112px;
    padding: 0 8px;
    font-size: 0.74rem;
  }
}
