:root {
  --bg: #f6f8fb;
  --surface: #ffffff;
  --surface-2: #eef4f2;
  --text: #16241e;
  --muted: #68756f;
  --primary: #176b55;
  --primary-2: #0f5946;
  --primary-soft: #dff1ea;
  --danger: #c74747;
  --danger-soft: #fdeaea;
  --warning: #c27a21;
  --warning-soft: #fff3dc;
  --info: #376cc5;
  --info-soft: #eaf1ff;
  --line: #dfe6e2;
  --shadow: 0 16px 45px rgba(32, 56, 46, .09);
  --radius-lg: 24px;
  --radius-md: 16px;
  --radius-sm: 10px;
  --sidebar: 270px;
  --font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }
.container { width: min(1160px, calc(100% - 32px)); margin: 0 auto; }

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; }
.brand-mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 12px; background: var(--primary); color: white; font-weight: 900; }
.button { border: 0; border-radius: 12px; padding: 11px 16px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 700; transition: .2s ease; }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--primary); color: white; box-shadow: 0 8px 18px rgba(23,107,85,.20); }
.button-primary:hover { background: var(--primary-2); }
.button-ghost { background: transparent; color: var(--text); border: 1px solid var(--line); }
.button-light { background: white; color: var(--primary); }
.button-danger { background: var(--danger); color: white; }
.button-sm { padding: 8px 11px; border-radius: 10px; font-size: 13px; }
.button-lg { padding: 14px 20px; }
.full { width: 100%; }
.icon-button { border: 1px solid var(--line); background: white; width: 42px; height: 42px; border-radius: 12px; display: inline-grid; place-items: center; color: var(--text); position: relative; }

.landing-shell { background: white; min-height: 100vh; }
.landing-header { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-nav { display: flex; align-items: center; gap: 24px; color: var(--muted); font-size: 14px; }
.hero { min-height: 640px; display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 72px; padding: 70px 0 90px; }
.eyebrow { display: inline-flex; color: var(--primary); background: var(--primary-soft); padding: 7px 11px; border-radius: 999px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.eyebrow.light { background: rgba(255,255,255,.15); color: white; }
.hero h1 { margin: 18px 0 16px; font-size: clamp(42px, 6vw, 72px); line-height: .98; letter-spacing: -.045em; max-width: 760px; }
.hero p { font-size: 18px; line-height: 1.7; color: var(--muted); max-width: 630px; }
.hero-actions { display: flex; gap: 12px; margin: 28px 0 24px; flex-wrap: wrap; }
.trust-row { display: flex; gap: 18px; flex-wrap: wrap; color: var(--muted); font-size: 13px; }
.hero-preview { border: 1px solid var(--line); border-radius: 28px; background: linear-gradient(180deg,#fff,#f7fbf9); box-shadow: var(--shadow); padding: 22px; transform: rotate(1deg); }
.preview-toolbar { display: flex; gap: 6px; margin-bottom: 18px; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: #cfd8d4; }
.preview-kpis { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.preview-kpis div { background: white; border: 1px solid var(--line); padding: 14px; border-radius: 14px; }
.preview-kpis small, .preview-list { color: var(--muted); }
.preview-kpis strong { display: block; margin-top: 6px; }
.preview-chart { height: 170px; display: flex; align-items: end; gap: 14px; padding: 24px 12px 12px; margin: 18px 0; background: white; border: 1px solid var(--line); border-radius: 16px; }
.preview-chart span { flex: 1; background: linear-gradient(180deg,#49a989,#176b55); border-radius: 8px 8px 3px 3px; }
.preview-list { display: grid; gap: 10px; }
.preview-list div { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; padding: 11px 12px; background: white; border-radius: 12px; border: 1px solid var(--line); }
.preview-list strong { color: var(--text); }
.mini-icon { width: 28px; height: 28px; display: grid; place-items:center; background: var(--primary-soft); border-radius: 9px; }
.section { padding: 96px 0; }
.section-soft { background: #f4f8f6; }
.section-heading { max-width: 700px; margin: 0 auto 42px; text-align: center; }
.section-heading.left { text-align: left; margin: 0; }
.section-heading h2 { font-size: clamp(32px,4vw,48px); margin: 14px 0 0; letter-spacing: -.03em; }
.feature-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 18px; }
.feature-card { background: white; border: 1px solid var(--line); border-radius: 20px; padding: 24px; }
.feature-card > span { font-size: 28px; }
.feature-card h3 { margin: 18px 0 8px; }
.feature-card p, .steps-grid p, .accordion p { color: var(--muted); line-height: 1.65; }
.steps-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 22px; }
.steps-grid article { border-left: 3px solid var(--primary); padding: 8px 24px; }
.steps-grid article > span { display: grid; place-items:center; width: 36px; height: 36px; border-radius: 50%; background: var(--primary-soft); color: var(--primary); font-weight: 800; }
.faq-layout { display: grid; grid-template-columns: .8fr 1.2fr; gap: 70px; }
.accordion details { background: white; border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; margin-bottom: 12px; }
.accordion summary { cursor: pointer; font-weight: 800; }
.cta-section { padding: 28px 0 80px; background: #f4f8f6; }
.cta-box { border-radius: 30px; background: var(--primary); color: white; padding: 48px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.cta-box h2 { font-size: clamp(30px,4vw,50px); margin: 14px 0 0; }
.landing-footer { min-height: 110px; display: flex; align-items: center; justify-content: space-between; color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar { position: fixed; inset: 0 auto 0 0; width: var(--sidebar); background: #102e25; color: #eff8f4; padding: 22px 18px; display: flex; flex-direction: column; z-index: 30; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; }
.brand-sidebar { color: white; }
.brand-sidebar .brand-mark { background: #e6f5ef; color: var(--primary); }
.sidebar-close { display: none; background: rgba(255,255,255,.08); color: white; border-color: rgba(255,255,255,.12); }
.demo-badge { margin: 22px 0 14px; padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,.08); color: #bad6cc; font-size: 12px; text-align: center; }
.sidebar-nav { display: grid; gap: 5px; }
.nav-item { border: 0; background: transparent; color: #b9cec7; padding: 12px 14px; border-radius: 12px; display: flex; align-items: center; gap: 12px; text-align: left; }
.nav-item span { width: 24px; text-align: center; font-size: 18px; }
.nav-item:hover, .nav-item.active { background: rgba(255,255,255,.10); color: white; }
.sidebar-footer { margin-top: auto; display: grid; gap: 12px; }
.profile-card { display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.06); }
.profile-card small { display:block; color:#9fbbb1; margin-top:3px; }
.avatar { width: 38px; height: 38px; border-radius: 12px; display:grid; place-items:center; background:#dff1ea; color:var(--primary); font-weight:800; }
.sidebar .button-ghost { color: white; border-color: rgba(255,255,255,.14); }
.sidebar-backdrop { display:none; }
.app-main { grid-column: 2; min-width: 0; }
.app-header { min-height: 96px; display: flex; align-items: center; gap: 18px; padding: 20px 32px; background: rgba(246,248,251,.92); backdrop-filter: blur(14px); position: sticky; top: 0; z-index: 15; border-bottom: 1px solid rgba(223,230,226,.8); }
.app-header h1 { margin: 2px 0 0; font-size: 26px; }
.page-kicker { margin:0; color:var(--muted); font-size:12px; font-weight:800; text-transform:uppercase; letter-spacing:.05em; }
.header-actions { margin-left:auto; display:flex; align-items:center; gap:10px; }
.notification-dot { position:absolute; width:8px; height:8px; border-radius:50%; background:var(--danger); top:7px; right:7px; border:2px solid white; }
.menu-button { display:none; }
.app-content { padding: 28px 32px 100px; }
.mobile-nav { display:none; }

.grid { display:grid; gap:18px; }
.grid-4 { grid-template-columns: repeat(4,minmax(0,1fr)); }
.grid-3 { grid-template-columns: repeat(3,minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.card { background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-md); box-shadow: 0 8px 30px rgba(40,61,52,.045); }
.card-pad { padding:20px; }
.card-header { display:flex; align-items:center; justify-content:space-between; gap:14px; margin-bottom:18px; }
.card-header h3 { margin:0; font-size:16px; }
.card-header p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.kpi-card { padding:18px; display:flex; justify-content:space-between; gap:14px; min-height:126px; }
.kpi-card > div:first-child { flex:1; min-width:0; }
.kpi-card small { color:var(--muted); }
.kpi-card strong { display:block; font-size:28px; margin:10px 0 8px; letter-spacing:-.03em; }
.kpi-meta { font-size:12px; color:var(--muted); }
.kpi-delta { display:inline-flex; align-items:center; gap:3px; font-size:11.5px; font-weight:800; }
.kpi-delta.good { color:#1a8f4f; }
.kpi-delta.bad { color:var(--danger); }
.kpi-delta.neutral { color:var(--muted); font-weight:700; }
.kpi-spark { display:block; width:100%; height:26px; margin-top:4px; }
.kpi-icon { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:var(--primary-soft); font-size:20px; }
.kpi-card.danger .kpi-icon { background:var(--danger-soft); }
.kpi-card.warning .kpi-icon { background:var(--warning-soft); }
.kpi-card.info .kpi-icon { background:var(--info-soft); }
.section-grid { display:grid; grid-template-columns: 1.35fr .65fr; gap:18px; margin-top:18px; }
.chart-wrap { min-height:290px; }
.chart-box { position:relative; height:240px; }
.bar-chart { height:220px; display:flex; align-items:end; gap:16px; padding:16px 8px 34px; border-bottom:1px solid var(--line); position:relative; }
.bar-pair { flex:1; height:100%; display:flex; align-items:end; justify-content:center; gap:5px; position:relative; }
.bar { width:34%; min-width:10px; border-radius:8px 8px 3px 3px; }
.bar.income { background:#2f9b79; }
.bar.expense { background:#f0a54e; }
.bar-label { position:absolute; bottom:-28px; font-size:11px; color:var(--muted); }
.chart-legend { display:flex; gap:16px; margin-top:14px; color:var(--muted); font-size:12px; }
.legend-dot { display:inline-block; width:9px; height:9px; border-radius:50%; margin-right:6px; }
.legend-income { background:#2f9b79; }
.legend-expense { background:#f0a54e; }
.donut-layout { display:grid; grid-template-columns:150px 1fr; align-items:center; gap:18px; }
.donut-box { position:relative; width:150px; height:150px; margin:auto; }
.donut { width:138px; height:138px; border-radius:50%; position:relative; margin:auto; }
.donut::after { content:""; position:absolute; inset:24px; background:white; border-radius:50%; }
.donut-center { position:absolute; inset:0; display:grid; place-items:center; z-index:1; text-align:center; }
.donut-center strong { font-size:20px; display:block; white-space:nowrap; }
.donut-center small { color:var(--muted); display:block; margin-top:2px; }
.category-legend { display:grid; gap:10px; }
.category-legend div { display:grid; grid-template-columns:10px 1fr auto; align-items:center; gap:9px; font-size:13px; }
.category-legend span:first-child { width:9px; height:9px; border-radius:50%; }
.list { display:grid; }
.list-row { display:grid; grid-template-columns:44px minmax(0,1fr) auto; gap:12px; align-items:center; padding:13px 0; border-bottom:1px solid var(--line); }
.list-row:last-child { border-bottom:0; }
.list-icon { width:40px; height:40px; border-radius:13px; display:grid; place-items:center; background:var(--surface-2); }
.due-list { display:grid; max-height:360px; overflow-y:auto; }
.due-row { display:grid; grid-template-columns:46px minmax(0,1fr) auto; gap:12px; align-items:center; padding:11px 0; border-bottom:1px solid var(--line); }
.due-row:last-child { border-bottom:0; }
.due-date { text-align:center; background:var(--surface-2); border-radius:10px; padding:6px 2px; }
.due-date strong { display:block; font-size:16px; line-height:1.1; }
.due-date small { font-size:10px; color:var(--muted); text-transform:uppercase; font-weight:700; }
.due-amount { text-align:right; display:grid; gap:5px; justify-items:end; }
.list-main strong { display:block; }
.list-main small { color:var(--muted); display:block; margin-top:4px; }
.amount { font-weight:800; }
.amount.expense { color:var(--danger); }
.amount.income { color:var(--primary); }
.badge { display:inline-flex; align-items:center; padding:5px 8px; border-radius:999px; font-size:11px; font-weight:800; }
.badge-success { background:var(--primary-soft); color:var(--primary); }
.badge-warning { background:var(--warning-soft); color:var(--warning); }
.badge-danger { background:var(--danger-soft); color:var(--danger); }
.badge-info { background:var(--info-soft); color:var(--info); }
.progress { height:9px; border-radius:999px; background:#edf1ef; overflow:hidden; }
.progress > span { display:block; height:100%; border-radius:inherit; background:var(--primary); }
.progress.warning > span { background:var(--warning); }
.progress.danger > span { background:var(--danger); }
.goal-card, .budget-card, .category-card { padding:18px; }
.goal-top, .budget-top, .category-top { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; }
.goal-icon, .category-icon { width:44px; height:44px; border-radius:14px; display:grid; place-items:center; background:var(--primary-soft); font-size:20px; }
.goal-values, .budget-values { display:flex; justify-content:space-between; color:var(--muted); font-size:12px; margin:12px 0 8px; }
.goal-values strong, .budget-values strong { color:var(--text); }
.card-actions { display:flex; gap:6px; }
.card-action { width:34px; height:34px; border:1px solid var(--line); background:white; border-radius:10px; display:grid; place-items:center; }
.toolbar { display:flex; gap:10px; flex-wrap:wrap; margin-bottom:18px; }
.input, .select, .textarea { width:100%; border:1px solid var(--line); background:white; border-radius:12px; padding:11px 12px; color:var(--text); outline:none; }
.input:focus, .select:focus, .textarea:focus { border-color:#7ab9a5; box-shadow:0 0 0 3px rgba(23,107,85,.08); }
.search-wrap { flex:1; min-width:220px; position:relative; }
.search-wrap .input { padding-left:38px; }
.search-wrap::before { content:"⌕"; position:absolute; left:13px; top:10px; color:var(--muted); }
.table-card { overflow:hidden; }
.table-wrap { overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th, td { padding:14px 16px; border-bottom:1px solid var(--line); text-align:left; white-space:nowrap; font-size:13px; }
th { background:#f8faf9; color:var(--muted); font-size:11px; text-transform:uppercase; letter-spacing:.05em; }
tr:last-child td { border-bottom:0; }
.table-actions { display:flex; gap:6px; }
.empty { padding:44px 20px; text-align:center; color:var(--muted); }
.empty strong { display:block; color:var(--text); font-size:18px; margin-bottom:8px; }
.alert-card { padding:16px; display:grid; grid-template-columns:42px 1fr auto; gap:12px; align-items:start; }
.alert-icon { width:40px; height:40px; border-radius:13px; display:grid; place-items:center; }
.alert-card.warning .alert-icon { background:var(--warning-soft); }
.alert-card.danger .alert-icon { background:var(--danger-soft); }
.alert-card.info .alert-icon { background:var(--info-soft); }
.alert-card.success .alert-icon { background:var(--primary-soft); }
.alert-card p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.alert-card small { color:var(--muted); }
.page-actions { display:flex; justify-content:space-between; align-items:center; gap:14px; margin-bottom:18px; }
.page-actions p { margin:4px 0 0; color:var(--muted); }
.settings-list { display:grid; gap:12px; }
.setting-row { padding:16px; display:flex; justify-content:space-between; gap:16px; align-items:center; border-bottom:1px solid var(--line); }
.setting-row:last-child { border-bottom:0; }
.setting-row p { margin:4px 0 0; color:var(--muted); font-size:13px; }
.toggle { width:46px; height:26px; border-radius:999px; background:#cfd8d4; border:0; position:relative; }
.toggle::after { content:""; position:absolute; width:20px; height:20px; top:3px; left:3px; background:white; border-radius:50%; box-shadow:0 2px 6px rgba(0,0,0,.15); transition:.2s; }
.toggle.on { background:var(--primary); }
.toggle.on::after { left:23px; }
.report-card { padding:20px; }
.report-card strong { font-size:26px; display:block; margin:8px 0; }
.report-card p { color:var(--muted); margin:0; }

.modal-backdrop { position:fixed; inset:0; background:rgba(12,28,22,.55); backdrop-filter:blur(5px); display:none; align-items:center; justify-content:center; padding:18px; z-index:100; }
.modal-backdrop.open { display:flex; }
.modal { width:min(620px,100%); max-height:90vh; overflow:auto; background:white; border-radius:22px; box-shadow:0 28px 80px rgba(0,0,0,.28); }
.modal-header { padding:20px 22px; display:flex; align-items:center; justify-content:space-between; border-bottom:1px solid var(--line); }
.modal-header h2 { margin:4px 0 0; }
.modal-body { padding:22px; }
.form-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.form-group { display:grid; gap:7px; }
.form-group.full { grid-column:1/-1; }
.form-group label { font-size:12px; font-weight:800; color:var(--muted); }
.form-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:10px; margin-top:8px; }
.toast { position:fixed; right:22px; bottom:22px; background:#173b30; color:white; padding:14px 18px; border-radius:12px; box-shadow:var(--shadow); opacity:0; transform:translateY(12px); pointer-events:none; transition:.25s; z-index:120; }
.toast.show { opacity:1; transform:translateY(0); }

.auth-shell { min-height:100vh; display:grid; place-items:center; padding:24px; background:var(--bg); }
.auth-card { width:min(420px,100%); background:var(--surface); border:1px solid var(--line); border-radius:var(--radius-lg); box-shadow:var(--shadow); padding:32px; display:grid; gap:22px; }
.auth-card .brand { justify-self:start; }
#auth-content h2 { margin:0 0 6px; }
#auth-content > p { margin:0 0 18px; color:var(--muted); }
#auth-content form { display:grid; gap:14px; }
.auth-error { color:var(--danger); font-size:13px; min-height:1em; }
.auth-switch { text-align:center; color:var(--muted); font-size:14px; margin:0; }
.auth-switch a, #auth-content a { color:var(--primary); font-weight:700; }
.auth-actions-row { display:flex; justify-content:space-between; align-items:center; gap:12px; }
.auth-success { background:var(--primary-soft); color:var(--primary); padding:14px; border-radius:12px; font-size:14px; }

.onboarding-steps { display:flex; gap:8px; justify-self:start; }
.onboarding-steps span { width:28px; height:6px; border-radius:999px; background:var(--line); }
.onboarding-steps span.done, .onboarding-steps span.active { background:var(--primary); }
#onboarding-content h2 { margin:0 0 6px; }
#onboarding-content > p { margin:0 0 18px; color:var(--muted); }
#onboarding-content form { display:grid; gap:14px; }
.account-type-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
.account-type-grid label { display:flex; flex-direction:column; align-items:center; gap:6px; padding:12px 6px; border:1px solid var(--line); border-radius:12px; cursor:pointer; font-size:12px; text-align:center; }
.account-type-grid input { position:absolute; opacity:0; }
.account-type-grid input:checked + span { color:var(--primary); font-weight:800; }
.account-type-grid label:has(input:checked) { border-color:var(--primary); background:var(--primary-soft); }

@media (max-width: 1080px) {
  .feature-grid { grid-template-columns:repeat(2,1fr); }
  .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .section-grid { grid-template-columns:1fr; }
}

@media (max-width: 820px) {
  .landing-nav { display:none; }
  .hero { grid-template-columns:1fr; gap:42px; padding-top:50px; }
  .faq-layout { grid-template-columns:1fr; gap:36px; }
  .cta-box { align-items:flex-start; flex-direction:column; }
  .app-shell { display:block; }
  .sidebar { transform:translateX(-105%); transition:.25s ease; width:min(300px,88vw); }
  .sidebar.open { transform:translateX(0); }
  .sidebar-close { display:grid; }
  .sidebar-backdrop { position:fixed; inset:0; background:rgba(0,0,0,.38); z-index:25; }
  .sidebar-backdrop.open { display:block; }
  .app-main { min-height:100vh; }
  .menu-button { display:grid; }
  .app-content { padding:22px 18px 100px; }
  .app-header { padding:16px 18px; min-height:82px; }
  .app-header .button-primary { display:none; }
  .mobile-nav { display:grid; grid-template-columns:repeat(5,1fr); position:fixed; bottom:0; left:0; right:0; z-index:20; background:white; border-top:1px solid var(--line); min-height:70px; padding:8px 8px max(8px,env(safe-area-inset-bottom)); box-shadow:0 -12px 35px rgba(36,56,48,.08); }
  .mobile-nav button { border:0; background:transparent; color:var(--muted); display:grid; place-items:center; gap:2px; }
  .mobile-nav button.active { color:var(--primary); }
  .mobile-nav span { font-size:19px; }
  .mobile-nav small { font-size:10px; }
  .mobile-nav .mobile-add span { width:46px; height:46px; border-radius:15px; background:var(--primary); color:white; font-size:28px; transform:translateY(-10px); box-shadow:0 8px 18px rgba(23,107,85,.28); }
  .grid-3 { grid-template-columns:repeat(2,minmax(0,1fr)); }
}

@media (max-width: 620px) {
  .landing-header .button { display:none; }
  .hero { padding:34px 0 64px; }
  .hero h1 { font-size:44px; }
  .preview-kpis { grid-template-columns:1fr; }
  .feature-grid, .steps-grid, .grid-4, .grid-3, .grid-2 { grid-template-columns:1fr; }
  .steps-grid article { padding-right:0; }
  .landing-footer { flex-direction:column; align-items:flex-start; justify-content:center; gap:10px; }
  .app-header h1 { font-size:21px; }
  .header-actions .icon-button { width:38px; height:38px; }
  .kpi-card { min-height:112px; }
  .kpi-card strong { font-size:25px; }
  .donut-layout { grid-template-columns:1fr; }
  .page-actions { align-items:flex-start; flex-direction:column; }
  .page-actions .button { width:100%; }
  .toolbar > * { width:100%; }
  .form-grid { grid-template-columns:1fr; }
  .form-group.full { grid-column:auto; }
  .form-actions { grid-column:auto; flex-direction:column-reverse; }
  .form-actions .button { width:100%; }
  .alert-card { grid-template-columns:42px 1fr; }
  .alert-card > small { grid-column:2; }
}

/* ---------- Assistente financeiro (widget flutuante) ---------- */
.assistant-widget { position:fixed; right:22px; bottom:22px; z-index:90; display:flex; flex-direction:column; align-items:flex-end; gap:12px; }
.assistant-fab { width:58px; height:58px; border-radius:50%; background:var(--primary); color:white; border:0; display:grid; place-items:center; font-size:24px; box-shadow:0 14px 30px rgba(23,107,85,.32); transition:.2s ease; }
.assistant-fab:hover { transform:translateY(-2px); box-shadow:0 18px 36px rgba(23,107,85,.38); }
.assistant-panel { width:min(380px,calc(100vw - 32px)); height:min(560px,calc(100vh - 110px)); background:var(--surface); border-radius:var(--radius-lg); box-shadow:0 28px 80px rgba(0,0,0,.28); border:1px solid var(--line); display:flex; flex-direction:column; overflow:hidden; }
.assistant-panel[hidden] { display:none; }
.assistant-panel-header { padding:16px 18px; display:flex; align-items:flex-start; justify-content:space-between; gap:10px; background:var(--primary); color:white; }
.assistant-panel-header strong { display:block; font-size:15px; }
.assistant-panel-header small { color:rgba(255,255,255,.78); font-size:12px; }
.assistant-panel-header .icon-button { background:rgba(255,255,255,.14); border-color:transparent; color:white; width:32px; height:32px; }
.assistant-messages { flex:1; overflow-y:auto; padding:16px; display:flex; flex-direction:column; gap:10px; background:var(--bg); }
.assistant-msg { max-width:85%; padding:10px 13px; border-radius:16px; font-size:13.5px; line-height:1.45; white-space:pre-wrap; }
.assistant-msg.user { align-self:flex-end; background:var(--primary); color:white; border-bottom-right-radius:4px; }
.assistant-msg.assistant { align-self:flex-start; background:var(--surface); border:1px solid var(--line); border-bottom-left-radius:4px; }
.assistant-msg.error { align-self:flex-start; background:var(--danger-soft); color:var(--danger); border:1px solid transparent; }
.assistant-msg.typing { display:flex; gap:4px; align-items:center; padding:13px; }
.assistant-msg.typing span { width:6px; height:6px; border-radius:50%; background:var(--muted); opacity:.5; animation:assistant-typing 1s infinite ease-in-out; }
.assistant-msg.typing span:nth-child(2) { animation-delay:.15s; }
.assistant-msg.typing span:nth-child(3) { animation-delay:.3s; }
@keyframes assistant-typing { 0%, 60%, 100% { transform:translateY(0); opacity:.5; } 30% { transform:translateY(-4px); opacity:1; } }
.assistant-empty { margin:auto; text-align:center; color:var(--muted); font-size:13px; padding:0 12px; }
.assistant-input-row { display:flex; gap:8px; padding:12px; border-top:1px solid var(--line); background:var(--surface); }
.assistant-input-row input { flex:1; border:1px solid var(--line); border-radius:12px; padding:10px 13px; outline:none; font-size:13.5px; }
.assistant-input-row input:focus { border-color:#7ab9a5; box-shadow:0 0 0 3px rgba(23,107,85,.08); }
.assistant-input-row button { padding:10px 16px; }
.assistant-input-row button:disabled, .assistant-input-row input:disabled { opacity:.6; cursor:default; }
@media (max-width:820px) { .assistant-widget { bottom:90px; } }
@media (max-width:460px) { .assistant-panel { width:calc(100vw - 24px); right:-10px; } }
