:root {
  color-scheme: dark;
  color: #e8edeb;
  background: #131618;
  --green: #79d7ae;
  --muted: #a6b2ac;
  --line: #363d3b;
  --surface: #252b2e;
  --raised: #30383a;
  --surface-border: #485351;
  --surface-shadow: 0 5px 14px #0004, inset 0 1px 0 #ffffff09;
}

.sidebar { box-shadow: 6px 0 22px #0003; }
.nav-scroll { display: none; }
.nav-scroll[aria-disabled="true"] { opacity:.4; cursor:default; }
.sidebar nav button:focus-visible { outline-offset:-3px; }
body { font-variant-numeric: tabular-nums; }
header { flex-wrap: wrap; }
header > div:first-child { min-width: 0; max-width: 100%; }
header h1 { overflow-wrap: anywhere; }
.header-actions { flex-shrink: 0; }
a.icon-button { display: inline-flex; justify-content: center; align-items: center; width: 40px; height: 40px; padding: 9px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.bank-card, .draft-card, .monthly-group-card {
  background: var(--surface);
  border-color: var(--surface-border);
  box-shadow: var(--surface-shadow);
}
button:not(.text-button):not(.operation-account-card):not(.monthly-group-card) { box-shadow: inset 0 1px 0 #ffffff0c, 0 2px 4px #0003; }
.sidebar nav button { box-shadow: none !important; }
dialog { border-color: var(--surface-border); box-shadow: 0 24px 80px #0009, inset 0 1px 0 #ffffff12; }
input, select, textarea { box-shadow: inset 0 2px 4px #0003; }
.overview-stat, .stat { padding: 16px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 6px; box-shadow: var(--surface-shadow); }
.stat:last-child { border: 1px solid var(--surface-border); }
.stat, .overview-stat { box-shadow: inset 0 1px 0 #ffffff06; }
.stat-value, .overview-stat > strong { overflow-wrap: normal; }
.operation-toolbar, .movement-toolbar { padding: 16px 0; border-block: 1px solid var(--line); gap: 12px; }
.operation-toolbar input[type="search"], .movement-toolbar input[type="search"] { flex: 1 1 280px; min-width: 0; }
.operation-toolbar select, .movement-toolbar select { max-width: 100%; }
.operation-toolbar .operation-period { flex: 1 1 280px; }

.operation-accounts { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin-bottom: 26px; }
.operation-account-card { display: block; width: 100%; min-width: 0; text-align: left; padding: 20px; background: var(--surface); border: 1px solid var(--surface-border); border-radius: 8px; box-shadow: var(--surface-shadow); transition: background .15s, border-color .15s, box-shadow .15s; }
.operation-account-card:hover { background: var(--raised); border-color: #74837c; box-shadow: 0 8px 20px #0005, inset 0 1px 0 #ffffff12; }
.operation-account-card[aria-expanded="true"] { border-color: var(--green); background: #293a33; box-shadow: 0 5px 16px #0005, inset 3px 0 0 var(--green); }
.operation-account-heading { display: grid; grid-template-columns: 38px minmax(0,1fr) 18px; gap: 12px; align-items: start; min-height: 64px; }
.operation-account-heading strong { display: block; font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.operation-account-icon { display: flex; align-items: center; justify-content: center; width: 38px; height: 38px; background: #35473e; color: var(--green); border: 1px solid #4a6557; border-radius: 6px; }
.operation-account-bank { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.operation-account-heading > svg { margin-top: 8px; color: var(--muted); }
.operation-account-footer { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 10px; margin-top: 20px; padding-top: 14px; border-top: 1px solid #ffffff18; }
.operation-account-footer strong { font-size: 19px; overflow-wrap: anywhere; }
.operation-account-footer > span { font-size: 12px; color: var(--muted); }
.account-transactions { background: #1d2326; border-block: 1px solid var(--surface-border); }
.account-transactions .section-heading { background: var(--surface); padding: 18px 20px; margin: 0; border-bottom: 1px solid var(--surface-border); }
.account-transactions .transaction-row { margin-inline: 20px; }
.account-transactions .transaction-row:last-child { border-bottom: 0; }
@media(max-width:1100px) { .operation-accounts { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) {
  .operation-accounts { grid-template-columns: 1fr; gap: 12px; }
  .operation-account-card { padding: 16px; }
  .operation-account-heading { min-height: 52px; }
  .operation-account-footer { margin-top: 12px; }
  .account-transactions .section-heading { padding: 16px; }
  .account-transactions .transaction-row { margin-inline: 12px; }
}

button, .sidebar, .bank-card, .draft-card, dialog {
  background: var(--surface);
  color: #e8edeb;
}

button:hover { background: var(--raised); }
.sidebar nav button { color: var(--muted); }
.sidebar nav button.active { background: #233c31; color: var(--green); }
.brand-mark, .primary { background: var(--green); color: #12261d; }
.primary:hover { background: #96e4c2; }
.text-button { color: var(--green); background: transparent; }
.text-button:hover { background: #28372f; }
.dot { background: var(--green); }

.notice { background: #25333d; border-color: #83b8df; color: #c0d9ed; }
.notice.warning { background: #3c3222; color: #f2d298; }
.notice.warning { border-color: #d8ad64; }
.amber { color: #ebbe77; }
.count { background: var(--raised); color: #d5dfd9; }
.empty h3 { color: #e8edeb; }
.empty svg { color: #8fa89b; }

.transaction-icon { background: #293731; color: #a3c4b4; }
.transaction-icon.credit { background: #233c31; color: var(--green); }
.tag { background: #233c31; color: #a0dfbd; }
.tag.pending { background: #3c3222; color: #f2d298; }
.bank-card .bank-icon { background: #422c30; color: #f3a8ad; }
.bank-card:nth-child(2) .bank-icon { background: #343044; color: #c8b7ee; }
.bank-card:nth-child(3) .bank-icon { background: #233c31; color: #91daba; }
.bank-card:nth-child(4) .bank-icon { background: #28344b; color: #a9c2f4; }

input, select, textarea {
  background: #1b1f21;
  border-color: #4b5751;
  color: #e8edeb;
}
input::placeholder, textarea::placeholder { color: #99a69f; opacity: 1; }
input:focus-visible, select:focus-visible, textarea:focus-visible,
button:focus-visible, a:focus-visible { outline-color: var(--green); }
.dialog-summary { background: var(--raised); }
dialog::backdrop { background: #0009; }
.form-error { color: #ffacac; }

th { background: var(--raised); }
th:first-child, td:first-child { background: #17191b; }
tfoot td { background: #233c31; }
tfoot td:first-child { background: #233c31; }
#toast { background: #b6e5c8; color: #152b20; box-shadow: 0 4px 16px #0005; }
::selection { background: #47755e; color: #fff; }

.account-transactions { margin-top: 24px; }
.account-transactions h2 { font-size: 18px; overflow-wrap: anywhere; }
.account-transactions .section-heading { flex-wrap: wrap; gap: 12px; }
.account-balance { display: block; margin-top: 4px; white-space: nowrap; }
#account-filter { max-width: 100%; min-width: 0; }
.account-line h3, .row-meta { overflow-wrap: anywhere; }
.account-line h3 { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.account-rename { width: 32px; height: 32px; padding: 6px; flex: 0 0 32px; }
.category-button { padding: 2px 0; max-width: 100%; white-space: normal; text-align: left; }
.row-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.domain-row { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.domain-row button { justify-self: start; text-align: left; white-space: normal; }
.domain-heading { flex-wrap: wrap; gap: 12px; }
.domain-row span { color: var(--muted); font-size: 13px; }
.domain-amounts { display: grid; grid-template-columns: auto auto; gap: 6px 12px; align-items: center; text-align: right; }
.domain-amounts span { font-size: 11px; }
.operation-period { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.operation-period .checkbox-field { margin: 0; align-items: center; }
.operation-summary { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; padding: 16px 0; border-block: 1px solid var(--line); }
.operation-summary span { display: block; margin-bottom: 6px; font-size: 12px; color: var(--muted); }
#search-summary h2 { flex-basis: 100%; min-width: 0; overflow-wrap: anywhere; }
.month-start { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--line); }
.month-start-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; }
.month-start-grid > *, .month-start-section { min-width: 0; }
.month-start-section { margin-bottom: 24px; }
.month-start-section > .section-heading { min-height: 40px; margin: 0 0 12px; align-items: center; }
.month-start-section > .section-heading h2 { overflow-wrap: anywhere; }
.month-start-table { width: 100%; border-collapse: collapse; table-layout: fixed; white-space: normal; }
.month-start-table th, .month-start-table td { padding: 4px 8px; border-bottom: 1px solid var(--line); text-align: left; line-height: 1.35; }
.month-start-table .icon-button { width: 28px; height: 28px; min-height: 28px; padding: 4px; }
.month-start-table .icon-button svg { width: 16px; height: 16px; }
.month-start-table td:nth-last-child(2) { white-space: nowrap; }
.month-start-table td:last-child { width: 56px; }
.month-start-table th:first-child, .month-start-table td:first-child { min-width: 0; position: static; }
.month-start-table th:nth-last-child(2) { width: 96px; }
.month-start-table th:last-child { width: 56px; }
[data-start-section="expenses"] .month-start-table th:first-child { width: 42px; }
.month-start-table input[type="checkbox"] { width: 18px; height: 18px; padding: 0; accent-color: var(--green); }
.month-start-table td { overflow-wrap: anywhere; }
.month-start-linked { display: inline-flex; vertical-align: middle; color: var(--accent); }
.month-start-linked svg { width: 14px; height: 14px; }
.month-start-overview { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; margin: 16px 0 24px; }
.month-start-summary { white-space: normal; }
.month-start-summary th, .month-start-summary td { padding: 8px 12px; text-align: left; background: transparent; }
.month-start-summary th:first-child { min-width: 0; position: static; width: 50%; }
.month-start-summary td { text-align: right; font-weight: 600; }
.month-start-summary tr:nth-child(4), .month-start-summary tr:last-child { background: #233c31; }
@media (max-width: 850px) { .month-start-grid, .month-start-overview { grid-template-columns: minmax(0, 1fr); } .month-start .section-heading { flex-wrap: wrap; gap: 12px; } .month-start-table { font-size: 13px; } }
.rule-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.rule-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.rule-row p { color: var(--muted); margin: 6px 0 0; }
.rule-actions { display: flex; gap: 6px; flex-shrink: 0; }
.checkbox-field { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; line-height: 1.5; }
.checkbox-field input { width: 18px; height: 18px; margin-top: 2px; flex: 0 0 18px; accent-color: var(--green); }
#category-filter { max-width: 100%; }
.course-intro { display:flex; justify-content:space-between; align-items:flex-start; gap:18px; padding:18px 0 22px; border-bottom:1px solid var(--line); }
.course-intro p { margin:6px 0 0; color:var(--muted); font-size:13px; }
.receipt-preview { display:grid; grid-template-columns:minmax(240px,360px) minmax(0,1fr); gap:24px; align-items:start; padding:26px 0; border-bottom:1px solid var(--line); }
.receipt-preview-media { aspect-ratio:3 / 4; overflow:hidden; border:1px solid var(--surface-border); border-radius:8px; background:#101416; box-shadow:var(--surface-shadow); }
.receipt-preview-media img { width:100%; height:100%; object-fit:contain; display:block; }
.receipt-pdf-placeholder { height:100%; display:flex; align-items:center; justify-content:center; gap:12px; }
.receipt-preview-detail { min-width:0; }
.receipt-items { display:grid; gap:8px; }
.grocery-section { padding:20px 0; border-bottom:1px solid var(--line); }
.grocery-list { display:grid; }
.grocery-estimate { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:16px 0; border-bottom:1px solid var(--line); }
.grocery-estimate p { margin:0 0 6px; font-size:14px; }
.grocery-estimate small { color:var(--muted); font-size:12px; }
.grocery-estimate > strong { font-size:22px; white-space:nowrap; color:var(--green); }
.grocery-estimate .helper { margin:8px 0 0; }
.grocery-row { display:grid; grid-template-columns:minmax(0,1fr) 150px minmax(180px,240px) 36px; gap:14px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); }
.grocery-check { display:flex; align-items:center; gap:12px; min-width:0; }
.grocery-check input { flex-shrink:0; width:20px; height:20px; accent-color:var(--green); }
.grocery-check span { overflow-wrap:anywhere; font-weight:600; }
.grocery-checked .grocery-check span { text-decoration:line-through; color:var(--muted); }
.grocery-price,.grocery-frequency { display:grid; gap:4px; font-size:13px; }
.grocery-row small { color:var(--muted); overflow-wrap:anywhere; }
.receipt-review-item { padding:12px 0; border-bottom:1px solid var(--line); }
.receipt-classification,.receipt-metadata { display:grid; grid-template-columns:minmax(0,1fr) 110px; gap:10px; margin:10px 0; }
.receipt-metadata { grid-template-columns:repeat(2,minmax(0,1fr)); }
.receipt-classification label,.receipt-metadata label { display:grid; gap:5px; color:var(--muted); font-size:12px; min-width:0; }
.receipt-classification input,.receipt-classification select,.receipt-metadata input { width:100%; min-width:0; }
.receipt-total-label { display:grid; gap:5px; font-size:12px; color:var(--muted); max-width:180px; }
.receipt-pack { font-size:12px; color:var(--muted); }
.grocery-history { padding:14px 0; border-bottom:1px solid var(--line); overflow-wrap:anywhere; }
.grocery-history-line { display:flex; justify-content:space-between; gap:14px; padding:8px 0; font-size:13px; }
@media(max-width:700px) {
  .grocery-row { grid-template-columns:minmax(0,1fr) 110px 36px; gap:8px; }
  .grocery-frequency { grid-column:1 / 3; grid-row:2; }
  .grocery-row > button { grid-column:3; grid-row:1; }
  .receipt-metadata { grid-template-columns:1fr; }
}
.receipt-item { display:grid; grid-template-columns:minmax(0,1fr) 90px 36px; gap:6px; align-items:center; }
.receipt-item input { width:100%; min-width:0; }
.receipt-actions { display:flex; gap:16px; flex-wrap:wrap; margin-top:18px; }
.receipt-text { white-space:pre-wrap; overflow-wrap:anywhere; font-size:13px; }
.receipt-preview-detail progress { width:100%; }
.receipt-preview-detail h2 { margin:14px 0 6px; overflow-wrap:anywhere; }
.receipt-preview-detail p { color:var(--muted); }
.receipt-fab { position:fixed; right:28px; bottom:28px; z-index:4; width:58px; height:58px; min-height:58px; padding:0; border-radius:50%; background:var(--green); border-color:var(--green); color:#12261d; box-shadow:0 10px 28px #0007; }
.receipt-fab:hover { background:#96e4c2; }
.receipt-fab svg { width:24px; height:24px; }
@media (max-width: 600px) {
  .domain-row { grid-template-columns: minmax(0,1fr) auto; gap: 8px; }
  .domain-row span { grid-column: 1; grid-row: auto; }
  .domain-amounts { grid-column: 1 / -1; text-align: left; grid-template-columns: minmax(0,1fr) auto; }
  .domain-amounts span { grid-column: auto; }
}
.overview-stats { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:20px; padding:20px 0; border-block:1px solid var(--line); }
.overview-stat { min-width:0; }
.overview-stat > span { display:block; font-size:12px; color:var(--muted); line-height:1.5; }
.overview-stat > strong { display:block; font-size:24px; margin:10px 0; overflow-wrap:anywhere; }
.overview-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 28px; align-items:start; }
.overview-account-grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,230px),1fr)); gap:16px; margin-bottom:24px; }
.overview-account-card { display:flex; flex-direction:column; align-items:stretch; gap:10px; padding:18px; min-width:0; text-align:left; background:var(--surface); border:1px solid var(--line); border-radius:8px; box-shadow:var(--surface-shadow); }
.overview-account-card:hover { background:var(--raised); border-color:var(--green); }
.overview-account-card strong { font-size:24px; overflow-wrap:anywhere; }
.overview-account-card .helper { white-space:normal; overflow-wrap:anywhere; }
.overview-account-name { display:flex; justify-content:space-between; gap:12px; font-weight:600; overflow-wrap:anywhere; }
.overview-account-name svg { flex-shrink:0; }
.overview-charts { display:grid; grid-template-columns:minmax(0,2fr) minmax(0,1fr); gap:28px; padding:24px 0; border-bottom:1px solid var(--line); }
.overview-monthly-chart { min-width:0; }
.overview-charts canvas { max-width:100%; }
.overview-summary { min-width:0; }
.overview-dashboard[data-overview-layout="cockpit"] .overview-summary { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:24px; margin-top:24px; align-items:stretch; }
.overview-dashboard[data-overview-layout="cockpit"] .overview-salary { margin:0; }
.overview-dashboard[data-overview-layout="cockpit"] .salary-band { grid-template-columns:1fr 1fr; gap:20px; }
.overview-dashboard[data-overview-layout="cockpit"] .salary-metrics { border-right:0; padding-right:0; }
.overview-dashboard[data-overview-layout="cockpit"] .salary-received { grid-column:1/-1; border-top:1px solid var(--line); padding-top:16px; }
.overview-dashboard[data-overview-layout="cockpit"] .overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; border:0; padding:0; }
.overview-dashboard[data-overview-layout="cockpit"] .overview-stat { display:flex; flex-direction:column; justify-content:center; }
.overview-dashboard[data-overview-layout="cockpit"] .overview-charts { grid-template-columns:minmax(0,1.4fr) minmax(0,1fr); }
@media(max-width:1100px) { .overview-dashboard[data-overview-layout="cockpit"] .overview-summary { grid-template-columns:1fr; } }
@media(max-width:900px) { .overview-dashboard[data-overview-layout="cockpit"] .overview-charts { grid-template-columns:1fr; } }
@media(max-width:640px) {
  .overview-dashboard[data-overview-layout="cockpit"] .salary-band { grid-template-columns:1fr; }
  .overview-dashboard[data-overview-layout="cockpit"] .salary-metrics { padding:16px 0 0; border:0; border-top:1px solid var(--line); }
}
.overview-salary { margin:24px 0; border-block:1px solid var(--line); padding:18px 0; }
.overview-salary .section-heading { margin:0 0 18px; }
.overview-salary h2 { display:flex; align-items:center; gap:10px; font-size:17px; }
.salary-band { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1.5fr) minmax(0,1fr); gap:24px; align-items:center; }
.salary-primary,.salary-received { display:flex; flex-direction:column; gap:10px; min-width:0; }
.salary-primary > span,.salary-received > span,.salary-metric > span { color:var(--muted); font-size:12px; overflow-wrap:anywhere; }
.salary-primary > strong { font-size:30px; color:#8cc7f1; overflow-wrap:anywhere; }
.salary-received > strong { font-size:24px; overflow-wrap:anywhere; }
.salary-metrics { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:20px; border-inline:1px solid var(--line); padding-inline:24px; }
.salary-metric { display:flex; flex-direction:column; gap:8px; min-width:0; }
.salary-metric > strong { font-size:16px; overflow-wrap:anywhere; }
.salary-edit { justify-content:space-between; align-self:stretch; width:100%; min-width:0; max-width:100%; padding:10px 12px; gap:10px; min-height:44px; background:transparent; border:0; border-radius:6px; }
.salary-edit strong { flex:1; min-width:0; text-align:left; font-size:16px; overflow-wrap:anywhere; }
.salary-edit svg { width:14px; height:14px; color:var(--muted); }
.salary-edit:hover { color:var(--green); background:transparent; }
.overview-dashboard[data-overview-style="accent"] .overview-salary { border-left:4px solid #6ab6ed; padding-left:20px; }
.overview-dashboard[data-overview-style="accent"] .overview-charts > section { border-left:4px solid #c493e8; padding-left:20px; }
.overview-dashboard[data-overview-style="accent"] .overview-charts > .overview-monthly-chart { border-color:#e8b96a; }
.overview-dashboard[data-overview-style="accent"] .overview-accounts { border-left:4px solid #79d7ae; padding-left:20px; }
.overview-dashboard[data-overview-style="accent"] > .overview-section { border-left:4px solid #e5818e; padding-left:20px; }
@media(max-width:1100px) { .salary-band { grid-template-columns:1fr 1fr; } .salary-metrics { border-right:0; padding-right:0; } .salary-received { grid-column:1/-1; padding-top:16px; border-top:1px solid var(--line); } }
@media(max-width:640px) { .salary-band { grid-template-columns:1fr; gap:20px; } .salary-metrics { border:0; border-top:1px solid var(--line); padding:20px 0 0; } .salary-primary > strong { font-size:28px; } }
.overview-charts > .overview-section > .section-heading { margin-top:0; min-height:40px; }
.overview-monthly-chart .monthly-distribution > h2 { display:none; }
@media(max-width:900px) { .overview-charts { grid-template-columns:1fr; } }
.overview-section { min-width:0; }
.overview-section .section-heading { flex-wrap:wrap; gap:12px; }
.overview-section .section-heading h2 { font-size:17px; }
.overview-line { display:flex; justify-content:space-between; align-items:baseline; gap:16px; padding:12px 0; border-bottom:1px solid var(--line); font-size:13px; }
.overview-line > span { min-width:0; overflow-wrap:anywhere; }
.overview-line > strong { text-align:right; flex-shrink:0; }
.overview-budget { table-layout:fixed; white-space:normal; }
.overview-budget th:first-child { width:46%; }
.overview-budget td { overflow-wrap:anywhere; font-size:13px; }
.overview-budget th,.overview-budget td { padding:12px 8px; }
.overview-annual { min-width:1450px; }
.overview-annual .overview-subtotal td { font-weight:700; border-top:2px solid #547366; background:#273b34; }
.annual-budget-table td.annual-high,.overview-annual td.annual-high { color:#ffaba8; background:#542b2d; font-weight:700; }
.annual-budget-table td.annual-low,.overview-annual td.annual-low { color:#94ebbc; background:#203e2e; font-weight:700; }
.annual-budget-table td.annual-goal-over,.overview-annual td.annual-goal-over { color:#ffaba8; background:#542b2d; font-weight:700; }
.annual-budget-table td.annual-goal-under,.overview-annual td.annual-goal-under { color:#94ebbc; background:#203e2e; font-weight:700; }
.annual-goal-input { width:100px; min-width:100px; margin:0; text-align:right; }
.annual-budget-table tbody tr,.annual-budget-table tfoot tr,.overview-annual tbody tr,.overview-annual tfoot tr { cursor:pointer; }
.annual-budget-table tr.annual-row-highlighted > td,.overview-annual tr.annual-row-highlighted > td {
  box-shadow:inset 0 2px #74c9ef,inset 0 -2px #74c9ef;
}
.annual-budget-table tr.annual-row-highlighted > td:not(.annual-high):not(.annual-low):not(.annual-goal-over):not(.annual-goal-under),
.overview-annual tr.annual-row-highlighted > td:not(.annual-high):not(.annual-low):not(.annual-goal-over):not(.annual-goal-under) { background:#24434e; }
.annual-budget-table tr.annual-row-highlighted > td:first-child,.overview-annual tr.annual-row-highlighted > td:first-child {
  box-shadow:inset 3px 0 #74c9ef,inset 0 2px #74c9ef,inset 0 -2px #74c9ef;
}
.annual-budget-table tr.annual-row-highlighted > td:last-child,.overview-annual tr.annual-row-highlighted > td:last-child {
  box-shadow:inset -3px 0 #74c9ef,inset 0 2px #74c9ef,inset 0 -2px #74c9ef;
}
.annual-budget-table tr:focus-visible,.overview-annual tr:focus-visible { outline:2px solid #74c9ef; outline-offset:-2px; }
@media(max-width:1000px) { .overview-stats { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:640px) { .overview-grid { grid-template-columns:1fr; } .overview-stat > strong { font-size:21px; } }
.savings-total { padding:20px 0; border-block:1px solid var(--line); }
.savings-total > span { display:block; color:var(--muted); }
.savings-total > strong { display:block; margin:10px 0; font-size:28px; overflow-wrap:anywhere; }
.savings-row { display:grid; grid-template-columns:minmax(0,1fr) auto auto; align-items:center; gap:20px; padding:18px 0; border-bottom:1px solid var(--line); }
.savings-row > div:first-child { overflow-wrap:anywhere; min-width:0; }
.savings-row .helper { margin-top:6px; }
.savings-actions { display:flex; gap:6px; }
.savings-value { text-align:right; }
.savings-section .section-heading { flex-wrap:wrap; }
@media(max-width:640px) {
  .receipt-preview { grid-template-columns:1fr; gap:18px; }
  .stats, .overview-dashboard[data-overview-layout="cockpit"] .overview-stats { grid-template-columns:1fr; }
  .transaction-row { grid-template-columns:34px minmax(0,1fr); }
  .transaction-row > .amount { grid-column:2; justify-self:end; }
  .operation-toolbar, .movement-toolbar { gap:10px; }
  .operation-toolbar > *, .movement-toolbar > * { min-width:0; }
  .operation-toolbar input[type="search"], .movement-toolbar input[type="search"] { flex-basis:100%; }
  .salary-metrics { grid-template-columns:1fr; }
  .receipt-preview-media { max-height:460px; }
  .receipt-fab { right:18px; bottom:calc(94px + env(safe-area-inset-bottom,0px)); }
  .savings-row { grid-template-columns:minmax(0,1fr) auto; gap:12px; }
  .savings-value { grid-column:1; text-align:left; }
  .savings-actions { grid-column:2; grid-row:1 / 3; }
}
.monthly-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:24px; padding:22px 0; border-block:1px solid var(--line); }
.monthly-summary span { display:block; color:var(--muted); font-size:13px; line-height:1.5; }
.monthly-summary strong { display:block; margin-top:10px; font-size:24px; overflow-wrap:anywhere; }
.monthly-status,.monthly-balance { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:14px 0; border-bottom:1px solid var(--line); flex-wrap:wrap; }
.monthly-status { color:var(--muted); }
.monthly-plan-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; align-items:start; }
.monthly-group-card { display:block; width:100%; min-width:0; min-height:148px; padding:20px; text-align:left; border:1px solid var(--line); border-radius:8px; background:#202426; color:#e8edeb; white-space:normal; }
.monthly-group-card:hover,.monthly-group-card[aria-expanded="true"] { border-color:var(--green); background:#242d29; }
.monthly-group-card:focus-visible { outline:2px solid var(--green); outline-offset:3px; }
.monthly-card-heading { display:flex; justify-content:space-between; align-items:center; gap:12px; font-weight:600; font-size:16px; overflow-wrap:anywhere; }
.monthly-card-heading svg { flex:0 0 20px; width:20px; height:20px; color:var(--green); }
.monthly-card-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; margin-top:22px; }
.monthly-card-label { display:block; font-size:12px; color:var(--muted); margin-bottom:8px; }
.monthly-card-totals strong { display:block; font-size:20px; overflow-wrap:anywhere; }
#monthly-group-detail { margin-top:28px; }
.monthly-income { width:100%; margin-bottom:16px; }
.monthly-budget-cards { min-width:0; }
.monthly-income .monthly-group-card { border-left:3px solid var(--green); }
.monthly-group-card[data-month-open="fixed"] { border-left:3px solid #6ab6ed; }
.monthly-group-card[data-month-open="subscriptions"] { border-left:3px solid #c493e8; }
.monthly-group-card[data-month-open="variable"] { border-left:3px solid #e8b96a; }
.monthly-group-card[data-month-open="housing"] { border-left:3px solid #e5818e; }
.monthly-pie-slice { cursor:help; }
.monthly-pie-slice:hover,.monthly-pie-slice:focus-visible { filter:brightness(1.15); outline:none; }
.monthly-pie-tooltip { min-height:56px; margin:0 0 12px; padding:10px 12px; border-radius:4px; background:var(--raised); font-size:12px; line-height:1.5; overflow-wrap:anywhere; }
.monthly-pie-tooltip[hidden] { display:block; visibility:hidden; }
.monthly-expense-layout { display:grid; grid-template-columns:minmax(0,1fr) minmax(290px,340px); gap:16px; align-items:start; }
.monthly-card-share { display:block; margin-top:16px; font-size:12px; color:var(--muted); }
.monthly-distribution h2 { font-size:16px; margin:0 0 16px; }
.monthly-pie { max-width:250px; aspect-ratio:1; margin:0 auto 18px; }
.monthly-pie svg { display:block; width:100%; height:100%; }
.monthly-pie-legend { list-style:none; padding:0; margin:0; }
.monthly-pie-legend li { display:grid; grid-template-columns:10px minmax(0,1fr) auto auto; gap:8px; align-items:center; padding:10px 0; border-bottom:1px solid var(--line); font-size:12px; }
.monthly-pie-legend li > span:last-child { min-width:46px; text-align:right; color:var(--muted); }
.monthly-swatch { width:10px; height:10px; border-radius:2px; }
.swatch-fixed { background:#6ab6ed; }
.swatch-subscriptions { background:#c493e8; }
.swatch-variable { background:#e8b96a; }
.swatch-housing { background:#e5818e; }
.swatch-rest { background:#79d7ae; }
.monthly-deficit { color:#e5818e; font-size:13px; line-height:1.5; }
@media(max-width:1200px) { .monthly-expense-layout { grid-template-columns:1fr; } }
.monthly-table { width:100%; table-layout:fixed; }
.monthly-table th:first-child { width:48%; }
.monthly-table th:last-child { width:82px; }
.monthly-row-actions { display:flex; gap:4px; justify-content:flex-end; }
.monthly-row-actions .icon-button { width:32px; height:32px; padding:6px; }
.monthly-table td { overflow-wrap:anywhere; white-space:normal; }
.monthly-table td:first-child { min-width:0; }
.monthly-table td:first-child button { overflow-wrap:anywhere; }
@media(max-width:1000px) { .monthly-plan-grid { grid-template-columns:1fr; } }
.monthly-table tfoot td { border-top:2px solid var(--line); font-weight:600; }
.monthly-table tfoot .monthly-pending { font-weight:400; }
.monthly-table th { font-size:12px; white-space:normal; }
.monthly-table td { font-size:14px; }
.monthly-table td:first-child { min-width:0; position:static; }
.monthly-table td:first-child button { white-space:normal; text-align:left; }
.monthly-pending { display:block; color:var(--amber); font-size:11px; margin-top:6px; }
.monthly-section { margin-top:26px; }
@media(max-width:640px) {
  .monthly-summary { grid-template-columns:1fr; gap:18px; }
  .monthly-summary strong { font-size:22px; margin-top:4px; }
  .monthly-table { display:block; }
  .monthly-table thead { position:absolute; width:1px; height:1px; margin:-1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
  .monthly-table tbody { display:grid; gap:0; }
  .monthly-table tbody tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:8px 12px; padding:14px 0; border-bottom:1px solid var(--line); }
  .monthly-table tbody td { display:block; padding:0; border:0; min-width:0; }
  .monthly-table tbody td:first-child { grid-column:1 / -1; background:transparent; }
  .monthly-table tbody td:nth-child(2) { align-self:center; text-align:left; }
  .monthly-table tfoot { display:block; }
  .monthly-table tfoot tr { display:grid; grid-template-columns:minmax(0,1fr) auto; }
  .monthly-table tfoot td { display:block; padding:12px 6px; }
  .monthly-table tfoot td:last-child { display:none; }
  .monthly-row-actions .icon-button { width:44px; height:44px; min-height:44px; padding:10px; }
}
.monthly-group-card { background: var(--surface); border-top-color: var(--surface-border); border-right-color: var(--surface-border); border-bottom-color: var(--surface-border); }
.monthly-group-card:hover, .monthly-group-card[aria-expanded="true"] { background: var(--raised); }
.annual-drag-handle { width:36px; height:36px; min-height:36px; padding:8px; cursor:grab; touch-action:none; user-select:none; }
.annual-drag-handle:active { cursor:grabbing; }
.annual-drag-ghost { opacity:.4; background:#355144; }
.annual-drag-chosen > td { background:#263e33; }
.annual-drag-fallback { display:table; background:#263e33; box-shadow:0 10px 28px #0008; opacity:.95; }
.annual-budget-table th:nth-child(3),.annual-budget-table td:nth-child(3) { width:60px; min-width:60px; text-align:center; }
.annual-budget-table th:first-child,.annual-budget-table td:first-child { min-width:74px; width:74px; text-align:center; }
.annual-budget-table td:nth-child(2),.annual-budget-table th:nth-child(2) { text-align:left; min-width:160px; }
.annual-budget-table input[type="checkbox"] { width:18px; height:18px; accent-color:var(--green); }
.movement-table { min-width:880px; }
.movement-table th:first-child,.movement-table td:first-child { width:38%; min-width:260px; max-width:420px; white-space:normal; }
.movement-table td:first-child strong,.movement-table td:first-child span { display:block; overflow-wrap:anywhere; }
.movement-table td:first-child span { color:var(--muted); margin-top:6px; font-size:11px; }
.movement-table td:nth-child(2),.movement-table td:nth-child(3) { white-space:normal; overflow-wrap:anywhere; min-width:130px; max-width:200px; }
.movement-table td { text-align:left; }
.movement-table td.amount { text-align:right; }
@media(max-width:640px) {
  .movement-table { min-width:0; display:block; white-space:normal; }
  .movement-table thead { display:none; }
  .movement-table tbody { display:grid; gap:12px; padding-block:12px; }
  .movement-table tr { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px; padding:16px; border:1px solid var(--surface-border); border-radius:8px; background:var(--surface); box-shadow:var(--surface-shadow); }
  .movement-table td { display:block; padding:0; border:0; white-space:normal; min-width:0; max-width:none; }
  .movement-table td:first-child { position:static; width:auto; min-width:0; max-width:none; grid-column:1 / -1; background:transparent; }
  .movement-table td:nth-child(2),.movement-table td:nth-child(3) { grid-column:1 / -1; min-width:0; max-width:none; }
  .movement-table td:nth-child(2)::before,.movement-table td:nth-child(3)::before { display:block; color:var(--muted); font-size:11px; margin-bottom:4px; }
  .movement-table td:nth-child(2)::before { content:'Provenance / destinataire'; }
  .movement-table td:nth-child(3)::before { content:'Poste de dépense'; }
  .movement-table td:last-child { grid-column:1 / -1; justify-self:end; }
}
