/* September review: spacing, compact disclosures and an accessible AI entry. */
html[data-theme] #page .dashboard-top { margin-bottom: 24px; }
html[data-theme] #page .money-overview-kpis { align-items: stretch; }
html[data-theme] #page .money-overview-kpis > .simple-kpi { align-self: stretch; }
html[data-theme] #page .money-overview-kpis > .commitment-kpi,
html[data-theme] #page .money-overview-kpis > .niwwi-spendable-kpi { grid-column: span 3; }
html[data-theme] #page .money-overview-kpis > .simple-kpi > p { margin-bottom: 0; }
html[data-theme] #page .money-overview-kpis .niwwi-spendable-detail { margin-top: auto; }
html[data-theme] #page .money-position-card { min-height: 0; align-self: start; padding: 22px; }
html[data-theme] #page .money-position-card > .niwwi-spendable-detail { margin: 0; border: 0; }
html[data-theme] #page .money-position-card .money-position-trigger { display: grid; justify-items: start; gap: 10px; padding: 20px; border-radius: 20px; background: linear-gradient(125deg,#44317c,#186259); color: #fff; cursor: pointer; list-style: none; box-shadow: 0 8px 28px #7860d32b; }
html[data-theme] #page .money-position-trigger::-webkit-details-marker { display: none; }
html[data-theme] #page .money-position-trigger small { color: #eee8ff; letter-spacing: .06em; }
html[data-theme] #page .money-position-trigger strong { color: #c6ffe8; font-size: clamp(26px,3vw,40px); line-height: 1.15; }
html[data-theme] #page .money-position-trigger span { display: flex; gap: 8px; align-items: center; font-size: 13px; }
html[data-theme] #page .money-position-trigger svg { width: 18px; height: 18px; }
html[data-theme] #page .money-position-trigger:focus-visible { outline: 3px solid #ac8cff; outline-offset: 4px; }
html[data-theme] #page .money-position-card > p { margin: 14px 2px 0; font-size: 13px; line-height: 1.6; }
html[data-theme] #page .money-position-card details > div { padding-top: 18px; }
html[data-theme] #page .forecast-month-track { position: relative; height: 28px; border-radius: 10px; overflow: hidden; margin: 20px 0; background: #72648622; border: 1px solid #967bce55; }
html[data-theme] #page .forecast-month-track > i { display: block; height: 100%; background: linear-gradient(90deg,#7552d3,#448dce); border-radius: inherit; }
html[data-theme] #page .forecast-month-track > span { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 13px; text-shadow: 0 1px 4px #1c1049; }
html[data-theme] #page .niwwi-data-guidance > summary { width: fit-content; max-width: 100%; min-height: 44px; padding: 12px 16px; border: 1px solid #a58ac74d; border-radius: 14px; background: #9271c711; cursor: pointer; }
html[data-theme] #page .fv-history-view .niwwi-title-symbol { width: 48px; height: 48px; display: inline-grid; place-items: center; border: 1px solid #af8ce266; border-radius: 15px; background: linear-gradient(145deg,#9675df26,#56cabe15); box-shadow: 0 6px 20px #7750b315; }
html[data-theme] #page .fv-history-view .niwwi-title-symbol svg { width: 26px; height: 26px; }
html[data-theme] #page .credit-card-actions { margin-top: 18px; margin-bottom: 20px; gap: 10px; }
html[data-theme] #page .credit-card-actions + details { margin-top: 18px; }
html[data-theme] #page .models-settings-view > .settings-account-list { max-height: none; overflow: visible; padding-right: 0; }
html[data-theme] #page .accounts-settings-view > .credit-liability-guide { margin-bottom: 24px; }
html[data-theme] #page .accounts-settings-view > section + section,
html[data-theme] #page .data-settings-view > section + section { margin-top: 24px; }
html[data-theme] #page .data-settings-view .settings-data-grid { gap: 22px; }
html[data-theme] #page .niwwi-data-center header p { line-height: 1.6; }
@media (min-width: 761px) {
  html[data-theme] #page.general-dashboard-page .money-overview-kpis { grid-template-columns: repeat(6,minmax(0,1fr)); }
  html[data-theme] #page.general-dashboard-page .money-overview-kpis > .simple-kpi { grid-column: span 2; }
  html[data-theme] #page.general-dashboard-page .money-overview-kpis > .simple-kpi.commitment-kpi,
  html[data-theme] #page.general-dashboard-page .money-overview-kpis > .simple-kpi.niwwi-spendable-kpi { grid-column: span 3; }
  body > .niwwi-ai-dock[data-niwwi-ai-dock="desktop"] { position: fixed; right: 24px; bottom: 24px; z-index: 90; margin: 0; display: block; }
  body > .niwwi-ai-dock .niwwi-ai-docked-launcher { width: auto; min-width: 150px; height: 58px; padding: 8px 16px; border-radius: 20px; box-shadow: 0 12px 38px #4930704d; }
  body > .niwwi-ai-dock .mova-ai-launcher-icon { margin-right: 8px; }
}
@media (max-width: 760px) {
  html[data-theme] #page .money-overview-kpis > .commitment-kpi,
  html[data-theme] #page .money-overview-kpis > .niwwi-spendable-kpi { grid-column: 1 / -1; }
  html[data-theme] #page .money-position-card { padding: 16px; }
  html[data-theme] #page .dashboard-top { margin-bottom: 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .money-position-trigger { transition: transform .18s ease, box-shadow .18s ease; }
  .money-position-trigger:hover { transform: translateY(-2px); box-shadow: 0 12px 32px #7860d345; }
}

/* Visual audit: expressive framing, quiet reading surfaces and stable figures.
   Decoration is confined to headers; financial tones keep their own meaning. */
html[data-theme="light"] {
  --bg: #f6f2ff;
  --muted: #69577f;
  --niwwi-title-end: #a52b86;
  --niwwi-shadow: #5f2d9912;
  --niwwi-action-gradient: linear-gradient(115deg,#6635d3 0%,#803aca 52%,#b32d85 100%);
  --niwwi-header: linear-gradient(115deg,#eee3ff 0%,#faf6ff 48%,#f9deef 100%);
}
html[data-theme="dark"] {
  --muted: #c4b7d8;
  --niwwi-title-end: #f3aadf;
  --niwwi-action-gradient: linear-gradient(115deg,#6835d3 0%,#813dcc 52%,#ac307e 100%);
  --niwwi-header: linear-gradient(115deg,#33204f 0%,#211834 48%,#4b2348 100%);
}
html[data-theme] body #page .niwwi-page-header {
  background: var(--niwwi-header);
  border-color: color-mix(in srgb,var(--purple) 40%,var(--line));
  box-shadow: inset 0 1px 0 #ffffff30,0 10px 32px var(--niwwi-shadow);
}
html[data-theme] body #page .niwwi-page-header::before { opacity: .76; }
html[data-theme] body #page .niwwi-page-header::after {
  content: ""; display: block; position: absolute; inset: 14px 18px auto auto;
  width: 160px; height: 88px; z-index: -1; pointer-events: none;
  background: var(--niwwi-star) 8px 25px/26px 26px no-repeat,
    var(--niwwi-star) 90px 5px/16px 16px no-repeat,
    var(--niwwi-star) 138px 66px/10px 10px no-repeat;
  opacity: .8;
}
html[data-theme] body #page .niwwi-page-title {
  font-size: clamp(29px,2.7vw,40px); font-weight: 800; line-height: 1.2;
}
html[data-theme] body #app #page .niwwi-page-header p { font-size: 14px; line-height: 1.65; }
html[data-theme] body #app #page :is(.simple-section-head,.section-title-row,.analysis-section-copy,.section-heading) h2 {
  font-size: clamp(21px,1.7vw,25px); line-height: 1.35;
}
html[data-theme] body #app #page :is(.simple-section-head,.analysis-section-copy) p {
  font-size: 13px; line-height: 1.65;
}
html[data-theme] body #app #page :is(.eyebrow,.niwwi-section-eyebrow) { font-size: 11px; letter-spacing: .1em; }
html[data-theme] .sidebar .nav-item { font-size: 13px; min-height: 46px; }
html[data-theme] .sidebar .nav-subitem { font-size: 12px; min-height: 42px; }
html[data-theme] .sidebar .nav-label { font-size: 10px; letter-spacing: .12em; }
html[data-theme] .niwwi-theme-toggle { width: 44px; height: 44px; }
html[data-theme] .dashboard-period-chip small { font-size: 11px; }
html[data-theme] .dashboard-period-chip b { font-size: 14px; }

/* Financial reading hierarchy, without recoloring values or changing totals. */
html[data-theme] body #app #page :is(.simple-value,.kpi-value,.registry-kpi > strong,.registry-kpi > b,
  .saving-goal-value strong,.analysis-forecast-summary b,.analysis-kpis b) {
  font-family: var(--niwwi-heading-font); font-variant-numeric: tabular-nums; letter-spacing: -.025em;
}
html[data-theme] body #app #page .simple-kpi > .simple-value { font-size: clamp(27px,2.5vw,36px); line-height: 1.2; }
html[data-theme] body #app #page .simple-kpi > .kpi-label { font-size: 12px; line-height: 1.5; letter-spacing: .055em; }
html[data-theme] body #app #page .simple-kpi > p { font-size: 13px; line-height: 1.6; }
html[data-theme] body #app #page .money-overview-kpis .actual-flow-split small { font-size: 11px; line-height: 1.4; }
html[data-theme] body #app #page .money-overview-kpis .actual-flow-split strong { font-size: 24px; }
html[data-theme] body #app #page .account-balance-breakdown { font-size: 12px; line-height: 1.5; }
html[data-theme] body #app #page :is(.registry-kpi > small,.registry-kpi > span,.registry-type-categories,
  .registry-business-head p,.registry-type-summary > div:nth-child(2) b) { font-size: 12px; line-height: 1.5; }
html[data-theme] body #app #page .registry-type-summary > div:nth-child(2) small { font-size: 12px; }
html[data-theme] body #app #page .registry-type-grid { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); gap: 16px; }
html[data-theme] body #app #page .registry-type-categories { padding: 0 16px 16px; }
html[data-theme] body #app #page .registry-type-categories > div { gap: 8px; padding-block: 3px; }
html[data-theme] body #app #page :is(.spending-row,.row-amount,.movement-search) small { font-size: 12px; line-height: 1.5; }

/* Savings, calendar and analysis previously inherited miniature 7–10px text. */
html[data-theme] body #app #page :is(.savings-summary-grid,.analysis-kpis,.calendar-month-insights,.analysis-forecast-summary) > article {
  min-width: 0; padding: 22px; border: 1px solid var(--niwwi-edge); border-radius: 22px;
}
html[data-theme] body #app #page :is(.savings-summary-grid,.analysis-kpis,.calendar-month-insights,.analysis-forecast-summary) > article > :is(span,small) {
  font-size: 12px; line-height: 1.55; letter-spacing: .02em;
}
html[data-theme] body #app #page :is(.savings-summary-grid,.analysis-kpis,.calendar-month-insights,.analysis-forecast-summary) > article > b {
  display: block; font-size: clamp(25px,2.3vw,32px); line-height: 1.25; margin-block: 12px;
  font-variant-numeric: tabular-nums; overflow-wrap: anywhere;
}
html[data-theme] body #app #page :is(.saving-goal-head,.savings-location-card > header) h2 { font-size: 21px; line-height: 1.4; }
html[data-theme] body #app #page :is(.saving-goal-head,.savings-location-card > header) small { font-size: 12px; }
html[data-theme] body #app #page .saving-goal-value strong { font-size: 32px; }
html[data-theme] body #app #page :is(.saving-goal-value > span,.saving-goal-facts,.savings-location-empty small) { font-size: 13px; line-height: 1.6; }
html[data-theme] body #app #page .savings-location-empty b { font-size: 15px; }
html[data-theme] body #app #page .savings-equation { padding: 16px; font-size: 14px; flex-wrap: wrap; }
html[data-theme] body #app #page .saving-goal-progress { height: 10px; background: var(--surface2); border-radius: 999px; }
html[data-theme] body #app #page .saving-goal-progress > i { background: var(--niwwi-action-gradient); border-radius: inherit; }
html[data-theme] body #app #page .analysis-view-tabs { padding: 5px; border: 1px solid var(--niwwi-edge); border-radius: 18px; background: var(--surface2); }
html[data-theme] body #app #page :is(.analysis-view-tabs,.analysis-business-switcher,.analysis-scenario-switcher) button {
  min-height: 44px; font-size: 13px; line-height: 1.4; border-radius: 13px;
}
html[data-theme] body #app #page .analysis-view-tabs button.active { background: var(--niwwi-action-gradient); color: #fff; }
html[data-theme] body #app #page .analysis-section-copy > div > span { font-size: 11px; }
html[data-theme] body #app #page .analysis-horizon :is(span,small) { font-size: 11px; line-height: 1.5; }
html[data-theme] body #app #page .analysis-horizon b { font-size: 14px; }
html[data-theme] #app #analysisForecastPanel small { font-size: 12px; line-height: 1.55; }
html[data-theme] body #app #page .calendar-filters label { font-size: 12px; line-height: 1.5; }
html[data-theme] body #app #page .calendar-legend { gap: 9px; flex-wrap: wrap; }
html[data-theme] body #app #page .calendar-legend > span { font-size: 12px; border-color: var(--niwwi-edge); padding: 7px 10px; }
html[data-theme] body #app #page .calendar-day-event-preview > b { font-size: 12px; line-height: 1.35; }
html[data-theme] body #app #page .calendar-preview-meta :is(small,em) { font-size: 11px; line-height: 1.4; }
html[data-theme] body #app #page .calendar-day-more { min-height: 32px; font-size: 12px; }

/* Reuse the existing decoration and notification state; no new runtime work. */
@keyframes niwwi-audit-stars {
  from { transform: translateY(3px) rotate(-3deg); opacity: .55; }
  to { transform: translateY(-7px) rotate(4deg); opacity: 1; }
}
@keyframes niwwi-audit-bell {
  0%,35%,100% { transform: rotate(0); }
  8%,22% { transform: rotate(14deg); }
  15%,28% { transform: rotate(-12deg); }
}
@media (prefers-reduced-motion: no-preference) {
  html[data-theme] body #page .niwwi-page-header::after { animation: niwwi-audit-stars 6s ease-in-out infinite alternate; }
  html[data-theme] body #app #page .niwwi-title-symbol::after { animation: niwwi-audit-stars 5s ease-in-out infinite alternate-reverse; }
  html[data-theme] .sidebar-notification-bell.has-alerts > span { transform-origin: 50% 15%; animation: niwwi-audit-bell 3s ease-in-out 3; }
  html[data-theme] :is(.primary,.registry-save,.registry-ai-action,.niwwi-shimmer-button) {
    background-size: 160% 100%; transition: background-position .35s ease,box-shadow .2s ease,transform .2s ease;
  }
}
@media (hover:hover) and (prefers-reduced-motion: no-preference) {
  html[data-theme] :is(.primary,.registry-save,.registry-ai-action,.niwwi-shimmer-button):not(:disabled):hover {
    background-position: 100% 50%; transform: translateY(-2px); box-shadow: 0 8px 24px #8650b44d;
  }
  html[data-theme] .sidebar-notification-bell:hover > span { animation: niwwi-audit-bell .9s ease-in-out; }
}
@media (max-width:760px) {
  html[data-theme] body #page .niwwi-page-header { padding: 22px 18px; border-radius: 24px; }
  html[data-theme] body #page .niwwi-page-title { font-size: 29px; gap: 12px; }
  html[data-theme] body #app #page .niwwi-page-header p { font-size: 13px; }
  html[data-theme] body #page .niwwi-page-header::after { width: 112px; opacity: .5; }
  html[data-theme] body #app #page .simple-kpi > .simple-value { font-size: 28px; }
  html[data-theme] body #app #page .simple-kpi > .kpi-label { font-size: 11px; }
  html[data-theme] body #app #page .simple-kpi > p { font-size: 12px; }
  html[data-theme] body #app #page :is(.savings-summary-grid,.analysis-kpis,.calendar-month-insights,.analysis-forecast-summary) > article { padding: 16px; }
  html[data-theme] body #app #page .calendar-day-more { min-height: 36px; font-size: 11px; }
}
@media (prefers-reduced-motion:reduce) {
  html[data-theme] body #page .niwwi-page-header::after,
  html[data-theme] body #app #page .niwwi-title-symbol::after,
  html[data-theme] .sidebar-notification-bell > span { animation: none; transform: none; }
  html[data-theme] :is(.primary,.registry-save,.registry-ai-action,.niwwi-shimmer-button) { transition: none; }
}

/* Monthly outlook is prominent beside actual activity, with its future money basis visible. */
html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > article.niwwi-spendable-kpi {
  --niwwi-tone: #693bab; --text: #3d2470; --muted: #665580; --line: #cdb7ed;
  --surface: #faf6ff; --surface2: #f6f0ff;
  background: linear-gradient(145deg,#faf4ff,#ede2ff 65%,#f8e7f1) !important;
  border: 1px solid #ba98e4 !important; color: var(--text);
  box-shadow: 0 12px 28px #7951ad1f;
}
html[data-theme="dark"] body #app #page.general-dashboard-page .money-overview-kpis > article.niwwi-spendable-kpi {
  --niwwi-tone: #ead4ff; --text: #f0e6ff; --muted: #c9b8de; --line: #765b9b;
  --surface: #332448; --surface2: #38294c;
  background: linear-gradient(145deg,#483065,#30203d) !important; border-color: #8a64b4 !important;
}
html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > article.niwwi-spendable-kpi.negative {
  --niwwi-tone: #a92f54; --line: #dfb0c5; --surface: #fff5f9; --surface2: #fae5ef;
  background: linear-gradient(145deg,#fff2f9,#f5e3ee) !important; border-color: #d39bb7 !important;
}
html[data-theme="dark"] body #app #page.general-dashboard-page .money-overview-kpis > article.niwwi-spendable-kpi.negative {
  --niwwi-tone: #ffbed2; --line: #997088; --surface: #472d42; --surface2: #513448;
  background: linear-gradient(145deg,#593144,#3b293d) !important;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi::before { display: none; }
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi > .kpi-label {
  color: var(--niwwi-tone) !important; letter-spacing: .09em; font-size: 12px;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi > .simple-value {
  color: var(--niwwi-tone) !important; font-size: clamp(27px,2.5vw,36px) !important;
  line-height: 1.2; margin: 2px 0 6px !important;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi > p {
  color: var(--text); font-size: 14px; line-height: 1.65;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi > .niwwi-today-basis {
  padding: 13px 14px; margin: 10px 0 4px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--surface2); color: var(--muted); font-size: 12px;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .niwwi-spendable-detail {
  border-color: var(--line); margin-top: auto;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .niwwi-spendable-detail summary {
  color: var(--text); min-height: 48px; font-size: 13px; background: transparent;
}
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .niwwi-spendable-detail p { color: var(--muted); }
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .niwwi-spendable-detail dl { background: var(--surface); color: var(--muted); }
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .niwwi-spendable-detail dd { color: var(--text); white-space: normal; overflow-wrap: anywhere; }
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi .subtle-button { color: var(--niwwi-tone); min-height: 44px; }
html[data-theme] body #app #page.general-dashboard-page .niwwi-spendable-kpi :is(summary,button):focus-visible { outline: 2px solid var(--niwwi-tone); outline-offset: 3px; }
@media (min-width: 761px) {
  html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis { grid-template-columns: repeat(6,minmax(0,1fr)); }
  html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > .simple-kpi { grid-column: span 2; }
  html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > :is(.receivable-kpi,.commitment-kpi) { grid-column: span 3; }
}
@media (min-width: 761px) and (max-width: 1050px) {
  html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > .simple-kpi { grid-column: span 3; }
  html[data-theme] body #app #page.general-dashboard-page .money-overview-kpis > .actual-flow-kpi { grid-column: 1 / -1; }
}

/* Two monthly decision stages share one residual payment basis. */
.niwwi-monthly-period { color: var(--muted); text-transform: capitalize; }
.niwwi-monthly-stages { display: grid; gap: 15px; margin: 12px 0; }
.niwwi-monthly-stages > div { display: grid; gap: 6px; }
.niwwi-monthly-stages > div + div { padding-top: 14px; border-top: 1px solid var(--line); }
.niwwi-monthly-stages span { font-size: 13px; line-height: 1.45; color: var(--text); }
.niwwi-monthly-stages small { font-size: 11px; line-height: 1.45; color: var(--muted); font-weight: 400; }
.niwwi-monthly-stages .niwwi-monthly-of { background: color-mix(in srgb,var(--purple) 5%,transparent); border-radius: 12px; padding: 12px; }
.niwwi-panorama-open { margin: 8px 0; min-height: 42px; }
#modalContent:has(.niwwi-monthly-panorama) { width: min(1440px,calc(100vw - 40px)); max-width: 1440px; max-height: 94vh; padding: 28px; overflow-y: auto; }
.niwwi-monthly-panorama { color: var(--text); display: grid; gap: 22px; min-width: 0; }
.niwwi-monthly-panorama .modal-head { align-items: flex-start; margin: 0; }
.niwwi-monthly-panorama .modal-head h2 { margin: 5px 0 8px; }
.niwwi-monthly-panorama .niwwi-monthly-stages { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 0; margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; }
.niwwi-monthly-panorama .niwwi-monthly-stages > div { padding: 20px; align-content: start; border: 0; border-radius: 0; }
.niwwi-monthly-panorama .niwwi-monthly-stages > div + div { border-left: 1px solid var(--line); }
.niwwi-monthly-panorama .niwwi-monthly-stages .niwwi-monthly-of { border-radius: 0 16px 16px 0; }
.niwwi-panorama-caption,.niwwi-panorama-panel > p { color: var(--muted); font-size: 13px; line-height: 1.65; margin: 0; }
.niwwi-panorama-reference { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 18px; }
.niwwi-panorama-reference > div { display: grid; align-content: start; gap: 8px; padding: 4px 0; }
.niwwi-panorama-reference small { color: var(--muted); font-size: 10px; letter-spacing: .06em; }
.niwwi-panorama-reference strong { font-size: 20px; font-variant-numeric: tabular-nums; }
.niwwi-panorama-reference span { font-size: 12px; color: var(--muted); line-height: 1.5; }
.niwwi-panorama-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; align-items: start; }
.niwwi-panorama-panel { border: 1px solid var(--line); border-radius: 16px; background: var(--surface); overflow: hidden; min-width: 0; }
.niwwi-panorama-panel h3 { padding: 16px 18px; margin: 0; font-size: 15px; background: color-mix(in srgb,var(--purple) 6%,transparent); border-bottom: 1px solid var(--line); }
.niwwi-panorama-panel > p { padding: 14px 18px; }
.niwwi-panorama-table-wrap { overflow-x: auto; }
.niwwi-panorama-panel:not(.niwwi-panorama-flow) .niwwi-panorama-table-wrap { max-height: 360px; overflow-y: auto; }
.niwwi-monthly-panorama thead { position: sticky; top: 0; background: var(--surface); z-index: 1; }
.niwwi-monthly-panorama table { width: 100%; border-collapse: collapse; font-size: 12px; line-height: 1.5; font-variant-numeric: tabular-nums; }
.niwwi-monthly-panorama th,.niwwi-monthly-panorama td { padding: 11px 16px; border-bottom: 1px solid var(--line); vertical-align: top; text-align: right; white-space: nowrap; }
.niwwi-monthly-panorama th:first-child { text-align: left; white-space: normal; min-width: 150px; }
.niwwi-monthly-panorama tbody th { font-weight: 500; }
.niwwi-monthly-panorama thead th { font-size: 11px; font-weight: 600; color: var(--muted); }
.niwwi-monthly-panorama th small { display: block; font-weight: 400; color: var(--muted); font-size: 10px; margin-top: 3px; }
.niwwi-monthly-panorama tbody tr:last-child > * { border-bottom: 0; }
.niwwi-monthly-panorama tfoot { color: var(--purple); font-weight: 700; background: color-mix(in srgb,var(--purple) 6%,transparent); }
.niwwi-monthly-panorama tfoot > tr > * { border-top: 1px solid var(--line); font-size: 16px; }
.niwwi-panorama-status { white-space: normal; display: block; min-width: 85px; max-width: 150px; font-size: 10px; color: var(--muted); }
.niwwi-panorama-missing { padding: 16px 18px; font-size: 12px; line-height: 1.7; border-top: 1px solid var(--line); }
.niwwi-panorama-missing summary { cursor: pointer; }
/* A single worksheet, fitted as a whole to the viewport like the budget sheet. */
html[data-theme] body #modalContent:has(.niwwi-workbook-viewport) { width: calc(100vw - 24px); max-width: none; height: calc(100dvh - 24px); max-height: none; padding: 14px; overflow: hidden; background: #fff; border-radius: 12px; color: #334155; }
.niwwi-workbook-viewport { position: relative; width: 100%; height: 100%; overflow: hidden; }
.niwwi-workbook-sheet { position: absolute; left: calc((100% - var(--workbook-visible-width,100%))/2); top: 0; width: 1840px; padding: 8px; box-sizing: border-box; transform-origin: top left; color: #334155; background: #fff; font-family: inherit; }
.niwwi-workbook-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin: 0 0 14px; }
.niwwi-workbook-head small { font-size: 10px; letter-spacing: .2em; color: #64748b; }
.niwwi-workbook-head h2 { margin: 5px 0; font-size: 22px; font-weight: 600; text-transform: capitalize; color: #334155; }
.niwwi-workbook-head p { margin: 0; color: #64748b; font-size: 11px; }
.niwwi-workbook-actions { display: flex; align-items: center; gap: 12px; }
.niwwi-workbook-tabs { display: flex; padding: 4px; border: 1px solid #e0d9ee; border-radius: 10px; background: #f8f5fc; gap: 4px; }
.niwwi-workbook-tabs button { border: 0; border-radius: 7px; padding: 9px 13px; background: transparent; color: #657083; font: inherit; font-size: 12px; white-space: nowrap; }
.niwwi-workbook-tabs button[aria-selected="true"] { background: #fff; color: #68419b; box-shadow: 0 1px 5px #76569c24; font-weight: 600; }
.niwwi-workbook-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin-bottom: 16px; }
.niwwi-workbook-summary > div { display: grid; gap: 6px; padding: 12px 16px; border: 1px solid #dce8ee; background: #f5faff; }
.niwwi-workbook-summary > div:last-child { background: #f0f8f3; border-color: #d7e8dd; }
.niwwi-workbook-summary span { font-size: 12px; color: #526175; }
html[data-theme] body .niwwi-workbook-summary strong { font-size: 25px; line-height: 1.2; color: #334155; }
.niwwi-workbook-summary small { font-size: 10px; color: #64748b; }
.niwwi-workbook-result { padding: 16px; border: 1px solid #cbded2; background: #edf7f0; }
.niwwi-workbook-result span { font-size: 10px; letter-spacing: .12em; }
html[data-theme] body .niwwi-workbook-result strong { display: block; font-size: 26px; color: #284d38; margin: 10px 0; }
.niwwi-workbook-result p { font-size: 10px; line-height: 1.45; margin: 0; }
.niwwi-panorama-freshness { display: flex; align-items: center; gap: 12px; justify-content: space-between; color: #64748b; font-size: 11px; margin-bottom: 12px; }
.niwwi-panorama-freshness button { padding: 5px 10px; font-size: 11px; }
.niwwi-model-estimate-editor { display: grid; gap: 12px; margin: 18px 0; }
.niwwi-model-estimate-editor > div { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.niwwi-model-estimate-editor label { display: grid; gap: 5px; }
.niwwi-model-estimate-editor input { width: 100%; min-width: 0; }
.niwwi-four-scenarios { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.niwwi-four-scenarios > div { display: grid; gap: 5px; padding: 14px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); }
.niwwi-four-scenarios span { font-size: 12px; color: var(--muted); }
.niwwi-four-scenarios small { font-size: 11px; color: var(--muted); }
html[data-theme] .niwwi-four-scenarios strong { font-size: 25px; line-height: 1.2; }
.niwwi-workbook-sheet .niwwi-four-scenarios { grid-template-columns: repeat(4,minmax(0,1fr)); margin: 0 0 16px; }
.niwwi-workbook-sheet .niwwi-four-scenarios > div { border-radius: 0; border-color: #dce6ee; background: #f5faff; }
.niwwi-workbook-sheet .niwwi-four-scenarios > div:nth-child(even) { background: #f0f8f3; border-color: #d7e8dd; }
.niwwi-workbook-sheet .niwwi-four-scenarios span,.niwwi-workbook-sheet .niwwi-four-scenarios small { color: #5c6878; }
html[data-theme] body .niwwi-workbook-sheet .niwwi-four-scenarios strong { color: #334155; }
.niwwi-workbook-actions .secondary { font-size: 12px; padding: 8px 12px; border: 1px solid #dbe2ec; background: #f8fafc; color: #475569; }
.niwwi-workbook-actions .modal-close { position: static; margin: 0; color: #475569; background: #f8fafc; border-color: #dbe2ec; width: 32px; height: 32px; }
.niwwi-workbook-sheet .niwwi-monthly-stages { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; margin: 0 0 16px; }
.niwwi-workbook-sheet .niwwi-monthly-stages > div { align-content: start; padding: 12px 15px; border: 1px solid #d9e4ed; border-radius: 0; gap: 4px; background: #f7fbff; }
.niwwi-workbook-sheet .niwwi-monthly-stages > div:nth-child(2) { background: #f8f5fd; border-color: #e1d7ef; }
.niwwi-workbook-sheet .niwwi-monthly-stages > div:nth-child(3) { background: #f2faf6; border-color: #d6e8df; }
.niwwi-workbook-sheet .niwwi-monthly-stages span { color: #475569; font-size: 12px; }
html[data-theme] body .niwwi-workbook-sheet .niwwi-monthly-stages strong { font-size: 25px; color: #334155; line-height: 1.15; }
.niwwi-workbook-sheet .niwwi-monthly-stages small { color: #64748b; font-size: 10px; }
.niwwi-workbook-grid { display: grid; grid-template-columns: 1.1fr 1.15fr 1fr 1fr 1.05fr; gap: 14px; align-items: start; }
.niwwi-workbook-column { display: grid; gap: 13px; min-width: 0; align-content: start; }
.niwwi-workbook-panel { --sheet-accent: #d9cdf0; --sheet-tint: #f5f0fd; border: 1px solid #e8eaf0; overflow: hidden; }
.niwwi-workbook-panel.blue { --sheet-accent: #c6def1; --sheet-tint: #e6f2fb; }
.niwwi-workbook-panel.orange { --sheet-accent: #f7d9c4; --sheet-tint: #f9efe8; }
.niwwi-workbook-panel.green { --sheet-accent: #cfe5db; --sheet-tint: #edf7f1; }
.niwwi-workbook-panel.pink { --sheet-accent: #f2c6de; --sheet-tint: #f6ebf1; }
.niwwi-workbook-panel.yellow { --sheet-accent: #f3e6b9; --sheet-tint: #fcf7e8; }
.niwwi-workbook-panel h3 { font-size: 10px; letter-spacing: .13em; text-align: center; font-weight: 600; margin: 0; padding: 10px 6px; background: var(--sheet-accent); color: #334155; }
.niwwi-workbook-panel table { width: 100%; table-layout: auto; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; color: #334155; line-height: 1.25; }
.niwwi-workbook-panel th,.niwwi-workbook-panel td { border: 0; border-bottom: 1px solid #edf0f5; padding: 4px 6px; text-align: right; white-space: nowrap; font-weight: 400; }
.niwwi-workbook-panel tbody th { text-align: left; max-width: 164px; overflow: hidden; text-overflow: ellipsis; }
.niwwi-workbook-panel thead th { font-size: 9px; font-weight: 600; background: var(--sheet-tint); color: #526175; padding-block: 6px; }
.niwwi-workbook-panel thead th:first-child { text-align: left; }
.niwwi-workbook-panel tbody td:last-child { background: color-mix(in srgb,var(--sheet-tint) 48%,#fff); }
.niwwi-workbook-panel .priority th { font-weight: 600; }
.niwwi-workbook-panel tfoot th,.niwwi-workbook-panel tfoot td { background: var(--sheet-tint); font-weight: 700; padding-block: 8px; }
.niwwi-workbook-panel .empty { color: #7c8899; text-align: center; padding: 10px 6px; }
.niwwi-workbook-note { font-size: 10px; line-height: 1.5; color: #748094; margin: 0; }
.niwwi-workbook-footer { display: flex; justify-content: space-between; gap: 18px; border-top: 1px solid #e5eaf1; margin-top: 16px; padding: 10px 0 0; font-size: 10px; color: #748094; }
@media(max-width:1000px) { .niwwi-panorama-grid { grid-template-columns: 1fr; } }
@media(max-width:650px) {
  #modalContent:has(.niwwi-monthly-panorama) { width: calc(100vw - 16px); padding: 16px; max-height: 96vh; }
  .niwwi-monthly-panorama { gap: 16px; }
  .niwwi-monthly-panorama .niwwi-monthly-stages,.niwwi-panorama-reference { grid-template-columns: 1fr; }
  .niwwi-monthly-panorama .niwwi-monthly-stages > div { padding: 15px; }
  .niwwi-monthly-panorama .niwwi-monthly-stages > div + div { border-left: 0; border-top: 1px solid var(--line); }
  .niwwi-monthly-panorama .niwwi-monthly-stages .niwwi-monthly-of { border-radius: 0 0 16px 16px; }
  .niwwi-panorama-reference { gap: 12px; }
  .niwwi-monthly-panorama th,.niwwi-monthly-panorama td { padding: 10px 12px; }
}
html[data-theme] .niwwi-monthly-stages strong { font-size: clamp(24px,2.2vw,30px); line-height: 1.2; color: var(--niwwi-tone,var(--purple)); overflow-wrap: anywhere; }
html[data-theme] #modalContent:has(.niwwi-priority-editor) { width: min(900px,calc(100vw - 32px)); max-width: min(900px,calc(100vw - 32px)); }
.niwwi-priority-editor { min-width: 0; }
.niwwi-priority-editor h3 { text-transform: capitalize; margin: 14px 0 8px; }
.niwwi-priority-editor > p { color: var(--muted); line-height: 1.6; }
.niwwi-priority-month { display: grid; gap: 8px; max-width: 300px; }
.niwwi-priority-month input { min-height: 44px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface2); color: var(--text); font: inherit; }
.niwwi-priority-editor [data-niwwi-priority-results] { background: var(--surface2); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin: 16px 0; }
.niwwi-priority-editor [data-niwwi-priority-results] > p { color: var(--muted); font-size: 12px; line-height: 1.6; margin-bottom: 0; }
.niwwi-priority-editor .niwwi-monthly-stages { grid-template-columns: repeat(2,minmax(0,1fr)); margin: 0; }
.niwwi-priority-editor .niwwi-monthly-stages > div + div { border-top: 0; border-left: 1px solid var(--line); padding: 0 0 0 16px; }
.niwwi-priority-editor .niwwi-priority-table { min-width: 630px; }
.niwwi-priority-editor .niwwi-priority-table :is(td,th):nth-child(n+3) { text-align: center; }
.niwwi-priority-editor .niwwi-priority-table td:first-child { min-width: 220px; }
@media(max-width:550px) {
  .niwwi-priority-editor .niwwi-monthly-stages { grid-template-columns: 1fr; }
  .niwwi-priority-editor .niwwi-monthly-stages > div + div { border-left: 0; border-top: 1px solid var(--line); padding: 12px 0 0; }
  .niwwi-priority-editor .niwwi-priority-table { min-width: 0; }
  .niwwi-priority-editor .niwwi-priority-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .niwwi-priority-editor .niwwi-priority-table :is(tbody,tr) { display: block; }
  .niwwi-priority-editor .niwwi-priority-table tr { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; padding: 8px; }
  .niwwi-priority-editor .niwwi-priority-table td { border: 0; min-width: 0; padding: 6px; }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(-n+2) { grid-column: 1 / -1; }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(2)::before { content: 'Falta pagar: '; color: var(--muted); }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(n+3)::before { display: block; font-size: 11px; margin-bottom: 8px; }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(3)::before { content: 'Prioritario'; }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(4)::before { content: 'Seguro'; }
  .niwwi-priority-editor .niwwi-priority-table td:nth-child(5)::before { content: 'Confirmado'; }
}
