.annual-plan-toolbar{display:flex;gap:10px;align-items:center;margin-bottom:12px}.annual-plan-toolbar label{display:flex;gap:8px;align-items:center;margin:0}.annual-plan-toolbar input{width:100px;padding:8px;border:1px solid var(--border);border-radius:9px;text-align:center}.annual-plan-note{color:var(--muted);line-height:1.8;margin-bottom:16px}.annual-plan-section-head{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:12px}.annual-plan-section-head .actions{margin:0}.annual-plan-scroll{overflow:auto;max-width:100%;border:1px solid var(--border);border-radius:12px;max-height:65vh}.annual-plan-table{border-collapse:separate;border-spacing:0;width:100%;min-width:1600px;table-layout:auto}.annual-plan-table th,.annual-plan-table td{padding:12px 14px;border-bottom:1px solid var(--border);text-align:center;white-space:nowrap}.annual-plan-table thead th{background:var(--bluebg);position:sticky;top:0;z-index:2}.annual-plan-table th:first-child{position:sticky;right:0;min-width:180px;max-width:240px;white-space:normal;text-align:right;background:var(--bluebg);z-index:1}.annual-plan-table thead th:first-child{z-index:3}.annual-plan-table th small{display:block;color:var(--muted);font-weight:400;margin-top:4px}.annual-plan-table tfoot th,.annual-plan-table tfoot td{background:#eef3f5;font-weight:800;border-top:2px solid #bcc9d0;position:sticky;bottom:0;z-index:2}.annual-plan-table tfoot th:first-child{z-index:3}.annual-plan-table .annual-plan-amount{border:0;background:transparent;color:#396585;text-decoration:underline;text-underline-offset:4px;min-height:36px;padding:4px;font-weight:700;white-space:nowrap}.annual-plan-table .annual-plan-amount:hover{background:#eef3f5}.annual-plan-total{font-weight:800;background:#fafbfB}.annual-plan-unavailable{color:var(--muted)}.annual-plan-table td .icon-btn{margin:2px}.annual-plan-section{padding:16px!important}@media(max-width:720px){.annual-plan-table{font-size:12px}.annual-plan-table th,.annual-plan-table td{padding:10px}.annual-plan-table th:first-child{min-width:130px;max-width:150px}.annual-plan-section-head{align-items:flex-start;flex-direction:column}.annual-plan-scroll{max-height:65dvh}}
.annual-plan-category{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 0;border-bottom:1px solid var(--border)}.annual-plan-category .actions{margin:0}.annual-plan-categories summary{cursor:pointer;font-weight:700}
/* Fit all twelve months and totals within the desktop page. */
@media(min-width:721px){
 .annual-plan-section{padding:10px!important}
 .annual-plan-table{min-width:0;table-layout:fixed;width:100%;font-size:clamp(9px,.82vw,12px);font-variant-numeric:tabular-nums}
 .annual-plan-table th,.annual-plan-table td{padding:7px 2px;min-width:0;max-width:none}
 .annual-plan-table th:first-child{width:14%;min-width:0;max-width:none;padding-inline:7px;overflow-wrap:anywhere}
 .annual-plan-table thead th:nth-last-child(2):not(:first-child){width:8%}
 .annual-plan-table thead th:last-child{width:5%}
 .annual-plan-table .annual-plan-amount{width:100%;min-width:0;min-height:28px;padding:3px 0;font-size:inherit;line-height:1.4}
 .annual-plan-table td .icon-btn{width:22px;min-width:22px;min-height:25px;height:25px;padding:0;margin:1px;font-size:12px}
 .annual-plan-table th small{font-size:inherit;line-height:1.4}
 .annual-plan-table:not(:has(tfoot)) thead th:last-child{width:8%}
}
/* One continuous worksheet, with compact section bands and subtotal rows. */
#plan .month-work-head{margin-bottom:8px;padding-block:5px;border-top:0;min-height:0}
#plan .month-work-head .page-purpose,#plan .month-work-head>span{display:none}
#plan .month-work-head h1{font-size:18px;margin:0}
#planRows .annual-plan-toolbar{display:inline-flex;margin:0 0 8px;gap:5px}
#planRows .annual-plan-toolbar button{min-height:28px;padding:2px 9px}
#planRows .annual-plan-toolbar input{padding:4px;width:80px}
#planRows .annual-plan-note{display:inline;margin-inline-start:12px;font-size:11px}
#planRows .plan-sheet-scroll{max-height:none;border-radius:4px;overflow:visible}
#planRows .plan-sheet-table{border-collapse:collapse;table-layout:fixed;min-width:0;width:100%;font-size:clamp(9px,.85vw,12px)}
#planRows .plan-sheet-label{width:18%}#planRows .plan-sheet-month{width:6%}#planRows .plan-sheet-sum{width:10%}
#planRows .plan-sheet-table th,#planRows .plan-sheet-table td{width:auto;min-width:0;max-width:none;height:27px;padding:3px 3px;border:1px solid #d4d7d3;line-height:1.25}
#planRows .plan-sheet-table thead th{position:static;background:#e6e9e5;font-weight:800}
#planRows .plan-sheet-table th:first-child{position:static;width:auto;padding-inline:6px;background:inherit}
#planRows .plan-sheet-table .annual-plan-amount{min-height:22px;height:22px;padding:1px 0;font-size:inherit;font-weight:600;line-height:1.2}
#planRows .plan-sheet-name{background:transparent;border:0;min-height:22px;height:auto;padding:0;font-size:inherit;font-weight:700;line-height:1.3;text-align:right;width:100%;white-space:normal}
#planRows .plan-sheet-band th{padding:3px 6px;height:28px;background:#e9e5d3!important}
#planRows .plan-sheet-band th>div{display:flex;align-items:center;justify-content:space-between;gap:6px}
#planRows .plan-sheet-loan .plan-sheet-band th{background:#e1eaf0!important}
#planRows .plan-sheet-expense .plan-sheet-band th{background:#f2e7d9!important}
#planRows .plan-sheet-saving .plan-sheet-band th{background:#e3ece3!important}
#planRows .plan-sheet-add{display:inline-flex;gap:5px}
#planRows .plan-sheet-add button{padding:1px 7px;min-height:23px;height:23px;font-size:10px;border-radius:4px}
#planRows .plan-sheet-item{background:#fff}
#planRows .plan-sheet-subtotal{background:#f2e2df;font-weight:800}
#planRows .plan-sheet-table .annual-plan-total{background:inherit}
#planRows .plan-sheet-table tfoot th,#planRows .plan-sheet-table tfoot td{position:static;background:#dfe8e1;border-top:2px solid #9cac9e;font-weight:800}
#planRows .annual-plan-categories{margin-top:9px;padding:8px!important;font-size:12px}
@media(max-width:720px){#planRows .plan-sheet-scroll{overflow:auto}#planRows .plan-sheet-table{min-width:1050px}#planRows .annual-plan-note{display:block;margin:0 0 7px}}
#planRows .plan-sheet-label{width:17%}#planRows .plan-sheet-month{width:5.7%}#planRows .plan-sheet-sum{width:8.6%}#planRows .plan-sheet-ratio{width:6%}
#planRows .plan-sheet-percentage{background:#f4f6f3;font-weight:700}
.plan-household-table{overflow:auto;margin-top:12px;border:1px solid var(--border);border-radius:8px}.plan-household-table table{width:100%;border-collapse:collapse}.plan-household-table th,.plan-household-table td{padding:8px;border-bottom:1px solid var(--border);text-align:right}.plan-household-table thead,.plan-household-table tfoot{background:var(--bluebg)}.plan-household-table .icon-btn{margin:2px}
.plan-item-menu-trigger{display:inline-grid;place-items:center;width:22px!important;min-width:22px!important;min-height:22px!important;height:22px!important;padding:0!important;border:0;background:transparent;font-size:19px!important;line-height:1;vertical-align:middle;border-radius:4px;margin-inline-start:3px}.plan-item-menu-trigger:hover{background:#dfe7eb}.plan-item-menu-trigger:focus-visible{outline:2px solid #396585}
#planRows .plan-sheet-name{width:auto;max-width:calc(100% - 28px);vertical-align:middle}
.plan-item-menu{position:fixed;inset:auto;margin:0;width:230px;max-width:calc(100vw - 16px);max-height:70vh;overflow:auto;padding:8px;border:1px solid var(--border);border-radius:10px;background:#fff;color:var(--text);box-shadow:0 8px 30px #263b4d30;direction:rtl;font:inherit;z-index:2000}.plan-item-menu>strong{display:block;padding:8px;border-bottom:1px solid var(--border);margin-bottom:5px}.plan-item-menu button{display:block;width:100%;min-height:36px;border:0;text-align:right;background:transparent;padding:7px;font-size:13px}.plan-item-menu button:hover{background:var(--bluebg)}.plan-item-menu button.danger{color:#a73d32}.plan-menu-saving{padding:6px 0;border-bottom:1px solid var(--border)}.plan-menu-saving b{display:block;padding:4px 8px}
.plan-category-strip{display:flex;flex-wrap:wrap;gap:6px;margin-top:12px}.plan-category-strip>span{padding:4px 8px;border:1px solid var(--border);border-radius:6px;background:#fff;font-size:12px}.plan-item-inactive{color:var(--muted)}.plan-household-table th small{display:inline;margin-inline-start:5px;font-weight:400}.plan-household-table .annual-plan-amount{background:transparent;border:0;color:#396585;text-decoration:underline;min-height:26px;padding:2px}
