/* v12: one editable sheet for scope, progress and whole-item fees. */
.simple-overview{display:flex;align-items:center;gap:28px;flex-wrap:wrap;padding:23px 0 25px;color:var(--muted);font-size:12px}
.simple-overview strong{color:var(--heading);font-size:15px;font-weight:500;margin:0 4px}
.simple-overview button{padding:0;font-size:inherit;color:var(--accent)}
.section-space{height:30px}
.inline-sheet{margin-bottom:36px}
.sheet-scroll{overflow:auto;scrollbar-width:thin;scrollbar-color:var(--muted) var(--surface)}
.sheet-head,.sheet-row{display:grid;grid-template-columns:84px 190px minmax(260px,1fr) 240px minmax(300px,1.2fr) 100px 132px 132px 56px;min-width:1530px;gap:0}
.sheet-head{min-height:45px;align-items:center;background:var(--accent-soft);color:var(--heading);font-size:12px;font-weight:500;text-align:center;border-bottom:1px solid var(--line)}
.sheet-head>span:first-child,.sheet-code{position:sticky;left:0;z-index:2;background:var(--paper)}
.sheet-head>span:nth-child(2),.sheet-row .cell-name{position:sticky;left:84px;z-index:2;background:var(--paper);box-shadow:1px 0 var(--line)}
.sheet-head>span:first-child,.sheet-head>span:nth-child(2){height:100%;display:grid;place-items:center;background:var(--accent-soft)}
.sheet-row{background:var(--paper);border-bottom:1px solid var(--line);align-items:stretch;min-height:94px;font-size:14px;line-height:1.75}
.sheet-row>div,.sheet-code{min-width:0;border-right:1px solid var(--line);display:flex;align-items:center;justify-content:center}
.sheet-code{font-size:13px;color:var(--muted);font-variant-numeric:tabular-nums}
.sheet-row .inline-cell{position:relative;padding:20px 16px;gap:10px;white-space:pre-wrap;overflow-wrap:anywhere;flex-direction:column;align-items:stretch;justify-content:center}
.sheet-row .inline-cell.cell-name{position:sticky;left:84px;z-index:3;background:var(--paper)}
.sheet-row .inline-cell.cell-fee{position:sticky;right:56px;z-index:3;background:var(--paper);box-shadow:-1px 0 var(--line)}
.sheet-head>span:nth-child(8),.sheet-head>span:last-child{position:sticky;right:56px;z-index:3;background:var(--accent-soft);height:100%;display:grid;place-items:center}
.sheet-head>span:last-child{right:0}
.sheet-scroll{scroll-padding-inline:274px 188px}
.cell-name{font-size:16px;font-weight:500;color:var(--heading)}
.sheet-row .cell-size,.sheet-row .cell-fee,.sheet-row .is-empty-note{align-items:center;text-align:center}
.cell-fee{font-variant-numeric:tabular-nums;font-weight:500}
.cell-placeholder{color:var(--muted);font-size:12px;font-weight:400}
.editable-cell{cursor:text;outline-offset:-3px;transition:background .12s}
.editable-cell:hover{background:var(--surface-hover)}
.editable-cell:focus-visible{outline:2px solid var(--accent)}
.pending-toggle{padding:2px 9px;border:1px solid var(--accent-border);border-radius:30px;font-size:10px;line-height:1.7;color:var(--muted);background:var(--paper);align-self:flex-end;white-space:nowrap;cursor:pointer}
.pending-toggle:hover{color:var(--accent);background:var(--accent-soft)}
.sheet-row .is-pending{background:var(--accent-soft);color:var(--accent);text-align:center;align-items:center}
.pending-label{display:inline-flex;justify-content:center;align-items:center;border:1px solid var(--accent-border);background:var(--accent-faint);border-radius:30px;padding:4px 14px;font-size:12px;white-space:nowrap}
.sheet-row .is-editing{padding:8px;background:var(--paper);box-shadow:inset 0 0 0 2px var(--accent);z-index:1}
.cell-input{display:block;border:0;border-radius:0;width:100%;min-height:54px;padding:10px 8px;resize:vertical;line-height:1.75;background:transparent;color:var(--text);outline:none;font:inherit;box-shadow:none!important}
.cell-size .cell-input,.cell-fee .cell-input{text-align:center}
.sheet-choice{padding:12px 7px}
.sheet-choice select{width:100%;min-width:0;padding:8px 4px;text-align:center;text-align-last:center;font-size:12px;outline-offset:2px}
.sheet-choice select:disabled{opacity:.7;cursor:default}
.sheet-operation{border-right:0!important;padding:12px 6px}
.sheet-operation{position:sticky;right:0;z-index:2;background:var(--paper);box-shadow:-1px 0 var(--line)}
.delete-row-button{width:28px;height:28px;border-radius:6px;display:grid;place-items:center;color:var(--muted);cursor:pointer}
.delete-row-button .icon{width:16px;height:16px}
.delete-row-button:hover{background:var(--surface);color:var(--text)}
.add-sheet-row{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:18px;border-bottom:1px solid var(--line);color:var(--accent);font-size:13px;background:var(--accent-faint)}
.add-sheet-row .icon{width:16px;height:16px}
.add-sheet-row:hover{background:var(--accent-soft)}
.sheet-total{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 28px;background:var(--paper);color:var(--heading);border-bottom:1px solid var(--line);font-size:13px}
.sheet-total small{margin-left:16px;color:var(--muted);font-size:11px}
.sheet-total strong{font-size:23px;font-weight:700;font-variant-numeric:tabular-nums}
/* Price review emphasis belongs to the editor only, never the PNG palette. */
.inline-sheet{--review-price-ink:#c62828}
:root[data-mode=dark] .inline-sheet{--review-price-ink:#ff9f9f}
.inline-sheet .cell-fee>.cell-value:not(.cell-placeholder),.inline-sheet .cell-fee .cell-input,.inline-sheet .sheet-total strong{color:var(--review-price-ink);font-weight:700}
.sheet-empty{padding:50px 24px;color:var(--muted);text-align:center;font-size:13px}
.recycle-section{border:1px solid var(--line);border-radius:9px;background:var(--surface);overflow:hidden;margin-bottom:30px}
.recycle-heading{display:flex;align-items:center;justify-content:space-between;gap:20px;padding:20px 24px;color:var(--muted)}
.recycle-heading h2{font-size:15px;font-weight:500;margin:0}
.recycle-heading h2 small{font-size:11px;margin-left:8px}
.recycle-heading>span{font-size:11px}
.recycle-section .sheet-head{background:var(--surface);color:var(--muted)}
.removed-row{background:var(--surface);color:var(--muted)}
.removed-row .sheet-code,.removed-row .cell-name,.removed-row .sheet-operation{background:var(--surface)}
.removed-row .inline-cell,.removed-row .sheet-choice{background:transparent;color:var(--muted)}
.removed-row .inline-cell.cell-name,.removed-row .inline-cell.cell-fee{background:var(--surface)}
.recycle-section .sheet-head>span{background:var(--surface)}
.removed-row .pending-label{background:transparent;border-color:var(--line);color:var(--muted)}
.restore-row-button{border:1px solid var(--line);border-radius:5px;padding:4px 5px;font-size:11px;color:var(--text);background:var(--paper);white-space:nowrap}
.restore-row-button:hover{border-color:var(--accent);color:var(--accent)}
.recycle-empty{padding:26px;text-align:center;color:var(--muted);font-size:12px;border-top:1px solid var(--line)}
.retired-child{padding:10px 24px;font-size:12px;color:var(--muted)}
.legacy-child-row{background:var(--surface)}
.row-drag-handle{position:absolute;left:5px;top:50%;transform:translateY(-50%);display:grid;place-items:center;width:23px;height:32px;padding:3px;border-radius:5px;touch-action:none;cursor:grab;color:var(--muted)}
.row-drag-handle svg{width:13px;height:21px;fill:currentColor}
.row-drag-handle:hover,.row-drag-handle:focus-visible{background:var(--accent-soft);color:var(--accent)}
.sheet-row.is-dragging{opacity:0;pointer-events:none}
.sheet-row.row-sort-motion{transition:transform 220ms cubic-bezier(.2,.8,.2,1);will-change:transform;position:relative;z-index:4}
body.is-row-dragging,body.is-row-dragging *{cursor:grabbing!important;user-select:none!important}
body.is-row-settling .sheet-workspace{pointer-events:none}
.row-drag-layer{position:fixed;top:0;z-index:60;overflow:hidden;pointer-events:none;background:var(--paper);border-radius:7px;outline:1px solid var(--accent-border);box-shadow:0 14px 34px #0003,0 3px 8px #0002;transform-origin:center;will-change:transform;animation:row-pick-up 140ms ease-out;scrollbar-width:none}
.row-drag-layer::-webkit-scrollbar{display:none}
.row-drag-layer .sheet-row{background:var(--paper)}
.row-drag-layer .row-drag-handle{color:var(--accent)}
@keyframes row-pick-up{from{box-shadow:0 1px 3px #0001;opacity:.85}to{box-shadow:0 14px 34px #0003,0 3px 8px #0002;opacity:1}}
@media(prefers-reduced-motion:reduce){.sheet-row.row-sort-motion{transition:none}.row-drag-layer{animation:none}}
.removed-row .cell-name.is-empty-name{align-items:center;text-align:center}
.topbar{position:sticky;top:0;z-index:45;flex-shrink:0}
.sheet-workspace{position:relative}
.sheet-sticky-top{position:sticky;top:72px;z-index:20;background:var(--bg);padding-top:8px}
.sheet-header-surface{border:1px solid var(--line);border-bottom:0;border-radius:9px 9px 0 0;background:var(--paper);overflow:hidden}
.sheet-header-scroll{overflow-x:auto;scrollbar-width:none;scroll-padding-inline:274px 188px}
.sheet-header-scroll::-webkit-scrollbar{display:none}
.sheet-body-surface{position:relative;border:1px solid var(--line);border-top:0;border-bottom:0;background:var(--paper)}
.sheet-workspace .sheet-total{position:sticky;bottom:0;z-index:15;border:1px solid var(--line);box-shadow:0 -5px 16px #00000009}
.sheet-workspace .list-foot{border:1px solid var(--line);border-top:0;border-radius:0 0 9px 9px}
.sheet-row .inline-cell.cell-content,.sheet-row .inline-cell.cell-size{padding:36px 16px;text-align:center}
.cell-content .cell-input{text-align:center}
.sheet-row .inline-cell.cell-content.is-editing,.sheet-row .inline-cell.cell-size.is-editing{padding:8px}
.cell-actions{position:absolute;bottom:9px;right:12px;display:flex;align-items:center;gap:6px;white-space:normal}
.cell-actions .pending-toggle{align-self:auto}
.ignore-toggle{padding:2px 9px;border:1px solid var(--accent-border);border-radius:30px;font-size:10px;line-height:1.7;color:var(--muted);background:var(--paper);white-space:nowrap;cursor:pointer}
.ignore-toggle:hover,.ignore-toggle.active{color:var(--accent);background:var(--accent-soft);border-color:var(--accent)}
.removed-row .sheet-operation{flex-direction:column;gap:8px}
.purge-row-button{padding:2px 5px;color:var(--muted);font-size:11px;white-space:nowrap}
.purge-row-button:hover{color:var(--text);text-decoration:underline;text-underline-offset:3px}
@media(max-width:1100px){.simple-overview{gap:18px}.inline-sheet .panel-toolbar{align-items:flex-start;flex-wrap:wrap}.sheet-total small{display:block;margin:5px 0 0}.inline-sheet .list-foot{flex-wrap:wrap;gap:8px}}

.export-controls .excel-export-button{margin-top:10px}

.topbar img.avatar{display:block;object-fit:contain;flex-shrink:0;filter:none}

/* Quiet, optional workflow tools; the editable sheet keeps its existing columns. */
.undo-controls{display:inline-flex;align-items:center;gap:5px;margin-left:15px}
.undo-controls .btn.small{padding:5px 9px;min-height:30px;font-size:11px;gap:5px}
.undo-controls .icon{width:15px;height:15px}
.simple-overview .reminder-trigger{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--accent-border);background:var(--paper);border-radius:6px;padding:5px 10px;font-size:12px}
.reminder-trigger .icon{width:15px;height:15px}
.reminder-items{max-height:190px;overflow:auto;border:1px solid var(--line);border-radius:8px;margin-bottom:20px;background:var(--surface)}
.reminder-items>label{display:flex;gap:10px;align-items:center;padding:10px 13px;border-bottom:1px solid var(--line);cursor:pointer}
.reminder-items>label:last-child{border-bottom:0}
.reminder-items input{width:16px;height:16px;flex-shrink:0;accent-color:var(--accent)}
.reminder-items strong{display:block;font-weight:500;font-size:13px}
.reminder-items small{display:block;color:var(--muted);font-size:11px;margin-top:2px}
.workflow-modal-actions{display:flex;justify-content:space-between;align-items:center;gap:15px;margin-top:16px}
.workflow-modal-actions>span{font-size:12px;color:var(--muted)}
#f-reminderText{font-size:13px;line-height:1.9;min-height:200px}
.save-template-trigger{width:100%;margin:0 0 18px}
.template-list{max-height:46vh;overflow:auto}
.template-card{padding:17px;border:1px solid var(--line);border-radius:8px;background:var(--surface);margin-bottom:12px}
.template-card h3{font-size:15px;font-weight:500;margin:0;color:var(--heading)}
.template-card p{margin:5px 0;font-size:12px;color:var(--accent)}
.template-card small{font-size:12px;line-height:1.7;color:var(--muted)}
.template-actions{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-top:14px}
.template-actions .button-link{margin-left:auto;font-size:11px}
.template-empty{padding:35px 12px;text-align:center;color:var(--muted);font-size:13px;line-height:1.9}
.template-preview{max-height:210px;overflow:auto;border:1px solid var(--line);border-radius:7px;margin:0 0 20px}
.template-preview>div{display:grid;grid-template-columns:28px minmax(85px,.8fr) minmax(130px,1.4fr);gap:10px;align-items:center;padding:9px 12px;border-bottom:1px solid var(--line)}
.template-preview>div:last-child{border:0}.template-preview span,.template-preview small{font-size:11px;color:var(--muted)}
.template-preview strong{font-size:12px;font-weight:500}
@media(max-width:1100px){.project-actions{flex-wrap:wrap}.undo-controls{margin-left:10px}.undo-controls .btn.small{padding:4px 7px}.simple-overview{gap:18px}}
