.workspace-approvals-link { display: block; margin: 16px 24px; color: #cad2e2; font-size: 14px; line-height: 1.5; text-decoration: none; }
.workspace-approvals-link:hover { color: #fff; text-decoration: underline; }
:root {
  --ink: #171713;
  --muted: #6d6d63;
  --paper: #f3f1e9;
  --surface: #fbfaf5;
  --line: #d8d5ca;
  --accent: #d9ff57;
  --amber: #c66a16;
  --danger: #a83b2e;
  --success: #2f6b4f;
  --sidebar: 248px;
  --ease: cubic-bezier(.2,.8,.2,1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--paper); color: var(--ink); font-family: Inter, "Segoe UI", Arial, sans-serif; }
body { margin: 0; min-width: 320px; }
button, input, textarea, select { font: inherit; }
button { color: inherit; }

.login-screen {
  min-height: 100svh; display: grid; grid-template-columns: minmax(220px, .72fr) minmax(420px, 1.28fr);
  grid-template-rows: 1fr auto; background: var(--paper);
}
.login-brand {
  grid-row: 1 / 3; padding: 34px 30px; background: var(--ink); color: #f4f2e9;
  display: flex; flex-direction: column; justify-content: space-between; gap: 42px;
  font-size: clamp(32px, 4.8vw, 74px); font-weight: 760; letter-spacing: -.065em;
}
.login-brand strong { font: inherit; letter-spacing: inherit; }
.login-brand strong span { color: var(--accent); }
.login-brand small {
  max-width: 250px; color: #aeb7c8; font-size: 12px; font-weight: 700;
  line-height: 1.5; letter-spacing: .12em; text-transform: uppercase;
}
.login-panel { align-self: center; width: min(520px, calc(100% - 64px)); margin: 0 auto; }
.login-panel h1 { max-width: 480px; margin-bottom: 18px; }
.login-copy { max-width: 430px; margin-bottom: 38px; color: var(--muted); line-height: 1.55; }
.login-panel form { max-width: 430px; }
.login-meta { align-self: end; margin: 0; padding: 0 32px 28px; color: var(--muted); font-size: 12px; }

.app-shell { min-height: 100svh; display: grid; grid-template-columns: var(--sidebar) 1fr; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: var(--sidebar); z-index: 20;
  display: flex; flex-direction: column; padding: 28px 22px; color: #f4f2e9; background: var(--ink);
}
.brand {
  display: inline-flex; flex-wrap: wrap; align-items: baseline; justify-content: flex-start;
  column-gap: 0; color: inherit; text-decoration: none; letter-spacing: -.05em;
}
.brand-mark, .brand-name { flex: 0 0 auto; white-space: nowrap; }
.brand-mark { color: var(--accent); font-size: 29px; font-weight: 800; }
.brand-name { font-size: 28px; font-weight: 760; }
.brand-tagline, .brand-context {
  flex: 0 0 100%; margin-top: 3px; color: #7f899c; font-size: 8px; font-weight: 700;
  line-height: 1.35; letter-spacing: .105em; text-transform: uppercase;
}
.brand-context { color: #8c96a8; font-size: 9px; }
.nav-list { margin-top: 76px; display: grid; gap: 2px; }
.nav-item {
  position: relative; display: grid; grid-template-columns: 32px 1fr; align-items: center;
  width: 100%; padding: 13px 8px; border: 0; background: transparent; color: #a7a79e;
  text-align: left; cursor: pointer; transition: color .18s var(--ease), transform .18s var(--ease);
}
.nav-item::after { content: ""; position: absolute; right: -22px; width: 3px; height: 0; background: var(--accent); transition: height .24s var(--ease); }
.nav-item:hover, .nav-item:focus-visible { color: #fff; transform: translateX(2px); outline: none; }
.nav-item.is-active { color: #fff; }
.nav-item.is-active::after { height: 32px; }
.nav-index { color: #696961; font-size: 12px; letter-spacing: .12em; }
.sidebar-meta { margin-top: auto; display: grid; grid-template-columns: 9px 1fr; gap: 4px 10px; align-items: center; color: #aaa99e; font-size: 12px; }
.sidebar-meta small { grid-column: 2; color: #686860; }
.environment-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 5px rgba(217,255,87,.08); }

.workspace { grid-column: 2; padding: 32px 46px 56px; overflow: hidden; }
.workspace-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 28px; border-bottom: 1px solid var(--ink); }
.eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(32px, 4vw, 58px); font-weight: 650; letter-spacing: -.055em; line-height: .98; }
h2 { margin-bottom: 0; font-size: 21px; font-weight: 650; letter-spacing: -.025em; }
.header-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 14px 18px; }
.sync-label, .record-count { color: var(--muted); font-size: 12px; }
.text-link { color: var(--ink); font-size: 12px; font-weight: 680; text-decoration: none; border-bottom: 1px solid var(--ink); }
.user-label { color: var(--muted); font-size: 12px; }
.button { min-height: 42px; border: 1px solid var(--ink); padding: 0 18px; font-weight: 680; cursor: pointer; transition: transform .18s var(--ease), background .18s var(--ease); }
.button:hover { transform: translateY(-1px); }
.button-primary { background: var(--ink); color: #fff; }
.button-primary:hover { background: #35352d; }
.button-full { width: 100%; margin-top: 10px; }

.view { display: none; opacity: 0; transform: translateY(10px); }
.view.is-visible { display: block; animation: view-in .42s var(--ease) forwards; }
@keyframes view-in { to { opacity: 1; transform: translateY(0); } }
.metric-rail { display: grid; grid-template-columns: repeat(5, minmax(110px, 1fr)); border-bottom: 1px solid var(--line); }
.metric { min-height: 136px; padding: 25px 20px 20px 0; display: flex; flex-direction: column; justify-content: space-between; border-right: 1px solid var(--line); }
.metric + .metric { padding-left: 20px; }
.metric:last-child { border-right: 0; }
.metric span { color: var(--muted); font-size: 12px; }
.metric strong { font-size: clamp(34px, 4vw, 58px); font-weight: 550; letter-spacing: -.06em; }
.section-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding: 38px 0 16px; }
.section-heading.compact { padding-top: 0; }
.text-button { border: 0; padding: 8px 0; background: transparent; color: var(--muted); cursor: pointer; }
.text-button:hover { color: var(--ink); }

.table-wrap { overflow-x: auto; border-top: 1px solid var(--ink); }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th { padding: 12px 14px 12px 0; color: var(--muted); font-size: 12px; letter-spacing: .1em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--line); }
td { padding: 17px 14px 17px 0; border-bottom: 1px solid var(--line); font-size: 13px; vertical-align: top; }
tbody tr { transition: background .16s var(--ease), transform .16s var(--ease); }
tbody tr:hover { background: rgba(255,255,255,.55); }
.task-code { color: var(--muted); font-variant-numeric: tabular-nums; }
.task-title { display: block; max-width: 460px; font-weight: 680; }
.task-result { display: block; max-width: 460px; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.45; }
.status, .priority { display: inline-flex; align-items: center; min-height: 23px; padding: 0 8px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 750; letter-spacing: .06em; white-space: nowrap; }
.priority-critical { border-color: var(--danger); color: var(--danger); }
.priority-high { border-color: var(--amber); color: #8a4b0e; }
.status-in-progress, .status-review { border-color: #7e7e6e; }
.status-blocked, .status-expired { border-color: var(--danger); color: var(--danger); }
.status-done, .status-closed { border-color: var(--success); color: var(--success); }
.due-over { color: var(--danger); font-weight: 700; }

.overview-split { display: grid; grid-template-columns: .9fr 1.1fr; gap: 54px; padding-top: 48px; }
.plain-section { min-width: 0; }
.compact-tree, .structure-tree { border-top: 1px solid var(--ink); }
.tree-node { display: grid; grid-template-columns: 28px 1fr auto; align-items: center; gap: 12px; min-height: 49px; border-bottom: 1px solid var(--line); }
.tree-node .tree-mark { color: var(--muted); font-size: 12px; }
.tree-node .tree-name { font-size: 13px; font-weight: 640; }
.tree-node .tree-type { color: var(--muted); font-size: 12px; text-transform: uppercase; }
.tree-depth-1 { padding-left: 28px; }
.tree-depth-2 { padding-left: 56px; }
.tree-depth-3 { padding-left: 84px; }
.tree-depth-4 { padding-left: 112px; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 26px 0 14px; }
.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }
.filter { border: 1px solid var(--line); padding: 8px 12px; background: transparent; color: var(--muted); cursor: pointer; }
.filter.is-active, .filter:hover { border-color: var(--ink); color: var(--ink); }
.table-large td { padding-top: 21px; padding-bottom: 21px; }
.responsibility { display: grid; gap: 4px; }
.responsibility span:last-child { color: var(--muted); font-size: 12px; }

.work-toolbar { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(520px, 1.2fr); align-items: end; gap: 34px; padding: 26px 0 20px; border-bottom: 1px solid var(--line); }
.work-search { gap: 5px; }
.work-search .eyebrow { margin: 0; }
.work-search input { height: 38px; padding: 0 0 8px; font-size: 13px; }
.work-filter-group { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 6px; }
.work-filter { min-height: 36px; border: 1px solid transparent; padding: 0 11px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 650; cursor: pointer; transition: border-color .16s var(--ease), color .16s var(--ease), background .16s var(--ease); }
.work-filter:hover { border-color: var(--line); color: var(--ink); }
.work-filter.is-active { border-color: var(--ink); background: var(--ink); color: #fff; }
.work-discovery { margin-top: 14px; border-bottom: 1px solid var(--line); }
.work-discovery > summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 58px; padding: 8px 0; cursor: pointer; list-style: none; }
.work-discovery > summary::-webkit-details-marker { display: none; }
.work-discovery > summary > span:first-child { display: grid; gap: 3px; }
.work-discovery > summary strong { font-size: 15px; }
.work-discovery-summary-actions { display: flex; align-items: center; gap: 12px; }
.work-discovery-summary-actions .button { min-height: 34px; }
.work-discovery-toolbar { display: flex; gap: 4px; padding: 8px 0 12px; border-top: 1px solid var(--line); }
.work-discovery-layout { display: grid; grid-template-columns: minmax(280px,.8fr) minmax(430px,1.2fr); gap: 28px; padding: 0 0 20px; }
.work-discovery-list { display: grid; align-content: start; border-top: 1px solid var(--ink); }
.work-discovery-item { display: grid; gap: 5px; width: 100%; padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.work-discovery-item > span { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--muted); font-size: 11px; }
.work-discovery-item > span b { letter-spacing: .06em; }
.work-discovery-item > span i { font-style: normal; }
.work-discovery-item > strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.work-discovery-item small { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.work-discovery-item.is-selected { background: var(--ink); color: #fff; }
.work-discovery-item.is-selected small, .work-discovery-item.is-selected > span { color: #bfc6d4; }
.work-discovery-detail { min-width: 0; border-top: 1px solid var(--ink); padding-top: 12px; }
.work-discovery-detail > header { display: flex; justify-content: space-between; gap: 16px; align-items: start; }
.work-discovery-detail h3 { margin-top: 5px; font-size: 19px; line-height: 1.2; }
.discovery-facts { display: grid; grid-template-columns: repeat(3,1fr); margin: 14px 0; border-block: 1px solid var(--line); }
.discovery-facts div { padding: 10px; border-right: 1px solid var(--line); }
.discovery-facts div:last-child { border-right: 0; }
.discovery-facts dt { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; }
.discovery-facts dd { margin: 4px 0 0; font-size: 11px; line-height: 1.4; }
.discovery-copy { display: grid; gap: 5px; }
.discovery-copy p, .discovery-outcome p { margin: 0 0 10px; font-size: 12px; line-height: 1.5; white-space: pre-wrap; }
.discovery-outcome { display: grid; gap: 4px; margin-top: 12px; padding: 12px; border-left: 3px solid var(--accent); background: rgba(255,255,255,.45); }
.discovery-outcome small { color: var(--muted); font-size: 11px; }
.discovery-decision-form { grid-template-columns: 1fr 1fr; align-items: end; margin-top: 14px; padding: 14px; background: #ebe9df; }
.discovery-decision-form label:has(textarea), .discovery-decision-form .form-message { grid-column: 1 / -1; }
.discovery-decision-form button { justify-self: start; }
.work-layout { display: grid; grid-template-columns: minmax(330px, .76fr) minmax(520px, 1.24fr); gap: 34px; padding-top: 30px; }
.work-queue, .task-inspector { min-width: 0; }
.work-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid var(--ink); }
.work-section-head .eyebrow { margin-bottom: 5px; }
.work-section-head h2 { font-size: 18px; }
.work-list { display: grid; }
.work-item { position: relative; width: 100%; min-height: 94px; display: grid; grid-template-columns: 4px minmax(0, 1fr) auto; gap: 13px; padding: 15px 10px 15px 0; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--ink); text-align: left; cursor: pointer; transition: background .18s var(--ease), padding .18s var(--ease), transform .18s var(--ease); }
.work-item:hover { padding-left: 8px; background: rgba(255,255,255,.52); }
.work-item.is-selected { padding-left: 10px; background: var(--ink); color: #fff; }
.work-priority-mark { align-self: stretch; width: 3px; background: #b9b8ae; }
.work-priority-mark.priority-high { background: var(--amber); }
.work-priority-mark.priority-critical { background: var(--danger); }
.work-priority-mark.priority-low { background: #8f9d73; }
.work-item-copy { min-width: 0; display: grid; align-content: center; gap: 6px; }
.work-item-kicker { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.work-item-kicker .status { min-height: 19px; padding: 0 6px; font-size: 12px; }
.work-item-title { overflow: hidden; font-size: 13px; font-weight: 700; line-height: 1.25; text-overflow: ellipsis; white-space: nowrap; }
.work-item-meta { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.work-item-side { align-content: center; justify-items: end; display: grid; gap: 7px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.work-item.is-selected .work-item-kicker, .work-item.is-selected .work-item-meta, .work-item.is-selected .work-item-side { color: #b8b7ad; }
.work-item.is-selected .status { border-color: #686860; color: #fff; }
.task-inspector { position: sticky; top: 22px; align-self: start; min-height: 520px; max-height: calc(100svh - 44px); overflow-y: auto; padding: 0 8px 38px 0; border-top: 1px solid var(--ink); scrollbar-width: thin; }
.task-detail-empty { max-width: 460px; padding: 48px 0; }
.task-detail-empty h2 { margin-bottom: 10px; font-size: 28px; }
.task-detail-empty p:last-child { color: var(--muted); font-size: 12px; line-height: 1.55; }
.task-detail-loading { padding: 42px 0; color: var(--muted); font-size: 12px; }
.task-detail-head { display: grid; gap: 13px; padding: 19px 0 8px; }
.task-detail-kicker { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.task-detail-code { color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .08em; }
.task-detail-head h2, .task-identity h2 { max-width: 760px; font-size: clamp(24px, 2.4vw, 36px); line-height: 1.04; letter-spacing: -.045em; }
.task-detail-summary { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.task-identity { display: grid; gap: 13px; padding: 14px 0 18px; }
.task-title-band { display: grid; grid-template-columns: 56px minmax(0, 1fr); align-items: center; gap: 16px; margin-top: 3px; }
.task-visual-icon { width: 56px; height: 56px; display: grid; place-items: center; border-radius: 13px; background: #e9f4ff; color: #1777e8; }
.task-visual-icon .ui-icon { width: 27px; height: 27px; }
.task-title-band > div { min-width: 0; display: grid; gap: 7px; }
.task-case-summary { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 16px; border: 1px solid #dce9f7; border-radius: 12px; background: #f0f7ff; }
.task-case-summary > div { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; padding: 15px 18px; }
.task-case-summary > div + div { border-left: 1px solid #cddff2; }
.task-summary-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; background: #fff; color: #247fe6; }
.task-summary-icon .ui-icon { width: 21px; height: 21px; }
.task-case-summary > div > span:last-child { min-width: 0; display: grid; gap: 5px; }
.task-case-summary b { color: #61728d; font-size: 11px; font-weight: 760; letter-spacing: .06em; text-transform: uppercase; }
.task-case-summary strong { overflow-wrap: anywhere; color: #18243a; font-size: 12px; font-weight: 650; line-height: 1.4; }
.task-fact-panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.task-fact-panel { min-width: 0; padding: 16px 18px 8px; border: 1px solid #dfe6ef; border-radius: 12px; background: #fff; box-shadow: 0 6px 18px rgba(22, 43, 72, .035); }
.task-fact-panel > header { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 12px; padding-bottom: 10px; }
.task-panel-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 9px; background: #eaf5ff; color: #1879e8; }
.task-panel-icon .ui-icon { width: 21px; height: 21px; }
.task-fact-panel > header > span:last-child { display: grid; gap: 3px; }
.task-fact-panel h3 { margin: 0; color: #101a30; font-size: 15px; line-height: 1.2; }
.task-fact-panel header p { margin: 0; color: #7a879b; font-size: 11px; line-height: 1.35; }
.task-facts { display: grid; margin: 0; }
.task-facts div { min-width: 0; display: grid; grid-template-columns: minmax(106px, .48fr) minmax(0, 1fr); align-items: center; gap: 12px; min-height: 47px; padding: 9px 2px; border-bottom: 1px solid #e7ecf2; }
.task-facts div:last-child { border-bottom: 0; }
.task-facts dt { margin: 0; color: #718099; font-size: 10px; font-weight: 760; letter-spacing: .075em; text-transform: uppercase; }
.task-facts dd { min-width: 0; overflow-wrap: anywhere; margin: 0; color: #24324a; font-size: 12px; line-height: 1.4; }
.task-result-panel .task-deadline-fact { margin: 2px 0 5px; padding: 11px 12px; border: 1px solid #f2dfa8; border-radius: 9px; background: #fff9e9; }
.task-detail-section { padding: 22px 0 0; }
.task-detail-section + .task-detail-section { margin-top: 22px; border-top: 1px solid var(--line); }
.task-section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 13px; }
.task-section-head .eyebrow { margin: 0; }
.task-section-head span { color: var(--muted); font-size: 12px; }
.task-copy-block { display: grid; gap: 14px; }
.task-copy-block div { display: grid; gap: 5px; }
.task-copy-block span { color: var(--muted); font-size: 12px; font-weight: 720; letter-spacing: .08em; text-transform: uppercase; }
.task-copy-block p { margin: 0; font-size: 12px; line-height: 1.55; white-space: pre-wrap; }
.task-document-file { display:block; width:fit-content; max-width:100%; color:#6540d8; font-size:12px; overflow-wrap:anywhere; }
.actual-result { padding-left: 14px; border-left: 3px solid var(--accent); }
.task-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.task-action { min-height: 38px; border: 1px solid var(--ink); padding: 0 13px; background: transparent; font-size: 12px; font-weight: 690; cursor: pointer; transition: transform .16s var(--ease), background .16s var(--ease), color .16s var(--ease); }
.task-action:hover { transform: translateY(-1px); }
.task-action.is-primary { background: var(--ink); color: #fff; }
.task-action.is-danger { border-color: var(--danger); color: var(--danger); }
.transition-panel { display: grid; gap: 12px; margin-top: 13px; padding: 14px; background: #ebe9df; }
.transition-panel h3 { margin: 0; font-size: 14px; }
.transition-panel-actions { display: flex; justify-content: flex-end; gap: 9px; }
.compact-button { min-height: 35px; padding: 0 12px; font-size: 12px; }
.timer-panel { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.timer-state { display: grid; gap: 3px; }
.timer-state strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.timer-state span { color: var(--muted); font-size: 12px; }
.worklog-tools { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 12px; }
.inline-form { display: grid; gap: 13px; margin-top: 13px; padding: 14px; background: #ebe9df; }
.inline-form-grid { display: grid; grid-template-columns: 1fr 120px; gap: 14px; }
.worklog-list, .task-timeline { display: grid; margin-top: 13px; }
.worklog-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 11px 0; border-top: 1px solid var(--line); }
.worklog-copy { min-width: 0; display: grid; gap: 4px; }
.worklog-copy strong { font-size: 12px; }
.worklog-copy span { overflow: hidden; color: var(--muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.worklog-duration { font-size: 12px; font-weight: 720; white-space: nowrap; }
.timeline-event { position: relative; display: grid; grid-template-columns: 82px minmax(0, 1fr); gap: 14px; padding: 11px 0; border-top: 1px solid var(--line); }
.timeline-time { color: var(--muted); font-size: 12px; line-height: 1.45; }
.timeline-copy { min-width: 0; display: grid; gap: 4px; }
.timeline-copy strong { font-size: 12px; }
.timeline-copy span { color: var(--muted); font-size: 12px; line-height: 1.45; }
.comment-form { grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 12px; }
.comment-form label { gap: 4px; }
.comment-form .button { margin: 0; }
.routing-hint { margin: -8px 0 0; color: var(--muted); font-size: 12px; line-height: 1.5; }

.structure-intro, .activity-head { display: flex; justify-content: space-between; gap: 20px; padding: 28px 0 18px; color: var(--muted); font-size: 13px; }
.structure-intro p, .activity-head p { margin-bottom: 0; max-width: 660px; }
.structure-tree .tree-node { min-height: 64px; }

.activity-list { border-top: 1px solid var(--ink); }
.activity-item { display: grid; grid-template-columns: 154px minmax(180px, 1fr) 140px; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.activity-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.activity-copy strong { display: block; margin-bottom: 4px; font-size: 13px; }
.activity-copy span { color: var(--muted); font-size: 12px; }
.activity-actor { color: var(--muted); font-size: 12px; text-align: right; }
.compact-activity .activity-item { grid-template-columns: 1fr auto; }
.compact-activity .activity-time { display: none; }
.compact-activity .activity-item:nth-child(n+5) { display: none; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 30; background: rgba(23,23,19,.28); opacity: 0; transition: opacity .25s var(--ease); }
.drawer-backdrop.is-open { opacity: 1; }
.task-drawer {
  position: fixed; z-index: 40; top: 0; right: 0; width: min(560px, 100%); height: 100svh;
  padding: 30px 34px; overflow-y: auto; background: var(--surface); border-left: 1px solid var(--ink);
  transform: translateX(102%); transition: transform .34s var(--ease);
}
.task-drawer.is-open { transform: translateX(0); }
.drawer-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 34px; }
.icon-button { width: 40px; height: 40px; border: 1px solid var(--line); background: transparent; font-size: 26px; cursor: pointer; }
form { display: grid; gap: 18px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: 12px; font-weight: 650; letter-spacing: .03em; }
input, textarea, select { width: 100%; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; padding: 11px 0; background: transparent; color: var(--ink); outline: none; }
textarea { resize: vertical; line-height: 1.45; }
input:focus, textarea:focus, select:focus { border-bottom-color: var(--ink); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-message { min-height: 18px; color: var(--danger); font-size: 12px; }
.toast { position: fixed; z-index: 60; left: calc(var(--sidebar) + 32px); bottom: 24px; max-width: 420px; padding: 13px 16px; background: var(--ink); color: #fff; font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast.is-visible { opacity: 1; transform: translateY(0); }
.empty-state { padding: 36px 0; color: var(--muted); font-size: 13px; border-bottom: 1px solid var(--line); }

@media (max-width: 980px) {
  :root { --sidebar: 82px; }
  .sidebar { padding: 24px 14px; }
  .brand-name, .brand-tagline, .brand-context, .nav-item span:last-child, .sidebar-meta span:not(.environment-dot), .sidebar-meta small { display: none; }
  .nav-item { grid-template-columns: 1fr; justify-items: center; }
  .nav-index { font-size: 12px; }
  .sidebar-meta { grid-template-columns: 1fr; justify-items: center; }
  .workspace { padding: 28px 28px 46px; }
  .metric-rail { grid-template-columns: repeat(3, 1fr); }
  .metric:nth-child(3) { border-right: 0; }
  .metric:nth-child(n+4) { border-top: 1px solid var(--line); }
  .overview-split { grid-template-columns: 1fr; gap: 40px; }
  .work-toolbar { grid-template-columns: 1fr; gap: 14px; }
  .work-filter-group { justify-content: flex-start; }
  .work-layout { grid-template-columns: minmax(280px, .7fr) minmax(400px, 1.3fr); gap: 24px; }
  .work-discovery-layout { grid-template-columns: minmax(240px,.7fr) minmax(360px,1.3fr); gap: 20px; }
  .toast { left: calc(var(--sidebar) + 16px); }
}

@media (max-width: 640px) {
  :root { --sidebar: 0px; }
  .app-shell { display: block; }
  .sidebar { position: sticky; top: 0; width: 100%; height: 62px; padding: 0 16px; flex-direction: row; align-items: center; }
  .brand { margin-right: auto; }
  .brand-mark { font-size: 22px; }
  .nav-list { margin: 0; display: flex; }
  .nav-item { width: 44px; padding: 11px 6px; }
  .nav-item::after { right: 8px; bottom: -7px; width: 0; height: 2px; transition: width .2s var(--ease); }
  .nav-item.is-active::after { width: 28px; height: 2px; }
  .sidebar-meta { display: none; }
  .workspace { padding: 24px 16px 40px; }
  .workspace-header { align-items: flex-start; }
  .login-screen { display: block; padding-top: 0; }
  .login-brand { min-height: 112px; padding: 24px 18px; font-size: 36px; }
  .login-panel { width: auto; margin: 0; padding: 52px 18px 28px; }
  .login-meta { padding: 20px 18px; }
  h1 { font-size: 36px; }
  .sync-label { display: none; }
  .button { padding: 0 13px; }
  .metric-rail { grid-template-columns: repeat(2, 1fr); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-child(3) { border-right: 1px solid var(--line); }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric { min-height: 112px; }
  .metric strong { font-size: 38px; }
  .activity-item { grid-template-columns: 1fr auto; }
  .activity-time { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .work-filter-group { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .work-filter { flex: 0 0 auto; }
  .work-layout { display: block; }
  .work-discovery > summary { align-items: flex-start; }
  .work-discovery-summary-actions { align-items: flex-end; flex-direction: column; }
  .work-discovery-layout { display: block; }
  .work-discovery-detail { margin-top: 18px; }
  .discovery-facts, .discovery-decision-form { grid-template-columns: 1fr; }
  .discovery-facts div { border-right: 0; border-bottom: 1px solid var(--line); }
  .work-queue { margin-bottom: 28px; }
  .task-inspector { position: static; max-height: none; }
  .work-item { min-height: 86px; }
  .task-facts { grid-template-columns: 1fr; }
  .task-facts div:nth-child(even) { padding-left: 0; border-left: 0; }
  .comment-form { grid-template-columns: 1fr; }
  .inline-form-grid { grid-template-columns: 1fr; }
  .task-drawer { padding: 24px 20px; }
  .toast { left: 16px; right: 16px; bottom: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* The operational workspace follows the shared ТАКТ visual system. */
:root {
  --work-night: #07111f;
  --work-night-2: #0b1728;
  --work-canvas: #f7f8fc;
  --work-card: rgba(255, 255, 255, .92);
  --work-line: #e2e5ec;
  --work-copy: #0b1324;
  --work-muted: #70798c;
  --work-violet: #7440ec;
  --work-blue: #1599f5;
  --work-cyan: #12c6de;
  --work-lime: #b8f33f;
  --work-orange: #ed810c;
  --work-red: #de4e54;
  --work-shadow: 0 9px 24px rgba(16, 26, 46, .07), 0 2px 7px rgba(16, 26, 46, .04);
  --work-radius: 16px;
}

.ui-symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.ui-icon {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}

body:has(#app-shell:not([hidden])) {
  background: var(--work-night);
  color: var(--work-copy);
}

body:has(#app-shell:not([hidden])) .app-shell {
  min-height: 100svh;
  grid-template-columns: 270px minmax(0, 1fr);
  background: radial-gradient(circle at 12% 3%, #10223a 0, var(--work-night) 34%);
}

body:has(#app-shell:not([hidden])) .sidebar {
  width: 270px;
  padding: 35px 15px 28px;
  background: transparent;
  color: #f7f9ff;
}

body:has(#app-shell:not([hidden])) .sidebar .brand {
  padding: 0 10px;
}

body:has(#app-shell:not([hidden])) .sidebar .brand-mark {
  color: var(--work-lime);
  font-size: 31px;
}

body:has(#app-shell:not([hidden])) .sidebar .brand-name {
  font-size: 30px;
}

.workspace-nav-label {
  margin: 54px 14px 11px;
  color: #657085;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body:has(#app-shell:not([hidden])) .nav-list {
  gap: 6px;
  margin-top: 0;
}

body:has(#app-shell:not([hidden])) .nav-item {
  position: relative;
  grid-template-columns: 24px 30px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 54px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #bec5d2;
  transform: none;
}

body:has(#app-shell:not([hidden])) .nav-item .nav-index {
  color: #798397;
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .nav-item .ui-icon {
  width: 21px;
  height: 21px;
}

body:has(#app-shell:not([hidden])) .nav-item b {
  font-size: 14px;
  font-weight: 620;
  text-align: left;
}

body:has(#app-shell:not([hidden])) .nav-item::after {
  right: -1px;
  bottom: auto;
  width: 5px;
  height: 0;
  border-radius: 5px;
  background: var(--work-lime);
  box-shadow: 0 0 12px rgba(184, 243, 63, .35);
}

body:has(#app-shell:not([hidden])) .nav-item:hover {
  border-color: rgba(255, 255, 255, .12);
  background: rgba(255, 255, 255, .045);
  color: #fff;
  transform: none;
}

body:has(#app-shell:not([hidden])) .nav-item.is-active {
  border-color: rgba(184, 196, 219, .22);
  background: linear-gradient(100deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .025));
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}

body:has(#app-shell:not([hidden])) .nav-item.is-active::after {
  width: 5px;
  height: 27px;
}

.workspace-sidebar-foot {
  display: grid;
  gap: 12px;
  margin-top: auto;
}

.workspace-admin-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 42px;
  padding: 0 12px;
  border: 1px solid rgba(181, 194, 220, .17);
  border-radius: 10px;
  color: #c8cfdb;
  font-size: 12px;
  text-decoration: none;
  transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}

.workspace-admin-link:hover {
  border-color: rgba(184, 243, 63, .44);
  background: rgba(255, 255, 255, .04);
  color: #fff;
}

.sidebar-user-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) 30px;
  align-items: center;
  gap: 10px;
  min-height: 76px;
  padding: 10px 11px;
  border: 1px solid rgba(181, 194, 220, .22);
  border-radius: 12px;
  background: rgba(7, 17, 31, .5);
}

.sidebar-avatar {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--work-lime);
  border-radius: 50%;
  color: #fff;
  font-size: 13px;
  font-weight: 680;
  letter-spacing: .02em;
}

.sidebar-user-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.sidebar-user-copy strong,
.sidebar-user-copy small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy strong {
  color: #fff;
  font-size: 12px;
  font-weight: 650;
}

.sidebar-user-copy small {
  color: #8c96a8;
  font-size: 12px;
}

.sidebar-logout {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(181, 194, 220, .25);
  border-radius: 50%;
  background: transparent;
  color: #d3d8e1;
  cursor: pointer;
  font-size: 16px;
  transition: border-color .2s var(--ease), background .2s var(--ease);
}

.sidebar-logout:hover {
  border-color: var(--work-lime);
  background: rgba(184, 243, 63, .08);
}

body:has(#app-shell:not([hidden])) .workspace {
  position: relative;
  isolation: isolate;
  grid-column: 2;
  min-width: 0;
  min-height: 100svh;
  padding: 35px 34px 48px;
  border-radius: 18px 0 0 18px;
  background:
    radial-gradient(circle at 76% 45%, rgba(116, 64, 236, .055), transparent 25%),
    radial-gradient(circle at 98% 9%, rgba(21, 153, 245, .05), transparent 25%),
    var(--work-canvas);
  overflow: hidden;
}

body:has(#app-shell:not([hidden])) .workspace::before {
  content: "";
  position: fixed;
  z-index: -1;
  inset: 0 0 0 270px;
  border-radius: 18px 0 0 18px;
  background-image:
    linear-gradient(rgba(16, 34, 63, .018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 34, 63, .018) 1px, transparent 1px);
  background-size: 28px 28px;
  pointer-events: none;
}

body:has(#app-shell:not([hidden])) .workspace > * {
  position: relative;
  z-index: 1;
}

body:has(#app-shell:not([hidden])) .workspace-header {
  min-height: 86px;
  align-items: center;
  padding: 0 5px 24px;
  border: 0;
}

body:has(#app-shell:not([hidden])) .workspace-header .eyebrow {
  margin-bottom: 10px;
  color: #273cb8;
  font-size: 12px;
  letter-spacing: .18em;
}

body:has(#app-shell:not([hidden])) .workspace-header h1 {
  color: #071124;
  font-size: clamp(38px, 4.1vw, 58px);
  font-weight: 680;
  letter-spacing: -.058em;
}

body:has(#app-shell:not([hidden])) .header-actions {
  gap: 16px;
}

body:has(#app-shell:not([hidden])) .sync-label {
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 0 17px;
  border-color: #d9dde6;
  border-radius: 10px;
  line-height: 1;
}

body:has(#app-shell:not([hidden])) .button-primary {
  border: 0;
  background: linear-gradient(112deg, var(--work-violet), #5c4ff0 47%, var(--work-cyan));
  color: #fff;
  box-shadow: 0 7px 16px rgba(78, 83, 231, .2);
}

body:has(#app-shell:not([hidden])) .button-primary:hover {
  box-shadow: 0 10px 22px rgba(78, 83, 231, .28);
  filter: saturate(1.08);
  transform: translateY(-1px);
}

#open-task-drawer::before {
  content: "+";
  display: block;
  margin: 0;
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

body:has(#app-shell:not([hidden])) .metric-rail {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 13px;
  padding: 0 0 20px;
  border: 0;
}

body:has(#app-shell:not([hidden])) .metric {
  --metric-tone: var(--work-blue);
  min-height: 113px;
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr) 38px;
  grid-template-rows: auto auto;
  align-items: center;
  align-content: center;
  gap: 4px 12px;
  padding: 16px;
  border: 1px solid rgba(224, 227, 235, .9) !important;
  border-radius: 15px;
  background: var(--work-card);
  box-shadow: var(--work-shadow);
  animation: workspace-card-in .45s var(--ease) both;
}

body:has(#app-shell:not([hidden])) .metric:nth-child(2) { animation-delay: .035s; }
body:has(#app-shell:not([hidden])) .metric:nth-child(3) { animation-delay: .07s; }
body:has(#app-shell:not([hidden])) .metric:nth-child(4) { animation-delay: .105s; }
body:has(#app-shell:not([hidden])) .metric:nth-child(5) { animation-delay: .14s; }

.metric-violet { --metric-tone: var(--work-violet) !important; }
.metric-orange { --metric-tone: var(--work-orange) !important; }
.metric-red { --metric-tone: var(--work-red) !important; }
.metric-cyan { --metric-tone: var(--work-cyan) !important; }
.metric-green { --metric-tone: #63b82c !important; }

body:has(#app-shell:not([hidden])) .metric > span:not(.metric-icon) {
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  color: #667084;
  font-size: 12px;
  text-transform: none;
  letter-spacing: 0;
}

body:has(#app-shell:not([hidden])) .metric strong {
  grid-column: 2;
  grid-row: 2;
  align-self: start;
  color: var(--metric-tone);
  font-size: 31px;
  font-weight: 660;
  line-height: 1;
}

.metric-icon {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--metric-tone) 11%, white);
  color: var(--metric-tone);
}

.metric-icon .ui-icon {
  width: 27px;
  height: 27px;
}

.metric-trend {
  position: relative;
  grid-column: 3;
  grid-row: 1 / 3;
  width: 32px;
  height: 21px;
}

.metric-trend::before {
  content: "";
  position: absolute;
  inset: 5px 0 0;
  border-top: 2px solid var(--metric-tone);
  border-right: 2px solid var(--metric-tone);
  transform: skewY(-34deg) rotate(-4deg);
  opacity: .9;
}

body:has(#app-shell:not([hidden])) .section-heading {
  margin-top: 28px;
  padding-bottom: 13px;
  border-color: var(--work-line);
}

body:has(#app-shell:not([hidden])) .section-heading h2,
body:has(#app-shell:not([hidden])) .work-section-head h2,
body:has(#app-shell:not([hidden])) .task-inspector h2 {
  color: var(--work-copy);
  font-weight: 660;
  letter-spacing: -.025em;
}

body:has(#app-shell:not([hidden])) .eyebrow {
  color: #59657a;
  font-size: 12px;
  letter-spacing: .14em;
}

body:has(#app-shell:not([hidden])) .table-wrap,
body:has(#app-shell:not([hidden])) .plain-section,
body:has(#app-shell:not([hidden])) .work-toolbar,
body:has(#app-shell:not([hidden])) .work-queue,
body:has(#app-shell:not([hidden])) .task-inspector,
body:has(#app-shell:not([hidden])) #view-structure .structure-tree,
body:has(#app-shell:not([hidden])) #view-activity .activity-list {
  border: 1px solid var(--work-line);
  border-radius: var(--work-radius);
  background: rgba(255, 255, 255, .82);
  box-shadow: var(--work-shadow);
}

body:has(#app-shell:not([hidden])) .table-wrap {
  padding: 0 16px;
  overflow: auto;
}

body:has(#app-shell:not([hidden])) th {
  color: #667084;
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) td {
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .overview-split {
  gap: 16px;
  margin-top: 18px;
}

body:has(#app-shell:not([hidden])) .plain-section {
  padding: 0 18px 18px;
}

body:has(#app-shell:not([hidden])) .work-toolbar {
  gap: 16px;
  margin: 5px 0 18px;
  padding: 14px 15px 15px;
}

body:has(#app-shell:not([hidden])) .work-search input,
body:has(#app-shell:not([hidden])) .task-drawer input,
body:has(#app-shell:not([hidden])) .task-drawer select,
body:has(#app-shell:not([hidden])) .task-drawer textarea,
body:has(#app-shell:not([hidden])) .inline-form input,
body:has(#app-shell:not([hidden])) .inline-form select,
body:has(#app-shell:not([hidden])) .inline-form textarea,
body:has(#app-shell:not([hidden])) .comment-form textarea {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid #dce1e9;
  border-radius: 8px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .work-search input:focus,
body:has(#app-shell:not([hidden])) .task-drawer input:focus,
body:has(#app-shell:not([hidden])) .task-drawer select:focus,
body:has(#app-shell:not([hidden])) .task-drawer textarea:focus,
body:has(#app-shell:not([hidden])) .inline-form input:focus,
body:has(#app-shell:not([hidden])) .inline-form select:focus,
body:has(#app-shell:not([hidden])) .inline-form textarea:focus,
body:has(#app-shell:not([hidden])) .comment-form textarea:focus {
  border-color: color-mix(in srgb, var(--work-violet) 55%, #dce1e9);
  box-shadow: 0 0 0 3px rgba(116, 64, 236, .08);
}

body:has(#app-shell:not([hidden])) .work-filter-group {
  gap: 5px;
}

body:has(#app-shell:not([hidden])) .work-filter {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #657084;
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .work-filter:hover {
  border-color: #dce1e9;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .work-filter.is-active {
  border-color: #d9d2fb;
  background: #f0edff;
  color: #4b31c5;
}

body:has(#app-shell:not([hidden])) .work-layout {
  gap: 16px;
}

body:has(#app-shell:not([hidden])) .work-queue,
body:has(#app-shell:not([hidden])) .task-inspector {
  min-width: 0;
  padding: 18px;
}

body:has(#app-shell:not([hidden])) .task-inspector {
  top: 24px;
  max-height: calc(100svh - 48px);
}

body:has(#app-shell:not([hidden])) .work-section-head {
  margin-bottom: 12px;
  padding-bottom: 13px;
  border-color: var(--work-line);
}

body:has(#app-shell:not([hidden])) .record-count {
  padding: 5px 9px;
  border-radius: 999px;
  background: #f0f2f7;
  color: #687287;
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .work-list {
  gap: 7px;
}

body:has(#app-shell:not([hidden])) .work-item {
  min-height: 82px;
  padding: 13px 14px;
  border: 1px solid #e3e6ed;
  border-radius: 11px;
  background: rgba(255, 255, 255, .74);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), transform .2s var(--ease);
}

body:has(#app-shell:not([hidden])) .work-item:hover {
  border-color: #cfd5e2;
  box-shadow: 0 7px 15px rgba(16, 26, 46, .06);
  transform: translateY(-1px);
}

body:has(#app-shell:not([hidden])) .work-item.is-selected {
  border-color: #101d31;
  background: linear-gradient(105deg, #101a2d, #061120);
  color: #fff;
  box-shadow: 0 9px 20px rgba(7, 17, 31, .18);
}

body:has(#app-shell:not([hidden])) .work-item.is-warning:not(.is-selected) {
  border-color: #ead9aa;
  box-shadow: inset -3px 0 0 #d89b1d;
}

body:has(#app-shell:not([hidden])) .work-item.is-critical:not(.is-selected),
body:has(#app-shell:not([hidden])) .work-item.is-overdue:not(.is-selected) {
  border-color: #e9c1bc;
  box-shadow: inset -3px 0 0 #c74435;
}

body:has(#app-shell:not([hidden])) .work-item.is-selected .work-item-code,
body:has(#app-shell:not([hidden])) .work-item.is-selected .work-item-meta,
body:has(#app-shell:not([hidden])) .work-item.is-selected .work-item-date {
  color: #aeb8ca;
}

.deadline-alert {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 7px;
  color: #697488;
  line-height: 1.15;
}

.deadline-alert > i {
  width: 7px;
  height: 7px;
  flex: 0 0 7px;
  border-radius: 50%;
  background: currentColor;
}

.deadline-alert > span {
  display: grid;
  justify-items: end;
  gap: 3px;
}

.deadline-alert b { font-size: 12px; font-weight: 760; }
.deadline-alert small { font-size: 10px; font-weight: 680; white-space: nowrap; }
.deadline-alert.is-warning { color: #9a6800; }
.deadline-alert.is-critical,
.deadline-alert.is-overdue { color: #b93025; }

.deadline-alert.is-critical > i,
.deadline-alert.is-critical b {
  animation: task-attention-pulse 1.55s ease-in-out infinite;
}

.sla-waiting-signal {
  width: max-content;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 7px;
  border: 1px solid #e7cd86;
  border-radius: 999px;
  background: #fff8df;
  color: #7a5600;
  font-size: 10px;
  font-weight: 760;
  letter-spacing: .015em;
}

.sla-waiting-signal > i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #d49100;
  animation: task-attention-pulse 1.55s ease-in-out infinite;
}

.status-needs-attention {
  border-color: #d8a72e !important;
  color: #7a5600 !important;
  animation: task-status-pulse 1.55s ease-in-out infinite;
}

body:has(#app-shell:not([hidden])) .work-item.is-selected .deadline-alert.is-warning { color: #ffd76f; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .deadline-alert.is-critical,
body:has(#app-shell:not([hidden])) .work-item.is-selected .deadline-alert.is-overdue { color: #ff8e82; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .sla-waiting-signal {
  border-color: #6f5d25;
  background: #2b2514;
  color: #ffe194;
}

.task-deadline-fact.is-warning { background: #fffcf3; }
.task-deadline-fact.is-critical,
.task-deadline-fact.is-overdue { background: #fff8f7; }
.task-deadline-fact .deadline-alert { justify-content: flex-start; }
.task-deadline-fact .deadline-alert > span { justify-items: start; }

@keyframes task-attention-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .35; }
}

@keyframes task-status-pulse {
  0%, 100% { background-color: transparent; box-shadow: 0 0 0 0 rgba(212, 145, 0, 0); }
  50% { background-color: #fff3c7; box-shadow: 0 0 0 3px rgba(212, 145, 0, .10); }
}

@media (prefers-reduced-motion: reduce) {
  .deadline-alert.is-critical > i,
  .deadline-alert.is-critical b,
  .sla-waiting-signal > i,
  .status-needs-attention { animation: none !important; }
}

body:has(#app-shell:not([hidden])) .status-pill,
body:has(#app-shell:not([hidden])) .priority-pill,
body:has(#app-shell:not([hidden])) .task-chip {
  border-radius: 999px;
}

body:has(#app-shell:not([hidden])) .structure-intro,
body:has(#app-shell:not([hidden])) .activity-head {
  margin: 5px 0 14px;
  padding: 0 4px 13px;
  border-color: var(--work-line);
  color: var(--work-muted);
}

body:has(#app-shell:not([hidden])) #view-structure .structure-tree,
body:has(#app-shell:not([hidden])) #view-activity .activity-list {
  padding: 16px 18px;
}

body:has(#app-shell:not([hidden])) .activity-item {
  border-color: var(--work-line);
}

body:has(#app-shell:not([hidden])) .drawer-backdrop {
  background: rgba(5, 13, 25, .38);
  backdrop-filter: blur(3px);
}

body:has(#app-shell:not([hidden])) .task-drawer {
  max-width: min(560px, 100vw);
  padding: 30px 31px;
  border-radius: 18px 0 0 18px;
  background: #fbfcff;
  box-shadow: -18px 0 42px rgba(5, 14, 28, .18);
}

body:has(#app-shell:not([hidden])) .icon-button {
  border-color: #dce1e9;
  border-radius: 9px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .attachment-composer {
  display: grid;
  gap: 13px;
  margin: 0;
  padding: 15px;
  border: 1px solid #dfe3eb;
  border-radius: 11px;
  background: #f7f8fc;
}

body:has(#app-shell:not([hidden])) .attachment-composer legend {
  padding: 0 7px;
  color: var(--work-copy);
  font-size: 12px;
  font-weight: 700;
}

body:has(#app-shell:not([hidden])) .attachment-composer p,
body:has(#app-shell:not([hidden])) .attachment-hint {
  margin: 0;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.5;
}

body:has(#app-shell:not([hidden])) .attachment-input input[type="file"] {
  padding: 6px;
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-input input[type="file"]::file-selector-button {
  min-height: 32px;
  margin-right: 10px;
  padding: 0 11px;
  border: 1px solid #d8dde7;
  border-radius: 7px;
  background: #fff;
  color: var(--work-copy);
  font-weight: 650;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .attachment-group + .attachment-group {
  margin-top: 24px;
  padding-top: 22px;
  border-top: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .attachment-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

body:has(#app-shell:not([hidden])) .attachment-group-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body:has(#app-shell:not([hidden])) .attachment-group-head strong {
  color: var(--work-copy);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-group-head span {
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-list {
  display: grid;
  gap: 6px;
}

body:has(#app-shell:not([hidden])) .attachment-row {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) minmax(105px, auto) 22px;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 8px 10px;
  border: 1px solid #e2e6ee;
  border-radius: 9px;
  background: rgba(255, 255, 255, .76);
  color: var(--work-copy);
  text-decoration: none;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .attachment-row:hover {
  border-color: #cbd3e2;
  background: #fff;
  transform: translateY(-1px);
}

body:has(#app-shell:not([hidden])) .attachment-kind {
  display: grid;
  place-items: center;
  min-height: 31px;
  border-radius: 7px;
  background: #efedff;
  color: #5b3fd2;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .06em;
}

body:has(#app-shell:not([hidden])) .attachment-copy,
body:has(#app-shell:not([hidden])) .attachment-author {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body:has(#app-shell:not([hidden])) .attachment-copy strong,
body:has(#app-shell:not([hidden])) .attachment-copy small,
body:has(#app-shell:not([hidden])) .attachment-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) .attachment-copy strong {
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-copy small,
body:has(#app-shell:not([hidden])) .attachment-author,
body:has(#app-shell:not([hidden])) .attachment-author small {
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-author {
  justify-items: end;
}

body:has(#app-shell:not([hidden])) .attachment-open {
  color: #6f5ee4;
  font-size: 15px;
}

body:has(#app-shell:not([hidden])) .attachment-empty {
  padding: 13px 0;
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .attachment-form h3 {
  margin: 0;
  color: var(--work-copy);
  font-size: 13px;
}

body:has(#app-shell:not([hidden])) .task-parent-link {
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: transparent;
  color: #6753d8;
  font-size: 12px;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .task-parent-link:hover { color: var(--work-violet); }

body:has(#app-shell:not([hidden])) .task-lifecycle {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  padding: 14px 12px 12px;
  border: 1px solid #e1e5ed;
  border-radius: 12px;
  background: #f7f8fb;
}

body:has(#app-shell:not([hidden])) .lifecycle-step {
  position: relative;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 7px;
  color: #8991a0;
}

body:has(#app-shell:not([hidden])) .lifecycle-step:not(:last-child)::after {
  content: "";
  position: absolute;
  z-index: 0;
  top: 13px;
  left: calc(50% + 13px);
  width: calc(100% - 26px);
  height: 3px;
  border-radius: 99px;
  background: #dfe3e9;
  transition: background .3s var(--ease);
}

body:has(#app-shell:not([hidden])) .lifecycle-step.is-complete:not(:last-child)::after {
  background: #64bd36;
}

body:has(#app-shell:not([hidden])) .lifecycle-marker {
  position: relative;
  z-index: 1;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 2px solid #dfe3e9;
  border-radius: 50%;
  background: #fff;
  color: #8c94a3;
  font-size: 12px;
  font-weight: 800;
  transition: border-color .24s var(--ease), background .24s var(--ease), color .24s var(--ease), transform .24s var(--ease);
}

body:has(#app-shell:not([hidden])) .lifecycle-step.is-complete { color: #468d2b; }
body:has(#app-shell:not([hidden])) .lifecycle-step.is-complete .lifecycle-marker {
  border-color: #64bd36;
  background: #64bd36;
  color: #fff;
}

body:has(#app-shell:not([hidden])) .lifecycle-step.is-current { color: #8e6500; }
body:has(#app-shell:not([hidden])) .lifecycle-step.is-current .lifecycle-marker {
  border-color: #efb62d;
  background: #ffd76f;
  color: #654500;
  box-shadow: 0 0 0 5px rgba(239, 182, 45, .14);
  transform: scale(1.04);
}

body:has(#app-shell:not([hidden])) .lifecycle-label {
  overflow: hidden;
  max-width: 100%;
  font-size: 12px;
  font-weight: 720;
  line-height: 1.25;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) .mini-lifecycle {
  width: min(176px, 100%);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3px;
}

body:has(#app-shell:not([hidden])) .mini-lifecycle i {
  height: 3px;
  border-radius: 99px;
  background: #dfe3e9;
  transition: background .24s var(--ease), transform .24s var(--ease);
}

body:has(#app-shell:not([hidden])) .mini-lifecycle i.is-complete { background: #64bd36; }
body:has(#app-shell:not([hidden])) .mini-lifecycle i.is-current { background: #efb62d; transform: scaleY(1.5); }
body:has(#app-shell:not([hidden])) .work-item.is-selected .mini-lifecycle i.is-upcoming { background: #394358; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .mini-lifecycle i.is-complete { background: #70cf45; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .mini-lifecycle i.is-current { background: #ffd05a; }

body:has(#app-shell:not([hidden])) .project-badge {
  min-height: 21px;
  display: inline-flex;
  align-items: center;
  padding: 0 7px;
  border: 1px solid #bfe9ef;
  border-radius: 999px;
  background: #eafafd;
  color: #087f91;
  font-size: 10px;
  font-weight: 760;
}
body:has(#app-shell:not([hidden])) button.project-badge { cursor: pointer; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .project-badge { border-color: #3d6471; background: #123541; color: #7fe7f4; }
body:has(#app-shell:not([hidden])) .project-progress { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 14px 0; border-block: 1px solid var(--work-line); color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .project-progress span b { color: var(--work-copy); font-size: 18px; }
body:has(#app-shell:not([hidden])) .project-progress i { height: 6px; overflow: hidden; border-radius: 99px; background: #e4e8ef; }
body:has(#app-shell:not([hidden])) .project-progress i b { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #7046ef, #13bddd); transition: width .35s var(--ease); }
body:has(#app-shell:not([hidden])) .project-source { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .project-source a { color: #6753d8; }
body:has(#app-shell:not([hidden])) .project-stage-list { display: grid; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .project-stage-list article { display: grid; grid-template-columns: 36px minmax(0,1fr) auto; align-items: center; gap: 12px; min-height: 62px; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .project-stage-index { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: #efedff; color: #6848dd; font-size: 11px; font-weight: 800; }
body:has(#app-shell:not([hidden])) .project-stage-list article > span { min-width: 0; display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .project-stage-list strong { color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .project-stage-list small { color: var(--work-muted); font-size: 11px; }
body:has(#app-shell:not([hidden])) .project-stage-list article > span:last-child { justify-items: end; }

/* Project inspector uses the same light passport language as the task card. */
body:has(#app-shell:not([hidden])) .project-detail-content {
  min-width: 0;
  padding: 18px;
  color: var(--work-copy);
  animation: workspace-card-in .28s var(--ease);
}

body:has(#app-shell:not([hidden])) .project-detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 10px;
}

body:has(#app-shell:not([hidden])) .project-detail-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body:has(#app-shell:not([hidden])) .project-code-chip,
body:has(#app-shell:not([hidden])) .project-detail-kicker .status {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  background: #fff;
  color: #647188;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

body:has(#app-shell:not([hidden])) .project-command-bar {
  position: sticky;
  z-index: 7;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #d9e4f0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(17, 39, 68, .08);
  backdrop-filter: blur(8px);
}

body:has(#app-shell:not([hidden])) .project-command-primary {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body:has(#app-shell:not([hidden])) .project-command-bar .task-action {
  min-height: 34px;
  padding-inline: 12px;
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #fff;
  color: #283750;
}

body:has(#app-shell:not([hidden])) .project-command-bar .task-action:hover {
  border-color: #8fbced;
  background: #f3f8ff;
  color: #176fcf;
}

body:has(#app-shell:not([hidden])) .project-command-bar .task-action.is-primary {
  border-color: #1778e8;
  background: #1778e8;
  color: #fff;
  box-shadow: 0 5px 13px rgba(23, 120, 232, .16);
}

body:has(#app-shell:not([hidden])) .project-identity {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 14px 18px;
  border: 1px solid #dfe6ef;
  border-radius: 12px 12px 0 0;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .project-visual-icon,
body:has(#app-shell:not([hidden])) .project-panel-icon,
body:has(#app-shell:not([hidden])) .project-summary-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #eaf5ff;
  color: #1778e8;
}

body:has(#app-shell:not([hidden])) .project-visual-icon { width: 56px; height: 56px; }
body:has(#app-shell:not([hidden])) .project-visual-icon .ui-icon { width: 28px; height: 28px; }
body:has(#app-shell:not([hidden])) .project-identity h2 {
  margin: 0;
  color: #0e1830;
  font-size: clamp(22px, 2.2vw, 32px);
  line-height: 1.08;
  letter-spacing: -.035em;
}
body:has(#app-shell:not([hidden])) .project-identity p { margin: 6px 0 0; color: #6f7d93; font-size: 12px; line-height: 1.5; }

body:has(#app-shell:not([hidden])) .project-progress-panel {
  display: grid;
  grid-template-columns: auto minmax(120px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid #dfe6ef;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #f8fbff;
}

body:has(#app-shell:not([hidden])) .project-progress-value,
body:has(#app-shell:not([hidden])) .project-progress-caption { display: grid; gap: 1px; }
body:has(#app-shell:not([hidden])) .project-progress-value strong { color: #17233a; font-size: 21px; line-height: 1; }
body:has(#app-shell:not([hidden])) .project-progress-value span,
body:has(#app-shell:not([hidden])) .project-progress-caption span { color: #7a879b; font-size: 10px; }
body:has(#app-shell:not([hidden])) .project-progress-caption { justify-items: end; text-align: right; }
body:has(#app-shell:not([hidden])) .project-progress-caption strong { color: #34435d; font-size: 12px; }
body:has(#app-shell:not([hidden])) .project-progress-track { height: 7px; overflow: hidden; border-radius: 999px; background: #dfe7f1; }
body:has(#app-shell:not([hidden])) .project-progress-track i { display: block; height: 100%; border-radius: inherit; background: #1778e8; transition: width .35s var(--ease); }

body:has(#app-shell:not([hidden])) .project-fact-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

body:has(#app-shell:not([hidden])) .project-fact-panel {
  min-width: 0;
  padding: 15px 16px 6px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 43, 72, .035);
}

body:has(#app-shell:not([hidden])) .project-fact-panel > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e7ecf2;
}

body:has(#app-shell:not([hidden])) .project-panel-icon { width: 38px; height: 38px; }
body:has(#app-shell:not([hidden])) .project-panel-icon .ui-icon { width: 20px; height: 20px; }
body:has(#app-shell:not([hidden])) .project-fact-panel h3 { margin: 0; color: #111b30; font-size: 14px; }
body:has(#app-shell:not([hidden])) .project-fact-panel header p { margin: 2px 0 0; color: #8190a5; font-size: 10px; }

body:has(#app-shell:not([hidden])) .project-facts { margin: 0; }
body:has(#app-shell:not([hidden])) .project-facts > div {
  display: grid;
  grid-template-columns: minmax(92px, .48fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 42px;
  border-bottom: 1px solid #e9edf3;
}
body:has(#app-shell:not([hidden])) .project-facts > div:last-child { border-bottom: 0; }
body:has(#app-shell:not([hidden])) .project-facts dt { color: #77859a; font-size: 10px; font-weight: 780; letter-spacing: .045em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .project-facts dd { min-width: 0; margin: 0; color: #25334b; font-size: 11px; font-weight: 670; overflow-wrap: anywhere; }
body:has(#app-shell:not([hidden])) .project-period-fact { margin: 8px -7px 0; padding: 0 7px; border: 1px solid #f0d68c; border-radius: 8px; background: #fffaf0; }

body:has(#app-shell:not([hidden])) .project-result-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #d8e8f8;
  border-radius: 12px;
  background: #f3f9ff;
}
body:has(#app-shell:not([hidden])) .project-summary-icon { width: 42px; height: 42px; background: #fff; }
body:has(#app-shell:not([hidden])) .project-summary-icon .ui-icon { width: 21px; height: 21px; }
body:has(#app-shell:not([hidden])) .project-result-summary > div { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .project-result-summary > div > b { color: #52637d; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .project-result-summary strong { color: #17243b; font-size: 12px; line-height: 1.45; }
body:has(#app-shell:not([hidden])) .project-result-summary small { color: #718098; font-size: 10px; }
body:has(#app-shell:not([hidden])) .project-result-summary a { color: #176fcf; font-weight: 750; text-decoration: none; }

body:has(#app-shell:not([hidden])) .project-detail-section {
  margin-top: 12px;
  padding: 15px 16px 17px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 43, 72, .035);
}

body:has(#app-shell:not([hidden])) .project-detail-section > .task-section-head {
  align-items: center;
  min-height: 38px;
  margin-bottom: 10px;
  padding: 0 0 10px 11px;
  border-bottom: 1px solid #e7ecf2;
  border-left: 3px solid #69aaf2;
}
body:has(#app-shell:not([hidden])) .project-detail-section > .task-section-head .eyebrow { color: #111b30; font-size: 14px; font-weight: 760; letter-spacing: 0; text-transform: none; }
body:has(#app-shell:not([hidden])) .project-detail-section > .task-section-head span { color: #7a879b; font-size: 10px; }
body:has(#app-shell:not([hidden])) .project-detail-section .project-stage-list { border-top: 0; }
body:has(#app-shell:not([hidden])) .project-detail-section .workgroup-empty { padding: 18px; border: 1px dashed #cfdeed; border-radius: 9px; background: #fbfdff; text-align: center; }

@media (max-width: 1180px) {
  body:has(#app-shell:not([hidden])) .project-fact-panels { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .project-command-bar { position: static; align-items: flex-start; }
}

@media (max-width: 760px) {
  body:has(#app-shell:not([hidden])) .project-detail-content { padding: 12px; }
  body:has(#app-shell:not([hidden])) .project-command-bar { flex-direction: column; }
  body:has(#app-shell:not([hidden])) .project-command-primary { width: 100%; }
  body:has(#app-shell:not([hidden])) .project-identity { grid-template-columns: 44px minmax(0, 1fr); padding-inline: 12px; }
  body:has(#app-shell:not([hidden])) .project-visual-icon { width: 44px; height: 44px; }
  body:has(#app-shell:not([hidden])) .project-progress-panel { grid-template-columns: 1fr auto; }
  body:has(#app-shell:not([hidden])) .project-progress-track { grid-column: 1 / -1; grid-row: 2; }
}

body:has(#app-shell:not([hidden])) .task-section-head > div {
  min-width: 0;
  display: grid;
  gap: 4px;
}

body:has(#app-shell:not([hidden])) .task-section-head > div .eyebrow { margin: 0; }

body:has(#app-shell:not([hidden])) .checklist-empty {
  padding: 17px 0 3px;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.5;
}

body:has(#app-shell:not([hidden])) .checklist-overview {
  display: grid;
  grid-template-columns: auto minmax(140px, 1fr);
  align-items: center;
  gap: 14px;
  padding: 13px 0 12px;
}

body:has(#app-shell:not([hidden])) .checklist-progress-copy {
  display: grid;
  gap: 2px;
}

body:has(#app-shell:not([hidden])) .checklist-progress-copy strong {
  color: var(--work-copy);
  font-size: 18px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

body:has(#app-shell:not([hidden])) .checklist-progress-copy span {
  color: var(--work-muted);
  font-size: 12px;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) .checklist-progress-track {
  overflow: hidden;
  height: 5px;
  border-radius: 99px;
  background: #e2e6ec;
}

body:has(#app-shell:not([hidden])) .checklist-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #64bd36;
  transition: width .34s var(--ease);
}

body:has(#app-shell:not([hidden])) .checklist-list { border-top: 1px solid var(--work-line); }

body:has(#app-shell:not([hidden])) .checklist-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 9px 3px;
  border-bottom: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .checklist-toggle {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid #b8bfca;
  border-radius: 7px;
  background: #fff;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: border-color .18s var(--ease), background .18s var(--ease), transform .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .checklist-toggle:not(:disabled):hover { border-color: #64bd36; transform: scale(1.05); }
body:has(#app-shell:not([hidden])) .checklist-toggle:disabled { cursor: default; }
body:has(#app-shell:not([hidden])) .checklist-row.is-completed .checklist-toggle { border-color: #64bd36; background: #64bd36; }

body:has(#app-shell:not([hidden])) .checklist-copy {
  min-width: 0;
  display: grid;
  gap: 3px;
}

body:has(#app-shell:not([hidden])) .checklist-title {
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--work-copy);
  font-size: 12px;
  font-weight: 690;
  line-height: 1.4;
}

body:has(#app-shell:not([hidden])) .checklist-title em {
  padding: 2px 5px;
  border-radius: 99px;
  background: #fff2cf;
  color: #8a6200;
  font-size: 12px;
  font-style: normal;
  font-weight: 760;
  letter-spacing: .04em;
  text-transform: uppercase;
}

body:has(#app-shell:not([hidden])) .checklist-copy small {
  overflow: hidden;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) .checklist-copy .checklist-completed-by { color: #4f8f31; }
body:has(#app-shell:not([hidden])) .checklist-row.is-completed .checklist-title { color: #778090; text-decoration: line-through; text-decoration-color: #aab1bc; }

body:has(#app-shell:not([hidden])) .checklist-tools {
  display: flex;
  align-items: center;
  gap: 2px;
}

body:has(#app-shell:not([hidden])) .checklist-tools button {
  min-width: 25px;
  min-height: 27px;
  padding: 0 5px;
  border: 0;
  background: transparent;
  color: #6f7785;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .checklist-tools button:hover:not(:disabled) { color: var(--work-violet); }
body:has(#app-shell:not([hidden])) .checklist-tools button.is-danger:hover:not(:disabled) { color: var(--danger); }
body:has(#app-shell:not([hidden])) .checklist-tools button:disabled { opacity: .28; cursor: default; }

body:has(#app-shell:not([hidden])) .checklist-form {
  display: grid;
  gap: 12px;
  margin-top: 14px;
  padding: 15px 0 2px;
  border-top: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .checklist-form h3 { margin: 0; font-size: 14px; }

body:has(#app-shell:not([hidden])) .checklist-section {
  margin-top: 16px;
  padding: 16px 18px 18px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 43, 72, .035);
}

body:has(#app-shell:not([hidden])) .checklist-section .task-section-head {
  align-items: center;
  margin-bottom: 13px;
}

body:has(#app-shell:not([hidden])) .checklist-section .task-section-head > div {
  position: relative;
  padding-left: 50px;
}

body:has(#app-shell:not([hidden])) .checklist-section .task-section-head > div::before {
  content: "≡";
  position: absolute;
  left: 0;
  top: 0;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eaf5ff;
  color: #1879e8;
  font-size: 24px;
  font-weight: 500;
}

body:has(#app-shell:not([hidden])) .checklist-section .task-section-head .eyebrow {
  color: #101a30;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

body:has(#app-shell:not([hidden])) .checklist-section .task-action.is-primary {
  border-color: #1778e8;
  border-radius: 8px;
  background: #1778e8;
  box-shadow: 0 5px 13px rgba(23, 120, 232, .16);
}

body:has(#app-shell:not([hidden])) .checklist-section .checklist-empty {
  padding: 18px;
  border: 1px dashed #cfdeed;
  border-radius: 9px;
  background: #fbfdff;
  text-align: center;
}

/* The lower half of the task inspector follows the same light passport system. */
body:has(#app-shell:not([hidden])) .task-detail-content > .task-detail-section {
  margin-top: 16px;
  padding: 17px 18px 18px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 43, 72, .035);
}

body:has(#app-shell:not([hidden])) .task-detail-content > .task-detail-section + .task-detail-section {
  border-top: 1px solid #dfe6ef;
}

body:has(#app-shell:not([hidden])) .task-detail-content > section.task-detail-section:not(.checklist-section) > .task-section-head {
  align-items: center;
  min-height: 40px;
  margin-bottom: 14px;
  padding: 0 0 12px 12px;
  border-bottom: 1px solid #e7ecf2;
  border-left: 3px solid #69aaf2;
}

body:has(#app-shell:not([hidden])) .task-detail-content > section.task-detail-section:not(.checklist-section) > .task-section-head .eyebrow {
  color: #111b30;
  font-size: 15px;
  font-weight: 760;
  letter-spacing: 0;
  text-transform: none;
}

body:has(#app-shell:not([hidden])) .task-detail-content > section.task-detail-section:not(.checklist-section) > .task-section-head > span,
body:has(#app-shell:not([hidden])) .task-detail-content > section.task-detail-section:not(.checklist-section) > .task-section-head > div > span {
  color: #7a879b;
  font-size: 11px;
}

body:has(#app-shell:not([hidden])) .task-detail-content .task-action {
  border-color: #cfd9e6;
  border-radius: 8px;
  background: #fff;
  color: #283750;
}

body:has(#app-shell:not([hidden])) .task-detail-content .task-action:hover {
  border-color: #8fbced;
  background: #f3f8ff;
  color: #176fcf;
}

body:has(#app-shell:not([hidden])) .task-detail-content .task-action.is-primary {
  border-color: #1778e8;
  background: #1778e8;
  color: #fff;
  box-shadow: 0 5px 13px rgba(23, 120, 232, .16);
}

body:has(#app-shell:not([hidden])) .task-detail-content .task-action.is-danger {
  border-color: #e6aaa5;
  background: #fff;
  color: #b63227;
  box-shadow: none;
}

body:has(#app-shell:not([hidden])) .task-command-bar {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  margin: 0 0 4px;
  padding: 10px 12px;
  border: 1px solid #d9e4f0;
  border-radius: 11px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(17, 39, 68, .08);
}

body:has(#app-shell:not([hidden])) .task-command-bar .task-actions { align-items: center; }
body:has(#app-shell:not([hidden])) .task-command-bar .task-action { min-height: 34px; padding-inline: 12px; }
body:has(#app-shell:not([hidden])) .task-command-primary { min-width: 0; }
body:has(#app-shell:not([hidden])) .task-command-danger { margin-left: auto; padding-left: 10px; border-left: 1px solid #e5e9ef; }
body:has(#app-shell:not([hidden])) .task-command-panel:empty { display: none; }
body:has(#app-shell:not([hidden])) .task-command-panel:not(:empty) { margin: 0 0 14px; }
body:has(#app-shell:not([hidden])) .task-command-panel .transition-panel { margin-top: 8px; }

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section {
  padding-block: 0;
}

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  padding: 0;
  color: #111b30;
  font-size: 14px;
  font-weight: 760;
  list-style: none;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary::-webkit-details-marker { display: none; }

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary::before {
  content: "›";
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #eaf5ff;
  color: #1778e8;
  font-size: 22px;
  transition: transform .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section[open] > summary::before { transform: rotate(90deg); }
body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary > span { color: #748299; font-size: 11px; font-weight: 650; }
body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section[open] > summary { border-bottom: 1px solid #e7ecf2; }

body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > .record-count { margin: 14px 0; }
body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > .task-copy-block { padding: 13px 0; border-bottom: 1px solid #e7ecf2; }

body:has(#app-shell:not([hidden])) .task-copy-block > div {
  padding: 12px 14px;
  border: 1px solid #e3eaf2;
  border-radius: 9px;
  background: #fbfdff;
}

body:has(#app-shell:not([hidden])) .attachment-group {
  padding: 13px 14px;
  border: 1px solid #e3eaf2;
  border-radius: 9px;
  background: #fbfdff;
}

body:has(#app-shell:not([hidden])) .attachment-group + .attachment-group {
  margin-top: 10px;
  padding-top: 13px;
  border-top: 1px solid #e3eaf2;
}

body:has(#app-shell:not([hidden])) .task-actions { gap: 8px; }

body:has(#app-shell:not([hidden])) .timer-panel {
  padding: 13px 14px;
  border: 1px solid #d9e7f5;
  border-radius: 9px;
  background: #f3f8fe;
}

body:has(#app-shell:not([hidden])) .comment-form input {
  min-height: 42px;
  padding: 9px 11px;
  border: 1px solid #d6e0eb;
  border-radius: 8px;
  background: #fbfdff;
}

body:has(#app-shell:not([hidden])) .comment-form .button-primary {
  min-height: 42px;
  border-color: #1778e8;
  border-radius: 8px;
  background: #1778e8;
  box-shadow: 0 5px 13px rgba(23, 120, 232, .16);
}

body:has(#app-shell:not([hidden])) .task-detail-content .transition-panel,
body:has(#app-shell:not([hidden])) .task-detail-content .inline-form {
  border: 1px solid #dce5ef;
  border-radius: 9px;
  background: #f7faff;
}

@media (max-width: 1120px) {
  .task-fact-panels { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .task-case-summary { grid-template-columns: 1fr; }
  .task-case-summary > div + div { border-top: 1px solid #cddff2; border-left: 0; }
  .task-title-band { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; }
  .task-visual-icon { width: 44px; height: 44px; }
  .task-fact-panel, body:has(#app-shell:not([hidden])) .checklist-section { padding-inline: 13px; }
  .task-facts div { grid-template-columns: 1fr; gap: 4px; }
  body:has(#app-shell:not([hidden])) .checklist-section .task-section-head { align-items: flex-start; }
  body:has(#app-shell:not([hidden])) .task-detail-content > .task-detail-section { padding-inline: 13px; }
  body:has(#app-shell:not([hidden])) .task-detail-content > section.task-detail-section:not(.checklist-section) > .task-section-head { align-items: flex-start; }
  body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary { grid-template-columns: 34px minmax(0, 1fr); }
  body:has(#app-shell:not([hidden])) .task-detail-content > details.task-detail-section > summary > span { grid-column: 2; }
  body:has(#app-shell:not([hidden])) .task-command-bar { top: 70px; align-items: flex-start; flex-direction: column; }
  body:has(#app-shell:not([hidden])) .task-command-danger { width: 100%; margin-left: 0; padding: 8px 0 0; border-top: 1px solid #e5e9ef; border-left: 0; }
}

body:has(#app-shell:not([hidden])) .checklist-required-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 9px 10px;
  border: 1px solid #e0e3e9;
  border-radius: 8px;
  background: #f7f8fa;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .checklist-required-option input { width: 15px; height: 15px; margin: 1px 0 0; accent-color: #7440ec; }
body:has(#app-shell:not([hidden])) .checklist-required-option span { display: grid; gap: 2px; }
body:has(#app-shell:not([hidden])) .checklist-required-option strong { color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .checklist-required-option small { color: var(--work-muted); font-size: 12px; font-weight: 500; }

body:has(#app-shell:not([hidden])) .subtask-empty {
  padding: 18px 0 4px;
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .subtask-overview {
  display: grid;
  gap: 8px;
  padding: 2px 0 14px;
}

body:has(#app-shell:not([hidden])) .subtask-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

body:has(#app-shell:not([hidden])) .subtask-progress-copy strong {
  color: var(--work-copy);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
}

body:has(#app-shell:not([hidden])) .subtask-progress-copy span {
  color: var(--work-muted);
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .subtask-progress-track,
body:has(#app-shell:not([hidden])) .subtask-mini-track {
  overflow: hidden;
  border-radius: 99px;
  background: #e4e7ed;
}

body:has(#app-shell:not([hidden])) .subtask-progress-track { height: 7px; }
body:has(#app-shell:not([hidden])) .subtask-mini-track { height: 3px; }

body:has(#app-shell:not([hidden])) .subtask-progress-track span,
body:has(#app-shell:not([hidden])) .subtask-mini-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #6dc83e, #a6dd3c);
  transition: width .42s var(--ease);
}

body:has(#app-shell:not([hidden])) .subtask-list { border-top: 1px solid var(--work-line); }

body:has(#app-shell:not([hidden])) .subtask-row {
  width: 100%;
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 11px;
  padding: 11px 4px;
  border: 0;
  border-bottom: 1px solid var(--work-line);
  background: transparent;
  color: var(--work-copy);
  text-align: left;
  cursor: pointer;
  transition: background .18s var(--ease), padding .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .subtask-row:hover { padding-left: 9px; background: #f7f8fb; }
body:has(#app-shell:not([hidden])) .subtask-code { color: var(--work-muted); font-size: 12px; font-weight: 720; letter-spacing: .04em; }
body:has(#app-shell:not([hidden])) .subtask-main { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .subtask-main strong,
body:has(#app-shell:not([hidden])) .subtask-main small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .subtask-main strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .subtask-main small { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .subtask-state { display: grid; justify-items: end; gap: 5px; }
body:has(#app-shell:not([hidden])) .subtask-state .status { min-height: 20px; padding: 0 6px; font-size: 12px; }
body:has(#app-shell:not([hidden])) .subtask-state small { color: var(--work-muted); font-size: 12px; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .subtask-open { color: #7360db; }

body:has(#app-shell:not([hidden])) .subtask-form {
  margin-top: 15px;
  padding: 16px;
  border: 1px solid #dddff0;
  border-radius: 11px;
  background: #f4f2ff;
}

body:has(#app-shell:not([hidden])) .inline-form-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
}

body:has(#app-shell:not([hidden])) .inline-form-heading h3 { margin: 0; font-size: 15px; }
body:has(#app-shell:not([hidden])) .subtask-form-hint { margin: -6px 0 0; color: var(--work-muted); font-size: 12px; line-height: 1.5; }

body:has(#app-shell:not([hidden])) .task-context-fieldset {
  margin: 0;
  padding: 0;
  border: 0;
}
body:has(#app-shell:not([hidden])) .task-routing-fieldset {
  display: grid;
  gap: 12px;
  margin: 2px 0;
  padding: 16px;
  border: 1px solid var(--work-border);
  border-radius: 12px;
  background: #f7f9fd;
}
body:has(#app-shell:not([hidden])) .task-routing-fieldset > legend {
  padding: 0 7px;
  color: #3048bd;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body:has(#app-shell:not([hidden])) .task-routing-fieldset label small {
  display: block;
  margin-top: 5px;
  color: var(--work-muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}
body:has(#app-shell:not([hidden])) .task-routing-fieldset .routing-hint { margin: 0; }
body:has(#app-shell:not([hidden])) .task-context-fieldset > legend {
  margin-bottom: 8px;
  color: var(--work-muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
body:has(#app-shell:not([hidden])) .task-choice-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
body:has(#app-shell:not([hidden])) .task-choice-row label { margin: 0; }
body:has(#app-shell:not([hidden])) .task-choice-row input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
body:has(#app-shell:not([hidden])) .task-choice-row span {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--work-border);
  border-radius: 10px;
  background: #fff;
  color: var(--work-muted);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}
body:has(#app-shell:not([hidden])) .task-choice-row input:checked + span {
  border-color: #6d42ff;
  background: #f2efff;
  color: #5632cc;
  box-shadow: inset 0 0 0 1px #6d42ff;
}
body:has(#app-shell:not([hidden])) .task-context-toggle-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
body:has(#app-shell:not([hidden])) .task-context-toggle {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--work-border);
  border-radius: 12px;
  background: #fafbff;
}
body:has(#app-shell:not([hidden])) .task-context-toggle input { width: 18px; height: 18px; margin-top: 2px; }
body:has(#app-shell:not([hidden])) .task-context-toggle span { display: grid; gap: 2px; }
body:has(#app-shell:not([hidden])) .task-context-toggle strong { color: var(--work-ink); font-size: 13px; }
body:has(#app-shell:not([hidden])) .task-context-toggle small { color: var(--work-muted); font-size: 11px; line-height: 1.35; }
body:has(#app-shell:not([hidden])) .task-operational-context {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
}
body:has(#app-shell:not([hidden])) .task-context-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #d9deeb;
  border-radius: 999px;
  background: #fff;
  color: #58657a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
body:has(#app-shell:not([hidden])) .task-context-chip b { color: #182236; font-weight: 900; }
body:has(#app-shell:not([hidden])) .task-context-chip.is-pending { border-color: #e5b743; background: #fff9e8; color: #8b6500; }
body:has(#app-shell:not([hidden])) .task-context-chip.is-approved { border-color: #91d578; background: #f0faec; color: #287414; }
body:has(#app-shell:not([hidden])) .task-context-chip.is-rejected { border-color: #ef9a92; background: #fff1f0; color: #b22b20; }
body:has(#app-shell:not([hidden])) .task-context-chip.is-paused { border-color: #a9b2c2; background: #f3f5f8; }
body:has(#app-shell:not([hidden])) .task-context-chip.is-link { border-color: #aa94ff; color: #5632cc; }

@media (max-width: 720px) {
  body:has(#app-shell:not([hidden])) .task-choice-row,
  body:has(#app-shell:not([hidden])) .task-context-toggle-grid { grid-template-columns: 1fr; }
}

@keyframes workspace-card-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Pilot analytics: one operational surface, every aggregate opens its source tasks. */
body:has(#app-shell:not([hidden])) .analytics-toolbar {
  display: grid; grid-template-columns: 150px 150px minmax(190px, 1fr) minmax(170px, .8fr) auto auto;
  align-items: end; gap: 12px; padding: 18px 0; border-bottom: 1px solid var(--work-line);
}
body:has(#app-shell:not([hidden])) .analytics-toolbar label { display: grid; gap: 6px; color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .analytics-toolbar input,
body:has(#app-shell:not([hidden])) .analytics-toolbar select { min-width: 0; height: 43px; border: 1px solid var(--work-line); border-radius: 8px; padding: 0 11px; background: rgba(255,255,255,.82); color: var(--work-copy); }
body:has(#app-shell:not([hidden])) .analytics-test-toggle { min-height: 43px; display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 8px !important; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .analytics-test-toggle input { width: 17px; height: 17px; }
body:has(#app-shell:not([hidden])) .analytics-metrics { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .analytics-metrics > div { min-width: 0; display: grid; gap: 6px; padding: 25px 20px 23px 0; border-right: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .analytics-metrics > div + div { padding-left: 20px; }
body:has(#app-shell:not([hidden])) .analytics-metrics > div:last-child { border-right: 0; }
body:has(#app-shell:not([hidden])) .analytics-metrics span { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .analytics-metrics strong { color: #15223a; font-size: clamp(25px, 2.4vw, 36px); font-weight: 620; letter-spacing: -.045em; }
body:has(#app-shell:not([hidden])) .analytics-metrics small { color: #7a8497; font-size: 11px; }
body:has(#app-shell:not([hidden])) .analytics-summary-line { display: flex; flex-wrap: wrap; gap: 12px 30px; padding: 14px 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .analytics-summary-line b { color: var(--work-copy); font-weight: 680; }
body:has(#app-shell:not([hidden])) .analytics-source { margin-top: 18px; }
body:has(#app-shell:not([hidden])) .analytics-source > header { display: flex; align-items: end; justify-content: space-between; gap: 20px; padding-bottom: 13px; }
body:has(#app-shell:not([hidden])) .analytics-source h2 { margin: 4px 0 0; font-size: 19px; }
body:has(#app-shell:not([hidden])) .analytics-source > header > span { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) #analytics-rows tr { cursor: pointer; }
body:has(#app-shell:not([hidden])) #analytics-rows tr:hover { background: #f5f7fb; }
body:has(#app-shell:not([hidden])) #analytics-rows td { font-size: 12px; }
body:has(#app-shell:not([hidden])) #analytics-rows td:first-child,
body:has(#app-shell:not([hidden])) #analytics-rows td:nth-child(2) { min-width: 160px; }
body:has(#app-shell:not([hidden])) #analytics-rows td b,
body:has(#app-shell:not([hidden])) #analytics-rows td small { display: block; }
body:has(#app-shell:not([hidden])) #analytics-rows td small { margin-top: 4px; color: var(--work-muted); line-height: 1.35; }
body:has(#app-shell:not([hidden])) .task-test-toggle { display: flex; align-items: center; gap: 9px; padding: 10px 0; color: #76551d; }
body:has(#app-shell:not([hidden])) .task-test-toggle input { width: 17px; height: 17px; }
body:has(#app-shell:not([hidden])) .task-test-toggle[hidden],
body:has(#app-shell:not([hidden])) .analytics-test-toggle[hidden] { display: none !important; }
body:has(#app-shell:not([hidden])) .case-badge,
body:has(#app-shell:not([hidden])) .test-badge { display: inline-flex; align-items: center; min-height: 22px; border: 1px solid #d8ddec; border-radius: 999px; padding: 0 8px; color: #536079; font-size: 11px; font-weight: 700; }
body:has(#app-shell:not([hidden])) .test-badge { border-color: #efc77c; background: #fff5de; color: #8b5a08; }

@media (max-width: 1180px) {
  body:has(#app-shell:not([hidden])) .analytics-toolbar { grid-template-columns: repeat(3, minmax(150px, 1fr)); }
  body:has(#app-shell:not([hidden])) .analytics-metrics { grid-template-columns: repeat(2, 1fr); }
  body:has(#app-shell:not([hidden])) .analytics-metrics > div:nth-child(2) { border-right: 0; }
  body:has(#app-shell:not([hidden])) .analytics-metrics > div:nth-child(n+3) { border-top: 1px solid var(--work-line); }
}

@media (max-width: 1220px) {
  body:has(#app-shell:not([hidden])) .app-shell { grid-template-columns: 92px minmax(0, 1fr); }
  body:has(#app-shell:not([hidden])) .sidebar { width: 92px; padding: 30px 13px 22px; }
  body:has(#app-shell:not([hidden])) .sidebar .brand { justify-content: center; padding: 0; }
  body:has(#app-shell:not([hidden])) .brand-name,
  body:has(#app-shell:not([hidden])) .brand-tagline,
  body:has(#app-shell:not([hidden])) .brand-context,
  body:has(#app-shell:not([hidden])) .workspace-nav-label,
  body:has(#app-shell:not([hidden])) .nav-index,
  body:has(#app-shell:not([hidden])) .nav-item b,
  body:has(#app-shell:not([hidden])) .workspace-sidebar-foot { display: none; }
  body:has(#app-shell:not([hidden])) .nav-list { margin-top: 58px; }
  body:has(#app-shell:not([hidden])) .nav-item { grid-template-columns: 1fr; justify-items: center; padding: 0; }
  body:has(#app-shell:not([hidden])) .workspace { padding: 28px 24px 44px; }
  body:has(#app-shell:not([hidden])) .workspace::before { left: 92px; }
  body:has(#app-shell:not([hidden])) .metric-rail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  body:has(#app-shell:not([hidden])) .work-layout { grid-template-columns: minmax(310px, .78fr) minmax(430px, 1.22fr); }
  body:has(#app-shell:not([hidden])) .toast { left: 108px; }
}

@media (max-width: 820px) {
  body:has(#app-shell:not([hidden])) { background: var(--work-canvas); }
  body:has(#app-shell:not([hidden])) .app-shell { display: block; padding-top: 66px; }
  body:has(#app-shell:not([hidden])) .sidebar {
    position: fixed;
    z-index: 40;
    top: 0;
    left: 0;
    width: 100%;
    height: 66px;
    padding: 0 14px;
    flex-direction: row;
    align-items: center;
    background: var(--work-night);
  }
  body:has(#app-shell:not([hidden])) .sidebar .brand { margin-right: auto; }
  body:has(#app-shell:not([hidden])) .sidebar .brand-mark { font-size: 23px; }
  body:has(#app-shell:not([hidden])) .nav-list { display: flex; gap: 4px; margin: 0; }
  body:has(#app-shell:not([hidden])) .nav-list { max-width: calc(100vw - 82px); overflow-x: auto; scrollbar-width: none; }
  body:has(#app-shell:not([hidden])) .nav-item { width: 43px; min-height: 43px; }
  body:has(#app-shell:not([hidden])) .nav-item::after { right: 8px; bottom: -5px; width: 0; height: 2px; }
  body:has(#app-shell:not([hidden])) .nav-item.is-active::after { width: 27px; height: 2px; }
  body:has(#app-shell:not([hidden])) .workspace {
    grid-column: 1;
    min-height: calc(100svh - 66px);
    padding: 24px 16px 38px;
    border-radius: 0;
  }
  body:has(#app-shell:not([hidden])) .workspace::before { display: none; }
  body:has(#app-shell:not([hidden])) .workspace-header { min-height: 75px; align-items: flex-start; padding: 0 0 19px; }
  body:has(#app-shell:not([hidden])) .workspace-header h1 { font-size: clamp(34px, 9vw, 44px); }
  body:has(#app-shell:not([hidden])) .header-actions { gap: 8px; }
  body:has(#app-shell:not([hidden])) .sync-label { display: none; }
  body:has(#app-shell:not([hidden])) .metric-rail { display: flex; overflow-x: auto; padding-bottom: 14px; scroll-snap-type: x mandatory; }
  body:has(#app-shell:not([hidden])) .metric { flex: 0 0 225px; scroll-snap-align: start; }
  body:has(#app-shell:not([hidden])) .work-toolbar { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .work-filter-group { flex-wrap: nowrap; justify-content: flex-start; overflow-x: auto; padding-bottom: 3px; }
  body:has(#app-shell:not([hidden])) .work-layout { display: block; }
  body:has(#app-shell:not([hidden])) .work-queue { margin-bottom: 16px; }
  body:has(#app-shell:not([hidden])) .task-inspector { position: static; max-height: none; }
  body:has(#app-shell:not([hidden])) .overview-split { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .task-lifecycle { padding-inline: 5px; }
  body:has(#app-shell:not([hidden])) .lifecycle-label { font-size: 12px; }
  body:has(#app-shell:not([hidden])) .checklist-overview { grid-template-columns: 1fr; gap: 8px; }
  body:has(#app-shell:not([hidden])) .checklist-progress-copy { grid-template-columns: auto 1fr; align-items: baseline; gap: 8px; }
  body:has(#app-shell:not([hidden])) .checklist-tools button[data-checklist-edit],
  body:has(#app-shell:not([hidden])) .checklist-tools button[data-checklist-delete] { width: 28px; overflow: hidden; color: transparent; }
  body:has(#app-shell:not([hidden])) .checklist-tools button[data-checklist-edit]::after { content: "✎"; color: #6f7785; font-size: 12px; }
  body:has(#app-shell:not([hidden])) .checklist-tools button[data-checklist-delete]::after { content: "×"; color: var(--danger); font-size: 14px; }
  body:has(#app-shell:not([hidden])) .subtask-row { grid-template-columns: minmax(0, 1fr) auto 16px; }
  body:has(#app-shell:not([hidden])) .subtask-code { display: none; }
  body:has(#app-shell:not([hidden])) .subtask-state small { display: none; }
  body:has(#app-shell:not([hidden])) .attachment-row { grid-template-columns: 40px minmax(0, 1fr) 20px; }
  body:has(#app-shell:not([hidden])) .attachment-author { display: none; }
  body:has(#app-shell:not([hidden])) .toast { left: 16px; right: 16px; }
  body:has(#app-shell:not([hidden])) .analytics-toolbar { grid-template-columns: 1fr 1fr; }
  body:has(#app-shell:not([hidden])) .analytics-toolbar label:nth-child(3),
  body:has(#app-shell:not([hidden])) .analytics-toolbar label:nth-child(4) { grid-column: 1 / -1; }
  body:has(#app-shell:not([hidden])) .analytics-metrics { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .analytics-metrics > div,
  body:has(#app-shell:not([hidden])) .analytics-metrics > div + div { padding: 17px 0; border-top: 1px solid var(--work-line); border-right: 0; }
}

/* Planned work: cadence first; generated tasks remain in the personal queue. */
.planned-summary{display:grid;grid-template-columns:repeat(3,minmax(150px,220px)) minmax(260px,1fr);align-items:stretch;margin-bottom:18px;border:1px solid var(--work-line,#dce4f0);border-radius:18px;background:linear-gradient(105deg,#fff 0%,#f5f9ff 100%);overflow:hidden}
.planned-summary>div{padding:18px 20px;border-right:1px solid var(--work-line,#dce4f0)}.planned-summary span{display:block;color:#748096;font-size:12px}.planned-summary strong{display:block;margin-top:4px;color:#0b172d;font-size:28px}.planned-summary>p{align-self:center;margin:0;padding:18px 22px;color:#5f6e86;line-height:1.5}
.planned-layout{display:grid;grid-template-columns:minmax(300px,360px) minmax(0,1fr);gap:18px;min-height:620px}.planned-register,.planned-inspector{border:1px solid var(--work-line,#dce4f0);border-radius:18px;background:#fff;overflow:hidden}.planned-register .work-section-head{padding:18px 20px 14px}.planned-search{display:block;padding:0 20px 16px}.planned-search input{width:100%;margin-top:7px}.planned-rule-list{border-top:1px solid var(--work-line,#dce4f0);max-height:620px;overflow-y:auto}
.planned-rule-item{width:100%;padding:16px 18px;border:0;border-bottom:1px solid var(--work-line,#dce4f0);background:#fff;color:#132038;text-align:left;cursor:pointer}.planned-rule-item:hover{background:#f7f9fd}.planned-rule-item.is-selected{background:#09172b;color:#fff;box-shadow:inset 4px 0 #7247ff}.planned-rule-item>span{display:flex;align-items:center;justify-content:space-between;gap:10px}.planned-rule-item>span b{font-size:12px;letter-spacing:.08em}.planned-rule-item>strong,.planned-rule-item>small,.planned-rule-item>em{display:block}.planned-rule-item>strong{margin-top:9px;font-size:15px}.planned-rule-item>small{margin-top:6px;color:#718096}.planned-rule-item>em{margin-top:8px;color:#5f6e86;font-size:12px;font-style:normal}.planned-rule-item.is-selected>small,.planned-rule-item.is-selected>em{color:#b9c4d5}
.planned-detail-head{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:24px;border-bottom:1px solid var(--work-line,#dce4f0)}.planned-detail-head h2{margin:7px 0;font-size:clamp(24px,2.2vw,34px)}.planned-detail-head p{margin:0;color:#718096}.planned-detail-actions{display:flex;justify-content:flex-end;padding:14px 24px 0}.planned-rhythm-card{display:flex;align-items:center;gap:16px;margin:16px 24px;padding:18px;border:1px solid #cfe2ff;border-radius:15px;background:#f1f7ff}.planned-rhythm-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:13px;background:#fff;color:#247af0}.planned-rhythm-icon .ui-icon{width:25px;height:25px}.planned-rhythm-card strong,.planned-rhythm-card small{display:block}.planned-rhythm-card strong{margin:4px 0;font-size:18px}.planned-rhythm-card small{color:#718096}
.planned-facts{display:grid;grid-template-columns:1fr 1fr;gap:14px;padding:0 24px 18px}.planned-facts>section{padding:18px;border:1px solid var(--work-line,#dce4f0);border-radius:15px}.planned-facts dl{margin:10px 0 0}.planned-facts dl div{display:grid;grid-template-columns:110px 1fr;gap:12px;padding:9px 0;border-bottom:1px solid #edf1f6}.planned-facts dt{color:#718096;font-size:12px;text-transform:uppercase}.planned-facts dd{margin:0;font-weight:650}.planned-criteria{color:#5f6e86}.planned-calendar{padding:0 24px 24px}.planned-occurrence{display:grid;grid-template-columns:150px 1fr auto;align-items:center;gap:16px;padding:13px 15px;border-top:1px solid var(--work-line,#dce4f0)}.planned-occurrence:first-child{border-top:0}.planned-occurrence time{color:#5f6e86;font-size:13px}.planned-occurrence span strong,.planned-occurrence span small{display:block}.planned-occurrence span small{margin-top:3px;color:#718096}.planned-occurrence button{border:0;background:transparent;color:#5b39d6;font-weight:700;cursor:pointer}.planned-occurrence.is-failed{background:#fff4f3}
@media(max-width:1050px){.planned-summary{grid-template-columns:repeat(3,1fr)}.planned-summary>p{grid-column:1/-1}.planned-layout{grid-template-columns:1fr}.planned-rule-list{max-height:360px}}@media(max-width:720px){.planned-summary{grid-template-columns:1fr}.planned-summary>p{grid-column:auto}.planned-facts{grid-template-columns:1fr}.planned-occurrence{grid-template-columns:1fr}}

.planned-calendar-strip{display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:18px;padding:15px 18px;border:1px solid var(--work-line,#dce4f0);border-radius:16px;background:#fff}.planned-calendar-strip>div{min-width:0}.planned-calendar-strip strong{display:block;margin:3px 0 10px;color:#142139}.work-calendar-days{display:flex;align-items:center;gap:7px;overflow-x:auto}.work-calendar-days>small{color:#748096}.work-calendar-day{display:inline-flex!important;align-items:center;gap:6px;flex:0 0 auto;padding:6px 9px;border:1px solid #dbe4f1;border-radius:999px;background:#f8faff;color:#52627b;font-size:11px}.work-calendar-day.is-non-working{border-color:#f0d7d3;background:#fff6f4;color:#a23c32}.work-calendar-day.is-working{border-color:#cce8d8;background:#f2fbf6;color:#247448}.work-calendar-day time,.work-calendar-day b,.work-calendar-day em{display:inline;font:inherit}.work-calendar-day b{font-weight:750}.work-calendar-day em{font-style:normal}.work-calendar-day button{border:0;background:transparent;color:inherit;font-size:11px;font-weight:750;cursor:pointer;text-decoration:underline}
.planned-occurrence-actions{display:flex;align-items:center;gap:10px}.planned-occurrence-actions .danger-link{color:#b23e35}.planned-exception-form{display:grid;grid-template-columns:minmax(170px,.7fr) minmax(180px,.8fr) minmax(240px,1.5fr) auto;align-items:end;gap:12px;margin-top:12px;padding:16px;border:1px solid #d8cdfd;border-radius:14px;background:#f8f6ff}.planned-exception-form h4{margin:4px 0 0}.planned-exception-form label{margin:0}.planned-exception-actions{display:flex;gap:8px}.planned-exception-form .form-message{grid-column:1/-1;margin:0;color:#a23c32}
@media(max-width:1050px){.planned-exception-form{grid-template-columns:1fr 1fr}.planned-exception-actions,.planned-exception-form .form-message{grid-column:1/-1}}@media(max-width:720px){.planned-calendar-strip{align-items:flex-start;flex-direction:column}.planned-exception-form{grid-template-columns:1fr}.planned-exception-actions,.planned-exception-form .form-message{grid-column:auto}}

/* Робочі простори: спокійний операційний реєстр + контекстний інспектор. */
body:has(#app-shell:not([hidden])) .work-toolbar {
  grid-template-columns: minmax(250px, .8fr) minmax(430px, 1.25fr) minmax(190px, .48fr);
}

body:has(#app-shell:not([hidden])) .workgroup-task-filter,
body:has(#app-shell:not([hidden])) .workgroup-toolbar label,
body:has(#app-shell:not([hidden])) .workgroup-member-form label,
body:has(#app-shell:not([hidden])) .workgroup-material-form label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

body:has(#app-shell:not([hidden])) .workgroup-task-filter select,
body:has(#app-shell:not([hidden])) .workgroup-toolbar input,
body:has(#app-shell:not([hidden])) .workgroup-toolbar select,
body:has(#app-shell:not([hidden])) .workgroup-member-form input,
body:has(#app-shell:not([hidden])) .workgroup-member-form select,
body:has(#app-shell:not([hidden])) .workgroup-material-form input,
body:has(#app-shell:not([hidden])) .workgroup-material-form select {
  width: 100%;
  min-height: 42px;
  border: 1px solid #dde1e8;
  border-radius: 8px;
  padding: 0 12px;
  background: #fff;
  color: var(--work-copy);
  font: inherit;
  font-size: 12px;
  outline: none;
  transition: border-color .18s var(--ease), box-shadow .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .workgroup-task-filter select:focus,
body:has(#app-shell:not([hidden])) .workgroup-toolbar input:focus,
body:has(#app-shell:not([hidden])) .workgroup-toolbar select:focus,
body:has(#app-shell:not([hidden])) .workgroup-member-form input:focus,
body:has(#app-shell:not([hidden])) .workgroup-member-form select:focus,
body:has(#app-shell:not([hidden])) .workgroup-material-form input:focus,
body:has(#app-shell:not([hidden])) .workgroup-material-form select:focus {
  border-color: #8061f3;
  box-shadow: 0 0 0 3px rgba(116, 64, 236, .1);
}

body:has(#app-shell:not([hidden])) .workgroup-toolbar {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(150px, .42fr) minmax(170px, .46fr) auto;
  align-items: end;
  gap: 12px;
  margin: 0 0 18px;
  padding: 16px;
  border: 1px solid var(--work-line);
  border-radius: 13px;
  background: rgba(255, 255, 255, .78);
  box-shadow: 0 8px 26px rgba(25, 34, 55, .04);
}

body:has(#app-shell:not([hidden])) .workgroup-toolbar .eyebrow,
body:has(#app-shell:not([hidden])) .workgroup-task-filter .eyebrow {
  margin: 0;
  font-size: 12px;
}

body:has(#app-shell:not([hidden])) .workgroup-reset {
  min-height: 42px;
  border: 1px solid #d8dce4;
  border-radius: 8px;
  padding: 0 14px;
  background: #fff;
  color: #596275;
  font-size: 12px;
  font-weight: 720;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .workgroup-reset:hover { border-color: #8061f3; color: #6a43d8; }

body:has(#app-shell:not([hidden])) .workgroup-layout {
  display: grid;
  grid-template-columns: minmax(360px, .78fr) minmax(520px, 1.22fr);
  gap: 18px;
  align-items: start;
}

body:has(#app-shell:not([hidden])) .workgroup-register,
body:has(#app-shell:not([hidden])) .workgroup-inspector {
  min-width: 0;
  border: 1px solid var(--work-line);
  border-radius: 14px;
  background: rgba(255, 255, 255, .85);
  box-shadow: 0 12px 34px rgba(23, 31, 49, .05);
}

body:has(#app-shell:not([hidden])) .workgroup-register { padding: 18px; }

body:has(#app-shell:not([hidden])) .workgroup-inspector {
  position: sticky;
  top: 20px;
  max-height: calc(100svh - 40px);
  overflow: auto;
  scrollbar-width: thin;
}

body:has(#app-shell:not([hidden])) .workgroup-list {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

body:has(#app-shell:not([hidden])) .workgroup-item {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, .48fr) 20px;
  align-items: center;
  gap: 14px;
  padding: 14px 13px;
  border: 1px solid #e2e5eb;
  border-radius: 10px;
  background: #fff;
  color: var(--work-copy);
  text-align: left;
  cursor: pointer;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease), background .18s var(--ease);
}

body:has(#app-shell:not([hidden])) .workgroup-item:hover {
  transform: translateY(-1px);
  border-color: #cfc7f5;
  box-shadow: 0 8px 20px rgba(72, 53, 137, .08);
}

body:has(#app-shell:not([hidden])) .workgroup-item.is-selected {
  border-color: var(--work-night);
  background: var(--work-night);
  color: #fff;
  box-shadow: 0 12px 25px rgba(8, 17, 32, .18);
}

body:has(#app-shell:not([hidden])) .workgroup-item-main,
body:has(#app-shell:not([hidden])) .workgroup-item-meta {
  min-width: 0;
  display: grid;
  gap: 5px;
}

body:has(#app-shell:not([hidden])) .workgroup-item-kicker {
  display: flex;
  align-items: center;
  gap: 7px;
}

body:has(#app-shell:not([hidden])) .workgroup-item-kicker b {
  color: #747e91;
  font-size: 12px;
  letter-spacing: .05em;
}

body:has(#app-shell:not([hidden])) .workgroup-item-main > strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) .workgroup-item-main > small,
body:has(#app-shell:not([hidden])) .workgroup-item-meta {
  overflow: hidden;
  color: #7a8496;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
}

body:has(#app-shell:not([hidden])) .workgroup-item-main > small { white-space: nowrap; }
body:has(#app-shell:not([hidden])) .workgroup-item-meta { justify-items: end; text-align: right; }
body:has(#app-shell:not([hidden])) .workgroup-item.is-selected small,
body:has(#app-shell:not([hidden])) .workgroup-item.is-selected .workgroup-item-meta,
body:has(#app-shell:not([hidden])) .workgroup-item.is-selected .workgroup-item-kicker b { color: #aebbd1; }
body:has(#app-shell:not([hidden])) .workgroup-item-open { color: #8e78f2; font-size: 16px; }

body:has(#app-shell:not([hidden])) .workgroup-detail-content { animation: workspace-card-in .28s var(--ease); }

body:has(#app-shell:not([hidden])) .workgroup-detail-head {
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .workgroup-detail-kicker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  color: #737d90;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .04em;
}

body:has(#app-shell:not([hidden])) .workgroup-detail-head h2 {
  margin: 0;
  color: var(--work-copy);
  font-size: clamp(23px, 2.2vw, 35px);
  line-height: 1.03;
  letter-spacing: -.035em;
}

body:has(#app-shell:not([hidden])) .workgroup-detail-head > p {
  margin: 10px 0 0;
  color: var(--work-muted);
  font-size: 12px;
  line-height: 1.55;
}

body:has(#app-shell:not([hidden])) .workgroup-actions,
body:has(#app-shell:not([hidden])) .workgroup-tab-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 16px;
}

body:has(#app-shell:not([hidden])) .workgroup-tab-actions { align-items: flex-end; justify-content: space-between; }
body:has(#app-shell:not([hidden])) .workgroup-tab-actions > div { min-width: 0; display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .workgroup-tab-actions > div strong { color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-tab-actions > div span { color: var(--work-muted); font-size: 12px; }

body:has(#app-shell:not([hidden])) .workgroup-tabs {
  display: flex;
  gap: 3px;
  overflow-x: auto;
  padding: 0 18px;
  border-bottom: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .workgroup-tabs button {
  min-height: 43px;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 0 11px;
  background: transparent;
  color: #747e90;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .workgroup-tabs button.is-active {
  border-bottom-color: #7440ec;
  color: #5e36cd;
}

body:has(#app-shell:not([hidden])) .workgroup-tab-panel { padding: 20px 24px 28px; }

body:has(#app-shell:not([hidden])) .workgroup-overview { display: grid; gap: 20px; }
body:has(#app-shell:not([hidden])) .workgroup-overview > section { padding-top: 16px; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .workgroup-overview > section > p:last-child { margin: 7px 0 0; color: #3f485a; font-size: 12px; line-height: 1.65; white-space: pre-line; }

body:has(#app-shell:not([hidden])) .workgroup-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  border-top: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .workgroup-facts > div {
  display: grid;
  gap: 5px;
  padding: 12px 10px 12px 0;
  border-bottom: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .workgroup-facts dt { color: #7a8496; font-size: 12px; font-weight: 730; letter-spacing: .08em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .workgroup-facts dd { margin: 0; color: var(--work-copy); font-size: 12px; font-weight: 670; }

body:has(#app-shell:not([hidden])) .workgroup-document {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

body:has(#app-shell:not([hidden])) .workgroup-document > div { display: grid; gap: 5px; }
body:has(#app-shell:not([hidden])) .workgroup-document strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-document small { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-document a { color: #6540d4; font-size: 12px; font-weight: 720; text-decoration: none; white-space: nowrap; }

/* Work-group inspector follows the same light passport hierarchy as tasks and projects. */
body:has(#app-shell:not([hidden])) .workgroup-detail-content {
  min-width: 0;
  padding: 18px;
  color: var(--work-copy);
  animation: workspace-card-in .28s var(--ease);
}

body:has(#app-shell:not([hidden])) .workgroup-passport-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 30px;
  margin-bottom: 10px;
}

body:has(#app-shell:not([hidden])) .workgroup-passport-kicker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

body:has(#app-shell:not([hidden])) .workgroup-code-chip,
body:has(#app-shell:not([hidden])) .workgroup-passport-kicker .status {
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border: 1px solid #d7e0ec;
  border-radius: 999px;
  background: #fff;
  color: #647188;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .04em;
}

body:has(#app-shell:not([hidden])) .workgroup-command-bar {
  position: sticky;
  z-index: 7;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #ded9f2;
  border-radius: 11px;
  background: rgba(255, 255, 255, .97);
  box-shadow: 0 8px 22px rgba(55, 38, 112, .08);
  backdrop-filter: blur(8px);
}

body:has(#app-shell:not([hidden])) .workgroup-command-primary {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

body:has(#app-shell:not([hidden])) .workgroup-command-bar .task-action {
  min-height: 34px;
  padding-inline: 12px;
  border-color: #d4cee9;
  border-radius: 8px;
  background: #fff;
  color: #2f2948;
}

body:has(#app-shell:not([hidden])) .workgroup-command-bar .task-action:hover {
  border-color: #aa99ed;
  background: #f7f4ff;
  color: #6038cc;
}

body:has(#app-shell:not([hidden])) .workgroup-command-bar .task-action.is-primary {
  border-color: #7440ec;
  background: #7440ec;
  color: #fff;
  box-shadow: 0 5px 13px rgba(116, 64, 236, .16);
}

body:has(#app-shell:not([hidden])) .workgroup-identity {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 16px 14px 18px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .workgroup-visual-icon,
body:has(#app-shell:not([hidden])) .workgroup-panel-icon,
body:has(#app-shell:not([hidden])) .workgroup-summary-icon,
body:has(#app-shell:not([hidden])) .workgroup-section-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #f0ebff;
  color: #7440ec;
}

body:has(#app-shell:not([hidden])) .workgroup-visual-icon { width: 56px; height: 56px; }
body:has(#app-shell:not([hidden])) .workgroup-visual-icon .ui-icon { width: 28px; height: 28px; }
body:has(#app-shell:not([hidden])) .workgroup-identity h2 { margin: 0; color: #0e1830; font-size: clamp(22px, 2.2vw, 32px); line-height: 1.08; letter-spacing: -.035em; }
body:has(#app-shell:not([hidden])) .workgroup-identity p { margin: 6px 0 0; color: #6f7d93; font-size: 12px; line-height: 1.5; }

body:has(#app-shell:not([hidden])) .workgroup-fact-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

body:has(#app-shell:not([hidden])) .workgroup-fact-panel {
  min-width: 0;
  padding: 15px 16px 6px;
  border: 1px solid #dfe6ef;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 6px 18px rgba(22, 43, 72, .035);
}

body:has(#app-shell:not([hidden])) .workgroup-fact-panel > header {
  display: flex;
  align-items: center;
  gap: 11px;
  padding-bottom: 11px;
  border-bottom: 1px solid #e7ecf2;
}

body:has(#app-shell:not([hidden])) .workgroup-panel-icon,
body:has(#app-shell:not([hidden])) .workgroup-section-icon { width: 38px; height: 38px; }
body:has(#app-shell:not([hidden])) .workgroup-panel-icon .ui-icon,
body:has(#app-shell:not([hidden])) .workgroup-section-icon .ui-icon { width: 20px; height: 20px; }
body:has(#app-shell:not([hidden])) .workgroup-fact-panel h3,
body:has(#app-shell:not([hidden])) .workgroup-overview-section h3 { margin: 0; color: #111b30; font-size: 14px; }
body:has(#app-shell:not([hidden])) .workgroup-fact-panel header p,
body:has(#app-shell:not([hidden])) .workgroup-overview-section header p { margin: 2px 0 0; color: #8190a5; font-size: 10px; }

body:has(#app-shell:not([hidden])) .workgroup-passport-facts { margin: 0; }
body:has(#app-shell:not([hidden])) .workgroup-passport-facts > div {
  min-height: 42px;
  display: grid;
  grid-template-columns: minmax(110px, .55fr) minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #e9edf3;
}
body:has(#app-shell:not([hidden])) .workgroup-passport-facts > div:last-child { border-bottom: 0; }
body:has(#app-shell:not([hidden])) .workgroup-passport-facts dt { color: #77859a; font-size: 10px; font-weight: 780; letter-spacing: .045em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .workgroup-passport-facts dd { min-width: 0; margin: 0; color: #25334b; font-size: 11px; font-weight: 670; overflow-wrap: anywhere; }
body:has(#app-shell:not([hidden])) .workgroup-period-fact { margin: 8px -7px 0; padding: 0 7px; border: 1px solid #ead9a5; border-radius: 8px; background: #fffaf0; }

body:has(#app-shell:not([hidden])) .workgroup-result-summary {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  padding: 14px 16px;
  border: 1px solid #ddd4fb;
  border-radius: 12px;
  background: #f7f4ff;
}
body:has(#app-shell:not([hidden])) .workgroup-summary-icon { width: 42px; height: 42px; background: #fff; }
body:has(#app-shell:not([hidden])) .workgroup-summary-icon .ui-icon { width: 21px; height: 21px; }
body:has(#app-shell:not([hidden])) .workgroup-result-summary > div { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .workgroup-result-summary b,
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary b { color: #5d5476; font-size: 10px; letter-spacing: .06em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .workgroup-result-summary strong { color: #17243b; font-size: 12px; line-height: 1.45; }

body:has(#app-shell:not([hidden])) .workgroup-detail-content > .workgroup-tabs {
  margin-top: 12px;
  border: 1px solid #dfe6ef;
  border-radius: 12px 12px 0 0;
  background: #fff;
}
body:has(#app-shell:not([hidden])) .workgroup-detail-content > .workgroup-tab-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe6ef;
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .workgroup-overview-modern { display: grid; gap: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-overview-section,
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary { border: 1px solid #e2e7ef; border-radius: 10px; background: #fbfcfe; }
body:has(#app-shell:not([hidden])) .workgroup-overview-section { padding: 14px 15px; }
body:has(#app-shell:not([hidden])) .workgroup-overview-section > header { display: flex; align-items: center; gap: 11px; }
body:has(#app-shell:not([hidden])) .workgroup-overview-section > p { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #e6eaf0; color: #3f4d64; font-size: 12px; line-height: 1.6; white-space: pre-line; }
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary { display: grid; grid-template-columns: 38px minmax(0, 1fr); align-items: center; gap: 11px; padding: 13px 15px; }
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary > div { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary strong { color: #17243b; font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary small { color: #718098; font-size: 10px; }
body:has(#app-shell:not([hidden])) .workgroup-foundation-summary a { color: #6540d4; font-weight: 750; text-decoration: none; }

body:has(#app-shell:not([hidden])) .workgroup-member-form {
  display: grid;
  grid-template-columns: minmax(160px, .8fr) minmax(150px, 1fr) minmax(120px, .55fr) minmax(170px, 1fr) auto;
  align-items: end;
  gap: 9px;
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid #ded8f4;
  border-radius: 10px;
  background: #f7f5ff;
}

body:has(#app-shell:not([hidden])) .workgroup-member-form > div:first-child { align-self: center; }
body:has(#app-shell:not([hidden])) .workgroup-member-form > div:first-child span { color: var(--work-muted); font-size: 12px; line-height: 1.4; }
body:has(#app-shell:not([hidden])) .workgroup-member-form .form-message { grid-column: 1 / -1; }

body:has(#app-shell:not([hidden])) .member-person-control { min-width: 0; display: grid; gap: 6px; color: var(--work-muted); font-size: 12px; font-weight: 650; }
body:has(#app-shell:not([hidden])) .member-person-trigger {
  width: 100%; min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border: 1px solid #dde1e8; border-radius: 8px; padding: 0 12px; background: #fff; color: var(--work-copy);
  font-size: 12px; text-align: left; cursor: pointer;
}
body:has(#app-shell:not([hidden])) .member-person-trigger:hover,
body:has(#app-shell:not([hidden])) .member-person-trigger:focus-visible { border-color: #8061f3; box-shadow: 0 0 0 3px rgba(116, 64, 236, .1); outline: none; }
body:has(#app-shell:not([hidden])) .member-person-trigger:disabled {
  border-color: #dce4ee; background: #f7f9fc; color: var(--work-copy); cursor: default; opacity: 1;
}
body:has(#app-shell:not([hidden])) .member-person-trigger:disabled:hover { box-shadow: none; }
body:has(#app-shell:not([hidden])) .member-person-trigger:disabled i { color: #68758a; }
body:has(#app-shell:not([hidden])) .member-person-trigger > span { min-width: 0; display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .member-person-trigger strong,
body:has(#app-shell:not([hidden])) .member-person-trigger small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .member-person-trigger small { color: var(--work-muted); font-size: 11px; font-weight: 550; }
body:has(#app-shell:not([hidden])) .member-person-trigger i { color: #6840d4; font-size: 12px; font-style: normal; font-weight: 750; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .person-picker-selection { display: flex; flex-wrap: wrap; gap: 5px; }
body:has(#app-shell:not([hidden])) .person-picker-selection:empty { display: none; }
body:has(#app-shell:not([hidden])) .person-picker-selection span { max-width: 210px; overflow: hidden; border: 1px solid #ddd6f7; border-radius: 99px; padding: 3px 7px; background: #f5f2ff; color: #6540d4; font-size: 10px; font-weight: 680; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .field-picker-button { min-height: 30px; justify-self: start; border: 0; border-bottom: 1px solid #6540d4; padding: 3px 0; background: transparent; color: #6540d4; font-size: 11px; font-weight: 720; cursor: pointer; }
body:has(#app-shell:not([hidden])) .field-picker-button:disabled { border-color: #b4bac5; color: #9aa2b0; cursor: default; }

body.has-people-picker { overflow: hidden; }
.people-picker-layer { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 24px; }
.people-picker-shade { position: absolute; inset: 0; background: rgba(7, 18, 35, .58); backdrop-filter: blur(4px); }
.people-picker {
  position: relative; width: min(940px, 100%); max-height: min(760px, calc(100svh - 48px)); overflow: hidden;
  border: 1px solid #dfe3eb; border-radius: 16px; background: #fff; color: #111d31;
  box-shadow: 0 28px 80px rgba(5, 18, 38, .24); animation: people-picker-in .2s var(--ease) both;
}
@keyframes people-picker-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
.people-picker > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 22px 24px 18px; border-bottom: 1px solid #e5e8ee; }
.people-picker > header .eyebrow { margin-bottom: 5px; color: #6540d4; }
.people-picker > header h2 { font-size: 24px; }
.people-picker-search { display: grid; gap: 7px; padding: 16px 24px; border-bottom: 1px solid #e5e8ee; color: #667087; font-size: 12px; }
.people-picker-search input { min-height: 44px; border: 1px solid #d9dee8; border-radius: 9px; padding: 0 14px; background: #fafbfc; font-size: 13px; }
.people-picker-search input:focus { border-color: #7854e8; box-shadow: 0 0 0 3px rgba(116, 64, 236, .1); }
.people-picker-body { min-height: 430px; display: grid; grid-template-columns: minmax(260px, .72fr) minmax(390px, 1.28fr); }
.people-picker-body > aside { min-width: 0; padding: 18px 18px 22px 24px; border-right: 1px solid #e5e8ee; background: #f8f9fb; overflow-y: auto; }
.people-picker-body > main { min-width: 0; padding: 18px 24px 22px; overflow-y: auto; }
.people-picker-section-head { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #657087; font-size: 11px; font-weight: 780; letter-spacing: .1em; text-transform: uppercase; }
.people-picker-section-head button { border: 0; padding: 4px 0; background: transparent; color: #6540d4; font-size: 11px; font-weight: 740; text-transform: none; cursor: pointer; }
.people-picker-section-head small { color: #8a93a5; font-size: 11px; font-weight: 650; letter-spacing: 0; text-transform: none; }
.people-picker-breadcrumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; min-height: 34px; padding-bottom: 9px; border-bottom: 1px solid #e2e5eb; }
.people-picker-breadcrumbs button { max-width: 190px; overflow: hidden; border: 0; padding: 2px 0; background: transparent; color: #566178; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.people-picker-breadcrumbs button:last-child { color: #17243a; font-weight: 730; }
.people-picker-breadcrumbs span { color: #9aa2b2; font-size: 11px; }
.people-picker-units { display: grid; }
.people-picker-units > button { min-height: 58px; display: grid; grid-template-columns: minmax(0, 1fr) 16px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid #e2e5eb; padding: 9px 2px; background: transparent; color: #17243a; text-align: left; cursor: pointer; }
.people-picker-units > button:hover { color: #6540d4; transform: translateX(2px); }
.people-picker-units > button span { min-width: 0; display: grid; gap: 4px; }
.people-picker-units strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.people-picker-units small { color: #7a8497; font-size: 11px; }
.people-picker-units i { color: #8e98aa; font-style: normal; text-align: right; }
.people-picker-units > p { margin: 18px 0; color: #7a8497; font-size: 12px; line-height: 1.5; }
.people-picker-results { display: grid; margin-top: 6px; border-top: 1px solid #e2e5eb; }
.people-picker-results > button { min-height: 76px; display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #e2e5eb; padding: 10px 2px; background: transparent; color: #17243a; text-align: left; cursor: pointer; }
.people-picker-results > button:hover:not(:disabled) { padding-left: 7px; background: #faf9ff; }
.people-picker-results > button.is-selected { background: #f5f2ff; }
.people-picker-results > button:disabled { opacity: .55; cursor: default; }
.people-picker-results > button > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
.people-picker-results strong { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.people-picker-results small { color: #535f75; font-size: 12px; }
.people-picker-results em { overflow: hidden; color: #8a93a5; font-size: 11px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.people-picker-results > button > i { color: #6540d4; font-size: 11px; font-style: normal; font-weight: 760; white-space: nowrap; }
.people-picker-empty { padding: 34px 4px; color: #7a8497; font-size: 12px; line-height: 1.55; }
.people-picker-empty.is-error { color: #a83b2e; }
.people-picker-more { width: 100%; min-height: 38px; margin-top: 12px; border: 1px solid #d9dee8; border-radius: 8px; background: #fff; color: #6540d4; font-size: 12px; font-weight: 740; cursor: pointer; }
.people-picker-footer { display: flex; justify-content: flex-end; padding: 13px 24px; border-top: 1px solid #e5e8ee; background: #fff; }

body:has(#app-shell:not([hidden])) .workgroup-members { border-top: 1px solid var(--work-line); }

body:has(#app-shell:not([hidden])) .workgroup-members article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) minmax(120px, auto) 24px;
  align-items: center;
  gap: 11px;
  padding: 12px 2px;
  border-bottom: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .member-avatar {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: #eee9ff;
  color: #673bd9;
  font-size: 12px;
  font-weight: 800;
}

body:has(#app-shell:not([hidden])) .member-copy,
body:has(#app-shell:not([hidden])) .member-role { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .member-copy strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .member-copy small,
body:has(#app-shell:not([hidden])) .member-role small { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .member-copy em { color: #526077; font-size: 12px; font-style: normal; line-height: 1.35; }
body:has(#app-shell:not([hidden])) .member-role { justify-items: end; color: #6540d4; font-size: 12px; font-weight: 720; text-align: right; }
body:has(#app-shell:not([hidden])) .workgroup-members article > button { border: 0; background: transparent; color: #9a5f69; font-size: 17px; cursor: pointer; }

body:has(#app-shell:not([hidden])) .workgroup-task-list,
body:has(#app-shell:not([hidden])) .workgroup-materials { display: grid; border-top: 1px solid var(--work-line); }

body:has(#app-shell:not([hidden])) .workgroup-task-list > button,
body:has(#app-shell:not([hidden])) .workgroup-material {
  display: grid;
  grid-template-columns: 78px minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 11px;
  min-height: 58px;
  border: 0;
  border-bottom: 1px solid var(--work-line);
  padding: 9px 2px;
  background: transparent;
  color: var(--work-copy);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .workgroup-task-list > button:hover,
body:has(#app-shell:not([hidden])) .workgroup-material:hover { background: #f8f8fb; }
body:has(#app-shell:not([hidden])) .workgroup-task-list > button > span:nth-child(2),
body:has(#app-shell:not([hidden])) .workgroup-material > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .workgroup-task-list strong,
body:has(#app-shell:not([hidden])) .workgroup-material strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .workgroup-task-list small,
body:has(#app-shell:not([hidden])) .workgroup-material small { color: var(--work-muted); font-size: 12px; }

body:has(#app-shell:not([hidden])) .workgroup-material-form {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
  padding: 15px;
  border: 1px solid #ded8f4;
  border-radius: 10px;
  background: #f7f5ff;
}

body:has(#app-shell:not([hidden])) .workgroup-material-form > p,
body:has(#app-shell:not([hidden])) .workgroup-empty { color: var(--work-muted); font-size: 12px; line-height: 1.5; }
body:has(#app-shell:not([hidden])) .workgroup-empty { padding: 22px 2px; }

body:has(#app-shell:not([hidden])) .workgroup-badge,
body:has(#app-shell:not([hidden])) .meeting-badge {
  display: inline-flex;
  align-items: center;
  min-height: 21px;
  border: 1px solid #cabdf6;
  border-radius: 99px;
  padding: 0 7px;
  background: #f3efff;
  color: #6038cc;
  font-size: 12px;
  font-weight: 760;
  letter-spacing: .02em;
  white-space: nowrap;
}

body:has(#app-shell:not([hidden])) button.workgroup-badge { cursor: pointer; }
body:has(#app-shell:not([hidden])) .meeting-badge { border-color: #9bd9e7; background: #eafaff; color: #087d98; }
body:has(#app-shell:not([hidden])) .work-item.is-selected .workgroup-badge,
body:has(#app-shell:not([hidden])) .work-item.is-selected .meeting-badge { border-color: #6354a9; background: #211c43; color: #cbbfff; }
body:has(#app-shell:not([hidden])) .task-workgroup-fact { grid-column: 1 / -1; }
body:has(#app-shell:not([hidden])) .task-workgroup-fact button { border: 0; padding: 0; background: transparent; color: #6038cc; font: inherit; font-weight: 720; cursor: pointer; }

body:has(#app-shell:not([hidden])) .status-active { border-color: #badd99; background: #edf9df; color: #4d8d2e; }
body:has(#app-shell:not([hidden])) .status-suspended { border-color: #f1d38b; background: #fff5d8; color: #986c00; }
body:has(#app-shell:not([hidden])) .status-completed { border-color: #aadbc7; background: #e9f8f1; color: #287e5e; }
body:has(#app-shell:not([hidden])) .status-archived { border-color: #d8dce4; background: #f2f4f7; color: #747d8e; }
body:has(#app-shell:not([hidden])) .status-planned,
body:has(#app-shell:not([hidden])) .status-invitations-sent { border-color: #9bd9e7; background: #eafaff; color: #087d98; }
body:has(#app-shell:not([hidden])) .status-awaiting-minutes,
body:has(#app-shell:not([hidden])) .status-postponed { border-color: #f1d38b; background: #fff5d8; color: #986c00; }
body:has(#app-shell:not([hidden])) .status-closed { border-color: #aadbc7; background: #e9f8f1; color: #287e5e; }

@media (max-width: 1220px) {
  body:has(#app-shell:not([hidden])) .work-toolbar { grid-template-columns: 1fr 1.4fr; }
  body:has(#app-shell:not([hidden])) .workgroup-task-filter { grid-column: 1 / -1; }
  body:has(#app-shell:not([hidden])) .workgroup-layout { grid-template-columns: minmax(310px, .72fr) minmax(430px, 1.28fr); }
  body:has(#app-shell:not([hidden])) .workgroup-fact-panels { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .workgroup-command-bar { position: static; align-items: flex-start; }
  body:has(#app-shell:not([hidden])) .workgroup-member-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  body:has(#app-shell:not([hidden])) .workgroup-member-form > div:first-child,
  body:has(#app-shell:not([hidden])) .workgroup-member-form .form-message { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  body:has(#app-shell:not([hidden])) .workgroup-toolbar { grid-template-columns: 1fr 1fr; }
  body:has(#app-shell:not([hidden])) .workgroup-search { grid-column: 1 / -1; }
  body:has(#app-shell:not([hidden])) .workgroup-layout { display: block; }
  body:has(#app-shell:not([hidden])) .workgroup-register { margin-bottom: 14px; padding: 14px; }
  body:has(#app-shell:not([hidden])) .workgroup-inspector { position: static; max-height: none; }
  body:has(#app-shell:not([hidden])) .workgroup-item { grid-template-columns: minmax(0, 1fr) 18px; }
  body:has(#app-shell:not([hidden])) .workgroup-item-meta { grid-column: 1 / -1; grid-row: 2; justify-items: start; text-align: left; }
  body:has(#app-shell:not([hidden])) .workgroup-item-open { grid-column: 2; grid-row: 1; }
  body:has(#app-shell:not([hidden])) .workgroup-detail-head,
  body:has(#app-shell:not([hidden])) .workgroup-tab-panel { padding-inline: 16px; }
  body:has(#app-shell:not([hidden])) .workgroup-detail-content { padding: 12px; }
  body:has(#app-shell:not([hidden])) .workgroup-command-bar { flex-direction: column; }
  body:has(#app-shell:not([hidden])) .workgroup-command-primary { width: 100%; }
  body:has(#app-shell:not([hidden])) .workgroup-identity { grid-template-columns: 44px minmax(0, 1fr); padding-inline: 12px; }
  body:has(#app-shell:not([hidden])) .workgroup-visual-icon { width: 44px; height: 44px; }
  body:has(#app-shell:not([hidden])) .workgroup-detail-content > .workgroup-tabs { padding-inline: 8px; }
  body:has(#app-shell:not([hidden])) .workgroup-detail-content > .workgroup-tab-panel { padding: 13px; }
  body:has(#app-shell:not([hidden])) .workgroup-facts { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .workgroup-member-form { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .workgroup-member-form > div:first-child,
  body:has(#app-shell:not([hidden])) .workgroup-member-form .form-message { grid-column: auto; }
  body:has(#app-shell:not([hidden])) .workgroup-members article { grid-template-columns: 38px minmax(0, 1fr) 24px; }
  body:has(#app-shell:not([hidden])) .member-role { grid-column: 2; justify-items: start; text-align: left; }
  body:has(#app-shell:not([hidden])) .workgroup-task-list > button,
  body:has(#app-shell:not([hidden])) .workgroup-material { grid-template-columns: minmax(0, 1fr) 18px; }
  body:has(#app-shell:not([hidden])) .workgroup-task-list .task-code,
  body:has(#app-shell:not([hidden])) .workgroup-task-list .status,
  body:has(#app-shell:not([hidden])) .workgroup-material .attachment-kind { display: none; }
  .people-picker-layer { padding: 0; }
  .people-picker { width: 100%; max-height: 100svh; height: 100svh; border: 0; border-radius: 0; }
  .people-picker-body { grid-template-columns: 1fr; min-height: 0; height: calc(100svh - 170px); overflow-y: auto; }
  .people-picker-body > aside { overflow: visible; border-right: 0; border-bottom: 1px solid #e5e8ee; padding: 15px 18px; }
  .people-picker-body > main { overflow: visible; padding: 15px 18px 24px; }
  .people-picker > header, .people-picker-search { padding-inline: 18px; }
}

body:has(#app-shell:not([hidden])) .workgroup-meeting-form,
body:has(#app-shell:not([hidden])) .workgroup-decision-form {
  display: grid;
  gap: 11px;
  margin: 12px 0 18px;
  padding: 15px;
  border: 1px solid #ded8f4;
  border-radius: 10px;
  background: #f7f5ff;
}

body:has(#app-shell:not([hidden])) .workgroup-meeting-form label,
body:has(#app-shell:not([hidden])) .workgroup-decision-form label { display: grid; gap: 6px; color: #4d586c; font-size: 12px; font-weight: 720; }
body:has(#app-shell:not([hidden])) .workgroup-meeting-form input,
body:has(#app-shell:not([hidden])) .workgroup-meeting-form select,
body:has(#app-shell:not([hidden])) .workgroup-meeting-form textarea,
body:has(#app-shell:not([hidden])) .workgroup-decision-form input,
body:has(#app-shell:not([hidden])) .workgroup-decision-form select,
body:has(#app-shell:not([hidden])) .workgroup-decision-form textarea {
  width: 100%;
  border: 1px solid #dce0e8;
  border-radius: 8px;
  padding: 10px 11px;
  background: #fff;
  color: var(--work-copy);
  font: inherit;
  font-size: 12px;
  outline: none;
}

body:has(#app-shell:not([hidden])) .workgroup-meeting-form select[multiple] { min-height: 86px; }
body:has(#app-shell:not([hidden])) .workgroup-meeting-form label > small { color: var(--work-muted); font-size: 12px; font-weight: 520; line-height: 1.45; }

body:has(#app-shell:not([hidden])) .meeting-routing-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 13px;
  border: 1px solid #dcd5f7;
  border-radius: 9px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .meeting-routing-fields > div { grid-column: 1 / -1; display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .meeting-routing-fields > div .eyebrow { margin: 0; }
body:has(#app-shell:not([hidden])) .meeting-routing-fields > div span { color: var(--work-muted); font-size: 12px; }

body:has(#app-shell:not([hidden])) .meeting-requirements {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

body:has(#app-shell:not([hidden])) .meeting-requirements label {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px;
  border: 1px solid #dfe3ea;
  border-radius: 9px;
  background: #fff;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .meeting-requirements input {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin: 1px 0 0;
  padding: 0;
  accent-color: var(--work-violet);
}

body:has(#app-shell:not([hidden])) .meeting-requirements span { display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .meeting-requirements strong { color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .meeting-requirements small { color: var(--work-muted); font-size: 12px; font-weight: 520; line-height: 1.4; }
body:has(#app-shell:not([hidden])) .workgroup-meeting-list { display: grid; gap: 12px; }

body:has(#app-shell:not([hidden])) .workgroup-meeting {
  overflow: hidden;
  border: 1px solid #e0e3ea;
  border-radius: 11px;
  background: #fff;
}

body:has(#app-shell:not([hidden])) .workgroup-meeting > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--work-line);
  background: #fafafd;
}

body:has(#app-shell:not([hidden])) .workgroup-protocol-number { color: #6940d8; font-size: 12px; font-weight: 780; letter-spacing: .04em; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .workgroup-meeting h3 { margin: 5px 0 3px; color: var(--work-copy); font-size: 13px; }
body:has(#app-shell:not([hidden])) .workgroup-meeting header p { margin: 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .meeting-context-label { display: inline-flex; margin-top: 7px; padding: 4px 7px; border: 1px solid #ddd7f6; border-radius: 99px; background: #f5f2ff; color: #6540d4; font-size: 12px; font-weight: 740; }
body:has(#app-shell:not([hidden])) .meeting-signals { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 16px 0; }
body:has(#app-shell:not([hidden])) .meeting-signals span { padding: 4px 7px; border: 1px solid #dfe3e9; border-radius: 99px; background: #f8f9fb; color: #536074; font-size: 12px; font-weight: 720; }
body:has(#app-shell:not([hidden])) .meeting-signals a { align-self: center; color: var(--work-violet); font-size: 12px; font-weight: 730; text-decoration: none; }
body:has(#app-shell:not([hidden])) .meeting-task-context .meeting-logistics { margin-inline: 0; }
body:has(#app-shell:not([hidden])) .meeting-task-context .meeting-signals { padding-inline: 0; }

body:has(#app-shell:not([hidden])) .meeting-logistics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 16px;
  margin: 10px 16px 0;
  border-top: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .meeting-logistics > div { min-width: 0; display: grid; gap: 3px; padding: 9px 0; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .meeting-logistics dt { color: var(--work-muted); font-size: 12px; font-weight: 680; text-transform: uppercase; }
body:has(#app-shell:not([hidden])) .meeting-logistics dd { overflow: hidden; margin: 0; color: var(--work-copy); font-size: 12px; font-weight: 650; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .meeting-logistics a { color: var(--work-violet); text-decoration: none; }

body:has(#app-shell:not([hidden])) .meeting-task-link {
  width: calc(100% - 32px);
  min-height: 48px;
  display: grid;
  grid-template-columns: minmax(120px, auto) minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  margin: 12px 16px 0;
  border: 0;
  border-radius: 9px;
  padding: 9px 11px;
  background: var(--work-night);
  color: #fff;
  text-align: left;
  cursor: pointer;
}

body:has(#app-shell:not([hidden])) .meeting-task-link > span:first-child { display: grid; gap: 2px; }
body:has(#app-shell:not([hidden])) .meeting-task-link small { color: #98a6bb; font-size: 12px; }
body:has(#app-shell:not([hidden])) .meeting-task-link strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .meeting-task-link > span:nth-child(2) { overflow: hidden; color: #cbd4e1; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .meeting-task-link i { color: var(--work-lime); font-style: normal; }
body:has(#app-shell:not([hidden])) .meeting-routing-note { margin: 11px 16px 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-meeting > section { padding: 12px 16px 0; }
body:has(#app-shell:not([hidden])) .workgroup-meeting > section > p:last-child { margin: 6px 0 0; color: #465166; font-size: 12px; line-height: 1.55; white-space: pre-line; }
body:has(#app-shell:not([hidden])) .workgroup-attendance { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; margin: 12px 16px 0; color: var(--work-muted); font-size: 12px; line-height: 1.45; }
body:has(#app-shell:not([hidden])) .workgroup-attendance > div { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .workgroup-attendance strong { color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-attendance span { overflow: hidden; text-overflow: ellipsis; }
body:has(#app-shell:not([hidden])) .meeting-cancellation { margin: 11px 16px 0; padding: 8px 10px; border-left: 2px solid #da5b5b; background: #fff1f1; color: #934040; font-size: 12px; line-height: 1.45; }

body:has(#app-shell:not([hidden])) .workgroup-decisions { margin-top: 13px; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .workgroup-decision-head { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 16px; }
body:has(#app-shell:not([hidden])) .workgroup-decision-head strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-decision-head button { border: 0; background: transparent; color: #6841d8; font-size: 12px; font-weight: 750; cursor: pointer; }

body:has(#app-shell:not([hidden])) .workgroup-decision {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto minmax(90px, auto);
  align-items: center;
  gap: 10px;
  min-height: 55px;
  padding: 9px 16px;
  border-top: 1px solid var(--work-line);
}

body:has(#app-shell:not([hidden])) .decision-number { color: #6940d8; font-size: 12px; font-weight: 800; }
body:has(#app-shell:not([hidden])) .workgroup-decision > span:nth-child(2) { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .workgroup-decision strong { font-size: 12px; line-height: 1.4; }
body:has(#app-shell:not([hidden])) .workgroup-decision small { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .workgroup-decision > button { min-height: 28px; border: 1px solid #d6d9e2; border-radius: 7px; padding: 0 8px; background: #fff; color: #6038cc; font-size: 12px; font-weight: 720; cursor: pointer; }
body:has(#app-shell:not([hidden])) .workgroup-meeting > footer { display: flex; flex-wrap: wrap; gap: 7px; padding: 12px 16px; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .workgroup-empty.compact { padding: 12px 16px; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .status-approved { border-color: #aadbc7; background: #e9f8f1; color: #287e5e; }
body:has(#app-shell:not([hidden])) .status-open { border-color: #d8dce4; background: #f3f5f8; color: #667085; }

body:has(#app-shell:not([hidden])) .meeting-register-item { min-height: 94px; }
body:has(#app-shell:not([hidden])) .meeting-inspector { padding: 16px; }
body:has(#app-shell:not([hidden])) .meeting-inspector .workgroup-protocols { min-width: 0; }
body:has(#app-shell:not([hidden])) .meeting-inspector .workgroup-meeting-list { gap: 0; }
body:has(#app-shell:not([hidden])) .meeting-inspector .workgroup-meeting-form { margin: 0; }

/* Process mining: a dense managerial register with an evidence-backed DFG inspector. */
body:has(#app-shell:not([hidden])) .process-notice {
  min-height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 12px;
  border: 1px solid #ddd9f3; border-radius: 9px; background: #f7f5ff; color: #59657a; font-size: 12px;
}
body:has(#app-shell:not([hidden])) .process-notice strong { color: #4f32bc; }
body:has(#app-shell:not([hidden])) .process-observed-dot { width: 8px; height: 8px; border-radius: 50%; background: #7a55e8; box-shadow: 0 0 0 4px #e9e3ff; }
body:has(#app-shell:not([hidden])) .process-toolbar {
  display: grid; grid-template-columns: 150px 150px minmax(230px, 1fr) auto auto;
  align-items: end; gap: 12px; padding: 16px 0; border-bottom: 1px solid var(--work-line);
}
body:has(#app-shell:not([hidden])) .process-toolbar label { display: grid; gap: 6px; color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-toolbar input,
body:has(#app-shell:not([hidden])) .process-toolbar select { min-width: 0; height: 43px; border: 1px solid var(--work-line); border-radius: 8px; padding: 0 11px; background: rgba(255,255,255,.85); color: var(--work-copy); }
body:has(#app-shell:not([hidden])) .process-metrics { display: grid; grid-template-columns: repeat(5, 1fr); border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-metrics > div { display: grid; gap: 5px; padding: 17px 18px; border-right: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-metrics > div:first-child { padding-left: 0; }
body:has(#app-shell:not([hidden])) .process-metrics > div:last-child { border-right: 0; }
body:has(#app-shell:not([hidden])) .process-metrics span { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-metrics strong { color: var(--work-copy); font-size: 26px; font-weight: 650; letter-spacing: -.035em; }
body:has(#app-shell:not([hidden])) .process-layout { display: grid; grid-template-columns: minmax(270px, .72fr) minmax(520px, 1.6fr); gap: 16px; margin-top: 17px; }
body:has(#app-shell:not([hidden])) .process-domain-tabs { display:flex; gap:4px; width:max-content; margin:0 0 14px; padding:4px; border:1px solid var(--line); border-radius:12px; background:rgba(255,255,255,.76); }
body:has(#app-shell:not([hidden])) .process-domain-tabs button { border:0; border-radius:9px; padding:9px 14px; background:transparent; color:var(--muted); font:700 13px/1.2 inherit; cursor:pointer; }
body:has(#app-shell:not([hidden])) .process-domain-tabs button.is-active { background:#101b2d; color:#fff; }
body:has(#app-shell:not([hidden])) .process-domain-tabs span { display:inline-grid; min-width:21px; height:21px; margin-left:7px; place-items:center; border-radius:11px; background:rgba(124,58,237,.12); color:#6d36e8; font-size:11px; }
body:has(#app-shell:not([hidden])) .process-domain-tabs button.is-active span { background:rgba(255,255,255,.16); color:#fff; }
body:has(#app-shell:not([hidden])) .process-proposal-notice .process-observed-dot { background:#f59e0b; box-shadow:0 0 0 5px rgba(245,158,11,.12); }
body:has(#app-shell:not([hidden])) .process-proposal-toolbar { display:flex; align-items:end; gap:12px; margin-top:12px; }
body:has(#app-shell:not([hidden])) .process-proposal-toolbar label { display:grid; gap:6px; min-width:260px; }
body:has(#app-shell:not([hidden])) .process-proposal-toolbar select { min-height:43px; padding:0 38px 0 13px; border:1px solid var(--line); border-radius:9px; background:#fff; font:600 13px/1 inherit; }
body:has(#app-shell:not([hidden])) .process-proposal-source,
body:has(#app-shell:not([hidden])) .process-proposal-cases,
body:has(#app-shell:not([hidden])) .process-proposal-decision { padding:18px 22px; border-top:1px solid var(--line); }
body:has(#app-shell:not([hidden])) .process-proposal-source h3,
body:has(#app-shell:not([hidden])) .process-proposal-cases h3,
body:has(#app-shell:not([hidden])) .process-proposal-decision h3 { margin:4px 0 8px; font-size:16px; }
body:has(#app-shell:not([hidden])) .process-proposal-source p:not(.eyebrow) { margin:0 0 7px; color:var(--ink); }
body:has(#app-shell:not([hidden])) .process-proposal-source small,
body:has(#app-shell:not([hidden])) .process-proposal-cases small { color:var(--muted); }
body:has(#app-shell:not([hidden])) .process-proposal-cases article { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:16px; align-items:center; padding:11px 0; border-top:1px solid var(--line); }
body:has(#app-shell:not([hidden])) .process-proposal-cases article:first-of-type { border-top:0; }
body:has(#app-shell:not([hidden])) .process-proposal-cases article span { display:grid; gap:3px; min-width:0; }
body:has(#app-shell:not([hidden])) .process-proposal-cases article b { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-size:13px; }
body:has(#app-shell:not([hidden])) .process-proposal-cases time { color:var(--muted); font-size:12px; }
body:has(#app-shell:not([hidden])) .process-proposal-decision { display:grid; gap:13px; background:rgba(247,245,255,.56); }
body:has(#app-shell:not([hidden])) .process-proposal-decision label { display:grid; gap:6px; color:var(--muted); font-size:12px; font-weight:700; }
body:has(#app-shell:not([hidden])) .process-proposal-decision input,
body:has(#app-shell:not([hidden])) .process-proposal-decision select,
body:has(#app-shell:not([hidden])) .process-proposal-decision textarea { width:100%; border:1px solid var(--line); border-radius:9px; background:#fff; padding:10px 12px; color:var(--ink); font:500 13px/1.45 inherit; }
body:has(#app-shell:not([hidden])) .process-proposal-form-grid { display:grid; grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:12px; }
body:has(#app-shell:not([hidden])) .process-proposal-decision .button { justify-self:start; }
body:has(#app-shell:not([hidden])) .process-proposal-decision.is-complete { background:rgba(240,253,244,.56); }
body:has(#app-shell:not([hidden])) .process-register,
body:has(#app-shell:not([hidden])) .process-inspector { min-width: 0; border: 1px solid var(--work-line); border-radius: 13px; background: rgba(255,255,255,.82); box-shadow: 0 10px 28px rgba(19,31,53,.05); }
body:has(#app-shell:not([hidden])) .process-register { overflow: hidden; }
body:has(#app-shell:not([hidden])) .process-register > header { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 15px 16px 13px; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-register h2 { margin: 3px 0 0; font-size: 17px; }
body:has(#app-shell:not([hidden])) .process-register > header > span { color: var(--work-muted); font-size: 11px; }
body:has(#app-shell:not([hidden])) .process-register-item { width: 100%; min-height: 66px; display: grid; grid-template-columns: minmax(0,1fr) auto 14px; align-items: center; gap: 10px; border: 0; border-bottom: 1px solid var(--work-line); padding: 10px 14px; background: transparent; color: var(--work-copy); text-align: left; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-register-item:hover { background: #f7f8fc; }
body:has(#app-shell:not([hidden])) .process-register-item.is-selected { background: var(--work-night); color: #fff; }
body:has(#app-shell:not([hidden])) .process-family-group > header { display:grid; gap:3px; padding:12px 18px 8px; border-bottom:1px solid var(--work-line); background:#f8f9fc; }
body:has(#app-shell:not([hidden])) .process-family-group > header b { font-size:13px; color:var(--work-copy); }
body:has(#app-shell:not([hidden])) .process-family-group > header small { color:var(--work-muted); font-size:11px; }
body:has(#app-shell:not([hidden])) .process-register-item > span { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .process-register-item b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-register-item small { overflow: hidden; color: var(--work-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-register-item.is-selected small { color: #aab5c7; }
body:has(#app-shell:not([hidden])) .process-register-item > span:nth-child(2) { justify-items: end; }
body:has(#app-shell:not([hidden])) .process-register-item > span:nth-child(2) strong { font-size: 16px; }
body:has(#app-shell:not([hidden])) .process-register-item i { color: #7753df; font-style: normal; }
body:has(#app-shell:not([hidden])) .process-inspector { overflow: hidden; }
body:has(#app-shell:not([hidden])) .process-detail-head { display: flex; align-items: start; justify-content: space-between; gap: 18px; padding: 17px 18px 14px; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-detail-head h2 { margin: 4px 0 5px; font-size: 20px; }
body:has(#app-shell:not([hidden])) .process-detail-head p:last-child { margin: 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-status { flex: 0 0 auto; min-height: 25px; display: inline-flex; align-items: center; border: 1px solid #cfc4f5; border-radius: 99px; padding: 0 9px; background: #f1edff; color: #5c37ce; font-size: 11px; font-weight: 730; }
body:has(#app-shell:not([hidden])) .process-graph-scroll { overflow-x: auto; border-bottom: 1px solid var(--work-line); background-image: linear-gradient(#f5f7fb 1px, transparent 1px), linear-gradient(90deg, #f5f7fb 1px, transparent 1px); background-size: 22px 22px; }
body:has(#app-shell:not([hidden])) .process-graph { width: auto; min-width: 100%; height: 215px; display: block; }
body:has(#app-shell:not([hidden])) .process-edge { fill: none; stroke: #9a8ad8; opacity: .72; }
body:has(#app-shell:not([hidden])) .process-edge-label { fill: #5e4aab; font-size: 10px; font-weight: 760; text-anchor: middle; }
body:has(#app-shell:not([hidden])) #process-arrow path { fill: #7c64d0; }
body:has(#app-shell:not([hidden])) .process-node rect { fill: #fff; stroke: #d9deea; stroke-width: 1.2px; filter: drop-shadow(0 4px 7px rgba(25,38,61,.08)); }
body:has(#app-shell:not([hidden])) .process-node.is-complete rect { fill: #f2faee; stroke: #9bd17b; }
body:has(#app-shell:not([hidden])) .process-node.is-active rect { fill: #fff9e7; stroke: #dfbd54; }
body:has(#app-shell:not([hidden])) .process-node-code { fill: #2c3a53; font-size: 10px; font-weight: 800; letter-spacing: .03em; }
body:has(#app-shell:not([hidden])) .process-node-name { fill: #17243a; font-size: 11px; font-weight: 680; }
body:has(#app-shell:not([hidden])) .process-node-meta,
body:has(#app-shell:not([hidden])) .process-graph-caption { fill: #748096; font-size: 9px; }
body:has(#app-shell:not([hidden])) .process-detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
body:has(#app-shell:not([hidden])) .process-signals { border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-signals > header { display: flex; justify-content: space-between; align-items: start; gap: 12px; padding: 14px 18px 10px; }
body:has(#app-shell:not([hidden])) .process-signals h3 { margin: 0 0 3px; font-size: 13px; }
body:has(#app-shell:not([hidden])) .process-signals p { margin: 0; color: var(--work-muted); font-size: 11px; line-height: 1.4; }
body:has(#app-shell:not([hidden])) .process-signals > header > small { flex: 0 0 auto; color: var(--work-muted); font-size: 10px; }
body:has(#app-shell:not([hidden])) .process-signal-row { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 3px 12px; padding: 9px 18px; border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-signal-row > div:first-child { display: grid; gap: 3px; min-width: 0; }
body:has(#app-shell:not([hidden])) .process-signal-row strong { font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-signal-row small { color: var(--work-muted); font-size: 10px; }
body:has(#app-shell:not([hidden])) .process-signal-row > b { font-size: 16px; font-weight: 680; font-variant-numeric: tabular-nums; }
body:has(#app-shell:not([hidden])) .process-signal-evidence { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }
body:has(#app-shell:not([hidden])) .process-signal-evidence button { border: 1px solid var(--work-line); border-radius: 5px; padding: 4px 7px; background: #fff; color: #5a3fc2; font-size: 10px; font-weight: 700; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-signal-evidence button:hover { background: #f4f0ff; }
body:has(#app-shell:not([hidden])) .process-signal-evidence button span { margin-left: 4px; }
body:has(#app-shell:not([hidden])) .process-signal-evidence > span { color: var(--work-muted); font-size: 10px; }
body:has(#app-shell:not([hidden])) .process-detail-grid > section { min-width: 0; padding: 15px 17px 17px; }
body:has(#app-shell:not([hidden])) .process-detail-grid > section + section { border-left: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-detail-grid h3 { margin: 0 0 9px; font-size: 13px; }
body:has(#app-shell:not([hidden])) .process-variant,
body:has(#app-shell:not([hidden])) .process-case { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 8px; min-height: 43px; border-top: 1px solid var(--work-line); font-size: 11px; }
body:has(#app-shell:not([hidden])) .process-variant b { color: #744ede; }
body:has(#app-shell:not([hidden])) .process-variant span { overflow: hidden; color: #58647a; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-case { width: 100%; grid-template-columns: minmax(0,1fr) auto 14px; border-right: 0; border-bottom: 0; border-left: 0; padding: 0; background: transparent; color: var(--work-copy); text-align: left; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-case:hover,
body:has(#app-shell:not([hidden])) .process-case.is-selected { background: #f6f3ff; }
body:has(#app-shell:not([hidden])) .process-case i { color: #6940d8; font-style: normal; }
body:has(#app-shell:not([hidden])) .process-case > span { min-width: 0; display: grid; gap: 3px; }
body:has(#app-shell:not([hidden])) .process-case small { overflow: hidden; color: var(--work-muted); text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-muted { color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-case-explorer { border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-case-prompt { display: grid; gap: 4px; padding: 17px 18px; color: var(--work-copy); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-case-prompt span { color: var(--work-muted); }
body:has(#app-shell:not([hidden])) .process-case-explorer > header { display: flex; justify-content: space-between; align-items: start; gap: 14px; padding: 16px 18px; }
body:has(#app-shell:not([hidden])) .process-case-explorer > header h3 { margin: 4px 0; font-size: 16px; line-height: 1.35; }
body:has(#app-shell:not([hidden])) .process-case-explorer > header p:last-child { margin: 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-case-insights { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-block: 1px solid var(--work-line); background: #f8f9fc; }
body:has(#app-shell:not([hidden])) .process-case-insights span { display: grid; gap: 3px; min-width: 0; padding: 10px 17px; border-right: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-case-insights span:last-child { border-right: 0; }
body:has(#app-shell:not([hidden])) .process-case-insights small { color: var(--work-muted); font-size: 11px; }
body:has(#app-shell:not([hidden])) .process-case-insights b { font-size: 14px; }
body:has(#app-shell:not([hidden])) .process-case-tasks h4 { margin: 0; padding: 13px 18px 8px; font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-case-tasks > button { width: 100%; display: grid; grid-template-columns: minmax(0,1fr) auto 14px; align-items: center; gap: 12px; min-height: 53px; border: 0; border-top: 1px solid var(--work-line); padding: 8px 18px; background: #fff; color: var(--work-copy); text-align: left; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-case-tasks > button:hover { background: #f7f5ff; }
body:has(#app-shell:not([hidden])) .process-case-tasks > button > span { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .process-case-tasks > button > span:nth-child(2) { justify-items: end; }
body:has(#app-shell:not([hidden])) .process-case-tasks b,
body:has(#app-shell:not([hidden])) .process-case-tasks strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-case-tasks small { overflow: hidden; color: var(--work-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-case-tasks i { color: #6c46d7; font-style: normal; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure { border-top: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure summary { padding: 13px 18px; color: #5a3fc2; font-size: 12px; font-weight: 720; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure article { display: grid; grid-template-columns: 115px minmax(0,1fr) auto; gap: 10px; padding: 10px 18px; border-top: 1px solid var(--work-line); font-size: 11px; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure time { color: var(--work-muted); white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure article span { min-width: 0; display: grid; gap: 4px; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure article small { color: var(--work-muted); overflow-wrap: anywhere; }
body:has(#app-shell:not([hidden])) .process-timeline-disclosure em { color: #936800; font-style: normal; }
body:has(#app-shell:not([hidden])) .process-view-tabs { display: flex; gap: 4px; padding: 9px 16px 0; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-view-tabs button { border: 0; border-bottom: 2px solid transparent; padding: 10px 15px; background: none; color: var(--work-muted); font: inherit; font-size: 13px; font-weight: 700; cursor: pointer; }
body:has(#app-shell:not([hidden])) .process-view-tabs button.is-active { border-color: #6542d8; color: #5034b1; }
body:has(#app-shell:not([hidden])) .process-model { min-width: 0; }
body:has(#app-shell:not([hidden])) .process-model > header { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px; }
body:has(#app-shell:not([hidden])) .process-model > header h3 { margin: 3px 0; font-size: 18px; }
body:has(#app-shell:not([hidden])) .process-model > header p:last-child { margin: 0; color: var(--work-muted); font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-model > header > div:first-child { min-width: 0; flex: 1; }
body:has(#app-shell:not([hidden])) .process-model-title { display: block; width: min(100%, 570px); height: 35px; margin: 3px 0 5px; border: 1px solid transparent; border-radius: 6px; padding: 2px 6px; background: transparent; color: var(--work-copy); font: inherit; font-size: 18px; font-weight: 750; }
body:has(#app-shell:not([hidden])) .process-model-title:hover,body:has(#app-shell:not([hidden])) .process-model-title:focus { border-color: var(--work-line); background: #fff; outline: none; }
body:has(#app-shell:not([hidden])) .process-model-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
body:has(#app-shell:not([hidden])) .process-model-actions .button { min-height: 36px; white-space: nowrap; }
body:has(#app-shell:not([hidden])) .process-model-diagnostics { margin: 0 18px 16px; border-left: 3px solid #d79021; padding: 10px 13px; background: #fff9ef; color: #5f431b; font-size: 12px; }
body:has(#app-shell:not([hidden])) .process-model-diagnostics ul { margin: 5px 0 0; padding-left: 18px; line-height: 1.5; }
body:has(#app-shell:not([hidden])) .process-model-note { margin: 0 18px 16px; border: 1px solid #dcd5ff; border-radius: 9px; padding: 10px 13px; background: #f8f6ff; color: #554494; font-size: 12px; line-height: 1.45; }
body:has(#app-shell:not([hidden])) .process-model-empty { padding: 25px 18px; color: var(--work-muted); font-size: 13px; }
body:has(#app-shell:not([hidden])) .bpmn-diagram-scroll { max-width: 100%; overflow: auto; border-block: 1px solid var(--work-line); background: linear-gradient(#edf1fb 1px, transparent 1px),linear-gradient(90deg,#edf1fb 1px,transparent 1px),#fbfcff; background-size: 22px 22px; }
body:has(#app-shell:not([hidden])) .bpmn-lane { fill: #fff; fill-opacity: .8; stroke: #bdc8dc; stroke-width: 1; }
body:has(#app-shell:not([hidden])) .bpmn-lane-label { fill: #465777; font-size: 11px; font-weight: 700; }
body:has(#app-shell:not([hidden])) .bpmn-task { fill: #e7f7ec; stroke: #288d4a; stroke-width: 2; }
body:has(#app-shell:not([hidden])) .bpmn-gateway { fill: #e8f2ff; stroke: #2877c9; stroke-width: 2; }
body:has(#app-shell:not([hidden])) .bpmn-start { fill: #bcefc8; stroke: #27854a; stroke-width: 2; }
body:has(#app-shell:not([hidden])) .bpmn-end { fill: #ffe5e5; stroke: #d34141; stroke-width: 4; }
body:has(#app-shell:not([hidden])) .bpmn-flow { fill: none; stroke: #64748b; stroke-width: 1.8; }
body:has(#app-shell:not([hidden])) .bpmn-symbol { fill: #135ca8; text-anchor: middle; font-size: 26px; font-weight: 700; }
body:has(#app-shell:not([hidden])) .bpmn-node-label { fill: #1c2940; text-anchor: middle; font-size: 10.5px; font-weight: 650; }
body:has(#app-shell:not([hidden])) .bpmn-flow-label { fill: #465777; text-anchor: middle; font-size: 10px; }
body:has(#app-shell:not([hidden])) .process-model-editor { display: grid; gap: 0; }
body:has(#app-shell:not([hidden])) .process-model-editor > section { padding: 15px 18px; border-bottom: 1px solid var(--work-line); }
body:has(#app-shell:not([hidden])) .process-model-editor h4 { margin: 0 0 10px; font-size: 13px; }
body:has(#app-shell:not([hidden])) .bpmn-edit-row,body:has(#app-shell:not([hidden])) .bpmn-add-form,body:has(#app-shell:not([hidden])) #bpmn-lane-form { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; }
body:has(#app-shell:not([hidden])) .bpmn-edit-row input,body:has(#app-shell:not([hidden])) .bpmn-edit-row select,body:has(#app-shell:not([hidden])) .bpmn-add-form input,body:has(#app-shell:not([hidden])) .bpmn-add-form select,body:has(#app-shell:not([hidden])) #bpmn-lane-form input { min-width: 0; height: 34px; border: 1px solid var(--work-line); border-radius: 7px; padding: 6px 9px; background: #fff; color: var(--work-copy); font: inherit; font-size: 12px; }
body:has(#app-shell:not([hidden])) .bpmn-edit-row input,body:has(#app-shell:not([hidden])) .bpmn-add-form input,body:has(#app-shell:not([hidden])) #bpmn-lane-form input { flex: 1; }
body:has(#app-shell:not([hidden])) .bpmn-edit-row button { width: 30px; height: 30px; border: 1px solid var(--work-line); border-radius: 6px; background: #fff; color: #aa4260; cursor: pointer; }
body:has(#app-shell:not([hidden])) .bpmn-type { width: 110px; flex: none; color: var(--work-muted); font-size: 11px; }
body:has(#app-shell:not([hidden])) .bpmn-add-form { flex-wrap: wrap; margin-top: 10px; }
body:has(#app-shell:not([hidden])) .bpmn-add-form .button,body:has(#app-shell:not([hidden])) #bpmn-lane-form .button { min-height: 34px; padding: 6px 10px; white-space: nowrap; }
@media (max-width: 760px) {
  body:has(#app-shell:not([hidden])) .process-domain-tabs { width:100%; }
  body:has(#app-shell:not([hidden])) .process-domain-tabs button { flex:1; }
  body:has(#app-shell:not([hidden])) .process-proposal-form-grid { grid-template-columns:1fr; }
  body:has(#app-shell:not([hidden])) .process-model > header { align-items: stretch; flex-direction: column; }
  body:has(#app-shell:not([hidden])) .process-model-actions { justify-content: flex-start; }
  body:has(#app-shell:not([hidden])) .process-model-editor .bpmn-edit-row { flex-wrap: wrap; }
}

@media (max-width: 820px) {
  body:has(#app-shell:not([hidden])) .process-toolbar { grid-template-columns: 1fr 1fr; }
  body:has(#app-shell:not([hidden])) .process-toolbar label:nth-child(3) { grid-column: 1 / -1; }
  body:has(#app-shell:not([hidden])) .process-metrics { grid-template-columns: repeat(2, 1fr); }
  body:has(#app-shell:not([hidden])) .process-layout { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .process-detail-grid { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .process-detail-grid > section + section { border-top: 1px solid var(--work-line); border-left: 0; }
  body:has(#app-shell:not([hidden])) .process-case-insights { grid-template-columns: repeat(2,minmax(0,1fr)); }
  body:has(#app-shell:not([hidden])) .process-case-insights span:nth-child(2) { border-right: 0; }
  body:has(#app-shell:not([hidden])) .process-case-insights span:nth-child(n+3) { border-top: 1px solid var(--work-line); }
  body:has(#app-shell:not([hidden])) .process-timeline-disclosure article { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .meeting-routing-fields,
  body:has(#app-shell:not([hidden])) .meeting-requirements,
  body:has(#app-shell:not([hidden])) .meeting-logistics,
  body:has(#app-shell:not([hidden])) .workgroup-attendance { grid-template-columns: 1fr; }
  body:has(#app-shell:not([hidden])) .meeting-task-link { grid-template-columns: minmax(0, 1fr) auto; }
  body:has(#app-shell:not([hidden])) .meeting-task-link > span:nth-child(2) { grid-column: 1; }
  body:has(#app-shell:not([hidden])) .workgroup-decision { grid-template-columns: 36px minmax(0, 1fr) auto; }
  body:has(#app-shell:not([hidden])) .workgroup-decision > button { grid-column: 2 / -1; justify-self: start; }
}
