:root { color-scheme:light; --background:#f5f5f6; --surface:#fff; --surface-soft:#f1f2f3; --sidebar:#fff; --text:#202329; --muted:#6e747d; --border:#d1d5db; --border-soft:#e0e3e7; --primary:#0870da; --primary-soft:#eaf3ff; --danger:#bc3445; --danger-soft:#fff0f2; --success:#23785a; --success-soft:#e9f5ef; --shadow:0 18px 60px rgba(18,24,36,.16); --focus:#0870da; }
:root[data-resolved-theme="dark"] { color-scheme:dark; --background:#18191c; --surface:#222428; --surface-soft:#2b2d32; --sidebar:#202226; --text:#edf0f4; --muted:#afb4bd; --border:#4b5059; --border-soft:#3a3e46; --primary:#71b1ff; --primary-soft:#283c54; --danger:#ff939f; --danger-soft:#422b32; --success:#8ed3b6; --success-soft:#253c33; --shadow:0 18px 60px rgba(0,0,0,.45); --focus:#71b1ff; }
* { box-sizing:border-box; }
body { margin:0; font-family:"Segoe UI","Microsoft YaHei",system-ui,sans-serif; font-size:14px; color:var(--text); background:var(--background); min-width:1040px; }
button,input,select,textarea { font:inherit; }
button,a,input,select,textarea,summary { -webkit-tap-highlight-color:transparent; }
button { cursor:pointer; }
button:disabled { cursor:not-allowed; opacity:.52; }
:focus-visible { outline:3px solid var(--focus); outline-offset:3px; }
a { color:var(--primary); text-decoration:none; }
button { color:inherit; }
.workbench { display:grid; grid-template-columns:224px minmax(0,1fr); min-height:100vh; }
.sidebar { background:var(--sidebar); border-right:1px solid var(--border); padding:24px 14px 16px; position:sticky; top:0; height:100vh; display:flex; flex-direction:column; }
.brand { display:flex; align-items:center; gap:12px; padding:0 9px 26px; color:var(--text); }
.brand img { width:36px; height:36px; object-fit:contain; border-radius:8px; }
.brand span { font-size:18px; font-weight:650; letter-spacing:-.4px; }
.brand small { display:block; color:var(--muted); font-size:11px; font-weight:400; margin-top:5px; letter-spacing:.3px; }
.nav-caption { color:var(--muted); font-size:12px; margin:22px 11px 10px; }
#navigation { display:grid; gap:5px; }
.nav-item { display:flex; gap:12px; align-items:center; width:100%; border:0; border-radius:7px; padding:12px; text-align:left; color:var(--muted); background:transparent; }
.nav-item.active { background:var(--surface-soft); color:var(--text); font-weight:600; }
.nav-item:hover { background:var(--surface-soft); }
.icon { display:inline-flex; width:18px; height:18px; align-items:center; justify-content:center; flex:none; }
.icon svg { width:18px; height:18px; }
.sidebar-bottom { margin-top:auto; border-top:1px solid var(--border); padding:18px 10px 0; }
.native-link { display:block; color:var(--muted); font-size:12px; margin-bottom:20px; }
.profile { display:flex; align-items:center; gap:10px; padding-top:12px; border-top:1px solid var(--border-soft); }
.avatar { display:grid; place-items:center; border-radius:50%; width:34px; height:34px; background:var(--primary-soft); color:var(--primary); font-weight:600; }
.profile strong { display:block; font-size:13px; }
.profile small { display:block; font-size:11px; color:var(--muted); margin-top:3px; }
.text-button { background:none; border:0; color:var(--muted); padding:9px 0 0; font-size:12px; }
.topbar { height:60px; background:var(--surface); border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; padding:0 34px; font-size:12px; }
.topbar-actions { display:flex; align-items:center; gap:14px; }
.appearance { display:flex; background:var(--surface-soft); padding:3px; border:1px solid var(--border-soft); border-radius:7px; }
.appearance button { border:0; background:transparent; width:29px; height:26px; padding:0; color:var(--muted); border-radius:4px; font-size:17px; }
.appearance button[aria-pressed="true"] { background:var(--surface); color:var(--text); box-shadow:0 1px 3px #0001; }
.connection { color:var(--muted); }
.connection.connected { color:var(--success); }
.icon-button { width:32px; height:30px; border:1px solid var(--border); border-radius:6px; background:var(--surface); font-size:19px; }
main { padding:32px 38px 60px; max-width:1840px; margin:0 auto; }
.notice { margin:16px 38px 0; padding:12px 16px; border:1px solid var(--border); border-left:4px solid var(--primary); background:var(--surface); border-radius:6px; line-height:1.6; }
.notice.error { border-left-color:var(--danger); color:var(--danger); }
.notice button { float:right; border:0; background:none; color:inherit; margin-left:20px; }
.heading { display:flex; align-items:flex-start; justify-content:space-between; gap:24px; margin-bottom:24px; }
h1 { font-size:28px; line-height:1.35; margin:0 0 9px; letter-spacing:-.7px; }
h2 { font-size:16px; line-height:1.5; margin:0; }
h3 { margin:0; font-size:14px; }
p { line-height:1.65; }
.subtitle { color:var(--muted); margin:0; font-size:13px; }
.actions { display:flex; align-items:center; gap:9px; flex-wrap:wrap; }
.button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:36px; padding:8px 14px; background:var(--surface); border:1px solid var(--border); border-radius:7px; font-size:13px; }
.button:hover:not(:disabled) { background:var(--surface-soft); }
.button.primary { color:#fff; background:#0870da; border-color:#0870da; }
.button.primary:hover:not(:disabled) { background:#0563c4; }
.button.danger { color:var(--danger); }
.button.small { min-height:30px; padding:5px 10px; font-size:12px; }
.button.quiet { background:none; color:var(--muted); }
.hero { background:var(--surface-soft); border:1px solid var(--border); border-radius:10px; padding:30px 32px; margin-bottom:24px; display:flex; align-items:center; justify-content:space-between; gap:25px; }
.hero h1 { font-size:32px; margin:9px 0; }
.eyebrow { font-size:12px; color:var(--muted); margin:0; }
.hero.ipd-home-hero { position:relative; display:block; min-height:230px; padding:24px 28px; isolation:isolate; overflow:hidden; }
.hero.ipd-home-hero.is-employee { min-height:180px; padding:20px 28px; }
.ipd-home-intro { position:relative; z-index:1; max-width:66%; pointer-events:none; }
.hero .ipd-home-intro h1 { font-size:42px; font-weight:600; line-height:1.3; letter-spacing:-1.2px; margin:0 0 8px; }
.hero.is-employee .ipd-home-intro h1 { font-size:34px; margin-bottom:5px; }
.hero .ipd-home-date { font-size:12px; line-height:1.7; letter-spacing:.3px; margin:0 0 12px; }
.hero.is-employee .ipd-home-date { margin-bottom:7px; }
.ipd-logo-motion { position:absolute; inset:0; width:100%; height:100%; z-index:0; pointer-events:none; overflow:hidden; --ipd-logo-line:#585858; --ipd-logo-field:#666666; }
:root[data-resolved-theme="dark"] .ipd-logo-motion { --ipd-logo-line:#b8b8b8; --ipd-logo-field:#aaaaaa; }
.ipd-logo-lines { display:block; width:100%; height:100%; }
.ipd-home-actions { position:absolute; z-index:1; right:28px; bottom:23px; }
.unadapted-message { margin:32px 0; color:var(--muted); font-size:15px; line-height:1.8; }
.metric-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; margin-bottom:26px; }
.metric { border:1px solid var(--border); background:var(--surface); border-radius:9px; padding:19px 22px; text-align:left; }
.metric strong { display:block; font-size:28px; font-weight:600; margin:8px 0; }
.metric span { color:var(--muted); font-size:12px; }
.metric.danger strong { color:var(--danger); }
.metric.success strong { color:var(--success); }
.workstream-panel { border:1px solid var(--border); background:var(--surface); border-radius:9px; padding:20px; margin-bottom:24px; }
.workstream-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:20px; margin-bottom:16px; }
.workstream-heading .subtitle { margin-top:4px; font-size:12px; }
.workstream-grid { display:grid; grid-auto-flow:column; grid-auto-columns:minmax(0,1fr); gap:12px; }
.workstream-stat { text-align:left; border:1px solid var(--border); border-radius:7px; background:var(--surface-soft); padding:15px 17px; }
.workstream-stat:hover { border-color:var(--primary); background:var(--primary-soft); }
.workstream-stat span { font-size:13px; font-weight:500; }.workstream-stat strong { display:block; font-size:26px; font-weight:600; margin:9px 0; font-variant-numeric:tabular-nums; }
.workstream-stat small { color:var(--muted); font-size:11px; }.workstream-note { color:var(--muted); font-size:12px; margin:13px 0 0; }
.task-function-tag { display:inline-block; border-left:1px solid var(--border); padding-left:7px; margin-left:4px; color:var(--text); }
.self-card-entry { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:13px 18px; border:1px solid var(--border); border-radius:8px; background:var(--surface); margin-bottom:24px; }
.self-card-entry>div { display:flex; align-items:center; gap:12px; }.self-card-entry strong { font-size:13px; }.self-card-entry small { display:block; color:var(--muted); font-size:11px; margin-top:4px; }
.work-details { border:1px solid var(--border); border-radius:8px; padding:18px; background:var(--surface-soft); }
.work-details .workstream-heading { margin-bottom:12px; }.work-details .workstream-heading h2 { margin-bottom:0; }
.work-detail-list { display:grid; grid-template-columns:1fr 1fr; margin:0; column-gap:24px; }.work-detail-list>div { padding:12px 0; border-top:1px solid var(--border); min-width:0; }
.work-detail-list dt { color:var(--muted); font-size:12px; margin-bottom:7px; }.work-detail-list dd { margin:0; font-size:13px; line-height:1.7; white-space:pre-wrap; overflow-wrap:anywhere; }
.card-test-preview { border:1px solid var(--border); border-radius:9px; background:var(--surface-soft); padding:22px; }.card-test-preview h2 { margin:16px 0 8px; }.card-test-preview p { font-size:13px; }
.panel { background:var(--surface); border:1px solid var(--border); border-radius:9px; overflow:hidden; }
.panel-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:18px 20px; border-bottom:1px solid var(--border); }
.panel-heading .subtitle { font-size:12px; }
.home-grid { display:grid; grid-template-columns:minmax(0,1fr) 280px; gap:20px; }
.aside-stack { display:grid; align-content:start; gap:18px; }
.panel-body { padding:20px; }
.summary-stat { font-size:28px; font-weight:600; margin:0 0 12px; }
.summary-stat small { font-size:13px; color:var(--muted); font-weight:400; }
.progress { width:100%; height:7px; background:var(--surface-soft); border-radius:4px; overflow:hidden; }
.progress span { display:block; height:100%; background:var(--primary); border-radius:4px; }
.summary-list { margin:15px 0 0; }
.summary-list div { display:flex; justify-content:space-between; padding:11px 0; border-bottom:1px solid var(--border-soft); }
.summary-list div:last-child { border:0; }
.summary-list dt { color:var(--muted); font-size:12px; }
.summary-list dd { margin:0; font-size:13px; }
.toolbar { display:flex; align-items:center; justify-content:space-between; gap:14px; margin:0 0 18px; flex-wrap:wrap; }
.toolbar-filters { display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.input,.select,textarea { border:1px solid var(--border); background:var(--surface); color:var(--text); padding:9px 11px; border-radius:6px; min-height:37px; }
.input { min-width:190px; }
.select { min-width:140px; max-width:300px; }
.search { width:250px; }
.sort { display:flex; align-items:center; gap:8px; font-size:12px; color:var(--muted); }
.segmented { display:flex; gap:2px; border:1px solid var(--border); border-radius:7px; background:var(--surface-soft); padding:3px; }
.segmented button { border:0; background:transparent; color:var(--muted); border-radius:4px; padding:7px 10px; font-size:12px; }
.segmented button.active { color:var(--text); background:var(--surface); box-shadow:0 1px 3px #0001; font-weight:600; }
.task-head,.task-row { display:grid; grid-template-columns:minmax(220px,1fr) 92px 112px 112px 150px; gap:14px; align-items:center; }
.task-head { background:var(--surface-soft); font-size:11px; color:var(--muted); padding:12px 20px; border-bottom:1px solid var(--border); }
.task-list { padding:10px; display:grid; gap:8px; }
.task-row { width:100%; text-align:left; border:1px solid var(--border); border-radius:7px; padding:16px 10px; background:var(--surface); line-height:1.5; }
.task-row:hover { background:var(--primary-soft); border-color:var(--primary); }
.task-title { font-size:13px; font-weight:600; display:block; }
.task-meta { display:block; color:var(--muted); font-size:11px; margin-top:5px; }
.task-time { font-size:12px; }
.task-time small { display:block; color:var(--muted); font-size:10px; margin-top:2px; }
.task-people { font-size:12px; }
.task-people small { display:block; color:var(--muted); font-size:11px; margin-top:3px; }
.badge { display:inline-block; width:max-content; max-width:100%; color:var(--muted); background:var(--surface-soft); border-radius:4px; padding:3px 7px; font-size:11px; font-weight:500; }
.badge.blue { color:var(--primary); background:var(--primary-soft); }
.badge.green { color:var(--success); background:var(--success-soft); }
.badge.red { color:var(--danger); background:var(--danger-soft); }
.danger-text { color:var(--danger); }
.panel-footer { padding:12px 20px; border-top:1px solid var(--border-soft); color:var(--muted); font-size:12px; display:flex; justify-content:space-between; align-items:center; }
.empty { padding:45px 25px; text-align:center; color:var(--muted); }
.empty .icon { width:44px; height:44px; background:var(--surface-soft); border-radius:10px; margin:0 auto 16px; }
.empty h2 { color:var(--text); margin-bottom:8px; }
.empty p { font-size:13px; margin:8px 0 18px; }
.project-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:18px; }
.project-card { text-align:left; border:1px solid var(--border); background:var(--surface); border-radius:9px; padding:22px; display:flex; flex-direction:column; gap:14px; }
.project-card:hover { border-color:var(--primary); }
.project-team-fields { margin-top:26px; }
.project-team-heading { margin-bottom:16px; }
.project-team-heading h2,.project-team-summary h2 { margin:0; font-size:17px; }
.project-team-heading p { margin:7px 0 0; font-size:13px; color:var(--muted); line-height:1.6; }
/* Two equal role columns share the form edges; SE specialties stay inside their parent. */
.project-role-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:0 24px; }
.project-role-row { display:grid; grid-template-columns:minmax(105px,.8fr) minmax(0,1fr) auto; align-items:center; gap:10px; padding:16px 0; border-bottom:1px solid var(--border); min-width:0; }
.project-role-label h3 { margin:0; font-size:13px; line-height:1.6; font-weight:600; }
.project-role-label small { font-size:12px; color:var(--muted); display:block; margin-top:3px; }
.role-required { display:inline-block; margin-left:7px; color:var(--primary); font-size:11px; font-weight:400; }
.project-role-row .person-chips { min-height:0; gap:5px; margin:0; }
.project-role-row .person-chip { font-size:12px; padding:4px 7px; }
.project-role-row>.button { white-space:nowrap; min-height:34px; padding:7px 9px; }
.project-se-group { padding:0 16px; margin-top:12px; border:1px solid var(--border); border-radius:8px; background:var(--surface-soft); }
.project-se-group>.project-role-row { border:0; }
.project-specialties { padding-left:20px; margin-left:8px; border-left:2px solid var(--border); }
.project-specialties>.project-role-row { grid-template-columns:150px minmax(0,1fr) auto; padding:11px 0; border-top:1px solid var(--border); border-bottom:0; }
.project-stage-access { border:1px solid var(--border); border-radius:8px; margin-top:20px; }
.project-stage-access>summary { padding:13px 16px; font-size:13px; cursor:pointer; }
.project-stage-access>.person-field { border:0; margin:0; padding:8px 16px 16px; }
.project-team-summary { margin:22px 0; }
.project-permissions-heading { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:8px 16px; }
.project-permissions-create { margin:20px 0; border:1px solid var(--border); border-radius:8px; }
.project-permissions-create>summary { padding:13px 16px; cursor:pointer; font-weight:650; }
.project-permissions-create .project-permissions-grid { padding:0 16px 16px; }
.project-permissions-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.project-permissions-group { padding:14px; border:1px solid var(--border); border-radius:8px; background:var(--surface); }
.project-permissions-group h3 { margin:0; font-size:14px; }
.project-permissions-group p { margin:6px 0 12px; color:var(--muted); font-size:13px; line-height:1.55; }
.project-permissions-group .person-chips { min-height:25px; margin:0; }
.project-permissions-automatic { margin-top:12px; padding-top:10px; border-top:1px solid var(--border); }
.project-permissions-automatic h4 { margin:0 0 8px; font-size:12px; }
@media (max-width:640px) { .project-permissions-grid { grid-template-columns:minmax(0,1fr); } }
.project-role-summary { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px 24px; margin:16px 0 24px; padding-bottom:22px; border-bottom:1px solid var(--border); }
.project-role-summary dt { color:var(--muted); font-size:12px; margin-bottom:7px; }
.project-role-summary dd { margin:0; overflow-wrap:anywhere; }
.te-item-checkbox { appearance:auto; width:20px; height:20px; flex:none; margin:0 10px 0 4px; accent-color:var(--primary); cursor:pointer; }
.te-tree-row.checked { background:var(--primary-soft); }
.te-row-delete.button { font-size:12px; min-height:34px; margin:0 10px 0 6px; padding:6px 10px; flex:none; }
.te-editing .te-node-format { display:none; }
.te-selection-bar { padding:12px 16px; border-bottom:1px solid var(--border); background:var(--surface-soft); flex:none; }
.te-selection-summary,.te-selection-actions { display:flex; flex-wrap:wrap; align-items:center; gap:10px; }
.te-selection-summary { margin-bottom:10px; font-size:12px; line-height:1.6; }
.te-selection-summary>span { color:var(--muted); }
.te-selection-actions>.button { min-height:34px; }
.te-selection-actions>.te-bulk-delete { margin-left:auto; }
.te-selection-actions>.te-bulk-delete:not(:disabled) { border-color:var(--danger); background:var(--danger-soft); }
.te-save-notice { flex:none; margin:0; padding:10px 24px; background:var(--primary-soft); color:var(--text); font-size:13px; line-height:1.6; border-bottom:1px solid var(--border); }
.te-save-notice.error { background:var(--danger-soft); color:var(--danger); }
.te-save-notice[hidden] { display:none; }
.te-delete-template-bar { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:14px 22px; flex:none; border-top:1px solid var(--border); background:var(--surface); }
.te-delete-template-bar strong { font-size:13px; }
.te-delete-template-bar span { color:var(--muted); font-size:12px; display:block; margin-top:5px; }
.te-delete-template-bar>.button { min-height:38px; border-color:var(--danger); flex:none; }
.te-editing .te-node-copy small { font-size:11px; }
@media (max-width:700px) {
  .project-role-grid,.project-role-summary { grid-template-columns:minmax(0,1fr); }
  .project-role-row,.project-specialties>.project-role-row { grid-template-columns:minmax(105px,.8fr) minmax(0,1fr) auto; }
  .project-role-row>.button { min-height:44px; }
  .project-se-group { padding:0 10px; }
  .project-specialties { padding-left:10px; margin-left:0; }
  .te-selection-bar { padding:10px 12px; }
  .te-selection-actions { gap:7px; }
  .te-selection-actions>.button { min-height:40px; padding:7px 9px; }
  .te-row-delete.button { min-height:40px; margin-right:6px; padding:6px; }
  .te-delete-template-bar { padding:12px 16px; gap:12px; }
  .te-delete-template-bar span { line-height:1.6; }
  .te-save-notice { padding:10px 16px; }
}
.project-card h2 { font-size:17px; }
.project-list-toolbar { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px; margin:0 0 18px; }
.project-nature-filter { max-width:100%; }
.project-nature-filter button { display:flex; align-items:center; gap:8px; white-space:nowrap; }
.project-filter-count { font-variant-numeric:tabular-nums; color:var(--muted); font-weight:400; }
.project-flow { display:flex; align-items:baseline; gap:10px; font-size:12px; line-height:1.6; color:var(--muted); }
.project-flow>span { flex:none; }
.project-flow strong { font-weight:500; color:var(--text); overflow-wrap:anywhere; }
.project-meta { color:var(--muted); font-size:12px; line-height:1.9; }
.project-bottom { display:flex; align-items:center; justify-content:space-between; padding-top:9px; border-top:1px solid var(--border-soft); color:var(--muted); font-size:12px; }
.feedback-list { display:grid; gap:14px; }
.feedback-card { background:var(--surface); border:1px solid var(--border); border-radius:9px; padding:20px 22px; }
.feedback-head { display:flex; justify-content:space-between; gap:20px; }
.feedback-task { padding:0; background:none; border:0; color:var(--primary); font-weight:600; text-align:left; }
.feedback-note { white-space:pre-wrap; overflow-wrap:anywhere; margin:13px 0; }
.feedback-response { border-left:3px solid var(--primary); background:var(--surface-soft); padding:12px 15px; margin-bottom:14px; white-space:pre-wrap; line-height:1.7; }
.employee-table { width:100%; border-collapse:collapse; }
.employee-table th { text-align:left; font-size:12px; font-weight:500; color:var(--muted); background:var(--surface-soft); padding:14px 20px; border-bottom:1px solid var(--border); }
.employee-table td { padding:18px 20px; border-bottom:1px solid var(--border-soft); }
.employee-table tr:last-child td { border-bottom:0; }
.count-link { padding:0; border:0; background:none; color:var(--primary); text-decoration:underline; text-underline-offset:3px; }
.stacked-bar { display:flex; width:200px; height:9px; background:var(--surface-soft); border-radius:5px; overflow:hidden; }
.stacked-bar .done { background:var(--success); }.stacked-bar .overdue { background:var(--danger); }.stacked-bar .active { background:var(--primary); }.stacked-bar .pending { background:#afb6c1; }
.legend { display:flex; align-items:center; flex-wrap:wrap; gap:20px; color:var(--muted); font-size:12px; margin-bottom:18px; }
.legend i { display:inline-block; width:8px; height:8px; border-radius:2px; margin-right:5px; }
.loading-state { min-height:420px; display:flex; flex-direction:column; align-items:center; justify-content:center; text-align:center; }
.loading-state h1 { font-size:23px; margin-top:24px; }.loading-state p { color:var(--muted); }
.spinner { width:28px; height:28px; border:3px solid var(--border); border-top-color:var(--primary); border-radius:50%; animation:spin .8s linear infinite; }
@keyframes spin { to {transform:rotate(360deg);} }
dialog { background:var(--surface); color:var(--text); width:min(1060px,calc(100vw - 80px)); max-height:calc(100vh - 70px); margin:auto; padding:0; border:1px solid var(--border); border-radius:14px; box-shadow:var(--shadow); }
dialog::backdrop { background:#15182080; }
.modal-head { padding:24px 28px 20px; border-bottom:1px solid var(--border); display:flex; align-items:flex-start; justify-content:space-between; gap:30px; }
.modal-head h1 { font-size:24px; margin-bottom:6px; }
.modal-head:has(#project-name-heading)>div { min-width:0; }
.project-name-title { display:flex; align-items:baseline; gap:8px; }
.project-name-title h1 { min-width:0; overflow-wrap:anywhere; }
.project-name-edit.button { display:inline-grid; place-items:center; flex:none; width:34px; height:34px; padding:0; }
.project-name-edit.button:hover { color:var(--accent); background:var(--surface-soft); }
.project-name-form { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin:0 0 8px; }
.project-name-form .input { flex:1 1 200px; min-width:0; }
.modal-close { flex:none; width:35px; height:35px; border:1px solid var(--border); border-radius:7px; background:var(--surface-soft); font-size:23px; }
.modal-body { padding:24px 28px; overflow-y:auto; max-height:calc(100vh - 260px); }
.modal-footer { border-top:1px solid var(--border); padding:17px 28px; display:flex; align-items:center; justify-content:space-between; gap:20px; background:var(--surface); }
.modal-message { margin:0; color:var(--muted); font-size:12px; max-width:570px; white-space:pre-wrap; line-height:1.6; }
.modal-message.error { color:var(--danger); }
.field { display:grid; gap:8px; font-size:13px; }
.field>span,.field>label { font-weight:600; }.field .input,.field .select { width:100%; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:20px; }.form-grid .full { grid-column:1 / -1; }
.field textarea { resize:vertical; min-height:110px; width:100%; }
.type-options { display:flex; gap:16px; }
.type-option { display:flex; gap:10px; align-items:center; padding:16px; border:1px solid var(--border); border-radius:7px; flex:1; cursor:pointer; }
.type-option:has(input:checked) { border-color:var(--primary); background:var(--primary-soft); }
input[type=radio],input[type=checkbox] { accent-color:#0870da; }
dialog.new-task-dialog { width:min(740px,calc(100vw - 80px)); }
#new-task-form { display:grid; gap:20px; }
.new-task-group { min-width:0; margin:0; padding:0; border:0; }
.new-task-group legend { margin:0 0 8px; padding:0; font-size:13px; font-weight:600; }
.new-task-group>.field-hint { margin:0 0 10px; }
.new-task-group>.field + .field-hint { margin:8px 0 0; }
.new-task-assignment legend small { margin-inline-start:4px; color:var(--muted); font-weight:400; }
.new-task-assignment .task-person-field { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:center; gap:6px 12px; padding:12px 14px; }
.new-task-assignment .task-person-field h2,.new-task-assignment .task-person-field .field-hint { grid-column:1/-1; margin:0; }
.new-task-assignment .task-person-selection { min-height:36px; margin:0; }
#new-task-assignment-plan { margin-top:12px; }
#new-task-reviewer { margin-bottom:12px; }
#new-task-assignment-plan>.field-hint { margin:10px 0 0; }
.new-task-level-options { gap:10px; }
.new-task-level-options .type-option { padding:10px 14px; }
.new-task-parent-list { max-height:min(34vh,288px); overflow:auto; overscroll-behavior:contain; padding:9px; border:1px solid var(--border); border-radius:8px; background:var(--surface-soft); }
.new-task-parent-stage + .new-task-parent-stage { margin-top:12px; }
.new-task-parent-stage-title { padding:3px 7px 6px; font-size:12px; font-weight:600; overflow-wrap:anywhere; color:var(--muted); }
.new-task-parent-option { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin:0 0 4px; margin-inline-start:calc(var(--parent-indent) * 16px); padding:7px 9px; min-height:38px; border:1px solid var(--border); border-radius:6px; background:var(--surface); font-size:13px; cursor:pointer; }
.new-task-parent-option:last-child { margin-bottom:0; }
.new-task-parent-option:hover,.new-task-parent-option:has(input:checked) { border-color:var(--primary); background:var(--primary-soft); }
.new-task-parent-option:has(input:focus-visible) { outline:2px solid var(--primary); outline-offset:1px; }
.new-task-parent-radio { margin:0; width:16px; height:16px; }
.new-task-parent-title { overflow-wrap:anywhere; }
.new-task-parent-level { color:var(--muted); font-size:11px; white-space:nowrap; }
.person-field { border:1px solid var(--border); border-radius:9px; padding:18px; }
.person-field h3 { margin-bottom:15px; }
.person-chips { min-height:45px; display:flex; flex-wrap:wrap; gap:7px; align-content:flex-start; margin-bottom:12px; }
.person-chip { display:flex; align-items:center; gap:7px; font-size:12px; padding:6px 9px; border:1px solid var(--border); background:var(--surface-soft); border-radius:5px; }
.person-chip button { border:0; background:none; font-size:16px; padding:0; color:var(--muted); }
.field-hint { font-size:12px; color:var(--muted); margin:5px 0; }
.callout { padding:12px 15px; border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:6px; background:var(--surface-soft); font-size:12px; color:var(--muted); line-height:1.7; }
.template { margin-top:22px; border:1px solid var(--border); border-radius:7px; overflow:hidden; }
.template summary { padding:14px 17px; cursor:pointer; font-weight:600; background:var(--surface-soft); }
.template-list { max-height:250px; overflow:auto; padding:0 17px; }
.template-list h3 { margin:18px 0 10px; }.template-row { padding:9px 0; border-top:1px solid var(--border-soft); font-size:12px; }.template-row small { color:var(--muted); display:block; margin-top:4px; }
.project-template-picker { margin-top:22px; padding:20px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
.project-template-heading { display:flex; justify-content:space-between; align-items:flex-start; gap:16px; margin-bottom:18px; }
.project-template-heading h3 { font-size:14px; }.project-template-heading p { color:var(--muted); font-size:12px; margin:6px 0 0; }
.project-template-heading>.button { flex:none; }.template-select-field { margin-bottom:14px; }.template-select-field>.select { width:100%; max-width:none; }
.project-template-preview { display:flex; width:100%; align-items:center; gap:14px; text-align:left; background:var(--surface-soft); border:1px solid var(--border); border-radius:7px; padding:17px; }
.project-template-preview:hover { border-color:var(--primary); background:var(--primary-soft); }
.project-template-icon { display:grid; place-items:center; width:38px; height:38px; flex:none; border:1px solid var(--border); border-radius:8px; background:var(--surface); color:var(--primary); }
.project-template-preview strong { display:block; font-size:14px; font-weight:600; }.project-template-preview small { display:block; font-size:12px; color:var(--muted); margin-top:6px; }
.template-preview-action { margin-left:auto; white-space:nowrap; font-size:12px; color:var(--primary); }
/* Directory workspace: compact task rows, clear surfaces, and a single Dafu accent. */
dialog.template-workspace { width:min(1520px,calc(100vw - 48px)); height:min(900px,calc(100dvh - 48px)); max-height:calc(100dvh - 48px); border-radius:12px; }
.template-workspace #modal-content { height:100%; min-height:0; position:relative; }
.te-confirm-layer { position:absolute; inset:0; z-index:10; display:grid; place-items:center; padding:24px; background:#10172280; border-radius:inherit; }
.te-confirm-card { width:min(460px,100%); border:1px solid var(--border); background:var(--surface); box-shadow:var(--shadow); border-radius:12px; padding:28px; }
.te-confirm-symbol { display:grid; place-items:center; width:32px; height:32px; border:1px solid var(--border); background:var(--surface-soft); border-radius:8px; color:var(--danger); font-weight:600; margin-bottom:18px; }
.te-confirm-card h2 { font-size:19px; font-weight:600; line-height:1.5; margin:0 0 12px; }.te-confirm-card p { color:var(--muted); font-size:13px; line-height:1.85; margin:0; overflow-wrap:anywhere; }
.te-confirm-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:26px; }.te-confirm-actions>.button { min-height:40px; }.te-confirm-actions>.button.danger { background:var(--danger-soft); border-color:var(--danger); }
.te-workspace { display:flex; flex-direction:column; height:100%; min-height:0; }
.te-header { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:20px 24px 18px; border-bottom:1px solid var(--border); flex:none; }
.te-header-copy { min-width:0; }.te-header h1 { font-size:22px; font-weight:600; letter-spacing:-.5px; margin:6px 0 0; overflow-wrap:anywhere; }
.te-kicker { display:block; font-size:11px; letter-spacing:.3px; color:var(--muted); margin:0; line-height:1.6; }.te-kicker>span { padding:0 8px; color:var(--border); }
.te-header-actions { display:flex; gap:8px; flex:none; }.te-header-actions>.button { min-width:76px; }
.te-meta-bar { display:flex; align-items:center; gap:20px; padding:12px 24px; min-height:56px; background:var(--surface-soft); border-bottom:1px solid var(--border); flex:none; font-size:12px; color:var(--muted); }
.te-meta-count { white-space:nowrap; }.te-meta-count strong { color:var(--text); font-weight:600; }.te-meta-count i { font-style:normal; margin:0 10px; }
.te-template-version { border:1px solid var(--border); background:var(--surface); border-radius:4px; padding:5px 8px; white-space:nowrap; }
.te-template-updated { margin-left:auto; font-size:11px; }.te-name-field { display:flex; align-items:center; gap:10px; flex:1; min-width:0; }.te-name-field>span { flex:none; }.te-name-field>.input { width:min(360px,100%); min-width:0; min-height:34px; padding:7px 10px; font-size:13px; background:var(--surface); }
.te-draft-status { font-size:11px; color:var(--success); white-space:nowrap; }.te-draft-status.unsaved { color:var(--primary); }
.te-copy-note { padding:10px 24px; border-bottom:1px solid var(--border); background:var(--primary-soft); color:var(--primary); font-size:12px; flex:none; line-height:1.6; }
.te-columns { display:grid; grid-template-columns:224px minmax(280px,1fr) 320px; flex:1; min-height:0; overflow:hidden; }
.te-stages { display:flex; flex-direction:column; min-height:0; background:var(--surface-soft); border-right:1px solid var(--border); }
.te-column-heading { display:flex; align-items:center; justify-content:space-between; padding:20px 16px 12px; }.te-column-heading h2 { font-size:12px; color:var(--muted); font-weight:500; }.te-column-heading>span { font-size:11px; color:var(--muted); }
.te-stage-list { flex:1; min-height:0; overflow-y:auto; padding:0 8px 12px; overscroll-behavior:contain; }
.te-stage { display:flex; align-items:center; width:100%; gap:10px; padding:12px 8px; border:1px solid transparent; border-radius:7px; background:transparent; text-align:left; margin-bottom:4px; }
.te-stage:hover { background:var(--surface); }.te-stage.active { background:var(--surface); border-color:var(--border); box-shadow:0 1px 2px #00000005; }
.te-stage-code { font-size:10px; line-height:1.5; min-width:34px; max-width:50px; overflow-wrap:anywhere; padding:5px 4px; background:var(--surface); border:1px solid var(--border); border-radius:4px; color:var(--muted); text-align:center; font-weight:600; font-variant-numeric:tabular-nums; }
.te-stage.active .te-stage-code { background:var(--primary-soft); color:var(--primary); border-color:var(--primary); }.te-stage-copy { min-width:0; }.te-stage-copy strong { display:block; font-size:12px; font-weight:500; overflow-wrap:anywhere; line-height:1.6; }.te-stage-copy small { display:block; color:var(--muted); font-size:10px; margin-top:3px; }
.te-stage-footer { padding:12px; border-top:1px solid var(--border); flex:none; }.te-stage-footer>.button { width:100%; font-size:11px; }
.te-outline { display:flex; flex-direction:column; min-width:0; min-height:0; }
.te-outline-heading { padding:20px 20px 16px; border-bottom:1px solid var(--border); display:flex; align-items:center; justify-content:space-between; gap:12px; flex:none; }.te-outline-heading>div { min-width:0; }.te-outline-heading h2 { font-size:18px; font-weight:600; margin:5px 0 4px; overflow-wrap:anywhere; }.te-outline-heading p { margin:0; color:var(--muted); font-size:11px; }.te-outline-heading>.button { flex:none; }
.te-tree-toolbar { display:flex; align-items:center; gap:10px; padding:10px 20px; background:var(--surface-soft); border-bottom:1px solid var(--border); color:var(--muted); font-size:11px; flex:none; }.te-tree-toolbar>span { margin-right:auto; }.te-text-button { padding:2px 0; background:none; border:0; color:var(--muted); font-size:11px; }.te-text-button:hover { color:var(--primary); }
.te-tree-scroll { flex:1; min-height:0; overflow:auto; overscroll-behavior:contain; padding:8px 0 24px; }
.te-tree,.te-tree ul { margin:0; padding:0; list-style:none; }.te-tree-row { display:flex; padding-left:calc(8px + var(--depth)*20px); align-items:center; border-bottom:1px solid var(--border-soft); position:relative; min-height:60px; }
.te-tree-row::before { content:""; display:block; position:absolute; top:0; bottom:0; left:calc(17px + (var(--depth) - 1)*20px); border-left:1px solid var(--border); opacity:clamp(0,var(--depth),1); }
.te-tree-row:hover { background:var(--surface-soft); }.te-tree-row.selected { background:var(--primary-soft); box-shadow:inset 3px 0 var(--primary); }
.button.te-toggle { flex:none; padding:0; width:28px; min-height:28px; background:none; border:0; color:var(--muted); border-radius:4px; }.button.te-toggle:hover { background:var(--surface-soft); }.te-toggle-spacer { width:28px; flex:none; }.te-chevron { display:flex; width:18px; height:18px; }.te-chevron svg { width:100%; height:100%; transition:transform .15s; }.te-chevron.expanded svg { transform:rotate(90deg); }
.te-node-select { display:flex; flex:1; align-items:center; min-width:0; gap:10px; padding:13px 16px 13px 0; background:none; border:0; text-align:left; }
.te-item-icon { display:flex; width:20px; height:20px; flex:none; color:var(--muted); }.te-item-icon svg { width:20px; height:20px; }.te-tree-row.selected .te-item-icon { color:var(--primary); }.te-node-copy { min-width:0; flex:1; }.te-node-copy strong { display:block; font-size:12px; font-weight:500; line-height:1.65; overflow-wrap:anywhere; }.te-node-copy small { display:block; color:var(--muted); font-size:10px; margin-top:2px; }.te-node-format { color:var(--muted); font-size:10px; max-width:72px; text-align:right; overflow-wrap:anywhere; }
.te-inspector { border-left:1px solid var(--border); background:var(--surface); overflow-y:auto; min-width:0; padding:20px; overscroll-behavior:contain; }
.te-inspector-heading { padding-bottom:18px; margin-bottom:20px; border-bottom:1px solid var(--border); }.te-inspector-heading h2 { font-size:16px; line-height:1.65; font-weight:600; margin:6px 0 0; overflow-wrap:anywhere; }.te-inspector-fields { display:grid; gap:20px; }.te-inspector-fields .field { font-size:12px; }.te-inspector-fields .input { min-width:0; font-size:13px; }.te-inspector-fields textarea { min-height:170px; font-size:13px; line-height:1.7; }.te-field-pair { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
.te-inspector-note { font-size:12px; color:var(--muted); line-height:1.8; margin:0; }.te-inspector-actions { display:grid; gap:10px; padding-top:22px; margin-top:22px; border-top:1px solid var(--border); }.te-inspector-actions>.button { justify-content:flex-start; }.te-inspector-footnote { font-size:11px; line-height:1.8; color:var(--muted); margin:18px 0 0; }.te-inspector-empty { color:var(--muted); font-size:12px; line-height:1.8; }
.te-properties { margin:0; }.te-properties>div { display:flex; gap:18px; padding:12px 0; border-bottom:1px solid var(--border-soft); font-size:12px; line-height:1.8; }.te-properties dt { width:70px; flex:none; color:var(--muted); }.te-properties dd { margin:0; overflow-wrap:anywhere; white-space:pre-wrap; }.te-properties>.te-property-output { display:block; padding-top:20px; border-bottom:0; }.te-property-output dt { width:auto; margin-bottom:10px; }.te-property-output dd { line-height:1.9; }
.te-read-note { display:flex; align-items:flex-start; gap:9px; border:1px solid var(--border); background:var(--surface-soft); color:var(--muted); padding:12px; border-radius:7px; font-size:11px; line-height:1.8; margin-top:24px; }.te-read-note>svg { width:18px; height:18px; flex:none; margin-top:2px; }
.te-empty { padding:48px 24px; text-align:center; color:var(--muted); }.te-empty>svg { width:32px; height:32px; }.te-empty h3 { color:var(--text); font-size:13px; margin:16px 0 8px; }.te-empty p { font-size:12px; margin:0; }
.te-statusbar { display:flex; align-items:center; justify-content:space-between; gap:24px; border-top:1px solid var(--border); padding:12px 20px; flex:none; min-height:44px; background:var(--surface); }.te-statusbar>span { flex:none; font-size:11px; color:var(--muted); }.te-statusbar .modal-message { max-width:none; font-size:11px; }
@media (max-width:1200px) and (min-width:1041px) { .te-columns { grid-template-columns:190px minmax(250px,1fr) 275px; }.te-inspector { padding:18px 16px; }.te-meta-bar { gap:14px; } }
@media (prefers-reduced-motion:reduce) { .te-chevron svg { transition:none; } }
.detail-grid { display:grid; grid-template-columns:repeat(3,1fr); gap:18px 28px; padding-bottom:22px; border-bottom:1px solid var(--border); margin-bottom:22px; }
.detail-grid div { min-width:0; }.detail-grid dt { color:var(--muted); font-size:12px; margin-bottom:7px; }.detail-grid dd { margin:0; font-size:13px; line-height:1.6; overflow-wrap:anywhere; }
.task-detail-owner { display:flex; flex-wrap:wrap; align-items:center; gap:4px 10px; }
.detail-section { margin-top:22px; }.detail-section h2 { margin-bottom:10px; }.detail-section p { margin:8px 0; white-space:pre-wrap; overflow-wrap:anywhere; }
.detail-actions { display:flex; gap:9px; flex-wrap:wrap; padding:16px 0 0; }
.history { margin:0; padding:0; list-style:none; }.history li { padding:10px 0; border-bottom:1px solid var(--border-soft); font-size:12px; line-height:1.7; overflow-wrap:anywhere; }.history small { color:var(--muted); }
.stage-row { border:1px solid var(--border); border-radius:7px; padding:16px; margin-bottom:10px; display:flex; justify-content:space-between; align-items:center; gap:20px; }.stage-row .progress { width:180px; }.stage-row .stage-copy { flex:1; }.stage-row .stage-copy small { display:block; color:var(--muted); margin-top:6px; }
.links { display:flex; gap:10px; flex-wrap:wrap; }.links button { background:none; border:0; color:var(--primary); padding:0; text-align:left; font-size:12px; }
.complete-fields { display:grid; grid-template-columns:1fr 1fr; margin:0; padding:0 18px; column-gap:26px; }
.complete-fields>div { padding:13px 0; border-bottom:1px solid var(--border-soft); min-width:0; }
.complete-fields dt { color:var(--muted); font-size:12px; margin-bottom:7px; }.complete-fields dt small { margin-left:8px; color:var(--muted); font-size:10px; }
.complete-fields dd { margin:0; font-size:13px; line-height:1.65; overflow-wrap:anywhere; white-space:pre-wrap; }
.todo-controls { padding:15px; border:1px solid var(--border); border-radius:7px; background:var(--surface-soft); }.todo-controls p { margin:0 0 10px; font-size:12px; color:var(--muted); }
.source-home-entry { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:16px 20px; margin:0 0 22px; border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:8px; background:var(--surface); }
.source-home-entry>div { display:flex; align-items:center; gap:14px; }.source-home-entry strong { font-size:14px; }.source-home-entry p { color:var(--muted); font-size:12px; margin:4px 0 0; }
.source-section-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 14px; }.source-project-section { margin:0 0 28px; }
.source-project-card { min-height:215px; }.source-project-card .source-card-note { font-size:12px; color:var(--muted); line-height:1.7; margin:0; }.source-project-card .project-bottom { margin-top:auto; }
dialog.source-wide { width:min(1480px,calc(100vw - 80px)); }.source-wide .modal-head { padding:22px 28px 18px; }.source-wide .modal-body { padding:18px 28px 24px; }
.source-tabs { display:flex; flex-wrap:wrap; gap:7px; padding:0 0 17px; border-bottom:1px solid var(--border); margin:0 0 16px; }
.source-tabs button { display:flex; align-items:center; gap:9px; border:1px solid var(--border); background:var(--surface); color:var(--muted); border-radius:6px; padding:9px 12px; font-size:12px; }
.source-tabs button span { font-size:10px; font-variant-numeric:tabular-nums; border-radius:4px; background:var(--surface-soft); padding:2px 5px; }.source-tabs button.active { color:var(--primary); border-color:var(--primary); background:var(--primary-soft); font-weight:600; }
.source-history-label { display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); line-height:1.7; margin:0 0 10px; }.source-history-label .badge { flex:none; }
.source-identity-note { font-size:12px; line-height:1.8; color:var(--muted); border:1px solid var(--border); border-radius:6px; background:var(--surface-soft); padding:10px 13px; margin:0 0 16px; }
.source-table-heading { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:0 0 12px; }.source-table-heading .subtitle { font-size:11px; }
.source-table-scroll { overflow:auto; max-height:min(620px,calc(100vh - 460px)); min-height:120px; border:1px solid var(--border); border-radius:8px; position:relative; }
.source-table { border-collapse:separate; border-spacing:0; width:max-content; min-width:100%; font-size:12px; table-layout:fixed; }
.source-table th { text-align:left; font-size:12px; font-weight:600; color:var(--text); padding:13px 16px; background:var(--surface-soft); border-bottom:1px solid var(--border); border-right:1px solid var(--border-soft); position:sticky; top:0; z-index:2; }
.source-table th small { display:block; font-weight:400; font-size:10px; color:var(--muted); margin-top:4px; }
.source-table td { min-width:190px; max-width:300px; width:220px; padding:13px 16px; line-height:1.7; vertical-align:top; border-bottom:1px solid var(--border); border-right:1px solid var(--border-soft); overflow-wrap:anywhere; white-space:pre-wrap; }
.source-table th:first-child,.source-table td:first-child { min-width:270px; max-width:320px; position:sticky; left:0; background:var(--surface); border-right:1px solid var(--border); box-shadow:2px 0 4px #00000006; z-index:1; font-weight:500; }
.source-table th:first-child { background:var(--surface-soft); font-weight:600; z-index:3; }.source-table tr { cursor:pointer; }.source-table tr:hover td,.source-table tr:focus-visible td { background:var(--primary-soft); }.source-table tr:last-child td { border-bottom:0; }
.source-person { display:block; margin:0 0 5px; }.source-person:last-child { margin-bottom:0; }.source-person strong { font-size:12px; font-weight:500; }.source-person small,.source-cell-note { display:block; color:var(--muted); font-size:10px; line-height:1.6; margin-top:2px; }
.source-empty { color:var(--muted); }.source-attachment { display:block; }.source-attachment small { display:block; color:var(--muted); font-size:10px; margin-top:3px; }.source-external { text-decoration:underline; text-underline-offset:3px; }
.source-record-fields { display:grid; grid-template-columns:1fr 1fr; gap:0 28px; margin:16px 0 0; border:1px solid var(--border); border-radius:8px; padding:0 20px; }.source-record-fields>div { min-width:0; padding:15px 0; border-bottom:1px solid var(--border); }.source-record-fields dt { color:var(--muted); font-size:12px; margin-bottom:8px; }.source-record-fields dt small { font-size:10px; margin-left:9px; }.source-record-fields dd { font-size:13px; line-height:1.8; margin:0; white-space:pre-wrap; overflow-wrap:anywhere; }.source-record-fields .source-person strong { font-size:13px; }
.source-loading { min-height:230px; display:flex; align-items:center; justify-content:center; gap:15px; color:var(--muted); font-size:13px; }.source-no-records { text-align:center; padding:35px 20px; font-size:13px; color:var(--muted); }
[hidden] { display:none !important; }
@media (prefers-reduced-motion:reduce) { .spinner { animation:none; } }
@media (max-width:1300px) { .workbench {grid-template-columns:200px minmax(0,1fr);} main {padding:28px 24px 45px;} .home-grid {grid-template-columns:minmax(0,1fr) 225px;} .task-head,.task-row {grid-template-columns:minmax(210px,1fr) 72px 90px 90px 110px;gap:8px;} .project-grid {grid-template-columns:repeat(2,1fr);} }

/* Mobile has its own navigation and reading density; desktop layout stays unchanged. */
.mobile-brand,.mobile-menu-toggle,.mobile-tabs,.mobile-menu { display:none; }
@media (max-width:1040px) {
  body { min-width:0; width:100%; }
  .workbench { display:block; min-height:100vh; min-height:100dvh; }
  .sidebar { display:none; }
  .workspace,main { width:100%; min-width:0; }
  .topbar { position:sticky; top:0; z-index:20; height:calc(60px + env(safe-area-inset-top)); padding:env(safe-area-inset-top) 14px 0; gap:8px; }
  .mobile-brand { display:flex; flex:none; align-items:center; }
  .mobile-brand img { display:block; width:30px; height:30px; border-radius:7px; object-fit:contain; }
  #breadcrumb { min-width:0; flex:1; overflow:hidden; white-space:nowrap; text-overflow:ellipsis; font-size:11px; }
  .topbar-actions { gap:6px; flex:none; }
  .connection { display:none; }
  .appearance { padding:2px; }
  .appearance button { width:30px; height:34px; }
  .topbar .icon-button { width:38px; height:40px; }
  .mobile-menu-toggle { display:inline-grid; place-items:center; font-size:20px; }
  main { padding:20px 18px calc(92px + env(safe-area-inset-bottom)); }
  .notice { margin:12px 18px 0; overflow-wrap:anywhere; }
  .mobile-tabs { position:fixed; z-index:25; bottom:0; left:0; right:0; display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); padding:5px max(8px,env(safe-area-inset-left)) calc(5px + env(safe-area-inset-bottom)) max(8px,env(safe-area-inset-right)); border-top:1px solid var(--border); background:var(--surface); }
  .mobile-tabs[data-entry-mode="unadapted"] { grid-template-columns:minmax(0,1fr); }
  .mobile-tab { min-width:0; min-height:54px; display:flex; flex-direction:column; justify-content:center; align-items:center; gap:4px; background:none; border:0; border-radius:7px; color:var(--muted); font-size:11px; }
  .mobile-tab .icon,.mobile-tab .icon svg { width:21px; height:21px; }
  .mobile-tab.active { color:var(--primary); background:var(--primary-soft); font-weight:600; }
  .mobile-menu[open] { display:block; width:min(440px,calc(100vw - 28px)); max-height:calc(100dvh - 56px); height:auto; margin:auto; border:1px solid var(--border); border-radius:14px; padding:16px; overflow:auto; }
  .mobile-menu-head { display:flex; align-items:center; justify-content:space-between; gap:20px; margin-bottom:10px; }
  .mobile-menu .nav-item { min-height:48px; margin:3px 0; font-size:14px; }
  .mobile-menu-profile { margin-top:12px; border-top:1px solid var(--border); padding-top:4px; }
  .mobile-menu .profile { border:0; padding:12px 4px; }
  .mobile-menu-profile>.button { width:100%; }
  .heading { gap:14px; margin-bottom:20px; }
  h1 { font-size:25px; letter-spacing:-.4px; }
  .heading>.button { flex:none; }
  .button { min-height:44px; }
  .button.small { min-height:40px; }
  .hero.ipd-home-hero,.hero.ipd-home-hero.is-employee { min-height:174px; padding:20px; margin-bottom:16px; }
  .ipd-home-intro { max-width:76%; }
  .hero .ipd-home-intro h1,.hero.is-employee .ipd-home-intro h1 { font-size:29px; letter-spacing:-.6px; }
  .hero .ipd-home-date { margin-bottom:8px; }
  .ipd-home-intro .subtitle { font-size:12px; max-width:360px; }
  .ipd-home-actions { right:20px; bottom:18px; }
  .ipd-home-actions .button { min-height:40px; }
  .metric-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-bottom:18px; }
  .metric { padding:15px 17px; min-width:0; }
  .metric strong { font-size:26px; margin:6px 0; }
  .home-grid { grid-template-columns:minmax(0,1fr); gap:18px; }
  .aside-stack { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .panel { min-width:0; max-width:100%; }
  .panel-heading { padding:15px 16px; flex-wrap:wrap; gap:10px; }
  .panel-body { padding:17px; }
  .panel-footer { padding:12px 16px; flex-wrap:wrap; gap:8px; }
  .sort { max-width:100%; min-width:0; }
  .segmented { min-width:0; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .segmented button { flex:none; min-height:38px; padding:8px 10px; white-space:nowrap; }
  .toolbar-filters { width:100%; display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
  .toolbar-filters .search { grid-column:1/-1; }
  .input,.select,textarea { min-width:0; max-width:100%; min-height:44px; font-size:16px; }
  .toolbar-filters .input,.toolbar-filters .select { width:100%; max-width:none; }
  .toolbar-filters>label { min-height:44px; display:flex; align-items:center; gap:6px; }
  .task-head { display:none; }
  .task-list { padding:10px; gap:10px; }
  .task-row { grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:13px 12px; padding:15px; align-items:start; }
  .task-copy { grid-column:1/-1; min-width:0; overflow-wrap:anywhere; }
  .task-title { font-size:15px; line-height:1.6; }
  .task-meta { font-size:12px; line-height:1.6; }
  .task-state { grid-column:1/-1; display:flex; align-items:center; gap:8px; padding-bottom:11px; border-bottom:1px solid var(--border-soft); }
  .task-state>.task-meta { margin:0; }
  .task-time { font-size:13px; }
  .task-time::before,.task-people::before { content:attr(data-label); display:block; color:var(--muted); font-size:11px; font-weight:400; margin-bottom:5px; }
  .task-people { grid-column:1/-1; font-size:13px; padding-top:10px; border-top:1px solid var(--border-soft); }
  .task-people::before { display:inline; margin-right:9px; }
  .task-people small { display:inline; font-size:12px; margin-left:16px; }
  .badge { font-size:12px; }
  .workstream-panel { padding:16px; margin-bottom:18px; min-width:0; }
  .workstream-heading { flex-wrap:wrap; gap:10px; }
  .workstream-grid { grid-auto-columns:minmax(142px,1fr); overflow-x:auto; padding-bottom:7px; scroll-snap-type:x proximity; -webkit-overflow-scrolling:touch; }
  .workstream-stat { min-height:126px; scroll-snap-align:start; }
  .work-detail-list { grid-template-columns:1fr; }
  .project-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }
  .project-card { min-width:0; padding:18px; overflow-wrap:anywhere; }
  .project-card h2 { font-size:16px; }
  .feedback-card { padding:17px; min-width:0; }
  .feedback-head { gap:12px; }
  .feedback-head>div { min-width:0; overflow-wrap:anywhere; }
  .feedback-head>.badge { flex:none; }
  .feedback-task { min-height:36px; }
  .source-home-entry,.source-home-entry>div { gap:12px; }
  .source-home-entry { flex-wrap:wrap; padding:15px; }
  .source-section-heading { flex-wrap:wrap; gap:6px; }
  .legend { gap:10px 16px; line-height:1.8; }
  .employee-table-scroll { width:100%; max-width:100%; overflow:auto; -webkit-overflow-scrolling:touch; }
  .employee-table { min-width:760px; }
  .employee-table th,.employee-table td { padding:14px 16px; }
  .employee-table .count-link { min-width:38px; min-height:40px; }
  #modal { width:100%; height:100vh; height:100dvh; max-width:100%; max-height:100dvh; margin:0; border:0; border-radius:0; }
  #modal-content { display:flex; flex-direction:column; height:100%; min-height:0; }
  #modal .modal-head { flex:none; padding:calc(18px + env(safe-area-inset-top)) 18px 16px; gap:16px; }
  .modal-head>div { min-width:0; overflow-wrap:anywhere; }
  .modal-head h1 { font-size:22px; }
  .project-name-edit.button { width:44px; height:44px; }
  .modal-close { width:42px; height:42px; }
  #modal .modal-body { flex:1; min-height:0; max-height:none; padding:20px 18px; overscroll-behavior:contain; -webkit-overflow-scrolling:touch; }
  #modal .modal-footer { flex:none; padding:14px 18px calc(14px + env(safe-area-inset-bottom)); flex-wrap:wrap; gap:10px; }
  .modal-message { width:100%; max-width:none; }
  .modal-message:empty { display:none; }
  .modal-footer>.actions { margin-left:auto; justify-content:flex-end; }
  .form-grid,.detail-grid,.complete-fields,.source-record-fields { grid-template-columns:minmax(0,1fr); }
  .form-grid { gap:18px; }
  .form-grid .full { grid-column:auto; }
  .detail-grid { gap:15px; }
  .detail-grid>div { border-bottom:1px solid var(--border-soft); padding-bottom:12px; }
  .detail-grid>div:last-child { border:0; padding-bottom:0; }
  .field .select { max-width:none; }
  .new-task-parent-list { max-height:min(38vh,275px); }
  .new-task-parent-option { min-height:44px; margin-inline-start:calc(var(--parent-indent) * 9px); }
  .person-field { padding:15px; }
  .type-option { padding:14px 12px; min-height:48px; }
  .person-chip { max-width:100%; overflow-wrap:anywhere; }
  .person-chip button { min-width:28px; min-height:28px; }
  .stage-row { flex-wrap:wrap; gap:12px; padding:15px; }
  .stage-row .stage-copy { flex:1 1 100%; min-width:0; overflow-wrap:anywhere; }
  .stage-row .progress { flex:1; min-width:80px; width:auto; }
  .detail-actions .button { flex:1 1 auto; }
  .source-tabs { flex-wrap:nowrap; overflow-x:auto; -webkit-overflow-scrolling:touch; }
  .source-tabs button { flex:none; min-height:44px; }
  .source-history-label,.source-table-heading { flex-wrap:wrap; gap:8px; }
  .source-table-scroll { width:100%; max-width:100%; max-height:52dvh; -webkit-overflow-scrolling:touch; }
  .source-table th:first-child,.source-table td:first-child { position:static; min-width:180px; max-width:220px; width:200px; box-shadow:none; }
  .source-record-fields { padding:0 15px; gap:0; }
  .source-record-fields dt small { display:block; margin:5px 0 0; }
  .loading-state { min-height:55dvh; padding:15px; }
}
@media (max-width:600px) {
  main { padding:16px 12px calc(86px + env(safe-area-inset-bottom)); }
  .topbar { padding-left:10px; padding-right:10px; }
  .notice { margin-left:12px; margin-right:12px; }
  .heading { align-items:flex-start; flex-wrap:wrap; }
  .hero.ipd-home-hero,.hero.ipd-home-hero.is-employee { min-height:162px; padding:17px; }
  .hero:has(.ipd-home-actions>.button) { padding-bottom:65px; min-height:206px; }
  .hero .ipd-home-intro h1,.hero.is-employee .ipd-home-intro h1 { font-size:27px; }
  .ipd-home-intro { max-width:87%; }
  .ipd-home-actions { right:17px; bottom:15px; }
  .ipd-home-intro .subtitle { font-size:12px; }
  .metric { padding:13px 14px; }
  .metric span { font-size:11px; line-height:1.6; }
  .metric strong { font-size:26px; }
  .project-grid,.aside-stack { grid-template-columns:minmax(0,1fr); }
  .panel-heading .sort { flex:1 1 100%; }
  .sort>.segmented { flex:1; }
  .sort .segmented button { flex:1; padding:8px 7px; font-size:11px; }
  .panel-footer .button { padding-left:0; padding-right:0; }
  .empty { padding:32px 16px; }
  .type-options { gap:9px; }
  .type-option { gap:6px; font-size:14px; }
  .modal-footer .actions { width:100%; display:flex; }
  .modal-footer .actions>.button { flex:1; }
  .complete-fields { padding:0 13px; }
}
@media (max-width:1040px) {
  .project-template-picker { padding:16px; }.project-template-heading { gap:12px; }.project-template-preview { padding:14px 12px; gap:11px; }.project-template-preview small { line-height:1.7; }
  #modal.template-workspace .te-header { padding:calc(16px + env(safe-area-inset-top)) 16px 14px; gap:12px; }.te-header h1 { font-size:19px; letter-spacing:-.3px; }.te-header-actions>.button { min-width:60px; min-height:42px; padding:8px 11px; }
  .te-meta-bar { padding:12px 16px; flex-wrap:wrap; gap:10px 16px; }.te-name-field { flex:1 1 100%; }.te-name-field>.input { width:100%; max-width:none; min-height:44px; font-size:16px; }.te-meta-count { font-size:11px; }.te-draft-status { margin-left:auto; }.te-copy-note { padding:10px 16px; font-size:11px; }
  .te-columns { display:flex; flex-direction:column; overflow-y:auto; overscroll-behavior:contain; }.te-stages { flex:none; border-right:0; border-bottom:1px solid var(--border); }.te-column-heading { padding:12px 16px 6px; }.te-stage-list { display:flex; flex:none; gap:8px; overflow-x:auto; padding:6px 12px 12px; }.te-stage { flex:none; width:174px; margin:0; padding:10px; }.te-stage-footer { padding:8px 12px; border-top:0; }.te-stage-footer>.button { width:auto; min-height:40px; }
  .te-outline { flex:none; min-height:280px; }.te-outline-heading { padding:16px; }.te-outline-heading h2 { font-size:17px; }.te-outline-heading>.button { min-height:42px; }.te-tree-toolbar { padding:8px 16px; }.te-text-button { min-height:32px; }.te-tree-scroll { flex:none; max-height:44dvh; min-height:160px; padding-bottom:12px; }.te-tree-row { min-height:64px; }.te-node-select { padding-top:15px; padding-bottom:15px; }.te-node-copy strong { font-size:13px; }.te-node-format { max-width:56px; }.button.te-toggle { min-height:36px; }
  .te-inspector { flex:none; border-left:0; border-top:1px solid var(--border); overflow:visible; padding:20px 16px 28px; }.te-inspector-heading { margin-bottom:16px; padding-bottom:14px; }.te-inspector-fields .input,.te-inspector-fields .select,.te-inspector-fields textarea { font-size:16px; min-height:44px; max-width:none; }.te-inspector-fields textarea { min-height:150px; }.te-inspector-actions { grid-template-columns:1fr 1fr; gap:12px; }.te-inspector-actions>.button { min-height:44px; justify-content:center; }.te-inspector-footnote { margin-top:14px; }.te-read-note { margin-top:18px; }
  .te-statusbar { padding:10px 16px calc(10px + env(safe-area-inset-bottom)); gap:12px; }.te-statusbar>.modal-message { font-size:10px; line-height:1.7; }.te-statusbar>span { display:none; }
}
@media (max-width:460px) {
  .project-template-heading { flex-wrap:wrap; }.project-template-heading>.button { margin-left:auto; }.project-template-preview { flex-wrap:wrap; }.template-preview-action { margin-left:52px; }.te-header .te-kicker { font-size:10px; }.te-header h1 { font-size:18px; }.te-header-actions { gap:6px; }.te-header-actions>.button { min-width:54px; padding:8px 10px; }.te-meta-count i { margin:0 6px; }.te-outline-heading { align-items:flex-start; }.te-outline-heading>.button { font-size:11px; padding:8px; }.te-node-format { display:none; }
}

/* Staff overview: clear structural borders, compact controls and an explicit read-only context. */
.source-editing { position:relative; }
.project-source-picker { margin:20px 0; padding:20px; border:1px solid var(--border); border-radius:9px; background:var(--surface); }
.project-source-heading,.source-link-candidate-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.project-source-heading h3 { font-size:15px; }
.project-source-heading p { margin:7px 0 0; color:var(--muted); font-size:12px; line-height:1.7; }
.project-source-heading>.button,.source-link-candidate-heading>.button { flex:none; }
.source-optional { margin-left:9px; color:var(--muted); font-size:11px; font-weight:400; }
.source-link-input { display:flex; gap:10px; align-items:flex-end; margin-top:20px; }
.source-link-input .field { flex:1; min-width:0; }
.source-link-input .input { width:100%; max-width:none; }
.source-link-input>.button { min-height:39px; flex:none; }
.source-link-candidate { margin-top:16px; background:var(--surface-soft); border:1px solid var(--border); border-radius:7px; overflow:hidden; }
.source-link-candidate-heading { padding:15px 16px; border-bottom:1px solid var(--border); }
.source-link-candidate-heading strong { display:block; font-size:13px; line-height:1.7; overflow-wrap:anywhere; }
.source-link-candidate-heading span { display:block; margin-top:4px; font-size:11px; color:var(--muted); }
.source-link-candidate-heading b { font-weight:500; color:var(--text); }
.source-link-tables { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px 16px; padding:14px 16px; max-height:220px; overflow-y:auto; }
.source-link-tables label { display:flex; align-items:flex-start; gap:9px; padding:6px 0; cursor:pointer; font-size:12px; line-height:1.6; min-width:0; }
.source-link-tables label span { overflow-wrap:anywhere; }
.source-link-tables input { width:17px; height:17px; margin:1px 0 0; flex:none; accent-color:var(--primary); }
.project-source-summary { display:flex; align-items:center; gap:16px; padding:18px; border:1px solid var(--border); border-radius:8px; margin:20px 0; background:var(--surface-soft); }
.project-source-symbol { width:40px; height:44px; display:grid; place-items:center; flex:none; background:var(--surface); border:1px solid var(--border); border-radius:7px; color:var(--primary); }
.project-source-summary>div:nth-child(2) { min-width:0; flex:1; }
.project-source-summary h3 { margin:8px 0 5px; font-size:14px; overflow-wrap:anywhere; }
.project-source-summary p { margin:0; color:var(--muted); font-size:12px; line-height:1.7; }
.project-source-summary>.actions { flex:none; }
.source-unlink-confirm { padding:16px 18px; border:1px solid var(--danger); border-radius:8px; background:var(--danger-soft); }
.source-unlink-confirm>strong { color:var(--danger); font-size:14px; }
.source-unlink-confirm p { color:var(--muted); font-size:12px; margin:8px 0 14px; }
@media (max-width:700px) {
  .project-source-picker { padding:16px; }
  .project-source-heading { align-items:flex-start; gap:12px; }
  .source-link-input { flex-wrap:wrap; }
  .source-link-input .field { flex-basis:100%; }
  .source-link-input>.button { margin-left:auto; min-height:42px; }
  .source-link-tables { grid-template-columns:minmax(0,1fr); max-height:230px; }
  .source-link-tables label { min-height:38px; align-items:center; font-size:13px; }
  .source-link-tables input { width:20px; height:20px; }
  .project-source-summary { flex-wrap:wrap; gap:12px; padding:15px; }
  .project-source-summary>.actions { width:100%; justify-content:flex-end; }
}
.source-editor .modal-head h1 { font-size:22px; }
.source-editor-notice { padding:12px 15px; margin-bottom:22px; border:1px solid var(--border); border-left:3px solid var(--primary); border-radius:6px; background:var(--surface-soft); color:var(--muted); font-size:13px; line-height:1.7; }
.source-editor-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:22px 28px; }
.source-editor-field { display:flex; flex-direction:column; align-items:stretch; min-width:0; position:relative; }
.source-editor-field>label { font-size:13px; font-weight:600; line-height:1.7; margin-bottom:8px; padding-right:42px; }
.source-editor-field>.input,.source-editor-field>.select,.source-editor-field>textarea { max-width:none; width:100%; font-size:13px; min-height:40px; }
.source-editor-field>textarea { min-height:96px; resize:vertical; padding:10px 12px; border:1px solid var(--border); border-radius:6px; color:var(--text); background:var(--surface); font:inherit; line-height:1.7; }
.source-editor-clear { position:absolute; top:0; right:0; border:0; padding:3px 0; background:none; color:var(--muted); font-size:12px; }
.source-editor-clear:hover { color:var(--danger); }
.source-editor-options { display:flex; align-items:flex-start; flex-wrap:wrap; gap:9px 18px; padding:11px 12px; border:1px solid var(--border); border-radius:6px; min-height:44px; }
.source-editor-options label,.source-editor-check { display:flex; gap:8px; align-items:center; font-size:13px; line-height:1.7; cursor:pointer; }
.source-editor-options input,.source-editor-check input { width:18px; height:18px; flex:none; accent-color:var(--primary); margin:0; }
.source-editor-value { min-height:40px; padding:10px 12px; background:var(--surface-soft); border-radius:6px; line-height:1.8; font-size:13px; overflow-wrap:anywhere; white-space:pre-wrap; }
.source-editor .modal-footer>div:first-child { min-width:0; }
#source-editor-count { font-size:12px; color:var(--muted); }
.source-editor .modal-message { margin-top:5px; line-height:1.7; }
.source-editor .modal-footer .actions { flex:none; }
.task-sync-wide { width:min(1240px,calc(100vw - 64px)); }
.task-sync-wide #modal-content { position:relative; }
.task-sync-panel { line-height:1.6; }
.task-sync-row-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:20px; margin-bottom:16px; }
.task-sync-row-heading h2 { margin-bottom:4px; }
.task-sync-row-heading .badge { flex:none; }
.task-sync-empty { padding:28px 20px; margin:16px 0; border:1px solid var(--border); border-radius:7px; color:var(--muted); }
.task-sync-boundary { margin:20px 0 0; color:var(--muted); font-size:12px; }
.task-sync-notice { padding:12px 16px; background:var(--surface-soft); border-left:3px solid var(--border); margin:16px 0; font-size:13px; }
.task-sync-notice.needs-attention { border-left-color:var(--danger); }
.task-sync-toolbar { display:flex; align-items:flex-end; gap:12px; }
.task-sync-toolbar .field { flex:1; max-width:540px; }
.task-sync-toolbar .button { min-height:38px; }
.task-sync-preview-tools { display:flex; align-items:flex-end; justify-content:space-between; gap:16px; margin:24px 0 16px; }
.task-sync-preview-tools>span { color:var(--muted); font-size:12px; padding-bottom:8px; }
.task-sync-search { display:grid; gap:6px; max-width:360px; flex:1; font-size:12px; }
.task-sync-map-head { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 82px; gap:24px; color:var(--muted); font-size:12px; padding:0 18px 8px; }
.task-sync-map-head span:first-child { padding-left:32px; }
.task-sync-map-list { display:grid; gap:10px; }
.task-sync-map-row { border:1px solid var(--border); border-radius:8px; padding:18px; background:var(--surface); }
.task-sync-map-row.selected { border-color:var(--primary); }
.task-sync-map-main { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr) 82px; gap:24px; align-items:start; }
.task-sync-select-task { display:flex; align-items:flex-start; gap:12px; cursor:pointer; min-width:0; }
.task-sync-select-task input { margin:3px 0 0; width:18px; height:18px; flex:none; accent-color:var(--primary); }
.task-sync-select-task strong { display:block; font-size:14px; overflow-wrap:anywhere; font-weight:600; }
.task-sync-select-task small { display:block; color:var(--muted); font-size:12px; margin-top:6px; }
.task-sync-record-choice { min-width:0; }
.task-sync-record-choice>label:not(.task-sync-owner-label) { position:absolute; width:1px; height:1px; overflow:hidden; clip-path:inset(50%); }
.task-sync-record-choice .select { width:100%; min-width:0; text-overflow:ellipsis; }
.task-sync-owner-label { display:block; margin:12px 0 6px; color:var(--muted); font-size:12px; }
.task-sync-match { color:var(--muted); font-size:12px; text-align:right; white-space:nowrap; padding-top:8px; }
.task-sync-issues { margin:12px 0 0 32px; padding-left:18px; font-size:12px; color:var(--muted); }
.task-sync-issues li+li { margin-top:3px; }
.task-sync-differences { margin:12px 0 0 32px; }
.task-sync-differences>summary { cursor:pointer; font-size:12px; color:var(--primary); padding:5px 0; }
.task-sync-diff { overflow-x:auto; margin-top:12px; border:1px solid var(--border); border-radius:6px; }
.task-sync-diff table { border-collapse:collapse; width:100%; table-layout:fixed; font-size:13px; }
.task-sync-diff th,.task-sync-diff td { padding:10px 12px; text-align:left; border-bottom:1px solid var(--border-soft); vertical-align:top; white-space:pre-wrap; overflow-wrap:anywhere; }
.task-sync-diff tr:last-child td,.task-sync-diff tr:last-child th { border-bottom:0; }
.task-sync-diff thead th { color:var(--muted); font-size:12px; font-weight:400; }
.task-sync-diff th:first-child { width:24%; font-weight:500; }
.task-sync-no-change { margin:8px 0; color:var(--muted); font-size:12px; }
.task-sync-linked-list { border:1px solid var(--border); border-radius:8px; overflow:hidden; }
.task-sync-linked-row { width:100%; display:flex; gap:18px; align-items:center; padding:16px 18px; background:var(--surface); text-align:left; border:0; border-bottom:1px solid var(--border-soft); }
.task-sync-linked-row:last-child { border-bottom:0; }
.task-sync-linked-row:hover { background:var(--surface-soft); }
.task-sync-linked-row>span:first-child { flex:1; min-width:0; }
.task-sync-linked-row strong { display:block; font-size:14px; font-weight:500; overflow-wrap:anywhere; }
.task-sync-linked-row small { display:block; font-size:12px; color:var(--muted); margin-top:5px; }
.task-sync-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:18px 24px; padding:20px; border:1px solid var(--border); border-radius:8px; margin:0; }
.task-sync-facts dt { font-size:12px; color:var(--muted); margin-bottom:5px; }
.task-sync-facts dd { margin:0; overflow-wrap:anywhere; }
.task-sync-conflicts { margin-top:24px; }
.task-sync-conflicts>p { color:var(--muted); font-size:13px; margin:6px 0; }
.task-sync-summary .task-sync-row-heading { margin-bottom:6px; }
.task-sync-summary>.button { margin-top:12px; }
.task-execution-label { display:block; color:var(--muted); font-size:11px; line-height:1.5; margin-top:5px; }
@media(max-width:700px) {
  .task-sync-preview-tools { flex-wrap:wrap; align-items:center; gap:12px; }
  .task-sync-search { max-width:none; flex-basis:100%; }
  .task-sync-preview-tools>span { padding:0; }
  .task-sync-map-head { display:none; }
  .task-sync-map-main { grid-template-columns:minmax(0,1fr); gap:12px; }
  .task-sync-map-row { padding:16px; }
  .task-sync-match { display:none; }
  .task-sync-record-choice { padding-left:30px; }
  .task-sync-record-choice>label:not(.task-sync-owner-label) { position:static; clip-path:none; width:auto; height:auto; font-size:12px; color:var(--muted); display:block; margin-bottom:6px; }
  .task-sync-issues,.task-sync-differences { margin-left:30px; }
  .task-sync-facts { grid-template-columns:1fr; padding:16px; }
  .task-sync-toolbar { align-items:stretch; flex-direction:column; }
  .task-sync-toolbar .field { max-width:none; }
  .task-sync-diff th,.task-sync-diff td { padding:8px; font-size:12px; }
  .task-sync-linked-row { flex-wrap:wrap; gap:8px; padding:16px; }
  .task-sync-linked-row>span:first-child { flex-basis:100%; }
}
@media (max-width:700px) {
  .source-editor-grid { grid-template-columns:minmax(0,1fr); gap:22px; }
  .source-editor-field>.input,.source-editor-field>.select,.source-editor-field>textarea { font-size:16px; min-height:44px; }
  .source-editor-options label,.source-editor-check { min-height:36px; }
}
.employee-overview-controls { margin-bottom:20px; padding:22px 24px 18px; }
.employee-overview-filters { display:grid; grid-template-columns:minmax(180px,1.25fr) repeat(3,minmax(160px,1fr)); gap:18px; }
.employee-overview-filters .field { gap:7px; }
.employee-overview-filters .input,.employee-overview-filters .select { width:100%; max-width:none; }
.employee-overview-filters .field>span { color:var(--muted); font-size:12px; font-weight:500; }
.employee-overview-display { display:flex; align-items:center; justify-content:space-between; flex-wrap:wrap; gap:12px 20px; padding-top:18px; margin-top:18px; border-top:1px solid var(--border); }
.overview-heading-actions { display:flex; align-items:center; justify-content:flex-end; gap:14px; flex-wrap:wrap; }
.overview-heading-actions > .button { white-space:nowrap; }
.overview-people-count { font-size:28px; font-weight:650; white-space:nowrap; }
.overview-people-count small { font-size:13px; font-weight:400; color:var(--muted); }
.employee-group { margin-bottom:20px; }
.employee-group .panel-heading { border-bottom:1px solid var(--border); }

/* Personal approval inbox: a single work list, not a second dashboard or a global company inbox. */
.approvals-page { width:100%; min-width:0; }
.approvals-heading { margin-bottom:18px; }
.approvals-heading h1 { font-size:26px; }
.approvals-sync { display:flex; align-items:center; gap:16px; flex-wrap:wrap; margin:0 0 14px; color:var(--muted); font-size:12px; }
.approval-connection { display:inline-flex; align-items:center; gap:7px; }
.approval-connection::before { content:''; width:6px; height:6px; border-radius:50%; background:var(--muted); flex:none; }
.approval-connection.live::before { background:var(--success); }
.approvals-toolbar { display:flex; align-items:center; justify-content:space-between; gap:16px; padding:0 20px; border-bottom:1px solid var(--border); }
.approvals-tabs { display:flex; gap:20px; }
.approvals-tabs .button { border:0; border-bottom:2px solid transparent; border-radius:0; min-height:52px; padding:12px 2px; color:var(--muted); background:none; }
.approvals-tabs .button.selected { color:var(--text); border-bottom-color:var(--text); font-weight:600; }
.approval-list { display:grid; }
.approval-row { display:grid; grid-template-columns:minmax(0,1fr) minmax(180px,240px) 70px; align-items:center; gap:24px; width:100%; padding:20px; border:0; border-bottom:1px solid var(--border-soft); background:var(--surface); text-align:left; }
.approval-row:last-child { border-bottom:0; }
.approval-row:hover { background:var(--surface-soft); }
.approval-row-main,.approval-row-status { min-width:0; display:grid; justify-items:start; gap:7px; }
.approval-row strong { font-size:14px; font-weight:600; overflow-wrap:anywhere; }
.approval-row small { color:var(--muted); font-size:12px; line-height:1.6; overflow-wrap:anywhere; }
.approval-row-open { font-size:12px; text-align:right; color:var(--primary); white-space:nowrap; }
.approvals-state { padding:24px; }
.approvals-state h2 { font-size:16px; margin:0 0 9px; }
.approvals-state p { max-width:70em; color:var(--muted); margin:8px 0 0; }
.approvals-coverage { color:var(--muted); font-size:12px; margin:16px 0 0; line-height:1.7; }
.approval-message { margin:0 0 14px; padding:12px 16px; background:var(--surface); border:1px solid var(--border); border-radius:7px; line-height:1.7; overflow-wrap:anywhere; }
.approval-message.error { border-left:3px solid var(--danger); }
.approval-detail h2 { overflow-wrap:anywhere; }
.approval-detail .panel-body { padding:24px; }
.approval-facts { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:20px; margin:0 0 24px; }
.approval-facts dt,.approval-form-fields dt { color:var(--muted); font-size:12px; margin-bottom:7px; line-height:1.6; }
.approval-facts dd,.approval-form-fields dd { margin:0; line-height:1.7; overflow-wrap:anywhere; }
.approval-reason { padding:18px; background:var(--surface-soft); border-radius:7px; margin-bottom:24px; }
.approval-reason p { white-space:pre-wrap; overflow-wrap:anywhere; margin:8px 0 0; }
.approval-scopes { margin-bottom:16px; }
.approval-project-link { padding:18px; border:1px solid var(--border); border-radius:7px; margin:0 0 24px; }
.approval-project-link h3 { margin:0 0 12px; font-size:16px; }
.approval-project-link .actions { align-items:flex-end; flex-wrap:wrap; }
.approval-project-link .field { flex:1 1 220px; min-width:0; margin:0; }
.approval-project-link select { width:100%; }
.approval-project-link .subtitle { margin:12px 0 0; }
.approval-form-fields dl { margin:12px 0 24px; }
.approval-form-fields dl>div { display:grid; grid-template-columns:minmax(100px,180px) minmax(0,1fr); padding:14px 0; gap:20px; border-bottom:1px solid var(--border-soft); }
.approval-form-fields dt { margin:0; }.approval-form-fields dd { white-space:pre-wrap; }
.approval-decision { padding-top:20px; border-top:1px solid var(--border); }
.approval-decision .field>span small { font-size:12px; color:var(--muted); font-weight:400; margin-left:8px; }
.approval-decision textarea { min-height:92px; }
.approval-decision .actions { justify-content:flex-end; margin-top:16px; }
.approval-readonly { color:var(--muted); margin:16px 0 0; }
.approval-confirm,.approval-unknown { background:var(--surface-soft); padding:20px; border:1px solid var(--border); border-radius:7px; margin-top:20px; }
.approval-confirm h2,.approval-confirm h3 { font-size:16px; margin:0 0 8px; }
.approval-confirm p,.approval-unknown p { margin:8px 0 12px; white-space:pre-wrap; overflow-wrap:anywhere; }
.approval-confirm .actions { justify-content:flex-end; }
@media (max-width:1040px) {
  .approvals-heading h1 { font-size:24px; }
  .approval-row { grid-template-columns:minmax(0,1fr) minmax(150px,200px); gap:16px; }
  .approval-row-open { display:none; }
  .approval-facts { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width:640px) {
  .approvals-heading { flex-wrap:wrap; gap:14px; margin-bottom:14px; }
  .approvals-heading .actions { width:100%; justify-content:space-between; }
  .approvals-page .button { min-height:44px; }
  .approvals-heading .subtitle,.approvals-coverage,.approvals-sync,.approval-row small { font-size:12px; }
  .approvals-toolbar { padding:0 16px; gap:12px; flex-wrap:wrap; }
  .approvals-toolbar>.subtitle { padding-bottom:12px; width:100%; }
  .approvals-tabs .button { min-height:48px; }
  .approval-row { grid-template-columns:minmax(0,1fr); padding:18px 16px; gap:12px; }
  .approval-row-status { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
  .approval-row-status>.badge { flex:none; }
  .approvals-state,.approval-detail .panel-body { padding:20px 16px; }
  .approval-detail .panel-heading { align-items:flex-start; }
  .approval-detail .panel-heading>.button { flex:none; }
  .approval-facts { grid-template-columns:minmax(0,1fr); gap:16px; }
  .approval-form-fields dl>div { grid-template-columns:minmax(0,1fr); gap:6px; }
  .approval-reason,.approval-confirm,.approval-unknown { padding:16px; }
  .approval-decision .actions>.button { flex:1; }
}
.employee-group .employee-table { min-width:900px; }
.employee-group .employee-table th:first-child { width:24%; }
.employee-group .employee-table th:last-child { white-space:nowrap; }
.employee-group .employee-table td { border-bottom-color:var(--border); }
.employee-group .employee-table tr:last-child td { border-bottom:0; }
.employee-preview-button { white-space:nowrap; }
.employee-preview-banner { display:flex; align-items:center; justify-content:space-between; gap:20px; padding:17px 20px; margin-bottom:22px; border:1px solid var(--primary); border-left-width:4px; border-radius:8px; background:var(--surface); }
.employee-preview-banner>div { min-width:0; }
.employee-preview-banner strong { font-size:15px; font-weight:650; }
.employee-preview-banner p { color:var(--muted); font-size:12px; margin:7px 0 0; line-height:1.7; }
.employee-preview-banner>.button { flex:none; }
.preview-readonly-label { display:inline-block; margin-right:11px; padding:3px 7px; border-radius:4px; background:var(--primary-soft); color:var(--primary); font-size:11px; font-weight:600; vertical-align:1px; }
@media (max-width:1040px) {
  .employee-overview-controls { padding:17px; }
  .employee-overview-filters { grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
  .employee-overview-display { align-items:flex-start; }
  .employee-preview-banner { align-items:flex-start; flex-wrap:wrap; gap:12px; padding:15px; }
  .employee-preview-banner>.button { margin-left:auto; }
}
@media (max-width:600px) {
  .employee-overview-filters { grid-template-columns:minmax(0,1fr); }
  .employee-overview-display .sort { flex:1 1 100%; }
  .employee-overview-display .sort .segmented { flex:1; }
  .employee-preview-banner strong { display:block; margin-top:7px; }
}
.task-assignment-people{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin-bottom:12px}
.task-person-field{border:1px solid var(--border);border-radius:12px;padding:18px;background:var(--surface)}
.task-person-field h2{display:flex;align-items:center;justify-content:space-between;margin:0 0 16px;font-size:15px}
.task-person-field h2 small{font-size:11px;font-weight:400;color:var(--muted);background:var(--surface-soft);border-radius:5px;padding:3px 6px}
.task-person-selection{min-height:54px;margin-bottom:14px;display:flex;align-items:center}
.task-owner-field .task-person-selection{flex-wrap:wrap;gap:8px}
.task-owner-field .task-person-chip>span:first-child{display:grid;min-width:0}
.task-owner-field .task-person-chip [data-action="promote-task-owner"]{font-size:12px}
.task-review-people{margin-bottom:16px}
.task-review-people .task-person-selection{flex-wrap:wrap;gap:8px}
.review-comment-text{margin:6px 0;white-space:pre-wrap;overflow-wrap:anywhere}
.task-review-progress{padding:16px;border:1px solid var(--border);border-radius:8px;background:var(--surface-soft)}
.review-progress-summary,.review-person-status{display:flex;align-items:center;gap:10px 16px;flex-wrap:wrap}
.review-progress-summary{margin:0 0 10px;color:var(--muted)}
.review-progress-summary strong{color:var(--text)}
.review-verdict-picker{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 16px;padding:0;border:0}
.review-verdict-picker legend{margin-bottom:8px;font-weight:600}
.review-verdict-picker label{display:flex;align-items:center;gap:7px;min-height:42px;padding:8px 14px;border:1px solid var(--border);border-radius:7px;cursor:pointer}
.review-verdict-picker label:has(input:checked){border-color:var(--primary);background:var(--surface-soft)}
.review-verdict-picker input{accent-color:var(--primary)}
.task-person-chip{display:inline-flex;align-items:center;gap:10px;min-width:0;max-width:100%}
.task-person-chip>span:nth-child(2){display:grid;gap:4px;min-width:0}
.task-person-chip strong{font-size:14px;overflow-wrap:anywhere}
.task-person-chip small{font-size:12px;color:var(--muted)}
.task-person-chip .avatar{width:36px;height:36px;flex:none}
.task-person-chip .button{font-size:18px;min-height:30px;padding:2px 8px}
.task-person-field .field-hint{margin-bottom:0;font-size:12px}
.recent-people-dialog{width:min(460px,calc(100vw - 32px));max-height:calc(100dvh - 24px)}
.recent-people-dialog[open]{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:min(590px,calc(100dvh - 24px));overflow:hidden}
.recent-people-dialog>header,.recent-people-dialog>footer{display:flex;align-items:center;gap:12px;padding:16px 22px}
.recent-people-dialog>header{justify-content:space-between;border-bottom:1px solid var(--border)}
.recent-people-dialog>header h2{margin:0;font-size:18px}
.recent-people-body{overflow-y:auto;overscroll-behavior:contain;padding:15px 22px}
.recent-people-list{display:grid;gap:8px}
.project-permission-person-search{margin-bottom:12px}
.recent-people-option{display:flex;align-items:center;gap:10px;width:100%;min-height:52px;padding:8px 11px;text-align:left;background:var(--surface);color:var(--text);border:1px solid var(--border);border-radius:8px;cursor:pointer}
.recent-people-option[hidden]{display:none}
.recent-people-option:not(:disabled):hover,.recent-people-option:has(input:checked){background:var(--primary-soft);border-color:var(--primary)}
.recent-people-option:has(input:disabled){opacity:.52;cursor:not-allowed}
.recent-people-option input{flex:none;margin:0;accent-color:var(--primary)}
.recent-people-list.multiple [data-regular]::before{content:"";width:13px;flex:none}
.recent-people-option .avatar{width:30px;height:30px;flex:none}
.recent-people-name{display:grid;gap:2px;min-width:0;overflow-wrap:anywhere}
.recent-people-name strong{font-size:14px;font-weight:600}
.recent-people-name small{color:var(--muted);font-size:12px}
.recent-people-tag{margin-left:auto;flex:none;padding:2px 6px;border:1px solid var(--border);border-radius:5px;background:var(--surface-soft);color:var(--muted);font-size:11px;line-height:1.45}
.recent-people-dialog>footer{justify-content:flex-end;flex-wrap:wrap;border-top:1px solid var(--border);background:var(--surface-soft)}
.task-assignment-fields{border:0;padding:0;margin:22px 0;min-width:0}
.task-assignment-sync{padding:16px 18px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}
.task-assignment-sync>div{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.task-assignment-sync strong{font-size:14px}
.task-assignment-sync p{font-size:13px;line-height:1.7;margin:10px 0;color:var(--muted)}
.task-assignment-sync.linked{border-left:3px solid var(--primary)}
@media(max-width:600px){.task-assignment-people{grid-template-columns:1fr}.task-person-field{padding:15px}}
.task-sync-auto{padding:18px 20px;margin:0 0 22px;border:1px solid var(--border);border-left:3px solid var(--primary);border-radius:10px;background:var(--surface-soft)}
.task-sync-auto h2{margin:0;font-size:16px}
.task-sync-auto [role="status"]{margin:8px 0 0;color:var(--muted);font-size:13px}
.task-sync-auto-counts{display:flex;gap:22px;flex-wrap:wrap;margin:18px 0;font-size:13px;color:var(--muted)}
.task-sync-auto-counts strong{margin-left:5px;font-size:18px;font-variant-numeric:tabular-nums;color:var(--text)}
.task-sync-auto details{font-size:13px;margin:12px 0}
.task-sync-auto .field-hint{line-height:1.8}
.project-approval-entry{display:flex;align-items:center;justify-content:space-between;gap:24px;background:var(--surface-soft);border-radius:10px;padding:20px;margin:24px 0}
.project-approval-entry h2{font-size:16px;margin:0 0 8px}
.project-approval-entry p{font-size:13px;line-height:1.8;color:var(--muted);margin:0;max-width:620px}
.project-approval-entry>.button{flex:none}
.project-lifecycle-tabs{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 24px}
.project-lifecycle-tabs .button{min-height:42px;background:var(--surface)}
.project-lifecycle-tabs .button.selected{color:var(--primary);background:var(--primary-soft);border-color:var(--primary)}
.project-lifecycle-tabs .button span{margin-left:8px;font-variant-numeric:tabular-nums}
.project-stop-button{color:var(--danger);background:var(--surface-soft)}
.project-card-heading{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.project-state-section{margin-top:24px}
.project-state-section-title{display:flex;align-items:center;gap:10px;margin:0 0 14px;font-size:14px;color:var(--muted);font-weight:600}
.project-state-section-title span{font-variant-numeric:tabular-nums;font-weight:400}
:root{--project-stopped-bg:#f8eff0;--project-stopped-border:#d2aeb4;--project-stopped-accent:#98434f;--project-stopped-badge:#ecd9dd}
:root[data-resolved-theme="dark"]{--project-stopped-bg:#31282c;--project-stopped-border:#71515b;--project-stopped-accent:#e0a0aa;--project-stopped-badge:#51343e}
.project-card-terminated{background:var(--project-stopped-bg);border-color:var(--project-stopped-border)}
.project-card-terminated:hover{border-color:var(--project-stopped-accent)}
.project-card-terminated .project-bottom{border-color:var(--project-stopped-border)}
.project-card-terminated .progress>span{background:var(--project-stopped-accent)}
.project-status-terminated{color:var(--project-stopped-accent);background:var(--project-stopped-badge);font-weight:600}
#modal.project-is-terminated{border-color:var(--project-stopped-border)}
#modal.project-is-terminated .modal-head,#modal.project-is-terminated .modal-body,#modal.project-is-terminated .modal-footer{background:var(--project-stopped-bg)}
#modal.project-is-terminated .modal-head,#modal.project-is-terminated .modal-footer{border-color:var(--project-stopped-border)}
.project-terminated-note{border-left-color:var(--project-stopped-accent);background:var(--project-stopped-badge);color:var(--text)}
.project-terminated-note strong{color:var(--project-stopped-accent)}
.project-terminated-note strong{display:block;font-size:15px}
.project-terminated-note p{line-height:1.8;margin:8px 0 0}
.project-lifecycle-fields{padding:0;margin:0;border:0;min-width:0}
.project-lifecycle-body textarea{box-sizing:border-box;width:100%;min-height:110px;padding:12px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);font:inherit;line-height:1.7}
.project-lifecycle-body .callout p{line-height:1.8}
.project-lifecycle-delete-confirm{min-height:44px}
.recycled-project .button{margin-top:14px}

.project-delivery-progress { margin:18px 0 22px; padding:20px; background:var(--surface); border:1px solid var(--border); border-radius:10px; }
.project-delivery-heading { display:flex; gap:12px; align-items:baseline; justify-content:space-between; margin-bottom:16px; }
.project-delivery-heading h2 { margin:0; font-size:16px; }
.project-delivery-heading .actions { margin:0; }
.project-delivery-heading .actions>span,.project-gantt summary>span { color:var(--muted); font-size:12px; }
.project-delivery-numbers { display:grid; grid-template-columns:minmax(170px,1.2fr) minmax(0,1fr); gap:24px; align-items:center; margin:0 0 18px; }
.project-delivery-accepted strong { display:block; margin:0 0 8px; font-size:26px; font-variant-numeric:tabular-nums; }
.project-delivery-accepted strong small { font-size:13px; color:var(--muted); font-weight:500; }
.project-delivery-numbers dl { display:flex; gap:10px; margin:0; justify-content:space-around; }
.project-delivery-numbers dl>div { min-width:0; flex:1; padding-left:12px; border-left:1px solid var(--border-soft); }
.project-delivery-numbers dt { margin-bottom:3px; color:var(--muted); font-size:12px; }
.project-delivery-numbers dd { margin:0; font-size:20px; font-variant-numeric:tabular-nums; font-weight:600; }
.project-gantt { border:1px solid var(--border-soft); border-radius:8px; background:var(--surface); }
.project-gantt summary { display:flex; flex-wrap:wrap; align-items:center; gap:8px; min-height:43px; padding:10px 12px; cursor:pointer; }
.project-gantt summary::before { content:'›'; color:var(--muted); font-size:18px; line-height:1; }
.project-gantt[open] summary::before { transform:rotate(90deg); }
.project-gantt summary>span { margin-left:auto; }
.project-gantt-scroll { overflow:auto; max-height:300px; border-top:1px solid var(--border-soft); }
.project-gantt-table { background:var(--surface); width:100%; min-width:530px; border-spacing:0; table-layout:fixed; }
.project-gantt-table th,.project-gantt-table td { text-align:left; padding:7px 10px; border-bottom:1px solid var(--border-soft); }
.project-gantt-table th:first-child:not([colspan]) { width:33%; }
.project-gantt-table thead th { position:sticky; top:0; z-index:2; background:var(--surface-soft); color:var(--muted); font-size:11px; font-weight:500; }
.project-gantt-axis { display:flex; justify-content:space-between; gap:8px; font-variant-numeric:tabular-nums; }
.project-gantt-table .project-gantt-stage th { background:var(--surface-soft); color:var(--muted); font-size:12px; font-weight:600; }
.project-gantt-task { display:block; width:100%; padding:4px 0; background:transparent; border:0; text-align:left; }
.project-gantt-task strong { display:block; font-size:13px; overflow-wrap:anywhere; }
.project-gantt-task:hover strong { color:var(--primary); text-decoration:underline; }
.project-gantt-task small,.project-gantt-period { display:block; margin-top:3px; color:var(--muted); font-size:11px; font-weight:400; }
.project-gantt-track { position:relative; min-height:13px; border-radius:4px; background:var(--surface-soft); }
.project-gantt-bar { position:absolute; top:3px; bottom:3px; display:block; min-width:2px; border-radius:3px; background:var(--muted); }
.project-gantt-bar.complete { background:var(--success); }
.project-gantt-bar.running { background:var(--primary); }
.project-gantt-bar.review { background:#9b621e; }
:root[data-resolved-theme="dark"] .project-gantt-bar.review { background:#e7b066; }
.project-gantt-bar.overdue,.project-gantt-bar.returned { background:var(--danger); }
.project-gantt-today { position:absolute; z-index:1; inset-block:0; height:100%; border-left:1px dashed var(--text); }
.project-gantt-note { color:var(--muted); margin:10px 12px; font-size:12px; }
.portfolio-board { margin:0 0 22px; }
.portfolio-filter { display:flex; align-items:center; gap:12px; padding:0 20px 14px; }
.portfolio-filter label { color:var(--muted); white-space:nowrap; font-size:13px; }
.portfolio-filter input { width:280px; max-width:100%; min-width:0; }
.portfolio-empty { padding:16px 20px; margin:0; color:var(--muted); }
.portfolio-board header { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:10px; padding:16px 20px; }
.portfolio-board header p,.portfolio-key,.portfolio-board td small,.portfolio-board th small { color:var(--muted); font-size:12px; font-weight:400; }
.portfolio-board header p { margin:3px 0 0; }
.portfolio-key { display:flex; gap:16px; align-items:center; }
.portfolio-today-key::before { content:''; display:inline-block; height:11px; margin-right:6px; border-left:2px dashed var(--text); vertical-align:middle; }
.portfolio-scroll { overflow:auto; max-height:350px; }
.portfolio-board table { border-spacing:0; table-layout:fixed; width:100%; min-width:620px; font-variant-numeric:tabular-nums; }
.portfolio-board th,.portfolio-board td { text-align:left; padding:9px 16px; border-top:1px solid var(--border-soft); }
.portfolio-board thead th { position:sticky; top:0; z-index:2; background:var(--surface-soft); color:var(--muted); font-size:11px; font-weight:500; }
.portfolio-board th:first-child { width:30%; }
.portfolio-board thead th:last-child { width:112px; }
.portfolio-axis { display:flex; align-items:center; justify-content:space-between; }
.portfolio-name { border:0; background:none; padding:3px 0; text-align:left; font-size:13px; font-weight:600; overflow-wrap:anywhere; }
.portfolio-name:hover { color:var(--primary); text-decoration:underline; }
.portfolio-board td small,.portfolio-board tbody th small { display:block; margin-top:3px; }
.portfolio-board .danger-text { color:var(--danger); }
.portfolio-lane { position:relative; height:14px; border-radius:3px; background:var(--surface-soft); }
.portfolio-bar { position:absolute; inset-block:3px; min-width:2px; border-radius:3px; background:var(--primary); }
.portfolio-bar.stopped { background:var(--muted); }
.portfolio-today { position:absolute; inset-block:-2px; z-index:1; border-left:1px dashed var(--text); pointer-events:none; }
@media(max-width:600px) {
  .project-delivery-progress { padding:14px; }
  .project-delivery-numbers { grid-template-columns:minmax(0,1fr); gap:12px; }
  .project-delivery-numbers dl { padding-top:9px; border-top:1px solid var(--border-soft); }
  .project-delivery-numbers dl>div:first-child { padding-left:0; border:0; }
}

.approval-launch-fields{border:0;padding:0;margin:0;min-width:0}
.approval-launch-project{padding:18px 20px;margin-bottom:24px;border:1px solid var(--border);border-radius:9px;background:var(--surface-soft)}
.approval-launch-project .field-hint{margin-bottom:0}
.approval-launch-body .form-grid{margin-bottom:22px}
.approval-launch-body .field.full{grid-column:1/-1}
.approval-launch-body textarea{width:100%;box-sizing:border-box;min-height:96px;padding:12px;border:1px solid var(--border);border-radius:7px;background:var(--surface);color:var(--text);font:inherit;line-height:1.7;resize:vertical}
.approval-launch-body .complete-fields dd,.approval-launch-body .feedback-note{white-space:pre-wrap;overflow-wrap:anywhere}
.approval-launch-sent{margin-top:28px;padding-top:22px;border-top:1px solid var(--border)}
.approval-launch-sent h2{font-size:16px}
.approval-launch-sent .feedback-card{overflow-wrap:anywhere}
.approval-launch-body .approval-confirm{position:sticky;bottom:0;background:var(--surface);box-shadow:0 -8px 24px #00000012}
@media(max-width:640px){
 .project-approval-entry{align-items:stretch;flex-direction:column;padding:17px;gap:16px}
 .project-approval-entry>.button{width:100%;min-height:44px}
 .approval-launch-body .form-grid{grid-template-columns:minmax(0,1fr);gap:18px}
 .approval-launch-body .button{min-height:44px}
 .approval-launch-body .workstream-heading{flex-wrap:wrap;gap:12px}
}
.approval-form-fields .approval-field.is-table{display:block}.approval-field.is-table>dt{margin-bottom:12px}.approval-field dd{min-width:0}.approval-table-scroll{overflow:auto;max-width:100%;border:1px solid var(--border);border-radius:7px}.approval-table-scroll table{width:100%;border-collapse:collapse;white-space:normal}.approval-table-scroll th,.approval-table-scroll td{padding:10px 12px;border-bottom:1px solid var(--border-soft);min-width:90px;text-align:left;font-size:13px}.approval-table-scroll th{background:var(--surface-soft);font-weight:550}.approval-table-scroll th:first-child,.approval-table-scroll td:first-child{min-width:44px}.approval-files{list-style:none;margin:0;padding:0;display:grid;gap:8px}.approval-files li{display:flex;align-items:center;justify-content:space-between;gap:16px;border:1px solid var(--border);border-radius:7px;padding:10px 12px;background:var(--surface)}.approval-files strong{display:block;font-size:13px;overflow-wrap:anywhere;font-weight:500}.approval-files small{display:block;font-size:11px;color:var(--muted);margin-top:5px}.approval-files a{flex:none;text-decoration:none}
