.sheet-save-status{display:flex;align-items:center;gap:10px;flex:1 0 100%;font-size:12px;line-height:1.4;color:var(--muted);padding:6px 0}
.sheet-save-status:before{content:'';width:7px;height:7px;border-radius:50%;background:#849098;flex-shrink:0}.sheet-save-status[data-state=saving]:before{background:#eac466}.sheet-save-status[data-state=saved]:before{background:#66e7a3}.sheet-save-status[data-state=error]:before{background:#ff7582}.sheet-save-status[data-state=dirty]:before{background:#eac466}
.sheet-save-status button{padding:5px 8px!important;font-size:11px!important;min-height:30px}.sheet-save-status [hidden]{display:none!important}
.goal-quick-filters{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:16px 0 20px}.goal-quick-filters button{border-radius:999px;padding:8px 13px;font-size:12px}.goal-quick-filters button[aria-pressed=true]{border-color:#e84357;background:#4b1c2b;color:#fff}.goal-quick-filters span{display:inline-block;padding-left:8px;opacity:.7;font-size:11px}
#metas:has(#goal-detail:not([hidden]))>#goal-quick-filters{display:none}
.sheet-review-groups{list-style:none;margin:10px 0;padding:0!important;color:var(--muted);font-size:12px}.sheet-review-groups>li{margin:7px 0}.sheet-review-groups summary{cursor:pointer;padding:6px 0;font-size:12px}.sheet-review-links{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0}.sheet-review-links button{padding:6px 10px!important;font-size:12px!important;min-height:34px;border:1px solid var(--line);border-radius:7px;color:var(--text);background:var(--bg);cursor:pointer}
.sheet-review-highlight{outline:2px solid #ffb75d;outline-offset:-2px;background:#e9a63212!important}
@media(max-width:700px){
 #cooperation-dialog[open]{position:fixed;inset:8px;width:calc(100vw - 16px);height:calc(100dvh - 16px);max-height:none;margin:0}
 #cooperation-dialog .sheet-dialog-body{height:100%;display:flex;flex-direction:column;overflow:auto}
 #goal-detail:not([hidden]){padding-bottom:190px;scroll-margin-top:10px}
 #goal-detail>.goal-closing-workspace>.goals-actions,#cooperation-dialog[open] .coop-sheet-workspace>.dialog-actions{position:fixed;left:10px;right:10px;bottom:max(8px,env(safe-area-inset-bottom));z-index:68;padding:10px 12px;margin:0;border:1px solid var(--line);border-radius:14px;box-shadow:0 -8px 30px #0005;background:var(--surface-solid);gap:7px;max-height:34dvh;overflow:auto;flex-direction:row;flex-wrap:wrap}
 #goal-detail>.goal-closing-workspace>.goals-actions button,#cooperation-dialog[open] .coop-sheet-workspace>.dialog-actions>button{flex:1 1 105px;min-height:42px;padding:9px;font-size:12px}
 .sheet-save-status{padding:1px 0 5px;font-size:11px}.sheet-save-status button{flex:0 0 auto!important}
 #cooperation-dialog .sheet-dialog-body{padding-bottom:180px}#cooperation-dialog.coop-sheet-expanded .sheet-dialog-body{padding-bottom:155px}
 #goal-detail.sheet-expanded{padding-bottom:165px}.goal-quick-filters{flex-wrap:nowrap;overflow:auto;padding-bottom:5px}.goal-quick-filters button{white-space:nowrap;flex-shrink:0}
 .goal-finalize-dialog .sheet-review-links button,.coop-finalize-dialog .sheet-review-links button{min-height:42px}
}

#metas .goals-browse{display:flex;flex-wrap:wrap;align-items:end;gap:12px}#metas .goals-search-label{flex:1 1 240px}#metas .goals-more-filters{flex:0 1 auto;min-width:135px}#metas .goals-more-filters>summary{cursor:pointer;padding:12px;border:1px solid var(--line);border-radius:10px;font-size:13px;list-style:none}#metas .goals-more-filters[open]{flex:1 0 100%}.goals-more-body{display:flex;flex-wrap:wrap;gap:12px;padding:14px 0}.goals-more-body>label{flex:1 1 160px}.goals-date-range{display:flex;flex-wrap:wrap;gap:12px;flex:1 0 100%}.goals-date-range[hidden]{display:none}.goals-date-hint{flex:1 0 100%;font-size:11px;color:var(--muted);margin:0}
/* In expanded mode, the table takes the remaining tab space and owns both scrollbars. */
#cooperation-dialog.coop-sheet-expanded{box-sizing:border-box;overflow:hidden}
#cooperation-dialog.coop-sheet-expanded .sheet-dialog-body{box-sizing:border-box;min-width:0;min-height:0;padding:12px;overflow:hidden;gap:8px}
#cooperation-dialog.coop-sheet-expanded .dialog-head{flex:none;margin:0}
#cooperation-dialog.coop-sheet-expanded .dialog-head h2{margin:4px 0;font-size:20px}
#cooperation-dialog.coop-sheet-expanded .coop-sheet-workspace{display:contents}
#cooperation-dialog.coop-sheet-expanded .coop-sheet-workspace>.dialog-actions{position:static;order:10;flex:none;max-height:none;padding:8px;margin:0;border:1px solid var(--line);border-radius:10px;box-shadow:none;overflow:visible}
#cooperation-dialog.coop-sheet-expanded .sheet-toolbar{margin:0;gap:6px}
#cooperation-dialog.coop-sheet-expanded .sheet-toolbar label{flex:1 1 150px;max-width:none;min-width:100px}
#cooperation-dialog.coop-sheet-expanded .sheet-toolbar button{padding:0 10px;font-size:12px}
#cooperation-dialog.coop-sheet-expanded .sheet-table-wrap{flex:1 1 0;min-height:0;min-width:0;max-height:none;width:100%;box-sizing:border-box;overflow:auto;overscroll-behavior:contain;scrollbar-gutter:stable}
#cooperation-dialog.coop-sheet-expanded .sheet-keyboard-hint{margin:0;font-size:10px;flex:none}
#cooperation-dialog.coop-sheet-expanded .sheet-save-status{flex:0 1 auto;margin-right:auto}
#cooperation-dialog.coop-sheet-expanded #sheet-column-options{margin:0;max-height:25dvh;overflow:auto}
@media(max-width:700px){#cooperation-dialog.coop-sheet-expanded .sheet-dialog-body{padding:10px}#cooperation-dialog.coop-sheet-expanded .coop-sheet-workspace>.dialog-actions>button{flex:1 1 100px;min-height:36px}#cooperation-dialog.coop-sheet-expanded .sheet-save-status{flex-basis:100%}}
.sheet-scale-tools{display:flex;align-items:center;gap:4px;flex-shrink:0}.sheet-scale-tools output{min-width:40px;text-align:center;font-size:12px;color:var(--text)}
#cooperation-dialog .sheet-scale-tools button,#goal-detail .sheet-scale-tools button{padding:0 10px;min-width:32px;height:36px;font-size:12px}
.sheet-scale-tools button[aria-pressed=true]{border-color:#ec5061;background:#401c27}
#cooperation-dialog .sheet-table,#goal-detail .sheet-table{transform-origin:top left}
#cooperation-dialog .sheet-table td .row-profit,#goal-detail .sheet-table td .row-profit{overflow:visible;text-overflow:clip;white-space:nowrap}
#cooperation-dialog .sheet-table td:first-child,#goal-detail .sheet-table td:first-child{position:sticky;left:0;z-index:2;background:var(--surface-solid);font-variant-numeric:tabular-nums}
@media(max-width:700px){.sheet-scale-tools{flex-wrap:wrap}#cooperation-dialog .sheet-scale-tools button,#goal-detail .sheet-scale-tools button{height:32px;padding:0 8px;font-size:11px}}
