/* One outline icon family, inheriting the active navigation colour. */
.sidebar nav .nav-icon{width:20px;height:20px;flex:0 0 20px;display:block;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.sidebar nav a{gap:12px}
.sidebar nav a:focus-visible{outline-offset:-3px}
:root{--operation-income:#3f6653;--operation-income-bg:#eaf0e9;--operation-expense:#97525c;--operation-expense-bg:#f5e9e8;--operation-plan-text:#605e59;--operation-plan-bg:#eeeae5;--operation-plan-hover:#e5e0d9;--operation-plan-badge:#dedad3}
[data-theme=dark]{--operation-income:#a7c6b1;--operation-income-bg:#2b3730;--operation-expense:#dba4aa;--operation-expense-bg:#3b2e30;--operation-plan-text:#b6b2aa;--operation-plan-bg:#30302e;--operation-plan-hover:#383835;--operation-plan-badge:#41413d}
.operations-table .operation-amount{font-size:13px;font-weight:600}
.operation-value{display:inline-block;padding:4px 7px;border-radius:5px;color:var(--theme-foreground)}
.operation-value.income{color:var(--operation-income);background:var(--operation-income-bg)}
.operation-value.expense{color:var(--operation-expense);background:var(--operation-expense-bg)}
.operation-amount-label{display:block;color:var(--muted);font-weight:400;margin-top:3px;white-space:normal;min-width:94px}
.operations-table .operation-planned td{background:var(--operation-plan-bg);color:var(--operation-plan-text)}
.operations-table .operation-planned:hover td{background:var(--operation-plan-hover)}
.operations-table .operation-planned td :is(strong,a,small,.muted,.fine,summary,.operation-value){color:var(--operation-plan-text)!important}
.operations-table .operation-planned .operation-value{background:transparent}
.operations-table .operation-planned .badge{color:var(--operation-plan-text);background:var(--operation-plan-badge);border:1px dashed currentColor;padding:4px 8px}
.operations-table .operation-planned :is(button,input){color:var(--operation-plan-text);background:var(--operation-plan-bg);border-color:var(--operation-plan-text)}
.operations-table .operation-planned a:hover{text-decoration:underline}
@media(max-width:760px){.sidebar nav .nav-icon{width:18px;height:18px;flex-basis:18px}.sidebar nav a{gap:8px;min-height:44px}.operations-table th,.operations-table td{padding-left:12px;padding-right:12px}}
.operations-table tr[hidden]{display:none}
.operations-table .operation-section td{padding:12px 18px;color:var(--theme-foreground);background:var(--theme-muted);font-weight:600;font-size:11px;letter-spacing:.3px}
.operation-section span{margin-left:6px;font-weight:400;color:var(--muted)}
.operations-table .operation-date td{padding:13px 18px;text-align:center;background:var(--theme-card);color:var(--muted);font-size:11px;font-weight:500}
.operation-date td>span{display:flex;align-items:center;gap:16px;justify-content:center}
.operation-date td>span::before,.operation-date td>span::after{content:'';height:1px;background:var(--theme-border);flex:1}
.operations-table .operation-date-plan td{background:var(--operation-plan-bg);color:var(--operation-plan-text)}
.operations-table .operation-plan-toggle td{text-align:center;background:var(--operation-plan-bg);padding:12px}
.operation-overdue{display:block;margin-top:5px;font-weight:600;text-decoration:underline;text-decoration-style:dotted;text-underline-offset:3px}
.operation-cancel{min-width:150px;max-width:280px}
.operation-cancel summary{display:flex;align-items:center;gap:6px;list-style:none;font-size:11px;color:var(--muted)}
.operation-cancel summary::-webkit-details-marker{display:none}
.operation-cancel summary::marker{content:''}
.operation-cancel summary svg{width:16px;height:16px;flex:0 0 16px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
.operation-cancel form{min-width:210px;padding-top:10px}
.operation-cancel .fine{font-size:11px;line-height:1.5;margin-bottom:12px}
.operation-cancel label{font-size:11px}
.financial-metrics .financial-flow.flow-income{background:var(--operation-income-bg);border-color:color-mix(in srgb,var(--operation-income) 25%,var(--theme-border))}
.financial-metrics .financial-flow.flow-expense{background:var(--operation-expense-bg);border-color:color-mix(in srgb,var(--operation-expense) 25%,var(--theme-border))}
.financial-metrics .financial-flow.flow-income :is(strong,span,small){color:var(--operation-income)}
.financial-metrics .financial-flow.flow-expense :is(strong,span,small){color:var(--operation-expense)}
.financial-metrics .metric .money{font-size:clamp(18px,1.65vw,25px);overflow-wrap:anywhere;white-space:normal;line-height:1.35}
.financial-metrics-compact{margin-bottom:22px;gap:12px}
.financial-metrics-compact .metric{min-height:126px;padding:17px 19px}
.financial-metrics-compact .metric .money{font-size:clamp(17px,1.4vw,22px)}
@media(max-width:760px){.financial-metrics .metric{padding:14px;min-width:0}.financial-metrics .metric .money{font-size:20px}.financial-metrics-compact .metric .money{font-size:18px}}
.operation-detail-grid{display:grid;grid-template-columns:minmax(230px,.8fr) minmax(0,1.2fr);gap:22px}
.operation-detail-amount{display:flex;flex-direction:column;justify-content:center;min-width:0}
.operation-detail-amount>span{font-size:12px}
.operation-detail-amount>strong{display:block;font-size:clamp(28px,3.5vw,46px);font-weight:500;letter-spacing:-1px;line-height:1.2;overflow-wrap:anywhere;margin:15px 0}
.operation-detail-amount>p{font-size:12px;line-height:1.6;margin-bottom:0}
.operation-detail-amount.flow-income{background:var(--operation-income-bg);color:var(--operation-income)}
.operation-detail-amount.flow-expense{background:var(--operation-expense-bg);color:var(--operation-expense)}
.operation-detail-amount.flow-income>strong{color:var(--operation-income)}
.operation-detail-amount.flow-expense>strong{color:var(--operation-expense)}
.operation-detail-amount.operation-detail-planned{background:var(--operation-plan-bg);color:var(--operation-plan-text)}
.operation-detail-amount.operation-detail-planned>strong{color:var(--operation-plan-text)}
.operation-detail-actions{display:flex;align-items:flex-start;gap:20px;flex-wrap:wrap}
.operation-detail-actions .operation-cancel{max-width:420px}
.operation-detail-actions .operation-cancel form{padding-top:16px}
@media(max-width:760px){.operation-detail-grid{grid-template-columns:1fr;gap:14px}.operation-detail-amount>strong{font-size:34px}.operation-detail-amount{min-height:180px}}
/* Fact badges are distinct from neutral plans; amount colours keep their meaning. */
:root{--operation-fact-bg:#e2eeed;--operation-fact-text:#356366}
[data-theme=dark]{--operation-fact-bg:#2a3c3d;--operation-fact-text:#acd0d0}
.operations-table tr:not(.operation-planned) .badge,body:has(.operation-detail-grid):not(:has(.operation-detail-planned)) .pagehead>.entity-pill{background:var(--operation-fact-bg);color:var(--operation-fact-text)}
body:has(.operation-detail-planned) .pagehead>.entity-pill{background:var(--operation-plan-bg);color:var(--operation-plan-text)}
