* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding: 22px; }
body {
  margin: 0; min-height: 100vh; color: var(--luma-ink); font: 15px/1.55 var(--luma-font);
  background: radial-gradient(ellipse at 0 0, var(--luma-blue), transparent 55%),
    radial-gradient(ellipse at 95% 8%, var(--luma-pink), transparent 54%),
    radial-gradient(ellipse at 26% 100%, var(--luma-brand-yellow), transparent 50%), var(--luma-brand-paper);
  background-attachment: fixed;
}
.glass { border: 1px solid var(--luma-glass-edge); background: var(--luma-glass-solid); box-shadow: var(--luma-glass-shadow); border-radius: var(--luma-radius-glass); }
@supports (backdrop-filter: blur(1px)) {
  .glass { background: var(--luma-glass-fill); backdrop-filter: var(--luma-glass-filter); }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  body { background: var(--luma-brand-paper); }
  .glass { background: var(--luma-glass-solid); backdrop-filter: none; }
}
h1,h2,p { margin: 0; }
h1 { font-size: clamp(34px, 5.8vw, 67px); line-height: 1; letter-spacing: -.065em; }
h1 em { font: italic 500 .92em/1 var(--luma-display); }
h2 { font-size: 21px; letter-spacing: -.04em; line-height: 1.2; }
p, small { color: var(--luma-muted); }
h1 + p, h2 + p { margin-top: 7px; }
a { color: inherit; }
button,input,select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: wait; }
:focus-visible { outline: 3px solid #417bb4; outline-offset: 3px; }
button, input, select { min-height: 44px; border: 1px solid var(--luma-line); border-radius: 13px; padding: 8px 12px; }
input, select { width: 100%; background: var(--luma-white); }
label { font-size: 13px; font-weight: 600; display: grid; gap: 4px; }
form { display: grid; gap: 12px; }
.primary,.secondary,.quiet,.danger { padding-inline: 16px; font-weight: 700; border-radius: 999px; }
.primary { background: var(--luma-ink); color: white; border-color: var(--luma-ink); }
.secondary { background: white; }
.quiet { background: #ffffff7a; }
.danger { background: var(--luma-error); color: white; }
.error { color: var(--luma-error); font-size: 13px; }
.error:empty { display: none; }
.login { width: min(470px, calc(100% - 32px)); padding: clamp(22px, 5vw, 45px); margin: max(24px, 12vh) auto; }
.login img { margin-bottom: 20px; }
.login h1 { font-size: clamp(36px, 7vw, 48px); }
.login form { margin-top: 23px; }
.login-password { display: grid; gap: 4px; }
.dashboard-brand { font-weight: 400; }
.dashboard-brand b { font-weight: 700; }
.login-password-field { position: relative; }
.login-password-field input { padding-inline-end: 48px; }
.login-password-field button { position: absolute; inset-block: 0; inset-inline-end: 0; min-width: 44px; padding: 0; display: grid; place-items: center; background: transparent; border: 0; }
.password-slash { display: none; }
#toggle-password[data-visible] .password-slash { display: initial; }
#workspace { display: grid; grid-template-columns: 205px minmax(0, 1fr); gap: 18px; max-width: 1510px; margin: auto; padding: 18px; }
.sidebar { position: sticky; top: 18px; align-self: start; height: calc(100dvh - 36px); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.brand strong { display: block; color: var(--luma-muted); font-size: 11px; }
.sidebar nav { display: grid; gap: 5px; margin: 25px 0; }
.sidebar nav a { min-height: 44px; border-radius: 13px; padding: 10px; text-decoration: none; }
@media (hover: hover) and (pointer: fine) {
  .sidebar nav a:not([aria-current]):hover { background: #fff; }
}
.sidebar nav a[aria-current] { background: var(--luma-brand-yellow); font-weight: 700; }
@media (forced-colors: active) {
  .sidebar nav a[aria-current] { border: 1px solid Highlight; }
}
.sidebar .quiet { margin-top: auto; font-size: 12px; }
#overview { min-width: 0; display: grid; align-content: start; gap: 14px; }
.hero { padding: clamp(17px, 3vw, 30px); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 18px; }
.toolbar, .section-heading { display: flex; flex-wrap: wrap; align-items: end; gap: 9px; }
.section-heading { justify-content: space-between; margin-bottom: 12px; }
.feedback { font-size: 13px; padding-inline: 5px; }
.feedback:empty { display: none; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 9px; }
.metrics article, .panel { padding: clamp(13px, 2vw, 22px); border-radius: 23px; border: 1px solid white; background: var(--luma-white); }
.metrics article { display: grid; gap: 4px; align-content: start; }
.metrics span { font-size: 13px; }
.metrics strong { font-size: clamp(19px, 2.3vw, 31px); letter-spacing: -.05em; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.metrics .positive { background: var(--luma-finance-positive); }
.metrics .negative { background: var(--luma-finance-negative); }
.metrics .reserve-tone { background: var(--luma-brand-yellow); }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: 13px; }
th,td { padding: 9px 7px; border-bottom: 1px solid var(--luma-line); text-align: left; }
th { background: #f4f7fa; }
td.money { white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-actions { display: flex; gap: 4px; }
.cell-actions button { background: white; font-size: 12px; }
.chart-scroll { overflow-x: auto; }
.chart { min-width: 470px; display: grid; grid-template-columns: repeat(12,1fr); gap: 5px; }
.legend { display: flex; gap: 12px; margin: 8px 0; font-size: 12px; }
.legend span::before { content: ''; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 5px; background: var(--luma-chart-blue); }
.legend span:last-child::before { background: var(--luma-chart-pink); }
details { margin-top: 12px; font-size: 13px; }
summary { cursor: pointer; }
dialog { width: min(540px, calc(100% - 24px)); padding: 22px; border: 1px solid white; border-radius: 24px; color: var(--luma-ink); background: white; }
dialog::backdrop { background: #30323859; }
dialog form { margin-top: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
@media (max-width: 850px) {
  #workspace { grid-template-columns: 1fr; padding: 11px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 410px) { .form-grid { grid-template-columns: 1fr; } }

#overview { grid-template-columns: minmax(0, 1fr); }
#overview > *, .chart-scroll, .table-scroll { min-width: 0; }


.planned-values { margin-top: 6px; padding: 7px 10px; border-radius: 9px; background: var(--luma-brand-yellow); font-size: 13px; }
.entry-planned { background: #fefac578; }
td small { display: block; white-space: nowrap; }
#schedule-hint, #period-hint { font-size: 13px; }

.breakdown-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.breakdown-columns details { border: 1px solid var(--luma-line); border-radius: 14px; margin-top: 6px; }
.breakdown-columns summary { list-style: none; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 44px; padding: 8px 10px; }
.breakdown-columns summary::-webkit-details-marker { display: none; }
.breakdown-columns summary::before { content: ''; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.65px 1.65px 0; transform: rotate(-45deg); }
.breakdown-columns details[open] > summary::before { transform: rotate(45deg); }
.breakdown-columns summary strong { white-space: nowrap; }
#breakdown-income summary strong { background: var(--luma-blue); }
#breakdown-expense summary strong { background: var(--luma-pink); }
.breakdown-columns summary strong { border-radius: 7px; padding: 3px 6px; }
.breakdown-columns details p, .breakdown-columns ul { margin: 0; padding: 6px 10px; }
.breakdown-columns ul { list-style: none; }
.breakdown-columns li { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--luma-line); padding-block: 7px; }
.breakdown-columns li small { display: block; }
.breakdown-columns li > span { white-space: nowrap; }
@media (max-width: 680px) { .breakdown-columns { grid-template-columns: 1fr; } }

.annual-metrics { margin: 12px 0; }
.annual-metrics article { border-color: var(--luma-line); }
.roi-note { font-size: 13px; margin-top: 8px; }
.money-tag { display: inline-block; padding: 3px 7px; border-radius: 7px; font-weight: 650; }
.money-tag.income { background: var(--luma-finance-positive); }
.money-tag.expense { background: var(--luma-finance-negative); }
select {
  appearance: none;
  padding-inline-end: 38px;
  background: var(--luma-white) url("/chevron.svg") right 12px center / 16px no-repeat;
}
@media (forced-colors: active) { select { appearance: auto; background-image: none; } }
details > summary { list-style: none; }
details > summary::-webkit-details-marker { display: none; }
details:not(.breakdown-columns details) > summary::before {
  content: '';
  display: inline-block;
  width: 6px;
  height: 6px;
  border: solid currentColor;
  border-width: 0 1.65px 1.65px 0;
  transform: rotate(-45deg);
  vertical-align: .13em;
  margin-inline: 2px 8px;
}
details[open]:not(.breakdown-columns details) > summary::before { transform: rotate(45deg); vertical-align: .24em; }

.overview-switch { display: flex; width: fit-content; gap: 4px; padding: 4px; border: 1px solid white; border-radius: 999px; background: #ffffff8c; }
.overview-switch a { min-height: 44px; display: grid; align-items: center; padding: 5px 14px; border-radius: 999px; text-decoration: none; font-size: 13px; }
.overview-switch a[aria-current] { background: white; box-shadow: 0 2px 5px #30323818; font-weight: 700; }
.chart-line { min-width: 470px; padding: 5px 0; }
.chart-line canvas { display: block; width: 100%; height: 175px; }
.chart-line .chart { gap: 0; text-align: center; }
.chart-line a { padding: 8px 1px; border-radius: 8px; text-decoration: none; font-size: 12px; }
.chart-line a[aria-current] { background: var(--luma-blue); font-weight: 700; }
.chart-line a:focus-visible { outline-offset: -3px; }
#breakdown .breakdown-columns { grid-template-columns: minmax(0, 1fr); }

#reserves form, #distribution .table-scroll { margin-top: 12px; }
#reserve-form { max-width: 375px; }

.revenue-service-total {
  width: fit-content;
  margin: 0 0 10px;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--luma-finance-positive);
  color: var(--luma-ink);
  font-weight: 700;
}

.mobile-menu-bar, #close-menu { display: none; }
@media (max-width: 850px) {
  .mobile-menu-bar {
    display: flex;
    position: sticky;
    top: 8px;
    z-index: 3;
    padding: 5px 8px;
    width: fit-content;
    border-radius: 999px;
  }
  #open-menu { display: flex; align-items: center; gap: 8px; background: white; }
  #workspace > .sidebar { display: none; }
  #mobile-menu {
    position: fixed;
    inset: 0 auto 0 0;
    margin: 0;
    width: min(310px, calc(100% - 28px));
    max-width: none;
    height: 100dvh;
    max-height: none;
    padding: 0;
    border: 0;
    border-radius: 0 24px 24px 0;
    overflow: hidden;
    background: var(--luma-glass-solid);
  }
  #mobile-menu .sidebar { position: relative; top: 0; height: 100%; padding: 20px 16px; border-radius: inherit; box-shadow: none; }
  #mobile-menu .brand { padding-inline-end: 50px; }
  #close-menu { display: grid; position: absolute; inset: 14px 12px auto auto; width: 44px; padding: 0; place-items: center; }
  body:has(#mobile-menu[open]) { overflow: hidden; }
}

.annual-forecast { color: var(--luma-muted); }
.annual-forecast > summary { padding-block: 4px; }
.annual-forecast > p, .annual-forecast > .table-scroll { margin-top: 8px; }
.annual-forecast thead th { background: var(--luma-brand-paper); }
.annual-forecast tfoot { font-weight: 600; }

.brand-tile {
  flex: none;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--luma-brand-yellow);
}
.login-brand { width: 60px; height: 60px; margin-bottom: 20px; border-radius: 16px; }
.login .login-brand img { margin: 0; }
.sidebar nav a { display: flex; align-items: center; gap: 10px; }
.sidebar nav a svg { flex: 0 0 18px; }

.monthly-total { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px; }
.monthly-total[data-kind="income"] { background: var(--luma-finance-positive); }
.monthly-total[data-kind="expense"] { background: var(--luma-finance-negative); }
.monthly-total-amounts { display: grid; }
.monthly-total-amounts strong { font-size: clamp(24px, 3vw, 36px); line-height: 1.1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.projection-other-years { display: flex; flex-wrap: wrap; gap: 6px 15px; margin-top: 8px; }
.projection-other-years a { color: var(--luma-ink); text-underline-offset: 3px; }

.reconciliation-note { color: var(--luma-muted); }
.reconciliation-note > p { margin-top: 6px; }

.period-pie { margin: 0 0 16px; padding: 12px 14px; background: var(--luma-brand-paper); border-radius: 15px; }
.period-pie figcaption { font-weight: 700; }
.period-pie > p { margin-top: 5px; font-size: 13px; }
.period-pie-body { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin-top: 8px; }
.period-pie-chart {
  width: 124px;
  aspect-ratio: 1;
  border-radius: 50%;
  flex: none;
}
.period-pie dl { margin: 0; display: grid; gap: 6px; font-size: 13px; }
.period-pie dt { display: flex; align-items: center; gap: 6px; }
.period-pie dt::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--slice-color); flex: 0 0 8px; }
.period-pie dd { margin-left: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }

.reserves-year-latest { display: grid; gap: 2px; padding: 8px 13px; border-radius: 12px; background: var(--luma-brand-yellow); }
.reserves-year-latest span { font-size: 12px; }
.reserves-year-latest strong { font-size: 22px; font-variant-numeric: tabular-nums; }
.reserve-month-button { min-height: 44px; padding: 4px 7px; border: none; background: transparent; text-decoration: underline; }
.reserve-month-button[aria-current] { background: var(--luma-brand-yellow); font-weight: 700; }
.cell-actions .realize-entry { background: var(--luma-finance-positive); font-weight: 700; }

.login-remember { display: flex; align-items: center; gap: 8px; min-height: 44px; }
.login-remember input { width: 18px; min-height: 18px; margin: 0; flex: none; }
