:root {
  color-scheme: dark;
  --bg: #090e10;
  --sidebar: #0b1314;
  --surface: #121a1c;
  --raised: #182326;
  --line: #28373b;
  --text: #ecf4f3;
  --muted: #8fa1a3;
  --accent: #66d4bd;
  --accent-ink: #081f1a;
  --warn: #e5b25c;
  --approval-badge: #e3c17a;
  --danger: #ed7870;
  --blue: #72b8ef;

  /* Design refresh 2026-09 (Figma WW6Q9X8CC4TR7sxnzzTsM0 · Color/Layout collections). */
  --sunken: #0e1719;
  --hover: #1a2b2e;
  --line-strong: #42635d;
  --text-secondary: #a4b5b7;
  --success: var(--accent);
  --accent-hover: #91d9c6;
  --accent-subtle: #142620;
  --accent-line: #2b5c52;
  --nav-active: var(--accent-subtle);
  --warn-subtle: #292419;
  --warn-line: #6b5733;
  --danger-subtle: #2a1716;
  --danger-line: #733d3b;
  --info-subtle: #122230;
  --info-line: #2c4d68;
  --badge: var(--danger);
  --stage-initiation: #72b8ef;
  --stage-script: #e48bb0;
  --stage-production: #8f9ff0;
  --stage-operations: var(--accent);
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --radius-full: 999px;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* Role-aware action overview; keep the existing dashboard and design tokens. */
.home-actions {margin:0 0 24px;padding:22px;border:1px solid var(--accent-line);border-radius:var(--radius-xl);background:linear-gradient(120deg,var(--accent-subtle),var(--surface) 52%)}
.home-actions-head {display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}
.home-actions-head .eyebrow {color:var(--accent);font:600 11px var(--font-mono);letter-spacing:.12em}
.home-actions-head h2 {margin:4px 0;font-size:22px}
.home-actions-head p {margin:0;color:var(--text-secondary)}
.home-actions-count {flex:none;padding:5px 10px;border:1px solid var(--accent-line);border-radius:var(--radius-full);color:var(--accent);font-weight:700}
.home-actions-grid {display:grid;grid-template-columns:minmax(0,1.3fr) minmax(0,1fr);gap:18px}
.home-actions-column {min-width:0;padding:16px;border:1px solid var(--line);border-radius:var(--radius-lg);background:var(--surface)}
.home-actions-column h3 {margin:0 0 10px;font-size:15px}
.home-actions-column h3 span {color:var(--muted);font-weight:400}
.home-action,.home-attention {display:flex;width:100%;min-height:64px;align-items:center;gap:10px;margin:0 0 8px;padding:10px 12px;text-align:left;background:var(--sunken)}
.home-action span:first-child {min-width:0;flex:1}
.home-action strong,.home-action small,.home-attention strong,.home-attention small {display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.home-action small,.home-attention small {color:var(--text-secondary)}
.home-action-arrow {color:var(--accent);font-size:19px}
.home-attention {display:grid;grid-template-columns:auto minmax(0,1fr);min-height:64px}
.home-attention small {grid-column:2}
.home-actions-empty {margin:8px 0;color:var(--text-secondary)}
.home-actions-more {width:100%;border:0;background:transparent;color:var(--accent);text-align:left}
.home-actions-extra {margin-top:8px}.home-actions-extra summary {padding:8px 2px;color:var(--accent);cursor:pointer}.home-actions-extra .home-action:first-of-type {margin-top:8px}
@media (max-width:850px) {.home-actions-grid {grid-template-columns:1fr}.home-actions-head {flex-wrap:wrap}.home-actions {padding:16px}}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 "Noto Sans SC", Inter, ui-sans-serif, system-ui, -apple-system, "PingFang SC", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  min-height: 36px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
}

button:hover {
  border-color: var(--line-strong);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
}

button.primary:hover:not(:disabled) {
  border-color: var(--accent-hover);
  background: var(--accent-hover);
}

button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

button.ghost:hover:not(:disabled) {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

button.danger {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: var(--danger);
}

button.danger:hover:not(:disabled) {
  border-color: var(--danger);
  background: var(--danger-subtle);
}

button:disabled {
  cursor: not-allowed;
  opacity: .45;
}

.boot {
  display: grid;
  min-height: 100vh;
  place-items: center;
  color: var(--muted);
}

.shell {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  min-height: 100vh;
}

.side {
  position: sticky;
  top: 0;
  display: flex;
  width: 248px;
  min-width: 0;
  height: 100vh;
  flex-direction: column;
  overflow: hidden;
  padding: 23px 21px 20px;
  border-right: 1px solid #152426;
  background: var(--sidebar);
}

.brand {
  display: flex;
  min-height: 36px;
  align-items: flex-start;
  gap: 10px;
  overflow: hidden;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  white-space: normal;
}

.brand-mark {
  display: block;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  border-radius: 10px;
}

.brand strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
  line-height: 1.15;
}

.brand-copy {
  min-width: 0;
}

.brand small,
.muted {
  color: var(--muted);
}

.brand small {
  display: block;
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.5;
}

.brand .brand-meta {
  display: block;
  margin-left: 0;
  color: #a7bab7;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
}

.side nav {
  display: grid;
  gap: 5px;
  margin: 18px -13px 0;
}

.side nav button {
  position: relative;
  display: flex;
  width: 100%;
  height: 48px;
  align-items: center;
  gap: 10px;
  padding: 0 13px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  text-align: left;
  font-size: 15px;
  line-height: 22px;
}

.side nav button:hover:not(.active) {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

.side nav button.active,
.side nav button.active:hover {
  border-color: transparent;
  background: var(--nav-active);
  color: var(--text);
  font-weight: 600;
}

.side nav button.active::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--accent);
  content: "";
  transform: translateY(-50%);
}

.nav-icon {
  display: block;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  background-color: currentColor;
  -webkit-mask: var(--nav-icon-mask) center / contain no-repeat;
  mask: var(--nav-icon-mask) center / contain no-repeat;
  mask-mode: alpha;
  pointer-events: none;
}

.side nav button.active .nav-icon {
  color: var(--accent);
}

.nav-icon-dashboard,
.nav-icon-calendar,
.nav-icon-metrics {
  background: none;
  -webkit-mask: none;
  mask: none;
}

.nav-icon-dashboard svg,
.nav-icon-calendar svg,
.nav-icon-metrics svg {
  display: block;
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.nav-icon-check {
  --nav-icon-mask: url('/icons/check.svg');
}

.nav-icon-risk {
  --nav-icon-mask: url('/icons/risk.svg');
}

.nav-icon-audit {
  --nav-icon-mask: url('/icons/audit.svg');
}

.nav-icon-account {
  --nav-icon-mask: url('/icons/account.svg');
}

.nav-icon-users {
  --nav-icon-mask: url('/icons/users.svg');
}

.side nav button > span:not(.nav-count) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  place-items: center;
  border-radius: 10px;
  background: var(--badge);
  color: #102823;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  /* Centre the digits' ink, not the CJK font's em box (which leaves them ~1.5px low). */
  text-box: trim-both cap alphabetic;
}

.account {
  display: grid;
  gap: 4px;
  margin-top: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.account strong {
  font-size: 14px;
}

.account small {
  color: var(--muted);
  font-size: 12px;
}

.account button {
  margin-top: 9px;
  padding: 0 9px;
  color: var(--muted);
  text-align: left;
  font-size: 12px;
}

.main {
  min-width: 0;
  padding: 32px 32px 50px;
}

.top {
  display: flex;
  min-height: 93px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.top > div:first-child {
  min-width: 0;
}

.eyebrow {
  color: var(--accent);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .14em;
}

.top h1 {
  margin: 4px 0;
  color: var(--text);
  font-size: 32px;
  font-weight: 700;
  line-height: 42px;
}

.top p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.action-button {
  width: 184px;
  min-height: 44px;
  flex: 0 0 184px;
  white-space: nowrap;
}

.button-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  margin-top: 20px;
}

.metric {
  display: flex;
  height: 122px;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.metric-head {
  display: flex;
  min-height: 18px;
  align-items: center;
  justify-content: space-between;
}

.metric small {
  color: var(--muted);
  font-size: 13px;
  line-height: 18px;
}

.metric strong {
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
  letter-spacing: 0;
}

.metric .metric-helper {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.metric-dot {
  display: block;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--accent);
}

.metric-dot.yellow {
  background: var(--warn);
}

.metric-dot.red {
  background: var(--danger);
}

.metric-dot.blue {
  background: var(--blue);
}

.data-quality-hint {
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.data-quality-hint > span:first-child {
  color: #e6c37f;
  font-weight: 600;
}

.data-quality-hint strong {
  color: var(--text);
  font-size: 12px;
}

.toolbar {
  display: flex;
  min-height: 34px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
}

.toolbar h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
}

.toolbar-meta {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

.toolbar .muted {
  font-size: 12px;
  line-height: 18px;
  text-align: right;
}

.scope-empty {
  margin-top: 10px;
  padding: 24px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.scope-empty strong {
  color: var(--text);
  font-size: 16px;
}

.scope-empty p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.stage-board {
  display: grid;
  gap: 8px;
  margin-top: 20px;
}

.stage-row {
  --stage-accent: #72b8ef;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 3px solid var(--stage-accent);
  border-radius: 12px;
  background: var(--surface);
}

.stage-rail {
  display: flex;
  min-width: 0;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 13px;
  border-right: 1px solid color-mix(in srgb, var(--stage-accent) 24%, var(--line));
  background: color-mix(in srgb, var(--stage-accent) 6%, var(--sidebar));
}

.stage-number {
  display: inline-grid;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  place-items: center;
  border: 1px solid #30454b;
  border-radius: 7px;
  background: #19272b;
  color: var(--stage-accent);
  font-size: 12px;
  font-weight: 700;
}

.stage-rail h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
  font-weight: 700;
  line-height: 22px;
}

.stage-rail-copy {
  min-width: 0;
}

.stage-rail p {
  max-width: 176px;
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.stage-count {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  margin-top: 8px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.stage-projects {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 360px), 360px));
  align-items: stretch;
  align-content: start;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  padding: 12px;
  background: transparent;
}

.stage-row.is-empty .stage-projects {
  min-height: 54px;
  align-items: center;
  overflow: hidden;
  padding: 0 14px;
  background: transparent;
}

.stage-empty {
  display: grid;
  width: 100%;
  min-height: 42px;
  place-items: center;
  padding: 8px;
  color: var(--muted);
  font-size: 12px;
}

.stage-script {
  --stage-accent: #e48bb0;
}

.stage-production {
  --stage-accent: #8f9ff0;
}

.stage-operations {
  --stage-accent: var(--accent);
}

.grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 12px;
}

.card {
  min-width: 0;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--surface);
}

.card.red {
  border-color: #733d3b;
}

.card.yellow {
  border-color: #6b5733;
}

.card.unknown {
  border-color: #475563;
}

.card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.card h3 {
  margin: 4px 0 0;
  color: var(--text);
  font-size: 18px;
  line-height: 1.2;
}

.project-card {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "head head"
    "meta meta"
    "current release"
    "progress progress"
    "signals signals"
    "footer footer";
  align-content: start;
  gap: 8px 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
}

.project-card.red,
.project-card.yellow,
.project-card.unknown {
  border-color: var(--line);
}

.project-card > header {
  grid-area: head;
  align-items: flex-start;
  min-width: 0;
}

.project-card > header > div {
  min-width: 0;
}

.project-card h3 {
  display: -webkit-box;
  overflow: hidden;
  margin: 0 0 2px;
  font-size: 15px;
  font-weight: 600;
  line-height: 21px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  text-overflow: ellipsis;
  white-space: normal;
}

.project-percent {
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
  line-height: 26px;
}

.project-card.yellow .project-percent {
  color: var(--warn);
}

.project-card.red .project-percent {
  color: var(--danger);
}

.code {
  color: var(--accent);
  font: 500 12px/18px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.badge {
  display: inline-flex;
  height: 24px;
  align-items: center;
  padding: 0 9px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.badge.red {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: #ff9994;
}

.badge.yellow {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
  color: #f5c270;
}

.card-meta {
  display: flex;
  min-width: 0;
  gap: 22px;
  overflow: hidden;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.card-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.project-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-area: meta;
  align-items: center;
  gap: 8px 12px;
  min-width: 0;
  color: var(--muted);
  font-size: 12px;
}

.project-meta span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

.project-current {
  display: flex;
  grid-area: current;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  color: var(--text);
  line-height: 18px;
}

.project-meta small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.project-meta strong {
  display: block;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.project-current .field-label,
.project-release-state .field-label {
  color: var(--muted);
  flex: 0 0 auto;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.project-progress {
  grid-area: progress;
}

.project-current strong,
.project-release-state strong {
  min-width: 0;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  line-height: 18px;
  overflow-wrap: anywhere;
}

.project-release-state {
  display: flex;
  grid-area: release;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
  line-height: 18px;
}

.progress-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.progress-label strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
}

.progress {
  height: 7px;
  overflow: hidden;
  border-radius: 99px;
  background: #212e30;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
}

.project-card.yellow .progress i {
  background: var(--warn);
}

.project-card.red .progress i {
  background: var(--danger);
}

.project-signals {
  display: flex;
  grid-area: signals;
  min-width: 0;
  flex-wrap: nowrap;
  gap: 6px;
}

.signal {
  display: inline-flex;
  max-width: 100%;
  align-items: center;
  min-height: 22px;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signal.good {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
}

.signal.warn {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
  color: #f0c27d;
}

.signal.danger {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: #f29e99;
}

.project-card footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-area: footer;
  min-width: 0;
  min-height: 0;
  align-items: flex-start;
  justify-content: stretch;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.project-card footer .risk-reason {
  display: block;
  min-width: 0;
  overflow: visible;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
  overflow-wrap: anywhere;
  white-space: normal;
}

.project-card.red footer .risk-reason {
  color: #f29e99;
}

.project-card.yellow footer .risk-reason {
  color: #f0c27d;
}

.project-card.unknown footer .risk-reason {
  color: #aeb9c2;
}

.project-card footer button {
  min-height: 26px;
  flex: 0 0 auto;
  align-self: flex-start;
  padding: 0 8px;
  border: 1px solid #2a5149;
  border-radius: 6px;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
}

.project-card footer button:hover {
  border-color: #417b70;
  color: #9be7d4;
}

.risk-reason {
  margin: 9px 0 0;
  color: #c9d2d1;
  font-size: 12px;
}

.panel {
  margin-top: 24px;
}

.phase-project {
  padding: 18px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.phase-project-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.phase-project-header h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
}

.phase-project-header p {
  margin: 4px 0 0;
  font-size: 11px;
}

.phase-date-source {
  flex: 0 0 auto;
  padding: 4px 8px;
  border: 1px solid #2c4843;
  border-radius: 999px;
  color: #b9dcd3;
  font-size: 10px;
}

.phase-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.phase-summary-card {
  position: relative;
  display: grid;
  min-width: 0;
  gap: 3px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1719;
}

.phase-summary-number {
  position: absolute;
  top: 10px;
  right: 10px;
  color: #6f8487;
  font-size: 10px;
}

.phase-summary-card h3 {
  margin: 0 0 3px;
  font-size: 13px;
}

.phase-summary-card small,
.phase-summary-facts small {
  color: var(--muted);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.phase-summary-card > strong {
  margin-top: 3px;
  color: #c8eee4;
  font-size: 12px;
}

.phase-summary-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.phase-summary-facts article {
  display: grid;
  min-width: 0;
  gap: 2px;
  padding: 10px 12px;
  border-left: 2px solid #31564e;
  background: #10191b;
}

.phase-summary-facts article > span {
  color: var(--muted);
  font-size: 10px;
}

.phase-summary-facts article > strong {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.phase-compatibility-note {
  margin: 12px 0 0;
  color: #c4d2d0;
  font-size: 11px;
}

.phase-compatibility-note strong {
  margin-right: 5px;
  color: var(--accent);
}

.legacy-disclosure {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #0e1517;
}

.legacy-disclosure > summary {
  padding: 12px 14px;
  color: #c8e6df;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.legacy-disclosure > summary:hover {
  color: var(--accent);
}

.legacy-disclosure > summary:focus-visible {
  outline-offset: -3px;
  border-radius: 9px;
}

.legacy-disclosure-note {
  margin: 0 14px 10px;
  color: var(--muted);
  font-size: 11px;
}

.execution-details > .timeline-list {
  margin: 0 12px 12px;
}

.execution-progress-details {
  margin: 0 12px 12px;
}

.execution-progress-details .table {
  margin: 0 12px 12px;
}

.timeline-list {
  display: grid;
  gap: 14px;
  margin-top: 24px;
}

.schedule-timeline {
  margin-top: 0;
  padding: 17px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.timeline-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.timeline-header h2 {
  margin: 4px 0 3px;
  color: var(--text);
  font-size: 16px;
  font-weight: 650;
}

.timeline-header p {
  margin: 0;
  font-size: 11px;
}

.timeline-header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.timeline-status {
  flex: 0 0 auto;
  padding: 5px 8px;
  border: 1px solid #2b5c52;
  border-radius: 999px;
  color: var(--accent);
  font-size: 11px;
  white-space: nowrap;
}

.timeline-status.pending {
  border-color: #6b5733;
  color: #f0c27d;
}

.timeline-scale {
  display: flex;
  justify-content: space-between;
  margin: 17px 0 5px 180px;
  color: var(--muted);
  font: 10px ui-monospace, SFMono-Regular, Menlo, monospace;
}

.timeline-rows {
  display: grid;
  gap: 6px;
}

.timeline-row {
  display: grid;
  grid-template-columns: 180px minmax(260px, 1fr) 190px;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 5px 0;
  border-top: 1px solid #1d2a2d;
}

.timeline-label {
  min-width: 0;
}

.timeline-label strong,
.timeline-label small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-label strong {
  color: var(--text);
  font-size: 11px;
}

.timeline-label small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
}

.timeline-track {
  position: relative;
  min-width: 0;
  height: 36px;
  border: 1px solid #24363a;
  border-radius: 7px;
  background-color: #0d1719;
  background-image: repeating-linear-gradient(90deg, transparent 0, transparent calc(20% - 1px), #1a2b2e calc(20% - 1px), #1a2b2e 20%);
}

.timeline-bar {
  position: absolute;
  top: 5px;
  height: 24px;
  min-width: 24px;
  overflow: hidden;
  padding: 0 7px;
  border-color: #328f7c;
  border-radius: 6px;
  background: #286b5d;
  color: #eafff9;
  font-size: 10px;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
  touch-action: none;
}

.timeline-bar:hover {
  border-color: var(--accent);
  background: #348d79;
}

.timeline-bar[disabled] {
  border-color: #526064;
  background: #374448;
  color: #d0d8d7;
  cursor: not-allowed;
  opacity: .72;
}

.timeline-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.timeline-controls label {
  gap: 3px;
  color: var(--muted);
  font-size: 9px;
}

.timeline-controls input {
  min-width: 0;
  padding: 6px 5px;
  font-size: 10px;
}

.timeline-hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.row {
  display: grid;
  grid-template-columns: 1.1fr .8fr .7fr .8fr 1.3fr auto;
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--line);
}

.row:last-child {
  border-bottom: 0;
}

.row.head {
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.table .row {
  font-variant-numeric: tabular-nums;
}

.table .row:not(.head):hover {
  background: var(--hover);
}

.row > span small {
  display: block;
  margin-top: 4px;
}

.progress-history {
  margin-top: 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.progress-history summary {
  cursor: pointer;
  color: var(--accent);
}

.progress-history article {
  margin-top: 6px;
  padding: 6px 8px;
  border-left: 2px solid var(--line);
  background: #101719;
}

.progress-history article p {
  margin: 3px 0 0;
}

.form-note {
  margin: -4px 0 2px;
  padding: 10px 11px;
  border: 1px solid #31534b;
  border-radius: 8px;
  background: #142620;
  color: #91d9c6;
  font-size: 12px;
  line-height: 1.55;
}

.preview-only-banner {
  margin: 0;
  padding: 12px;
  border: 1px solid #8a6735;
  border-radius: 9px;
  background: #332813;
  color: #f3d28c;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
}

.dialog-permission-error {
  margin: 0;
}

.schedule-proposal,
.schedule-pending,
.approval-proposal {
  color: #e2b656 !important;
}

.schedule-proposal {
  font-size: 11px;
  line-height: 1.45;
}

.schedule-pending {
  font-size: 12px;
  line-height: 1.45;
}

.row-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.row-actions button {
  padding: 0 9px;
  font-size: 12px;
}

.approval {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.approval:last-child {
  border-bottom: 0;
}

.approval-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border: 1px solid #31534b;
  border-radius: 12px;
  background: #10221e;
}

.approval-summary strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
  font-weight: 650;
}

.approval-summary p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.approval-summary-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 7px;
}

.summary-status {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.approval p {
  margin: 4px 0;
  color: var(--muted);
}

.approval .approval-proposal {
  color: #e2b656;
  font-size: 12px;
  line-height: 1.5;
}

.actions {
  display: flex;
  gap: 7px;
}

.empty,
.stage-empty {
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.empty {
  padding: 38px;
}

.stage-empty {
  padding: 14px;
}

.audit-table {
  --audit-columns: minmax(0, .45fr) minmax(0, 1.25fr) minmax(0, 1.35fr) minmax(0, .9fr) minmax(0, 1.35fr) minmax(0, 1.5fr) minmax(0, .9fr);
}

.row.audit-head,
.audit-row {
  grid-template-columns: var(--audit-columns);
}

.audit-row {
  align-items: start;
}

.audit-details {
  min-width: 0;
}

@media (min-width: 901px) {
  .audit-details[open] {
    grid-column: 1 / -1;
  }
}

.audit-row strong,
.audit-row .audit-object,
.audit-row > [data-label="操作人"],
.audit-row time,
.audit-row .audit-summary,
.audit-details summary {
  min-width: 0;
  overflow-wrap: anywhere;
}

.audit-row time,
.audit-row .audit-summary {
  color: var(--muted);
  font-size: 11px;
}

.audit-details summary {
  color: var(--accent);
  cursor: pointer;
  font-size: 11px;
}

.audit-details pre {
  max-width: 100%;
  max-height: 280px;
  margin: 8px 0 0;
  padding: 10px;
  overflow: auto;
  border: 1px solid #27383b;
  border-radius: 7px;
  background: #0b1315;
  color: var(--muted);
  font: 11px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: pre;
}

.audit-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.audit-sequence {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.audit-row small {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 11px;
}

dialog {
  width: min(570px, calc(100vw - 40px));
  padding: 0;
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 30px 100px #000c;
}

dialog::backdrop {
  background: #020607cc;
  backdrop-filter: blur(5px);
}

form {
  display: grid;
  gap: 14px;
}

dialog form {
  padding: 24px;
}

form h2 {
  margin: 0;
}

label {
  display: grid;
  gap: 6px;
  color: var(--text-secondary);
}

input,
select,
textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
  color: var(--text);
}

input:hover:not(:disabled),
select:hover:not(:disabled),
textarea:hover:not(:disabled) {
  border-color: var(--line-strong);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  border-color: var(--accent);
}

textarea {
  min-height: 84px;
  resize: vertical;
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 5px;
}

.form-actions button {
  min-width: 92px;
}

.notice {
  margin: 18px 0 0;
  padding: 11px 13px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--accent-subtle);
  color: var(--accent-hover);
}

.notice.error,
.error {
  border-color: #713e39;
  background: #2a1b1a;
  color: #f1a39d;
}

.login-card {
  width: min(420px, 90vw);
}

.error-text {
  min-height: 22px;
  color: #f1a39d;
}

@media (max-width: 1180px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  /* Keep feedback and completion visible when six columns no longer fit. */
  .execution-progress-details .row.head {
    display: none;
  }

  .execution-progress-details .row:not(.head) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    overflow-wrap: anywhere;
  }

  .execution-progress-details .row:not(.head) > * {
    display: block;
    min-width: 0;
  }

  .execution-progress-details .row:not(.head) > :first-child,
  .execution-progress-details .row:not(.head) > .row-actions {
    grid-column: 1 / -1;
  }

  .execution-progress-details .row:not(.head) > .row-actions {
    display: flex;
    flex-wrap: wrap;
  }

  .execution-progress-details .row:not(.head) > :nth-child(2)::before,
  .execution-progress-details .row:not(.head) > :nth-child(3)::before,
  .execution-progress-details .row:not(.head) > :nth-child(4)::before,
  .execution-progress-details .row:not(.head) > :nth-child(5)::before,
  .execution-progress-details .row:not(.head) > :nth-child(6)::before,
  .execution-progress-details .row:not(.head) > :nth-child(7)::before {
    display: block;
    margin-bottom: 3px;
    color: var(--muted);
    font-size: 11px;
  }

  /* Column order since 管理能力第一批 (Figma 55:1048): 节点, 负责人, 计划, 承诺完成, 实际完成, 延期, 部门反馈, 操作. */
  .execution-progress-details .row:not(.head) > :nth-child(2)::before { content: "负责人"; }
  .execution-progress-details .row:not(.head) > :nth-child(3)::before { content: "计划"; }
  .execution-progress-details .row:not(.head) > :nth-child(4)::before { content: "承诺完成"; }
  .execution-progress-details .row:not(.head) > :nth-child(5)::before { content: "实际完成"; }
  .execution-progress-details .row:not(.head) > :nth-child(6)::before { content: "延期"; }
  .execution-progress-details .row:not(.head) > :nth-child(7)::before { content: "部门反馈"; }
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
    align-content: start;
  }

  .side {
    position: static;
    width: 100%;
    height: auto;
    overflow: visible;
  }

  .side nav {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin: 18px 0 0;
  }

  .account {
    margin-top: 16px;
  }

  .main {
    padding: 24px 22px 42px;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .stage-row {
    grid-template-columns: minmax(160px, 200px) minmax(0, 1fr);
  }

  .stage-projects {
    grid-template-columns: minmax(0, 1fr);
  }

  .stage-projects .project-card {
    width: 100%;
  }

  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .row {
    grid-template-columns: 1fr 1fr;
  }

  .row > :nth-child(n + 5) {
    display: none;
  }

  .audit-row {
    grid-template-columns: 1fr 1fr;
  }

  .audit-head {
    display: none;
  }

  .audit-row > * {
    display: block !important;
  }

  .audit-row > [data-label]::before {
    content: attr(data-label) "：";
    color: var(--muted);
    font-size: 10px;
  }

  .audit-summary,
  .audit-details { grid-column: 1 / -1; }

  .row-actions {
    justify-content: flex-start;
  }

  .timeline-row {
    grid-template-columns: 150px minmax(220px, 1fr) 170px;
  }

  .timeline-scale {
    margin-left: 150px;
  }

  .phase-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .side {
    padding: 12px 14px 10px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .brand strong {
    font-size: 14px;
  }

  .side nav {
    display: flex;
    min-width: 0;
    gap: 6px;
    margin: 10px 0 0;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .side nav::-webkit-scrollbar {
    display: none;
  }

  .side nav button {
    width: auto;
    min-width: max-content;
    height: 38px;
    min-height: 38px;
    flex: 0 0 auto;
    gap: 6px;
    padding: 0 9px;
    font-size: 12px;
  }

  .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .nav-count {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .account {
    display: flex;
    min-height: 30px;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    padding-top: 8px;
  }

  .account button {
    min-height: 29px;
    margin: 0 0 0 auto;
  }

  .main {
    padding: 18px 14px 34px;
  }

  .toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
    row-gap: 6px;
  }

  .toolbar-meta {
    width: 100%;
    align-items: flex-start;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .toolbar-meta .muted {
    text-align: left;
  }

  .top {
    display: block;
  }

  .top .action-button {
    width: 100%;
    max-width: none;
    flex-basis: auto;
    min-height: 44px;
    margin-top: 14px;
    white-space: nowrap;
  }

  .metrics,
  .grid {
    grid-template-columns: 1fr;
  }

  .stage-row {
    grid-template-columns: 1fr;
    border-left-width: 2px;
  }

  .stage-rail {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .stage-projects {
    grid-template-columns: 1fr;
    padding: 10px;
  }

  .stage-row.is-empty .stage-projects {
    min-height: 46px;
    padding: 0 10px;
  }

  .project-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "meta"
      "current"
      "release"
      "progress"
      "signals"
      "footer";
    gap: 10px;
    padding: 14px;
  }

  .stage-row[data-project-count] .project-card {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "head"
      "meta"
      "current"
      "release"
      "progress"
      "signals"
      "footer";
    gap: 9px;
  }

  .project-meta {
    gap: 10px;
  }

  .project-card footer {
    gap: 8px;
  }

  .approval {
    grid-template-columns: 1fr;
  }

  .approval .actions {
    justify-content: flex-start;
  }

  .approval-summary {
    display: block;
    align-items: flex-start;
    min-width: 0;
    padding: 13px;
  }

  .approval-summary > div:first-child {
    min-width: 0;
  }

  .approval-summary strong {
    font-size: 16px;
  }

  .approval-summary-actions {
    margin-top: 10px;
  }

  .view-approvals .top h1 {
    font-size: 24px;
  }

  .view-approvals .top p {
    max-width: 34em;
  }

  .timeline-header {
    display: block;
  }

  .timeline-header-actions {
    justify-content: flex-start;
    margin-top: 9px;
  }

  .timeline-status {
    display: inline-flex;
  }

  .timeline-scale {
    margin-left: 0;
  }

  .timeline-row {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 9px 0;
  }

  .timeline-track {
    min-height: 34px;
  }

  .timeline-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .phase-project {
    padding: 13px;
  }

  .phase-project-header {
    display: block;
  }

  .phase-date-source {
    display: inline-block;
    margin-top: 8px;
  }

  .phase-summary-grid {
    gap: 7px;
  }

  .phase-summary-card {
    padding: 10px;
  }

  .phase-summary-facts {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .execution-details > .timeline-list {
    margin-right: 7px;
    margin-left: 7px;
  }

  .execution-progress-details {
    margin-right: 7px;
    margin-left: 7px;
  }

  .execution-progress-details .table {
    margin-right: 7px;
    margin-left: 7px;
  }

  .audit-row {
    grid-template-columns: 1fr;
  }

  .audit-summary,
  .audit-details { grid-column: auto; }

  .audit-row > * {
    display: block !important;
  }

  dialog form {
    padding: 19px;
  }
}

.public-shell {
  display: grid;
  min-height: 100vh;
  place-items: start center;
  padding: 42px 18px;
  background: radial-gradient(ellipse at 50% 0, #14221f 0, var(--bg) 54%);
}

.public-card {
  width: min(560px, 100%);
  padding: 28px;
}

.public-card h1 {
  margin: 7px 0 9px;
  font-size: 27px;
  line-height: 1.2;
}

.public-card > p {
  line-height: 1.6;
}

.public-form {
  margin-top: 22px;
}

.public-form button {
  min-height: 42px;
}

.auth-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.auth-links a,
.guide-toc a {
  color: var(--accent);
  text-decoration: none;
}

.auth-links a:hover,
.guide-toc a:hover {
  text-decoration: underline;
}

.form-status,
.login-info {
  min-height: 1.5em;
  margin: 0;
}

.success-text {
  color: var(--accent);
}

.login-info {
  color: var(--accent);
  font-size: 12px;
}

.field-help {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.guide-shell {
  padding-bottom: 72px;
}

.guide-card {
  width: min(860px, 100%);
}

.guide-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin: 22px 0 28px;
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #0e1719;
  font-size: 12px;
}

.guide-section {
  scroll-margin-top: 20px;
  margin-top: 25px;
}

.guide-section h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

.guide-section p,
.guide-section li {
  color: #c1cfcd;
  font-size: 13px;
  line-height: 1.75;
}

.guide-section ol,
.guide-section ul {
  padding-left: 22px;
}

.guide-section li + li {
  margin-top: 5px;
}

.guide-warning,
.scope-warning {
  padding: 12px 14px;
  border: 1px solid #755636;
  border-radius: 9px;
  background: #2a2116;
  color: #f1ca84;
  font-size: 12px;
  line-height: 1.6;
}

.guide-warning p {
  margin: 5px 0 0;
  color: #e3c995;
}

/* V2 account screen: Figma 30:304. Scoped while other screens await parity. */
.view-account {
  --muted: #a4b5b7;
  font-size: 16px;
  line-height: 1.625;
}

.view-account .top { margin-bottom: 32px; }
.view-account .top h1 { font-size: 32px; line-height: 44px; }
.view-account .top p { font-size: 16px; line-height: 26px; }
.view-account .eyebrow { font-size: 14px; line-height: 22px; }

.view-account .account-card { padding: 24px; }
.view-account .account-card h2 { margin: 0 0 20px; font-size: 20px; line-height: 30px; }
.view-account .account-card h3 { font-size: 18px; line-height: 28px; }
.view-account .account-facts { gap: 20px 32px; }
.view-account .account-facts div { padding: 0; border: 0; background: transparent; }
.view-account .account-facts dt { font-size: 14px; line-height: 22px; }
.view-account .account-facts dd { font-size: 16px; line-height: 26px; }
.view-account .account-security-layout {
  display: grid;
  grid-template-columns: minmax(0, 616fr) minmax(0, 456fr);
  align-items: start;
  gap: 32px;
  margin-top: 32px;
}
.view-account .account-security-layout > * { min-width: 0; margin: 0; }
.view-account .account-form { display: grid; gap: 24px; margin-top: 28px; max-width: 480px; }
.view-account .account-form label { display: grid; gap: 8px; font-size: 16px; line-height: 24px; }
.view-account .account-form input { width: 100%; min-width: 0; min-height: 52px; padding: 12px 16px; background: var(--bg); font-size: 16px; }
.view-account .account-form input::placeholder { color: var(--muted); opacity: 1; }
.view-account .account-form .form-actions { justify-content: flex-start; margin-top: 8px; }
.view-account .account-form button { min-height: 48px; padding: 0 24px; font-size: 16px; }
.view-account #password-requirements { font-size: 14px; line-height: 22px; }
.view-account .account-permission-help p { margin: 24px 0 0; overflow-wrap: anywhere; }

@media (max-width: 1100px) {
  .view-account .account-security-layout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .view-account .account-card { padding: 20px; }
  .view-account .account-facts { grid-template-columns: minmax(0, 1fr); }
  .view-account .account-form button { width: 100%; }
}

.account-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.account-card h2,
.reset-code-panel h2 {
  margin: 5px 0 8px;
  font-size: 18px;
}

.account-card h3 {
  margin: 9px 0 3px;
  font-size: 15px;
}

.account-card p {
  margin: 6px 0;
}

.account-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0 0;
}

.account-facts div {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0e1618;
}

.account-facts dt {
  color: var(--muted);
  font-size: 11px;
}

.account-facts dd {
  margin: 4px 0 0;
  overflow-wrap: anywhere;
  font-size: 13px;
}

.account-form {
  margin-top: 15px;
}

.account-form select[multiple] {
  min-height: 94px;
  padding: 6px;
}

.account-form .check-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 12px;
}

.account-form .check-label input {
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  margin: 0;
  accent-color: var(--accent);
}

#progress-form [hidden] { display: none !important; }
.account-form [hidden] {
  display: none !important;
}

.global-confirm-field {
  max-width: 440px;
}

.scope-warning {
  margin: 0;
}

.scope-warning code {
  color: #fff0c8;
  font-weight: 700;
}

.account-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
}

.section-heading p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.reset-code-panel {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border: 1px solid #755636;
  border-radius: 12px;
  background: #211d16;
}

.reset-code-panel p {
  color: #dfd0b0;
  font-size: 12px;
}

.reset-code {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 12px 0;
  padding: 11px 13px;
  overflow-wrap: anywhere;
  border: 1px solid #84663c;
  border-radius: 8px;
  background: #100f0c;
  color: #ffe1a5;
  font: 13px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
  user-select: all;
}

@media (max-width: 560px) {
  .public-shell {
    padding: 18px 12px 40px;
  }

  .public-card {
    padding: 19px;
  }

  .public-card h1 {
    font-size: 23px;
  }

  .account-card {
    padding: 14px;
  }

  .account-facts {
    grid-template-columns: 1fr;
  }

  .account-form .form-actions {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .account-form .form-actions button {
    flex: 1 1 160px;
  }

  .reset-code-panel {
    flex-direction: column;
  }
}

.side-help-label {
  margin-top: 22px;
  padding: 10px 12px 5px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.side-guide {
  display: flex;
  min-height: 40px;
  align-items: center;
  gap: 11px;
  padding: 0 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: #b8c7c7;
  font-size: 13px;
  text-decoration: none;
}

.side nav .side-guide {
  min-height: 48px;
  padding: 0 13px;
  color: var(--muted);
  font-size: 15px;
}

.side nav .side-guide:hover {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

.side-guide:hover,
.side-guide.active {
  border-color: #294944;
  background: #101f1d;
  color: #e1f3ef;
}

.mobile-menu-toggle,
.mobile-bottom-nav,
.mobile-stage-filters {
  display: none;
}

.schedule-empty-table {
  margin-top: 20px;
}

.schedule-empty-table .row.head {
  grid-template-columns: minmax(210px, 1.8fr) repeat(3, minmax(120px, .9fr)) minmax(90px, .7fr) minmax(125px, 1fr);
  gap: 12px;
}

.schedule-empty-state {
  display: flex;
  min-height: 300px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 36px 24px;
  text-align: center;
}

.schedule-empty-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--raised);
  color: var(--accent);
  font-size: 22px;
}

.schedule-empty-state h2 {
  margin: 15px 0 0;
  color: var(--text);
  font-size: 18px;
}

.schedule-empty-state p {
  max-width: 620px;
  margin: 9px 0 18px;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.schedule-empty-state button {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  gap: 10px;
  padding: 0 18px;
  border: 1px solid #3c8b7b;
  border-radius: 9px;
  background: #142722;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.schedule-empty-state button:hover {
  background: #1a3931;
}

.schedule-empty-state button span {
  color: var(--accent);
}

.schedule-empty-guidance {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 16px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--muted);
}

.schedule-empty-guidance > span {
  display: grid;
  width: 24px;
  height: 24px;
  flex: 0 0 24px;
  place-items: center;
  border-radius: 50%;
  background: var(--raised);
  color: var(--info);
  font-size: 13px;
  font-weight: 700;
}

.schedule-empty-guidance p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

@media (max-width: 560px) {
  .side {
    position: sticky;
    z-index: 30;
    top: 0;
    display: block;
    padding: 13px 18px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgb(0 0 0 / 14%);
  }

  .brand {
    display: grid;
    min-height: 50px;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    margin-top: 2px;
    font-size: 11px;
  }

  .brand .brand-meta {
    display: block;
    margin-left: 0;
    font-size: 10px;
  }

  .mobile-menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--raised);
    color: var(--text);
    font-size: 19px;
  }

  .side nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
  }

  .side.menu-open nav {
    display: grid;
  }

  .side nav button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12px;
  }

  .side-help-label,
  .side-guide,
  .account {
    display: none;
  }

  .side.menu-open .side-help-label {
    display: block;
    margin-top: 12px;
    padding: 10px 2px 5px;
  }

  .side.menu-open .side-guide {
    display: flex;
    min-height: 44px;
    margin-top: 0;
  }

  .side.menu-open .account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
  }

  .side.menu-open .account button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 40px;
    margin: 0;
  }

  .main {
    padding: 18px 18px calc(102px + env(safe-area-inset-bottom));
  }

  .eyebrow {
    display: none;
  }

  .top h1 {
    margin-top: 0;
  }

  .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
  }

  .data-quality-hint {
    min-height: 26px;
    flex-wrap: wrap;
    gap: 4px 7px;
    font-size: 11px;
  }

  .metric {
    height: 96px;
    padding: 12px 13px 11px;
  }

  .metric strong {
    font-size: 26px;
  }

  .stage-count {
    display: none;
  }

  .toolbar {
    min-height: 30px;
    align-items: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .toolbar-meta {
    width: auto;
    flex: 0 1 auto;
    margin-left: auto;
    gap: 0;
  }

  .toolbar-meta .data-quality-hint {
    min-height: 0;
    flex-wrap: nowrap;
    gap: 4px;
    white-space: nowrap;
  }

  .toolbar-meta .muted {
    display: none;
  }

  .mobile-stage-filters {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
    margin: 0;
    overflow: visible;
  }

  .mobile-stage-filters button {
    display: flex;
    min-width: 0;
    min-height: 34px;
    align-items: center;
    justify-content: center;
    gap: 5px;
    padding: 0 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    white-space: nowrap;
  }

  .mobile-stage-filters button.active {
    border-color: var(--accent);
    background: #15332e;
    color: var(--accent);
  }

  .mobile-stage-filters button span {
    font-size: 10px;
    opacity: .82;
  }

  .stage-board {
    margin-top: 10px;
  }

  .stage-row {
    display: block;
    overflow: visible;
    border: 0;
    background: transparent;
  }

  .stage-row.is-empty {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--line);
    border-left: 3px solid var(--stage-accent);
    background: var(--surface);
  }

  .stage-rail {
    display: none;
  }

  .stage-projects {
    grid-template-columns: minmax(0, 1fr);
    padding: 0;
  }

  .stage-projects .project-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "head head"
      "meta meta"
      "current release"
      "progress progress"
      "signals signals"
      "footer footer";
    gap: 4px 8px;
    padding: 10px;
    border-left: 3px solid var(--stage-accent);
    background: var(--surface);
  }

  .stage-row[data-project-count] .project-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-areas:
      "head head"
      "meta meta"
      "current release"
      "progress progress"
      "signals signals"
      "footer footer";
    gap: 4px 8px;
    padding: 10px;
  }

  .stage-projects .project-card footer {
    padding-top: 4px;
  }

  .project-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 14px;
  }

  .project-meta span {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 5px;
  }

  .project-meta small {
    font-size: 11px;
    line-height: 16px;
  }

  .project-meta strong {
    font-size: 12px;
    line-height: 16px;
  }

  .stage-row.mobile-filter-hidden {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(74px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 7px 12px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--sidebar);
    box-shadow: 0 -8px 20px rgb(0 0 0 / 12%);
  }

  .mobile-bottom-nav button,
  .mobile-bottom-nav a {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-bottom-nav button > span,
  .mobile-bottom-nav a > span {
    font-size: 18px;
    line-height: 1.1;
  }

  .mobile-bottom-nav small {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav .active {
    color: var(--accent);
  }

  .schedule-empty-table .row.head {
    display: none;
  }

  .schedule-empty-state {
    min-height: 290px;
    padding: 28px 20px;
  }

  .schedule-empty-state p {
    font-size: 13px;
  }

  .schedule-empty-guidance {
    align-items: flex-start;
    padding: 12px;
  }
}

@media (max-width: 360px) {
  .toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .toolbar-meta {
    width: 100%;
    flex: 1 1 100%;
    margin-left: 0;
    justify-content: flex-start;
  }

  .toolbar-meta .data-quality-hint {
    flex-wrap: wrap;
    white-space: normal;
  }
}

/* Decision-first presentation for the four management review pages. */
.schedule-section-heading,
.risk-section-heading,
.audit-section-heading {
  margin-top: 28px;
}

.schedule-section-heading + .phase-project {
  margin-top: 14px;
}

.phase-project {
  padding: 20px 22px;
  border-color: #304145;
  background: #151f21;
  scroll-margin-top: 20px;
}

.phase-project.is-focused {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent);
}

.phase-project-header {
  align-items: center;
}

.phase-project-header h2 {
  font-size: 19px;
  line-height: 1.35;
}

.phase-project-header p {
  margin-top: 6px;
  font-size: 13px;
}

.phase-project-target {
  display: grid;
  flex: 0 0 auto;
  gap: 3px;
  text-align: right;
}

.phase-project-target span,
.phase-lead-fact span {
  color: var(--muted);
  font-size: 12px;
}

.phase-project-target strong {
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}

.phase-summary-grid {
  gap: 8px;
  margin-top: 18px;
}

.phase-summary-card {
  min-height: 101px;
  gap: 5px;
  padding: 13px 15px;
  background: #10191b;
}

.phase-summary-card.is-current {
  border-color: #4b9e8e;
  background: #132a27;
}

.phase-summary-card h3 {
  font-size: 15px;
}

.phase-summary-card small {
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.phase-summary-card > strong {
  font-size: 14px;
}

.phase-project-footer {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 16px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.phase-lead-fact {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.phase-lead-fact strong {
  color: var(--accent);
  font-size: 22px;
  line-height: 1;
}

.phase-lead-fact small,
.phase-project-secondary {
  color: var(--muted);
  font-size: 12px;
}

.phase-project-secondary {
  display: flex;
  align-items: center;
  gap: 12px;
}

.phase-date-source {
  font-size: 11px;
}

.execution-details {
  margin-top: 22px;
}

.execution-details > summary,
.approval-history > summary,
.risk-method > summary,
.audit-older > summary {
  padding: 15px 18px;
  font-size: 14px;
}

.approval-summary {
  align-items: flex-end;
  padding: 20px 22px;
  border-color: #705832;
  background: #241f17;
}

.approval-summary.is-empty {
  border-color: var(--line);
  background: var(--surface);
}

.approval-summary.is-empty .approval-queue-label {
  color: var(--muted);
}

.approval-queue-label {
  color: var(--approval-badge);
  font-size: 13px;
  font-weight: 700;
}

.approval-summary strong {
  margin-top: 9px;
  font-size: 21px;
}

.approval-summary-meta {
  display: block;
  margin-top: 7px;
  color: #c1cec9;
  font-size: 12px;
}

.approval-summary p {
  max-width: 70ch;
  margin-top: 6px;
  color: #dbd0bc;
  font-size: 14px;
  line-height: 1.55;
}

.preview-only-note {
  display: block;
  margin-top: 10px;
  color: #a8c7df;
  font-size: 12px;
}

.approval-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.approval-list h2 {
  margin: 0;
  padding: 16px 18px 0;
  font-size: 16px;
}

.approval-history {
  margin-top: 28px;
}

.approval-history-list {
  border-top: 1px solid var(--line);
}

.approval {
  padding: 17px 19px;
}

.approval-content {
  min-width: 0;
}

.approval-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.approval-title strong {
  font-size: 15px;
}

.approval-project {
  color: #c8d6d3 !important;
  font-size: 13px;
}

.approval-request-note,
.approval-decision-note,
.approval-release-state {
  font-size: 13px;
  line-height: 1.55;
}

.approval-past {
  background: #121a1c;
}

.decision-separation-note {
  margin-top: 15px;
  color: var(--muted);
  font-size: 12px;
}

.risk-overview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.risk-overview-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--surface);
}

.risk-overview-item strong {
  font-size: 27px;
  font-variant-numeric: tabular-nums;
}

.risk-overview-item span {
  color: #c9d4d2;
  font-size: 14px;
}

.risk-overview-item.red strong { color: var(--danger); }
.risk-overview-item.yellow strong { color: var(--warn); }
.risk-overview-item.unknown strong { color: var(--blue); }

.risk-project-list {
  display: grid;
  gap: 12px;
  max-width: 1180px;
  margin-top: 15px;
}

.risk-project {
  padding: 19px 21px;
  border: 1px solid var(--line);
  border-left: 3px solid #5c7180;
  border-radius: 11px;
  background: var(--surface);
}

.risk-project.red { border-left-color: var(--danger); }
.risk-project.yellow { border-left-color: var(--warn); }
.risk-project.green { border-left-color: var(--accent); }

.risk-project-main {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.risk-status {
  color: var(--blue);
  font-size: 12px;
  font-weight: 700;
}

.risk-project.red .risk-status { color: var(--danger); }
.risk-project.yellow .risk-status { color: var(--warn); }
.risk-project.green .risk-status { color: var(--accent); }

.risk-project h3 {
  margin: 5px 0;
  font-size: 18px;
}

.risk-project-main p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.risk-primary-reason {
  margin: 15px 0 0;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  color: #d2ddda;
  font-size: 14px;
}

.risk-more {
  margin-top: 10px;
  color: var(--muted);
  font-size: 13px;
}

.risk-more summary { color: var(--accent); cursor: pointer; }
.risk-more li { margin: 6px 0; }
.risk-method { max-width: 1180px; margin-top: 20px; }

.audit-feed {
  display: grid;
  gap: 9px;
  max-width: 1180px;
  margin-top: 15px;
}

.audit-event {
  display: grid;
  grid-template-columns: 50px minmax(0, 1fr);
  gap: 14px;
  padding: 17px 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.audit-sequence {
  padding-top: 3px;
  font-size: 13px;
}

.audit-event-head,
.audit-event-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.audit-event-head strong { font-size: 16px; }
.audit-event-head time,
.audit-event-foot { color: var(--muted); font-size: 12px; }
.audit-object { margin: 6px 0 0; color: #c8d5d2; font-size: 14px; }
.audit-event .audit-summary { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.audit-event-foot { margin-top: 12px; }
.audit-event .audit-details summary { font-size: 13px; }
.audit-event .audit-details[open] { display: block; }
.audit-event .audit-details p { margin: 10px 0 0; }
.audit-older { max-width: 1180px; margin-top: 15px; }
.audit-older .audit-feed { margin: 0; padding: 12px; }

@media (max-width: 900px) {
  .phase-project-header,
  .phase-project-footer,
  .risk-project-main,
  .audit-event-head,
  .audit-event-foot {
    align-items: flex-start;
    flex-direction: column;
  }

  .phase-project-target { text-align: left; }
  .phase-lead-fact,
  .phase-project-secondary { flex-wrap: wrap; }
  .risk-overview { grid-template-columns: 1fr; }
  .risk-project-main button { width: 100%; }
  .audit-event { grid-template-columns: 1fr; }
  .audit-event .audit-sequence { display: block; }
}
.view-accounts { font-size: 16px; line-height: 1.6; }
.view-accounts h1 { font-size: 32px; line-height: 44px; }
.view-accounts h2 { font-size: 20px; line-height: 30px; }
.view-accounts .muted, .view-accounts .field-help { color: #a4b5b7; font-size: 14px; }
.view-accounts .account-editor-row { padding: 0; overflow: hidden; }
.view-accounts .account-editor-row > summary { display: flex; align-items: center; gap: 16px; min-height: 88px; padding: 16px 24px; cursor: pointer; list-style: none; }
.view-accounts .account-editor-row > summary::-webkit-details-marker { display: none; }
.view-accounts .account-editor-row > summary:focus-visible { outline: 2px solid #66d4bd; outline-offset: -3px; }
.view-accounts .account-row-identity { display: grid; gap: 4px; flex: 1; min-width: 0; overflow-wrap: anywhere; }
.view-accounts .account-row-identity strong { font-size: 16px; }
.view-accounts .account-row-action { color: #66d4bd; white-space: nowrap; }
.view-accounts .account-editor-row[open] > summary { background: #182326; border-bottom: 1px solid #28373b; }
.view-accounts .account-editor-body { padding: 24px; max-width: 680px; }
.view-accounts .account-editor-body input:not([type=checkbox]), .view-accounts .account-editor-body select { min-height: 48px; font-size: 16px; }
.view-accounts .account-editor-body button { min-height: 48px; font-size: 16px; }
@media(max-width:600px) {
 .view-accounts .account-editor-row > summary { flex-wrap: wrap; padding: 16px; gap: 8px; }
 .view-accounts .account-row-identity { flex-basis: 100%; }
 .view-accounts .account-row-action { margin-left: auto; }
 .view-accounts .account-editor-body { padding: 16px; }
}
.view-accounts .account-permission-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(560px,100vw); max-width: 100vw; height: 100dvh; max-height: 100dvh; box-sizing: border-box; padding: 32px; border: 1px solid #28373b; border-radius: 12px 0 0 12px; background: #121a1c; color: #ecf4f3; overflow-y: auto; }
.view-accounts .account-permission-drawer::backdrop { background: #0009; }
.view-accounts .account-permission-drawer > header { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.view-accounts .account-permission-drawer h2 { margin: 0; overflow-wrap: anywhere; }
.view-accounts .account-permission-drawer .account-editor-body { padding: 24px 0 0; }
.view-accounts .account-list-filters { display: grid; grid-template-columns: minmax(0,1fr) 176px 176px; gap: 24px; margin: 24px 0; }
.view-accounts .account-list-filters label { display: grid; gap: 8px; }
.view-accounts .account-list-filters input, .view-accounts .account-list-filters select { min-width: 0; width: 100%; min-height: 48px; font-size: 16px; }
.view-accounts .account-editor-row[hidden] { display: none; }
@media(max-width:700px) { .view-accounts .account-list-filters { grid-template-columns: 1fr; gap: 12px; } }
.view-accounts .account-protected-row { display: flex; align-items: center; gap: 24px; min-height: 88px; padding: 24px; }
.view-accounts .account-protected-section { border-top: 1px solid var(--line); padding-top: 24px; }
.view-accounts #account-filter-empty[hidden] { display: none; }
.view-accounts .account-permission-drawer .account-form { padding: 0; }
.view-accounts .account-permission-drawer > .field-help { margin: 16px 0 0; }
@media(max-width:600px) { .view-accounts .account-protected-row { flex-wrap: wrap; padding: 16px; } }

/* Figma V2 schedule: readable summaries and detail rows, unchanged date geometry. */
.view-schedule { font-size: 16px; line-height: 26px; --muted: #a4b5b7; }
.view-schedule .top h1 { font-size: 32px; line-height: 44px; }
.view-schedule .top p { font-size: 16px; line-height: 26px; }
.view-schedule h2 { font-size: 20px; line-height: 30px; }
.view-schedule .phase-project { padding: 24px; margin-top: 24px; }
.view-schedule .phase-project-header p, .view-schedule .phase-project-target span { font-size: 14px; line-height: 22px; }
.view-schedule .phase-project-target strong { font-size: 18px; line-height: 28px; }
.view-schedule .phase-summary-grid { gap: 16px; margin-top: 24px; }
.view-schedule .phase-summary-card { min-height: 150px; padding: 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.view-schedule .phase-summary-card h3 { font-size: 18px; line-height: 28px; }
.view-schedule .phase-summary-card > strong { order: 1; font-size: 32px; line-height: 44px; }
.view-schedule .phase-summary-card small { order: 2; font-size: 14px; line-height: 22px; }
.view-schedule .phase-project-footer { flex-wrap: wrap; padding-top: 24px; margin-top: 24px; }
.view-schedule .phase-lead-fact { flex-wrap: wrap; }
.view-schedule .phase-lead-fact span, .view-schedule .phase-lead-fact small, .view-schedule .phase-project-secondary, .view-schedule .phase-date-source { font-size: 14px; line-height: 22px; }
.view-schedule .phase-project-secondary { flex-wrap: wrap; }
.view-schedule .legacy-disclosure > summary { font-size: 16px; line-height: 26px; padding: 20px 24px; }
.view-schedule .legacy-disclosure-note, .view-schedule .timeline-hint, .view-schedule .timeline-header p { font-size: 14px; line-height: 22px; }
.view-schedule .schedule-timeline { padding: 24px; }
.view-schedule .timeline-header { gap: 24px; flex-wrap: wrap; }
.view-schedule .timeline-header-actions { flex-wrap: wrap; }
.view-schedule .timeline-header-actions button { min-height: 48px; font-size: 16px; }
.view-schedule .timeline-row { grid-template-columns: 230px minmax(160px,1fr) 280px; gap: 16px; min-height: 88px; }
.view-schedule .timeline-label strong { font-size: 16px; line-height: 24px; white-space: normal; }
.view-schedule .timeline-label small { font-size: 14px; line-height: 22px; white-space: normal; }
.view-schedule .timeline-scale { margin: 24px 296px 8px 246px; font-size: 14px; line-height: 22px; }
.view-schedule .timeline-controls label { font-size: 14px; line-height: 22px; }
.view-schedule .timeline-controls input { font-size: 14px; min-height: 44px; }
.view-schedule .timeline-bar { padding: 0; font-size: 12px; }
.view-schedule .timeline-status { font-size: 14px; line-height: 22px; }
@media(max-width:1200px) {
 .view-schedule .phase-summary-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
 .view-schedule .timeline-row { grid-template-columns: minmax(0,1fr); padding: 16px 0; }
 .view-schedule .timeline-scale { margin: 24px 0 8px; }
 .view-schedule .timeline-controls { max-width: 360px; }
}
@media(max-width:600px) {
 .view-schedule .phase-project, .view-schedule .schedule-timeline { padding: 16px; }
 .view-schedule .phase-summary-grid { grid-template-columns: 1fr; }
 .view-schedule .phase-project-target { text-align: left; margin-top: 16px; }
 .view-schedule .timeline-controls { max-width: none; }
}

/* Figma V2 approval content; permission and action wiring remain unchanged. */
.view-risks, .view-audit { font-size: 16px; line-height: 26px; --muted: #a4b5b7; }
.view-audit .audit-filters { display: flex; align-items: end; flex-wrap: wrap; gap: 16px; margin-top: 32px; }
.view-audit .audit-filters label { display: grid; gap: 8px; width: 208px; max-width: 100%; }
.view-audit .audit-filters select, .view-audit .audit-filters button { min-height: 48px; font-size: 16px; }
.view-audit .audit-filters select { width: 100%; min-width: 0; }
.view-audit .audit-filter-note { font-size: 14px; line-height: 22px; color: var(--muted); margin: 16px 0 24px; }
@media(max-width:600px) { .view-audit .audit-filters label { width: 100%; } }
.view-risks .top h1, .view-audit .top h1 { font-size: 32px; line-height: 44px; }
.view-risks .top p, .view-audit .top p { font-size: 16px; line-height: 26px; }
.view-risks h2, .view-audit h2 { font-size: 20px; line-height: 30px; }
.view-risks .risk-overview { gap: 24px; margin-top: 32px; }
.view-risks .risk-overview-item { display: grid; grid-template-columns: 64px minmax(0,1fr); gap: 8px 16px; min-height: 116px; padding: 20px; }
.view-risks .risk-overview-item strong { font-size: 32px; line-height: 44px; }
.view-risks .risk-overview-item span { font-size: 16px; line-height: 24px; }
.view-risks .risk-overview-item small { grid-column: 1/-1; font-size: 14px; line-height: 22px; color: var(--muted); }
.view-risks .risk-group { margin-top: 40px; }
.view-risks .risk-group .section-heading p { font-size: 16px; line-height: 26px; }
.view-risks .risk-project-list, .view-risks .risk-method { max-width: none; }
.view-risks .risk-project { padding: 24px; }
.view-risks .risk-status { font-size: 14px; line-height: 22px; }
.view-risks .risk-project h3 { font-size: 18px; line-height: 28px; }
.view-risks .risk-project-main p, .view-risks .risk-more { font-size: 14px; line-height: 22px; }
.view-risks .risk-primary-reason { font-size: 16px; line-height: 26px; }
.view-risks button { min-height: 48px; font-size: 16px; }
.view-audit .audit-feed, .view-audit .audit-older { max-width: none; }
.view-audit .audit-event { padding: 16px 24px; gap: 16px; }
.view-audit .audit-event-head strong { font-size: 16px; line-height: 24px; }
.view-audit .audit-event-head time, .view-audit .audit-sequence, .view-audit .audit-object { font-size: 14px; line-height: 22px; }
.view-audit .audit-event-body { min-width: 0; overflow-wrap: anywhere; }
.view-audit .audit-details { display: block; margin-top: 8px; }
.view-audit .audit-details summary { font-size: 14px; line-height: 22px; }
.view-audit .audit-details p { font-size: 16px; line-height: 26px; }
.view-audit .audit-details pre { max-width: 100%; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; line-height: 22px; }
@media(max-width:700px) { .view-risks .risk-project { padding: 20px; } .view-audit .audit-event { padding: 16px; } }
.view-approvals .approval-counts { display: flex; flex-wrap: wrap; gap: 24px; margin-top: 32px; color: var(--accent); font-size: 16px; line-height: 24px; }
.view-approvals .approval-counts strong { margin-left: 8px; }
.view-approvals { font-size: 16px; line-height: 1.625; --muted: #a4b5b7; }
.view-approvals .top h1 { font-size: 32px; line-height: 44px; }
.view-approvals .top p { font-size: 16px; line-height: 26px; }
.view-approvals button { min-height: 48px; font-size: 16px; }
.view-approvals .approval-summary { position: relative; display: block; min-height: 288px; padding: 24px; background: var(--surface); border-color: var(--line); margin-top: 32px; }
.view-approvals .approval-queue-label { font-size: 14px; line-height: 22px; color: var(--warn); }
.view-approvals .approval-summary strong { font-size: 20px; line-height: 30px; color: var(--warn); margin: 4px 0 16px; }
.view-approvals .approval-summary-project { font-size: 18px; line-height: 28px; margin: 0 0 4px; }
.view-approvals .approval-summary-meta { font-size: 14px; line-height: 22px; color: var(--muted); margin: 0; }
.view-approvals .approval-summary p { font-size: 16px; line-height: 26px; color: var(--text); margin: 16px 0 24px; max-width: none; overflow-wrap: anywhere; }
.view-approvals .preview-only-note { font-size: 14px; line-height: 22px; color: var(--muted); max-width: calc(100% - 380px); }
.view-approvals .approval-summary-actions { justify-content: flex-end; gap: 16px; margin-top: 24px; }
.view-approvals .approval-summary-actions button { min-width: 176px; }
.view-approvals .approval-summary.is-empty { min-height: 160px; }
.view-approvals .approval-summary.is-empty strong { color: var(--text); }
.view-approvals .release-actions { margin-top: 40px; }
.view-approvals .release-actions h2, .view-approvals .approval-list h2 { font-size: 20px; line-height: 30px; }
.view-approvals .release-actions > div > p { font-size: 14px; line-height: 22px; }
.view-approvals .release-action { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 16px 24px; min-height: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; margin-top: 12px; }
.view-approvals .release-action-facts { display: grid; gap: 8px; min-width: 0; overflow-wrap: anywhere; }
.view-approvals .release-action-facts strong { font-size: 16px; line-height: 24px; }
.view-approvals .release-action-facts span { color: var(--muted); font-size: 14px; line-height: 22px; }
.view-approvals .release-action button { flex-shrink: 0; }
.view-approvals .approval-history { margin-top: 40px; }
.view-approvals .approval-history > summary { font-size: 16px; line-height: 26px; padding: 16px 24px; }
.view-approvals .approval { padding: 24px; }
.view-approvals .approval-title strong { font-size: 18px; line-height: 28px; }
.view-approvals .approval-project { font-size: 14px; line-height: 22px; }
.view-approvals .approval-request-note, .view-approvals .approval-decision-note, .view-approvals .approval-release-state { font-size: 16px; line-height: 26px; }
.view-approvals .decision-separation-note { font-size: 14px; line-height: 22px; }
@media(max-width:700px) {
 .view-approvals .approval-summary { padding: 20px; }
 .view-approvals .preview-only-note { max-width: none; }
 .view-approvals .approval-summary-actions { flex-wrap: wrap; }
 .view-approvals .approval-summary-actions button { min-width: 0; flex: 1; }
 .view-approvals .release-action { flex-direction: column; align-items: stretch; padding: 20px; }
}
dialog.governance-dialog{padding:24px;box-sizing:border-box;max-height:85vh;overflow:auto;overflow-wrap:anywhere}
dialog.governance-dialog p{white-space:pre-wrap;line-height:1.65}
dialog.governance-dialog details{padding:16px 0;border-top:1px solid #29383c}
dialog.governance-dialog summary{cursor:pointer;line-height:1.6}
.intake-draft-form fieldset{min-width:0;margin:20px 0;padding:16px;border:1px solid #29383c;border-radius:12px;display:grid;gap:16px}
.intake-draft-form legend{padding:0 8px;font-weight:650;color:#dce9e6}
.intake-draft-form label{display:grid;gap:8px;min-width:0;font-size:15px}
.intake-draft-form input,.intake-draft-form textarea{box-sizing:border-box;width:100%;min-width:0;font-size:16px;line-height:1.5}
.intake-draft-form textarea{resize:vertical}
.acceptance-standard-field{display:grid;gap:8px;min-width:0}
.acceptance-standard-field label{display:grid;gap:8px}
.acceptance-standard-field select,.acceptance-standard-field textarea{box-sizing:border-box;width:100%;min-width:0;font-size:16px;line-height:1.5}
.acceptance-standard-field small{color:var(--muted);line-height:1.5}
.acceptance-standard-field label[hidden]{display:none}
@media(min-width:720px){.intake-draft-form fieldset{grid-template-columns:repeat(2,minmax(0,1fr))}}
/* Keep version selectors and explicit QC attestations beside their labels. */
.governance-dialog [data-quality-editor] label:has(> input[type="radio"]),
.governance-dialog [data-quality-editor] label:has(> input[type="checkbox"]) {
 display:flex; align-items:flex-start; gap:10px; overflow-wrap:anywhere;
}
.governance-dialog [data-quality-editor] input[type="radio"],
.governance-dialog [data-quality-editor] input[type="checkbox"] {
 width:18px; min-width:18px; height:18px; flex:0 0 18px; margin:2px 0 0;
}
/* Explicit channel choice: keep each checkbox beside its channel name. */
.governance-dialog .release-channel-options { border:1px solid var(--border, #294044); border-radius:10px; padding:12px 16px; }
.governance-dialog .release-channel-options label { display:flex; align-items:center; gap:10px; margin:8px 0; }
.governance-dialog .release-channel-options input[type="checkbox"] { width:18px; height:18px; flex:0 0 18px; margin:0; }

/* Help pages share the signed-in shell; public entry points remain available. */
.help-icon { display:block; width:22px; height:22px; flex:0 0 22px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.side-guide.active { color:var(--accent); }
.help-content { width:min(900px,100%); min-width:0; line-height:1.75; }
.help-content h1 { margin:0 0 16px; font-size:28px; line-height:1.35; }
.help-content h2 { font-size:20px; }
.certificate-content header { margin-bottom:24px; }
.certificate-content section, .certificate-content aside { background:#131e20; border:1px solid var(--line); border-radius:12px; padding:24px; margin:20px 0; }
.certificate-content aside { border-left:4px solid #eabe65; }
.certificate-content details { margin:18px 0; }
.certificate-content summary { cursor:pointer; font-weight:600; }
.certificate-content li { margin:12px 0; }
.certificate-content code { display:block; overflow-wrap:anywhere; font-size:14px; }
.certificate-content #download { display:inline-block; padding:10px 18px; background:var(--accent); color:#092721; border-radius:8px; text-decoration:none; font-weight:650; }
.certificate-content #download[hidden] { display:none; }
@media(max-width:540px){ .certificate-content section,.certificate-content aside { padding:16px; } }

/* Approval review: fixed frame with independently scrolling evidence. */
dialog.approval-roadmap-dialog,dialog.approval-design-dialog { --approval-quiet:#0f1719; --approval-warning:#292419; --approval-warning-line:#635035; background:#121a1c; color:#ecf4f3; padding:0; max-width:96vw; max-height:92dvh; overflow:hidden; border:1px solid #28373b; border-radius:16px; box-sizing:border-box; overflow-wrap:anywhere; }
dialog.approval-roadmap-dialog { width:min(1328px,96vw); }
dialog.approval-roadmap-dialog[open] { display:flex; flex-direction:column; }
dialog.approval-design-dialog { width:min(1200px,96vw); }
dialog.approval-design-dialog form { display:flex; flex-direction:column; gap:0; padding:0; margin:0; max-height:92dvh; }
.approval-design-header,.approval-roadmap-header { display:flex; flex:none; align-items:flex-start; justify-content:space-between; gap:20px; padding:28px 28px 20px; }
.approval-design-header h2,.approval-roadmap-header h2 { margin:0; font-size:26px; line-height:1.4; font-weight:700; }
.approval-subtitle { margin:6px 0 0; color:#9daeb0; font-size:13px; line-height:1.6; }
.approval-icon-close,.approval-roadmap-close { display:grid; place-items:center; flex:0 0 44px; width:44px; height:44px; padding:10px; font-size:26px; line-height:1; }
.approval-roadmap-close svg { display:block; width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.8; stroke-linecap:round; pointer-events:none; }
.approval-review-scroll,.roadmap-scroll { min-height:0; overflow:auto; overscroll-behavior:contain; padding:0 28px 24px; scrollbar-gutter:stable; }
.roadmap-scroll { display:flex; flex-direction:column; gap:20px; }
.roadmap-focus { display:flex; align-items:center; justify-content:space-between; gap:24px; padding:20px; border:1px solid #28373b; border-radius:12px; background:#182326; }
.roadmap-focus.has-pending { background:var(--approval-warning); border-color:var(--approval-warning-line); }
.roadmap-focus .roadmap-focus-label { margin:0 0 8px; color:#e5b25c; font-size:13px; font-weight:650; }
.roadmap-focus h3 { margin:0 0 6px; font-size:24px; line-height:1.4; }
.roadmap-focus p { margin:0; font-size:13px; color:#b8c6c7; }
.roadmap-focus button { flex-shrink:0; }
dialog.approval-roadmap-dialog .roadmap-mode { margin:0; padding:14px 16px; border-radius:10px; background:var(--approval-quiet); color:#9daeb0; font-size:13px; }
.roadmap-path-heading { display:flex; align-items:center; justify-content:space-between; gap:16px; }
.roadmap-path-heading h3 { margin:0; font-size:18px; }
.roadmap-path-heading p { margin:0; font-size:12px; color:#9daeb0; }
.approval-roadmap-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; align-items:start; }
.approval-roadmap-phase { min-width:0; }
.approval-roadmap-phase>h3 { display:flex; align-items:center; gap:10px; padding:0 0 14px; margin:0 0 16px; border-bottom:2px solid #28373b; font-size:18px; }
.approval-roadmap-phase>h3 span { color:#9daeb0; font-size:13px; }
.approval-roadmap-phase>h3 small { margin-left:auto; font-size:11px; color:#9daeb0; font-weight:400; }
.approval-roadmap-phase.is-current>h3 { border-color:#66d4bd; }
.approval-roadmap-phase.is-current>h3 small,.approval-roadmap-phase.is-current>h3 span { color:#66d4bd; }
.approval-roadmap-phase .panel { padding:16px; margin:0 0 12px; border:1px solid #28373b; border-radius:10px; background:var(--approval-quiet); box-shadow:none; }
.approval-roadmap-phase h4 { margin:0 0 8px; font-size:15px; line-height:1.5; }
.approval-roadmap-phase p { font-size:12px; }
.approval-roadmap-phase .roadmap-status { margin:0 0 12px; color:#9daeb0; }
.approval-roadmap-phase .roadmap-role { margin:0 0 12px; color:#b8c6c7; }
.approval-roadmap-phase [data-tone="pending"] { background:var(--approval-warning); border-color:var(--approval-warning-line); }
.approval-roadmap-phase [data-tone="pending"] .roadmap-status { color:#e5b25c; font-weight:650; }
.approval-roadmap-phase [data-tone="recorded"] .roadmap-status { color:#66d4bd; }
.approval-roadmap-phase [data-tone="attention"] .roadmap-status { color:#f18d87; }
dialog.approval-roadmap-dialog details { padding:10px 0 0; margin-top:10px; font-size:12px; }
dialog.approval-roadmap-dialog .roadmap-records { margin:0; padding:16px; border:1px solid #28373b; border-radius:10px; }
.roadmap-footer,.decision-footer { display:flex; flex:none; align-items:center; justify-content:flex-end; gap:12px; border-top:1px solid #28373b; padding:20px 28px; margin:0; background:#121a1c; }
.roadmap-footer p,.decision-footer .decision-mode { margin:0 auto 0 0; color:#9daeb0; font-size:12px; line-height:1.65; }
.approval-roadmap-dialog button,.approval-design-dialog button { min-height:44px; }
.decision-permission { display:flex; flex:none; align-items:center; gap:12px; margin:0 28px 24px; padding:12px 16px; border-radius:10px; background:var(--approval-quiet); color:#9daeb0; font-size:13px; line-height:1.6; }
.approval-state-badge { flex-shrink:0; color:#e5b25c; background:#292419; border:1px solid #635035; padding:3px 9px; border-radius:6px; font-size:12px; font-weight:650; }
.approval-decision-body { display:grid; grid-template-columns:minmax(0,1.87fr) minmax(280px,1fr); gap:24px; align-items:start; }
.decision-main,.decision-sidebar { display:flex; flex-direction:column; gap:20px; min-width:0; }
.decision-main [data-approval-context] { display:contents; }
.decision-panel,.decision-main>section:not([data-approval-context]) { background:var(--approval-quiet); border:1px solid #28373b; border-radius:12px; padding:20px; margin:0; }
.decision-panel h3,.decision-main>section>h3 { margin:0 0 16px; font-size:16px; line-height:1.5; }
.decision-panel p { margin:12px 0 0; font-size:14px; line-height:1.7; }
.decision-panel .decision-request-note { font-size:16px; margin:0 0 20px; white-space:pre-wrap; }
.decision-panel .decision-field { display:flex; flex-direction:column; gap:4px; margin:16px 0 0; }
.decision-field-label { font-size:12px; color:#9daeb0; }
.decision-panel .muted { font-size:13px; color:#9daeb0; }
.decision-panel button { margin-top:16px; }
.decision-warning { background:var(--approval-warning); border-color:var(--approval-warning-line); }
.decision-warning h3 { color:#e5b25c; margin:0 0 8px; }
.decision-warning p { color:#d4c7ad; font-size:13px; margin:0; }
.decision-current { background:#182326; }
.decision-current .decision-field { flex-direction:row; justify-content:space-between; gap:16px; }
.decision-current .decision-field-label { flex:0 0 90px; }
.decision-current .decision-field>span:last-child { text-align:right; }
.decision-current progress { display:block; width:100%; height:6px; border:0; margin:12px 0 20px; border-radius:4px; overflow:hidden; background:#28373b; }
.decision-current progress::-webkit-progress-bar { background:#28373b; }
.decision-current progress::-webkit-progress-value { background:#66d4bd; }
.decision-current progress::-moz-progress-bar { background:#66d4bd; }
.decision-source-note { margin:0; padding:0 4px; color:#9daeb0; font-size:12px; line-height:1.7; }
.decision-opinion { display:block; color:#ecf4f3; font-size:15px; }
.decision-opinion small { float:right; color:#9daeb0; font-size:12px; font-weight:400; }
.decision-opinion textarea { width:100%; box-sizing:border-box; min-height:100px; margin-top:12px; line-height:1.6; resize:vertical; }
.decision-audit-note { font-size:12px; color:#9daeb0; margin:-10px 0 0; line-height:1.7; }
.approval-design-dialog .decision-reject { background:#e5b25c; color:#211b12; }
.approval-design-dialog button[hidden] { display:none; }
.approval-design-dialog button:disabled { opacity:1; background:#263437; color:#9daeb0; border-color:#34464a; cursor:not-allowed; }
.approval-design-dialog textarea:read-only { color:#9daeb0; background:#0f1719; }
@media(max-width:1000px) { .approval-roadmap-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media(max-width:800px) {
 .approval-decision-body { grid-template-columns:minmax(0,1fr); }
 .approval-design-header,.approval-roadmap-header { padding:20px 18px 16px; gap:12px; }
 .approval-design-header h2,.approval-roadmap-header h2 { font-size:22px; }
 .approval-review-scroll,.roadmap-scroll { padding:0 18px 20px; }
 .decision-permission { margin:0 18px 18px; align-items:flex-start; }
 .roadmap-footer,.decision-footer { padding:14px 18px; flex-wrap:wrap; }
 .roadmap-footer p,.decision-footer .decision-mode { flex:1 0 100%; }
 .roadmap-focus { align-items:flex-start; flex-direction:column; gap:16px; }
 .roadmap-path-heading { align-items:flex-start; flex-direction:column; gap:8px; }
 .decision-panel,.decision-main>section:not([data-approval-context]) { padding:16px; }
}
@media(max-width:540px) {
 .approval-roadmap-grid { grid-template-columns:minmax(0,1fr); }
 .decision-footer button { flex:1; min-width:0; padding:10px 8px; }
 .decision-current .decision-field { flex-direction:column; gap:4px; }
 .decision-current .decision-field-label { flex:auto; }
 .decision-current .decision-field>span:last-child { text-align:left; }
}

.decision-request { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); column-gap:24px; }
.decision-request h3,.decision-request .decision-request-note { grid-column:1/-1; }
.decision-request .decision-field { margin-top:0; }
@media(max-width:540px) { .decision-request { grid-template-columns:minmax(0,1fr); row-gap:12px; } .decision-request h3,.decision-request .decision-request-note { margin-bottom:0; } }
body:has(.approval-design-dialog[open],.approval-roadmap-dialog[open]) { overflow:hidden; }

.release-board-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 12px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.release-board-item div {
  display: grid;
  align-content: start;
  gap: 4px;
  min-width: 0;
}

.release-board-item small {
  color: var(--muted);
}

.release-board-item ul {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-wrap: anywhere;
}

.release-reason.risk,
.release-reason.capacity { color: var(--danger); }
.release-reason.client_sync { color: var(--warn); }
.release-reason.feasibility { color: var(--warn); }
.release-reason.launch_review { color: var(--danger); }
.release-reason.launch_data { color: var(--warn); }
.release-reason.window_due,
.release-reason.approval { color: var(--warn); }

.metrics-table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

.metrics-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.metrics-table th,
.metrics-table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  white-space: nowrap;
}

.metrics-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

@media (max-width: 720px) {
  .release-board-item {
    grid-template-columns: minmax(0, 1fr);
  }
}

.release-board-item > div:last-child {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.release-decision-current {
  margin: 0;
  overflow-wrap: anywhere;
}

.release-decision-current.release strong { color: var(--accent); }
.release-decision-current.hold strong { color: var(--warn); }
.release-decision-current.escalate strong { color: var(--danger); }

.release-decision-form {
  display: grid;
  grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}

.release-decision-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.release-decision-form textarea,
.release-decision-form select {
  width: 100%;
  min-width: 0;
}

.release-decision-form .form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

.release-meeting-history {
  margin-top: 14px;
}

.release-history-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  margin: 10px 0;
}

.release-history-list {
  display: grid;
  gap: 8px;
  padding-left: 18px;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .release-decision-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.opinion-window {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.opinion-window.closed {
  border-left-color: var(--muted);
}

.opinion-window p {
  margin: 0;
}

.opinion-window strong {
  color: var(--warn);
  font-variant-numeric: tabular-nums;
}

.capacity-state.red { color: var(--danger); }
.capacity-state.green { color: var(--accent); }
.capacity-state.unknown { color: var(--muted); }

.metrics-table td.capacity-projects {
  min-width: 16rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

.capacity-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 8rem)) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
  margin-top: 12px;
}

.capacity-form label {
  display: grid;
  gap: 4px;
  min-width: 0;
  font-size: 12px;
  color: var(--muted);
}

.capacity-form input,
.capacity-form select {
  width: 100%;
  min-width: 0;
}

.capacity-form .form-status {
  grid-column: 1 / -1;
  margin: 0;
  font-size: 12px;
}

@media (max-width: 720px) {
  .capacity-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

.acceptance-checklist {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.acceptance-checklist h3,
.acceptance-checklist p {
  margin: 0;
}

.acceptance-issue {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: start;
  margin-bottom: 8px;
}

@media (max-width: 720px) {
  .acceptance-issue {
    grid-template-columns: minmax(0, 1fr);
  }
}

.launch-metric {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 8rem) minmax(0, 8rem) auto;
  gap: 8px;
  margin-bottom: 8px;
}

.launch-triggered {
  color: var(--danger);
  font-weight: 600;
}

@media (max-width: 720px) {
  .launch-metric {
    grid-template-columns: minmax(0, 1fr);
  }
}

.feasibility-box {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--warn);
  border-radius: 8px;
  overflow-wrap: anywhere;
}

.feasibility-box h3,
.feasibility-box p {
  margin: 0;
}

.feasibility-outcome { font-weight: 600; }
.feasibility-outcome.feasible { color: var(--accent); }
.feasibility-outcome.infeasible,
.feasibility-outcome.needs_change { color: var(--danger); }

.view-metrics .metrics {
  grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr));
}

/* Design refresh 2026-09 · dialog pattern (Figma Dialogs page).
   Governance dialogs: workspace L 960 / form M 640; header title + context; text close top-right.
   Fixed <dialog><form> dialogs: sticky footer actions. */
dialog.governance-dialog:not(.approval-roadmap-dialog) {
  width: min(640px, calc(100vw - 40px));
  padding: 24px 28px 28px;
}

dialog.governance-dialog.production-summary-dialog {
  width: min(860px, calc(100vw - 32px));
}

.production-summary-content > h2 {
  margin: 0 0 16px;
  font-size: 21px;
  line-height: 1.4;
}

.production-summary-content > p { margin: 10px 0; }

.production-summary-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.production-summary-heading h2 {
  margin: 0;
  font-size: 21px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.production-summary-overview {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 12px;
}

.production-summary-overview strong { font-size: 36px; line-height: 1.2; }
.production-summary-overview span { color: var(--muted); }
.production-summary-source { margin-top: 18px; }
.production-summary-source summary { cursor: pointer; color: var(--muted); }
.production-summary-source p { overflow-wrap: anywhere; }
.production-summary-actions { display: flex; gap: 8px; margin-top: 20px; }

.production-summary-heading .badge.warn {
  color: var(--warn, #f2bf65);
  border-color: var(--warn, #f2bf65);
  background: transparent;
}

.production-summary-table-scroll table[aria-label="各集制作进度"] {
  min-width: 0;
  table-layout: fixed;
}

.production-summary-table-scroll table[aria-label="各集制作进度"] th {
  white-space: normal;
}

.production-summary-table-scroll table[aria-label="各集制作进度"] td {
  overflow-wrap: anywhere;
}



.production-sync-alert {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised, var(--surface));
  line-height: 1.55;
}

.production-sync-alert.is-due {
  border-color: var(--warning, #b77924);
}

.production-summary-table-scroll {
  margin: 18px 0;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.production-summary-table-scroll table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
  text-align: left;
}

.production-summary-table-scroll th,
.production-summary-table-scroll td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.production-summary-table-scroll th {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

.production-summary-table-scroll tbody tr:last-child td { border-bottom: 0; }

.production-pair-form {
  margin: 22px 0;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface-raised, var(--surface));
}

.production-pair-form h3,
.production-pair-form p { margin: 0; }

.production-pair-form label { min-width: 0; }
.production-pair-form input,
.production-pair-form select { box-sizing: border-box; width: 100%; min-width: 0; }

dialog.governance-dialog:is(
  [aria-label="四阶段宏观排期"], [aria-label="导演制作细排"], [aria-label="上线复盘"],
  [aria-label="选题决策记录"], [aria-label="六项成片质检"], [aria-label="管理附件"],
  [aria-label="交接双方确认"], [aria-label="后期交接核验"], [aria-label="交付清单"],
  [aria-label="运营合规检查"], [aria-label="逐渠道发布登记"], [aria-label="成片版本与验收"],
  [aria-label="项目会签记录"]
) {
  width: min(960px, calc(100vw - 40px));
}

dialog.governance-dialog > h2:first-child {
  margin: 0;
  padding-right: 140px;
  color: var(--text);
  font-size: 20px;
  line-height: 28px;
}

dialog.governance-dialog > h2:first-child + p {
  margin: 6px 0 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-secondary);
  font-size: 13px;
}

dialog.governance-dialog > .dialog-close {
  position: absolute;
  top: 20px;
  right: 20px;
  max-width: 132px;
  overflow: hidden;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

dialog.governance-dialog > .dialog-close:hover {
  border-color: transparent;
  background: var(--hover);
  color: var(--text);
}

dialog > form > h2:first-child {
  font-size: 20px;
  line-height: 28px;
}

dialog > form > .form-note {
  color: var(--text-secondary);
  font-size: 13px;
}

dialog > form > .form-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 4px -24px -24px;
  padding: 16px 24px;
  border-top: 1px solid var(--line);
  background: var(--surface);
  box-shadow: 0 -8px 20px rgb(0 0 0 / 12%);
}

/* Design refresh 2026-09 · schedule execution details grouped by project (Figma 排期与进度 / 执行明细). */
.schedule-project-groups {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.schedule-project-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--raised);
}

.schedule-project-group > summary {
  display: flex;
  min-height: 56px;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px;
  cursor: pointer;
  list-style-position: inside;
}

.schedule-group-name {
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
}

.schedule-group-meta {
  margin-left: auto;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.schedule-project-group[open] > summary {
  border-bottom: 1px solid var(--line);
}

.schedule-node-table {
  border: 0;
  border-radius: 0;
}

.schedule-node-table .row {
  grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr) minmax(0, 1fr) minmax(0, 1fr) minmax(0, .8fr) auto;
}

.schedule-node-table .row.is-delayed {
  box-shadow: inset 3px 0 0 var(--danger);
}

.schedule-node-table .row.is-forecast-late {
  box-shadow: inset 3px 0 0 var(--warn);
}

.schedule-delay.is-forecast {
  color: var(--warn);
}

.schedule-node-index {
  display: inline-block;
  min-width: 26px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 400;
}

.schedule-node-dates {
  font-family: var(--font-mono);
  font-size: 13px;
}

.schedule-delay {
  display: block;
  margin-top: 4px;
  color: var(--danger);
  font-family: inherit;
  font-weight: 600;
}

.schedule-stage-subhead.stage-intake {
  --stage-accent: var(--stage-initiation);
}

.row.schedule-stage-subhead {
  display: flex;
  padding: 7px 16px;
  background: var(--sunken);
  color: var(--stage-accent);
  font-size: 12px;
  font-weight: 600;
}

.row.schedule-stage-subhead span::before {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--stage-accent);
  content: "";
}

.table .row.schedule-stage-subhead:hover {
  background: var(--sunken);
}

/* Design refresh 2026-09 · approvals as a per-project workbench (Figma 审批与待办). */
.approval-workbenches {
  display: grid;
  gap: 16px;
  margin-top: 20px;
}

.approval-workbench {
  margin-top: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.approval-workbench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
}

.approval-workbench-head h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
}

.approval-workbench-count {
  color: var(--muted);
  font-size: 13px;
}

.approval-workbench-count.has-pending {
  color: var(--warn);
}

.approval-workbench-head button {
  margin-left: auto;
}

.approval-workbench .approval-list {
  margin-top: 12px;
}

.approval-stage-entries {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--line);
}

.approval-stage-column {
  --stage-accent: var(--stage-initiation);
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 10px 12px;
  background: var(--sunken);
}

.approval-stage-column.stage-script { --stage-accent: var(--stage-script); }
.approval-stage-column.stage-production { --stage-accent: var(--stage-production); }
.approval-stage-column.stage-operations { --stage-accent: var(--stage-operations); }

.approval-stage-label {
  color: var(--stage-accent);
  font-size: 12px;
  font-weight: 600;
}

.approval-stage-label::before {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 6px;
  border-radius: 50%;
  background: var(--stage-accent);
  content: "";
  vertical-align: middle;
}

.approval-stage-column .muted {
  font-size: 12px;
}

button.approval-entry {
  min-height: 30px;
  justify-content: flex-start;
  padding: 0 8px;
  border-color: transparent;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  text-align: left;
}

button.approval-entry:hover {
  border-color: transparent;
  background: var(--hover);
}

.approval-entry-notes ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.7;
}

@media (max-width: 900px) {
  .approval-stage-entries {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Design refresh 2026-09 · 项目会签记录 as a grouped workspace (Figma 会签记录). */
.gate-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: start;
  gap: 20px;
  margin-top: 16px;
}

.gate-main,
.gate-aside {
  display: grid;
  gap: 16px;
}

.gate-active {
  display: grid;
  gap: 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--raised);
}

.gate-active.is-pending {
  border-color: var(--warn-line);
}

.gate-overline {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .04em;
}

.gate-active-title {
  color: var(--text);
  font-size: 16px;
}

.gate-active p {
  margin: 0;
}

.gate-active-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.gate-group {
  --stage-accent: var(--stage-initiation);
}

.gate-group.stage-script { --stage-accent: var(--stage-script); }
.gate-group.stage-production { --stage-accent: var(--stage-production); }
.gate-group.stage-operations { --stage-accent: var(--stage-operations); }

.gate-group h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  font-size: 16px;
}

.gate-group h3::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--stage-accent);
  content: "";
}

.gate-group h3 small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.gate-entries {
  display: grid;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

button.gate-entry {
  display: grid;
  justify-items: start;
  gap: 2px;
  min-height: 52px;
  padding: 8px 12px;
  border-color: transparent;
  background: transparent;
  text-align: left;
}

button.gate-entry:hover {
  border-color: transparent;
  background: var(--hover);
}

button.gate-entry strong {
  color: var(--text);
  font-size: 14px;
}

button.gate-entry small {
  color: var(--muted);
  font-size: 12px;
  white-space: normal;
}

.gate-card {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.gate-card h3 {
  margin: 0;
  font-size: 16px;
}

.gate-card p {
  margin: 0;
}

button.gate-record {
  justify-content: flex-start;
  text-align: left;
  font-size: 13px;
}

button.gate-record.is-pending {
  border-color: var(--warn-line);
  color: #f0c27d;
}

@media (max-width: 900px) {
  .gate-workspace {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Design refresh 2026-09 · 风险与瓶颈 (Figma Risk card / overview tiles). CSS only; markup and the
   existing .view-risks layout are unchanged — this block only adds tokens, tints and mono numbers. */
.risk-overview-item {
  border-radius: var(--radius-xl);
}

.risk-overview-item strong {
  font-family: var(--font-mono);
  font-weight: 500;
}

.risk-overview-item span {
  color: var(--text);
  font-weight: 600;
}

.risk-overview-item.red {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
}

.risk-overview-item.yellow {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
}

.risk-overview-item.unknown {
  background: var(--sunken);
}

.risk-overview-item.unknown strong {
  color: var(--text-secondary);
}

.risk-project {
  border-left-width: 4px;
  border-radius: var(--radius-xl);
}

.risk-project.red { border-color: var(--danger-line); border-left-color: var(--danger); }
.risk-project.yellow { border-color: var(--warn-line); border-left-color: var(--warn); }
.risk-project.unknown { border-left-color: var(--line-strong); }

.risk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--sunken);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.risk-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.risk-project.red .risk-status { border-color: var(--danger-line); background: var(--danger-subtle); color: var(--danger); }
.risk-project.yellow .risk-status { border-color: var(--warn-line); background: var(--warn-subtle); color: var(--warn); }
.risk-project.green .risk-status { border-color: var(--accent-line); background: var(--accent-subtle); color: var(--accent); }

.risk-project h3 {
  margin: 8px 0 4px;
}

.risk-primary-reason {
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
}

.risk-primary-reason::before {
  flex: 0 0 8px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--line-strong);
  content: "";
  transform: translateY(-1px);
}

.risk-project.red .risk-primary-reason::before { background: var(--danger); }
.risk-project.yellow .risk-primary-reason::before { background: var(--warn); }
.risk-project.green .risk-primary-reason::before { background: var(--accent); }

/* Design refresh 2026-09 · 指标与放行 split into 本周放行 / 指标 views (Figma 指标与放行). */
.metrics-tabs {
  display: inline-flex;
  gap: 2px;
  margin-top: 20px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
}

.metrics-tabs button {
  min-height: 32px;
  padding: 0 16px;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
}

.metrics-tabs button[aria-pressed="true"] {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
  font-weight: 600;
}

.metrics-view > .metrics {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.release-board-item {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.release-board-item > div:last-child {
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.metrics-table td.gate-rate {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}

.rate-bar,
.capacity-bar {
  position: relative;
  display: block;
  height: 8px;
  overflow: visible;
  border-radius: 4px;
  background: var(--sunken);
}

.rate-bar {
  flex: 1 1 160px;
}

.capacity-bar {
  width: 140px;
  height: 6px;
  margin-top: 6px;
}

.rate-bar i,
.capacity-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--warn);
}

.rate-bar.is-good i,
.capacity-bar i {
  background: var(--accent);
}

.capacity-bar.is-over i {
  background: var(--danger);
}

.rate-bar b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  background: var(--text-secondary);
}

.metrics-table tr.is-exceeded td {
  background: var(--danger-subtle);
}

@media (max-width: 900px) {
  .metrics-view > .metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* Design refresh 2026-09 · 审计记录 (Figma Audit event): filter card, day headers, category tags. */
.view-audit .audit-filters {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.audit-day {
  margin: 12px 0 0;
  color: var(--text);
  font-size: 16px;
  line-height: 24px;
}

.audit-feed > .audit-day:first-child {
  margin-top: 0;
}

.audit-sequence,
.audit-event-head time {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.audit-event-head {
  justify-content: flex-start;
}

.audit-event-head time {
  margin-left: auto;
}

.audit-category {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-sm);
  background: var(--raised);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.audit-category.warn { background: var(--warn-subtle); color: var(--warn); }
.audit-category.info { background: var(--info-subtle); color: var(--blue); }
.audit-category.gate { background: #1b1e33; color: var(--stage-production); }
.audit-category.good { background: var(--accent-subtle); color: var(--accent); }
.audit-category.danger { background: var(--danger-subtle); color: var(--danger); }
.audit-category.intake { background: var(--info-subtle); color: var(--stage-initiation); }

.view-audit .audit-event:hover {
  border-color: var(--line-strong);
}

/* Design refresh 2026-09 · 账号与密码 / 账号管理 (Figma 账号). */
.account-avatar {
  display: inline-grid;
  width: 40px;
  height: 40px;
  margin-right: 12px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 18px;
  font-weight: 700;
  vertical-align: middle;
}

.account-session-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-md);
  background: var(--warn-subtle);
  color: #f0c27d;
  font-weight: 600;
}

.view-account .account-session-warning {
  font-size: 14px;
  line-height: 22px;
}

.view-accounts .account-editor-row {
  border-radius: var(--radius-xl);
}

.view-accounts .account-editor-row > summary:hover {
  background: var(--hover);
}

.view-accounts .account-editor-row[open] > summary {
  border-bottom-color: var(--line);
  background: var(--nav-active);
}

.view-accounts .account-row-identity strong {
  color: var(--text);
}

.view-accounts .account-permission-drawer {
  border-color: var(--line-strong);
  background: var(--surface);
}

.view-accounts .account-permission-drawer .dialog-close {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.view-accounts .account-permission-drawer .dialog-close:hover {
  background: var(--hover);
  color: var(--text);
}

.scope-warning[data-scope-warning] {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: #f1a39d;
}

.scope-warning[data-scope-warning] code {
  color: #ffd6d2;
}

.reset-code-panel {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
}

.reset-code {
  border-color: var(--warn-line);
  background: var(--sunken);
  font-family: var(--font-mono);
  font-size: 20px;
  letter-spacing: .04em;
}

/* Design refresh 2026-09 · tablet shell (561–900px) reuses the phone navigation pattern:
   sticky one-row header, menu toggle and bottom tabs, instead of the fully expanded sidebar. */
@media (min-width: 561px) and (max-width: 900px) {
  .side {
    position: sticky;
    z-index: 30;
    top: 0;
    display: block;
    padding: 13px 18px 10px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    box-shadow: 0 8px 20px rgb(0 0 0 / 14%);
  }

  .brand {
    display: grid;
    min-height: 50px;
    grid-template-columns: 36px minmax(0, 1fr) 44px;
    align-items: center;
    gap: 10px;
    overflow: visible;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    flex-basis: 36px;
  }

  .brand strong {
    font-size: 15px;
  }

  .brand small {
    margin-top: 2px;
    font-size: 11px;
  }

  .brand .brand-meta {
    display: block;
    margin-left: 0;
    font-size: 10px;
  }

  .mobile-menu-toggle {
    display: grid;
    width: 44px;
    height: 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--raised);
    color: var(--text);
    font-size: 19px;
  }

  .side nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin: 14px 0 0;
    padding: 0;
    overflow: visible;
  }

  .side.menu-open nav {
    display: grid;
  }

  .side nav button {
    width: 100%;
    min-width: 0;
    min-height: 44px;
    justify-content: flex-start;
    gap: 9px;
    padding: 0 10px;
    border: 1px solid var(--line);
    border-radius: 9px;
    font-size: 12px;
  }

  .side-help-label,
  .side-guide,
  .account {
    display: none;
  }

  .side.menu-open .side-help-label {
    display: block;
    margin-top: 12px;
    padding: 10px 2px 5px;
  }

  .side.menu-open .side-guide {
    display: flex;
    min-height: 44px;
    margin-top: 0;
  }

  .side.menu-open .account {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    margin-top: 10px;
    padding-top: 10px;
  }

  .side.menu-open .account button {
    grid-column: 2;
    grid-row: 1 / span 2;
    min-height: 40px;
    margin: 0;
  }

  .side.menu-open nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .main {
    padding: 22px 24px calc(96px + env(safe-area-inset-bottom));
  }

  .mobile-bottom-nav {
    position: fixed;
    z-index: 40;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    min-height: calc(74px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 7px 12px env(safe-area-inset-bottom);
    border-top: 1px solid var(--line);
    background: var(--sidebar);
    box-shadow: 0 -8px 20px rgb(0 0 0 / 12%);
  }

  .mobile-bottom-nav button,
  .mobile-bottom-nav a {
    display: flex;
    min-width: 0;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--muted);
    text-decoration: none;
  }

  .mobile-bottom-nav button > span,
  .mobile-bottom-nav a > span {
    font-size: 18px;
    line-height: 1.1;
  }

  .mobile-bottom-nav small {
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .mobile-bottom-nav .active {
    color: var(--accent);
  }
}

/* Design refresh 2026-09 · mobile (phone and tablet ≤ 900px shell; ≤ 600px page layouts).
   Additive only: compact one-row header, five-tab bottom navigation with the sidebar icons,
   and denser page cards. Desktop and tablet rules above are unchanged. */
.release-update-notice {
  position: fixed;
  z-index: 60;
  right: 20px;
  bottom: 20px;
  display: flex;
  max-width: min(460px, calc(100vw - 32px));
  align-items: center;
  gap: 12px;
  padding: 12px 14px 12px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--raised);
  box-shadow: 0 12px 32px rgb(0 0 0 / 35%);
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.release-update-notice button {
  flex: 0 0 auto;
  min-height: 36px;
  border-color: transparent;
  background: var(--accent);
  color: #06201b;
  font-weight: 600;
}

@media (max-width: 900px) {
  .release-update-notice {
    right: 16px;
    bottom: calc(76px + env(safe-area-inset-bottom));
    left: 16px;
    max-width: none;
  }

  /* One-row header: brand + menu toggle; build and deployment move into the opened menu. */
  .side {
    padding: 8px 16px;
  }

  .brand {
    min-height: 44px;
    grid-template-columns: 32px minmax(0, 1fr) 40px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .brand-copy {
    display: flex;
    min-width: 0;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 8px;
  }

  .mobile-menu-toggle {
    width: 40px;
    height: 40px;
    border-radius: 10px;
  }

  .main {
    padding: 16px 16px calc(84px + env(safe-area-inset-bottom));
  }

  /* Five tabs: 总览 / 排期 / 审批 (pending badge) / 风险 / 更多 (opens the full menu, incl. 使用指南). */
  .mobile-bottom-nav {
    min-height: calc(60px + env(safe-area-inset-bottom));
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 4px 4px env(safe-area-inset-bottom);
  }

  .mobile-bottom-nav button {
    position: relative;
    min-height: 56px;
    gap: 4px;
    padding: 6px 0 4px;
  }

  .mobile-bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
    flex-basis: 22px;
  }

  .mobile-bottom-nav small {
    font-size: 11px;
    line-height: 14px;
  }

  .mobile-bottom-nav .active {
    background: transparent;
    color: var(--accent);
  }

  .mobile-bottom-nav .active::before {
    position: absolute;
    top: 0;
    left: 50%;
    width: 24px;
    height: 2px;
    border-radius: 0 0 2px 2px;
    background: var(--accent);
    content: "";
    transform: translateX(-50%);
  }

  .mobile-nav-count {
    position: absolute;
    top: 3px;
    left: calc(50% + 6px);
    min-width: 17px;
    height: 17px;
    padding: 0 4px;
    border: 2px solid var(--sidebar);
    border-radius: 9px;
    background: var(--danger, #e5484d);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    line-height: 13px;
    text-align: center;
  }

  .mobile-more-icon {
    display: flex;
    width: 22px;
    height: 22px;
    align-items: center;
    justify-content: center;
    gap: 3px;
  }

  .mobile-more-icon i {
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: currentColor;
  }
}

@media (max-width: 900px) {
  .shell .top .action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .shell .top .action-button .button-icon {
    display: block;
    flex: 0 0 18px;
  }
}

@media (max-width: 600px) {
  /* Page header: smaller title, icon and label on one line in the primary action. */
  .shell .top h1,
  .main.view-risks .top h1,
  .main.view-audit .top h1 {
    font-size: 26px;
    line-height: 34px;
  }

  .shell .top p,
  .main.view-risks .top p,
  .main.view-audit .top p {
    font-size: 14px;
    line-height: 22px;
  }

  .shell .top .action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
  }

  .shell .top .action-button .button-icon {
    display: block;
    flex: 0 0 18px;
  }

  /* 项目总览: board heading on its own line, data-quality hint wraps instead of overflowing. */
  .shell .toolbar {
    flex-wrap: wrap;
    row-gap: 4px;
  }

  .shell .toolbar h2 {
    flex: 1 0 100%;
    white-space: nowrap;
  }

  .shell .toolbar-meta {
    width: 100%;
    margin-left: 0;
  }

  .shell .toolbar-meta .data-quality-hint {
    flex-wrap: wrap;
    gap: 0 4px;
    white-space: normal;
  }

  /* 排期与进度: phase windows as a 2 × 2 grid, full-width actions under each project. */
  .main.view-schedule .phase-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .main.view-schedule .phase-summary-card {
    min-height: 0;
    gap: 2px;
    padding: 12px;
  }

  .main.view-schedule .phase-summary-card h3 {
    font-size: 14px;
    line-height: 20px;
  }

  .main.view-schedule .phase-summary-card > strong {
    font-size: 22px;
    line-height: 30px;
  }

  .main.view-schedule .phase-summary-card small {
    font-size: 11px;
    line-height: 16px;
    overflow-wrap: normal;
    word-break: keep-all;
  }

  .main.view-schedule .phase-project-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 12px;
  }

  .main.view-schedule .phase-project-target {
    margin-top: 0;
    text-align: right;
  }

  .phase-project + .form-actions {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin: 10px 0 24px;
  }

  .phase-project + .form-actions button {
    width: 100%;
    min-height: 44px;
  }

  /* Execution rows: 责任部门 | 正式基线, then 完成度, then 部门反馈 | 操作. */
  .execution-progress-details .row:not(.head) {
    gap: 12px;
    padding: 14px 12px;
  }

  .execution-progress-details .row:not(.head) > :nth-child(3) {
    grid-column: auto;
  }

  .execution-progress-details .row:not(.head) .schedule-node-dates {
    font-size: 12px;
    overflow-wrap: normal;
  }

  .execution-progress-details .row:not(.head) > .row-actions {
    grid-column: auto;
    align-self: end;
    justify-content: flex-end;
    gap: 6px;
  }

  .execution-progress-details .row:not(.head) > .row-actions button {
    min-height: 36px;
  }

  /* 风险与瓶颈: three compact tiles in one row. */
  .main.view-risks .risk-overview {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 20px;
  }

  .main.view-risks .risk-overview-item {
    display: flex;
    min-height: 0;
    flex-direction: column;
    gap: 2px;
    padding: 12px;
  }

  .main.view-risks .risk-overview-item strong {
    font-size: 26px;
    line-height: 32px;
  }

  .main.view-risks .risk-overview-item span {
    font-size: 12px;
    line-height: 17px;
  }

  .main.view-risks .risk-overview-item small {
    display: none;
  }

  .main.view-risks .risk-group {
    margin-top: 28px;
  }

  .main.view-risks .risk-project {
    padding: 16px;
  }

  /* 审计记录: category, action and time on two tight lines. */
  .main.view-audit .audit-event {
    padding: 14px;
  }

  .main.view-audit .audit-event-head {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 4px 8px;
  }

  .main.view-audit .audit-event-head time {
    grid-column: 1 / -1;
    justify-self: start;
    margin: 0;
    text-align: left;
  }

  .main.view-audit .audit-event {
    position: relative;
    gap: 6px;
  }

  .main.view-audit .audit-event .audit-sequence {
    position: absolute;
    top: 14px;
    right: 14px;
    padding: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 12px;
  }

  .main.view-audit .audit-event-head {
    padding-right: 40px;
  }

  .main.view-audit .audit-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
  }

  .main.view-audit .audit-filters label:first-of-type {
    grid-column: 1 / -1;
  }

  .main.view-audit .audit-filters select,
  .main.view-audit .audit-filters button {
    min-height: 44px;
    font-size: 15px;
  }

  /* 账号与密码: label / value rows. */
  .main.view-account .account-facts {
    gap: 0;
  }

  .main.view-account .account-facts div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    background: transparent;
  }

  .main.view-account .account-facts div:last-child {
    border-bottom: 0;
  }

  .main.view-account .account-facts dt {
    flex: 0 0 auto;
    font-size: 13px;
  }

  .main.view-account .account-facts dd {
    min-width: 0;
    font-size: 14px;
    text-align: right;
    overflow-wrap: anywhere;
  }
}

/* Design refresh 2026-09 · 登录 / 申请账号 / 重置密码 (Figma 登录与独立页 24:2 / 24:2657 / 24:2751).
   Brand panel on the left (620px), centred form card on the right; stacks on narrow screens. */
:root {
  --stage-initiation-subtle: #122230;
  --stage-initiation-line: #2c4d68;
  --stage-script-subtle: #2a1822;
  --stage-script-line: #6b3a52;
  --stage-production-subtle: #1b1e33;
  --stage-production-line: #3a4070;
  --stage-operations-subtle: #142620;
  --stage-operations-line: #2b5c52;
}

.auth-layout {
  display: grid;
  min-height: 100vh;
  grid-template-columns: 620px minmax(0, 1fr);
  background: var(--bg);
}

.auth-brand {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
  gap: 24px;
  padding: 72px 72px 64px;
  border-right: 1px solid var(--line);
  background: var(--sidebar);
}

.auth-brand-block {
  display: flex;
  height: 48px;
  align-items: center;
  gap: 12px;
  padding-left: 8px;
}

.auth-brand-block img {
  display: block;
  width: 30px;
  height: 36px;
  object-fit: contain;
}

.auth-brand-block strong {
  display: block;
  color: var(--text);
  font-size: 18px;
  line-height: 26px;
}

.auth-brand-block small {
  display: block;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.auth-brand-copy {
  display: flex;
  flex: 1 0 auto;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
}

.auth-overline {
  color: var(--accent);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .04em;
  line-height: 16px;
}

.auth-headline {
  margin: 0;
  color: var(--text);
  font-size: 36px;
  font-weight: 700;
  line-height: 50px;
}

.auth-lead {
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.auth-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.auth-stage {
  padding: 3px 8px;
  border: 1px solid var(--stage-initiation-line);
  border-radius: var(--radius-sm);
  background: var(--stage-initiation-subtle);
  color: var(--stage-initiation);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.auth-stage.script { border-color: var(--stage-script-line); background: var(--stage-script-subtle); color: var(--stage-script); }
.auth-stage.production { border-color: var(--stage-production-line); background: var(--stage-production-subtle); color: var(--stage-production); }
.auth-stage.operations { border-color: var(--stage-operations-line); background: var(--stage-operations-subtle); color: var(--stage-operations); }

.auth-build {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.auth-form-side {
  display: flex;
  min-width: 0;
  align-items: center;
  justify-content: center;
  padding: 48px 24px;
}

.auth-card,
.auth-card.login-card {
  display: flex;
  width: min(420px, 100%);
  flex-direction: column;
  gap: 18px;
  padding: 36px 36px 32px;
  border-radius: 16px;
}

.auth-card-wide {
  width: min(460px, 100%);
  gap: 16px;
  padding: 32px 36px 28px;
}

.auth-card .auth-card-head {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.auth-card-head h1 {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  line-height: 28px;
}

.auth-card-head p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.auth-callout {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0;
  padding: 9px 12px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-md);
  background: var(--info-subtle);
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.auth-callout img {
  flex: 0 0 18px;
  margin-top: 2px;
}

.auth-card .public-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
}

.auth-card label {
  gap: 6px;
}

.auth-card .field-label {
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.auth-card .required-mark {
  margin-left: 4px;
  color: var(--danger);
}

.auth-card input,
.auth-card select {
  min-height: 44px;
  padding: 0 12px;
  font-size: 14px;
}

.auth-card .mono-input {
  font-family: var(--font-mono);
}

.auth-card .field-help {
  font-size: 12px;
  line-height: 18px;
}

.auth-card button.primary {
  min-height: 44px;
  border-radius: var(--radius-lg);
  font-size: 14px;
  font-weight: 500;
}

.auth-card .error-text,
.auth-card .login-info,
.auth-card .form-status {
  margin: -8px 0 0;
  font-size: 13px;
}

.auth-card .error-text:empty,
.auth-card .login-info:empty,
.auth-card .form-status:empty {
  display: none;
}

.auth-card .auth-links {
  justify-content: center;
  margin: 0;
  padding-top: 4px;
  font-size: 13px;
  line-height: 20px;
}

.auth-cert-link {
  margin: -8px 0 0;
  font-size: 12px;
  text-align: center;
}

.auth-cert-link a {
  color: var(--muted);
}

@media (max-width: 1100px) {
  .auth-layout {
    grid-template-columns: minmax(320px, 42%) minmax(0, 1fr);
  }

  .auth-brand {
    padding: 48px 40px;
  }

  .auth-headline {
    font-size: 28px;
    line-height: 40px;
  }
}

@media (max-width: 760px) {
  /* Phone: compact brand band on top (mark, name, headline), form card below. */
  .auth-layout {
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
  }

  .auth-brand {
    min-height: 0;
    gap: 16px;
    padding: 20px 20px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .auth-brand-block {
    height: 40px;
    padding-left: 0;
  }

  .auth-brand-copy {
    gap: 10px;
  }

  .auth-overline,
  .auth-lead,
  .auth-build {
    display: none;
  }

  .auth-headline {
    font-size: 22px;
    line-height: 32px;
  }

  .auth-form-side {
    align-items: flex-start;
    padding: 20px 16px 40px;
  }

  .auth-card,
  .auth-card.login-card,
  .auth-card-wide {
    padding: 24px 20px;
  }
}

/* Design refresh 2026-09 · 排期与进度 v2 (Figma 11:201 四阶段视图 / 12:677 执行明细) and sidebar account block (Figma 8:8). */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.ui-icon {
  display: block;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

/* Sidebar: help + account pinned to the bottom; Build/部署 is small print under the account. */
.side .side-help-label {
  margin-top: auto;
}

.side .account {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 2px 8px;
  margin-top: 12px;
  padding: 16px 8px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.side .account strong {
  grid-column: 1;
  font-size: 14px;
  line-height: 22px;
}

.side .account > small:not(.account-build) {
  grid-column: 1;
  font-size: 12px;
  line-height: 18px;
}

.side .account #logout {
  grid-column: 2;
  grid-row: 1 / span 2;
  min-height: 28px;
  margin: 0;
  padding: 0 10px;
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
}

.side .account #logout:hover {
  background: var(--hover);
  color: var(--text);
}

.side .account .account-build {
  grid-column: 1 / -1;
  margin-top: 6px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 18px;
}

/* Page header v2: 32px title + date, summary stats, filter + single primary action. */
.page-header-v2 {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}

.page-header-v2 > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.page-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
}

.page-header-v2 h1 {
  margin: 0;
  font-size: 32px;
  line-height: 40px;
}

.page-date {
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.page-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 14px;
  margin: 12px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.page-summary i {
  color: var(--muted);
  font-style: normal;
}

.summary-stat strong {
  margin-right: 6px;
  color: var(--text);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.summary-stat strong.warn { color: var(--warn); }
.summary-stat strong.danger { color: var(--danger); }

.page-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 12px;
}

.page-filter select {
  min-width: 160px;
  min-height: 44px;
  padding: 0 36px 0 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-lg);
  appearance: none;
  background: var(--raised) url('/icons/chevron-down.svg') right 12px center / 18px 18px no-repeat;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.page-header-v2 .action-button {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  gap: 8px;
  padding: 0 20px;
  border-radius: var(--radius-lg);
  white-space: nowrap;
}

/* Segmented view switch. */
.schedule-toolbar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.schedule-toolbar > .muted {
  margin-left: auto;
  font-size: 12px;
}

.personal-schedule {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  min-width: 0;
  gap: 12px;
  margin-top: 20px;
}

.personal-schedule-intro,
.personal-schedule-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.personal-schedule-intro h2,
.personal-schedule-item h3 {
  margin: 0 0 6px;
}

.personal-schedule-intro p,
.personal-schedule-item p {
  margin: 0;
  color: var(--muted);
}

.personal-schedule-intro > span {
  flex: none;
  color: var(--accent);
}

.personal-schedule-item small {
  color: var(--muted);
}

.personal-schedule-item.is-overdue {
  border-color: var(--warn);
}

.personal-schedule-item button {
  flex: none;
}

.personal-schedule-list-title {
  margin: 12px 0 0;
}

.personal-week {
  min-width: 0;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.personal-week-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.personal-week-head h3,
.personal-week-head p {
  margin: 0;
}

.personal-week-head p,
.personal-week > .muted {
  color: var(--muted);
  font-size: 13px;
}

.personal-week-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.personal-week-scroll {
  overflow-x: auto;
}

.personal-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(132px, 1fr));
  gap: 8px;
  min-width: 972px;
}

.personal-week-day {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 142px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
}

.personal-week-day.is-today {
  border-color: var(--accent);
}

.personal-week-day > strong {
  font-size: 13px;
}

.personal-week-day > strong span,
.personal-week-empty,
.personal-week-node small {
  color: var(--muted);
  font-size: 11px;
}

.personal-week-empty {
  padding-top: 8px;
}

.personal-week-node {
  display: flex;
  flex-direction: column;
  gap: 3px;
  width: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  text-align: left;
  background: var(--surface);
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.personal-week-node:hover,
.personal-week-node:focus-visible {
  border-color: var(--accent);
}

.personal-week-node.is-done {
  opacity: .68;
}

.personal-week > .muted {
  margin: 12px 0 0;
}

@media (max-width: 700px) {
  .personal-schedule-intro,
  .personal-schedule-item {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .personal-week-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
}

.segmented button {
  min-height: 32px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
}

.segmented button:hover:not(.active) {
  color: var(--text);
}

.segmented button.active {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
  font-weight: 500;
}

/* Four-phase panel. */
.phase-project-list {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.view-schedule .phase-project-list .phase-project {
  display: flex;
  margin: 0;
  flex-direction: column;
  gap: 20px;
  padding: 20px 24px;
  border-radius: 12px;
}

.view-schedule .phase-project-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.view-schedule .phase-project-header > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.phase-project-title {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
}

.view-schedule .phase-project-title h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.view-schedule .phase-project-header p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 20px;
}

.phase-stage-tag {
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--phase-color) 45%, transparent);
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--phase-color) 12%, var(--surface));
  color: var(--phase-color);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.view-schedule .phase-project-target {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
}

.view-schedule .phase-project-target span {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.view-schedule .phase-project-target strong {
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.view-schedule .phase-project-list .phase-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.view-schedule .phase-project-list .phase-summary-card {
  display: flex;
  min-height: 0;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sunken);
}

.view-schedule .phase-project-list .phase-summary-card.is-current {
  border-color: var(--phase-color);
  background: color-mix(in srgb, var(--phase-color) 12%, var(--surface));
}

.phase-card-top {
  display: flex;
  min-height: 24px;
  align-items: center;
  gap: 8px;
}

.phase-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--phase-color);
}

.view-schedule .phase-project-list .phase-summary-number {
  position: static;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.view-schedule .phase-project-list .phase-summary-card h3 {
  flex: 1 1 auto;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.view-schedule .phase-project-list .phase-summary-card.is-future h3,
.view-schedule .phase-project-list .phase-summary-card.is-future > strong {
  color: var(--text-secondary);
}

.phase-current-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 1px 8px;
  border: 1px solid var(--info-line);
  border-radius: 999px;
  background: var(--info-subtle);
  color: var(--blue);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.phase-current-pill::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  content: "";
}

.view-schedule .phase-project-list .phase-summary-card > strong {
  order: 0;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
  line-height: 32px;
}

.view-schedule .phase-project-list .phase-summary-card > strong small {
  margin-left: 4px;
  color: var(--muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
}

.view-schedule .phase-project-list .phase-card-dates {
  order: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.phase-timeline {
  display: grid;
  gap: 6px;
}

.phase-bar {
  position: relative;
  display: flex;
  gap: 2px;
}

.phase-bar-segment {
  height: 6px;
  min-width: 2px;
  border-radius: 3px;
}

.phase-bar-today {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--text);
}

.phase-bar-legend {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.phase-bar-legend strong {
  color: var(--text-secondary);
  font-family: inherit;
  font-weight: 500;
  text-align: center;
}

.view-schedule .phase-project-list .phase-project-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 24px;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.view-schedule .phase-project-list .phase-lead-fact {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.view-schedule .phase-project-list .phase-lead-fact span {
  color: var(--muted);
  font-size: 12px;
}

.view-schedule .phase-project-list .phase-lead-fact strong {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
}

.phase-project-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

.ghost-button,
.secondary-button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
}

.ghost-button {
  border-color: transparent;
  background: transparent;
  color: var(--text-secondary);
}

.ghost-button:hover {
  background: var(--hover);
  color: var(--text);
}

.secondary-button {
  border: 1px solid var(--line-strong);
  background: var(--raised);
  color: var(--text);
}

.schedule-pending-callout {
  display: flex;
  width: 100%;
  min-height: 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: -12px;
  padding: 8px 12px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-md);
  background: var(--warn-subtle);
  color: var(--warn);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
}

.schedule-pending-callout span {
  flex: 1 1 auto;
}

/* 执行明细 view. */
.schedule-details {
  display: grid;
  gap: 20px;
  margin-top: 24px;
}

.schedule-details .legacy-disclosure-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.schedule-details-heading {
  margin: 8px 0 -8px;
  font-size: 18px;
  line-height: 26px;
}

/* Chinese date display over native date inputs (browser placeholder can be "yyyy/mm/日"). */
.zh-date {
  position: relative;
  display: block;
  min-width: 0;
}

.zh-date > input {
  width: 100%;
  color: transparent;
  caret-color: transparent;
}

.zh-date > input::-webkit-datetime-edit {
  color: transparent;
}

.zh-date-display {
  position: absolute;
  top: 50%;
  left: 11px;
  right: 34px;
  overflow: hidden;
  color: var(--text);
  pointer-events: none;
  text-overflow: ellipsis;
  transform: translateY(-50%);
  white-space: nowrap;
}

.zh-date.is-empty .zh-date-display {
  color: var(--muted);
}

.zh-date.is-disabled .zh-date-display {
  opacity: .5;
}

@media (max-width: 1100px) {
  .view-schedule .phase-project-list .phase-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .page-header-v2 {
    flex-wrap: wrap;
  }

  .page-actions {
    width: 100%;
  }

  .page-filter {
    flex: 1 1 auto;
  }

  .page-filter select {
    width: 100%;
  }
}

@media (max-width: 600px) {
  .page-header-v2 h1 {
    font-size: 26px;
    line-height: 34px;
  }

  .page-actions {
    flex-direction: column;
    align-items: stretch;
  }

  .page-header-v2 .action-button {
    justify-content: center;
    margin-top: 0;
  }

  .summary-stat strong {
    font-size: 20px;
  }

  .schedule-toolbar {
    flex-wrap: wrap;
  }

  .schedule-toolbar > .muted {
    margin-left: 0;
  }

  .view-schedule .phase-project-list .phase-project {
    gap: 16px;
    padding: 16px;
  }

  .view-schedule .phase-project-list .phase-summary-card {
    padding: 12px;
  }

  .view-schedule .phase-project-list .phase-summary-card > strong {
    font-size: 20px;
    line-height: 28px;
  }

  .phase-project-actions {
    width: 100%;
    margin-left: 0;
  }

  .phase-project-actions .secondary-button {
    flex: 1 1 auto;
    justify-content: center;
  }

  .phase-bar-legend strong {
    font-size: 11px;
  }
}

@media (max-width: 900px) {
  .side:not(.menu-open) .account {
    display: none;
  }

  .side.menu-open .account {
    padding: 12px 4px 0;
  }
}

.view-schedule .phase-project-header .phase-date-source {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
}

/* 执行明细 v2 table (Figma 12:677). */
.schedule-detail-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-left: auto;
}

.schedule-detail-filters .secondary-button {
  min-height: 36px;
}

.schedule-detail-filters .secondary-button.is-active {
  border-color: var(--warn);
  background: var(--warn-subtle);
  color: var(--warn);
}

.schedule-detail-filters .page-filter select {
  min-width: 140px;
  min-height: 36px;
  border-radius: var(--radius-md);
}

.view-schedule .schedule-project-groups {
  display: grid;
  gap: 16px;
}

.view-schedule .schedule-project-group {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.view-schedule .schedule-project-group > summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.view-schedule .schedule-project-group > summary::-webkit-details-marker {
  display: none;
}

.view-schedule .schedule-project-group > summary::before {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
  content: "";
  opacity: .7;
  transform: rotate(-90deg);
  transition: transform .15s;
}

.view-schedule .schedule-project-group[open] > summary::before {
  transform: none;
}

.view-schedule .schedule-group-name {
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.view-schedule .schedule-group-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin-left: auto;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.view-schedule .schedule-group-meta i {
  font-style: normal;
}

.danger-text { color: var(--danger); }
.warn-text { color: var(--warn); }

.view-schedule .schedule-project-group[open] > summary {
  border-bottom: 1px solid var(--line);
}

.view-schedule .schedule-node-table .row {
  grid-template-columns: minmax(150px, 1.6fr) minmax(0, 1fr) minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, .6fr) minmax(0, 1fr) minmax(120px, auto);
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  font-size: 14px;
}

.view-schedule .schedule-node-table .row.head {
  color: var(--muted);
  font-size: 12px;
}

.view-schedule .schedule-node-table .row strong {
  font-weight: 400;
}

.view-schedule .schedule-node-table .schedule-node-dates,
.view-schedule .schedule-node-actual {
  font-family: var(--font-mono);
  font-size: 13px;
}

.view-schedule .schedule-node-actual.is-progress {
  font-family: inherit;
  color: var(--text-secondary);
}

.view-schedule .schedule-node-progress small {
  display: block;
  font-size: 12px;
}

.view-schedule .schedule-node-table .schedule-delay {
  margin: 0;
  font-family: var(--font-mono);
  font-weight: 500;
}

.view-schedule .schedule-node-table .row-actions {
  justify-content: flex-end;
}

.view-schedule .schedule-node-table .row-actions button {
  min-height: 30px;
  padding: 0 10px;
  font-size: 13px;
}

.schedule-timeline-disclosure {
  border-top: 1px solid var(--line);
}

.schedule-timeline-disclosure > summary {
  padding: 12px 16px;
  color: var(--accent);
  cursor: pointer;
  font-size: 13px;
}

.schedule-timeline-disclosure .schedule-timeline {
  margin: 0;
  border: 0;
  border-radius: 0;
}

@media (max-width: 1180px) {
  .schedule-detail-filters {
    width: 100%;
    margin-left: 0;
  }

  .view-schedule .schedule-node-table .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-schedule .schedule-group-meta {
    width: 100%;
    margin-left: 0;
  }
}

/* Refinements after the 100% zoom review (2026-09-28). */
.page-header-v2 {
  min-height: 0;
}

.page-filter {
  flex: 0 0 auto;
}

.page-filter select {
  width: auto;
  max-width: 280px;
}

.schedule-toolbar {
  margin-top: 28px;
}

@media (min-width: 901px) {
  .side nav {
    gap: 4px;
  }

  .side nav button {
    height: 44px;
    gap: 12px;
    padding: 0 12px 0 16px;
    font-size: 14px;
  }

  .side nav .nav-icon {
    width: 18px;
    height: 18px;
    flex-basis: 18px;
  }

  .side .account {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .side .account > small:not(.account-build) {
    grid-column: 1 / -1;
  }

  .side .account #logout {
    grid-row: 1;
    align-self: center;
  }

  .side .account .account-build {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
}

/* Design refresh 2026-09 · 审批与待办 v2 (Figma 13:409): tabs, todo rows and the right-hand approval drawer. */
.segmented-count {
  margin-left: 4px;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 13px;
}

.segmented button.active .segmented-count {
  color: var(--text);
}

.approvals-filter {
  margin-left: auto;
}

.view-approvals .approval-workbenches {
  display: grid;
  gap: 24px;
  margin-top: 24px;
}

.manual-review-approval .manual-review-all{margin-left:auto;color:var(--accent);font-size:13px;text-decoration:none}
.manual-review-approval .manual-review-intro{margin:0 0 6px;font-size:13px}
.manual-review-approval .manual-review-row{text-decoration:none}
.manual-review-approval .manual-review-row .approval-todo-main{flex:1;min-width:0}
.manual-review-approval .manual-review-row strong,.manual-review-approval .manual-review-row small{display:block}
.manual-review-more{padding-top:6px;border-top:1px solid var(--line)}
.manual-review-more summary{padding:10px 12px;color:var(--accent);cursor:pointer}

.view-approvals .approval-workbench {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 20px;
  border-radius: 12px;
}

.view-approvals .approval-workbench-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
}

.view-approvals .approval-workbench-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.view-approvals .approval-workbench-head .ghost-button {
  margin-left: auto;
}

.view-approvals .approval-workbench-count {
  color: var(--muted);
  font-size: 13px;
}

.view-approvals .approval-workbench-count.has-pending {
  color: var(--warn);
}

.approval-todo-list {
  display: grid;
  gap: 4px;
}

.approval-todo {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 64px;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.approval-todo:hover {
  background: var(--hover);
}

.approval-todo.is-selected {
  border-color: var(--accent-line, #2b5c52);
  background: var(--nav-active);
  box-shadow: inset 3px 0 0 var(--accent);
}

.approval-todo-main {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.approval-todo-main strong {
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.approval-todo-main small {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.approval-todo-chevron {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
  opacity: .6;
  transform: rotate(-90deg);
}

.view-approvals .approval-history-list {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.view-approvals .release-actions {
  margin-top: 24px;
}

.view-approvals .page-header-v2 .action-button .ui-icon {
  filter: none;
}

/* Right-hand approval drawer: the existing decision dialog presented as a side sheet. */
dialog#approval-decision-dialog.approval-design-dialog {
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--sidebar);
}

dialog#approval-decision-dialog::backdrop {
  background: rgb(4 8 9 / 45%);
}

dialog#approval-decision-dialog[open] {
  animation: approval-drawer-in .18s ease-out;
}

@keyframes approval-drawer-in {
  from { transform: translateX(24px); opacity: .6; }
  to { transform: none; opacity: 1; }
}

dialog#approval-decision-dialog form {
  height: 100dvh;
  max-height: 100dvh;
}

#approval-decision-dialog .approval-design-header {
  align-items: center;
  gap: 8px;
  padding: 14px 16px 14px 12px;
  border-bottom: 1px solid var(--line);
}

#approval-decision-dialog .approval-design-header h2 {
  flex: 1 1 auto;
  font-size: 16px;
  line-height: 24px;
}

.approval-drawer-back {
  width: 32px;
  height: 32px;
  min-height: 32px !important;
  flex: 0 0 32px;
  padding: 0;
  border-color: transparent;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
  transform: rotate(90deg);
}

#approval-decision-dialog .approval-icon-close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  flex-basis: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.approval-drawer-project {
  padding: 18px 20px 4px;
}

.approval-drawer-project strong {
  display: block;
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.approval-drawer-meta {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

#approval-decision-dialog .decision-permission {
  margin: 12px 20px;
}

#approval-decision-dialog .approval-review-scroll {
  flex: 1 1 auto;
  padding: 0 20px 20px;
}

#approval-decision-dialog .approval-decision-body {
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
}

#approval-decision-dialog .decision-panel {
  padding: 14px;
  border-radius: 10px;
}

.approval-change-callout {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--warn);
  border-radius: var(--radius-md);
  background: var(--warn-subtle);
  color: var(--warn);
  font-size: 14px;
  font-weight: 500;
  line-height: 22px;
}

.approval-compare-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.approval-compare-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px 90px;
  gap: 8px;
  padding: 9px 12px;
  border-top: 1px solid var(--line);
  font-size: 13px;
}

.approval-compare-row:first-child {
  border-top: 0;
}

.approval-compare-row span:not(:first-child) {
  font-family: var(--font-mono);
  text-align: right;
}

.approval-compare-row.is-head {
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
}

.approval-compare-row.is-changed:not(.is-head) {
  background: var(--warn-subtle);
}

.approval-compare-row.is-changed:not(.is-head) span:last-child {
  color: var(--warn);
}

#approval-decision-dialog .decision-footer {
  position: static;
  display: grid;
  margin: 0;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  background: var(--sidebar);
}

#approval-decision-dialog .decision-footer .decision-mode {
  grid-column: 1 / -1;
  margin: 0;
}

#approval-decision-dialog .decision-footer button {
  width: 100%;
}

#approval-decision-dialog .decision-footer button[hidden] + button {
  grid-column: 1 / -1;
}

@media (max-width: 600px) {
  .approvals-filter {
    width: 100%;
    margin-left: 0;
  }

  .approvals-filter select {
    width: 100%;
    max-width: none;
  }

  .view-approvals .approval-workbench {
    padding: 16px;
  }

  .approval-todo {
    flex-wrap: wrap;
    gap: 8px 10px;
    padding: 12px;
  }

  .approval-todo-main {
    flex-basis: calc(100% - 90px);
  }
}

.approvals-preview-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

/* Design refresh 2026-09 · 审计记录 v2 (Figma 21:2): filter card, fixed-column event rows, load-more paging. */
.main.view-audit .audit-filter-card {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.main.view-audit .audit-filters {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
  align-items: end;
  gap: 12px 16px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  box-shadow: none;
}

.main.view-audit .audit-filters label {
  width: auto;
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.main.view-audit .audit-filters select {
  min-height: 44px;
  font-size: 14px;
  font-weight: 400;
}

.main.view-audit .audit-filters #audit-clear {
  min-height: 44px;
  font-size: 14px;
}

.main.view-audit .audit-filter-note {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.main.view-audit .audit-feed {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.main.view-audit .audit-day {
  margin: 24px 0 4px;
  font-size: 16px;
  line-height: 24px;
}

.main.view-audit .audit-count {
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.main.view-audit .audit-event {
  display: block;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.main.view-audit .audit-event[open] {
  border-color: var(--line-strong);
}

.main.view-audit .audit-event-row {
  display: grid;
  grid-template-columns: 52px 60px 64px minmax(140px, 1fr) minmax(0, 1.6fr) auto 18px;
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 10px 16px;
  cursor: pointer;
  list-style: none;
}

.main.view-audit .audit-event-row::-webkit-details-marker {
  display: none;
}

.main.view-audit .audit-time {
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.main.view-audit .audit-event .audit-sequence {
  position: static;
  padding: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.main.view-audit .audit-event .audit-category {
  justify-self: start;
}

.main.view-audit .audit-action {
  overflow: hidden;
  font-size: 14px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main.view-audit .audit-event .audit-object {
  overflow: hidden;
  margin: 0;
  color: var(--text-secondary);
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.main.view-audit .audit-actor {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.main.view-audit .audit-chevron {
  width: 18px;
  height: 18px;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
  opacity: .6;
  transform: rotate(-90deg);
  transition: transform .15s;
}

.main.view-audit .audit-event[open] .audit-chevron {
  transform: none;
}

.main.view-audit .audit-event-expanded {
  display: grid;
  gap: 8px;
  padding: 0 16px 14px calc(16px + 52px + 60px + 24px);
}

.main.view-audit .audit-event-expanded .audit-summary {
  margin: 0;
  color: var(--text);
  font-size: 14px;
}

.main.view-audit .audit-raw-actor {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.main.view-audit .audit-event-expanded pre {
  max-height: 280px;
  overflow: auto;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
  color: var(--text-secondary);
  font-size: 12px;
}

.main.view-audit .audit-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 24px 0 8px;
  font-size: 12px;
}

.audit-more-chevron {
  width: 18px;
  height: 18px;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
}

@media (max-width: 1000px) {
  .main.view-audit .audit-event-row {
    grid-template-columns: 48px auto minmax(0, 1fr) 18px;
    grid-template-areas:
      "time category action chevron"
      "seq object object object";
    row-gap: 4px;
  }

  .main.view-audit .audit-time { grid-area: time; }
  .main.view-audit .audit-event .audit-sequence { grid-area: seq; }
  .main.view-audit .audit-event .audit-category { grid-area: category; }
  .main.view-audit .audit-action { grid-area: action; }
  .main.view-audit .audit-chevron { grid-area: chevron; }
  .main.view-audit .audit-event .audit-object { grid-area: object; }

  .main.view-audit .audit-actor {
    display: none;
  }

  .main.view-audit .audit-event-expanded {
    padding-left: 16px;
  }
}

@media (max-width: 600px) {
  .main.view-audit .audit-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main.view-audit .audit-filters label:first-of-type {
    grid-column: 1 / -1;
  }

  .main.view-audit .audit-event {
    padding: 0;
  }

  .main.view-audit .audit-event-row {
    padding: 10px 12px;
  }
}

/* Design refresh 2026-09 · 风险与瓶颈 v2 (Figma 17:1647): title row with 查看排期 →, reason icon, impact chips. */
.main.view-risks .risk-overview {
  margin-top: 24px;
  gap: 16px;
}

.main.view-risks .risk-overview-item {
  min-height: 0;
  padding: 18px 20px;
}

.main.view-risks .risk-group {
  margin-top: 32px;
}

.main.view-risks .risk-project-list {
  display: grid;
  gap: 12px;
}

.main.view-risks .risk-project {
  display: grid;
  gap: 10px;
  padding: 18px 20px;
  border-radius: 12px;
}

.main.view-risks .risk-project-main {
  display: flex;
  align-items: center;
  gap: 16px;
}

.risk-title-row {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
  min-width: 0;
}

.main.view-risks .risk-title-row h3 {
  margin: 0;
  font-size: 20px;
  line-height: 28px;
}

.main.view-risks .risk-title-row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.main.view-risks .risk-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
}

.main.view-risks .risk-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.main.view-risks .risk-project.red .risk-status { border-color: var(--danger-line); background: var(--danger-subtle); color: var(--danger); }
.main.view-risks .risk-project.yellow .risk-status { border-color: var(--warn-line); background: var(--warn-subtle); color: var(--warn); }
.main.view-risks .risk-project.green .risk-status { border-color: var(--accent-line, #2b5c52); background: var(--accent-subtle, #142620); color: var(--accent); }

.risk-schedule-link {
  flex: 0 0 auto;
  min-height: 32px !important;
  font-size: 13px;
}

.main.view-risks .risk-primary-reason {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.risk-reason-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: var(--muted);
  -webkit-mask: url('/icons/info.svg') center / contain no-repeat;
  mask: url('/icons/info.svg') center / contain no-repeat;
}

.risk-project.red .risk-reason-icon { background-color: var(--danger); -webkit-mask-image: url('/icons/risk.svg'); mask-image: url('/icons/risk.svg'); }
.risk-project.yellow .risk-reason-icon { background-color: var(--warn); -webkit-mask-image: url('/icons/alert-warn.svg'); mask-image: url('/icons/alert-warn.svg'); }
.risk-project.green .risk-reason-icon { background-color: var(--accent); -webkit-mask-image: url('/icons/check-circle.svg'); mask-image: url('/icons/check-circle.svg'); }

.risk-impacts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-left: 28px;
}

.risk-impacts span {
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
}

.main.view-risks .risk-more {
  margin-left: 28px;
}

@media (max-width: 600px) {
  .main.view-risks .risk-project-main {
    flex-direction: column;
    align-items: stretch;
  }

  .risk-schedule-link {
    justify-content: center;
  }

  .risk-impacts,
  .main.view-risks .risk-more {
    padding-left: 0;
    margin-left: 0;
  }
}

.main.view-risks .risk-primary-reason {
  padding: 0;
  border: 0;
}

.main.view-risks .risk-primary-reason::before {
  display: none;
  content: none;
}

.main.view-risks .risk-overview-item {
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: 14px;
}

/* Design refresh 2026-09 · 指标与放行 v2 (Figma 18:275 / 19:2096). */
.metrics-toolbar .week-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
}

.metrics-toolbar .week-switch .ghost-button {
  min-height: 32px;
  font-family: inherit;
  font-size: 13px;
}

.metrics-toolbar .week-switch .ghost-button:disabled {
  opacity: .4;
}

.metrics-info {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 20px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-md);
  background: var(--info-subtle);
  color: var(--blue);
  font-size: 14px;
  font-weight: 500;
}

.view-metrics .release-board {
  margin-top: 24px;
}

.view-metrics .release-board .section-heading h2 {
  margin: 0;
}

.release-board-list {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}

.view-metrics .release-board-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(280px, 1.2fr);
  align-items: start;
  gap: 20px;
  margin: 0;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.view-metrics .release-board-item.is-history {
  grid-template-columns: minmax(180px, 1fr) minmax(280px, 2fr);
}

.release-item-head strong {
  display: block;
  font-size: 18px;
  line-height: 26px;
}

.release-item-head div {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  margin-top: 6px;
}

.release-item-head small {
  color: var(--muted);
  font-size: 13px;
}

.release-col-label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
}

.release-item-reasons ul {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.view-metrics .release-reason {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  color: var(--text);
  font-size: 14px;
}

.view-metrics .release-reason::before {
  display: none;
}

.release-reason > i {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  background-color: var(--muted);
  -webkit-mask: url('/icons/info.svg') center / contain no-repeat;
  mask: url('/icons/info.svg') center / contain no-repeat;
}

.release-reason.tone-good > i { background-color: var(--accent); -webkit-mask-image: url('/icons/check-circle.svg'); mask-image: url('/icons/check-circle.svg'); }
.release-reason.tone-warn > i { background-color: var(--warn); -webkit-mask-image: url('/icons/alert-warn.svg'); mask-image: url('/icons/alert-warn.svg'); }
.release-reason.tone-info > i { background-color: var(--blue); }
.release-reason.tone-neutral > i { background-color: var(--text-secondary); -webkit-mask-image: url('/icons/calendar-plus.svg'); mask-image: url('/icons/calendar-plus.svg'); }
.release-reason.tone-danger > i { background-color: var(--danger); -webkit-mask-image: url('/icons/risk.svg'); mask-image: url('/icons/risk.svg'); }

.release-decision {
  padding: 14px;
  border-radius: 10px;
  background: var(--sunken);
}

.view-metrics .release-decision-current {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
  margin: 0;
  font-size: 13px;
}

.view-metrics .release-decision-current strong {
  color: var(--accent);
  font-size: 14px;
}

.view-metrics .release-decision-current span {
  color: var(--muted);
}

.view-metrics .release-decision-current small {
  flex-basis: 100%;
  color: var(--text-secondary);
}

.view-metrics .release-decision-current.is-empty {
  color: var(--text-secondary);
}

.release-decision [data-revise-decision] {
  min-height: 30px;
  margin-top: 8px;
  padding: 0 8px;
  font-size: 13px;
}

.view-metrics .release-decision-form {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.decision-segments {
  display: grid;
  grid-auto-columns: 1fr;
  grid-auto-flow: column;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.decision-segment {
  position: relative;
  display: block;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  text-align: center;
}

.decision-segment input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.decision-segment span {
  display: block;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
}

.decision-segment input:checked + span {
  border-color: var(--line-strong);
  background: var(--hover);
  color: var(--text);
  font-weight: 500;
}

.decision-segment input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.decision-segment.is-locked {
  cursor: not-allowed;
  opacity: .45;
}

.decision-lock {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--warn);
  font-size: 12px;
}

.decision-lock .ui-icon {
  width: 16px;
  height: 16px;
  flex-basis: 16px;
}

.view-metrics .release-decision-form label {
  gap: 6px;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
}

.view-metrics .release-decision-form button.primary {
  justify-self: start;
  min-height: 34px;
  padding: 0 14px;
  font-size: 13px;
}

.gate-bars {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.gate-bar-row {
  display: grid;
  grid-template-columns: 130px minmax(0, 1fr) 56px 150px;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}

.gate-bar {
  position: relative;
  height: 8px;
  border-radius: 4px;
  background: var(--sunken);
}

.gate-bar i {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 4px;
  background: var(--warn);
}

.gate-bar i.is-good {
  background: var(--accent);
}

.gate-bar b {
  position: absolute;
  top: -3px;
  width: 2px;
  height: 14px;
  margin-left: -1px;
  background: var(--text);
}

.gate-bar-row strong {
  font-family: var(--font-mono);
  font-weight: 500;
  text-align: right;
}

.gate-bar-row small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 1100px) {
  .view-metrics .release-board-item,
  .view-metrics .release-board-item.is-history {
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
  }
}

@media (max-width: 600px) {
  .metrics-toolbar {
    flex-wrap: wrap;
  }

  .metrics-toolbar .week-switch {
    width: 100%;
    justify-content: space-between;
    margin-left: 0;
  }

  .gate-bar-row {
    grid-template-columns: minmax(0, 1fr) 48px;
    gap: 6px 12px;
  }

  .gate-bar {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .gate-bar-row small {
    grid-column: 1 / -1;
  }
}

.view-metrics .release-board-item .release-decision-form {
  grid-template-columns: minmax(0, 1fr);
  align-items: stretch;
}

.view-metrics .release-board-item .release-decision-form[hidden] {
  display: none;
}

.view-metrics .release-reason {
  border: 0;
}

.view-metrics .metrics-content > .panel {
  margin-top: 20px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.view-metrics .metrics-content > .panel h2 {
  margin: 0 0 6px;
  font-size: 18px;
}

.view-metrics .metrics-content > .metrics {
  margin-top: 20px;
}

.metric-dot.neutral {
  background: var(--muted);
}

/* Design refresh 2026-09 · 账号管理 v2 (Figma 23:181): tabs, table rows and the right-hand permission drawer. */
.view-accounts .reset-code-panel {
  margin-top: 20px;
}

.view-accounts .account-list-filters {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px 160px;
  gap: 12px;
  margin-top: 20px;
}

.view-accounts .account-list-filters input,
.view-accounts .account-list-filters select {
  min-height: 40px;
}

.account-tab-note {
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.view-accounts .account-table {
  display: block;
  overflow: hidden;
  margin-top: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}

.account-table-head,
.view-accounts .account-editor-row > summary {
  display: grid;
  grid-template-columns: minmax(160px, 1.3fr) minmax(0, .9fr) minmax(0, 1.1fr) minmax(0, 1.1fr) 18px;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.account-table-head {
  border-bottom: 1px solid var(--line);
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
}

.view-accounts .account-table .account-editor-row {
  margin: 0;
  padding: 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.view-accounts .account-table .account-editor-row:first-of-type {
  border-top: 0;
}

.view-accounts .account-editor-row > summary {
  min-height: 64px;
  cursor: pointer;
  list-style: none;
}

.view-accounts .account-editor-row > summary::-webkit-details-marker {
  display: none;
}

.view-accounts .account-editor-row > summary:hover {
  background: var(--hover);
}

.view-accounts .account-row-identity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.view-accounts .account-row-identity strong {
  font-size: 14px;
  font-weight: 500;
}

.view-accounts .account-row-identity small {
  overflow: hidden;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  text-overflow: ellipsis;
}

.account-row-role,
.account-row-scope {
  color: var(--text-secondary);
  font-size: 14px;
}

.account-row-scope.is-global {
  color: var(--danger);
}

.account-row-status {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.account-row-chevron {
  width: 18px;
  height: 18px;
  background: url('/icons/chevron-down.svg') center / 18px 18px no-repeat;
  opacity: .6;
  transform: rotate(-90deg);
}

.account-filter-result {
  margin: 10px 0 0;
  font-size: 12px;
}

.view-accounts .account-protected-section {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.view-accounts .account-protected-row {
  display: grid;
  grid-template-columns: minmax(160px, 1fr) minmax(0, 1.4fr) auto;
  align-items: center;
  gap: 12px;
}

/* Drawer. */
.view-accounts dialog.account-permission-drawer {
  inset: 0 0 0 auto;
  width: min(420px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: auto;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--sidebar);
}

.view-accounts dialog.account-permission-drawer[open] {
  display: flex;
  flex-direction: column;
  animation: approval-drawer-in .18s ease-out;
}

.view-accounts dialog.account-permission-drawer::backdrop {
  background: rgb(4 8 9 / 45%);
}

.view-accounts .account-permission-drawer > header {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--sidebar);
}

.account-drawer-kicker {
  font-size: 16px;
  font-weight: 700;
}

.view-accounts .account-permission-drawer > header .dialog-close {
  position: static;
  min-height: 32px;
  padding: 0 10px;
}

.view-accounts .account-permission-drawer > h2 {
  margin: 18px 20px 0;
  font-size: 20px;
  line-height: 28px;
}

.view-accounts .account-permission-drawer .account-editor-body {
  display: grid;
  flex: 1 1 auto;
  align-content: start;
  gap: 12px;
  padding: 4px 20px 0;
}

.account-drawer-meta {
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.view-accounts .account-permission-drawer > .field-help {
  margin: 0;
  padding: 0 20px 16px;
}

.view-accounts .account-permission-drawer .account-form {
  display: grid;
  gap: 16px;
}

.view-accounts .account-permission-drawer .account-form > label:not(.switch-label) {
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.view-accounts .account-permission-drawer .account-form select,
.view-accounts .account-permission-drawer .account-form input:not([type="checkbox"]) {
  min-height: 44px;
}

.switch-label {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 12px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.switch-label small {
  flex-basis: 100%;
  padding-left: 52px;
  color: var(--muted);
  font-size: 12px;
}

.switch-input {
  position: relative;
  width: 40px;
  height: 22px;
  flex: 0 0 40px;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  appearance: none;
  background: var(--sunken);
  cursor: pointer;
  transition: background .15s;
}

.switch-input::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--muted);
  content: "";
  transition: transform .15s, background .15s;
}

.switch-input:checked {
  border-color: var(--accent);
  background: var(--accent);
}

.switch-input:checked::after {
  background: var(--accent-ink);
  transform: translateX(18px);
}

.switch-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.account-global-warning {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--danger-line);
  border-radius: 10px;
  background: var(--danger-subtle);
}

.account-global-warning[hidden] {
  display: none;
}

.account-global-warning .scope-warning {
  margin: 0;
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.account-global-warning .global-confirm-field {
  gap: 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.account-project-checklist {
  display: grid;
  gap: 2px;
  min-width: 0;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
}

.account-project-checklist legend {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 8px;
  padding: 0 0 6px;
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
}

.account-project-checklist legend small {
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

.account-project-checklist:disabled legend small {
  color: var(--warn);
}

.account-project-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 6px 2px;
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
}

.account-project-choice input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--accent);
}

.account-project-choice small {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
}

.account-project-checklist:disabled .account-project-choice {
  cursor: not-allowed;
  opacity: .5;
}

.view-accounts .account-permission-drawer .form-actions {
  position: sticky;
  bottom: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 8px -20px 0;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--sidebar);
}

.view-accounts .account-permission-drawer .form-actions button {
  width: 100%;
  min-height: 44px;
}

@media (max-width: 900px) {
  .account-table-head {
    display: none;
  }

  .view-accounts .account-editor-row > summary {
    grid-template-columns: minmax(0, 1fr) 18px;
    grid-template-areas:
      "identity chevron"
      "role chevron"
      "status chevron";
    row-gap: 4px;
  }

  .view-accounts .account-row-identity { grid-area: identity; }
  .view-accounts .account-row-role { grid-area: role; font-size: 13px; }
  .view-accounts .account-row-scope { display: none; }
  .view-accounts .account-row-status { grid-area: status; }
  .view-accounts .account-row-chevron { grid-area: chevron; }

  .view-accounts .account-list-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .view-accounts .account-list-filters .account-search {
    grid-column: 1 / -1;
  }

  .view-accounts .account-protected-row {
    grid-template-columns: minmax(0, 1fr);
  }
}

.account-project-checklist legend {
  float: left;
}

.account-project-checklist legend + * {
  clear: both;
}

/* Execution detail row states (Figma 33:895): one fixed column template for header and rows. */
.view-schedule .schedule-node-table .row:not(.schedule-stage-subhead):not(.schedule-history-row) {
  grid-template-columns: minmax(160px, 1fr) 132px 112px 108px 120px 84px 100px 136px;
  gap: 12px;
  min-height: 52px;
}

.view-schedule .schedule-node-name {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.view-schedule .schedule-node-name strong {
  font-weight: 500;
}

.schedule-blocker {
  overflow: hidden;
  color: var(--danger);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-schedule .schedule-node-plan,
.view-schedule .schedule-node-progress {
  display: grid;
  justify-items: start;
  gap: 2px;
}

.view-schedule .schedule-node-plan .schedule-proposal {
  display: block;
  margin: 0;
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 12px;
}

.view-schedule .schedule-node-progress small {
  font-size: 12px;
}

.mono {
  font-family: var(--font-mono);
}

.view-schedule .schedule-node-actual.is-done {
  font-family: inherit;
}

.history-toggle {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: none !important;
  color: var(--accent) !important;
  font-size: 12px !important;
}

.view-schedule .schedule-node-table .row-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}

.row-note {
  font-size: 12px;
  text-align: right;
}

.row-more {
  position: relative;
}

.row-more > summary {
  display: grid;
  width: 32px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: var(--raised);
  color: var(--text);
  cursor: pointer;
  list-style: none;
}

.row-more > summary::-webkit-details-marker {
  display: none;
}

.row-more-menu {
  position: absolute;
  z-index: 20;
  top: calc(100% + 4px);
  right: 0;
  display: grid;
  min-width: 120px;
  gap: 2px;
  padding: 4px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--raised);
  box-shadow: 0 10px 24px rgb(0 0 0 / 35%);
}

.row-more-menu button {
  justify-content: flex-start;
  min-height: 32px;
  border-color: transparent;
  background: transparent;
  text-align: left;
  white-space: nowrap;
}

.row-more-menu button:hover {
  background: var(--hover);
}

.view-schedule .schedule-node-table {
  overflow: visible;
}

.view-schedule .schedule-project-group {
  overflow: visible;
}

.view-schedule .schedule-node-table .row.schedule-history-row {
  display: block;
  padding: 10px 16px 12px 48px;
  background: var(--sunken);
}

.view-schedule .schedule-node-table .row.schedule-history-row[hidden] {
  display: none;
}

.progress-history-list {
  display: grid;
  gap: 6px;
}

.history-entry {
  display: grid;
  grid-template-columns: 28px minmax(80px, auto) 150px minmax(0, 1fr);
  align-items: baseline;
  gap: 12px;
  font-size: 13px;
}

.history-rev,
.history-meta {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
}

.history-actor {
  color: var(--text-secondary);
  white-space: nowrap;
}

.history-entry p {
  margin: 0;
  color: var(--text);
}

.schedule-preview-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-md);
  background: var(--info-subtle);
  color: var(--blue);
  font-size: 13px;
}

@media (max-width: 1180px) {
  .view-schedule .schedule-node-table .row:not(.schedule-stage-subhead):not(.schedule-history-row) {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
  }

  .execution-progress-details .row.schedule-history-row > *::before {
    content: none !important;
  }

  .view-schedule .schedule-node-table .row.schedule-history-row {
    padding-left: 16px;
  }

  .history-entry {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .history-entry .history-meta,
  .history-entry p {
    grid-column: 2;
  }
}

.view-schedule .schedule-node-table .row.head > :last-child {
  text-align: right;
}

/* Real-phone review 2026-09-28: bottom-nav badge was too large relative to the 22px icon. */
@media (max-width: 900px) {
  .mobile-bottom-nav .mobile-nav-count {
    top: 5px;
    left: calc(50% + 5px);
    min-width: 15px;
    height: 15px;
    padding: 0 3px;
    border-width: 1.5px;
    border-radius: 8px;
    display: grid;
    place-items: center;
    font-size: 9px;
    line-height: 1;
    text-box: trim-both cap alphabetic;
  }
}

/* Real-phone review 2026-09-28: the opened menu is a full-screen sheet above the page
   (page content no longer shows through below it); the bottom tabs stay visible. */
@media (max-width: 900px) {
  .side.menu-open {
    position: fixed;
    z-index: 45;
    inset: 0 0 calc(60px + env(safe-area-inset-bottom));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 20px;
    background: var(--sidebar);
    box-shadow: none;
  }

  body.mobile-menu-open {
    overflow: hidden;
  }
}

/* Real-phone review 2026-09-28: 风险概况 tiles stack as rows on phones so the full label and
   its note fit instead of wrapping inside three narrow tiles. */
@media (max-width: 600px) {
  .main.view-risks .risk-overview {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    margin-top: 16px;
  }

  .main.view-risks .risk-overview-item {
    display: grid;
    min-height: 0;
    grid-template-columns: 44px minmax(0, 1fr);
    align-items: center;
    gap: 0 12px;
    padding: 10px 14px;
    text-align: left;
  }

  .main.view-risks .risk-overview-item strong {
    grid-row: 1 / span 2;
    font-size: 26px;
    line-height: 32px;
    text-align: center;
  }

  .main.view-risks .risk-overview-item span {
    font-size: 14px;
    line-height: 20px;
    white-space: nowrap;
  }

  .main.view-risks .risk-overview-item small {
    display: block;
    grid-column: 2;
    overflow: hidden;
    font-size: 12px;
    line-height: 17px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

/* Design refresh 2026-09 · 调整排期日期（12 节点草稿）(Figma 37:3273, states 40:3175): summary strip,
   week-ticked timeline with today line, stage-coloured bars, changed-row marking and plain-text read-only dates. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.view-schedule .schedule-timeline {
  display: grid;
  gap: 20px;
  padding: 20px 24px;
  background: var(--surface);
}

.view-schedule .schedule-timeline .timeline-header {
  align-items: flex-start;
  gap: 16px;
  flex-wrap: nowrap;
}

.schedule-timeline .timeline-title-block {
  min-width: 0;
}

.schedule-timeline .timeline-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.view-schedule .schedule-timeline .timeline-header h2 {
  margin: 0;
  font-size: 18px;
  line-height: 26px;
  font-weight: 700;
}

.view-schedule .schedule-timeline .timeline-header p {
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.schedule-timeline .timeline-chip {
  padding: 2px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--raised);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.schedule-timeline .timeline-chip.accent {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
}

.schedule-timeline .timeline-chip.warn {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
  color: var(--warn);
}

.view-schedule .schedule-timeline .timeline-header-actions {
  flex: 0 0 auto;
  flex-wrap: nowrap;
}

.view-schedule .schedule-timeline .timeline-header-actions button {
  min-height: 36px;
  padding: 0 16px;
  font-size: 14px;
}

.view-schedule .schedule-timeline .timeline-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 0 0;
  border: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.view-schedule .schedule-timeline .timeline-status::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.view-schedule .schedule-timeline .timeline-status.pending {
  color: var(--warn);
}

.view-schedule .schedule-timeline .timeline-status.pending::before {
  background: var(--warn);
}

.schedule-timeline .timeline-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  padding: 0 4px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.schedule-timeline .timeline-summary > div {
  min-width: 0;
  padding: 10px 16px;
}

.schedule-timeline .timeline-summary dt {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.schedule-timeline .timeline-summary dd {
  margin: 2px 0 0;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-timeline .timeline-summary .warn dd {
  color: var(--warn);
}

.schedule-timeline .timeline-grid {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.schedule-timeline .timeline-grid-head,
.view-schedule .schedule-timeline .timeline-row {
  display: grid;
  grid-template-columns: 176px 88px minmax(0, 1fr) 128px 128px;
  grid-template-areas: "label owner track start end";
  align-items: center;
  gap: 0 12px;
  padding: 0 16px;
}

.schedule-timeline .timeline-grid-head {
  min-height: 36px;
  background: var(--raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.view-schedule .schedule-timeline .timeline-scale {
  position: relative;
  display: block;
  height: 36px;
  margin: 0;
  font-size: 11px;
  font-weight: 400;
  line-height: 36px;
}

.schedule-timeline .timeline-scale span {
  position: absolute;
  top: 0;
  font-family: var(--font-mono);
  transform: translateX(-50%);
  white-space: nowrap;
}

.schedule-timeline .timeline-scale .timeline-today-label {
  color: var(--accent);
  font-family: inherit;
  font-weight: 600;
}

.view-schedule .schedule-timeline .timeline-rows {
  gap: 0;
}

.view-schedule .schedule-timeline .timeline-row {
  min-height: 52px;
  padding-top: 0;
  padding-bottom: 0;
  border-top: 1px solid var(--line);
}

.view-schedule .schedule-timeline .timeline-row.changed {
  background: color-mix(in srgb, var(--warn-subtle) 55%, transparent);
  box-shadow: inset 3px 0 0 var(--warn);
}

.view-schedule .schedule-timeline .timeline-label {
  display: flex;
  grid-area: label;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.schedule-timeline .timeline-stage-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--stage-color);
}

.view-schedule .schedule-timeline .timeline-label .timeline-seq {
  display: inline;
  margin: 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 18px;
}

.view-schedule .schedule-timeline .timeline-label strong {
  overflow: hidden;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.schedule-timeline .timeline-delta {
  flex: 0 0 auto;
  padding: 0 6px;
  border-radius: 4px;
  background: var(--warn-subtle);
  color: var(--warn);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
}

.schedule-timeline .timeline-owner {
  grid-area: owner;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.view-schedule .schedule-timeline .timeline-track {
  position: relative;
  grid-area: track;
  height: 52px;
  border: 0;
  border-radius: 0;
  background: none;
}

.schedule-timeline .timeline-week,
.schedule-timeline .timeline-today {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: color-mix(in srgb, var(--line) 60%, transparent);
  pointer-events: none;
}

.schedule-timeline .timeline-today {
  width: 1.5px;
  background: color-mix(in srgb, var(--accent) 70%, transparent);
}

.schedule-timeline .timeline-ghost {
  position: absolute;
  top: 16px;
  height: 20px;
  border: 1px dashed var(--muted);
  border-radius: 5px;
  pointer-events: none;
}

.view-schedule .schedule-timeline .timeline-bar {
  top: 16px;
  display: flex;
  height: 20px;
  min-width: 8px;
  align-items: center;
  overflow: visible;
  padding: 0 8px;
  border: 0;
  border-radius: 5px;
  background: var(--stage-color);
  color: var(--accent-ink);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  line-height: 16px;
  min-height: 0;
  cursor: grab;
}

.view-schedule .schedule-timeline .timeline-bar:hover:not([disabled]) {
  background: var(--stage-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--stage-color) 45%, transparent);
}

.view-schedule .schedule-timeline .timeline-bar[disabled] {
  border: 0;
  background: var(--stage-color);
  color: var(--accent-ink);
  cursor: default;
  opacity: 1;
}

.schedule-timeline .timeline-bar.narrow .timeline-days {
  position: absolute;
  left: 100%;
  margin-left: 6px;
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
}

.schedule-timeline .timeline-days.outside {
  position: absolute;
  top: 18px;
  margin-left: 6px;
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  pointer-events: none;
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
}

.schedule-timeline .timeline-row.changed .timeline-days {
  color: var(--warn);
}

@media (max-width: 1180px) {
  .schedule-timeline .timeline-days.outside {
    top: 22px;
  }
}

.schedule-timeline .timeline-launch {
  position: absolute;
  top: 16px;
  display: flex;
  height: 20px;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.schedule-timeline .timeline-launch i {
  width: 11px;
  height: 11px;
  flex: 0 0 11px;
  margin-left: -1px;
  background: var(--stage-color);
  transform: rotate(45deg);
}

.schedule-timeline .timeline-launch span {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 16px;
}

.schedule-timeline .timeline-date,
.schedule-timeline .timeline-date-text,
.schedule-timeline .timeline-fixed {
  min-width: 0;
}

.schedule-timeline .timeline-row > :nth-child(4) { grid-area: start; }
.schedule-timeline .timeline-row > :nth-child(5) { grid-area: end; }

.view-schedule .schedule-timeline .timeline-date input {
  min-height: 32px;
  padding: 0 10px;
  border-color: var(--line);
  border-radius: var(--radius-sm);
  background: var(--sunken);
  font-family: var(--font-mono);
  font-size: 13px;
}

.schedule-timeline .timeline-date .zh-date-display {
  left: 10px;
  right: 28px;
  font-family: var(--font-mono);
  font-size: 13px;
}

.view-schedule .schedule-timeline .timeline-date.changed input {
  border-color: var(--warn-line);
  background: var(--warn-subtle);
}

.schedule-timeline .timeline-date.changed .zh-date-display {
  color: var(--warn);
}

.schedule-timeline .timeline-date-text {
  padding-left: 10px;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 13px;
  line-height: 20px;
}

.schedule-timeline .timeline-fixed {
  justify-self: start;
  margin-left: 10px;
  padding: 1px 8px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-full);
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
  white-space: nowrap;
}

.schedule-timeline .timeline-footer {
  display: flex;
  align-items: center;
  gap: 16px;
}

.view-schedule .schedule-timeline .timeline-hint {
  flex: 1 1 auto;
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}

.schedule-timeline .timeline-legend {
  display: flex;
  flex: 0 0 auto;
  gap: 14px;
  margin: 0;
  padding: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 18px;
  list-style: none;
}

.schedule-timeline .timeline-legend li {
  display: flex;
  align-items: center;
  gap: 6px;
}

.schedule-timeline .timeline-legend i {
  width: 12px;
  height: 8px;
  border-radius: 2px;
  background: var(--stage-color);
}

.schedule-timeline .timeline-legend .ghost i {
  width: 14px;
  border: 1px dashed var(--muted);
  background: none;
}

@media (max-width: 1180px) {
  .schedule-timeline .timeline-grid-head,
  .view-schedule .schedule-timeline .timeline-row {
    grid-template-columns: 150px minmax(0, 1fr) 128px 128px;
    grid-template-areas: "label track start end" "owner track start end";
  }

  .schedule-timeline .timeline-grid-head > span:nth-child(2) {
    display: none;
  }

  .schedule-timeline .timeline-grid-head {
    grid-template-areas: "label track start end";
  }

  .schedule-timeline .timeline-grid-head > span:first-child { grid-area: label; }
  .schedule-timeline .timeline-grid-head > .timeline-scale { grid-area: track; }
  .schedule-timeline .timeline-grid-head > span:nth-child(4) { grid-area: start; }
  .schedule-timeline .timeline-grid-head > span:nth-child(5) { grid-area: end; }

  .view-schedule .schedule-timeline .timeline-row {
    min-height: 60px;
    align-content: center;
  }

  .view-schedule .schedule-timeline .timeline-label { align-self: end; }
  .schedule-timeline .timeline-owner {
    align-self: start;
    padding-left: 16px;
    font-size: 12px;
    line-height: 18px;
  }

  .view-schedule .schedule-timeline .timeline-track {
    height: 60px;
  }

  .view-schedule .schedule-timeline .timeline-bar,
  .schedule-timeline .timeline-ghost,
  .schedule-timeline .timeline-launch {
    top: 20px;
  }

  .view-schedule .schedule-timeline .timeline-header {
    flex-wrap: wrap;
  }

  .schedule-timeline .timeline-footer {
    flex-wrap: wrap;
  }
}

@media (max-width: 600px) {
  .view-schedule .schedule-timeline {
    gap: 16px;
    padding: 16px;
  }

  .view-schedule .schedule-timeline .timeline-header-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .schedule-timeline .timeline-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .schedule-timeline .timeline-summary > div {
    padding: 8px 12px;
  }

  .schedule-timeline .timeline-summary dd {
    font-size: 14px;
    white-space: normal;
  }

  .schedule-timeline .timeline-grid-head {
    display: none;
  }

  .view-schedule .schedule-timeline .timeline-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas: "label owner" "start end";
    gap: 8px 10px;
    padding: 12px;
  }

  .view-schedule .schedule-timeline .timeline-label { align-self: center; }

  .schedule-timeline .timeline-owner {
    align-self: center;
    padding-left: 0;
    text-align: right;
  }

  .view-schedule .schedule-timeline .timeline-track {
    display: none;
  }

  .schedule-timeline .timeline-date-text {
    padding-left: 0;
  }

  .schedule-timeline .timeline-fixed {
    margin-left: 0;
  }
}

/* Labels near the right edge sit to the left of their bar so they never run into the date columns. */
.schedule-timeline .timeline-bar.narrow.flip .timeline-days {
  right: 100%;
  left: auto;
  margin-right: 6px;
  margin-left: 0;
}

.schedule-timeline .timeline-days.outside.flip {
  margin-right: 6px;
  margin-left: 0;
}

.schedule-timeline .timeline-launch.flip {
  flex-direction: row-reverse;
}

.schedule-timeline .timeline-launch.flip i {
  margin-right: -1px;
  margin-left: 0;
}

/* ≤1180px: the timeline takes the full row width; start / end dates move to a second line. */
@media (min-width: 601px) and (max-width: 1180px) {
  .view-schedule .schedule-timeline .timeline-row {
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-areas: "label track" "owner dates";
    align-content: center;
    gap: 0 12px;
    padding-top: 6px;
    padding-bottom: 10px;
  }

  .schedule-timeline .timeline-grid-head {
    grid-template-columns: 150px minmax(0, 1fr);
    grid-template-areas: "label track";
  }

  .schedule-timeline .timeline-grid-head > span:nth-child(4),
  .schedule-timeline .timeline-grid-head > span:nth-child(5) {
    display: none;
  }

  .view-schedule .schedule-timeline .timeline-label {
    align-self: center;
  }

  .schedule-timeline .timeline-owner {
    align-self: center;
  }

  .view-schedule .schedule-timeline .timeline-track {
    height: 48px;
  }

  .view-schedule .schedule-timeline .timeline-bar,
  .schedule-timeline .timeline-ghost,
  .schedule-timeline .timeline-launch {
    top: 14px;
  }

  .schedule-timeline .timeline-days.outside {
    top: 16px;
  }

  .schedule-timeline .timeline-row > :nth-child(4),
  .schedule-timeline .timeline-row > :nth-child(5) {
    grid-area: dates;
  }

  .schedule-timeline .timeline-row > .timeline-date,
  .schedule-timeline .timeline-row > .timeline-date-text {
    width: 150px;
  }

  .schedule-timeline .timeline-row > :nth-child(5) {
    margin-left: 162px;
  }
}

/* Mobile navigation v2 (Figma 42:365 · 手机 / 我的): the header keeps only the brand; the fifth bottom tab
   opens the 我的 page (account, management tools, help, logout) instead of a duplicate menu. */
@media (max-width: 900px) {
  .brand {
    grid-template-columns: 32px minmax(0, 1fr);
  }
}

.view-me .me-profile {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.view-me .me-profile .account-avatar {
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  place-items: center;
  border: 1px solid var(--accent-line);
  border-radius: 50%;
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 20px;
  font-weight: 700;
}

.me-profile-text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.me-profile-text strong {
  font-size: 17px;
  line-height: 24px;
}

.me-profile-text small {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.me-group {
  margin-top: 20px;
}

.me-group h2 {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.me-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.view-me .me-row {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  gap: 12px;
  padding: 8px 14px 8px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.view-me a.me-row {
  text-decoration: none;
}

.view-me .me-row + .me-row {
  border-top: 1px solid var(--line);
}

.view-me .me-row:hover {
  background: var(--hover);
}

.view-me .me-row .nav-icon,
.view-me .me-row .help-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  color: var(--text-secondary);
}

.view-me .me-row .help-icon {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.me-row-text {
  display: grid;
  flex: 1 1 auto;
  gap: 1px;
  min-width: 0;
}

.me-row-text strong {
  font-size: 15px;
  font-weight: 500;
  line-height: 22px;
}

.me-row-text small {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.me-row-tag {
  flex: 0 0 auto;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--raised);
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 16px;
}

.me-row-chevron {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  margin-right: 4px;
  border-top: 1.8px solid var(--muted);
  border-right: 1.8px solid var(--muted);
  transform: rotate(45deg);
}

.view-me .me-logout {
  width: 100%;
  min-height: 48px;
  margin-top: 24px;
  border-color: var(--danger-line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
}

.me-build {
  margin: 12px 0 0;
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 16px;
  text-align: center;
}

/* 立项审批人 (2026-09-28): designated in 账号管理 for 公司管理层 accounts. */
.intake-approver-callout {
  margin: 16px 0 0;
  padding: 12px 16px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-lg);
  background: var(--warn-subtle);
  color: var(--warn);
  font-size: 14px;
  line-height: 22px;
}

.intake-approver-summary {
  margin: 16px 0 0;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.identity-summary {
  display: grid;
  gap: 4px;
  margin: 16px 0 0;
  padding: 0;
  list-style: none;
  color: var(--text-secondary);
  font-size: 14px;
  line-height: 22px;
}

.identity-summary li {
  position: relative;
  padding-left: 16px;
}

.identity-summary li::before {
  position: absolute;
  top: 8px;
  left: 2px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--success);
  content: "";
}

.identity-summary li.is-info::before { background: var(--muted); }
.identity-summary li.is-warn { color: var(--warn); }
.identity-summary li.is-warn::before { background: var(--warn); }

.account-intake-approver {
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: var(--radius-lg);
  background: var(--accent-subtle);
}

/* 内容部剧本评审 (Figma 46:433 drawer · 48:755 submit / final / states). */
dialog.content-review-drawer {
  inset: 0 0 0 auto;
  width: min(440px, 100vw);
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: var(--sidebar);
  color: var(--text);
}

dialog.content-review-drawer::backdrop,
dialog.content-review-submit::backdrop {
  background: rgb(4 8 9 / 45%);
}

dialog.content-review-drawer[open] {
  animation: approval-drawer-in .18s ease-out;
}

.content-review-drawer form {
  display: flex;
  height: 100dvh;
  flex-direction: column;
  margin: 0;
  padding: 0;
}

.content-review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 14px 16px 14px 12px;
  border-bottom: 1px solid var(--line);
}

.content-review-header h2 {
  flex: 1 1 auto;
  margin: 0;
  font-size: 16px;
  line-height: 24px;
}

.content-review-close {
  width: 32px;
  height: 32px;
  min-height: 32px;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 20px;
}

.content-review-scroll {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 20px 20px;
}

.content-review-scroll .approval-drawer-project {
  padding: 18px 0 4px;
}

.content-review-section {
  margin-top: 20px;
}

.content-review-section h3 {
  margin: 0 0 10px;
  font-size: 15px;
  line-height: 22px;
}

.content-review-track {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.content-review-track li {
  display: grid;
  min-width: 0;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
}

.content-review-track strong {
  overflow: hidden;
  font-size: 12px;
  line-height: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.content-review-track small {
  color: var(--muted);
  font-size: 11px;
  line-height: 16px;
}

.content-review-track .is-passed {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
}

.content-review-track .is-passed small {
  color: var(--accent);
}

.content-review-track .is-current {
  border-color: var(--warn);
  background: var(--warn-subtle);
}

.content-review-track .is-current small {
  color: var(--warn);
}

.content-review-track .is-returned {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
}

.content-review-track .is-returned small {
  color: var(--danger);
}

.content-review-rule {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.content-review-file {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--sunken);
}

.content-review-file span {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 2px;
}

.content-review-file strong {
  overflow-wrap: anywhere;
  font-size: 14px;
  line-height: 20px;
}

.content-review-file small,
.content-review-note small {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.content-review-file button {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.content-review-note {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--raised);
}

.content-review-note p {
  margin: 4px 0 0;
  font-size: 13px;
  line-height: 20px;
}

.content-review-tally {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}

.content-review-tally small {
  color: var(--muted);
  font-size: 12px;
  line-height: 18px;
}

.content-review-voters {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
}

.content-review-voters li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 4px 8px;
  padding: 10px 14px;
}

.content-review-voters li + li {
  border-top: 1px solid var(--line);
}

.content-review-voters span {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 8px;
}

.content-review-voters strong {
  font-size: 14px;
  line-height: 20px;
}

.content-review-voters span small {
  color: var(--muted);
  font-size: 12px;
}

.content-review-voters em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  line-height: 20px;
}

.content-review-voters em.is-approved {
  color: var(--accent);
}

.content-review-voters em.is-rejected {
  color: var(--danger);
}

.content-review-voters p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 20px;
}

.content-review-passed {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--accent-line);
  border-radius: 10px;
  background: var(--accent-subtle);
}

.content-review-passed strong {
  color: var(--accent);
  font-size: 14px;
}

.content-review-passed small {
  color: var(--text-secondary);
  font-size: 13px;
}

.content-review-round {
  margin-top: 8px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.content-review-round summary {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 13px;
  line-height: 20px;
}

.content-review-round .content-review-voters {
  margin-top: 8px;
}

.content-review-opinion {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  font-size: 14px;
  font-weight: 600;
}

.content-review-opinion small {
  color: var(--muted);
  font-weight: 400;
}

.content-review-opinion textarea {
  min-height: 96px;
}

.content-review-footer {
  display: grid;
  gap: 10px 12px;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: var(--sidebar);
}

.content-review-footer.has-two {
  grid-template-columns: 1fr 1fr;
}

.content-review-footer .content-review-status {
  grid-column: 1 / -1;
}

.content-review-footer button {
  width: 100%;
  min-height: 44px;
}

.content-review-status {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 20px;
}

.content-review-status:empty {
  display: none;
}

.content-review-status.is-error {
  color: var(--danger);
}

dialog.content-review-submit {
  width: min(460px, calc(100vw - 32px));
  padding: 22px 24px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--text);
}

.content-review-submit form {
  display: grid;
  gap: 12px;
  margin: 0;
}

.content-review-submit h2 {
  margin: 0;
  font-size: 18px;
}

.content-review-submit .muted {
  margin: 0;
  font-size: 13px;
  line-height: 20px;
}

.content-review-field-label {
  display: grid;
  gap: 8px;
  margin: 4px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 600;
}

.content-review-stage-value {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--sunken);
}

.content-review-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.content-review-materials {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.content-review-materials > .muted {
  padding: 12px;
}

.content-review-material {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
}

.content-review-material + .content-review-material {
  border-top: 1px solid var(--line);
}

.content-review-material:has(input:checked) {
  background: var(--accent-subtle);
}

.content-review-material span {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.content-review-material strong {
  overflow-wrap: anywhere;
  font-size: 14px;
}

.content-review-material small {
  color: var(--muted);
  font-size: 12px;
}

.content-review-upload-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.content-review-upload-actions button {
  min-height: 34px;
  font-size: 13px;
}

.content-review-submit textarea {
  min-height: 72px;
}

.content-review-submit .form-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.content-review-submit input[type="checkbox"],
.content-review-submit input[type="radio"] {
  width: 18px;
  height: 18px;
  min-height: 0;
  flex: 0 0 18px;
  margin: 0;
  padding: 0;
  accent-color: var(--accent);
}

.content-review-material span {
  flex: 1 1 auto;
}

/* 内容部剧本评审 · 第二期时效 (Figma 51:755). */
.content-review-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.content-review-section-head h3 {
  margin: 0;
}

.content-review-section-head button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}

.content-review-deadlines {
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  list-style: none;
}

.content-review-deadlines li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
}

.content-review-deadlines li + li {
  border-top: 1px solid var(--line);
}

.content-review-deadlines li.is-current {
  background: color-mix(in srgb, var(--warn-subtle) 45%, transparent);
}

.content-review-deadlines li.is-overdue {
  background: color-mix(in srgb, var(--danger-subtle) 60%, transparent);
}

.content-review-deadlines span {
  display: grid;
  flex: 1 1 auto;
  min-width: 0;
  gap: 1px;
}

.content-review-deadlines strong {
  font-size: 14px;
  line-height: 20px;
}

.content-review-deadlines small {
  color: var(--muted);
  font-size: 12px;
  line-height: 17px;
}

.content-review-deadlines em {
  flex: 0 0 auto;
  font-style: normal;
}

.content-review-deadline-head,
.content-review-deadline-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 116px;
  align-items: center;
  gap: 10px;
}

.content-review-deadline-head {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.content-review-deadline-row strong {
  font-size: 14px;
}

.content-review-deadline-row small {
  font-size: 12px;
  line-height: 17px;
}

.content-review-deadline-row input {
  min-height: 36px;
}

.content-review-days {
  display: flex;
  align-items: center;
  gap: 6px;
}

.content-review-days input {
  width: 100%;
  min-width: 0;
}

.content-review-days span {
  color: var(--muted);
  font-size: 13px;
}

/* 排期页内容部评审状态 (Figma 52:1047). */
.content-review-status-chip {
  display: flex;
  min-height: 0;
  align-items: center;
  gap: 6px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
  line-height: 17px;
  text-align: left;
  cursor: pointer;
}

.content-review-status-chip:hover > span:first-child {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.content-review-status-chip.is-warn > span:first-child {
  color: var(--warn);
}

.content-review-status-chip.is-good > span:first-child {
  color: var(--accent);
}

.content-review-status-pills {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
}

.content-review-status-pills em {
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
}

.content-review-status-chip.in-phase-card {
  width: 100%;
  flex-direction: column;
  align-items: flex-start;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.schedule-stage-subhead .content-review-status-chip.in-subhead {
  margin-left: auto;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.view-schedule .schedule-node-table .row.schedule-stage-subhead {
  display: flex;
  align-items: center;
  gap: 12px;
}

.schedule-gate-note {
  display: block;
  margin-top: 2px;
  color: var(--warn);
  font-size: 12px;
  line-height: 17px;
}

/* The subhead's stage dot and the card-mode column labels must not decorate the review chip. */
.row.schedule-stage-subhead .content-review-status-chip span::before,
.execution-progress-details .row.schedule-stage-subhead > .content-review-status-chip.in-subhead::before {
  display: none;
  content: none;
}

.row.schedule-stage-subhead .content-review-status-chip {
  color: var(--text-secondary);
  font-weight: 600;
}


/* 管理能力第一批 (Figma 55:1047): 负责人 / 承诺 / 延期 cells, 项目成员 drawer, forms and export. */
.schedule-node-owner,
.schedule-node-commit,
.schedule-node-delay,
.schedule-node-progress {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.schedule-node-owner strong {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.schedule-node-owner small,
.schedule-node-commit small,
.schedule-node-delay small,
.schedule-node-progress small {
  overflow: hidden;
  font-size: 11px;
  text-overflow: ellipsis;
}

.schedule-node-owner small {
  color: var(--muted);
}

.member-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border: 1px solid var(--line);
  border-radius: var(--radius-full);
  background: var(--sunken);
  color: var(--text-secondary);
  font-size: 11px;
  font-style: normal;
  font-weight: 500;
  line-height: 16px;
}

.member-tag.is-external {
  border-color: var(--info-line);
  background: var(--info-subtle);
  color: var(--blue);
}

.members-button {
  min-height: 28px;
  padding: 3px 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-md);
  background: var(--raised);
  color: var(--text);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.schedule-delay-rule {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 10px 16px;
  background: var(--sunken);
  color: var(--muted);
  font-size: 12px;
}

.schedule-delay-rule strong {
  flex: none;
  color: var(--text-secondary);
  font-weight: 500;
}

.members-tabs {
  align-self: start;
  margin: 4px 0 12px;
}

.member-list {
  display: grid;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  list-style: none;
}

.member-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
}

.member-row + .member-row {
  border-top: 1px solid var(--line);
}

.member-avatar {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: var(--radius-full);
  background: var(--accent-subtle);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}

.member-avatar.is-external {
  background: var(--info-subtle);
  color: var(--blue);
}

.member-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.member-main strong {
  display: flex;
  gap: 6px;
  align-items: center;
  font-weight: 500;
}

.member-main small {
  color: var(--text-secondary);
  font-size: 12px;
}

.member-main small.muted {
  color: var(--muted);
}

.member-actions {
  display: flex;
  gap: 4px;
}

.member-actions button {
  min-height: 28px;
  padding: 3px 8px;
  font-size: 12px;
}

.member-kind {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 12px;
}

.member-kind label {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  padding: 7px 10px;
  border-radius: var(--radius-md);
  font-size: 13px;
  cursor: pointer;
}

.member-kind label:has(input:checked) {
  background: var(--raised);
  color: var(--text);
  font-weight: 500;
}

.member-form-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.responsibility-context {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 4px 0 14px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.responsibility-context span {
  display: grid;
  gap: 2px;
}

.responsibility-context small {
  color: var(--muted);
  font-size: 11px;
}

.responsibility-context strong {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 400;
}

.responsibility-history {
  display: grid;
  margin: 0 0 12px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  list-style: none;
}

.responsibility-history li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  padding: 10px 14px;
}

.responsibility-history li + li {
  border-top: 1px solid var(--line);
}

.responsibility-history span {
  display: grid;
  gap: 2px;
}

.responsibility-history strong {
  font-size: 13px;
  font-weight: 500;
}

.responsibility-history small {
  color: var(--muted);
  font-size: 12px;
}

.warn-callout {
  margin: 0 0 12px;
  padding: 8px 12px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-md);
  background: var(--warn-subtle);
  color: var(--warn);
  font-size: 12px;
}

.content-review-rule-snapshot {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.content-review-rule-snapshot span {
  display: grid;
  gap: 2px;
}

.content-review-rule-snapshot small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 600px) {
  .member-form-pair,
  .responsibility-context {
    grid-template-columns: minmax(0, 1fr);
  }

  .member-row {
    grid-template-columns: 32px minmax(0, 1fr);
  }

  .member-actions {
    grid-column: 2;
  }

  .view-schedule .schedule-project-group > summary .members-button {
    order: 5;
  }
}

/* 管理能力 P1 (Figma 64:2): 审批历史, 合同, 组织, 审批规则, 导出工作表. */
.decision-log {
  display: grid;
  gap: 14px;
}

.decision-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.decision-filters .secondary-button {
  margin-left: auto;
}

.decision-summary {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.decision-summary strong {
  color: var(--text);
  font-family: var(--font-mono);
}

.decision-log-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.decision-head,
.decision-row {
  display: grid;
  grid-template-columns: 52px 112px minmax(160px, 1fr) 104px 80px 120px 140px 16px;
  gap: 12px;
  align-items: center;
  padding: 0 16px;
}

.decision-head {
  min-height: 36px;
  background: var(--raised);
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.decision-row {
  width: 100%;
  min-height: 56px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.decision-row:hover,
.decision-row.is-open {
  background: var(--raised);
}

.decision-row > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.decision-title {
  display: grid;
  gap: 2px;
}

.decision-title strong {
  font-weight: 400;
}

.decision-title small,
.decision-basis {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.decision-time {
  color: var(--text-secondary);
  font-size: 13px;
}

.decision-project,
.decision-actor {
  font-size: 13px;
  font-weight: 500;
}

.decision-type {
  color: var(--text-secondary);
  font-size: 13px;
}

.decision-caret {
  color: var(--muted);
  font-size: 12px;
}

.decision-day {
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 8px 16px;
  border-top: 1px solid var(--line);
  background: var(--sunken);
  font-size: 12px;
}

.decision-day strong {
  color: var(--text-secondary);
  font-weight: 500;
}

.decision-day span {
  color: var(--muted);
}

.decision-detail {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px 92px;
  border-top: 1px solid var(--line);
  background: var(--raised);
}

.decision-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  font-size: 13px;
}

.decision-detail-grid span,
.decision-note {
  display: grid;
  gap: 4px;
}

.decision-detail small,
.decision-note small {
  color: var(--muted);
  font-size: 11px;
}

.decision-note {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
}

.decision-note p,
.decision-access,
.decision-lock {
  margin: 0;
  font-size: 13px;
}

.decision-access {
  color: var(--muted);
  font-size: 12px;
}

.decision-access strong {
  margin-right: 10px;
  color: var(--text-secondary);
  font-weight: 500;
}

.decision-lock {
  color: var(--muted);
  font-size: 11px;
}

.decision-more {
  width: 100%;
  min-height: 44px;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--accent);
  font-size: 13px;
}

.decision-scope-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.approval-requests-history {
  margin-top: 16px;
}

.good-text {
  color: var(--accent);
}

.contract-chip {
  border: 1px solid var(--line);
  font: inherit;
  font-size: 12px;
  white-space: nowrap;
  cursor: pointer;
}

.project-contract-state {
  display: flex;
  gap: 8px;
  align-items: center;
  margin: 0;
}

.contract-type-line {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 0 0 12px;
  color: var(--text-secondary);
  font-size: 13px;
}

.contract-current {
  display: grid;
  gap: 10px;
  margin-bottom: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
}

.contract-current header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contract-kv {
  display: grid;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  list-style: none;
}

.contract-kv li {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 12px;
  padding: 8px 12px;
  font-size: 13px;
}

.contract-kv li + li {
  border-top: 1px solid var(--line);
}

.contract-kv span {
  color: var(--muted);
  font-size: 12px;
}

.contract-kv strong {
  font-weight: 400;
}

.member-tag.is-head {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
}

.org-summary {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.org-summary strong {
  color: var(--text);
}

.org-list {
  display: grid;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.org-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px auto 12px;
  gap: 12px;
  align-items: center;
  width: 100%;
  min-height: 56px;
  padding: 10px 16px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.org-row + .org-row {
  border-top: 1px solid var(--line);
}

.org-row.is-static {
  grid-template-columns: minmax(0, 1fr) auto;
  cursor: default;
}

.org-row:not(.is-static):hover {
  background: var(--raised);
}

.org-name,
.org-head {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.org-name strong {
  font-weight: 500;
}

.org-name small,
.org-head small {
  color: var(--muted);
  font-size: 12px;
}

.org-head {
  font-size: 13px;
}

.org-add {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.org-add legend {
  padding: 0 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.rules-form {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.rules-form h3,
.rules-history-title {
  margin: 0;
  font-size: 16px;
}

.rules-history-title {
  margin-top: 18px;
  margin-bottom: 10px;
}

.rules-form output {
  display: block;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
  font-family: var(--font-mono);
}

.export-sheets {
  display: grid;
  gap: 8px;
  margin: 0 0 12px;
  padding: 0;
  border: 0;
}

.export-sheets legend {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 13px;
}

.export-sheet {
  align-items: flex-start;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
}

.export-sheet:has(input:checked) {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
}

.export-sheet span {
  display: grid;
  gap: 2px;
}

.export-sheet small {
  color: var(--muted);
  font-size: 12px;
}

@media (max-width: 900px) {
  .decision-head {
    display: none;
  }

  .decision-row {
    grid-template-columns: 48px minmax(0, 1fr) auto;
    grid-template-areas: "time title decision" "time meta meta";
    row-gap: 4px;
    padding: 10px 14px;
  }

  .decision-row .decision-time { grid-area: time; align-self: start; }
  .decision-row .decision-title { grid-area: title; }
  .decision-row > span:nth-child(5) { grid-area: decision; }
  .decision-row .decision-project { grid-area: meta; color: var(--muted); font-weight: 400; }
  .decision-row .decision-type,
  .decision-row .decision-actor,
  .decision-row .decision-basis,
  .decision-row .decision-caret { display: none; }

  .decision-detail {
    padding-left: 16px;
  }

  .decision-detail-grid,
  .org-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .decision-filters .secondary-button {
    margin-left: 0;
  }
}

/* 管理能力 P2 (Figma 71:2): 报表中心, 绩效看板, 审计链. */
.report-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-left: auto;
}

.report-layout {
  display: grid;
  grid-template-columns: 340px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.report-list {
  display: grid;
  gap: 10px;
}

.report-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.report-card.is-active {
  border-color: var(--accent);
  background: var(--raised);
}

.report-card span {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
}

.report-card strong {
  font-weight: 500;
}

.report-card small,
.report-list-note {
  color: var(--muted);
  font-size: 12px;
}

.report-preview {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.report-preview-head {
  display: flex;
  gap: 10px;
  align-items: center;
}

.report-preview-head > div {
  flex: 1;
  min-width: 0;
}

.report-preview-head h2 {
  margin: 0;
}

.report-preview-head p {
  margin: 2px 0 0;
  font-size: 12px;
}

.report-table td,
.report-table th {
  white-space: nowrap;
}

.report-notes {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--sunken);
  font-size: 13px;
}

.report-notes ul {
  margin: 6px 0 0;
  padding-left: 18px;
}

.report-note {
  margin: 0;
  font-size: 12px;
}

.perf-scope {
  margin: 0;
  padding: 10px 14px;
  border: 1px solid var(--info-line);
  border-radius: var(--radius-lg);
  background: var(--info-subtle);
  color: var(--text-secondary);
  font-size: 12px;
}

.perf-scope strong {
  margin-right: 8px;
  color: var(--blue);
  font-size: 13px;
}

.perf-tiles {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}

.perf-tile {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.perf-tile small {
  color: var(--text-secondary);
  font-size: 12px;
}

.perf-tile strong {
  font-family: var(--font-mono);
  font-size: 24px;
  font-weight: 500;
}

.perf-tile span {
  color: var(--muted);
  font-size: 11px;
}

.perf-tile .is-good { color: var(--accent); }
.perf-tile .is-warn { color: var(--warn); }
.perf-tile .is-danger { color: var(--danger); }

.perf-bar {
  display: inline-block;
  width: 72px;
  height: 6px;
  margin-right: 8px;
  overflow: hidden;
  border-radius: 3px;
  background: var(--sunken);
  vertical-align: middle;
}

.perf-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--muted);
}

.perf-bar i.is-good { background: var(--accent); }
.perf-bar i.is-warn { background: var(--warn); }
.perf-bar i.is-danger { background: var(--danger); }

.perf-table td {
  white-space: nowrap;
}

.audit-chain-band {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-bottom: 16px;
  padding: 12px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.audit-chain-band:empty {
  display: none;
}

.audit-chain-band > i {
  flex: none;
  width: 10px;
  height: 10px;
  border-radius: var(--radius-full);
  background: var(--muted);
}

.audit-chain-band.is-good {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
}

.audit-chain-band.is-good > i { background: var(--accent); }

.audit-chain-band.is-danger {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
}

.audit-chain-band.is-danger > i { background: var(--danger); }

.audit-chain-text {
  display: grid;
  flex: 1;
  gap: 3px;
  min-width: 0;
}

.audit-chain-band.is-good strong { color: var(--accent); }
.audit-chain-band.is-danger strong { color: var(--danger); }

.audit-chain-text small {
  color: var(--text-secondary);
  font-size: 12px;
}

.anchors-list strong {
  font-size: 12px;
  font-weight: 400;
  word-break: break-all;
}

@media (max-width: 1180px) {
  .report-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .perf-tiles {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .perf-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-chain-band {
    flex-wrap: wrap;
  }

  .report-filters {
    margin-left: 0;
  }
}

/* 平台管理员指定 (Figma 76:365). */
.account-platform-admin {
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--danger-line);
  border-radius: var(--radius-lg);
}

.account-platform-admin.is-on {
  background: var(--danger-subtle);
}

.platform-admin-confirm {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

/* Least-used setting sits below the save bar; its own actions are inline, not sticky. */
.view-accounts .account-permission-drawer .platform-admin-confirm .form-actions {
  position: static;
  margin: 0;
  padding: 0;
  border-top: 0;
  background: none;
}

.platform-admin-confirm .scope-warning.is-error {
  color: var(--danger);
}

.member-tag.is-danger {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: var(--danger);
}

.account-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}

/* 运行总览 · 运行效率 (Figma 78:630): facts cards on the home page, details collapsed by default. */
.perf-overview {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.perf-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
}

.perf-head-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 12px;
  min-width: 0;
}

.perf-head h2 {
  margin: 0;
  color: var(--text);
  font-size: 18px;
  font-weight: 700;
  line-height: 30px;
}

.perf-head .muted {
  font-size: 13px;
}

.perf-overview .report-filters {
  margin: 0;
}

.perf-details {
  display: grid;
  gap: 12px;
  padding: 14px 20px;
}

.perf-details-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  min-height: 36px;
}

.perf-details-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.perf-details-hint {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13px;
}

.perf-details-head .segmented {
  margin-left: auto;
}

.perf-details-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
}

.perf-details-toggle i {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}

.perf-details.is-open .perf-details-toggle i {
  margin-top: 3px;
  transform: rotate(-135deg);
}

.perf-details-body {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.perf-details-body > .muted,
.perf-basis {
  margin: 0;
  font-size: 12px;
}

@media (max-width: 600px) {
  .perf-overview {
    margin-top: 16px;
  }

  .perf-details {
    padding: 12px 16px;
  }

  .perf-details-hint {
    display: none;
  }

  .perf-details-toggle {
    margin-left: auto;
  }

  .perf-details-head .segmented {
    order: 3;
    margin-left: 0;
  }
}

.perf-overview .perf-details {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
}

.perf-overview .page-filter select {
  min-height: 36px;
  font-size: 14px;
}

/* 本周关注清单: without the 会议决定 column each row is project | reasons. */
@media (min-width: 1101px) {
  .view-metrics .release-board-list.is-attention .release-board-item {
    grid-template-columns: minmax(180px, 1fr) minmax(0, 3.2fr);
  }
}

/* P0 2026-09-29：待审批数字与待办状态要醒目（会上反馈“框小、有点透、对比不强”）。
   红色徽标用实心底 + 白字（对比 4.8:1），黄色待办用实心底 + 深色字（8.9:1）。 */
:root {
  --badge-strong: #d4343a;
  --warn-ink: #231a06;
}

.nav-count {
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--badge-strong);
  box-shadow: 0 0 0 2px var(--sidebar);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}

.mobile-nav-count,
.mobile-bottom-nav .mobile-nav-count {
  background: var(--badge-strong);
  color: #fff;
}

.approval-workbench-count.has-pending,
.view-approvals .approval-workbench-count.has-pending {
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--warn);
  color: var(--warn-ink);
  font-weight: 600;
}

.approval-workbench-count.is-preparing,
.view-approvals .approval-workbench-count.is-preparing {
  padding: 1px 9px;
  border: 1px solid var(--warn-line);
  border-radius: 999px;
  background: var(--warn-subtle);
  color: #f0c27d;
  font-weight: 600;
}

.approval-todo .signal.warn {
  border-color: var(--warn);
  background: var(--warn);
  color: var(--warn-ink);
  font-weight: 600;
}

/* 立项送审清单：保存立项准备后还差哪几步、各由谁负责。 */
.intake-readiness {
  margin: 12px 0 4px;
  padding: 12px 14px;
  border: 1px solid var(--warn-line);
  border-radius: var(--radius-md);
  background: var(--warn-subtle);
}

.intake-readiness-head {
  margin: 0 0 10px;
  color: var(--text-secondary);
  font-size: 13px;
}

.intake-readiness-head strong {
  color: #f0c27d;
}

.intake-steps {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.intake-step {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.intake-step-mark {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.intake-step-main {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.intake-step-main strong {
  color: var(--text-secondary);
  font-size: 13px;
  font-weight: 500;
}

.intake-step-main small {
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.intake-step.is-done .intake-step-mark {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
}

.intake-step.is-done strong {
  color: var(--muted);
}

.intake-step.is-next .intake-step-mark {
  border-color: var(--warn);
  background: var(--warn);
  color: var(--warn-ink);
}

.intake-step.is-next strong {
  color: var(--text);
  font-weight: 600;
}

.intake-step.is-next small {
  color: #f0c27d;
}

/* 剧本列表（立项前剧本征集评估，2026-09-29）。 */
.nav-icon-script {
  --nav-icon-mask: url('/icons/script.svg');
}

.script-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.script-status-tabs {
  flex-wrap: wrap;
  justify-self: start;
}

.script-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.script-filters select,
.script-search input {
  min-height: 36px;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--sunken);
  color: var(--text);
  font: inherit;
  font-size: 13px;
}

.script-filters select {
  width: auto;
  min-width: 132px;
  padding: 0 10px;
}

.script-search {
  flex: 1 1 240px;
  max-width: 360px;
}

.script-search input {
  width: 100%;
  padding: 0 12px;
}

.script-mine {
  margin-left: auto;
  font-size: 13px;
}

.script-roster {
  margin: 0;
  font-size: 12px;
}

.script-table .row {
  grid-template-columns: minmax(200px, 2.4fr) .8fr .8fr .7fr 1.2fr 1fr 1fr;
}

.script-table button.row {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  text-align: left;
  cursor: pointer;
}

.script-table button.row:last-child {
  border-bottom: 0;
}

.script-table button.row:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: -2px;
}

.script-row.is-mine {
  box-shadow: inset 3px 0 0 var(--warn);
}

.script-title {
  min-width: 0;
}

.script-title strong {
  display: block;
  overflow: hidden;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-title small,
.script-mine-tag {
  color: var(--muted);
  font-size: 12px;
}

.script-mine-tag {
  display: block;
  margin-top: 4px;
  color: #f0c27d;
}

.script-votes {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.script-vote {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 22px;
  padding: 0 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  font-size: 12px;
}

.script-vote i {
  font-style: normal;
  font-weight: 700;
}

.script-vote.is-yes {
  border-color: var(--accent-line);
  background: var(--accent-subtle);
  color: var(--accent);
}

.script-vote.is-no {
  border-color: var(--danger-line);
  background: var(--danger-subtle);
  color: #f29e99;
}

.script-grade {
  display: inline-grid;
  min-width: 30px;
  height: 24px;
  padding: 0 6px;
  place-items: center;
  border-radius: 6px;
  background: var(--raised);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 700;
}

.script-grade.grade-Ap {
  background: var(--accent);
  color: var(--accent-ink);
}

.script-grade.grade-A {
  background: var(--accent-subtle);
  color: var(--accent);
}

.script-grade.grade-C {
  color: var(--muted);
}

.script-read {
  color: var(--text-secondary);
  font-size: 12px;
}

.script-read.is-partial {
  color: #f0c27d;
}

.script-source {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.script-rating {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.script-rating small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.script-rating p {
  margin: 6px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
}

.script-rate-form {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.script-rate-form .segmented {
  justify-self: start;
}

.script-rate-form textarea {
  min-height: 64px;
}

.script-rate-form > button {
  justify-self: start;
}

.script-upload {
  cursor: pointer;
}

.script-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

@media (max-width: 900px) {
  .script-table .row.head {
    display: none;
  }

  .script-table .row {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 10px;
  }

  .script-table .row > span:nth-child(2),
  .script-table .row > span:nth-child(3),
  .script-table .row > span:nth-child(6) {
    display: none;
  }

  .script-table .row > span:nth-child(4) {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
  }

  /* The shared phone rule hides every row cell after the 4th; votes and status stay. */
  .script-table .row > span:nth-child(5) {
    display: block;
    grid-column: 1;
  }

  .script-table .row > span:nth-child(7) {
    display: block;
    grid-column: 2;
    justify-self: end;
    text-align: right;
  }

  .script-mine {
    margin-left: 0;
  }

  .script-search {
    max-width: none;
  }

  .script-form-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* 改稿与终审（P2b）。 */
.script-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  align-items: end;
  margin-top: 10px;
}

.script-inline-form label {
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.script-inline-form label.wide,
.script-inline-form textarea {
  grid-column: 1 / -1;
}

.script-inline-form textarea {
  min-height: 72px;
}

.script-inline-form > button {
  justify-self: start;
}

.script-limit {
  margin-top: 10px;
  font-size: 13px;
}

.script-limit summary {
  color: var(--text-secondary);
  cursor: pointer;
}

.script-rounds-drawer .content-review-voters span {
  flex-wrap: wrap;
}

/* A round's draft sits on its own line under the title, never squeezing it. */
.script-rounds-drawer .content-review-voters button {
  grid-column: 1 / -1;
  justify-self: start;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.script-rounds-drawer .content-review-voters p {
  grid-column: 1 / -1;
  margin: 0;
}

@media (max-width: 900px) {
  .script-inline-form {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Isolated, metadata-only review collaboration workbench. */
.project-card footer .review-card-actions { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:6px; }
dialog.governance-dialog.review-issues-dialog:not(.approval-roadmap-dialog) {
  width:min(1040px,calc(100vw - 32px)); max-height:min(88dvh,900px); overflow:auto;
  padding:0; color:var(--text);
}
.review-head { display:flex; justify-content:space-between; gap:20px; align-items:flex-start; padding:24px 28px 18px; border-bottom:1px solid var(--line); }
.review-head h2 { margin:0 0 6px; font-size:22px; line-height:1.35; }
.review-head p { margin:0; font-size:13px; line-height:1.5; }
.review-head .dialog-close { flex:0 0 auto; }
.review-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:12px; padding:14px 28px 0; }
.review-pair { color:var(--text-secondary); font-size:13px; }
.review-status { min-height:22px; margin:8px 28px 12px; color:var(--text-secondary); font-size:13px; }
.review-status.is-error,.review-warning { color:#f0c27d; }
.review-media-pilot:not(:empty) { display:grid; gap:10px; margin:12px 28px 18px; padding:16px; border:1px solid var(--line); border-radius:12px; background:var(--sunken); }
.review-media-pilot h3 { margin:0; font-size:15px; }
.review-media-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.review-media-controls select { min-width:220px; max-width:100%; flex:1 1 340px; }
.review-media-pilot video { display:block; width:100%; max-height:360px; border-radius:8px; background:#080b10; object-fit:contain; }
.review-media-pilot .form-note { margin:0; color:var(--text-secondary); font-size:12px; line-height:1.5; }
.review-body { display:grid; grid-template-columns:minmax(270px,35%) minmax(0,1fr); min-height:380px; border-top:1px solid var(--line); }
.review-list { padding:20px; border-right:1px solid var(--line); background:var(--sunken); }
.review-list h3,.review-timeline h4 { margin:0 0 14px; font-size:15px; }
.review-create { margin:0 0 16px; border:1px solid var(--line); border-radius:10px; background:var(--surface); }
.review-create summary { padding:12px; cursor:pointer; font-weight:650; }
.review-create > .form-note { margin:0; padding:0 12px 14px; }
.review-create-form,.review-action { display:grid; gap:12px; padding:12px; }
.review-field { display:grid; gap:6px; font-size:13px; }
.review-label { color:var(--text-secondary); font-size:13px; font-weight:650; }
.review-field input,.review-field select,.review-field textarea { width:100%; min-width:0; box-sizing:border-box; }
.review-create-form .form-note,.review-list .form-note,.review-detail .form-note { margin:0; color:var(--text-secondary); font-size:13px; line-height:1.5; }
.review-filters { display:grid; gap:10px; margin:0 0 10px; }
.review-filters .review-field select { width:100%; }
.review-list-count { margin:0 0 12px; color:var(--text-secondary); font-size:12px; line-height:1.5; }
.review-list-item { display:grid; gap:7px; width:100%; margin:0 0 8px; padding:12px; text-align:left; border:1px solid var(--line); border-radius:10px; background:var(--surface); color:var(--text); }
.review-list-item:hover,.review-list-item.is-selected { border-color:var(--accent-line); background:var(--hover); }
.review-list-item strong { display:-webkit-box; overflow:hidden; -webkit-line-clamp:2; -webkit-box-orient:vertical; font-size:14px; line-height:1.45; overflow-wrap:anywhere; }
.review-list-item small,.review-list-state { color:var(--text-secondary); font-size:12px; }
.review-list-version { overflow-wrap:anywhere; line-height:1.4; }
.review-detail { min-width:0; padding:24px 28px; overflow-wrap:anywhere; }
.review-detail h3 { margin:5px 0 12px; font-size:20px; line-height:1.4; }
.review-detail > p { line-height:1.55; }
.review-kicker,.review-meta { color:var(--text-secondary); font-size:13px; }
.review-state { display:inline-block; padding:4px 10px; border:1px solid var(--accent-line); border-radius:99px; color:var(--accent); font-size:13px; }
.review-action { margin:20px 0; padding:16px; border:1px solid var(--line); border-radius:10px; background:var(--sunken); }
.review-action .review-label { margin:0; }
.review-actions { display:flex; flex-wrap:wrap; gap:8px; }
.review-timeline { margin-top:24px; padding-top:20px; border-top:1px solid var(--line); }
.review-event { padding:0 0 16px 18px; margin:0 0 14px; border-left:2px solid var(--accent-line); }
.review-event strong,.review-event small { display:block; }
.review-event small { margin-top:4px; color:var(--text-secondary); font-size:12px; }
.review-event p { margin:8px 0 0; font-size:13px; line-height:1.5; }
@media (max-width:700px) {
 dialog.governance-dialog.review-issues-dialog:not(.approval-roadmap-dialog) { width:calc(100% - 16px); max-width:calc(100% - 16px); max-height:calc(100dvh - 16px); }
 .review-head { padding:18px; }
 .review-toolbar { padding:12px 18px 0; }
 .review-status { margin:8px 18px 12px; }
 .review-body { grid-template-columns:minmax(0,1fr); }
 .review-list { border-right:0; border-bottom:1px solid var(--line); }
 .review-detail { padding:20px 18px; }
}

/* Review collaboration: a task page with the accepted Figma v2 hierarchy. */
.main.review-main { padding:30px clamp(18px,3vw,52px) 70px; }
.review-workspace { max-width:1440px; margin:0 auto; }
.review-head { padding:0 0 22px; border-bottom:0; align-items:center; }
.review-breadcrumb { margin:0 0 12px; color:var(--accent); font-size:12px; font-weight:650; }
.review-head h1 { margin:0 0 5px; font-size:clamp(24px,2.2vw,32px); line-height:1.3; }
.review-head .muted { margin:0; font-size:14px; }
.review-back { align-self:flex-start; margin-left:auto; border-color:transparent; background:transparent; color:var(--text-secondary); white-space:nowrap; }
.review-toolbar { gap:10px; padding:0 0 20px; }
.review-context { margin-right:auto; color:var(--text-secondary); }
.review-refresh { border-color:transparent; background:transparent; color:var(--text-secondary); }
.review-status { min-height:0; margin:0 0 14px; color:var(--muted); font-size:12px; }
.review-status:empty { display:none; }
.review-status.is-error { padding:10px 14px; border:1px solid var(--warn-line); border-radius:8px; background:var(--warn-subtle); color:var(--warn); }
.review-body { grid-template-columns:minmax(0,1.7fr) minmax(330px,1fr); align-items:start; gap:24px; min-height:0; border-top:0; }
.review-main-column { min-width:0; display:grid; gap:24px; }
.review-workspace.is-post .review-main-column { grid-column:1; grid-row:1; }
.review-workspace.is-post .review-detail { grid-column:2; grid-row:1; }
.review-media-pilot:not(:empty),.review-list,.review-detail { margin:0; border:1px solid var(--line); border-radius:14px; background:var(--surface); }
.review-media-pilot:not(:empty) { padding:22px; gap:12px; }
.review-media-pilot h2,.review-list h2,.review-detail h2 { margin:0; font-size:20px; line-height:1.4; }
.review-media-caption { margin:0; color:var(--text-secondary); font-size:13px; }
.review-media-pilot video { width:100%; aspect-ratio:16/9; max-height:600px; border-radius:10px; }
.review-media-controls { justify-content:space-between; }
.review-media-controls select { min-width:0; flex:1 1 220px; }
.review-media-controls button { flex:0 0 auto; }
.review-media-pilot .form-note { font-size:12px; }
.review-media-empty { margin:0; padding:38px 20px; text-align:center; color:var(--text-secondary); border:1px dashed var(--line-strong); border-radius:10px; }
.review-list { padding:22px; }
.review-list-head { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:16px; }
.review-list-count { margin:0; color:var(--text-secondary); font-size:13px; }
.review-list-item { grid-template-columns:auto 1fr; align-items:start; gap:5px 14px; margin:0 0 8px; padding:14px 16px; }
.review-list-item .review-list-state { grid-row:1 / 3; padding:3px 8px; color:var(--accent); background:var(--accent-subtle); border-radius:99px; white-space:nowrap; }
.review-list-item strong { font-size:14px; }
.review-list-item small { grid-column:2; }
.review-detail { position:sticky; top:20px; padding:24px; }
.review-workspace.is-creating .review-detail { position:static; }
.review-detail > .review-kicker { margin:0 0 10px; color:var(--accent); font-size:12px; font-weight:700; }
.review-detail > h2 { margin:0 0 14px; overflow-wrap:anywhere; }
.review-detail > .review-state { margin:0 0 15px; }
.review-desired { margin:0 0 16px; padding:13px 15px; border-radius:9px; background:var(--sunken); }
.review-detail > .review-meta { margin:0 0 14px; }
.review-submitted,.review-waiting { margin:18px 0; padding:16px; border:1px solid var(--accent-line); border-radius:10px; background:var(--accent-subtle); color:var(--text); line-height:1.6; }
.review-waiting { border-color:var(--warn-line); background:var(--warn-subtle); }
.review-create { margin:0; border:0; background:transparent; }
.review-create > h2 { margin:0 0 16px; }
.review-create-form,.review-action { gap:14px; margin:0; padding:0; border:0; background:transparent; }
.review-create-context { margin:0; padding:12px 14px; border:1px solid var(--accent-line); border-radius:8px; background:var(--accent-subtle); color:var(--text-secondary); font-size:13px; }
.review-create-form textarea { min-height:90px; }
.review-extra { padding:0 13px 12px; border:1px solid var(--line); border-radius:8px; }
.review-extra summary { padding:12px 0; cursor:pointer; color:var(--text-secondary); }
.review-create-form .primary,.review-action .primary { min-height:42px; }
.review-action { margin-top:18px; padding-top:18px; border-top:1px solid var(--line); }
.review-actions { gap:10px; }
.review-action .review-actions button { min-height:42px; }
.review-advanced,.review-history { margin:12px 0 16px; padding:0 14px; border:1px solid var(--line); border-radius:9px; }
.review-advanced summary,.review-history summary { padding:12px 0; cursor:pointer; color:var(--text-secondary); font-weight:600; }
.review-filters { grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; padding-bottom:14px; }
.review-history { margin-top:22px; }
.review-history > .review-meta { margin:0 0 10px; }
.review-timeline { margin-top:14px; padding-top:15px; }
.review-timeline h3 { margin:0 0 14px; font-size:15px; }
@media (max-width:1150px) {
 .review-body { grid-template-columns:minmax(0,1.25fr) minmax(300px,1fr); gap:16px; }
 .review-detail { position:static; }
 .review-filters { grid-template-columns:minmax(0,1fr); }
}
@media (max-width:850px) {
 .main.review-main { padding:20px 16px 72px; }
 .review-body { display:flex; flex-direction:column; }
 .review-main-column { display:contents; }
 .review-workspace.is-post .review-main-column,.review-workspace.is-post .review-detail { grid-column:auto; grid-row:auto; }
 .review-media-pilot { order:1; width:100%; }
 .review-list { order:3; width:100%; }
 .review-detail { order:2; width:100%; }
 .review-workspace.is-post .review-detail { order:0; }
 .review-workspace.is-creating .review-detail { order:2; }
 .review-workspace.is-creating .review-list { order:3; }
 .review-head { flex-wrap:wrap; }
 .review-head > div { order:1; width:100%; }
 .review-back { order:0; margin:0; }
 .review-detail { padding:20px; }
 .review-media-pilot:not(:empty),.review-list { padding:18px; }
 .review-toolbar { flex-wrap:wrap; }
 .review-context { flex:1 1 100%; }
 .review-new { flex:1 1 auto; }
}
