/* Shared page hierarchy and dialog system. */
:root{--bg:#f5f7fa;--ink:#172b3a;--muted:#66788a;--line:#e3e9ef;--shadow:0 24px 80px #10253926}
header{height:auto;min-height:92px;gap:24px;padding:22px 32px}header h1{font-size:23px;line-height:1.4;letter-spacing:-.4px}header p{font-size:13px;line-height:1.6;margin-top:5px}.header-actions{flex-shrink:0}.header-actions #accountName{border-left:1px solid var(--line);padding-left:14px;color:var(--muted);font-size:13px}.page-actions{display:flex;justify-content:flex-end;gap:10px;padding:22px 32px 0;flex-wrap:wrap}.page-actions:empty{display:none}.page{padding:24px 32px 40px;max-width:1800px;margin:0 auto}.page-actions:not(:empty)+#content .page{padding-top:18px}h3{font-size:16px;line-height:1.5;margin:0 0 14px}.card{border-radius:12px;padding:24px;box-shadow:0 2px 8px #17304303}.card p{line-height:1.7}.card p:last-child{margin-bottom:0}.section-head{gap:16px}.section-head p{margin-bottom:0}.table-wrap{border-radius:12px}th{font-size:12px;font-weight:600;letter-spacing:0;padding-top:14px;padding-bottom:14px}td{font-size:13px;vertical-align:middle}tbody tr:hover{background:#f9fbfc}td small,.subline{overflow-wrap:anywhere}.empty{padding:44px 24px;line-height:1.8;color:var(--muted)}.primary,.danger,.small,.ghost{min-height:36px;font-weight:500;transition:background .15s,border-color .15s}.primary{background:#176e59;border-color:#176e59}.primary:hover{background:#125a49;border-color:#125a49}.small:hover,.ghost:hover{background:#f2f6f8;border-color:#c8d4dd}.danger:hover{background:#fff0ef}.form input,.form select,.form textarea{width:100%;min-width:0;color:var(--ink);border-color:#ced9e2;line-height:1.5}.form label{font-size:13px;font-weight:600;gap:8px}.form input::placeholder,.form textarea::placeholder{color:#9aa8b5;font-weight:400}.form input[type=checkbox]{width:17px;height:17px;accent-color:#176e59;vertical-align:middle}.form label:has(>input[type=checkbox]){display:flex;align-items:center;gap:10px}.form select[multiple]{background:#fafcfd;padding:6px}.form select[multiple] option{padding:8px 10px;border-radius:5px}.form textarea{min-height:104px}.hint{line-height:1.7}.auth-error:empty{display:none}.wf-block{margin-top:20px}.wf-step summary{line-height:1.8}.wf-output{border:1px solid #e8edf1;color:#314657}.team-tabs{margin-bottom:20px}.status{white-space:nowrap}.row-actions{flex-wrap:wrap}.grid2>*{min-width:0}button:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible,a:focus-visible{outline:3px solid #94c8b7;outline-offset:3px}
body.dialog-open{overflow:hidden}.modal{padding:32px;background:#0d1e30a3;backdrop-filter:blur(4px);z-index:50;overscroll-behavior:contain}.modal-card{width:min(680px,100%);max-height:calc(100dvh - 64px);padding:0;border-radius:18px;box-shadow:0 28px 100px #08182d66;overflow:auto;scrollbar-gutter:stable;overscroll-behavior:contain}.modal-card:focus{outline:none}#modalBody{padding:28px 30px 0}#modalBody>h2{font-size:21px;line-height:1.5;letter-spacing:-.4px;margin:0 42px 24px 0}#modalBody>.hint{margin-top:-12px;margin-bottom:22px}.close{right:17px;top:21px;width:34px;height:34px;border-radius:8px;font-size:24px;line-height:1;display:grid;place-items:center;z-index:2;background:#f2f5f8}.close:hover{color:#172b3a;background:#e8eef3}.modal .form{gap:20px}.dialog-actions{display:flex;justify-content:flex-end;gap:10px;padding:18px 0;margin-top:4px;position:sticky;bottom:0;background:#fff;border-top:1px solid var(--line);z-index:1}.dialog-actions button{min-width:88px}.dialog-actions .ghost{display:inline-block}.modal-card>.discard-notice{position:sticky;bottom:0;background:#fff8ed;border-top:1px solid #f1d4a4;padding:18px 30px;z-index:3;box-shadow:0 -5px 20px #192d3e0a}.discard-notice b{font-size:14px}.discard-notice p{font-size:13px;color:#7b6542;margin:4px 0 14px}.discard-notice .row-actions{justify-content:flex-end}.toast{z-index:70;max-width:min(480px,calc(100vw - 32px));line-height:1.7}.form fieldset{min-width:0}.modal .grant-list:empty{display:none}
@media(max-width:950px){header{padding:18px 20px;gap:12px;min-height:80px}header h1{font-size:20px}.page{padding:20px}.page-actions{padding:18px 20px 0}.header-actions #accountName{padding-left:8px}.modal{padding:20px}.modal-card{max-height:calc(100dvh - 40px)}}
@media(max-width:560px){header{flex-wrap:wrap;gap:8px}header>div:not(.header-actions){flex:1}.header-actions{gap:6px}.header-actions #accountName{display:none}#logoutButton{font-size:12px;padding:6px 8px}.page{padding:18px 14px 30px}.page-actions{padding:16px 14px 0;justify-content:flex-start}.page-actions .primary{flex:1}.card{padding:18px}.section-head{align-items:flex-start;flex-wrap:wrap}.modal{padding:10px}.modal-card{max-height:calc(100dvh - 20px);border-radius:14px;width:100%}#modalBody{padding:22px 20px 0}#modalBody>h2{font-size:19px;margin-bottom:22px}.close{top:17px;right:14px}.modal .grid2{grid-template-columns:1fr}.modal-card>.discard-notice{padding:16px 20px}.dialog-actions{padding:16px 0}.dialog-actions button{flex:1}.wf-report-counts{gap:12px}.team-note{margin-bottom:18px}.wf-session{overflow-wrap:anywhere}.table-wrap{max-width:100%}}
@media(prefers-reduced-motion:reduce){*{scroll-behavior:auto!important;transition:none!important}}

@media(max-width:950px){.sidebar{transition:transform .18s}}

header>div:not(.header-actions){min-width:0}header h1{overflow-wrap:anywhere}
