:root {
  color-scheme: light;
  --surface: #fff;
  --canvas: #f6f7f3;
  --ink: #14251d;
  --muted: #52655a;
  --muted-strong: #46594d;
  --border: #e0e6dc;
  --line: #e9ede6;
  --green: #215940;
  --dark-green: #163f31;
  --soft-green: #e6f1e9;
  --danger: #a13831;
  --serif: Georgia, 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', system-ui, sans-serif;
  font: 100%/1.5 var(--sans);
  color: var(--ink);
  background: var(--canvas);
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 1rem; }
body { margin: 0; min-width: 16rem; }
svg { flex: none; vertical-align: middle; }
a { color: var(--green); text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { color: inherit; cursor: pointer; }
button:disabled { cursor: wait; opacity: .53; }
button, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, summary:focus-visible {
  outline: 3px solid #598b73;
  outline-offset: 3px;
}
[hidden] { display: none !important; }
h1, h2, h3, p, figure { margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.skip-link { position: fixed; top: .5rem; left: .75rem; z-index: 5; padding: .65rem 1rem; background: white; border: 1px solid var(--border); border-radius: .5rem; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.boot { min-height: 70vh; display: grid; place-items: center; color: var(--muted); }

.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }
.header-inner, .workspace, .site-footer { width: min(100% - 7rem, 82rem); margin-inline: auto; }
.header-inner { min-height: 4.5rem; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 1rem; }
.brand { display: inline-flex; align-items: center; justify-self: start; gap: .6rem; color: var(--ink); }
.brand-mark { width: 2.25rem; height: 2.25rem; display: grid; place-items: center; background: var(--green); color: #f3f9ef; border-radius: .64rem; }
.brand-name { font: bold 1.73rem/.9 var(--serif); letter-spacing: -.075em; padding: 0 .15em .12em 0; }
.brand-name span { color: #509475; }
.nav { display: flex; align-items: center; gap: .25rem; }
.nav a { display: inline-flex; align-items: center; gap: .5rem; padding: .53rem .9rem; min-height: 2.55rem; color: var(--muted-strong); font-size: .93rem; font-weight: 630; border-radius: .6rem; white-space: nowrap; }
.nav a:hover { background: #f1f4ef; }
.nav a[aria-current] { color: #255c41; background: #e8f1e9; }
.header-end { display: flex; gap: .7rem; align-items: center; justify-self: end; }
.header-divider { width: 1px; height: 1.5rem; background: var(--border); }
.account-button { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.65rem; padding: .14rem .25rem; border: 0; background: transparent; font-weight: 650; font-size: .87rem; border-radius: .65rem; white-space: nowrap; }
.account-button:hover { background: #f1f4ef; }
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: #e8efe5; color: #345d45; }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; padding: 1.35rem 0 1.6rem; margin-top: 2.8rem; border-top: 1px solid var(--border); color: var(--muted); font-size: .83rem; }

.workspace { padding-top: 2.25rem; min-height: 70vh; }
.workspace:focus { outline: none; }
.page-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.3rem; margin-bottom: 1.5rem; }
.page-heading h1 { font: 400 clamp(2.15rem, 4.15vw, 3.2rem)/1.1 var(--serif); letter-spacing: -.048em; margin-top: .28rem; }
.page-heading p { color: var(--muted-strong); margin-top: .42rem; }
.eyebrow { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; color: #3a644b; font-size: .84rem; font-weight: 700; }
.demo-marker { margin-left: .25rem; border: 1px solid #e8ddc6; border-radius: 99rem; background: #faf4e6; color: #6e5529; padding: .12rem .48rem; font-size: .75rem; font-weight: 700; line-height: 1.4; }
.demo-marker:hover { background: #f3e9d2; }
.heading-actions { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding-bottom: .17rem; }

.button, .icon-button {
  display: inline-flex; align-items: center; justify-content: center; gap: .43rem; border: 1px solid transparent;
  border-radius: .64rem; background: transparent; font-size: .92rem; font-weight: 700; line-height: 1.24;
  transition: background-color .16s, border-color .16s;
}
.button { min-height: 2.65rem; padding: .62rem .88rem; }
.button.primary { background: var(--green); color: #fff; border-color: var(--green); }
.button.primary:hover:not(:disabled) { background: #174331; border-color: #174331; }
.button.secondary { background: white; border-color: #dce4d9; color: #243d2e; }
.button.secondary:hover:not(:disabled) { background: #f2f6f1; border-color: #cad8cd; }
.button.quiet { color: var(--green); }
.button.quiet:hover:not(:disabled), .icon-button:hover:not(:disabled) { background: #edf3ed; }
.button.danger { background: var(--danger); color: #fff; }
.button.danger:hover:not(:disabled) { background: #802921; }
.button.danger-text, .icon-button.subtle-danger:hover { color: var(--danger); }
.icon-button { width: 2.48rem; height: 2.48rem; flex: none; color: #43584b; }
.text-action { color: var(--green); font-size: .87rem; font-weight: 750; min-height: 2.5rem; display: inline-flex; align-items: center; border-radius: .3rem; white-space: nowrap; }
.text-action:hover { text-decoration: underline; text-underline-offset: .22em; }

.card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; box-shadow: 0 1px 2px #1b3c2310; min-width: 0; }
.summary-grid { display: grid; grid-template-columns: 1.85fr 1fr 1fr; gap: 1rem; margin-bottom: 1.12rem; }
.hero { isolation: isolate; overflow: hidden; position: relative; background: #174635; color: #fff; border-color: #174635; }
.hero::before {
  content: ''; position: absolute; z-index: -1; pointer-events: none; width: 36rem; height: 29rem; top: -7rem; right: -12rem;
  background: repeating-radial-gradient(ellipse at 62% 49%, transparent 0 18px, #97c6a9 19px, transparent 20px 23px);
  transform: rotate(-30deg); opacity: .22; mask-image: linear-gradient(92deg, transparent 12%, #000 59%);
}
.hero::after { content: ''; position: absolute; z-index: -2; inset: 0; background: radial-gradient(ellipse at 82% 100%, #28694d, transparent 70%); pointer-events: none; }
.balance-hero, .metric-card { min-height: 12.65rem; }
.hero-content, .metric-card { padding: 1.28rem 1.35rem; }
.hero-label { display: flex; align-items: center; gap: .62rem; color: #e2efe5; font-weight: 630; font-size: .95rem; }
.icon-box { width: 2.47rem; height: 2.47rem; display: grid; place-items: center; border-radius: .67rem; color: #2c6547; background: #e8f2eb; flex: none; }
.icon-box.glass { background: #d1f1de26; color: #d6f1dd; }
.icon-box.sand, .icon-box.viagem { color: #815522; background: #f7eedc; }
.icon-box.mint, .icon-box.emergencia { color: #2f674b; background: #e7f2e8; }
.icon-box.lilac, .icon-box.investimentos { color: #645782; background: #eeebf6; }
.icon-box.outros { color: #465d76; background: #e8eef6; }
.hero-amount { margin-top: .5rem; font: 400 clamp(2rem, 3.8vw, 3.2rem)/1.08 var(--serif); letter-spacing: -.045em; font-variant-numeric: lining-nums tabular-nums; overflow-wrap: anywhere; }
.hero-detail { display: flex; align-items: center; gap: .6rem; margin-top: .85rem; color: #dcebe0; font-size: .85rem; }
.hero-change { display: inline-flex; align-items: center; gap: .33rem; min-height: 1.72rem; color: #d9f3dd; background: #dbf5df22; border: 1px solid #d1efd735; padding: .15rem .46rem; border-radius: 99rem; font-weight: 700; white-space: nowrap; }
.hero-change.negative { color: #ffe0c5; }
.metric-card { display: flex; align-items: start; flex-direction: column; }
.metric-label { margin-top: .65rem; color: var(--muted-strong); font-size: .93rem; font-weight: 650; }
.metric-value { font-size: clamp(1.36rem, 2.15vw, 2rem); font-weight: 710; line-height: 1.08; letter-spacing: -.055em; margin-top: .38rem; overflow-wrap: anywhere; }
.metric-value.task-metric { font-size: clamp(1.23rem, 1.95vw, 1.7rem); line-height: 1.13; letter-spacing: -.045em; }
.metric-card p { display: flex; align-items: center; gap: .26rem; margin-top: .48rem; color: var(--muted); font-size: .85rem; }

.dashboard-grid, .agenda-grid { display: grid; grid-template-columns: minmax(0, 1.76fr) minmax(0, 1fr); gap: 1rem; align-items: start; }
.dashboard-grid { align-items: stretch; }
.chart-panel, .upcoming, .history, .calendar { padding: 1.2rem 1.3rem; }
.panel-heading, .section-heading { display: flex; justify-content: space-between; align-items: start; gap: .7rem; }
.panel-heading p { margin-top: .27rem; color: var(--muted); font-size: .88rem; }
.panel-heading h2, .section-heading h2, .dialog-heading h2 { font: 400 clamp(1.2rem, 2vw, 1.56rem)/1.16 var(--serif); letter-spacing: -.03em; }
.panel-heading > div:first-child { min-width: 0; }
.filter select { max-width: 100%; border: 1px solid #dce4d9; border-radius: .58rem; background-color: #fbfcfa; padding: .49rem 1.8rem .49rem .6rem; }
.filter.compact { max-width: min(13rem, 52%); }
.filter select, select {
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m4 6 4 4 4-4' fill='none' stroke='%23455b4c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); background-position: right .52rem center; background-size: 1rem; background-repeat: no-repeat;
}
.filter.compact select { font-size: .85rem; min-height: 2.3rem; color: #344c3b; }
.chart-tabs { display: flex; gap: .16rem; width: fit-content; max-width: 100%; align-items: center; background: #f0f3ef; border: 1px solid #edf0eb; padding: .15rem; margin-top: .85rem; border-radius: .57rem; }
.chart-tabs button { border: 1px solid transparent; background: transparent; font-size: .85rem; font-weight: 650; color: #4d6053; border-radius: .42rem; padding: .28rem .66rem; min-height: 1.9rem; }
.chart-tabs button[aria-pressed=true] { background: white; color: var(--green); border-color: #e4ebe3; box-shadow: 0 1px 2px #34503b19; }
.chart-tabs button:hover { color: var(--green); }
.plot { margin-top: .68rem; }
.plot > svg { width: 100%; display: block; aspect-ratio: 620 / 192; overflow: visible; max-height: 19rem; }
.plot text { font: 12px var(--sans); font-weight: 550; fill: #52665a; }
.plot .grid-line { stroke: #e6ebe5; vector-effect: non-scaling-stroke; }
.plot .plot-line { fill: none; stroke: #3a8060; stroke-width: 2.45; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.plot .plot-point { stroke: #3a8060; fill: white; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.plot .plot-point.last { fill: #357958; stroke: white; stroke-width: 1.6; }
.plot .plot-point:hover { fill: #357958; }
.plot-bar { fill: #6f9f81; }
.plot-bar:hover { fill: var(--green); }
.chart-values { margin-top: .28rem; color: var(--muted); font-size: .82rem; }
.chart-values summary { width: fit-content; cursor: pointer; padding: .22rem .15rem; border-radius: .3rem; }
.chart-values table { margin-top: .45rem; max-width: 31rem; }
.chart-empty, .empty-panel { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: .52rem; min-height: 8.1rem; text-align: center; color: var(--muted); padding: 1rem; font-size: .91rem; }
.chart-empty { min-height: 11rem; }
.empty-panel svg, .chart-empty svg { color: #6a8a74; }
.calc-note { display: flex; gap: .6rem; align-items: start; color: var(--muted-strong); margin: .85rem 0 1.65rem; font-size: .88rem; }
.calc-note svg { color: var(--green); margin-top: .15rem; }

.task-list { padding: 0; margin: .55rem 0 0; list-style: none; }
.task-row { display: flex; gap: .67rem; align-items: center; padding: .57rem 0; min-height: 4.15rem; border-bottom: 1px solid var(--line); }
.task-row:last-child { border-bottom: 0; }
.task-row .icon-box { width: 2.25rem; height: 2.25rem; border-radius: .56rem; }
.task-row .icon-box svg { width: 1.13rem; height: 1.13rem; }
.task-main { display: flex; flex: 1 1 auto; flex-direction: column; align-items: start; min-width: 0; padding: .15rem 0; border: 0; border-radius: .3rem; background: transparent; text-align: left; }
.task-main > span { color: #23382b; font-weight: 680; font-size: .94rem; line-height: 1.25; overflow-wrap: anywhere; }
.task-main:hover > span { color: var(--green); text-decoration: underline; text-underline-offset: .18em; }
.task-main small { color: var(--muted); font-size: .86rem; margin-top: .18rem; }
.is-complete .task-main > span { text-decoration: line-through; color: var(--muted); }
.task-check { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border: 0; padding: 0; flex: none; border-radius: 50%; background: transparent; position: relative; color: white; }
.task-check::before { content: ''; position: absolute; width: 1.03rem; height: 1.03rem; border: 1.25px solid #96aa9b; border-radius: 50%; }
.task-check:hover { background: #eef4ee; }
.task-check[aria-pressed=true]::before { background: #437b5d; border-color: #437b5d; }
.task-check svg { position: relative; }
.upcoming-footer { border-top: 1px solid var(--line); margin-top: .35rem; padding-top: .32rem; }
.upcoming-footer .button { padding-left: 0; min-height: 2.35rem; }
.upcoming-footer .button:hover { padding-left: .38rem; }

.reserve-section { margin-top: 1.48rem; }
.section-heading { margin-bottom: .67rem; align-items: center; }
.reserve-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.reserve-card { padding: 1rem 1.14rem; }
.reserve-top, .reserve-actions { display: flex; justify-content: space-between; align-items: center; gap: .4rem; }
.reserve-card h3 { margin-top: .6rem; color: #283d2f; font-size: .98rem; line-height: 1.32; overflow-wrap: anywhere; }
.reserve-amount { margin-top: .28rem; font-size: 1.45rem; font-weight: 700; letter-spacing: -.04em; overflow-wrap: anywhere; }
.reserve-card p { color: var(--muted); font-size: .83rem; margin-top: .12rem; }
.reserve-actions { border-top: 1px solid var(--line); margin-top: .65rem; padding-top: .32rem; }
.reserve-actions .button { padding-inline: .24rem; }
.history { margin-top: 1.15rem; }
.table-scroll { max-width: 100%; overflow: auto; margin-top: .48rem; }
table { width: 100%; border-collapse: collapse; font-size: .87rem; text-align: left; }
th { font-size: .83rem; color: var(--muted); font-weight: 700; }
th, td { padding: .48rem .56rem; border-bottom: 1px solid var(--line); }
.history-table td:first-child, .history-table .table-amount { white-space: nowrap; }
.history-table .table-amount { font-weight: 650; }
.history-table .detail-column { color: var(--muted); overflow-wrap: anywhere; }
.row-actions { display: flex; justify-content: end; }
.pagination { display: flex; justify-content: end; align-items: center; gap: .45rem; color: var(--muted); font-size: .88rem; margin-top: .58rem; }

.agenda-grid { grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); }
.calendar-nav { display: flex; gap: .12rem; }
.calendar-nav .button { font-size: .84rem; padding-inline: .46rem; min-height: 2.3rem; }
.calendar-heading { align-items: center; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: .26rem; margin-top: .7rem; }
.week-label { text-align: center; font-size: .82rem; font-weight: 700; color: var(--muted); padding: .2rem 0 .3rem; }
.calendar-day { background: #fbfcfa; border: 1px solid #e8ede6; border-radius: .46rem; min-height: clamp(3rem, 5vw, 5.2rem); display: flex; flex-direction: column; align-items: start; gap: .2rem; padding: .32rem; text-align: left; min-width: 0; }
.calendar-day.outside { background: #f8faf7; color: #68796c; }
.calendar-day:hover { background: #edf5ed; }
.calendar-day[aria-pressed=true] { background: #e9f3ea; border-color: #68977a; }
.calendar-number { min-width: 1.44rem; min-height: 1.44rem; display: grid; place-items: center; font-weight: 680; font-size: .83rem; }
.calendar-day.today .calendar-number { color: white; background: var(--green); border-radius: 50%; }
.calendar-event { display: block; max-width: 100%; border-radius: .25rem; padding: .05rem .2rem; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color: #29583f; background: #e3efe3; font-size: .75rem; }
.calendar-event.is-complete { color: #536255; background: #edf1eb; text-decoration: line-through; }
.calendar-more { font-size: .75rem; color: var(--muted); }
.calendar-dot { display: none; width: .32rem; height: .32rem; border-radius: 50%; background: #46815e; }
.agenda-list { margin-top: 1rem; }

dialog { width: min(100% - 1.6rem, 31.5rem); max-height: calc(100dvh - 1.7rem); color: var(--ink); border: 1px solid #d7e3d9; border-radius: 1.05rem; padding: 1.2rem; background: var(--surface); box-shadow: 0 18px 90px #112c2459; }
dialog.wide { width: min(100% - 1.6rem, 38rem); }
dialog::backdrop { background: #122c25a1; }
.dialog-heading { display: flex; gap: 1rem; justify-content: space-between; align-items: center; margin-bottom: .8rem; }
.dialog-heading h2 { font-size: 1.6rem; }
.dialog-heading .icon-button { margin: -.35rem -.25rem -.2rem 0; }
.dialog-copy { font-size: .94rem; color: var(--muted-strong); margin-bottom: .55rem; }
.form-stack { display: grid; gap: .78rem; }
.form-stack label:not(.check-label), [data-import-output] label:not(.check-label) { display: grid; gap: .29rem; color: #2d4335; font-size: .89rem; font-weight: 650; min-width: 0; }
.form-stack input:not([type=checkbox]), .form-stack textarea, .form-stack select { width: 100%; min-width: 0; min-height: 2.55rem; border: 1px solid #d5e0d6; border-radius: .57rem; color: var(--ink); background-color: #fcfdfa; padding: .47rem .6rem; font-size: 1rem; font-weight: 450; }
.form-stack input::placeholder, .form-stack textarea::placeholder { color: #667b6e; }
.form-stack select { padding-right: 1.65rem; }
.form-stack textarea { resize: vertical; }
.field-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; }
.field-help { color: var(--muted); font-size: .83rem; }
.form-error { color: var(--danger); background: #fcf0ed; border: 1px solid #f5ded7; padding: .5rem .63rem; border-radius: .45rem; font-size: .89rem; }
.dialog-actions { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding-top: .55rem; }
.dialog-actions.end { justify-content: end; }
.dialog-actions > div, .settings-actions { display: flex; flex-wrap: wrap; gap: .45rem; justify-content: end; }
.choices { display: grid; gap: .35rem; }
.choice { display: flex; width: 100%; text-align: left; align-items: center; gap: .65rem; padding: .55rem .6rem; border: 1px solid var(--border); border-radius: .65rem; background: #fbfcfa; }
.choice:hover { background: #f0f6f0; }
.choice strong, .choice small { display: block; }
.choice small { color: var(--muted); font-size: .84rem; }
.form-stack input[type=file] { font-size: .88rem; padding: .34rem; }
input[type=file]::file-selector-button { border: 0; background: #e8f2e9; color: var(--green); padding: .37rem .48rem; border-radius: .34rem; font: inherit; margin-right: .45rem; cursor: pointer; }
.import-guide { display: flex; align-items: center; flex-wrap: wrap; gap: .25rem .65rem; justify-content: space-between; color: var(--muted); font-size: .84rem; }
.import-guide .button { min-height: 2.1rem; padding: .3rem .2rem; }
[data-import-output] { display: grid; gap: .65rem; }
[data-import-output]:empty { display: none; }
.check-label { display: flex; gap: .44rem; align-items: center; font-size: .88rem; color: var(--muted-strong); }
.check-label input { width: 1rem; height: 1rem; accent-color: var(--green); }
.import-preview, .import-errors { border: 1px solid var(--border); border-radius: .56rem; padding: .55rem .66rem; font-size: .88rem; background: #fbfcfa; }
.import-errors { color: var(--danger); }
.import-preview ul { padding: 0; list-style: none; margin: .28rem 0 0; }
.import-preview li { display: flex; justify-content: space-between; gap: .5rem; padding: .17rem 0; }
.import-preview details { margin: .35rem 0; }
.import-preview details summary { cursor: pointer; color: var(--green); }
.import-preview details ul { max-height: 12rem; overflow: auto; }
.import-preview p { color: var(--muted); margin-top: .32rem; }
.notification-state { display: flex; align-items: center; gap: .5rem; border-radius: .6rem; background: #edf4ed; color: #305c43; padding: .65rem; margin: .65rem 0; font-size: .91rem; }
.account-panel { display: flex; gap: .6rem; align-items: start; padding: .55rem 0 .85rem; }
.account-panel p { color: var(--muted); font-size: .89rem; margin-top: .23rem; }
.settings-actions { justify-content: start; }
.toast { position: fixed; z-index: 10; max-width: min(calc(100% - 1.6rem), 30rem); right: .8rem; bottom: calc(1rem + env(safe-area-inset-bottom)); background: #1c4433; color: #fff; border: 1px solid #47765d; padding: .66rem .9rem; border-radius: .65rem; box-shadow: 0 10px 35px #183c2440; opacity: 0; pointer-events: none; transform: translateY(.45rem); transition: transform .18s, opacity .18s; }
.toast.visible { opacity: 1; transform: none; }

.login-layout { width: min(100% - 3rem, 70rem); margin: max(1.5rem, 10vh) auto 2rem; min-height: min(36rem, 75vh); display: grid; grid-template-columns: 1fr 1fr; overflow: hidden; border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: 0 12px 35px #1b3c2310; }
.login-identity { display: flex; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.4rem, 4.4vw, 3.4rem); }
.login-identity .brand { color: #fff; }
.login-identity .brand-mark { background: #f0f6e9; color: #1d593e; }
.login-identity .brand-name span { color: #a9d2ae; }
.login-identity h1 { font: 400 clamp(2.1rem, 4vw, 3.4rem)/1.1 var(--serif); letter-spacing: -.04em; }
.login-identity p { color: #ebf4eb; max-width: 22rem; margin-top: .64rem; }
.login-panel { display: grid; align-items: center; background: #fff; padding: clamp(1.4rem, 4.4vw, 3.4rem); }
.login-inner h2 { font: 400 1.9rem/1.2 var(--serif); margin-top: .8rem; }
.login-inner p { margin-top: .46rem; color: var(--muted-strong); }
.login-inner form { margin-top: 1.15rem; }

@media (max-width: 66rem) {
  .header-inner, .workspace, .site-footer { width: calc(100% - 4rem); }
}
@media (max-width: 53rem) {
  .header-inner, .workspace, .site-footer { width: calc(100% - 2rem); }
  .dashboard-grid, .agenda-grid { grid-template-columns: minmax(0, 1fr); }
  .plot > svg { max-height: 16rem; }
}
@media (max-width: 49rem) {
  .header-inner { grid-template-columns: 1fr 1fr; min-height: 0; gap: .38rem .8rem; padding-top: .55rem; }
  .header-end { grid-column: 2; grid-row: 1; }
  .nav { grid-row: 2; grid-column: span 2; justify-content: center; gap: .28rem; padding: .16rem 0 .52rem; }
  .nav a { flex: 1; justify-content: center; font-size: .86rem; min-height: 2.65rem; padding: .46rem .25rem; }
  .nav a svg { width: 1rem; height: 1rem; }
  .header-divider, .account-button > span:last-child { display: none; }
  .header-end { gap: .28rem; }
  .account-button { min-width: 2.7rem; justify-content: center; }
  .avatar { width: 1.92rem; height: 1.92rem; }
}
@media (max-width: 42rem) {
  .workspace { padding-top: 1.2rem; }
  .page-heading { display: grid; justify-content: stretch; gap: .73rem; margin-bottom: .85rem; }
  .page-heading p { font-size: .93rem; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .62rem; margin-bottom: .72rem; }
  .balance-hero { grid-column: 1 / -1; min-height: 10.65rem; }
  .metric-card, .hero-content { padding: .85rem; }
  .metric-card { min-height: 10.4rem; }
  .metric-label { font-size: .86rem; }
  .metric-card p { line-height: 1.25; }
  .hero-amount { font-size: clamp(2rem, 8vw, 3rem); }
  .hero::before { right: -14rem; }
  .dashboard-grid, .agenda-grid { gap: .72rem; }
  .chart-panel, .upcoming, .history, .calendar { padding: .82rem; }
  .chart-heading { flex-wrap: wrap; }
  .plot text { font-size: 20px; }
  .plot > svg { min-height: 8rem; }
  .filter.compact { max-width: 100%; }
  .reserve-grid { gap: .62rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .reserve-card { padding: .82rem; }
  .reserve-amount { font-size: 1.22rem; }
  .reserve-actions { align-items: start; gap: .05rem; }
  .reserve-actions .button { text-align: left; }
  .calendar-day { padding: .2rem .06rem; align-items: center; }
  .calendar-dot { display: inline-flex; }
  .calendar-event, .calendar-more { display: none; }
  .history-table .detail-column { display: none; }
  .history-table th, .history-table td { padding-inline: .24rem; }
  .history-table .row-actions .icon-button { width: 2rem; }
  .site-footer { padding-bottom: calc(1rem + env(safe-area-inset-bottom)); font-size: .78rem; }
  .login-layout { grid-template-columns: 1fr; width: calc(100% - 1.5rem); margin: .75rem auto 1rem; }
  .login-identity { gap: 1rem; }
}
@media (max-width: 23rem) {
  .header-inner, .workspace, .site-footer { width: calc(100% - 1.15rem); }
  .nav a { gap: .22rem; }
  .reserve-grid { grid-template-columns: 1fr; }
  .calendar-heading { flex-wrap: wrap; }
  .calendar-nav .button { padding-inline: .35rem; }
  .table-year { display: none; }
  .dialog-actions { flex-wrap: wrap; }
  .dialog-actions > div { margin-left: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; }
}
