/* =================================================================
   FLUCSUS BANK — Main Stylesheet
   Banco digital premium · sóbrio · mobile-first
   ================================================================= */

/* ─────────────────────────── BASE ─────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  font-size: var(--fs);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  line-height: 1.5;
}
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 600; line-height: 1.25; }
p { margin: 0; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

.hidden { display: none !important; }
.text-positive { color: var(--positive); }
.text-negative { color: var(--negative); }
.text-muted    { color: var(--text-muted); }
.mono          { font-family: var(--font-mono); }

/* ─────────────────────────── BUTTONS ─────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 12px 20px; border: 1px solid transparent;
  border-radius: var(--radius); font-size: var(--fs-md); font-weight: 600;
  background: var(--surface); color: var(--text); cursor: pointer;
  transition: all var(--t); min-height: 44px;
  white-space: nowrap;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: var(--shadow-sm); }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-primary {
  background: var(--brand); color: var(--text-on-brand); border-color: var(--brand);
}
.btn-primary:hover:not(:disabled) { background: var(--brand-strong); border-color: var(--brand-strong); box-shadow: var(--shadow-brand); }
.btn-secondary {
  background: var(--surface); color: var(--text); border-color: var(--border-strong);
}
.btn-secondary:hover:not(:disabled) { background: var(--surface-3); }
.btn-ghost {
  background: transparent; color: var(--text-2); border-color: transparent;
}
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-danger {
  background: var(--negative); color: #fff; border-color: var(--negative);
}
.btn-danger:hover:not(:disabled) { background: #991b1b; }
.btn-success { background: var(--positive); color: #fff; border-color: var(--positive); }
.btn-full { width: 100%; }
.btn-sm { padding: 8px 14px; font-size: var(--fs-sm); min-height: 36px; }
.btn-lg { padding: 16px 28px; font-size: var(--fs-lg); min-height: 52px; }
.btn .btn-loading { display: none; }
.btn.loading .btn-text { display: none; }
.btn.loading .btn-loading { display: inline-flex; align-items: center; gap: 8px; }

/* ─────────────────────────── FORMS ─────────────────────────── */
.field { margin-bottom: var(--s-4); }
.label {
  display: block; font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-2); margin-bottom: 6px;
}
.input, .select, .textarea {
  width: 100%; padding: 12px 14px;
  border: 1px solid var(--border-strong); border-radius: var(--radius);
  background: var(--surface); color: var(--text); font-size: var(--fs-md);
  transition: all var(--t-fast); outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-glow);
}
.input::placeholder { color: var(--text-muted); }
.textarea { resize: vertical; min-height: 90px; }
.input-wrap { position: relative; }
.input-icon {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); cursor: pointer; display: flex;
}
.input-prefix {
  position: absolute; left: 14px; top: 50%; transform: translateY(-50%);
  color: var(--text-3); font-size: var(--fs-sm); pointer-events: none;
}
.input-with-prefix { padding-left: 42px; }

.checkbox { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.checkbox input[type="checkbox"] { margin-top: 3px; accent-color: var(--brand); }

.field-row { display: grid; gap: var(--s-3); }
@media (min-width: 640px) {
  .field-row-2 { grid-template-columns: 1fr 1fr; }
}

/* ─────────────────────────── CARDS ─────────────────────────── */
.card {
  background: var(--surface); border-radius: var(--radius-md);
  padding: var(--s-6); border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}
.card-bare { background: var(--surface); border-radius: var(--radius-md); border: 1px solid var(--border); }
.card-title { font-size: var(--fs-lg); font-weight: 600; margin-bottom: var(--s-4); }
.card-subtitle { font-size: var(--fs-sm); color: var(--text-3); margin-bottom: var(--s-4); }

/* ─────────────────────────── BADGES ─────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: var(--fs-xs); font-weight: 600;
  background: var(--surface-3); color: var(--text-2);
}
.badge-positive { background: var(--positive-bg); color: var(--positive); }
.badge-negative { background: var(--negative-bg); color: var(--negative); }
.badge-warning  { background: var(--warning-bg);  color: var(--warning); }
.badge-info     { background: var(--info-bg);     color: var(--info); }
.badge-brand    { background: var(--brand-soft);  color: var(--brand-strong); }

/* ─────────────────────────── TOAST ─────────────────────────── */
.toast-container {
  position: fixed; top: 20px; right: 20px;
  display: flex; flex-direction: column; gap: 10px;
  z-index: var(--z-toast); pointer-events: none;
}
.toast {
  background: var(--surface); border: 1px solid var(--border);
  border-left: 3px solid var(--text-2); border-radius: var(--radius);
  padding: 14px 18px; min-width: 280px; max-width: 380px;
  box-shadow: var(--shadow-md); pointer-events: auto;
  animation: slideInRight 280ms cubic-bezier(0.16,1,0.3,1);
}
.toast.removing { animation: fadeIn 200ms reverse forwards; }
.toast-title { font-weight: 600; font-size: var(--fs-md); margin-bottom: 2px; }
.toast-msg   { font-size: var(--fs-sm); color: var(--text-3); }
.toast-success { border-left-color: var(--positive); }
.toast-success .toast-title { color: var(--positive); }
.toast-error   { border-left-color: var(--negative); }
.toast-error .toast-title   { color: var(--negative); }
.toast-info    { border-left-color: var(--info); }
.toast-info .toast-title    { color: var(--info); }
.toast-warning { border-left-color: var(--warning); }
.toast-warning .toast-title { color: var(--warning); }
@media (max-width: 720px) {
  .toast-container { top: 12px; left: 12px; right: 12px; }
  .toast { min-width: 0; max-width: 100%; }
}

/* ─────────────────────────── MODAL ─────────────────────────── */
.modal-backdrop {
  position: fixed; inset: 0; background: var(--overlay);
  z-index: var(--z-modal); display: flex; align-items: center; justify-content: center;
  padding: 16px; animation: fadeIn 180ms ease;
}
.modal {
  background: var(--surface); border-radius: var(--radius-md);
  max-width: 480px; width: 100%; max-height: 90vh; overflow: auto;
  box-shadow: var(--shadow-lg); animation: scaleIn 220ms cubic-bezier(0.34,1.56,0.64,1);
}
.modal-lg { max-width: 640px; }
.modal-xl { max-width: 820px; }
.modal-head {
  padding: var(--s-5) var(--s-6);
  border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: space-between;
}
.modal-title { font-size: var(--fs-xl); font-weight: 600; }
.modal-close {
  background: transparent; border: none; cursor: pointer;
  width: 32px; height: 32px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--text-3); font-size: 22px; line-height: 1;
}
.modal-close:hover { background: var(--surface-3); color: var(--text); }
.modal-body { padding: var(--s-6); }
.modal-foot {
  padding: var(--s-4) var(--s-6);
  border-top: 1px solid var(--divider);
  display: flex; gap: var(--s-3); justify-content: flex-end;
}
@media (max-width: 720px) {
  .modal-foot { flex-direction: column-reverse; }
  .modal-foot .btn { width: 100%; }
}

/* ═══════════════════════════════════════════════════════════════
   LOGIN / REGISTER PAGES
   ═══════════════════════════════════════════════════════════════ */
.auth-page {
  min-height: 100vh; display: flex; align-items: center;
  background:
    radial-gradient(ellipse 800px 600px at 100% 0%, rgba(231,8,63,0.06), transparent 60%),
    radial-gradient(ellipse 600px 600px at 0% 100%, rgba(58,2,16,0.06), transparent 60%),
    linear-gradient(180deg, #FAFAFC 0%, #F4F5F7 100%);
  padding: 24px 16px;
}
.auth-wrap {
  width: 100%; max-width: 460px; margin: 0 auto;
}
.auth-card {
  background: var(--surface); border-radius: var(--radius-lg);
  padding: var(--s-8); box-shadow: var(--shadow-lg);
  border: 1px solid var(--border);
}
.auth-logo {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  margin-bottom: var(--s-6);
}
.auth-logo img { height: 36px; }
.auth-tagline {
  font-size: var(--fs-xs); color: var(--text-3); letter-spacing: 0.04em;
  text-transform: uppercase; font-weight: 500;
}
.auth-tabs {
  display: flex; gap: 4px; background: var(--surface-3);
  border-radius: var(--radius); padding: 4px; margin-bottom: var(--s-6);
}
.auth-tab {
  flex: 1; padding: 10px; text-align: center;
  font-size: var(--fs-sm); font-weight: 600; color: var(--text-3);
  border-radius: calc(var(--radius) - 2px); cursor: pointer;
  transition: all var(--t);
}
.auth-tab.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.auth-forgot { font-size: var(--fs-sm); display:inline-block; margin-bottom: var(--s-4); }
.auth-secure {
  display: flex; align-items: center; gap: 6px;
  font-size: var(--fs-xs); color: var(--text-3); justify-content: center;
  margin-top: var(--s-5);
}
.auth-foot {
  text-align: center; margin-top: 16px;
  font-size: var(--fs-xs); color: var(--text-muted);
}
.auth-admin-link {
  text-align: center; margin-top: var(--s-4); font-size: var(--fs-xs); color: var(--text-3);
}

/* Step indicator */
.steps { display: flex; gap: 0; margin-bottom: var(--s-6); }
.step { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; position: relative; }
.step::after { content:''; position:absolute; top:13px; left:50%; width:100%; height:2px; background: var(--border); z-index: 0; }
.step:last-child::after { display: none; }
.step-dot {
  width: 26px; height: 26px; border-radius: 50%; background: var(--surface); border: 2px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 700; color: var(--text-3);
  z-index: 1; transition: all var(--t);
}
.step.active .step-dot { border-color: var(--brand); background: var(--brand); color: #fff; }
.step.done   .step-dot { border-color: var(--positive); background: var(--positive); color: #fff; }
.step-label { font-size: 10px; color: var(--text-muted); }
.step.active .step-label { color: var(--brand); }
.step.done .step-label   { color: var(--positive); }

.reg-step { display: none; animation: fadeInUp 260ms cubic-bezier(0.16,1,0.3,1) both; }
.reg-step.active { display: block; }

.pw-strength { height: 4px; border-radius: 2px; margin-top: 8px; background: var(--border); transition: all 400ms; }
.pw-strength-label { font-size: 11px; margin-top: 4px; color: var(--text-3); }

/* ═══════════════════════════════════════════════════════════════
   APP LAYOUT (CLIENTE)
   ═══════════════════════════════════════════════════════════════ */
.app {
  display: grid; min-height: 100vh;
  grid-template-columns: 240px 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "side header"
    "side main";
}
.app-sidebar {
  grid-area: side;
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column;
  padding: var(--s-5) var(--s-3) var(--s-4);
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
}
.app-sidebar-logo {
  display: flex; align-items: center; gap: 10px;
  padding: 0 12px 8px;
}
.app-sidebar-logo img { height: 26px; }
.app-nav { display: flex; flex-direction: column; gap: 2px; margin-top: var(--s-6); flex: 1; }
.app-nav-group {
  font-size: 10px; letter-spacing: 0.08em; text-transform: uppercase;
  color: rgba(255,255,255,0.35); padding: 16px 12px 8px; font-weight: 600;
}
.app-nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: var(--radius);
  font-size: var(--fs-sm); font-weight: 500;
  color: var(--sidebar-text); cursor: pointer;
  transition: background var(--t), color var(--t);
}
.app-nav-item:hover { background: rgba(255,255,255,0.05); color: #fff; }
.app-nav-item.active { background: var(--sidebar-active); color: var(--sidebar-text-active); }
.app-nav-item.active::before {
  content: ''; width: 3px; height: 18px; background: var(--brand); border-radius: 2px;
  margin-left: -12px; margin-right: 9px;
}
.app-nav-icon { width: 18px; height: 18px; flex-shrink: 0; }
.app-sidebar-foot {
  padding-top: var(--s-4); border-top: 1px solid rgba(255,255,255,0.06);
}
.app-header {
  grid-area: header;
  background: var(--header-bg); border-bottom: 1px solid var(--border);
  height: 64px; padding: 0 var(--s-6);
  display: flex; align-items: center; justify-content: space-between;
  position: sticky; top: 0; z-index: 30;
}
.app-header-title { font-size: var(--fs-xl); font-weight: 600; }
.app-header-actions { display: flex; align-items: center; gap: var(--s-3); }
.avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--brand); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: var(--fs-md); cursor: pointer;
  transition: transform var(--t);
}
.avatar:hover { transform: scale(1.05); }
.icon-btn {
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--surface-3); border: none; color: var(--text-2);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: all var(--t);
}
.icon-btn:hover { background: var(--brand-soft); color: var(--brand); }
.app-main {
  grid-area: main;
  padding: var(--s-6); max-width: 1280px; width: 100%; margin: 0 auto;
}

/* mobile burger */
.mob-burger { display: none; }
.mob-overlay { display: none; }

/* Mobile layout */
@media (max-width: 1024px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-areas:
      "header"
      "main";
  }
  .app-sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 60;
    width: 280px; transform: translateX(-100%);
    transition: transform var(--t-slow);
    box-shadow: var(--shadow-lg);
  }
  .app-sidebar.open { transform: translateX(0); }
  .mob-burger {
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border-radius: 10px;
    background: var(--surface-3); border: none; cursor: pointer;
    color: var(--text); margin-right: 4px;
  }
  .mob-overlay {
    display: none; position: fixed; inset: 0;
    background: var(--overlay); z-index: 55;
  }
  .mob-overlay.open { display: block; }
  .app-header { padding: 0 var(--s-4); }
  .app-main { padding: var(--s-4); padding-bottom: 100px; }
}

/* ═══════════════════════════════════════════════════════════════
   DASHBOARD — Cara de banco
   ═══════════════════════════════════════════════════════════════ */
.dash-grid { display: grid; gap: var(--s-5); }
.dash-grid-2 { grid-template-columns: 1fr 1fr; }
.dash-grid-3 { grid-template-columns: 2fr 1fr; }
@media (max-width: 920px) {
  .dash-grid-2, .dash-grid-3 { grid-template-columns: 1fr; }
}

.welcome {
  display: flex; align-items: center; gap: var(--s-3);
  margin-bottom: var(--s-2);
}
.welcome-title { font-size: var(--fs-2xl); font-weight: 600; }
.welcome-sub { font-size: var(--fs-sm); color: var(--text-3); margin-top: 2px; }

.balance-card {
  background: linear-gradient(135deg, #0B0C12 0%, #1A1D2B 100%);
  color: #fff; padding: var(--s-6) var(--s-7);
  border-radius: var(--radius-lg); position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.balance-card::after {
  content: ''; position: absolute; right: -30px; top: -30px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(231,8,63,0.45) 0%, transparent 60%);
  pointer-events: none;
}
.balance-card-label {
  font-size: var(--fs-xs); letter-spacing: 0.08em; text-transform: uppercase;
  opacity: 0.7; font-weight: 500; margin-bottom: 4px;
}
.balance-card-value {
  font-size: var(--fs-4xl); font-weight: 700; margin: 4px 0;
  font-variant-numeric: tabular-nums;
}
.balance-card-bottom {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: var(--s-5); padding-top: var(--s-4);
  border-top: 1px solid rgba(255,255,255,0.1);
}
.balance-card-acct { font-size: var(--fs-sm); opacity: 0.85; }
.balance-toggle {
  background: rgba(255,255,255,0.1); border: none; color: #fff;
  width: 36px; height: 36px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  transition: background var(--t);
}
.balance-toggle:hover { background: rgba(255,255,255,0.18); }
.balance-blocked {
  font-size: var(--fs-xs); opacity: 0.7; margin-top: 6px;
}

/* atalhos */
.shortcuts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3);
}
@media (max-width: 720px) {
  .shortcuts { grid-template-columns: repeat(4, 1fr); gap: var(--s-2); }
}
.shortcut {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: var(--s-4) var(--s-2);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; cursor: pointer; transition: all var(--t);
  min-height: 90px; justify-content: center;
}
.shortcut:hover {
  transform: translateY(-2px); box-shadow: var(--shadow);
  border-color: var(--brand-soft);
}
.shortcut-icon {
  width: 40px; height: 40px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand);
  display: flex; align-items: center; justify-content: center;
}
.shortcut-label { font-size: var(--fs-sm); font-weight: 500; color: var(--text); }
@media (max-width: 720px) {
  .shortcut-label { font-size: var(--fs-xs); }
  .shortcut { padding: var(--s-3) 6px; min-height: 80px; }
  .shortcut-icon { width: 36px; height: 36px; }
}

/* transações */
.tx-list { display: flex; flex-direction: column; }
.tx-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-3) 0; border-bottom: 1px solid var(--divider);
}
.tx-item:last-child { border-bottom: none; }
.tx-icon {
  width: 38px; height: 38px; border-radius: 12px; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  background: var(--surface-3); color: var(--text-2);
}
.tx-icon.in  { background: var(--positive-bg); color: var(--positive); }
.tx-icon.out { background: var(--negative-bg); color: var(--negative); }
.tx-info { flex: 1; min-width: 0; }
.tx-title {
  font-size: var(--fs-md); font-weight: 500; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.tx-sub {
  font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px;
}
.tx-amount {
  font-size: var(--fs-md); font-weight: 600;
  font-variant-numeric: tabular-nums; flex-shrink: 0;
}
.tx-amount.in  { color: var(--positive); }
.tx-amount.out { color: var(--negative); }

.section-head {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: var(--s-3);
}
.section-head h3 { font-size: var(--fs-lg); font-weight: 600; }
.section-link { font-size: var(--fs-sm); font-weight: 500; }

/* cartão visual */
.bank-card {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-deep) 100%);
  color: #fff; aspect-ratio: 1.586/1; max-width: 320px;
  border-radius: 18px; padding: 18px 22px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
  box-shadow: var(--shadow-md);
}
.bank-card::before {
  content: ''; position: absolute; right: -50px; top: -50px;
  width: 220px; height: 220px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 60%);
}
.bank-card-brand {
  display: flex; justify-content: space-between; align-items: flex-start;
  position: relative; z-index: 1;
}
.bank-card-brand .label { font-size: 11px; opacity: 0.85; }
.bank-card-brand .flag { font-size: var(--fs-md); font-weight: 700; }
.bank-card-chip {
  width: 36px; height: 28px;
  background: linear-gradient(135deg, #FFE6B0 0%, #C0A050 100%);
  border-radius: 5px; position: relative; z-index: 1;
}
.bank-card-num {
  font-family: var(--font-mono); font-size: var(--fs-xl);
  letter-spacing: 0.12em; font-weight: 600; position: relative; z-index: 1;
}
.bank-card-foot {
  display: flex; justify-content: space-between; align-items: flex-end;
  position: relative; z-index: 1; font-size: var(--fs-xs);
}
.bank-card-foot .name { font-weight: 600; text-transform: uppercase; }
.bank-card-foot .exp { font-family: var(--font-mono); }

.empty-state {
  text-align: center; padding: var(--s-8) var(--s-4);
  color: var(--text-3);
}
.empty-state-icon {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--surface-3); color: var(--text-muted);
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: var(--s-4);
}
.empty-state-title { font-size: var(--fs-md); font-weight: 600; color: var(--text-2); margin-bottom: 4px; }
.empty-state-msg   { font-size: var(--fs-sm); margin-bottom: var(--s-4); }

/* ─── Notificações ── */
.notice {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4); border-radius: var(--radius);
  background: var(--warning-bg); border: 1px solid var(--warning);
  border-left: 3px solid var(--warning);
}
.notice.notice-info  { background: var(--info-bg);  border-color: var(--info);  border-left-color: var(--info); }
.notice.notice-brand { background: var(--brand-soft); border-color: var(--brand-soft); border-left-color: var(--brand); }
.notice-body { flex: 1; }
.notice-title { font-weight: 600; font-size: var(--fs-md); margin-bottom: 2px; }
.notice-msg { font-size: var(--fs-sm); color: var(--text-2); }

/* Spending */
.spending-bar {
  height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden;
  margin-top: var(--s-3);
}
.spending-bar-fill {
  height: 100%; background: linear-gradient(90deg, var(--brand) 0%, var(--brand-strong) 100%);
  border-radius: inherit; transition: width var(--t-slow);
}
.spending-cats {
  display: flex; justify-content: space-between; gap: var(--s-3);
  margin-top: var(--s-4); font-size: var(--fs-sm);
}
.spending-cat { display: flex; flex-direction: column; gap: 2px; }
.spending-cat .lbl { color: var(--text-3); font-size: var(--fs-xs); }
.spending-cat .val { font-weight: 600; }

/* ═══════════════════════════════════════════════════════════════
   PIX, TED, BOLETO, CARTÃO, INVESTIMENTOS, etc.
   ═══════════════════════════════════════════════════════════════ */
.page-title {
  font-size: var(--fs-3xl); font-weight: 700; margin-bottom: 6px;
}
.page-sub {
  font-size: var(--fs-md); color: var(--text-3); margin-bottom: var(--s-6);
}

.tabs {
  display: flex; gap: var(--s-1); border-bottom: 1px solid var(--border);
  margin-bottom: var(--s-5); overflow-x: auto;
}
.tab {
  padding: 10px 16px; font-size: var(--fs-sm); font-weight: 500;
  color: var(--text-3); cursor: pointer; border: none; background: transparent;
  border-bottom: 2px solid transparent; white-space: nowrap;
  transition: color var(--t);
}
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab:hover { color: var(--text); }

/* Confirmation summary */
.confirm-row {
  display: flex; justify-content: space-between; padding: 10px 0;
  font-size: var(--fs-sm); border-bottom: 1px solid var(--divider);
}
.confirm-row:last-child { border-bottom: none; }
.confirm-row .lbl { color: var(--text-3); }
.confirm-row .val { font-weight: 500; text-align: right; }
.confirm-amount {
  font-size: var(--fs-3xl); font-weight: 700; text-align: center;
  margin: var(--s-5) 0; color: var(--text);
}

/* Receipt */
.receipt {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--s-7); max-width: 480px; margin: 0 auto;
}
.receipt-success {
  width: 64px; height: 64px; border-radius: 50%;
  background: var(--positive-bg); color: var(--positive);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--s-4);
}
.receipt h3 { text-align: center; font-size: var(--fs-xl); margin-bottom: 4px; }
.receipt .receipt-amount {
  font-size: var(--fs-3xl); font-weight: 700; text-align: center; margin: var(--s-3) 0 var(--s-5);
}
.receipt-id { text-align: center; font-family: var(--font-mono); font-size: var(--fs-xs); color: var(--text-3); }

/* Investment products */
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: var(--s-4); }
.inv-card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  padding: var(--s-5); transition: all var(--t);
  position: relative;
}
.inv-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); border-color: var(--brand-soft); }
.inv-card-tag {
  position: absolute; top: var(--s-4); right: var(--s-4);
  font-size: 10px; padding: 3px 8px; background: var(--brand-soft); color: var(--brand-strong);
  border-radius: var(--radius-full); font-weight: 600;
}
.inv-card-name { font-size: var(--fs-lg); font-weight: 600; margin-bottom: 2px; }
.inv-card-cat  { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.04em; }
.inv-card-rate {
  font-size: var(--fs-2xl); font-weight: 700; color: var(--brand); margin: var(--s-3) 0;
}
.inv-card-info {
  display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-2);
  font-size: var(--fs-xs); margin-bottom: var(--s-4);
}
.inv-card-info .lbl { color: var(--text-3); }
.inv-card-info .val { font-weight: 600; }

/* Support chat */
.support-layout {
  display: grid; grid-template-columns: 320px 1fr; gap: var(--s-4);
  height: calc(100vh - 200px); min-height: 480px;
}
@media (max-width: 920px) { .support-layout { grid-template-columns: 1fr; height: auto; } }
.support-list {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  overflow-y: auto; padding: var(--s-2);
}
.support-list-item {
  padding: var(--s-3); border-radius: var(--radius); cursor: pointer; margin-bottom: 4px;
  transition: background var(--t);
}
.support-list-item:hover { background: var(--surface-3); }
.support-list-item.active { background: var(--brand-soft); }
.support-list-item .name { font-weight: 600; font-size: var(--fs-sm); }
.support-list-item .preview { font-size: var(--fs-xs); color: var(--text-3); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.support-chat {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md);
  display: flex; flex-direction: column;
}
.support-chat-head {
  padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--divider);
  display: flex; align-items: center; justify-content: space-between;
}
.support-chat-msgs {
  flex: 1; overflow-y: auto; padding: var(--s-4) var(--s-5);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.chat-msg { max-width: 75%; display: flex; flex-direction: column; gap: 2px; }
.chat-msg.client { align-self: flex-end; align-items: flex-end; }
.chat-msg.admin  { align-self: flex-start; }
.chat-msg.system { align-self: center; text-align: center; max-width: 100%; }
.chat-bubble {
  padding: 10px 14px; border-radius: var(--radius-md); font-size: var(--fs-sm);
}
.chat-msg.client .chat-bubble {
  background: var(--brand); color: #fff; border-bottom-right-radius: 6px;
}
.chat-msg.admin .chat-bubble {
  background: var(--surface-3); color: var(--text); border-bottom-left-radius: 6px;
}
.chat-msg.system .chat-bubble {
  background: var(--info-bg); color: var(--info); font-style: italic;
}
.chat-meta { font-size: 10px; color: var(--text-muted); padding: 0 6px; }
.support-chat-input {
  padding: var(--s-3) var(--s-4); border-top: 1px solid var(--divider);
  display: flex; gap: var(--s-2);
}

/* Limit bar */
.limit-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--s-5); margin-bottom: var(--s-4);
}
.limit-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: var(--s-3);
}
.limit-name { font-weight: 600; }
.limit-bar { height: 8px; background: var(--surface-3); border-radius: 99px; overflow: hidden; }
.limit-bar-fill { height: 100%; background: var(--brand); transition: width var(--t-slow); }
.limit-info { display: flex; justify-content: space-between; font-size: var(--fs-xs); color: var(--text-3); margin-top: 6px; }

/* ═══════════════════════════════════════════════════════════════
   ADMIN
   ═══════════════════════════════════════════════════════════════ */
.admin-side {
  --sidebar-active: rgba(231, 8, 63, 0.2);
}
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--s-4); }
.kpi-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); padding: var(--s-5);
}
.kpi-label { font-size: var(--fs-xs); color: var(--text-3); text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; }
.kpi-value { font-size: var(--fs-3xl); font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.kpi-sub { font-size: var(--fs-xs); color: var(--text-3); margin-top: 4px; }

/* Table */
.table-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius-md); overflow: hidden;
}
.table {
  width: 100%; border-collapse: collapse;
}
.table th, .table td {
  padding: 12px 16px; text-align: left;
  font-size: var(--fs-sm); border-bottom: 1px solid var(--divider);
}
.table th {
  font-weight: 600; color: var(--text-3); background: var(--surface-2);
  font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.04em;
}
.table tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.table .actions { display: flex; gap: 6px; justify-content: flex-end; }

.table-empty {
  padding: var(--s-8) var(--s-4); text-align: center; color: var(--text-3);
}

/* Mobile: card-like rows */
@media (max-width: 720px) {
  .table-wrap { background: transparent; border: none; }
  .table, .table thead, .table tbody, .table tr, .table th, .table td { display: block; }
  .table thead { display: none; }
  .table tr {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: var(--s-3); margin-bottom: var(--s-3);
  }
  .table td { padding: 6px 0; border-bottom: none; display: flex; justify-content: space-between; gap: 8px; }
  .table td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--text-3); font-weight: 500; text-transform: uppercase; }
}

/* Filter bar */
.filter-bar {
  display: flex; gap: var(--s-3); margin-bottom: var(--s-4); flex-wrap: wrap;
}
.filter-bar .input, .filter-bar .select { max-width: 280px; }
@media (max-width: 720px) {
  .filter-bar .input, .filter-bar .select { max-width: 100%; flex: 1 1 100%; }
}

/* utilidades */
.flex { display: flex; }
.flex-col { display: flex; flex-direction: column; }
.flex-1 { flex: 1; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-5 { margin-top: 20px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-5 { margin-bottom: 20px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-sm { font-size: var(--fs-sm); }
.text-xs { font-size: var(--fs-xs); }
.text-lg { font-size: var(--fs-lg); }
.text-xl { font-size: var(--fs-xl); }
.text-2xl { font-size: var(--fs-2xl); }
.font-semibold { font-weight: 600; }
.font-bold { font-weight: 700; }
.text-2 { color: var(--text-2); }
.text-3 { color: var(--text-3); }
.w-full { width: 100%; }
.border-bottom { border-bottom: 1px solid var(--divider); }
.pb-3 { padding-bottom: 12px; }
.pt-3 { padding-top: 12px; }
.divider { height: 1px; background: var(--divider); margin: var(--s-4) 0; }

/* Loading overlay */
.full-loader {
  position: fixed; inset: 0; background: rgba(244,245,247,0.85);
  display: flex; align-items: center; justify-content: center;
  z-index: var(--z-modal); backdrop-filter: blur(4px);
}
