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

:root {
  color-scheme: light;
  --navy-950: #0b1f33;
  --navy-900: #102a43;
  --navy-800: #173f5f;
  --navy-700: #245675;
  --teal-800: #0f766e;
  --teal-700: #0d9488;
  --teal-600: #14b8a6;
  --mint-100: #d9f5eb;
  --mint-50: #effaf6;
  --ink: #172b3a;
  --muted: #718096;
  --line: #dfe8ee;
  --bg: #f3f7fa;
  --white: #ffffff;
  --red: #c2414d;
  --red-bg: #fff0f1;
  --orange: #a96516;
  --orange-bg: #fff5e7;
  --purple: #6d5bd0;
  --purple-bg: #f0edff;
  --blue: #2875b9;
  --blue-bg: #eaf4ff;
  --shadow: 0 12px 32px rgba(16, 42, 67, .065);
  --radius: 16px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 14px/1.5 'DM Sans', sans-serif; -webkit-font-smoothing: antialiased; }
body, button, input, select, textarea { font-family: 'DM Sans', sans-serif; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button, .btn, .action-btn, .icon-button, .nav-link { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #5eead4; outline-offset: 3px; }
h1, h2, h3, strong { font-family: 'Manrope', 'DM Sans', sans-serif; }
h1, h2, h3 { letter-spacing: -.035em; }
h1, h2, h3, p { margin-top: 0; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.muted { color: var(--muted); font-size: 12px; margin: 0; }
.eyebrow { margin: 0 0 9px; color: var(--teal-800); font-size: 10px; font-weight: 800; letter-spacing: .14em; line-height: 1.5; }

/* Cadastro e acesso */
.auth-shell { min-height: 100vh; min-height: 100svh; display: grid; grid-template-columns: minmax(320px, .92fr) minmax(0, 1.08fr); background: var(--white); }
.auth-brand { position: relative; isolation: isolate; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; min-height: 100%; padding: 64px clamp(32px, 6vw, 92px); color: var(--white); background: radial-gradient(ellipse at 12% 86%, rgba(20, 184, 166, .35), transparent 36%), linear-gradient(145deg, var(--navy-950) 0%, var(--navy-900) 54%, #0f766e 120%); }
.auth-brand::before, .auth-brand::after { content: ''; position: absolute; z-index: -1; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; pointer-events: none; }
.auth-brand::before { width: 440px; height: 440px; right: -240px; top: -180px; }
.auth-brand::after { width: 320px; height: 320px; right: -170px; top: -120px; }
.brand-mark { display: inline-flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 13px; background: #c9f8e8; color: #115e59; font-size: 22px; font-weight: 800; box-shadow: 0 5px 14px rgba(5, 150, 105, .12); }
.auth-brand > .brand-mark { margin-bottom: 31px; }
.auth-brand .eyebrow { color: #a7f3d0; }
.auth-brand h1 { margin: 0 0 17px; font-size: clamp(36px, 4vw, 58px); line-height: 1.06; font-weight: 800; }
.auth-brand h1 span { color: #5eead4; }
.brand-copy { max-width: 390px; margin: 0 0 20px; color: #d8e9f0; font-size: 15px; line-height: 1.8; }
.brand-art { position: relative; isolation: isolate; width: min(100%, 390px); height: 215px; margin: 14px 0 22px; }
.art-card { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 19px; box-shadow: 0 22px 50px rgba(2, 20, 35, .25); }
.art-card-back { z-index: 1; top: 5px; right: 8px; width: 73%; height: 140px; padding: 24px; background: rgba(255,255,255,.08); transform: rotate(6deg); }
.art-dot { display: block; width: 29px; height: 22px; margin-bottom: 18px; border-radius: 6px; background: #99f6e4; }
.art-line { display: block; width: 68%; height: 6px; margin: 9px 0; border-radius: 6px; background: rgba(255,255,255,.42); }
.art-line.short { width: 42%; }
.art-card-front { position: absolute; z-index: 2; left: 0; bottom: 0; width: 84%; height: 153px; padding: 21px 24px; border-color: rgba(255,255,255,.7); background: #f8fffd; color: var(--navy-900); transform: rotate(-3deg); }
.art-label { display: block; margin-bottom: 7px; color: #6b8587; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.art-card-front strong { font-size: 17px; }
.art-bars { display: flex; align-items: flex-end; gap: 7px; height: 30px; margin-top: 10px; }
.art-bars i { display: block; width: 13px; border-radius: 4px 4px 1px 1px; background: #5eead4; }
.art-bars i:nth-child(1) { height: 13px; }
.art-bars i:nth-child(2) { height: 22px; }
.art-bars i:nth-child(3) { height: 16px; }
.art-bars i:nth-child(4) { height: 28px; }
.art-bars i:nth-child(5) { height: 20px; }
.art-bars i:nth-child(6) { height: 26px; }
.art-bars i:nth-child(7) { height: 30px; background: #0f766e; }
.hero-illustration { position: absolute; z-index: 3; top: -15px; right: -5px; width: 145px; filter: drop-shadow(0 13px 16px rgba(2, 20, 35, .22)); animation: heroFloat 5s ease-in-out infinite; }
.hero-illustration svg { display: block; width: 100%; height: auto; overflow: visible; }
@keyframes heroFloat { 0%, 100% { transform: translateY(0) rotate(1deg); } 50% { transform: translateY(-7px) rotate(-1deg); } }
.brand-foot { margin: 0; color: #c4e7e6; font-size: 12px; }
.auth-panel { align-self: center; justify-self: center; width: 100%; max-width: 540px; padding: 54px clamp(25px, 5vw, 72px); }
.auth-mobile-logo { display: none; align-items: center; gap: 10px; margin-bottom: 36px; color: var(--navy-900); font-size: 17px; }
.auth-mobile-logo strong { font-family: 'Manrope', sans-serif; font-size: 18px; }
.auth-heading { margin-bottom: 27px; }
.auth-heading .eyebrow { color: var(--teal-800); }
.auth-heading h2 { margin: 0 0 8px; color: var(--navy-950); font-size: clamp(26px, 2.7vw, 32px); line-height: 1.2; }
.auth-heading > p:last-child { margin: 0; color: var(--muted); font-size: 13px; }
.auth-form { display: flex; flex-direction: column; }
.auth-form > label, .field label { margin: 0 0 7px; color: #314455; font-size: 12px; font-weight: 700; }
.auth-form input:not([type='checkbox']), .field input, .field select, .field textarea, .filter-controls select, .search-wrap input, .chart-controls select { width: 100%; min-width: 0; min-height: 46px; border: 1px solid #d8e4eb; border-radius: 11px; padding: 11px 13px; background: #fff; color: var(--ink); font-size: 13px; transition: border-color .18s ease, box-shadow .18s ease, background .18s ease; }
.auth-form input:not([type='checkbox']) { margin-bottom: 16px; }
.auth-form input::placeholder, .field input::placeholder, .field textarea::placeholder, .search-wrap input::placeholder { color: #98a7b5; opacity: 1; }
.auth-form input:focus, .field input:focus, .field select:focus, .field textarea:focus, .filter-controls select:focus, .chart-controls select:focus { outline: none; border-color: var(--teal-700); box-shadow: 0 0 0 3px rgba(20, 184, 166, .15); }
.form-note { margin: -3px 0 18px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.remember-login { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 17px; color: #526477; font-size: 12px; line-height: 1.5; cursor: pointer; }
.remember-login input { width: 17px; height: 17px; flex: 0 0 auto; margin: 1px 0 0; accent-color: var(--teal-800); }
.btn { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 46px; border: 1px solid transparent; border-radius: 12px; padding: 12px 18px; font-size: 12px; font-weight: 800; letter-spacing: .005em; line-height: 1.25; text-align: center; text-decoration: none; box-shadow: 0 2px 4px rgba(16, 42, 67, .05); transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease; }
.btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(16, 42, 67, .12); }
.btn:active { transform: translateY(0); box-shadow: 0 2px 5px rgba(16, 42, 67, .1); }
.btn-primary { color: #fff; background: linear-gradient(135deg, #0f8b80, #0f5c62); box-shadow: 0 6px 15px rgba(15, 118, 110, .19); }
.btn-primary:hover { background: linear-gradient(135deg, #0d9488, #0f766e); box-shadow: 0 9px 20px rgba(15, 118, 110, .25); }
.btn-secondary { color: #27475b; border-color: #d7e4eb; background: #fff; }
.btn-secondary:hover { color: var(--navy-900); border-color: #b8d3df; background: #f2f8fb; }
.btn-danger { color: #fff; background: linear-gradient(135deg, #d34e5b, #b62f43); box-shadow: 0 4px 10px rgba(184, 47, 67, .16); }
.btn-danger:hover { background: linear-gradient(135deg, #c2414d, #a91f36); }
.btn-full { width: 100%; min-height: 51px; margin-top: 3px; border-radius: 13px; font-size: 13px; }
.btn-full span { font-size: 18px; transition: transform .18s ease; }
.btn-full:hover span { transform: translateX(3px); }
.auth-switch { margin: 24px 0; color: var(--muted); font-size: 12px; text-align: center; }
.auth-switch button { border: 0; padding: 4px 0 4px 4px; background: transparent; color: var(--teal-800); font-size: inherit; font-weight: 800; }
.auth-switch button:hover { text-decoration: underline; text-underline-offset: 3px; }
.privacy-note { border-top: 1px solid var(--line); padding-top: 18px; margin: 0; color: #81909c; font-size: 10px; line-height: 1.7; text-align: center; }
.privacy-note span { margin-right: 5px; }
.forgot-password-link { margin: 5px 0 0; font-size: 12px; text-align: center; }
.forgot-password-link button { border: 0; padding: 7px; background: transparent; color: var(--teal-800); font: inherit; font-weight: 800; cursor: pointer; }
.forgot-password-link button:hover { text-decoration: underline; text-underline-offset: 3px; }
.auth-switch.hidden { display: none; }
.message { min-height: 0; margin: 12px 0 0; font-size: 12px; line-height: 1.6; }
.message:empty { display: none; }
.message.error { color: #b42332; }
.message.success { padding: 10px 12px; border: 1px solid #b9e7d0; border-radius: 10px; background: #ecfbf3; color: #176342; }

/* Painel financeiro */
.app-shell { min-height: 100vh; min-height: 100svh; background: var(--bg); }
.sidebar { position: fixed; z-index: 30; inset: 0 auto 0 0; display: flex; flex-direction: column; overflow-y: auto; overscroll-behavior: contain; width: 258px; padding: 25px 16px 18px; border-right: 1px solid #223b52; background: linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 100%); color: #fff; }
.sidebar-brand { display: flex; align-items: center; gap: 10px; margin: 0 0 42px; padding: 0 10px; color: #fff; font-family: 'Manrope', sans-serif; font-size: 17px; font-weight: 500; letter-spacing: -.04em; text-decoration: none; }
.sidebar-brand strong { font-weight: 800; }
.sidebar-brand .brand-mark { width: 37px; height: 37px; border-radius: 12px; background: #c9f8e8; color: #115e59; box-shadow: none; }
.nav-caption { margin: 0 0 12px; padding: 0 12px; color: #9fb4c5; font-size: 9px; font-weight: 800; letter-spacing: .13em; }
.main-nav { display: grid; gap: 6px; }
.nav-link { display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 11px 13px; border-radius: 11px; color: #c3d1dd; font-size: 12px; font-weight: 600; text-decoration: none; transition: background .18s ease, color .18s ease, transform .18s ease; }
.nav-link > span { width: 20px; flex: 0 0 auto; font-size: 17px; text-align: center; }
.nav-link:hover { background: rgba(255,255,255,.08); color: #fff; }
.nav-link.active { background: rgba(94, 234, 212, .13); color: #a7f3d0; box-shadow: inset 3px 0 #5eead4; }
.sidebar-tip { margin: auto 0 18px; padding: 16px 15px 14px; border: 1px solid rgba(203, 244, 234, .15); border-radius: 14px; background: linear-gradient(145deg, #1a3b52, #163347); color: #f3fbff; }
.tip-icon { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-bottom: 11px; border-radius: 9px; background: #c9f8e8; color: #115e59; font-size: 17px; }
.sidebar-tip strong { display: block; font-size: 12px; line-height: 1.5; }
.sidebar-tip p { margin: 7px 0 0; color: #b9cbd7; font-size: 10px; line-height: 1.7; }
.sidebar-user { display: flex; align-items: center; gap: 10px; padding: 17px 5px 0; border-top: 1px solid #2c455b; }
.avatar { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; flex: 0 0 auto; border-radius: 50%; background: #c9f8e8; color: #115e59; font-size: 12px; font-weight: 800; }
.sidebar-user-info { display: flex; flex: 1; flex-direction: column; min-width: 0; gap: 2px; }
.sidebar-user-info strong { overflow: hidden; color: #fff; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-info span { color: #a9bdcb; font-size: 10px; }
.icon-button { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; flex: 0 0 auto; border: 0; border-radius: 11px; background: transparent; color: #c4d2de; font-size: 19px; transition: background .18s ease, color .18s ease, transform .18s ease; }
.icon-button:hover { background: rgba(255,255,255,.09); color: #fff; }
.logout { width: 40px; height: 40px; font-size: 19px; }
.sidebar-overlay { display: none; }
.dashboard-main { min-width: 0; margin-left: 258px; }
.topbar { position: sticky; z-index: 15; top: 0; display: flex; align-items: center; justify-content: space-between; gap: 14px; height: 70px; padding: 0 clamp(22px, 3.3vw, 48px); border-bottom: 1px solid var(--line); background: rgba(255,255,255,.94); backdrop-filter: blur(14px); }
.breadcrumb { color: #8494a2; font-size: 11px; }
.breadcrumb span { margin: 0 9px; color: #c0ccd4; }
.breadcrumb strong { color: #40586a; font-weight: 700; }
.topbar-right { display: flex; align-items: center; gap: 9px; color: #7b8d9b; font-size: 11px; white-space: nowrap; }
.today-dot, .mini-dot { display: inline-block; width: 7px; height: 7px; flex: 0 0 auto; border-radius: 50%; background: #10b981; }
.small-avatar { width: 32px; height: 32px; margin-left: 8px; font-size: 10px; }
.mobile-menu { display: none; }
.dashboard-content { width: 100%; max-width: 1480px; margin: 0 auto; padding: 32px clamp(20px, 3.2vw, 48px) 26px; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 25px; }
.welcome-row .eyebrow { margin-bottom: 7px; color: var(--teal-800); }
.welcome-row h1 { margin: 0 0 5px; color: var(--navy-950); font-size: clamp(25px, 2.5vw, 31px); line-height: 1.2; }
.month-pill { display: flex; align-items: center; gap: 9px; padding: 10px 13px; border: 1px solid #d9e5eb; border-radius: 11px; background: #fff; color: #52697b; font-size: 11px; font-weight: 700; white-space: nowrap; }
.month-pill span:first-child { color: var(--teal-800); font-size: 16px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 23px; }
.summary-card { min-width: 0; padding: 19px 18px 16px; border: 1px solid #e2eaf0; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease; }
.summary-card:hover { transform: translateY(-2px); border-color: #c7dce4; box-shadow: 0 16px 34px rgba(16, 42, 67, .09); }
.summary-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: #657989; font-size: 11px; font-weight: 700; }
.summary-icon { display: flex; align-items: center; justify-content: center; width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; font-size: 16px; }
.icon-purple { background: var(--purple-bg); color: var(--purple); }
.icon-orange { background: var(--orange-bg); color: var(--orange); }
.icon-green { background: var(--mint-100); color: var(--teal-800); }
.icon-blue { background: var(--blue-bg); color: var(--blue); }
.summary-value { display: block; overflow-wrap: anywhere; margin: 15px 0 11px; color: var(--navy-950); font-size: clamp(19px, 1.75vw, 26px); font-weight: 800; letter-spacing: -.045em; line-height: 1.2; font-variant-numeric: tabular-nums; }
.summary-foot { display: flex; align-items: flex-start; gap: 7px; margin: 0; color: #8494a2; font-size: 10px; line-height: 1.5; }
.mini-dot { width: 7px; height: 7px; margin-top: 4px; }
.purple-dot { background: #8b7be0; }
.orange-dot { background: #e7a23f; }
.green-dot { background: #10b981; }
.blue-dot { background: #3986c9; }
.receivable-card { border-top: 3px solid #3986c9; }
.insights-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(300px, .82fr); gap: 18px; margin: 0 0 22px; }
.chart-card, .gauge-card { min-width: 0; }
.insights-grid > .content-card { margin-bottom: 0; }
.content-card { min-width: 0; margin-bottom: 22px; padding: 24px; border: 1px solid #e0e9ef; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.section-heading .eyebrow { margin-bottom: 6px; color: var(--teal-800); }
.section-heading h2 { margin: 0 0 6px; color: var(--navy-950); font-size: 19px; line-height: 1.35; }
.section-heading .muted { max-width: 620px; line-height: 1.6; }
.section-symbol { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 12px; background: var(--mint-50); color: var(--teal-800); font-size: 21px; }
.chart-controls { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin: 14px 0 8px; color: #63798a; font-size: 12px; font-weight: 700; }
.chart-controls select { width: auto; max-width: 100%; min-height: 42px; padding: 8px 34px 8px 11px; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; margin: 12px 0; color: var(--muted); font-size: 11px; }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { display: inline-block; width: 10px; height: 10px; flex: 0 0 auto; border-radius: 3px; }
.legend-expense { background: #d84c5c; }
.legend-receivable { background: #0d9488; }
.category-chart { display: block; width: 100%; min-width: 0; min-height: 110px; overflow: hidden; }
.category-chart > .muted { padding: 30px 12px; text-align: center; line-height: 1.7; }
.bar-chart-svg, .line-chart-svg { display: block; width: 100%; height: auto; min-width: 0; overflow: visible; }
.line-chart-grid { stroke: #e5edf2; stroke-width: 1; stroke-dasharray: 3 4; }
.line-chart-tick { stroke: #b6c5cf; stroke-width: 1; }
.line-chart-y-label, .line-chart-x-label, .line-chart-axis-title { fill: #718696; font-family: 'DM Sans', sans-serif; font-size: 10px; }
.line-chart-axis-title { font-size: 9px; }
.bar-chart-column { transition: opacity .18s ease; }
.bar-chart-column.expense { fill: #d84c5c; }
.bar-chart-column.receivable { fill: #0d9488; }
.chart-row { display: grid; grid-template-columns: minmax(90px, .7fr) minmax(80px, 1.4fr) auto; align-items: center; gap: 10px; font-size: 11px; }
.chart-cat { overflow: hidden; color: #52697b; text-overflow: ellipsis; white-space: nowrap; }
.chart-bars { display: grid; gap: 4px; }
.chart-bar { min-width: 2px; height: 8px; border-radius: 20px; }
.chart-bar.expense { background: #d84c5c; }
.chart-bar.receivable { background: #0d9488; }
.chart-amount { font-size: 10px; font-weight: 800; white-space: nowrap; }

/* Gastômetro */
.gauge-panel { padding: 7px 0 0; text-align: center; }
.gauge-dial { position: relative; width: min(100%, 360px); margin: 0 auto -3px; overflow: hidden; }
.gauge-svg { display: block; width: 100%; height: auto; overflow: visible; }
.gauge-base { fill: none; stroke: #e9eff3; stroke-width: 27; stroke-linecap: round; }
.gauge-segment { fill: none; stroke-width: 22; stroke-linecap: butt; transition: opacity .25s ease; }
.gauge-segment.seg-0 { stroke: #b42332; }
.gauge-segment.seg-1 { stroke: #e66d70; }
.gauge-segment.seg-2 { stroke: #f0c84b; }
.gauge-segment.seg-3 { stroke: #9ed5a1; }
.gauge-segment.seg-4 { stroke: #087f5b; }
.gauge-ticks { fill: none; stroke: #fff; stroke-width: 3.5; stroke-linecap: round; opacity: .95; }
.gauge-needle { transform-box: view-box; transform-origin: 50% 87.8%; transform: rotate(-90deg); transition: transform .55s cubic-bezier(.2,.75,.2,1); }
.gauge-needle path { fill: #20384c; stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }
.gauge-needle .needle-hub { fill: #fff; stroke: #20384c; stroke-width: 4; }
.gauge-needle .needle-center { fill: #20384c; }
.gauge-center-copy { position: absolute; right: 0; bottom: 30px; left: 0; display: flex; flex-direction: column; align-items: center; gap: 1px; pointer-events: none; }
.gauge-center-copy span { color: #8293a0; font-size: 8px; font-weight: 800; letter-spacing: .12em; }
.gauge-center-copy strong { padding: 0 7px; border-radius: 8px; background: rgba(255,255,255,.94); color: #20384c; font-family: 'Manrope', sans-serif; font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.05em; line-height: 1.2; }
.gauge-panel.level-0 .gauge-center-copy strong { color: #b42332; }
.gauge-panel.level-1 .gauge-center-copy strong { color: #cf555b; }
.gauge-panel.level-2 .gauge-center-copy strong { color: #a17a00; }
.gauge-panel.level-3 .gauge-center-copy strong { color: #4e9b5c; }
.gauge-panel.level-4 .gauge-center-copy strong { color: #087f5b; }
.gauge-panel.level-neutral .gauge-center-copy strong { color: #718096; }
.gauge-status { display: block; margin-top: 9px; color: var(--navy-900); font-size: 14px; font-weight: 800; }
.gauge-panel > p { max-width: 330px; margin: 5px auto 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.gauge-scale { display: flex; justify-content: space-between; gap: 8px; margin-top: 8px; font-size: 9px; font-weight: 800; }
.scale-red { color: #b42332; }
.scale-yellow { color: #a17a00; }
.scale-green { color: #087f5b; }
.gauge-note { margin: 16px 0 0; color: var(--muted); font-size: 10px; line-height: 1.65; }

/* Formulário de lançamentos */
.expense-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 20px; }
.field { display: flex; flex-direction: column; min-width: 0; }
.field-wide { grid-column: 1 / -1; }
.field label { margin-bottom: 7px; }
.field label > span:not(.optional) { color: var(--red); }
.field label .optional { color: #8999a6; font-size: 10px; font-weight: 500; }
.field input, .field select, .field textarea { min-height: 46px; padding: 11px 12px; font-size: 13px; }
.field select { color: #3e5668; }
.field textarea { min-height: 84px; resize: vertical; }
.field-help { margin-top: 5px; color: #80919e; font-size: 10px; line-height: 1.5; }
.form-actions { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 15px; padding-top: 4px; }
.required-note { margin: 0; color: #83929e; font-size: 10px; }
.required-note span { color: var(--red); }

/* Lista de contas */
.accounts-section { padding-bottom: 18px; }
.accounts-heading { margin-bottom: 21px; }
.count-badge { display: inline-flex; align-items: center; justify-content: center; min-width: 26px; height: 24px; margin-left: 5px; border-radius: 8px; background: var(--mint-100); color: var(--teal-800); font-size: 11px; letter-spacing: 0; vertical-align: middle; }
.table-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin-bottom: 17px; }
.search-wrap { display: flex; align-items: center; gap: 8px; min-width: 180px; max-width: 350px; flex: 1; padding: 0 11px; border: 1px solid #d8e4eb; border-radius: 11px; background: #fff; color: #8da0ad; }
.search-wrap > span { font-size: 23px; line-height: 1; }
.search-wrap input { min-height: 43px; padding: 8px 0; border: 0; background: transparent; box-shadow: none !important; outline: none !important; font-size: 12px; }
.filter-controls { display: flex; gap: 9px; min-width: 0; }
.filter-controls select { width: auto; max-width: 205px; min-height: 43px; padding: 8px 28px 8px 10px; font-size: 11px; color: #52697b; }
.accounts-list { display: grid; gap: 10px; }
.account-row { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(100px, .7fr) minmax(130px, .85fr) auto minmax(174px, auto); align-items: center; gap: 13px; padding: 14px; border: 1px solid #e1eaf0; border-radius: 13px; background: #fff; transition: border-color .18s ease, background .18s ease, box-shadow .18s ease; }
.account-row:hover { border-color: #bed9df; background: #fcffff; box-shadow: 0 5px 14px rgba(16, 42, 67, .035); }
.account-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.category-icon { display: flex; align-items: center; justify-content: center; width: 39px; height: 39px; flex: 0 0 auto; border-radius: 11px; background: var(--mint-50); color: var(--teal-800); font-size: 16px; }
.account-title-wrap { min-width: 0; }
.account-title { display: block; overflow-wrap: anywhere; margin-bottom: 3px; color: #20384c; font-size: 12px; font-weight: 800; line-height: 1.45; }
.account-notes { display: block; overflow-wrap: anywhere; color: #8293a0; font-size: 10px; white-space: pre-wrap; }
.entry-type-badge { display: inline-flex; align-items: center; width: max-content; max-width: 100%; margin-top: 5px; padding: 3px 7px; border-radius: 6px; background: var(--blue-bg); color: #2469a5; font-size: 9px; font-weight: 800; }
.entry-type-badge.payable { background: var(--purple-bg); color: #6753b5; }
.account-category, .account-due { display: flex; flex-direction: column; gap: 4px; color: #8393a0; font-size: 10px; }
.account-category strong, .account-due strong { color: #40586a; font-size: 11px; font-weight: 700; line-height: 1.45; }
.account-due.overdue strong { color: var(--red); }
.row-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; min-width: 0; }
.status-pill { display: inline-flex; align-items: center; gap: 5px; padding: 5px 8px; border-radius: 7px; font-size: 9px; font-weight: 800; white-space: nowrap; }
.status-pill::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending { color: #a96516; background: #fff5e7; }
.status-paid { color: #087f5b; background: #e8f8ef; }
.account-amount { color: var(--navy-950); font-size: 13px; font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }
.account-actions { display: flex; align-items: center; justify-content: flex-end; gap: 7px; flex-wrap: wrap; }
.action-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; border: 1px solid #d9e5eb; border-radius: 9px; padding: 8px 10px; background: #fff; color: #3e5b6e; font-size: 10px; font-weight: 800; line-height: 1.25; white-space: nowrap; transition: background .16s ease, border-color .16s ease, color .16s ease, transform .16s ease; }
.action-btn:hover { transform: translateY(-1px); border-color: #b9d7df; background: #edf8f7; color: var(--teal-800); }
.action-btn:active { transform: translateY(0); }
.action-btn.delete { border-color: #f0d3d7; background: #fffafa; color: #b42332; }
.action-btn.delete:hover { border-color: #e6aeb7; background: #fff0f1; color: #a61b2b; }
.empty-state { padding: 38px 15px 42px; text-align: center; }
.empty-illustration { display: flex; align-items: center; justify-content: center; width: 58px; height: 58px; margin: 0 auto 15px; border-radius: 18px; background: var(--mint-50); color: var(--teal-800); font-size: 29px; }
.empty-state h3 { margin: 0 0 7px; color: var(--navy-900); font-size: 16px; }
.empty-state p { margin-bottom: 17px; color: var(--muted); font-size: 11px; line-height: 1.65; }
.app-footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 0 3px; color: #8494a2; font-size: 10px; }
.app-footer p { width: 100%; margin: 0; color: #8b9aa6; font-size: 9px; line-height: 1.6; }
.toast { position: fixed; z-index: 80; right: 24px; bottom: 24px; max-width: min(390px, calc(100vw - 32px)); padding: 13px 17px; border: 1px solid rgba(255,255,255,.15); border-radius: 13px; background: var(--navy-900); color: #fff; box-shadow: 0 12px 35px rgba(16, 42, 67, .22); font-size: 12px; line-height: 1.5; opacity: 0; transform: translateY(10px); pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast.error-toast { background: #9f2635; }
.dialog-backdrop { position: fixed; z-index: 90; inset: 0; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(7, 25, 42, .62); backdrop-filter: blur(4px); }
.confirm-dialog { width: 100%; max-width: 410px; padding: 27px; border: 1px solid rgba(255,255,255,.65); border-radius: 19px; background: #fff; box-shadow: 0 25px 80px rgba(0,0,0,.22); }
.dialog-icon { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; margin-bottom: 15px; border-radius: 13px; background: var(--red-bg); color: var(--red); font-size: 20px; font-weight: 800; }
.confirm-dialog h2 { margin: 0 0 8px; color: var(--navy-950); font-size: 20px; }
.confirm-dialog p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@media (min-width: 1500px) {
  .dashboard-content { padding-top: 40px; }
  .summary-card { padding: 22px; }
  .content-card { padding: 28px; }
}
@media (max-width: 1250px) {
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .insights-grid { grid-template-columns: minmax(0, 1fr); }
  .gauge-card { display: grid; grid-template-columns: minmax(0, 1fr); }
  .gauge-dial { width: min(100%, 360px); }
  .account-row { grid-template-columns: minmax(0, 1.5fr) minmax(120px, .8fr) auto; gap: 12px; }
  .account-category { display: none; }
  .account-amount { justify-self: end; }
  .account-actions { grid-column: 1 / -1; justify-content: flex-start; padding-left: 49px; }
  .row-meta { flex-direction: row; align-items: center; flex-wrap: wrap; gap: 10px; }
}
@media (max-width: 900px) {
  .sidebar { width: 238px; }
  .dashboard-main { margin-left: 238px; }
  .dashboard-content { padding-inline: 20px; }
  .topbar { padding-inline: 20px; }
  .account-row { grid-template-columns: minmax(0, 1fr) auto; }
  .account-main { grid-column: 1; }
  .row-meta { grid-column: 1 / -1; }
  .account-amount { grid-column: 2; grid-row: 1; align-self: start; padding-top: 7px; }
  .account-actions { grid-column: 1 / -1; padding-left: 0; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 72px; }
  body.menu-open { overflow: hidden; }
  .auth-shell { grid-template-columns: minmax(0, 1fr); }
  .auth-brand { display: none; }
  .auth-panel { max-width: 490px; padding: 30px 24px; }
  .auth-mobile-logo { display: flex; margin-bottom: 30px; }
  .auth-heading { margin-bottom: 24px; }
  .auth-heading h2 { font-size: 27px; }
  .sidebar { width: min(86vw, 310px); padding: 22px 15px 16px; transform: translateX(-105%); transition: transform .24s ease; box-shadow: none; }
  .sidebar.menu-open { transform: translateX(0); box-shadow: 14px 0 40px rgba(5, 24, 41, .25); }
  .sidebar-overlay { position: fixed; z-index: 25; inset: 0; display: none; width: 100%; height: 100%; border: 0; border-radius: 0; background: rgba(7, 25, 42, .5); backdrop-filter: blur(2px); }
  .sidebar-overlay.is-visible { display: block; }
  .dashboard-main { margin-left: 0; }
  .topbar { height: 62px; gap: 10px; padding: 0 16px; }
  .mobile-menu { display: inline-flex; width: 42px; height: 42px; border: 1px solid #dce7ed; background: #fff; color: var(--navy-900); }
  .mobile-menu:hover { background: var(--mint-50); color: var(--teal-800); }
  .breadcrumb { margin-right: auto; font-size: 10px; }
  .breadcrumb span { margin: 0 5px; }
  .topbar-right { gap: 6px; font-size: 10px; }
  .small-avatar { width: 30px; height: 30px; margin-left: 2px; }
  .dashboard-content { padding: 23px 16px 22px; }
  .welcome-row { align-items: flex-start; gap: 12px; margin-bottom: 20px; }
  .welcome-row h1 { font-size: 26px; }
  .welcome-row > div:first-child { min-width: 0; }
  .welcome-row .muted { line-height: 1.6; }
  .month-pill { gap: 7px; padding: 9px 10px; font-size: 10px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-bottom: 18px; }
  .summary-card { padding: 14px 13px 13px; border-radius: 14px; }
  .summary-top { align-items: flex-start; font-size: 10px; line-height: 1.4; }
  .summary-icon { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
  .summary-value { margin: 11px 0 8px; font-size: clamp(17px, 4.6vw, 22px); }
  .summary-foot { gap: 6px; font-size: 9px; }
  .insights-grid { gap: 14px; margin-bottom: 16px; }
  .content-card { padding: 18px 15px; margin-bottom: 15px; border-radius: 15px; }
  .section-heading { gap: 10px; margin-bottom: 18px; }
  .section-heading h2 { font-size: 18px; }
  .section-heading .muted { font-size: 11px; }
  .section-symbol { width: 34px; height: 34px; border-radius: 10px; font-size: 19px; }
  .chart-controls { align-items: flex-start; flex-direction: column; gap: 7px; }
  .chart-controls select { width: 100%; }
  .chart-legend { gap: 10px 14px; }
  .category-chart { overflow-x: auto; overscroll-behavior-x: contain; }
  .bar-chart-svg { min-width: 0; }
  .gauge-dial { width: min(100%, 340px); }
  .gauge-center-copy { bottom: 28px; }
  .gauge-center-copy span { font-size: 7px; }
  .gauge-center-copy strong { font-size: 27px; }
  .gauge-status { font-size: 13px; }
  .gauge-scale { font-size: 8px; }
  .gauge-note { font-size: 10px; }
  .expense-form { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 12px; }
  .field input, .field select, .field textarea { min-width: 0; }
  .field-help { font-size: 9px; }
  .form-actions { grid-column: 1 / -1; align-items: stretch; flex-direction: column; gap: 10px; }
  .form-actions .btn { width: 100%; }
  .required-note { order: 2; }
  .table-toolbar { align-items: stretch; flex-direction: column; gap: 10px; }
  .search-wrap { max-width: none; }
  .filter-controls { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .filter-controls select { width: 100%; max-width: none; min-width: 0; padding-right: 24px; font-size: 10px; }
  .account-row { grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 12px; }
  .account-main { grid-column: 1; gap: 8px; }
  .category-icon { width: 34px; height: 34px; border-radius: 10px; font-size: 15px; }
  .account-title { font-size: 11px; }
  .account-notes { font-size: 10px; }
  .account-amount { grid-column: 2; grid-row: 1; padding-top: 5px; font-size: 12px; }
  .row-meta { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 10px; }
  .account-due { min-width: 0; }
  .account-due strong { font-size: 10px; }
  .status-pill { font-size: 9px; }
  .account-actions { grid-column: 1 / -1; gap: 7px; padding-left: 0; }
  .action-btn { min-height: 42px; padding: 8px 10px; font-size: 10px; white-space: normal; }
  .app-footer { gap: 7px; line-height: 1.7; }
  .app-footer span:nth-child(2) { display: none; }
  .app-footer p { font-size: 9px; }
  .toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); }
  .confirm-dialog { padding: 22px; }
  .dialog-actions { gap: 8px; }
  .dialog-actions .btn { flex: 1; padding-inline: 10px; }
}
@media (max-width: 480px) {
  .auth-panel { padding: 24px 20px; }
  .auth-mobile-logo { margin-bottom: 26px; }
  .auth-heading h2 { font-size: 26px; }
  .welcome-row { flex-direction: column; gap: 12px; }
  .month-pill { align-self: flex-start; }
  .topbar-right #topDate { display: none; }
  .dashboard-content { padding-inline: 12px; }
  .topbar { padding-inline: 12px; }
  .content-card { padding: 16px 12px; }
  .expense-form { grid-template-columns: minmax(0, 1fr); }
  .field-wide, .form-actions { grid-column: auto; }
  .field input, .field select, .field textarea, .auth-form input:not([type='checkbox']) { font-size: 16px; }
  .filter-controls { grid-template-columns: minmax(0, 1fr); }
  .account-row { gap: 9px; }
  .account-main { min-width: 0; }
  .account-amount { font-size: 11px; }
  .account-actions { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .action-btn { min-height: 44px; }
  .gauge-center-copy span { font-size: 6px; }
  .gauge-center-copy strong { font-size: 25px; }
  .dialog-actions { flex-direction: column-reverse; }
  .dialog-actions .btn { width: 100%; }
}
@media (max-width: 360px) {
  .summary-grid { grid-template-columns: minmax(0, 1fr); }
  .summary-card { padding: 15px; }
  .summary-value { font-size: 23px; }
  .topbar { gap: 7px; }
  .breadcrumb { font-size: 9px; }
  .welcome-row h1 { font-size: 24px; }
  .account-actions { grid-template-columns: minmax(0, 1fr); }
  .account-actions .action-btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .hero-illustration { animation: none; }
}


/* Ações de recuperação de senha: estilo explícito para evitar conflitos e cache antigo. */
.forgot-password-link {
  display: block;
  width: 100%;
  margin: 12px 0 0;
  text-align: center;
}
.forgot-password-link button.forgot-password-action {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 46px;
  margin: 0;
  padding: 11px 14px;
  border: 1px solid #cbdfe5;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff 0%, #f3faf9 100%);
  color: #0f766e;
  font-family: 'DM Sans', sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  text-decoration: none;
  box-shadow: 0 2px 5px rgba(16, 42, 67, .05);
  transition: background .18s ease, border-color .18s ease, color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.forgot-password-link button.forgot-password-action:hover {
  border-color: #7bd7c8;
  background: #eafaf6;
  color: #115e59;
  text-decoration: none;
  box-shadow: 0 6px 14px rgba(15, 118, 110, .12);
  transform: translateY(-1px);
}
.forgot-password-link button.forgot-password-action:active {
  background: #d9f5eb;
  box-shadow: 0 2px 5px rgba(16, 42, 67, .08);
  transform: translateY(0);
}
.forgot-password-link button.forgot-password-action:focus-visible {
  outline: 3px solid #5eead4;
  outline-offset: 3px;
}
@media (max-width: 480px) {
  .forgot-password-link button.forgot-password-action {
    min-height: 48px;
    font-size: 14px;
  }
}
