:root {
  color-scheme: dark;
  --canvas: #030607; --surface: #0b1316; --elevated: #111f24;
  --text: #eafbf7; --muted: #aac5bf; --accent: #00e5bc;
  --border: #34534e; --focus: #45c8f5; --danger: #ff718a; --warning: #ffb45c;
  font-family: Inter, system-ui, sans-serif; color: var(--text); background: var(--canvas);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 16px; line-height: 1.5; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; }
button, input, select, textarea { border: 1px solid var(--border); border-radius: 6px; background: var(--surface); color: var(--text); min-height: 44px; padding: 10px 14px; }
button { cursor: pointer; } button:hover { background: var(--elevated); border-color: var(--accent); }
button.primary { background: var(--accent); color: #03100c; font-weight: 650; border-color: var(--accent); }
button.primary:hover { background: #47f5d0; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
input:disabled, select:disabled { color: var(--muted); background: #132023; cursor: not-allowed; opacity: .8; }
h1, h2, p { margin-top: 0; } h1 { font-size: clamp(28px, 4vw, 38px); margin-bottom: 8px; } h2 { font-size: 20px; margin-bottom: 20px; }
.app { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: 100vh; }
.sidebar { padding: 32px 20px; border-right: 1px solid var(--border); background: var(--surface); display: flex; flex-direction: column; gap: 16px; }
.brand { text-decoration: none; font-size: 23px; font-weight: 700; letter-spacing: .06em; color: var(--text); } .brand span { color: var(--accent); }
nav { display: grid; gap: 8px; } nav button { text-align: left; border-color: transparent; } nav button[aria-current="page"] { color: var(--accent); border-color: var(--border); background: var(--elevated); }
.sidebar-footer { margin-top: auto; padding-top: 48px; font-size: 13px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 10px; border: 1px solid var(--border); border-radius: 99px; color: var(--accent); }
main { padding: 28px clamp(16px, 3vw, 40px); max-width: 1400px; width: 100%; min-width: 0; }
.notice { padding: 12px 16px; border: 1px solid #796043; background: #211b13; color: #ffdbad; border-radius: 8px; font-size: 14px; margin-bottom: 28px; }
.page-header, .section-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.page-header { margin-bottom: 24px; } .page-header p { margin-bottom: 0; }
.eyebrow { font-size: 12px; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.muted { color: var(--muted); font-size: 14px; } .actions, .dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.period-control { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin: 0 0 24px; }
.panel { padding: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; margin-bottom: 20px; min-width: 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.metric { display: block; font-size: clamp(22px, 2.5vw, 32px); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; margin-bottom: 12px; }
.metrics p:last-child { margin-bottom: 0; } .positive { color: var(--accent); }
.columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.row { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.row:last-child { border-bottom: 0; } .row p { margin: 0; } .row-title { font-weight: 600; overflow-wrap: anywhere; } .row-info { min-width: 0; flex: 1; }
.row-value { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; } .danger { color: var(--danger); }
.bar-item { margin-bottom: 18px; } .bar-label { display: flex; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.bar-track { height: 10px; background: var(--elevated); border-radius: 10px; overflow: hidden; }
.bar-fill { height: 100%; background: var(--accent); border-radius: inherit; } .bar-fill.expense { background: var(--warning); }
.filters, .form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; } .filters { margin-bottom: 20px; }
label { display: grid; gap: 6px; font-size: 14px; } input, select, textarea { width: 100%; min-width: 0; } textarea { resize: vertical; } .full { grid-column: 1 / -1; }
.empty { color: var(--muted); padding: 20px 0; margin: 0; }
dialog { width: min(640px, calc(100% - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; color: var(--text); background: var(--elevated); border: 1px solid var(--border); border-radius: 18px; padding: 24px; }
dialog::backdrop { background: rgb(0 0 0 / 75%); } dialog h2 { margin-bottom: 0; } dialog .section-heading { margin-bottom: 24px; }
.dialog-actions { justify-content: flex-end; margin-top: 24px; } .error { color: var(--danger); margin: 12px 0; } #feedback:empty { display: none; } #feedback { color: var(--accent); }
footer { color: var(--muted); font-size: 12px; padding: 24px 0; }
.skip-link { position: absolute; top: -100px; left: 16px; background: var(--surface); padding: 12px; z-index: 10; } .skip-link:focus { top: 12px; }
@media (max-width: 1050px) { .app { grid-template-columns: 190px minmax(0, 1fr); } .metrics { grid-template-columns: 1fr; } .columns { grid-template-columns: 1fr; } }
@media (max-width: 720px) {
  .app { display: block; } .sidebar { padding: 16px; border-right: 0; border-bottom: 1px solid var(--border); gap: 8px; }
  .sidebar > .muted, .sidebar-footer { display: none; } nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  nav button { padding: 8px; font-size: 14px; } main { padding: 20px 16px; } .panel { padding: 18px; }
  .row { flex-wrap: wrap; gap: 10px; } .row-info { flex-basis: 55%; } .row-actions { width: 100%; }
  .filters, .form-grid { grid-template-columns: 1fr; } .actions { width: 100%; } .actions button { flex: 1; }
}

/* Camada visual do Finance AI: modo de trabalho do design system do AI Lab. */
:root { --border: #29423f; --muted: #aac5bf; --font-tech: ui-monospace, SFMono-Regular, Consolas, monospace; }
body { isolation: isolate; background: #030607; }
.ambient-background { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; background: radial-gradient(ellipse at 82% 28%, #09382f66, transparent 48%), radial-gradient(ellipse at 25% 90%, #10374533, transparent 50%), #030607; }
.ambient-grid { position: absolute; inset: 0; background-image: linear-gradient(#00e5bc08 1px, transparent 1px), linear-gradient(90deg, #00e5bc08 1px, transparent 1px); background-size: 64px 64px; mask-image: linear-gradient(transparent, #000 30%, transparent); }
#finance-scene { display: block; width: 100%; height: 100%; opacity: .95; transition: opacity 300ms; }
.ambient-vignette { position: absolute; inset: 0; background: linear-gradient(90deg, #03060755, transparent 65%), linear-gradient(0deg, #030607 0%, transparent 65%); }
body:not(.scene-in-view) #finance-scene { opacity: 0; }
.app { position: relative; z-index: 1; grid-template-columns: 238px minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100dvh; background: #081013f5; padding: 36px 22px 24px; border-right-color: #213b36; }
.brand { display: flex; align-items: center; gap: 10px; font-size: 17px; letter-spacing: .04em; }
.brand > span { color: var(--text); } .brand b { color: var(--accent); font-weight: 500; }
.brand .brand-mark { display: grid; place-items: center; width: 36px; height: 40px; border: 1px solid #00e5bc66; border-radius: 8px 2px 8px 2px; color: var(--accent); background: linear-gradient(135deg, #00e5bc20, #00e5bc03); font-family: var(--font-tech); box-shadow: 0 0 20px #00e5bc0d; }
.sidebar > .muted { margin: 0 0 32px 46px; font-size: 12px; }
nav { gap: 10px; } nav button { display: flex; align-items: center; gap: 12px; min-height: 48px; font-size: 14px; border-radius: 8px; color: var(--muted); background: transparent; }
nav button[aria-current="page"] { border-color: #00e5bc33; background: linear-gradient(90deg, #00e5bc18, #00e5bc04); box-shadow: inset 3px 0 var(--accent); }
.nav-icon { width: 20px; text-align: center; font-size: 20px; color: #72aaa0; } nav [aria-current="page"] .nav-icon { color: var(--accent); }
.sidebar-footer { border-top: 1px solid #203c35; padding-top: 22px; } .sidebar-footer a { text-decoration: none; }
main { max-width: 1560px; padding: 22px clamp(24px, 3.5vw, 56px) 32px; }
.workspace-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 22px; color: #aac5bf; font: 11px var(--font-tech); letter-spacing: .14em; }
.workspace-bar > span { display: flex; align-items: center; gap: 10px; } .status-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px #00e5bc88; }
#motion-toggle { font: 12px Inter, system-ui, sans-serif; letter-spacing: 0; background: #0b1316c9; min-height: 36px; padding: 8px 12px; }
.notice { font-size: 12px; padding: 10px 14px; color: #dfcca9; background: #151811f0; border-color: #48523a; margin-bottom: 28px; border-radius: 6px; }
.page-header { margin-bottom: 28px; gap: 24px; } .page-header h1 { font-weight: 550; letter-spacing: -.04em; font-size: clamp(28px, 3vw, 40px); }
.page-header .eyebrow { color: #74aaa0; font-family: var(--font-tech); font-size: 10px; margin-bottom: 8px; }
.page-header .muted { font-size: 13px; } .actions button { font-size: 13px; min-height: 44px; }
button { transition: border-color 140ms, background-color 140ms; } button.primary { box-shadow: 0 4px 24px #00e5bc16; }
.period-control { padding: 12px 16px; margin-bottom: 24px; border: 1px solid #274039; border-radius: 8px; background: #0b1316e8; }
.period-control > label { font-size: 12px; color: var(--muted); } .period-control input { max-width: 190px; font-size: 13px; min-height: 38px; background: #0f1b1e; }
.period-control .muted { margin-left: auto; font-size: 12px; }
.hero-panel { display: grid; grid-template-columns: 1.1fr 1fr; min-height: 330px; position: relative; margin-bottom: 24px; border: 1px solid #34534e; border-radius: 16px; background: linear-gradient(90deg, #09171af8 0%, #0b1e20ce 42%, #0b1e2022 100%); overflow: hidden; }
.hero-panel::before { content: ""; position: absolute; top: 0; left: 32px; width: 90px; height: 1px; background: var(--accent); box-shadow: 0 0 20px #00e5bc; }
.hero-copy { padding: 36px 0 36px 32px; align-self: center; position: relative; z-index: 1; }
.hero-copy .eyebrow { color: #89b8ae; font: 10px var(--font-tech); letter-spacing: .12em; }
.hero-copy h2 { font-size: clamp(28px, 2.8vw, 40px); font-weight: 500; line-height: 1.18; letter-spacing: -.045em; margin: 18px 0; }
.hero-copy em { font-style: normal; color: var(--accent); }
.hero-copy > p:not(.eyebrow) { max-width: 360px; font-size: 13px; color: #aac5bf; line-height: 1.7; }
.hero-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.hero-tags span { padding: 5px 10px; font-size: 10px; letter-spacing: .02em; border: 1px solid #34534e; border-radius: 5px; color: #b8d2cb; background: #09171ac9; }
.scene-window { position: relative; min-height: 330px; }
.scene-fallback { width: 100%; height: 100%; object-fit: contain; position: absolute; inset: 0; }
.webgl-ready .scene-fallback { opacity: 0; }
.scene-caption { position: absolute; bottom: 24px; left: 50%; transform: translateX(-50%); color: #85b3a8; font: 9px var(--font-tech); letter-spacing: .16em; white-space: nowrap; }
.scene-corner { position: absolute; width: 22px; height: 22px; opacity: .7; } .scene-corner.top { right: 22px; top: 22px; border-top: 1px solid #00e5bc77; border-right: 1px solid #00e5bc77; } .scene-corner.bottom { left: 22px; bottom: 22px; border-bottom: 1px solid #00e5bc77; border-left: 1px solid #00e5bc77; }
.metrics { gap: 16px; } .panel { background: #0b1316f5; border-color: #2b4640; box-shadow: 0 12px 40px #00000020; border-radius: 12px; }
.metric-panel { position: relative; overflow: hidden; padding: 22px; } .metric-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; gap: 10px; }
.metric-heading .eyebrow { margin: 0; font: 10px var(--font-tech); letter-spacing: .1em; }
.metric-symbol { width: 32px; height: 32px; display: grid; place-items: center; border: 1px solid #34534e; border-radius: 8px; color: var(--accent); background: #00e5bc09; }
.balance-panel { background: linear-gradient(125deg, #10362ded, #0b1719fa); border-color: #00e5bc55; } .balance-panel::after { content: ""; position: absolute; bottom: -42px; right: -40px; width: 160px; height: 160px; border-radius: 50%; border: 1px solid #00e5bc18; box-shadow: 0 0 0 18px #00e5bc06, 0 0 0 36px #00e5bc04; pointer-events: none; }
.metric { position: relative; z-index: 1; font-family: var(--font-tech); font-size: clamp(22px, 2.2vw, 32px); letter-spacing: -.045em; }
.metric-panel .muted { font-size: 11px; position: relative; z-index: 1; } .expense-panel .metric-symbol { color: var(--warning); background: #ffb45c0a; }
.panel h2 { font-size: 16px; font-weight: 550; letter-spacing: -.02em; } .section-heading > button { font-size: 12px; }
.bar-label { font-size: 13px; } .bar-label strong { font: 12px var(--font-tech); }
.bar-track { height: 8px; background: #152526; } .bar-fill { background: linear-gradient(90deg, #00bf9d, #47f5d0); box-shadow: 0 0 14px #00e5bc18; } .bar-fill.expense { background: linear-gradient(90deg, #ae7840, #ffb45c); }
.row { border-bottom-color: #243c37; padding: 18px 0; } .row-title { font-size: 14px; font-weight: 500; } .row .muted { font-size: 12px; margin-top: 4px; }
.row-value { font-family: var(--font-tech); font-size: 14px; } .row-actions button { font-size: 12px; }
dialog { box-shadow: 0 30px 100px #0009; background: #0c191c; } dialog::backdrop { backdrop-filter: blur(6px); }
footer { border-top: 1px solid #274039; margin-top: 12px; font-family: var(--font-tech); font-size: 10px; letter-spacing: .04em; }
@media (min-width: 1051px) and (max-width: 1250px) { .metric { font-size: 23px; } }
@media (max-width: 1050px) {
  .app { grid-template-columns: 190px minmax(0, 1fr); } .sidebar { padding: 28px 14px; } .brand { font-size: 14px; } .brand .brand-mark { width: 30px; flex-shrink: 0; }
  .sidebar > .muted { margin-left: 40px; } main { padding: 20px 24px; }
  .hero-panel { grid-template-columns: 1fr 1fr; min-height: 300px; } .hero-copy { padding: 28px 0 28px 24px; } .hero-copy h2 { font-size: 29px; } .scene-window { min-height: 300px; }
  .metrics { grid-template-columns: 1fr; } .metric { font-size: 30px; }
}
@media (max-width: 720px) {
  .app { display: block; } .sidebar { position: static; height: auto; padding: 18px 16px; } .brand { font-size: 17px; } .brand .brand-mark { width: 32px; height: 34px; }
  nav { margin-top: 10px; gap: 6px; } nav button { font-size: 12px; min-height: 44px; gap: 8px; } .nav-icon { font-size: 18px; }
  main { padding: 20px 16px; } .workspace-bar { letter-spacing: .04em; gap: 8px; font-size: 9px; } #motion-toggle { font-size: 11px; }
  .notice { margin-bottom: 24px; } .page-header { margin-bottom: 20px; } .actions button { font-size: 12px; }
  .period-control { padding: 12px; gap: 10px; } .period-control .muted { width: 100%; margin: 0; }
  .hero-panel { grid-template-columns: 1fr; background: linear-gradient(135deg, #0a2021eb, #081315ef); }
  .hero-copy { padding: 28px 24px 0; } .hero-copy h2 { font-size: 32px; } .hero-copy > p:not(.eyebrow) { max-width: 100%; }
  .scene-window { min-height: 240px; } .scene-fallback { opacity: 1 !important; } #finance-scene { display: none; } .scene-caption { bottom: 14px; }
  .scene-corner { display: none; } .metric-panel { padding: 20px; } .metric { font-size: 29px; }
  .panel h2 { font-size: 17px; } .bar-label { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Relatório do mês: painéis de vidro e a rosca em volume.
   O vidro é quase opaco para o texto continuar legível sobre o fundo animado;
   sem suporte a desfoque, a superfície sólida do tema assume. */
.glass-panel { position: relative; overflow: hidden; background: linear-gradient(145deg, #13292ee6, #0a1518f2 55%, #0b1316f5); border-color: #5fe9d233; box-shadow: inset 0 1px 0 #ffffff1c, inset 0 0 40px #00e5bc08, 0 24px 60px #00000059; }
.glass-panel::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 46%; background: radial-gradient(120% 100% at 0% 0%, #ffffff12, transparent 60%); pointer-events: none; }
.glass-panel > * { position: relative; }
@supports (backdrop-filter: blur(1px)) { .glass-panel { background: linear-gradient(145deg, #13292ecc, #0a1518e0 55%, #0b1316eb); backdrop-filter: blur(14px) saturate(140%); } }
.report-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; }
.donut-layout { display: grid; grid-template-columns: minmax(200px, 320px) minmax(0, 1fr); gap: 28px; align-items: center; }
.donut-wrap { position: relative; width: 100%; max-width: 320px; margin: 4px auto 0; }
.donut-stage { transform: perspective(900px) rotateX(18deg); transform-origin: 50% 60%; transition: transform 220ms cubic-bezier(.2, .8, .2, 1); will-change: transform; }
.donut-stage canvas { display: block; width: 100%; aspect-ratio: 1; touch-action: manipulation; }
.donut-stage canvas.is-pointing { cursor: pointer; }
.donut-center { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 2px; padding: 0 27%; text-align: center; pointer-events: none; }
.donut-center .eyebrow { margin: 0; font: 9px var(--font-tech); letter-spacing: .12em; color: #89b8ae; overflow-wrap: anywhere; }
.donut-center strong { font: 600 clamp(14px, 1.5vw, 19px) var(--font-tech); letter-spacing: -.04em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.donut-center .muted { font-size: 11px; min-height: 16px; }
.donut-legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.legend-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto; grid-template-areas: "swatch name share" ". value value"; column-gap: 10px; align-items: center; width: 100%; min-height: 44px; padding: 8px 10px; text-align: left; border: 1px solid transparent; border-radius: 8px; background: transparent; color: var(--text); cursor: default; }
.legend-row:hover, .legend-row:focus-visible, .legend-row.is-active { border-color: #5fe9d240; background: #ffffff0a; }
.legend-swatch { grid-area: swatch; width: 12px; height: 12px; border-radius: 3px; box-shadow: inset 0 1px 0 #ffffff59, 0 0 10px #ffffff14; }
.legend-name { grid-area: name; font-size: 13px; overflow-wrap: anywhere; }
.legend-share { grid-area: share; font: 12px var(--font-tech); color: var(--muted); font-variant-numeric: tabular-nums; }
.legend-value { grid-area: value; font: 500 12px var(--font-tech); color: var(--muted); font-variant-numeric: tabular-nums; }
.trend { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; height: 220px; margin: 12px 0 14px; }
.trend-column { display: grid; grid-template-rows: minmax(0, 1fr) auto; gap: 8px; min-width: 0; }
.trend-track { display: flex; align-items: flex-end; justify-content: center; border-bottom: 1px solid #2b4640; }
.trend-bar { width: min(100%, 38px); min-height: 4px; padding: 0; border: 1px solid #5fe9d240; border-bottom: 0; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #2f8f80cc, #17403aa6); box-shadow: inset 0 1px 0 #ffffff33, inset 6px 0 10px -8px #ffffff40; cursor: pointer; transition: filter 140ms, border-color 140ms; }
.trend-bar.is-current { border-color: #7ff7e0; background: linear-gradient(180deg, #47f5d0e6, #00bf9db3 60%, #0a5e50a6); box-shadow: inset 0 1px 0 #ffffff66, inset 6px 0 10px -8px #ffffff73, 0 0 22px #00e5bc40; }
.trend-bar.is-empty, .trend-bar.is-empty.is-current { border-color: transparent; border-bottom: 3px solid #34534e; border-radius: 0; background: transparent; box-shadow: none; }
.trend-bar.is-empty.is-current { border-bottom-color: var(--accent); }
.trend-bar:hover, .trend-bar:focus-visible { filter: brightness(1.25); border-color: #7ff7e0; }
.trend-label { text-align: center; font: 11px var(--font-tech); letter-spacing: .06em; color: var(--muted); text-transform: uppercase; }
#report-trend-caption { min-height: 42px; margin: 0; font-size: 13px; }
#report .metric-panel .metric { margin-bottom: 8px; }
@media (max-width: 1250px) { .report-grid { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .donut-layout { grid-template-columns: 1fr; } .trend { height: 170px; gap: 6px; } }
@media (prefers-reduced-motion: reduce) { .donut-stage { transition: none; } }
