:root{--ink:#252e35;--muted:#727b82;--line:#dce1e4;--green:#345b51;--red:#a13131}*{box-sizing:border-box}body{margin:0;background:#fff;color:var(--ink);font:13px/1.4 Arial,'Segoe UI',sans-serif}a{color:var(--ink);text-decoration:none}a:hover{text-decoration:underline}button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer;white-space:nowrap}button:disabled{opacity:.4;cursor:default}button:focus-visible,a:focus-visible{outline:2px solid #658d80;outline-offset:2px}input,select,textarea{border:1px solid var(--line);border-radius:3px;background:#fff;padding:6px 8px}input:focus,select:focus,textarea:focus{outline:2px solid #7b9e91;outline-offset:-2px}input[type=checkbox]{accent-color:var(--green);width:14px;height:14px}h1,h2,p{margin-top:0}h1{font-size:23px;line-height:1.2;margin-bottom:0;font-weight:600}h2{font-size:18px;font-weight:600}.muted{color:var(--muted)}.primary,.secondary{padding:6px 10px;border-radius:3px;font-size:12px}.primary{background:var(--green);color:white;border:1px solid var(--green)}.primary:hover{background:#274b41}.secondary{background:white;border:1px solid var(--line)}.secondary:hover{background:#f3f5f5}.topbar{height:65px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 24px}.brand-logo{display:block;width:200px;height:auto}.topbar nav{display:flex;align-items:center;gap:20px;font-size:12px}.topbar form{margin:0}.text-button{background:none;border:0;padding:0;font-size:12px}.user{color:var(--muted)}.workspace{padding:20px 24px}.heading{display:flex;justify-content:space-between;align-items:center;margin-bottom:18px}.heading-actions{display:flex;align-items:center;gap:14px}#save-state{font-size:11px;color:var(--muted)}#save-state.error{color:var(--red)}.toolbar{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:16px}.filter{flex:1;min-width:135px}.filter:first-child{flex:1.6}.filter.search{flex:1.3}.filter label{display:block;font-size:11px;color:var(--muted);margin-bottom:4px}.filter select,.filter input{width:100%;height:32px;font-size:12px}.sheet{border:1px solid var(--line);border-radius:3px;overflow:hidden}.sheet-bar{padding:10px 12px;display:flex;justify-content:space-between;align-items:center;gap:12px;font-size:12px}.divider{margin:0 8px;color:var(--muted)}.sheet-actions{display:flex;gap:7px;align-items:center}.check{display:flex;align-items:center;gap:5px;white-space:nowrap;margin-right:8px}.table-scroll{overflow:auto;max-height:calc(100vh - 285px);min-height:100px;border-top:1px solid var(--line)}table{border-collapse:separate;border-spacing:0;width:max-content;min-width:100%;table-layout:fixed;font-size:12px}th{height:40px;background:#f1f3f3;border-right:1px solid var(--line);border-bottom:1px solid #cbd2d5;text-align:left;position:sticky;top:0;z-index:2;padding:0}th button{width:100%;height:100%;text-align:left;font-size:11px;font-weight:600;padding:7px 9px;border:0;background:transparent;white-space:normal;line-height:1.2}th.person{background:#edf2ef}td{height:44px;border-bottom:1px solid #e6e9eb;border-right:1px solid #e6e9eb;vertical-align:top;padding:0;background:#fff}tr:nth-child(even) td{background:#fafbfb}tr:hover td{background:#f5f8f6}td:first-child,th:first-child{position:sticky;left:0;z-index:1}th:first-child{z-index:3}td input:not([type=checkbox]),td textarea,td select{width:100%;height:43px;min-height:43px;border:0;border-radius:0;background:transparent;resize:vertical;padding:8px 9px;font-size:12px}td textarea{line-height:1.35}td input:disabled,td select:disabled,td textarea:disabled{opacity:1;color:#65716b}.cell-text{display:block;padding:9px}.person input{text-align:center}.internal-cell{padding:12px}.progress-cell select{font-size:11px;padding:7px;color:var(--green)}td.pending{box-shadow:inset 0 -2px #c5a953}td.failed{box-shadow:inset 0 -2px #bc4646}tr.dirty td:first-child{box-shadow:inset 3px 0 #c5a953}tr.saving td{opacity:.6}.sheet-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px 12px;font-size:10px;color:var(--muted);border-top:1px solid var(--line)}.sheet-footer>div{display:flex;align-items:center;gap:10px}.sheet-footer button{padding:3px 8px}.alert{padding:10px 12px;background:#fff4f1;color:var(--red);border:1px solid #eed6cf;border-radius:3px;margin:10px 12px;white-space:pre-wrap}.empty{text-align:center;padding:28px 16px;color:var(--muted)}.empty h2{margin-bottom:6px}.empty p{margin:0}[hidden]{display:none!important}dialog{width:min(480px,90vw);border:1px solid var(--line);border-radius:5px;padding:24px;box-shadow:0 10px 50px #192d3533}dialog::backdrop{background:#20303855}dialog input{display:block;width:100%;margin:8px 0 16px}.dialog-actions{display:flex;justify-content:flex-end;gap:8px}.login-card{width:360px;max-width:90vw;margin:12vh auto;padding:24px}.login-logo{display:block;width:280px;max-width:100%;height:auto;margin:0 0 32px}.login-card h1{font-size:20px;margin-bottom:24px}.login-card label{display:block;font-size:12px;margin:16px 0 5px}.login-card input{height:36px;width:100%}.login-card .full{width:100%;margin-top:20px;padding:9px}.footnote{font-size:11px;line-height:1.5;color:var(--muted);margin-top:20px}.login-card .alert{margin:0 0 16px}.password-card{width:480px;max-width:90vw;margin:60px auto}.password-card h1{margin:24px 0}.password-card input{display:block;width:100%;margin:8px 0}.helptext{font-size:11px;color:var(--muted)}@media(max-width:1000px){.sheet-bar{align-items:flex-start;flex-direction:column}.sheet-actions{flex-wrap:wrap}.table-scroll{max-height:65vh}}@media(max-width:650px){.topbar{height:58px;padding:0 12px}.brand-logo{width:145px}.topbar nav{gap:10px;font-size:11px}.text-button{font-size:11px}.user{display:none}.workspace{padding:16px 10px}.heading-actions{gap:8px}#save-state{max-width:170px;text-align:right}.toolbar{gap:8px}.filter{min-width:130px}.sheet-footer>span{display:none}.sheet-footer{justify-content:flex-end}.sheet-bar{padding:9px}.sheet-actions{gap:5px}.check{font-size:11px}.login-card{margin-top:8vh}}

.topbar{display:grid;grid-template-columns:1fr auto 1fr;gap:16px}.topbar>a{justify-self:start}.topbar nav{justify-self:end}.app-title{font-size:18px;font-weight:600;letter-spacing:1.3px;text-align:center;margin:0;white-space:nowrap}.heading{justify-content:flex-end;margin-bottom:12px}@media(max-width:850px){.topbar{height:auto;min-height:65px;padding-top:12px;padding-bottom:12px;grid-template-columns:1fr 1fr;gap:12px}.app-title{grid-row:2;grid-column:1/-1;font-size:16px}.topbar nav{grid-row:1;grid-column:2}} 

th.vertical{height:172px}th.vertical button{display:flex;justify-content:center;align-items:center;padding:8px 4px}th.vertical span{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap;font-size:11px;line-height:1.1}.internal-cell{text-align:center}.internal-cell input{display:block;margin:1px auto}#columns-dialog{width:min(780px,94vw)}#columns-list{max-height:55vh;overflow:auto;margin:16px 0}.column-editor-row{display:grid;grid-template-columns:minmax(130px,1fr) 65px 72px 32px 32px 70px;gap:7px;align-items:center;padding:6px 0;border-bottom:1px solid var(--line)}.column-editor-row>input{margin:0;height:32px}.column-editor-row.removed{opacity:.55}.column-editor-row .column-type{font-size:10px;color:var(--muted)}.column-vertical{display:flex;align-items:center;gap:4px;font-size:11px}.column-vertical input{width:14px;height:14px;margin:0}.column-add{display:flex;align-items:center;gap:8px;margin:14px 0}.column-editor-row button{padding:5px}#columns-dialog .dialog-actions{margin-top:16px}@media(max-width:600px){.column-editor-row{grid-template-columns:minmax(100px,1fr) 55px 30px 30px 60px;gap:4px}.column-type{display:none}.column-vertical{font-size:10px}}

.workspace{padding:14px 8px;width:100%;max-width:none}.sheet{width:100%}#grid{width:100%;min-width:1100px;table-layout:fixed}#grid th{height:120px;vertical-align:bottom}#grid th.vertical{height:120px}#grid th.vertical button{align-items:flex-end;justify-content:center;padding:5px 3px}#grid th.vertical span{font:600 12px/1.15 "Segoe UI",Arial,sans-serif;max-height:108px;overflow:hidden;text-overflow:ellipsis}#grid td textarea{min-height:74px;height:74px;white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.5;font-size:13px;padding:7px;resize:vertical}#grid td:has(textarea){min-width:140px}#grid .progress-cell{text-align:center}#grid .progress-cell select{text-align:center;text-align-last:center;font-weight:600;width:100%;padding:5px 1px;font-size:11px}#grid .order-cell{width:32px;min-width:32px;text-align:center;padding:2px;vertical-align:middle}#grid .order-cell button{display:block;width:26px;padding:0;margin:2px auto;border:0;background:transparent;color:#5c6c63;font-size:16px}#grid input[aria-label^="No."]{padding:6px 1px;text-align:center}#grid th.dragging{opacity:.35}#grid th[draggable=true]{cursor:grab}#grid .internal-cell{padding:9px 1px}#grid th:not(.vertical) button{display:flex;align-items:flex-end;padding-bottom:8px}#grid th[data-key=progress] button{justify-content:center}@media(max-width:1100px){#grid{min-width:1100px}}

/* Compact rows grow only with their text. */
#grid td{height:28px}#grid td input:not([type=checkbox]),#grid td select{height:28px;min-height:28px;padding:4px 3px}#grid td textarea{display:block;height:28px;min-height:28px;line-height:20px;padding:4px 7px;resize:none;overflow:hidden}#grid .internal-cell{padding:6px 1px}

/* Sorting controls have their own compact row above the column captions. */
#grid .sort-strip th{height:24px;min-height:24px;top:0;background:#fff;vertical-align:middle}
#grid .sort-strip button{display:block;height:23px;padding:0 1px;text-align:center;font-size:11px;line-height:23px;color:#62706a}
#grid .sort-strip button:hover{background:#e4ece8}
#grid .sort-strip th[aria-sort=ascending] button,#grid .sort-strip th[aria-sort=descending] button{background:#e4ece8;color:#253e33}
#grid .column-headings th{top:24px}
#grid .column-caption{display:flex;align-items:flex-end;width:100%;height:120px;padding:7px 9px 8px;font-size:11px;font-weight:600;line-height:1.2}
#grid th.vertical .column-caption{justify-content:center;padding:5px 3px}
#grid th[data-key=progress] .column-caption{justify-content:center}

#grid .sort-strip .status-sort button{display:inline-block;width:25%;font-size:10px}#grid .status-sort button[aria-pressed=true]{background:#345b51;color:#fff}

/* The native dropdown retains complete status names; the closed field shows only its percentage. */
#grid td.progress-cell[data-progress="0"]{background:#c62828;color:#fff}
#grid td.progress-cell[data-progress="50"]{background:#ffe066;color:#252e35}
#grid td.progress-cell[data-progress="75"]{background:#b9e4a7;color:#203526}
#grid td.progress-cell[data-progress="100"]{background:#24683e;color:#fff}
#grid .status-control{position:relative;height:28px;width:100%}
#grid .progress-cell .status-control select{display:block;position:relative;z-index:1;color:transparent!important;background:transparent;appearance:none;cursor:pointer}
#grid .progress-cell .status-control select option{color:#252e35!important;background:#fff;font-weight:400}
#grid .status-value{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;pointer-events:none;z-index:2;font-size:12px;font-weight:600;color:inherit}
#grid .status-value::after{content:'▾';position:absolute;right:6px;font-size:10px}

/* Large click targets for person and component assignments. */
#grid td.toggle-cell{position:relative;padding:0}
#grid .cell-toggle{position:absolute;inset:0;width:100%;height:100%;min-height:28px;border:0;border-radius:0;padding:0;background:transparent;color:#253e33;font:600 13px "Segoe UI",Arial,sans-serif}
#grid .cell-toggle[aria-pressed=true]{background:#e0eee4}
#grid .cell-toggle:hover:not(:disabled){background:#cfe2d5}
#grid .cell-toggle:focus-visible{outline:2px solid #345b51;outline-offset:-2px}
#grid .cell-toggle:disabled{opacity:1;cursor:default}
#grid .sort-strip .status-sort button[data-progress="0"]{background:#c62828;color:#fff}
#grid .sort-strip .status-sort button[data-progress="50"]{background:#ffe066;color:#252e35}
#grid .sort-strip .status-sort button[data-progress="75"]{background:#b9e4a7;color:#203526}
#grid .sort-strip .status-sort button[data-progress="100"]{background:#24683e;color:#fff}
#grid .sort-strip .status-sort button[aria-pressed=true]{box-shadow:inset 0 0 0 2px #18262d;text-decoration:underline;text-underline-offset:2px}
#grid .sort-strip .status-sort button:hover{filter:brightness(.94)}

/* A persistent, compact status line at the bottom of the application. */
body:has(.app-statusbar){padding-bottom:40px}
.app-statusbar{position:fixed;left:0;right:0;bottom:0;z-index:10;min-height:28px;display:flex;align-items:center;gap:16px;padding:5px 12px;border-top:1px solid var(--line);background:#f1f3f3;color:#58636b;font-size:11px;line-height:18px}
.app-statusbar #save-state{flex:1;min-width:0;max-width:none;text-align:left;overflow-wrap:anywhere}
.app-statusbar #status-project{max-width:35%;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.app-statusbar #status-count{white-space:nowrap}
@media(max-width:600px){.app-statusbar{gap:8px;padding:4px 8px;flex-wrap:wrap}.app-statusbar #save-state{flex-basis:100%}.app-statusbar #status-project{max-width:65%;flex:1}body:has(.app-statusbar){padding-bottom:62px}}

/* Project, search and refresh share one lean toolbar. */
.project-toolbar{display:flex;align-items:center;gap:10px;margin-bottom:12px;width:100%}
.project-toolbar #project{flex:0 1 300px;min-width:140px;width:25%;height:32px;font-size:12px}
.project-toolbar #search{flex:1;min-width:80px;height:32px;font-size:12px}
.project-toolbar #reload{flex:none;height:32px}
@media(max-width:600px){.project-toolbar{gap:6px}.project-toolbar #project{flex-basis:140px;min-width:100px}.project-toolbar #reload{padding:6px 8px}}

/* Compact brand mark and a centered technical title. */
.topbar{grid-template-columns:minmax(0,1fr) auto minmax(0,1fr)}
.topbar .brand-logo{width:150px;height:auto}
.topbar .app-title{font-family:Bahnschrift,"DIN Alternate","Arial Narrow","Segoe UI",sans-serif;font-size:32px;font-weight:600;line-height:1.15;letter-spacing:2px;text-align:center}
@media(max-width:1100px){.topbar{height:auto;min-height:65px;padding-top:12px;padding-bottom:12px;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}.topbar .app-title{grid-row:2;grid-column:1/-1}.topbar nav{grid-row:1;grid-column:2}}
@media(max-width:650px){.topbar .brand-logo{width:108.75px}.topbar .app-title{font-size:clamp(20px,5vw,28px);letter-spacing:1.4px}}

#grid .delete-cell{position:relative;padding:0;width:32px}
#grid .delete-task{position:absolute;inset:0;width:100%;height:100%;min-height:28px;padding:0;border:0;background:transparent;color:#7d3737;font-family:"Segoe UI Symbol",sans-serif;font-size:16px}
#grid .delete-task:hover:not(:disabled){background:#f8e4e4}
#grid td.progress-cell[data-progress="200"]{background:#e2e5e7;color:#59636a}
#show-deleted[aria-pressed=true],#hide-done[aria-pressed=true]{background:#345b51;color:#fff;border-color:#345b51}

#grid .sort-strip th[aria-sort=ascending] button,#grid .sort-strip th[aria-sort=descending] button{background:#345b51;color:#fff}

/* Small totals above each percentage, aligned in the sorting strip. */
#grid .sort-strip th{height:36px;min-height:36px}
#grid .sort-strip button{height:35px;line-height:35px}
#grid .column-headings th{top:36px}
#grid .sort-strip .status-sort button{display:inline-flex;flex-direction:column;align-items:center;justify-content:center;vertical-align:top;gap:1px;line-height:1.1;padding:2px 0}
#grid .status-count{font-size:9px;font-weight:400;line-height:11px}
#grid .status-percent{font-size:10px;font-weight:600;line-height:13px}

#grid .sort-strip button.assignment-sort{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;padding:2px 0;line-height:13px}
#grid .assignment-count{font-size:9px;font-weight:400;line-height:11px}
