/* ============================================================
   app.css — Economiza Já Design System
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Variáveis ──────────────────────────────────────────── */
:root {
  --bg:         #ffffff;
  --bg-subtle:  #f9fafb;
  --surface:    #ffffff;
  --surface-2:  #f3f4f6;
  --border:     #e5e7eb;
  --border-sub: #f3f4f6;
  --text:       #111827;
  --text-secondary: #374151;
  --text-muted: #6b7280;
  --text-sub:   #9ca3af;

  --primary:    #10b981;
  --primary-h:  #059669;
  --primary-bg: rgba(16,185,129,.1);
  --violet:     #7c3aed;
  --violet-h:   #6d28d9;
  --violet-bg:  rgba(124,58,237,.1);
  --red:        #ef4444;
  --amber:      #f59e0b;
  --blue:       #3b82f6;

  --radius:     10px;
  --radius-sm:  6px;
  --radius-xl:  16px;
  --shadow:     0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);

  --sidebar-w:  256px;
  --header-h:   56px;
}

[data-theme="dark"] {
  --bg:         #0f0f0f;
  --bg-subtle:  #1a1a1a;
  --surface:    #1a1a1a;
  --surface-2:  #252525;
  --border:     #2d2d2d;
  --border-sub: #222222;
  --text:       #f9fafb;
  --text-secondary: #d1d5db;
  --text-muted: #9ca3af;
  --text-sub:   #6b7280;
  --shadow:     0 1px 3px rgba(0,0,0,.4);
  --shadow-md:  0 4px 6px -1px rgba(0,0,0,.4);
  --shadow-lg:  0 10px 15px -3px rgba(0,0,0,.5);
}

/* ── Reset & Base ───────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  transition: background .2s, color .2s;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button, input, textarea, select { font-family: inherit; }

/* ── Tipografia ─────────────────────────────────────────── */
h1 { font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.15; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); font-weight: 700; line-height: 1.2; }
h3 { font-size: 1.2rem; font-weight: 600; }
p  { color: var(--text-muted); }

.text-gradient-green  { background: linear-gradient(135deg,#10b981,#06d6a0); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }
.text-gradient-violet { background: linear-gradient(135deg,#7c3aed,#a855f7); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; }

/* ── Layout App ─────────────────────────────────────────── */
.app-wrapper { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  border-right: 1px solid var(--border);
  background: var(--surface);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0; bottom: 0;
  z-index: 40;
  transition: transform .25s ease;
}
.sidebar-logo { display: flex; align-items: center; gap: .6rem; padding: 1.1rem 1.25rem; border-bottom: 1px solid var(--border); }
.sidebar-logo-icon { width: 34px; height: 34px; border-radius: 9px; background: linear-gradient(135deg,#10b981,#059669); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1rem; flex-shrink: 0; }
.sidebar-logo span { font-weight: 700; font-size: 1rem; }
.sidebar-nav { flex: 1; padding: .75rem .75rem; display: flex; flex-direction: column; gap: 2px; }
.nav-link { display: flex; align-items: center; gap: .75rem; padding: .6rem .75rem; border-radius: var(--radius-sm); font-size: .875rem; font-weight: 500; color: var(--text-muted); transition: background .15s, color .15s; }
.nav-link:hover { background: var(--bg-subtle); color: var(--text); }
.nav-link.active { background: var(--primary-bg); color: var(--primary); }
.nav-link svg { width: 16px; height: 16px; flex-shrink: 0; }
.sidebar-upgrade { margin: .5rem .75rem; padding: .875rem; background: var(--violet-bg); border: 1px solid rgba(124,58,237,.2); border-radius: var(--radius); }
.sidebar-upgrade p { color: var(--violet); font-size: .75rem; font-weight: 600; margin-bottom: .2rem; }
.sidebar-upgrade span { color: var(--text-muted); font-size: .7rem; }
.sidebar-user { padding: .75rem; border-top: 1px solid var(--border); display: flex; align-items: center; gap: .75rem; }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--primary-bg); color: var(--primary); font-weight: 700; font-size: .875rem; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.avatar-lg { width: 56px; height: 56px; font-size: 1.4rem; }

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

.app-header {
  height: var(--header-h);
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  display: flex; align-items: center;
  padding: 0 1.25rem; gap: .75rem;
  position: sticky; top: 0; z-index: 30;
}
.header-spacer { flex: 1; }

.bottom-nav { display: none; }

/* ── Cards ──────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow);
}
.card-body   { padding: 1.25rem; }
.card-header { padding: 1rem 1.25rem .5rem; border-bottom: 1px solid var(--border-sub); }
.card-header h3 { font-size: .875rem; font-weight: 600; }

.card-hover { transition: transform .2s, box-shadow .2s; cursor: default; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* Stats card */
.stat-card { padding: 1rem 1.25rem; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-bottom: .3rem; }
.stat-value { font-size: 1.3rem; font-weight: 700; }
.stat-sub   { font-size: .75rem; color: var(--text-muted); margin-top: .15rem; }
.stat-change.pos { color: var(--primary); }
.stat-change.neg { color: var(--red); }

/* ── Botões ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .5rem 1rem; border-radius: var(--radius-sm);
  font-size: .875rem; font-weight: 500; cursor: pointer;
  border: 1px solid transparent; transition: all .15s;
  white-space: nowrap; line-height: 1;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm  { padding: .35rem .75rem; font-size: .8rem; }
.btn-lg  { padding: .7rem 1.4rem; font-size: 1rem; }
.btn-xl  { padding: .875rem 2rem; font-size: 1.05rem; font-weight: 600; border-radius: var(--radius); }
.btn-icon { padding: .45rem; border-radius: var(--radius-sm); }

.btn-primary { background: linear-gradient(135deg,#10b981,#059669); color: #fff; }
.btn-primary:hover:not(:disabled) { background: linear-gradient(135deg,#059669,#047857); transform: scale(1.02); }
.btn-violet  { background: linear-gradient(135deg,#7c3aed,#6d28d9); color: #fff; }
.btn-violet:hover:not(:disabled)  { background: linear-gradient(135deg,#6d28d9,#5b21b6); transform: scale(1.02); }
.btn-outline { background: transparent; border-color: var(--border); color: var(--text); }
.btn-outline:hover:not(:disabled) { background: var(--bg-subtle); }
.btn-ghost   { background: transparent; color: var(--text-muted); border-color: transparent; }
.btn-ghost:hover:not(:disabled)   { background: var(--bg-subtle); color: var(--text); }
.btn-danger  { background: var(--red); color: #fff; }
.btn-danger:hover:not(:disabled)  { background: #dc2626; }

/* ── Forms ──────────────────────────────────────────────── */
.form-group  { margin-bottom: 1rem; }
.form-label  { display: block; font-size: .875rem; font-weight: 500; margin-bottom: .35rem; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: .55rem .75rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font-size: .875rem;
  transition: border .15s, box-shadow .15s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(16,185,129,.12);
}
.form-error  { font-size: .78rem; color: var(--red); margin-top: .3rem; }
.form-hint   { font-size: .78rem; color: var(--text-muted); margin-top: .3rem; }

/* ── Badges ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: .25rem;
  padding: .2rem .55rem; border-radius: 999px;
  font-size: .72rem; font-weight: 600; line-height: 1;
}
.badge-green  { background: rgba(16,185,129,.12); color: #059669; }
.badge-red    { background: rgba(239,68,68,.12);  color: #dc2626; }
.badge-amber  { background: rgba(245,158,11,.12); color: #d97706; }
.badge-blue   { background: rgba(59,130,246,.12); color: #2563eb; }
.badge-violet { background: rgba(124,58,237,.12); color: #7c3aed; }
.badge-gray   { background: var(--bg-subtle);     color: var(--text-muted); }
.badge-outline{ background: transparent; border: 1px solid var(--border); color: var(--text-muted); }

/* ── Tabelas ────────────────────────────────────────────── */
.table-wrap  { overflow-x: auto; border-radius: var(--radius-xl); border: 1px solid var(--border); }
table        { width: 100%; border-collapse: collapse; }
thead th     { text-align: left; padding: .75rem 1rem; font-size: .75rem; font-weight: 600; color: var(--text-muted); background: var(--bg-subtle); border-bottom: 1px solid var(--border); white-space: nowrap; }
tbody td     { padding: .75rem 1rem; font-size: .875rem; border-bottom: 1px solid var(--border-sub); }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--bg-subtle); }

/* ── Progress ───────────────────────────────────────────── */
.progress    { height: 6px; background: var(--border); border-radius: 999px; overflow: hidden; }
.progress-bar{ height: 100%; background: var(--primary); border-radius: 999px; transition: width .5s ease; }

/* ── Tabs ───────────────────────────────────────────────── */
.tabs       { display: flex; gap: 2px; background: var(--bg-subtle); border-radius: var(--radius-sm); padding: 3px; width: fit-content; }
.tab-btn    { padding: .4rem .875rem; border-radius: 5px; font-size: .8rem; font-weight: 500; color: var(--text-muted); cursor: pointer; border: none; background: none; transition: all .15s; display: flex; align-items: center; gap: .35rem; }
.tab-btn.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.tab-pane   { display: none; }
.tab-pane.active { display: block; }

/* ── Alerts ─────────────────────────────────────────────── */
.alert { display: flex; align-items: flex-start; gap: .6rem; padding: .7rem 1rem; border-radius: var(--radius); font-size: .875rem; margin-bottom: .75rem; }
.alert-warning { background: rgba(245,158,11,.1); border: 1px solid rgba(245,158,11,.3); color: #92400e; }
.alert-success { background: rgba(16,185,129,.1); border: 1px solid rgba(16,185,129,.3); color: #065f46; }
.alert-info    { background: rgba(59,130,246,.1);  border: 1px solid rgba(59,130,246,.3);  color: #1e40af; }
[data-theme="dark"] .alert-warning { color: #fbbf24; }
[data-theme="dark"] .alert-success { color: #34d399; }
[data-theme="dark"] .alert-info    { color: #60a5fa; }

/* ── Skeleton ───────────────────────────────────────────── */
.skeleton { background: linear-gradient(90deg, var(--border) 25%, var(--border-sub) 50%, var(--border) 75%); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Toast ──────────────────────────────────────────────── */
.toast-container { position: fixed; top: 1rem; right: 1rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: .6rem;
  padding: .75rem 1rem; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: var(--shadow-lg); font-size: .875rem; font-weight: 500;
  pointer-events: auto; animation: slideIn .25s ease;
  max-width: 360px;
}
.toast-success { border-left: 3px solid var(--primary); }
.toast-error   { border-left: 3px solid var(--red); }
.toast-info    { border-left: 3px solid var(--blue); }
@keyframes slideIn { from{transform:translateX(110%);opacity:0} to{transform:none;opacity:1} }

/* ── Modal ──────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.55); backdrop-filter: blur(3px); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 1rem; opacity: 0; pointer-events: none; transition: opacity .2s; }
.modal-overlay.open { opacity: 1; pointer-events: auto; }
.modal-box { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1.5rem; width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); transform: scale(.95); transition: transform .2s; }
.modal-overlay.open .modal-box { transform: scale(1); }
.modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.modal-title  { font-size: 1.05rem; font-weight: 700; }
.modal-footer { display: flex; justify-content: flex-end; gap: .5rem; margin-top: 1.25rem; }

/* ── Dropzone ───────────────────────────────────────────── */
.dropzone {
  border: 2px dashed var(--border); border-radius: var(--radius-xl);
  padding: 2.5rem 1.5rem; text-align: center; cursor: pointer;
  transition: border .2s, background .2s;
}
.dropzone:hover, .dropzone.drag-over { border-color: var(--primary); background: var(--primary-bg); }
.dropzone-icon { font-size: 2.5rem; margin-bottom: .75rem; }
.dropzone p    { font-weight: 500; color: var(--text); margin-bottom: .25rem; }
.dropzone span { font-size: .8rem; color: var(--text-muted); }

/* ── Landing page ───────────────────────────────────────── */
.landing-nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.85); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .landing-nav { background: rgba(15,15,15,.85); }
.landing-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; height: 64px; display: flex; align-items: center; gap: 1rem; }
.nav-links { display: flex; gap: 1.5rem; margin-left: 2rem; }
.nav-links a { font-size: .875rem; color: var(--text-muted); transition: color .15s; }
.nav-links a:hover { color: var(--text); }
.nav-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }

.hero { position: relative; overflow: hidden; }
.hero-grid { position: absolute; inset: 0; background-image: linear-gradient(var(--border) 1px, transparent 1px), linear-gradient(90deg, var(--border) 1px, transparent 1px); background-size: 48px 48px; opacity: .4; }
.hero-inner { max-width: 1200px; margin: 0 auto; padding: 5rem 1.5rem 4rem; display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; background: var(--primary-bg); color: var(--primary); padding: .3rem .8rem; border-radius: 999px; font-size: .8rem; font-weight: 600; margin-bottom: 1.25rem; }
.hero h1   { margin-bottom: 1rem; }
.hero-sub  { font-size: 1.1rem; line-height: 1.7; color: var(--text-muted); margin-bottom: 2rem; }
.hero-ctas { display: flex; gap: .75rem; flex-wrap: wrap; }
.hero-note { font-size: .78rem; color: var(--text-sub); margin-top: .75rem; }

.section   { padding: 5rem 0; }
.section-alt { background: var(--bg-subtle); }
.section-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section-head  { text-align: center; margin-bottom: 3rem; }
.section-head h2 { margin-bottom: .75rem; }
.section-head p  { max-width: 600px; margin: 0 auto; font-size: 1.05rem; }

.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; }
.grid-2 { display: grid; grid-template-columns: repeat(2,1fr); gap: 1.5rem; }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: 1rem; }

.feature-card { padding: 1.5rem; }
.feature-icon { width: 44px; height: 44px; background: var(--primary-bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.2rem; margin-bottom: 1rem; }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p  { font-size: .875rem; line-height: 1.6; }

.step-number { font-size: 3.5rem; font-weight: 900; color: var(--primary); opacity: .12; position: absolute; top: 1rem; right: 1.25rem; line-height: 1; }
.step-card   { padding: 1.5rem; position: relative; overflow: hidden; }
.step-icon   { width: 48px; height: 48px; background: var(--primary-bg); border-radius: var(--radius); display: flex; align-items: center; justify-content: center; font-size: 1.3rem; margin-bottom: 1rem; }

.stats-bar { background: var(--bg-subtle); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 2.5rem 0; }
.stats-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: center; gap: 4rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-item .num { font-size: 2rem; font-weight: 800; color: var(--primary); }
.stat-item .lbl { font-size: .8rem; color: var(--text-muted); }

.plan-cards { display: grid; grid-template-columns: repeat(3,1fr); gap: 1.5rem; max-width: 900px; margin: 0 auto; }
.plan-card  { padding: 1.75rem; position: relative; }
.plan-card.popular { border-color: var(--primary); }
.plan-popular-badge { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: .25rem .75rem; border-radius: 999px; white-space: nowrap; }
.plan-name  { font-weight: 700; font-size: 1.1rem; margin-bottom: .25rem; }
.plan-desc  { font-size: .8rem; color: var(--text-muted); margin-bottom: 1rem; }
.plan-price { margin-bottom: 1.25rem; }
.plan-price .amount { font-size: 2.2rem; font-weight: 800; }
.plan-price .period { font-size: .875rem; color: var(--text-muted); }
.plan-features { list-style: none; display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.5rem; }
.plan-features li { display: flex; align-items: center; gap: .5rem; font-size: .875rem; }
.plan-features li .check { color: var(--primary); font-weight: 700; }
.plan-features li .no    { color: var(--text-sub); }

.testimonial-card { padding: 1.5rem; }
.stars { color: #f59e0b; font-size: .9rem; margin-bottom: .75rem; }
.testimonial-card blockquote { font-size: .875rem; line-height: 1.7; margin-bottom: 1rem; font-style: italic; }
.testimonial-author { display: flex; align-items: center; gap: .75rem; }
.testimonial-author .name { font-weight: 600; font-size: .875rem; }
.testimonial-author .role { font-size: .78rem; color: var(--text-muted); }

.faq-item    { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; margin-bottom: .6rem; }
.faq-question { padding: .875rem 1rem; font-weight: 500; cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background .15s; user-select: none; }
.faq-question:hover { background: var(--bg-subtle); }
.faq-arrow   { transition: transform .2s; font-size: .75rem; color: var(--text-muted); }
.faq-item.open .faq-arrow { transform: rotate(180deg); }
.faq-answer  { padding: 0 1rem; max-height: 0; overflow: hidden; transition: max-height .25s, padding .25s; }
.faq-item.open .faq-answer { max-height: 300px; padding: 0 1rem .875rem; }
.faq-answer p { font-size: .875rem; line-height: 1.7; }

.landing-footer { background: var(--bg-subtle); border-top: 1px solid var(--border); padding: 3rem 0; }
.footer-grid    { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; }
.footer-logo    { display: flex; align-items: center; gap: .5rem; margin-bottom: .75rem; }
.footer-tagline { font-size: .875rem; }
.footer-col h4  { font-size: .8rem; font-weight: 700; color: var(--text); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .75rem; }
.footer-col ul  { list-style: none; display: flex; flex-direction: column; gap: .4rem; }
.footer-col ul a { font-size: .875rem; color: var(--text-muted); transition: color .15s; }
.footer-col ul a:hover { color: var(--text); }
.footer-bottom  { max-width: 1200px; margin: 2rem auto 0; padding: 1rem 1.5rem 0; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .5rem; }
.footer-bottom p { font-size: .8rem; }

/* ── Dashboard mockup na hero ─────────────────────────────── */
.dash-mockup { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 1rem; box-shadow: var(--shadow-lg); }
.mockup-bar  { display: flex; gap: .3rem; margin-bottom: .75rem; }
.mockup-bar span { width: 10px; height: 10px; border-radius: 50%; }
.mockup-stat-row { display: grid; grid-template-columns: repeat(3,1fr); gap: .5rem; margin-bottom: .75rem; }
.mockup-stat { background: var(--bg-subtle); border-radius: 8px; padding: .6rem; }
.mockup-stat .ms-label { font-size: .65rem; color: var(--text-muted); margin-bottom: .15rem; }
.mockup-stat .ms-value { font-size: .9rem; font-weight: 700; color: var(--primary); }
.mockup-chart { background: var(--bg-subtle); border-radius: 8px; padding: .75rem; height: 90px; display: flex; align-items: flex-end; gap: 3px; margin-bottom: .75rem; }
.mockup-bar-item { flex: 1; background: var(--primary); opacity: .35; border-radius: 3px 3px 0 0; }
.mockup-pie { display: flex; gap: .5rem; align-items: center; }
.pie-ring { width: 64px; height: 64px; border-radius: 50%; background: conic-gradient(#10b981 0% 28%, #3b82f6 28% 58%, #f59e0b 58% 68%, #8b5cf6 68% 80%, #6b7280 80% 100%); position: relative; }
.pie-ring::after { content: ''; position: absolute; inset: 16px; background: var(--surface); border-radius: 50%; }
.pie-legend { display: flex; flex-direction: column; gap: .2rem; }
.pie-legend span { font-size: .68rem; color: var(--text-muted); display: flex; align-items: center; gap: .3rem; }
.pie-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; }

/* ── Gauge / Score ─────────────────────────────────────────── */
.gauge-wrapper { position: relative; display: flex; align-items: center; justify-content: center; }
.gauge-text    { position: absolute; text-align: center; }
.gauge-value   { font-size: 1.5rem; font-weight: 800; }
.gauge-label   { font-size: .7rem; color: var(--text-muted); }

/* ── Misc ────────────────────────────────────────────────── */
.icon-btn  { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: .3rem; border-radius: var(--radius-sm); transition: color .15s, background .15s; display: flex; }
.icon-btn:hover { background: var(--bg-subtle); color: var(--text); }
.text-green  { color: var(--primary) !important; }
.text-red    { color: var(--red) !important; }
.text-muted  { color: var(--text-muted) !important; }
.text-small  { font-size: .8rem; }
.text-xs     { font-size: .72rem; }
.font-bold   { font-weight: 700; }
.font-semi   { font-weight: 600; }
.mt-1 { margin-top: .25rem; } .mt-2 { margin-top: .5rem; } .mt-3 { margin-top: .75rem; } .mt-4 { margin-top: 1rem; } .mt-6 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .25rem; } .mb-2 { margin-bottom: .5rem; } .mb-3 { margin-bottom: .75rem; } .mb-4 { margin-bottom: 1rem; } .mb-6 { margin-bottom: 1.5rem; }
.flex   { display: flex; } .flex-col { flex-direction: column; } .items-center { align-items: center; } .justify-between { justify-content: space-between; } .gap-1 { gap: .25rem; } .gap-2 { gap: .5rem; } .gap-3 { gap: .75rem; } .gap-4 { gap: 1rem; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.w-full  { width: 100%; }
.text-center { text-align: center; }
.rounded { border-radius: var(--radius); }
.empty-state { text-align: center; padding: 3rem 1rem; color: var(--text-muted); }
.empty-state .icon { font-size: 3rem; margin-bottom: 1rem; opacity: .3; }
.empty-state p { margin-top: .25rem; font-size: .875rem; }

/* ── Toggle tema ────────────────────────────────────────── */
.theme-btn { width: 36px; height: 36px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; background: none; border: 1px solid var(--border); cursor: pointer; color: var(--text-muted); transition: all .15s; }
.theme-btn:hover { background: var(--bg-subtle); color: var(--text); }
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark  { display: block; }

/* ── Responsivo ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: none; }
  .main-content { margin-left: 0; }
  .hero-inner { grid-template-columns: 1fr; }
  .hero-mockup { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2,1fr); }
  .plan-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .nav-links { display: none; }
  .stats-inner { gap: 2rem; }

  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--border);
  }
  .bottom-nav a { flex: 1; display: flex; flex-direction: column; align-items: center; gap: .2rem; padding: .5rem .25rem; font-size: .62rem; color: var(--text-muted); transition: color .15s; }
  .bottom-nav a.active, .bottom-nav a:hover { color: var(--primary); }
  .bottom-nav svg { width: 20px; height: 20px; }

  .main-content { padding-bottom: 64px; }

  .app-header { padding: 0 1rem; }
  .app-header .page-title { display: none; }
}

@media (max-width: 480px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
}

/* ── Animações ──────────────────────────────────────────── */
.fade-in  { animation: fadeIn .5s ease forwards; }
.slide-up { animation: slideUp .4s ease forwards; }

@keyframes fadeIn  { from{opacity:0} to{opacity:1} }
@keyframes slideUp { from{opacity:0;transform:translateY(16px)} to{opacity:1;transform:none} }

.animate-on-scroll { opacity: 0; transform: translateY(20px); transition: opacity .5s, transform .5s; }
.animate-on-scroll.visible { opacity: 1; transform: none; }

/* ── Loading spinner ─────────────────────────────────────── */
.spinner { width: 20px; height: 20px; border: 2px solid var(--border); border-top-color: var(--primary); border-radius: 50%; animation: spin .6s linear infinite; }
.spinner-lg { width: 40px; height: 40px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Landing Nav ─────────────────────────────────────────── */
.landing-nav { position: fixed; top: 0; left: 0; right: 0; z-index: 50; padding: .75rem 0; transition: background .2s, box-shadow .2s; }
.landing-nav.scrolled { background: var(--surface); box-shadow: var(--shadow); }
.landing-nav-inner { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; gap: 1.5rem; }
.landing-nav-links { display: flex; gap: 1.5rem; margin-left: 1rem; }
.landing-nav-links a { font-size: .875rem; color: var(--text-muted); text-decoration: none; transition: color .15s; }
.landing-nav-links a:hover { color: var(--text); }
.landing-nav-cta { margin-left: auto; display: flex; align-items: center; gap: .75rem; }
.landing-logo { display: flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--text); font-weight: 700; font-size: 1rem; flex-shrink: 0; }

/* ── Landing sections ────────────────────────────────────── */
.landing-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }
.section { padding: 5rem 0; }
.section-title { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.section-subtitle { color: var(--text-muted); font-size: 1rem; }

/* ── Hero ────────────────────────────────────────────────── */
.hero { padding: 7rem 1.5rem 4rem; text-align: center; max-width: 1200px; margin: 0 auto; }
.hero-badge { display: inline-flex; align-items: center; gap: .4rem; padding: .35rem .75rem; background: var(--primary-bg); color: var(--primary); border-radius: 99px; font-size: .8rem; font-weight: 600; margin-bottom: 1.5rem; border: 1px solid rgba(16,185,129,.2); }
.hero-title { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 800; line-height: 1.15; margin-bottom: 1.25rem; }
.hero-subtitle { font-size: 1.05rem; color: var(--text-muted); max-width: 560px; margin: 0 auto 2rem; line-height: 1.6; }
.hero-cta { display: flex; gap: .75rem; justify-content: center; flex-wrap: wrap; }

/* ── Plan cards ──────────────────────────────────────────── */
.plan-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1.5rem; align-items: start; }
.plan-card { background: var(--surface); border: 2px solid var(--border); border-radius: var(--radius-xl); padding: 1.75rem; position: relative; }
.plan-card.featured { border-color: var(--primary); box-shadow: 0 0 0 4px var(--primary-bg); }
.plan-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700; padding: .2rem .75rem; border-radius: 99px; white-space: nowrap; }
.plan-name { font-size: 1.1rem; font-weight: 700; margin-bottom: .5rem; }
.plan-price { font-size: 2rem; font-weight: 800; margin-bottom: 1.25rem; }
.plan-price small { font-size: .85rem; font-weight: 500; color: var(--text-muted); }
.plan-features { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-direction: column; gap: .5rem; }
.plan-features li { font-size: .875rem; display: flex; align-items: center; gap: .5rem; }
.plan-features li.disabled { color: var(--text-muted); }
.plan-features .check { color: var(--primary); font-weight: 700; }

/* ── FAQ ─────────────────────────────────────────────────── */
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: .75rem; overflow: hidden; }
.faq-question { width: 100%; text-align: left; padding: 1rem 1.25rem; font-weight: 600; font-size: .9rem; background: var(--surface); border: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; }
.faq-question::after { content: '+'; font-size: 1.25rem; color: var(--text-muted); transition: transform .2s; }
.faq-item.open .faq-question::after { transform: rotate(45deg); }
.faq-answer { display: none; padding: 0 1.25rem 1rem; font-size: .875rem; color: var(--text-muted); line-height: 1.6; }
.faq-item.open .faq-answer { display: block; }

/* ── Footer ──────────────────────────────────────────────── */
.landing-footer { background: var(--surface); border-top: 1px solid var(--border); padding: 3rem 1.5rem 1.5rem; }

/* ── Auth page ───────────────────────────────────────────── */
.auth-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 1.5rem; background: var(--bg-subtle); }
.auth-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-xl); padding: 2rem; width: 100%; max-width: 420px; box-shadow: var(--shadow-lg); }

/* ── Page body ───────────────────────────────────────────── */
.page-body { padding: 1.5rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1rem; }
.stat-card { padding: 1.25rem; }
.stat-label { font-size: .75rem; color: var(--text-muted); font-weight: 500; margin-bottom: .35rem; }
.stat-value { font-size: 1.5rem; font-weight: 800; line-height: 1.2; }
.stat-change { font-size: .72rem; margin-top: .25rem; font-weight: 600; }
.stat-change.positive { color: var(--primary); }
.stat-change.negative { color: var(--red); }
.card-title { font-size: .9rem; font-weight: 700; }

/* ── Grid layouts ────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }

/* ── Tabs ────────────────────────────────────────────────── */
.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--border); margin-bottom: 1.25rem; overflow-x: auto; }
.tab-btn { padding: .6rem 1rem; font-size: .875rem; font-weight: 500; background: none; border: none; cursor: pointer; color: var(--text-muted); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: color .15s; }
.tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ── Dropzone ────────────────────────────────────────────── */
.dropzone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 2.5rem 1rem; text-align: center; cursor: pointer; transition: border-color .15s, background .15s; }
.dropzone:hover, .dropzone.dragover { border-color: var(--primary); background: var(--primary-bg); }

/* ── Toast ───────────────────────────────────────────────── */
.toast-container { position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 9999; display: flex; flex-direction: column; gap: .5rem; }
.toast { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; border-radius: var(--radius); box-shadow: var(--shadow-lg); font-size: .875rem; min-width: 240px; max-width: 360px; animation: slideUp .2s ease; }
.toast-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.toast-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.toast-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }
.toast-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
[data-theme="dark"] .toast-success { background: #064e3b; color: #6ee7b7; border-color: #065f46; }
[data-theme="dark"] .toast-error   { background: #7f1d1d; color: #fca5a5; border-color: #991b1b; }
[data-theme="dark"] .toast-info    { background: #1e3a5f; color: #93c5fd; border-color: #1e40af; }

/* ── Modal ───────────────────────────────────────────────── */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 100; align-items: center; justify-content: center; padding: 1rem; }
.modal-overlay.open { display: flex; }
.modal { background: var(--surface); border-radius: var(--radius-xl); width: 100%; max-width: 480px; box-shadow: var(--shadow-lg); animation: slideUp .2s ease; }
.modal-header { display: flex; justify-content: space-between; align-items: center; padding: 1.25rem 1.5rem; border-bottom: 1px solid var(--border); }
.modal-title { font-weight: 700; font-size: 1rem; }
.modal-body { padding: 1.25rem 1.5rem; }
.modal-footer { display: flex; justify-content: flex-end; gap: .75rem; padding: 1rem 1.5rem; border-top: 1px solid var(--border); }

/* ── Badge dark-mode overrides ───────────────────────────── */
[data-theme="dark"] .badge-green { background: #064e3b; color: #6ee7b7; }
[data-theme="dark"] .badge-red   { background: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .badge-blue  { background: #1e3a5f; color: #93c5fd; }

/* ── Btn variants ────────────────────────────────────────── */
.btn-xs { padding: .2rem .5rem; font-size: .72rem; }
.btn-ghost { background: none; color: var(--text); }
.btn-ghost:hover { background: var(--bg-subtle); }
.btn-outline { background: none; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { background: var(--bg-subtle); border-color: var(--text-muted); }
.btn-violet { background: var(--violet); color: #fff; }
.btn-violet:hover { background: var(--violet-h); }
.hidden { display: none !important; }
