/* FinançasClaras — Mobills Style */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary: #7c3aed; --primary-dark: #5b21b6; --primary-light: #ede9fe;
  --green: #16a34a; --green-light: #dcfce7; --green-vivid: #22c55e;
  --red: #dc2626; --red-light: #fee2e2; --red-vivid: #ef4444;
  --blue: #2563eb; --blue-light: #dbeafe;
  --yellow: #d97706; --yellow-light: #fef3c7;
  --orange: #ea580c; --orange-light: #ffedd5;
  --teal: #0891b2; --teal-light: #cffafe;
  --bg: #f1f5f9; --surface: #fff; --surface2: #f8fafc;
  --text: #0f172a; --text2: #475569; --text3: #94a3b8;
  --border: #e2e8f0; --border2: #cbd5e1;
  --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
  --shadow: 0 1px 3px rgba(0,0,0,.1),0 1px 2px rgba(0,0,0,.06);
  --shadow-md: 0 4px 6px rgba(0,0,0,.07),0 2px 4px rgba(0,0,0,.06);
  --shadow-lg: 0 10px 15px rgba(0,0,0,.1),0 4px 6px rgba(0,0,0,.05);
  --r: 12px; --r-sm: 8px; --r-lg: 16px;
  --sidebar-w: 220px; --topbar-h: 60px; --nav-h: 64px;
}

html { font-size: 15px; }
body { font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; background: var(--bg); color: var(--text); min-height: 100vh; -webkit-font-smoothing: antialiased; }
input, button, select, textarea { font-family: inherit; }
::-webkit-scrollbar { width: 5px; } ::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 99px; }

/* AUTH */
.auth-body { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-screen { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 0; }
.auth-hero { display: flex; flex-direction: column; align-items: center; padding: 32px 24px 24px; color: #fff; text-align: center; }
.auth-logo { width: 72px; height: 72px; background: rgba(255,255,255,.2); border-radius: 22px; display: flex; align-items: center; justify-content: center; font-size: 36px; margin: 0 auto 18px; }
.auth-hero h1 { font-size: 28px; font-weight: 800; margin-bottom: 6px; letter-spacing: -.5px; }
.auth-hero p  { font-size: 14px; opacity: .8; }
.auth-card { background: #fff; border-radius: 20px; padding: 28px 22px 28px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.auth-tabs { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 22px; }
.auth-tab { flex: 1; padding: 9px; border: none; border-radius: 8px; background: transparent; color: var(--text3); font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all .2s; }
.auth-tab.active { background: #fff; color: var(--text); box-shadow: var(--shadow); }

/* LAYOUT */
.sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w); background: #fff; border-right: 1px solid var(--border); display: flex; flex-direction: column; z-index: 100; overflow-y: auto; }
.sidebar-logo { display: flex; align-items: center; gap: 10px; padding: 20px 16px 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.sidebar-logo-icon { font-size: 22px; }
.sidebar-logo-txt  { font-size: 16px; font-weight: 800; color: var(--primary); letter-spacing: -.3px; }
.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 1px; padding: 4px 8px; }
.sidebar-footer { border-top: 1px solid var(--border); padding: 8px; display: flex; flex-direction: column; gap: 1px; }
.snav-label { font-size: 10px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .08em; padding: 12px 12px 4px; }
.snav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: none; border-radius: var(--r-sm); background: transparent; color: var(--text2); font-size: 14px; font-weight: 500; cursor: pointer; font-family: inherit; text-align: left; width: 100%; transition: all .15s; position: relative; }
.snav-item:hover { background: var(--bg); color: var(--text); }
.snav-item.active { background: var(--primary-light); color: var(--primary); font-weight: 700; }
.snav-item.active::before { content:''; position:absolute; left:0; top:4px; bottom:4px; width:3px; background:var(--primary); border-radius:0 3px 3px 0; }
.snav-item span:first-child { font-size: 18px; width: 22px; text-align: center; flex-shrink: 0; }
.sb-badge { background: var(--red-vivid); color: #fff; border-radius: 20px; font-size: 10px; font-weight: 700; padding: 1px 6px; margin-left: auto; }

.app-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.main-content { flex: 1; }
.page { padding: 24px; }

/* TOPBAR desktop */
.desktop-topbar { display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: var(--topbar-h); background: #fff; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 90; }
/* Desktop: esconde elementos mobile */
@media (min-width: 768px) {
  .topbar { display: none !important; }
  .bottom-nav { display: none !important; }
}
.topbar-user { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 6px 10px; border-radius: var(--r-sm); transition: background .15s; }
.topbar-user:hover { background: var(--bg); }
.topbar-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: #fff; flex-shrink: 0; }
.topbar-name { font-size: 14px; font-weight: 600; }

/* FAB desktop */
.fab-btn { position: fixed; bottom: 28px; right: 28px; width: 54px; height: 54px; border-radius: 50%; background: var(--primary); color: #fff; font-size: 26px; border: none; cursor: pointer; box-shadow: 0 4px 20px rgba(124,58,237,.5); z-index: 50; display: flex; align-items: center; justify-content: center; transition: transform .15s; }
.fab-btn:hover { transform: scale(1.08); }

/* MOBILE */
@media (max-width: 767px) {
  .sidebar  { display: none; }
  .app-wrap { margin-left: 0; }
  .fab-btn  { display: none; }

  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; height: var(--topbar-h);
    background: linear-gradient(135deg,#7c3aed,#5b21b6);
    position: sticky; top: 0; z-index: 100;
    box-shadow: 0 2px 8px rgba(124,58,237,.3);
  }
  .topbar-left, .topbar-right { display: flex; align-items: center; gap: 8px; }
  .topbar-title { font-size: 17px; font-weight: 700; color: #fff; }
  .topbar-back { background: rgba(255,255,255,.2); border: none; border-radius: 50%; width: 34px; height: 34px; color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; }
  .topbar-icon { width: 34px; height: 34px; border: none; background: rgba(255,255,255,.2); border-radius: 50%; color: #fff; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; position: relative; }
  .topbar-avatar { width: 34px; height: 34px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 14px; color: #fff; cursor: pointer; border: 2px solid rgba(255,255,255,.4); }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0;
    background: #fff; border-top: 1px solid var(--border);
    height: var(--nav-h); z-index: 100;
  }
  .main-content { padding-bottom: var(--nav-h); }
  .page { padding: 14px; max-width: 100%; }
  .page-inner { padding: 0 14px 14px; max-width: 100%; }
  .desktop-topbar { display: none !important; }
}

/* PAGE HEADER */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; gap: 12px; flex-wrap: wrap; }
.page-title    { font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.page-subtitle { font-size: 13px; color: var(--text3); margin-top: 2px; }

/* STAT CARDS */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); display: flex; align-items: center; gap: 14px; transition: box-shadow .2s,transform .2s; cursor: default; }
.stat-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.stat-icon { width: 48px; height: 48px; border-radius: 14px; flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 22px; }
.stat-icon.blue   { background: var(--blue-light); }
.stat-icon.green  { background: var(--green-light); }
.stat-icon.red    { background: var(--red-light); }
.stat-icon.purple { background: var(--primary-light); }
.stat-icon.yellow { background: var(--yellow-light); }
.stat-info { flex: 1; min-width: 0; }
.stat-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.stat-val   { font-size: 20px; font-weight: 800; letter-spacing: -.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-val.green  { color: var(--green); }
.stat-val.red    { color: var(--red); }
.stat-val.blue   { color: var(--blue); }
.stat-val.purple { color: var(--primary); }
.stat-val.neutral{ color: var(--text); }

/* DASH GRID */
.dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.dash-grid .span2 { grid-column: span 2; }
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } .dash-grid .span2 { grid-column: span 1; } }

/* CARDS */
.card { background: #fff; border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); margin-bottom: 16px; }
.card:last-child { margin-bottom: 0; }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.card-title  { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.card-link   { font-size: 13px; font-weight: 500; color: var(--primary); cursor: pointer; background: none; border: none; font-family: inherit; }
.card-link:hover { text-decoration: underline; }

/* DONUT CHART */
.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut-svg  { flex-shrink: 0; }
.donut-center-text { font-size: 11px; fill: var(--text3); font-family: inherit; font-weight: 600; }
.donut-center-val  { font-size: 14px; fill: var(--text); font-family: inherit; font-weight: 800; }
.donut-legend { flex: 1; min-width: 140px; display: flex; flex-direction: column; gap: 8px; }
.donut-legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.donut-dot  { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.donut-name { flex: 1; color: var(--text2); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-val  { font-weight: 700; color: var(--text); white-space: nowrap; }
.donut-pct  { font-size: 11px; color: var(--text3); min-width: 32px; text-align: right; }

/* BAR CHART (monthly) */
.barchart-wrap { display: flex; flex-direction: column; gap: 2px; }
.barchart-row { display: flex; align-items: center; gap: 10px; padding: 4px 0; }
.barchart-lbl { font-size: 11px; color: var(--text3); font-weight: 600; width: 36px; flex-shrink: 0; text-align: right; }
.barchart-bars { flex: 1; display: flex; flex-direction: column; gap: 3px; }
.barchart-track { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.barchart-fill  { height: 100%; border-radius: 99px; transition: width .6s ease; min-width: 0; }
.barchart-vals  { display: flex; justify-content: space-between; font-size: 11px; color: var(--text3); margin-top: 1px; }

/* MONTH SELECTOR */
.month-selector { background: var(--bg); border: 1.5px solid var(--border); border-radius: 20px; padding: 6px 30px 6px 14px; font-size: 14px; font-weight: 600; color: var(--text); cursor: pointer; font-family: inherit; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; outline: none; }
.month-selector:focus { border-color: var(--primary); }

/* TRANSACTIONS */
.tx-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tx-item:last-child { border-bottom: none; padding-bottom: 0; }
.tx-item:first-child { padding-top: 0; }
.tx-icon { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.tx-icon.receita      { background: var(--green-light); }
.tx-icon.contas       { background: var(--red-light); }
.tx-icon.lazer        { background: var(--yellow-light); }
.tx-icon.investimento { background: var(--blue-light); }
.tx-body { flex: 1; min-width: 0; }
.tx-desc { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-meta { display: flex; align-items: center; gap: 5px; margin-top: 3px; flex-wrap: wrap; }
.tx-date { font-size: 11px; color: var(--text3); }
.tx-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 20px; }
.tx-badge.receita      { background: var(--green-light); color: var(--green); }
.tx-badge.contas       { background: var(--red-light); color: var(--red); }
.tx-badge.lazer        { background: var(--yellow-light); color: var(--yellow); }
.tx-badge.investimento { background: var(--blue-light); color: var(--blue); }
.tx-badge.cat     { background: var(--bg); color: var(--text3); border: 1px solid var(--border); }
.tx-badge.tag     { background: var(--primary-light); color: var(--primary); }
.tx-badge.unpaid  { background: var(--yellow-light); color: var(--yellow); }
.tx-badge.account { background: #f0f9ff; color: #0369a1; border: 1px solid #bae6fd; }
.tx-right   { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex-shrink: 0; }
.tx-amount  { font-size: 15px; font-weight: 700; white-space: nowrap; }
.tx-amount.receita { color: var(--green); }
.tx-amount.despesa { color: var(--red); }
.tx-actions { display: flex; gap: 4px; }

/* BUDGET BARS */
.budget-row { display: flex; align-items: center; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.budget-row:last-child { border-bottom: none; padding-bottom: 0; }
.budget-row:first-child { padding-top: 0; }
.budget-ico { width: 38px; height: 38px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.budget-ico.contas { background: var(--red-light); }
.budget-ico.lazer  { background: var(--yellow-light); }
.budget-ico.invest { background: var(--green-light); }
.budget-body  { flex: 1; min-width: 0; }
.budget-lbl   { font-size: 13px; font-weight: 600; display: flex; justify-content: space-between; margin-bottom: 5px; }
.budget-lbl span { font-size: 12px; font-weight: 500; color: var(--text3); }
.budget-track { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.budget-fill  { height: 100%; border-radius: 99px; transition: width .6s ease; }
.budget-sub   { font-size: 11px; color: var(--text3); margin-top: 4px; display: flex; justify-content: space-between; }

/* GOALS */
.goal-card { background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); margin-bottom: 10px; border-left: 4px solid; }
.goal-header { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.goal-icon { font-size: 24px; } .goal-name { font-size: 14px; font-weight: 700; } .goal-dl { font-size: 11px; color: var(--text3); margin-top: 1px; }
.goal-amounts { display: flex; justify-content: space-between; font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.goal-amounts strong { color: var(--text); font-size: 14px; font-weight: 700; }
.goal-track { height: 8px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.goal-fill  { height: 100%; border-radius: 99px; transition: width .6s ease; }
.goal-pct   { font-size: 12px; font-weight: 700; margin-top: 5px; }
.goal-actions { display: flex; gap: 4px; margin-top: 10px; }

/* ACCOUNTS */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill,minmax(200px,1fr)); gap: 12px; }
.account-card { background: #fff; border-radius: var(--r-lg); padding: 18px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 10px; border-top: 3px solid; transition: box-shadow .2s; }
.account-card:hover { box-shadow: var(--shadow-md); }
.account-top { display: flex; align-items: center; justify-content: space-between; }
.account-icon-wrap { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 20px; }
.account-actions-top { display: flex; gap: 4px; }
.account-name { font-size: 15px; font-weight: 700; } .account-type { font-size: 12px; color: var(--text3); }
.account-bal  { font-size: 22px; font-weight: 800; }
.account-bal.pos { color: var(--green); } .account-bal.neg { color: var(--red); }

/* PENDING */
.pending-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.pending-item:last-child { border-bottom: none; }
.pending-due { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 6px; flex-shrink: 0; }
.pending-due.overdue  { background: var(--red-light);    color: var(--red); }
.pending-due.today    { background: var(--orange-light);  color: var(--orange); }
.pending-due.upcoming { background: var(--yellow-light);  color: var(--yellow); }
.pending-due.future   { background: var(--bg);            color: var(--text3); }

/* MONTH / FILTER STRIPS */
.month-strip, .filter-bar { display: flex; gap: 6px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: none; }
.month-strip::-webkit-scrollbar, .filter-bar::-webkit-scrollbar { display: none; }
.month-chip, .filter-chip { flex-shrink: 0; padding: 6px 14px; border-radius: 20px; border: 1.5px solid var(--border); background: #fff; font-size: 12px; font-weight: 600; color: var(--text2); cursor: pointer; font-family: inherit; transition: all .15s; }
.month-chip:hover, .filter-chip:hover { border-color: var(--primary); color: var(--primary); }
.month-chip.active, .filter-chip.active { background: var(--primary); color: #fff; border-color: var(--primary); }

/* FIELDS */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 11px; font-weight: 700; color: var(--text3); margin-bottom: 5px; text-transform: uppercase; letter-spacing: .05em; }
.field input, .field select, .field textarea { width: 100%; background: var(--bg); border: 1.5px solid var(--border); border-radius: var(--r-sm); padding: 11px 13px; color: var(--text); font-size: 14px; outline: none; transition: border .15s,box-shadow .15s; appearance: none; font-family: inherit; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124,58,237,.12); background: #fff; }
.field select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%2394a3b8' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 36px; }
.field textarea { resize: vertical; min-height: 68px; }
.field-row { display: flex; gap: 10px; } .field-row .field { flex: 1; }
.field-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }
.field-required::after { content: ' *'; color: var(--red); }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 11px 20px; border: none; border-radius: var(--r); font-size: 14px; font-weight: 600; cursor: pointer; transition: all .15s; font-family: inherit; white-space: nowrap; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.btn-primary:hover { background: var(--primary-dark); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-outline { background: transparent; color: var(--text2); border: 1.5px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-sm   { padding: 7px 14px; font-size: 12px; border-radius: var(--r-sm); }
.btn-full { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-icon { width: 32px; height: 32px; padding: 0; border-radius: 8px; background: var(--bg); border: 1.5px solid var(--border); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; font-size: 14px; transition: all .15s; color: var(--text3); font-family: inherit; }
.btn-icon:hover         { background: #fff; box-shadow: var(--shadow); color: var(--text); }
.btn-icon.danger:hover  { background: var(--red-light); border-color: var(--red); color: var(--red); }
.btn-icon.success:hover { background: var(--green-light); border-color: var(--green); color: var(--green); }

/* KIND TOGGLE */
.kind-toggle { display: flex; background: var(--bg); border-radius: 10px; padding: 3px; margin-bottom: 16px; }
.kind-btn { flex: 1; padding: 10px; border: none; border-radius: 8px; background: transparent; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--text3); font-family: inherit; transition: all .2s; }
.kind-btn.active { background: #fff; box-shadow: var(--shadow); }
.kind-btn.receita.active { color: var(--green); }
.kind-btn.despesa.active { color: var(--red); }

/* MODAL */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.5); backdrop-filter: blur(4px); z-index: 500; display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity:0; } }
.sheet { background: #fff; border-radius: 24px 24px 0 0; width: 100%; max-width: 540px; max-height: 95vh; overflow-y: auto; animation: slideUp .3s ease; }
@keyframes slideUp { from { transform: translateY(100%); } }
.sheet-handle { width: 40px; height: 4px; background: var(--border2); border-radius: 2px; margin: 12px auto 0; }
.sheet-header { padding: 14px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.sheet-title  { font-size: 17px; font-weight: 700; }
.sheet-body   { padding: 20px; }
.sheet-footer { padding: 12px 20px 24px; display: flex; gap: 10px; }
@media (min-width: 768px) { .overlay { align-items: center; padding: 20px; } .sheet { border-radius: 20px; max-height: 90vh; } }

/* ALERTS */
.alert { padding: 12px 14px; border-radius: var(--r-sm); font-size: 13px; font-weight: 600; margin-bottom: 14px; display: flex; align-items: flex-start; gap: 8px; border: 1px solid; }
.alert-warn { background: var(--yellow-light); border-color: #fde68a; color: var(--yellow); }
.alert-ok   { background: var(--green-light);  border-color: #a7f3d0; color: var(--green); }
.alert-err  { background: var(--red-light);    border-color: #fca5a5; color: var(--red); }
.alert-info { background: var(--blue-light);   border-color: #93c5fd; color: var(--blue); }

/* SETTINGS */
.profile-hero { background: linear-gradient(135deg,var(--primary),var(--primary-dark)); border-radius: var(--r-lg); padding: 24px 20px; color: #fff; margin-bottom: 16px; display: flex; align-items: center; gap: 16px; }
.profile-avatar { width: 64px; height: 64px; border-radius: 50%; background: rgba(255,255,255,.25); display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 800; color: #fff; border: 3px solid rgba(255,255,255,.4); flex-shrink: 0; }
.profile-name  { font-size: 18px; font-weight: 800; } .profile-email { font-size: 13px; opacity: .85; margin-top: 2px; }
.settings-group { margin-bottom: 10px; }
.settings-label { font-size: 11px; font-weight: 700; color: var(--text3); text-transform: uppercase; letter-spacing: .06em; padding: 0 2px; margin-bottom: 6px; }
.settings-item { display: flex; align-items: center; justify-content: space-between; padding: 13px 16px; background: #fff; border-radius: var(--r); margin-bottom: 3px; cursor: pointer; box-shadow: var(--shadow-sm); border: 1px solid var(--border); width: 100%; font-family: inherit; text-align: left; transition: background .15s; }
.settings-item:hover { background: var(--bg); }
.settings-item-l { display: flex; align-items: center; gap: 12px; }
.settings-icon { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.settings-icon.g { background: var(--green-light); } .settings-icon.b { background: var(--blue-light); }
.settings-icon.y { background: var(--yellow-light); } .settings-icon.r { background: var(--red-light); }
.settings-icon.p { background: var(--primary-light); }
.settings-title { font-size: 14px; font-weight: 600; } .settings-sub { font-size: 12px; color: var(--text3); margin-top: 1px; }

/* TOGGLE */
.toggle { position: relative; width: 44px; height: 24px; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle-sl { position: absolute; inset: 0; background: var(--border2); border-radius: 99px; cursor: pointer; transition: .25s; }
.toggle-sl::before { content:''; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; transition:.25s; }
.toggle input:checked + .toggle-sl { background: var(--primary); }
.toggle input:checked + .toggle-sl::before { transform: translateX(20px); }
.toggle-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 16px; background: #fff; border-radius: var(--r); margin-bottom: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.toggle-row .tl { font-size: 14px; font-weight: 600; } .toggle-row .ts { font-size: 12px; color: var(--text3); margin-top: 3px; }

/* ADMIN */
.user-row { background: #fff; border-radius: var(--r); padding: 14px 16px; margin-bottom: 8px; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.user-row-top { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.user-name-txt { font-size: 14px; font-weight: 700; } .user-email-txt { font-size: 12px; color: var(--text3); margin-top: 1px; }
.user-actions { display: flex; gap: 6px; align-items: center; }

/* PILLS */
.pill { display: inline-flex; align-items: center; gap: 4px; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; }
.pill.active  { background: var(--green-light); color: var(--green); }
.pill.pending { background: var(--yellow-light); color: var(--yellow); }
.pill.blocked { background: var(--red-light); color: var(--red); }
.pill.admin   { background: var(--primary-light); color: var(--primary); }

.chip-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 5px 11px; border-radius: 20px; font-size: 12px; font-weight: 600; background: var(--bg); color: var(--text2); border: 1.5px solid var(--border); }
.chip-x { background: none; border: none; cursor: pointer; color: var(--text3); font-size: 14px; padding: 0; }
.chip-x:hover { color: var(--red); }

.color-row { display: flex; gap: 8px; flex-wrap: wrap; }
.color-opt { width: 28px; height: 28px; border-radius: 50%; cursor: pointer; border: 3px solid transparent; transition: border .15s,transform .15s; }
.color-opt:hover { transform: scale(1.1); }
.color-opt.sel { border-color: var(--text); }

/* MISC */
.sec-row { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.sec-title { font-size: 15px; font-weight: 700; }
.loading { display: flex; flex-direction: column; align-items: center; padding: 60px 40px; color: var(--text3); font-size: 13px; gap: 14px; }
.spinner { width: 32px; height: 32px; border: 3px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.empty { text-align: center; padding: 60px 20px; color: var(--text3); }
.empty-ico   { font-size: 52px; margin-bottom: 14px; }
.empty-title { font-size: 16px; font-weight: 700; color: var(--text); margin-bottom: 7px; }
.empty p     { font-size: 14px; line-height: 1.6; }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-sm { font-size: 12px; color: var(--text3); line-height: 1.6; }
.mb-12 { margin-bottom: 12px; } .mb-16 { margin-bottom: 16px; }

/* TOAST */
.toast-wrap { position: fixed; top: 24px; right: 24px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
@media(max-width:767px) { .toast-wrap { top: 68px; right: auto; left: 50%; transform: translateX(-50%); width: calc(100% - 28px); max-width: 420px; } }
.toast { background: #1e293b; color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 13px; font-weight: 600; box-shadow: 0 8px 24px rgba(0,0,0,.22); animation: toastIn .25s ease; display: flex; align-items: center; gap: 9px; min-width: 220px; }
.toast .dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.toast.ok  .dot { background: var(--green-vivid); } .toast.err .dot { background: var(--red-vivid); } .toast.info .dot { background: var(--blue); }
@keyframes toastIn { from { opacity:0; transform: translateY(-8px) scale(.96); } }

/* CONFIRM */
.confirm-box { background: #fff; border-radius: 20px; padding: 26px 22px; width: 100%; max-width: 360px; margin: auto; animation: slideUp .25s ease; }
.confirm-title { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.confirm-msg   { font-size: 14px; color: var(--text2); margin-bottom: 22px; line-height: 1.5; }
.confirm-row   { display: flex; gap: 10px; }

/* NAV BOTTOM */
.nav-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; border: none; background: transparent; cursor: pointer; color: var(--text3); font-size: 9px; font-weight: 600; font-family: inherit; transition: color .15s; padding: 4px 2px; }
.nav-item.active { color: #7c3aed; }
.nav-item.add { flex: 0 0 68px; }
.nav-add { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg,#7c3aed,#5b21b6); display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; margin-top: -20px; box-shadow: 0 4px 16px rgba(124,58,237,.45); border: 3px solid var(--bg); cursor: pointer; }
.nav-item .ni { font-size: 19px; }

.header-badge { position: absolute; top: -4px; right: -4px; width: 16px; height: 16px; background: var(--red); border-radius: 50%; font-size: 9px; font-weight: 800; color: #fff; display: flex; align-items: center; justify-content: center; border: 2px solid #7c3aed; }

/* HERO mobile */
.hero-card { background: linear-gradient(135deg,#7c3aed,#5b21b6); border-radius: 0 0 20px 20px; padding: 20px 16px 24px; color: #fff; margin-bottom: 14px; overflow: hidden; position: relative; }
.hero-card::before { content:''; position:absolute; top:-50px; right:-50px; width:180px; height:180px; background:rgba(255,255,255,.07); border-radius:50%; }
.hero-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; position: relative; z-index: 1; }
.hero-month { background: rgba(255,255,255,.2); border: 1.5px solid rgba(255,255,255,.3); border-radius: 20px; padding: 6px 28px 6px 12px; color: #fff; font-size: 13px; font-weight: 600; font-family: inherit; appearance: none; outline: none; cursor: pointer; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='white' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.hero-month option { background: #5b21b6; }
.hero-eye { background: rgba(255,255,255,.2); border: none; border-radius: 50%; width: 32px; height: 32px; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 16px; }
.hero-label  { font-size: 12px; opacity: .85; position: relative; z-index: 1; margin-bottom: 4px; }
.hero-amount { font-size: 30px; font-weight: 800; letter-spacing: -1px; position: relative; z-index: 1; margin-bottom: 16px; }
.hero-stats  { display: flex; gap: 10px; position: relative; z-index: 1; }
.hero-stat { flex: 1; background: rgba(255,255,255,.15); border-radius: 12px; padding: 10px 12px; }
.hero-stat-lbl { font-size: 11px; opacity: .8; margin-bottom: 3px; }
.hero-stat-val { font-size: 15px; font-weight: 700; }

/* ── CHART BAR (relatórios) ── */
.chart-bar-wrap  { display: flex; flex-direction: column; gap: 10px; }
.chart-bar-row   { display: flex; align-items: center; gap: 10px; }
.chart-bar-lbl   { font-size: 12px; color: var(--text2); font-weight: 600; width: 100px; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; flex-shrink: 0; }
.chart-bar-track { flex: 1; height: 26px; background: var(--bg); border-radius: 6px; overflow: hidden; }
.chart-bar-fill  { height: 100%; border-radius: 6px; display: flex; align-items: center; padding-right: 8px; justify-content: flex-end; transition: width .5s ease; min-width: 40px; }
.chart-bar-val   { font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; }

/* ── ALERT INFO ── */
.alert-info { background: var(--blue-light); border-color: #93c5fd; color: var(--blue); }

/* Transferência */
.tx-icon.transferencia { background: linear-gradient(135deg,#ede9fe,#ddd6fe); }
.tx-badge.transferencia { background: #ede9fe; color: #7c3aed; }
.tx-amount.transferencia { color: var(--primary); }
