:root {
  --bg: #f5f7f9;
  --surface: #ffffff;
  --surface-soft: #eef3f7;
  --ink: #16202a;
  --muted: #607081;
  --line: #d8e0e7;
  --brand: #175c8e;
  --brand-dark: #0c3d63;
  --cyan: #2f9fb3;
  --green: #2f9461;
  --yellow: #d39a23;
  --red: #c2473c;
  --shadow: 0 16px 38px rgba(22, 32, 42, 0.08);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

/* CDE workspace */
:root {
  --cde-teal: #007f86;
  --cde-teal-dark: #075b61;
  --cde-blue: #176f9f;
  --cde-ink: #172129;
  --cde-muted: #66737d;
  --cde-line: #dce2e6;
  --cde-hover: #f1f7f7;
}

.global-header {
  min-height: 60px;
  padding: 8px 22px;
  border-bottom-color: #d9dfe3;
  background: rgba(252, 253, 253, 0.96);
}

.global-header .brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 6px;
  background: var(--cde-teal-dark);
}

.global-nav button {
  border-radius: 5px;
}

.global-nav button:hover,
.global-nav button.active {
  color: var(--cde-teal-dark);
  background: #e9f3f3;
}

.btn {
  border-color: var(--cde-teal);
  border-radius: 6px;
  background: var(--cde-teal);
}

.btn:hover {
  background: var(--cde-teal-dark);
}

.ghost,
.danger,
.success,
.warning,
input,
select,
textarea {
  border-radius: 6px;
}

.content.project-page {
  padding: 0 28px 46px;
}

.project-context {
  min-height: 104px;
  grid-template-columns: 38px minmax(260px, 1fr) auto auto;
  padding: 17px 4px 15px;
}

.project-identity h1 {
  margin-top: 5px;
  font-size: 22px;
}

.project-tabs {
  position: sticky;
  top: 60px;
  z-index: 12;
  min-height: 45px;
  padding: 0 2px;
  background: rgba(243, 245, 247, 0.97);
  backdrop-filter: blur(16px);
}

.project-tabs button {
  min-height: 44px;
  padding: 10px 13px 9px;
  border-bottom-width: 2px;
  font-size: 12px;
}

.project-tabs button:hover,
.project-tabs button.active {
  color: var(--cde-teal-dark);
  border-bottom-color: var(--cde-teal);
}

.project-stage {
  padding-top: 18px;
}

.cde-commandbar {
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 8px;
  border: 1px solid var(--cde-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(27, 42, 51, 0.035);
}

.cde-search {
  min-width: 0;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
}

.cde-search > span {
  color: #667781;
  font-size: 24px;
  line-height: 1;
  text-align: center;
}

.cde-search input,
.cde-table-tools input {
  min-height: 36px;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.cde-search input:focus,
.cde-table-tools input:focus {
  outline: 0;
  box-shadow: none;
}

.cde-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  overflow: hidden;
  border: 1px solid var(--cde-line);
  border-radius: 7px;
  background: #fff;
}

.cde-kpi {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 3px 12px;
  padding: 14px 16px 13px;
  border-right: 1px solid #e4e8eb;
  box-shadow: inset 0 3px 0 #8b98a1;
}

.cde-kpi:last-child { border-right: 0; }
.cde-kpi.good { box-shadow: inset 0 3px 0 #2d8b62; }
.cde-kpi.warn { box-shadow: inset 0 3px 0 #d39a2c; }
.cde-kpi.bad { box-shadow: inset 0 3px 0 #c24d42; }
.cde-kpi > span { align-self: end; color: var(--cde-muted); font-size: 11px; font-weight: 700; }
.cde-kpi strong { grid-row: 1 / 3; grid-column: 2; align-self: center; font-size: 24px; font-weight: 750; }
.cde-kpi small { overflow: hidden; color: #7a858d; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.cde-layout {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(620px, 1fr) minmax(310px, 0.34fr);
  align-items: start;
  gap: 14px;
}

.cde-main-panel,
.cde-side-panel,
.cde-table-shell {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--cde-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 12px rgba(28, 40, 48, 0.035);
}

.cde-side-stack { min-width: 0; display: grid; gap: 14px; }

.panel-heading {
  min-height: 67px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 15px;
  border-bottom: 1px solid #e3e7ea;
}

.panel-heading.compact { min-height: 58px; }
.panel-heading h2 { margin: 3px 0 0; color: var(--cde-ink); font-size: 15px; letter-spacing: 0; }
.panel-heading .eyebrow { color: var(--cde-teal); }

.information-legend {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.info-count,
.info-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #54616b;
  font-size: 10px;
  font-weight: 650;
  white-space: nowrap;
}

.info-count strong { color: var(--cde-ink); }

.info-state {
  width: 8px;
  height: 8px;
  display: inline-block;
  flex: 0 0 8px;
  border: 1px solid transparent;
  border-radius: 2px;
  background: #8b98a1;
}

.info-state.state-work_in_progress { border-color: #98a4ad; background: #fff; }
.info-state.state-shared { background: #2a86ae; }
.info-state.state-published { background: #29845d; }
.info-state.state-archived { background: #626c74; }

.cde-record-head,
.cde-record {
  display: grid;
  grid-template-columns: minmax(230px, 1.4fr) minmax(110px, 0.75fr) minmax(130px, 0.8fr) minmax(120px, 0.75fr) 64px;
  align-items: center;
  gap: 12px;
}

.cde-record-head {
  min-height: 34px;
  padding: 7px 13px;
  border-bottom: 1px solid #e2e6e9;
  color: #78838b;
  background: #f7f8f9;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.cde-record {
  width: 100%;
  min-height: 54px;
  padding: 8px 13px;
  border-bottom: 1px solid #e8ebed;
  border-radius: 0;
  color: #394750;
  background: #fff;
  font-size: 11px;
  text-align: left;
}

.cde-record:last-child { border-bottom: 0; }
.cde-record:hover { background: var(--cde-hover); }
.cde-record > span { min-width: 0; display: flex; align-items: center; gap: 7px; }
.cde-record > span:first-child,
.cde-record > span:nth-child(2) { display: grid; gap: 3px; }
.cde-record strong,
.cde-record small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cde-record strong { color: #23313a; font-size: 11px; }
.cde-record small { color: #73808a; font-size: 10px; }
.cde-record b { font-size: 10px; }
.cde-record > span:last-child { justify-content: space-between; }

.cde-activity-list { display: grid; }
.cde-activity {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 10px;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-bottom: 1px solid #e8ebed;
  border-radius: 0;
  color: var(--cde-ink);
  background: #fff;
  text-align: left;
}

.cde-activity:last-child { border-bottom: 0; }
.cde-activity:not(.static):hover { background: var(--cde-hover); }
.cde-activity strong,
.cde-activity small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cde-activity strong { font-size: 11px; }
.cde-activity small { margin-top: 4px; color: #77838b; font-size: 9px; }

.issue-type,
.package-symbol {
  min-width: 30px;
  padding: 5px 3px;
  border-radius: 4px;
  color: #155f7b;
  background: #e6f2f5;
  font-size: 8px;
  font-style: normal;
  font-weight: 850;
  text-align: center;
}

.issue-type.rfi { color: #795710; background: #fff0ca; }
.package-symbol { color: #146456; background: #e4f2ed; }
.text-action { padding: 5px; color: var(--cde-teal-dark); background: transparent; font-size: 10px; font-weight: 750; }
.text-action:hover { text-decoration: underline; }

.cde-empty {
  min-height: 150px;
  display: grid;
  place-content: center;
  gap: 4px;
  padding: 22px;
  color: #7a858d;
  text-align: center;
}

.cde-empty.small { min-height: 104px; }
.cde-empty strong { color: #3b4851; font-size: 12px; }
.cde-empty span { font-size: 10px; }

.cde-section-toolbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 12px;
}

.cde-section-toolbar h2 { margin: 4px 0 3px; font-size: 20px; letter-spacing: 0; }
.cde-section-toolbar p { margin: 0; color: var(--cde-muted); font-size: 11px; }

.cde-table-tools {
  min-height: 45px;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 4px 12px;
  border-bottom: 1px solid var(--cde-line);
}

.cde-table-tools span { color: #78838b; font-size: 10px; }
.issue-table-head,
.issue-row,
.transmittal-head,
.transmittal-row {
  display: grid;
  align-items: center;
  gap: 12px;
  padding: 0 14px;
}

.issue-table-head,
.issue-row { grid-template-columns: 105px minmax(220px, 1.4fr) minmax(140px, 0.85fr) minmax(120px, 0.75fr) 92px 110px; }
.transmittal-head,
.transmittal-row { grid-template-columns: 100px minmax(230px, 1.25fr) minmax(160px, 0.8fr) 90px 105px minmax(150px, auto); }
.issue-table-head,
.transmittal-head {
  min-height: 34px;
  border-bottom: 1px solid var(--cde-line);
  color: #77828a;
  background: #f7f8f9;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}

.issue-row {
  width: 100%;
  min-height: 58px;
  border-bottom: 1px solid #e8ebed;
  border-radius: 0;
  color: #42505a;
  background: #fff;
  font-size: 10px;
  text-align: left;
}

.issue-row:hover { background: var(--cde-hover); }
.issue-row > span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-row > span:first-child { display: flex; align-items: center; gap: 8px; }
.issue-row > span:nth-child(2) strong,
.issue-row > span:nth-child(2) small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-row small { margin-top: 3px; color: #7a858d; font-size: 9px; }
.issue-row .overdue { color: #ac3f35; font-weight: 750; }

.transmittal-row {
  position: relative;
  min-height: 62px;
  border-bottom: 1px solid #e8ebed;
  color: #42505a;
  font-size: 10px;
}

.transmittal-row > span { min-width: 0; }
.transmittal-row > span strong,
.transmittal-row > span small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.transmittal-row > span small { margin-top: 4px; color: #79848c; font-size: 9px; }
.transmittal-row > details { grid-column: 1 / -1; margin: 0 -14px; border-top: 1px solid #edf0f2; background: #fafbfb; }
.transmittal-row > details summary { padding: 7px 14px; color: var(--cde-teal-dark); cursor: pointer; font-size: 9px; font-weight: 750; }
.transmittal-row > details div { display: grid; gap: 4px; padding: 3px 14px 10px; }
.transmittal-row > details div span { color: #59666f; font-size: 9px; }
.row-actions { display: flex; align-items: center; justify-content: flex-end; gap: 5px; }
.row-actions .compact-button { min-height: 30px; padding: 5px 8px; font-size: 9px; }

.issue-detail-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--cde-line);
  border-radius: 6px;
  background: #f7f9fa;
}

.issue-detail-summary > div { min-width: 0; padding: 11px 13px; border-right: 1px solid var(--cde-line); }
.issue-detail-summary > div:last-child { border-right: 0; }
.issue-detail-summary span,
.issue-detail-summary strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-detail-summary span { color: #78838b; font-size: 9px; }
.issue-detail-summary strong { margin-top: 4px; color: #34424b; font-size: 11px; }
.issue-description { padding: 13px 14px; border-left: 3px solid #79aab0; color: #43515a; background: #f3f8f8; font-size: 11px; line-height: 1.55; }
.issue-dialog-section { display: grid; gap: 7px; }
.issue-dialog-section > span,
.issue-section-head > span { color: #596871; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.issue-section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.issue-section-head a { color: var(--cde-teal-dark); font-size: 10px; font-weight: 800; }
.issue-file-list { overflow: hidden; border: 1px solid var(--cde-line); border-radius: 6px; }
.issue-file-row { min-height: 54px; display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 10px; border-bottom: 1px solid #e7ebed; background: #fff; }
.issue-file-row:last-child { border-bottom: 0; }
.issue-file-row > span:nth-child(2) { min-width: 0; }
.issue-file-row strong,
.issue-file-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-file-row strong { font-size: 10px; }
.issue-file-row small { margin-top: 3px; color: #77838b; font-size: 8px; }
.issue-file-kind { padding: 5px 4px; border-radius: 4px; color: #74520e; background: #fff0ca; font-size: 7px; font-weight: 850; text-align: center; }
.issue-file-kind.answer { color: #17604a; background: #e3f1eb; }
.issue-files-empty { padding: 18px; border: 1px dashed #cfdadd; border-radius: 6px; color: #7a858d; background: #fafbfb; font-size: 10px; text-align: center; }
.issue-attachment-picker { min-height: 62px; display: grid; grid-template-columns: minmax(180px, auto) minmax(0, 1fr); align-items: center; gap: 3px 12px; padding: 10px; border: 1px dashed #afc3c8; border-radius: 6px; cursor: pointer; background: #f8fafb; }
.issue-attachment-picker:hover,
.issue-attachment-picker.selected { border-color: var(--cde-teal); background: #eff7f7; }
.issue-attachment-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.issue-attachment-picker span { grid-row: 1 / span 2; padding: 8px 10px; border-radius: 5px; color: #fff; background: var(--cde-teal); font-size: 10px; font-weight: 800; text-align: center; }
.issue-attachment-picker.answer span { background: #2a765b; }
.issue-attachment-picker small { min-width: 0; overflow: hidden; color: #69767e; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }

.package-picker {
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--cde-line);
  border-radius: 6px;
}

.package-option {
  min-height: 52px;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 8px 11px;
  border-bottom: 1px solid #e8ebed;
  cursor: pointer;
}

.package-option:last-child { border-bottom: 0; }
.package-option:hover { background: var(--cde-hover); }
.package-option input { min-height: 0; }
.package-option strong,
.package-option small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.package-option strong { font-size: 11px; }
.package-option small { margin-top: 3px; color: #77838b; font-size: 9px; }

.status-dot.status-open,
.status-dot.status-draft { background: #89959d; }
.status-dot.status-in_progress,
.status-dot.status-issued { background: #287fa8; }
.status-dot.status-answered { background: #b68424; }
.status-dot.status-closed,
.status-dot.status-acknowledged { background: #2a865f; }

@media (max-width: 1180px) {
  .cde-layout { grid-template-columns: 1fr; }
  .cde-side-stack { grid-template-columns: 1fr 1fr; }
  .information-legend { display: none; }
  .issue-table-head,
  .issue-row { grid-template-columns: 96px minmax(210px, 1.4fr) minmax(120px, 0.8fr) minmax(110px, 0.7fr) 90px; }
  .issue-table-head > span:nth-child(3), .issue-row > span:nth-child(3) { display: none; }
  .transmittal-head,
  .transmittal-row { grid-template-columns: 90px minmax(210px, 1fr) minmax(130px, 0.7fr) 90px minmax(145px, auto); }
  .transmittal-head > span:nth-child(4), .transmittal-row > span:nth-child(4) { display: none; }
}

@media (max-width: 760px) {
  .content.project-page { padding: 0 14px 34px; }
  .project-context { min-height: 88px; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .project-context-stats, .project-context-actions { display: none; }
  .project-tabs { top: 94px; margin: 0 -14px; padding-left: 12px; }
  .cde-commandbar { grid-template-columns: 1fr; gap: 6px; }
  .cde-commandbar .button-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .cde-kpis { grid-template-columns: 1fr 1fr; }
  .cde-kpi:nth-child(2) { border-right: 0; }
  .cde-kpi:nth-child(-n + 2) { border-bottom: 1px solid #e4e8eb; }
  .cde-side-stack { grid-template-columns: 1fr; }
  .cde-record-head { display: none; }
  .cde-record { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; }
  .cde-record > span:nth-child(2) { display: none; }
  .cde-record > span:nth-child(3), .cde-record > span:nth-child(4) { font-size: 9px; }
  .cde-record > span:last-child { grid-column: 2; grid-row: 1; }
  .cde-section-toolbar { align-items: end; }
  .cde-section-toolbar p { display: none; }
  .issue-table-head, .transmittal-head { display: none; }
  .issue-row { grid-template-columns: 92px minmax(0, 1fr) 86px; padding: 8px 11px; }
  .issue-row > span:nth-child(3), .issue-row > span:nth-child(4), .issue-row > span:nth-child(5) { display: none; }
  .transmittal-row { grid-template-columns: 82px minmax(0, 1fr); padding: 10px 11px; }
  .transmittal-row > span:nth-child(3), .transmittal-row > span:nth-child(4) { display: none; }
  .transmittal-row > span:nth-child(5), .transmittal-row > span:nth-child(6) { grid-column: 2; }
  .transmittal-row > details { margin: 0 -11px; }
  .issue-detail-summary { grid-template-columns: 1fr; }
  .issue-detail-summary > div { border-right: 0; border-bottom: 1px solid var(--cde-line); }
  .issue-detail-summary > div:last-child { border-bottom: 0; }
}

/* Resizable project explorers */
.resizable-explorer {
  grid-template-columns: var(--folder-pane, 220px) 7px minmax(360px, 1fr) 7px var(--preview-pane, 340px);
}

.resizable-explorer .finder-sidebar,
.resizable-explorer .finder-files {
  border-right: 0;
}

.pane-resizer {
  position: relative;
  z-index: 2;
  min-width: 7px;
  cursor: col-resize;
  background: #f1f3f5;
  touch-action: none;
}

.pane-resizer::before {
  content: "";
  position: absolute;
  inset: 0 2px;
  background: #d9dfe4;
}

.pane-resizer span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 3px;
  height: 36px;
  border-radius: 2px;
  background: #aab4bd;
  opacity: 0.32;
  transform: translate(-50%, -50%);
  transition: opacity 120ms ease, background 120ms ease;
}

.pane-resizer:hover span,
.pane-resizer:focus-visible span,
body.resizing-pane .pane-resizer span {
  opacity: 1;
  background: #0878b8;
}

.pane-resizer:focus-visible {
  outline: 2px solid #1680bd;
  outline-offset: -2px;
}

body.resizing-pane {
  cursor: col-resize;
  user-select: none;
}

.plan-explorer {
  min-height: 620px;
  display: grid;
  overflow: hidden;
  border: 1px solid #dce2e6;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 28px rgba(21, 35, 48, 0.06);
}

.plan-register-pane {
  padding: 12px 10px;
  overflow-y: auto;
  background: #f4f6f8;
}

.plan-files-pane {
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  background: #fff;
}

.plan-list {
  min-height: 0;
  overflow: auto;
}

.plan-list-head,
.plan-row {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(118px, 0.55fr) 58px;
  align-items: center;
  gap: 12px;
}

.plan-list-head {
  min-height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid #dfe4e8;
  color: #74808a;
  background: #fafbfc;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

.plan-row {
  width: 100%;
  min-height: 66px;
  padding: 8px 14px;
  border-bottom: 1px solid #e7ebee;
  border-radius: 0;
  color: #18212b;
  background: #fff;
  text-align: left;
}

.plan-row:hover { background: #f5f9fc; }
.plan-row.active { color: #073d64; background: #e7f2fa; }

.plan-row-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.plan-row-name strong,
.plan-row-name small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.plan-row-name small { margin-top: 4px; color: #6e7a84; font-size: 11px; }
.plan-row-status { min-width: 0; display: flex; align-items: center; gap: 8px; color: #43505a; font-size: 11px; font-weight: 700; }
.plan-row > span:last-child { color: #6d7780; font-size: 11px; }

.plan-inspector {
  min-width: 0;
  max-height: 760px;
  overflow-y: auto;
  background: #fafbfc;
}

.plan-inspector .quicklook-media { height: 290px; }
.plan-inspector .revision-notice { margin: 0; border-width: 0 0 1px 4px; border-radius: 0; }

.inspector-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 7px;
  border-bottom: 1px solid #dfe4e8;
  background: #fff;
}

.inspector-tabs button {
  min-width: 0;
  min-height: 34px;
  padding: 6px 5px;
  overflow: hidden;
  border-radius: 5px;
  color: #65717a;
  background: transparent;
  font-size: 10px;
  font-weight: 750;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-tabs button:hover { background: #f0f4f7; }
.inspector-tabs button.active { color: #075f96; background: #e6f2f9; }

.plan-inspector-body {
  min-height: 174px;
  padding: 14px;
  border-bottom: 1px solid #dfe4e8;
  background: #fff;
}

.plan-inspector-body .section-head { margin-bottom: 12px; }
.plan-inspector-body .section-head h3 { font-size: 14px; }
.plan-inspector-body .steps { gap: 7px; }
.plan-inspector-body .step { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 10px; }
.plan-inspector-body .step > .pill { grid-column: 2; justify-self: start; }
.plan-inspector-body .step-number { width: 24px; height: 24px; font-size: 10px; }
.plan-inspector-body .table-wrap { border: 0; }
.plan-inspector-body table { min-width: 0; }
.plan-inspector-body th, .plan-inspector-body td { padding: 8px 5px; font-size: 10px; }
.plan-inspector-body .card { border-radius: 6px; box-shadow: none; }
.plan-toolbar .button-row { justify-content: flex-end; }

.version-history-chip {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  padding: 4px 8px;
  border: 1px solid #c8d4da;
  border-radius: 5px;
  color: #566a74;
  background: #f2f5f7;
  font-size: 9px;
  font-weight: 800;
  white-space: nowrap;
}

.version-run-panel .section-head p { margin: 3px 0 0; color: var(--muted); font-size: 9px; }
.version-run-history { display: grid; border-top: 1px solid #e1e7ea; }
.version-run-history, .version-run, .version-run-steps, .run-stage { min-width: 0; }
.version-run { border-bottom: 1px solid #e1e7ea; background: #fff; }
.version-run > summary {
  min-height: 50px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 2px;
  cursor: pointer;
  list-style: none;
}
.version-run > summary::-webkit-details-marker { display: none; }
.version-run > summary > span:first-child { min-width: 0; flex: 1; }
.version-run > summary > .pill { white-space: normal; max-width: 48%; text-align: center; }
.version-run > summary strong,
.version-run > summary small { display: block; }
.version-run > summary strong { color: #253740; font-size: 11px; }
.version-run > summary small { margin-top: 3px; color: var(--muted); font-size: 11px; line-height: 1.4; overflow-wrap: anywhere; }
.version-run > summary::before { content: "›"; color: #6d7d85; font-size: 18px; transform: rotate(0); transition: transform .15s ease; }
.version-run[open] > summary::before { transform: rotate(90deg); }
.version-run-steps { padding: 0 0 10px 22px; }
.version-run-empty { display: grid; gap: 4px; padding: 18px 4px; color: var(--muted); }
.version-run-empty strong { color: #465b65; font-size: 11px; }
.version-run-empty span { font-size: 9px; line-height: 1.4; }
.document-workflow .version-run-history { margin-top: 9px; }
.document-workflow .version-run-steps { padding-left: 14px; }

@media (max-width: 1120px) {
  .resizable-explorer,
  .plan-explorer {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .pane-resizer { display: none; }
  .resizable-explorer > .finder-sidebar,
  .plan-explorer > .plan-register-pane { grid-column: 1; grid-row: 1; }
  .resizable-explorer > .finder-files,
  .plan-explorer > .plan-files-pane { grid-column: 2; grid-row: 1; }
  .resizable-explorer > .document-inspector,
  .plan-explorer > .plan-inspector {
    grid-column: 1 / -1;
    grid-row: 2;
    max-height: none;
    border-top: 1px solid #dfe4e8;
  }
}

@media (max-width: 760px) {
  .resizable-explorer,
  .plan-explorer { grid-template-columns: minmax(0, 1fr); }
  .resizable-explorer > .finder-sidebar,
  .plan-explorer > .plan-register-pane { grid-column: 1; grid-row: 1; }
  .resizable-explorer > .finder-files,
  .plan-explorer > .plan-files-pane { grid-column: 1; grid-row: 2; }
  .resizable-explorer > .document-inspector,
  .plan-explorer > .plan-inspector { grid-column: 1; grid-row: 3; }
  .plan-list-head,
  .plan-row { grid-template-columns: minmax(0, 1fr) 18px 42px; gap: 8px; }
  .plan-list-head span:nth-child(2) { display: none; }
  .plan-list-head span:nth-child(3) { grid-column: 3; }
  .plan-row-status span { display: none; }
  .plan-toolbar .button-row { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  .plan-toolbar .button-row > * { width: 100%; min-width: 0; }
  .plan-inspector .quicklook-media { height: 300px; }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
}

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

button {
  border: 0;
  cursor: pointer;
}

a {
  color: var(--brand);
}

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

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 440px) 1fr;
  background:
    radial-gradient(circle at 20% 10%, rgba(47, 159, 179, 0.12), transparent 28rem),
    linear-gradient(120deg, #f7fafb, #edf3f7);
}

.auth-panel {
  background: var(--surface);
  padding: 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.auth-visual {
  display: grid;
  align-content: center;
  padding: 56px;
}

.signal-board {
  display: grid;
  grid-template-columns: repeat(3, minmax(100px, 1fr));
  gap: 14px;
  max-width: 640px;
}

.signal-board .lane {
  min-height: 280px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(216, 224, 231, 0.9);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 10px 22px rgba(22, 32, 42, 0.06);
}

.lane-line {
  height: 8px;
  border-radius: 999px;
  margin-bottom: 18px;
}

.lane-line.red {
  background: var(--red);
}

.lane-line.yellow {
  background: var(--yellow);
}

.lane-line.green {
  background: var(--green);
}

.mini-plan {
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  margin-bottom: 10px;
  position: relative;
}

.mini-plan::before,
.mini-plan::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  height: 5px;
  border-radius: 999px;
  background: var(--surface-soft);
}

.mini-plan::before {
  top: 12px;
}

.mini-plan::after {
  bottom: 12px;
  right: 42px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px 1fr;
}

.sidebar {
  background: #152533;
  color: #fff;
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), #7bc09d);
  font-weight: 800;
  color: #082234;
}

.brand strong {
  display: block;
  font-size: 16px;
}

.brand span {
  color: #aebdca;
  font-size: 12px;
}

.nav {
  display: grid;
  gap: 8px;
}

.nav button {
  text-align: left;
  padding: 12px 14px;
  border-radius: 8px;
  color: #dce7ee;
  background: transparent;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.11);
  color: #fff;
}

.user-box {
  margin-top: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  padding-top: 18px;
  display: grid;
  gap: 12px;
  color: #dce7ee;
}

.main {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.topbar {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 28px;
  background: rgba(255, 255, 255, 0.86);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 3;
}

.topbar h1 {
  font-size: 20px;
  margin: 0;
}

.topbar p,
.section-head p,
.empty p {
  margin: 4px 0 0;
  color: var(--muted);
}

.content {
  padding: 28px;
  display: grid;
  gap: 22px;
  align-content: start;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: end;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.stats {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

.grid.two {
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(180px, 1fr));
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.pad {
  padding: 18px;
}

.metric {
  min-height: 116px;
  display: grid;
  align-content: space-between;
}

.metric span {
  color: var(--muted);
  font-size: 13px;
}

.metric strong {
  font-size: 32px;
  line-height: 1;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0;
}

tr:last-child td {
  border-bottom: 0;
}

.click-row {
  cursor: pointer;
}

.click-row:hover td {
  background: #f8fbfd;
}

.pill,
.light {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.pill {
  background: var(--surface-soft);
  color: #304252;
}

.light::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 7px;
}

.light.red {
  color: #8d2f28;
  background: #fae4e1;
}

.light.red::before {
  background: var(--red);
}

.light.yellow {
  color: #7c5511;
  background: #fff0cf;
}

.light.yellow::before {
  background: var(--yellow);
}

.light.green {
  color: #1e6842;
  background: #dff5e9;
}

.light.green::before {
  background: var(--green);
}

.status-new,
.status-in_review {
  color: #7c5511;
}

.status-approved {
  color: #1e6842;
}

.status-approved_with_comments {
  color: #236650;
  background: #e4f3ec;
}

.status-green {
  color: #1e6842;
}

.status-yellow {
  color: #7c5511;
}

.status-red {
  color: #8d2f28;
}

.status-changes_requested,
.status-rejected {
  color: #8d2f28;
}

.btn,
.ghost,
.danger,
.success,
.warning {
  min-height: 40px;
  padding: 9px 13px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
}

.btn {
  color: #fff;
  background: var(--brand);
}

.btn:hover {
  background: var(--brand-dark);
}

.ghost {
  color: var(--ink);
  background: var(--surface-soft);
}

.danger {
  color: #fff;
  background: var(--red);
}

.success {
  color: #fff;
  background: var(--green);
}

.warning {
  color: #3f2c08;
  background: #f2c764;
}

.approve-comment {
  min-height: 40px;
  padding: 9px 13px;
  border: 1px solid #4f8f76;
  border-radius: 8px;
  color: #225d47;
  background: #e6f4ed;
  font-weight: 750;
}

.approve-comment:hover {
  border-color: #2f7258;
  background: #d9eee5;
}

.execution-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.execution-choice-grid label { position: relative; cursor: pointer; }
.execution-choice-grid input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.execution-choice-grid span { min-height: 104px; display: grid; align-content: center; gap: 6px; padding: 16px; border: 1px solid var(--line); border-radius: 7px; background: #fff; }
.execution-choice-grid strong,
.execution-choice-grid small { display: block; }
.execution-choice-grid strong { color: var(--ink); font-size: 13px; }
.execution-choice-grid small { color: var(--muted); font-size: 11px; line-height: 1.45; }
.execution-choice-grid input:checked + span { border-color: #3c8366; background: #edf7f2; box-shadow: inset 3px 0 0 #3c8366; }
.execution-current { display: grid; gap: 3px; padding: 11px 13px; border-left: 3px solid #3c8366; background: #f1f8f5; }
.execution-current span { color: var(--muted); font-size: 9px; text-transform: uppercase; }
.execution-current strong { color: #285e48; font-size: 12px; }
.execution-current small { color: var(--muted); font-size: 10px; }

.button-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.form {
  display: grid;
  gap: 13px;
}

.form.inline {
  grid-template-columns: repeat(4, minmax(120px, 1fr)) auto;
  align-items: end;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
}

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

input:focus,
select:focus,
textarea:focus {
  outline: 3px solid rgba(47, 159, 179, 0.22);
  border-color: var(--cyan);
}

.tabs {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  padding: 0 18px;
}

.tabs button {
  background: transparent;
  color: var(--muted);
  padding: 13px 10px;
  border-bottom: 3px solid transparent;
}

.tabs button.active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}

.detail-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.95fr) minmax(360px, 1.05fr);
  gap: 16px;
}

.plan-preview {
  min-height: 430px;
  background: #f9fbfc;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  display: grid;
}

.plan-preview iframe,
.plan-preview img {
  width: 100%;
  height: 100%;
  border: 0;
  object-fit: contain;
  background: #fff;
}

.preview-empty,
.empty {
  display: grid;
  place-items: center;
  text-align: center;
  color: var(--muted);
  padding: 36px;
}

.steps {
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.step-number {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--surface-soft);
  font-weight: 800;
}

.step.active .step-number {
  color: #fff;
  background: var(--brand);
}

.step.approved .step-number {
  color: #fff;
  background: var(--green);
}

.step.rejected .step-number,
.step.changes_requested .step-number {
  color: #fff;
  background: var(--red);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 12px;
}

.notice {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #b8dfe7;
  background: #e9f8fb;
  color: #174653;
}

.error {
  padding: 12px 14px;
  border-radius: 8px;
  border: 1px solid #f1bab4;
  background: #fff0ee;
  color: #8d2f28;
}

.mobile-menu {
  display: none;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 4;
    display: grid;
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .nav {
    grid-template-columns: repeat(4, minmax(90px, 1fr));
  }

  .user-box {
    margin-top: 0;
  }

  .grid.stats,
  .grid.two,
  .grid.three,
  .detail-layout {
    grid-template-columns: 1fr;
  }

  .form.inline {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-panel,
  .content {
    padding: 20px;
  }

  .topbar {
    height: auto;
    padding: 16px 20px;
    align-items: flex-start;
    flex-direction: column;
  }

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

  .section-head {
    display: grid;
  }

  .form.inline {
    grid-template-columns: 1fr;
  }

  .step {
    grid-template-columns: 34px 1fr;
  }

  .step .pill {
    grid-column: 2;
    width: fit-content;
  }
}

/* Product redesign layer */
:root {
  --bg: #f5f5f7;
  --surface: rgba(255, 255, 255, 0.94);
  --surface-solid: #ffffff;
  --surface-soft: #f2f2f7;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --line: rgba(60, 60, 67, 0.16);
  --brand: #0071e3;
  --brand-dark: #0058b0;
  --cyan: #0a84ff;
  --green: #228b57;
  --yellow: #c78d1f;
  --red: #bd3f35;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.055);
}

body {
  background: var(--bg);
}

.app-shell {
  grid-template-columns: 272px minmax(0, 1fr);
}

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

.main > .topbar,
.main > .content {
  min-width: 0;
  max-width: 100%;
}

.sidebar {
  background: rgba(250, 251, 252, 0.86);
  color: var(--ink);
  border-right: 1px solid rgba(217, 224, 231, 0.82);
  box-shadow: 8px 0 28px rgba(17, 24, 39, 0.04);
  backdrop-filter: blur(22px);
}

.brand-mark {
  background: linear-gradient(145deg, #ffffff, #dce8f3);
  border: 1px solid rgba(23, 105, 170, 0.2);
  color: var(--brand-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 8px 18px rgba(23, 105, 170, 0.12);
}

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

.nav {
  gap: 6px;
}

.nav button {
  color: #344054;
  border: 1px solid transparent;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav button::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}

.nav button.active,
.nav button:hover {
  background: rgba(255, 255, 255, 0.78);
  color: var(--brand-dark);
  border-color: rgba(23, 105, 170, 0.18);
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.06);
}

.nav button.active::after {
  background: var(--brand);
}

.user-box {
  border-top-color: var(--line);
}

.topbar {
  height: 78px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 1px 0 rgba(217, 224, 231, 0.75);
}

.topbar h1 {
  font-size: 24px;
  font-weight: 760;
}

.content {
  max-width: 1680px;
  width: 100%;
}

.card,
.workspace-panel,
.file-card,
.command-strip {
  background: var(--surface);
  border: 1px solid rgba(217, 224, 231, 0.78);
  border-radius: 10px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.workspace-panel {
  padding: 18px;
  min-width: 0;
}

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

.workspace-panel .field {
  min-width: 0;
}

.card h2,
.workspace-panel h2 {
  margin-top: 0;
  letter-spacing: 0;
}

.grid.stats {
  grid-template-columns: 1.2fr repeat(3, minmax(150px, 0.7fr));
}

.metric {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.96));
}

.metric strong {
  font-size: 38px;
  font-weight: 780;
}

.btn,
.ghost,
.danger,
.success,
.warning {
  border-radius: 9px;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
}

.btn {
  background: var(--brand);
  box-shadow: none;
}

.btn:hover,
.ghost:hover,
.success:hover,
.warning:hover,
.danger:hover {
  transform: translateY(-1px);
}

.ghost {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(217, 224, 231, 0.85);
}

input,
select,
textarea {
  border-radius: 9px;
  border-color: #cfd8e3;
  background: rgba(255, 255, 255, 0.9);
  min-height: 42px;
}

.tabs {
  background: rgba(248, 250, 252, 0.72);
  border-top: 1px solid var(--line);
}

.tabs button {
  min-height: 46px;
  font-weight: 730;
}

.tabs button.active {
  color: var(--brand-dark);
}

.detail-layout {
  grid-template-columns: minmax(420px, 1.1fr) minmax(380px, 0.9fr);
}

.plan-preview {
  min-height: 520px;
  border-radius: 10px;
  background: linear-gradient(135deg, #f8fafc, #eef3f7);
}

.command-strip {
  padding: 16px 18px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.command-strip span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
}

.file-explorer {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr);
  gap: 16px;
  margin-top: 16px;
}

.folder-tree,
.file-grid {
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 12px;
}

.folder-tree {
  display: grid;
  align-content: start;
  gap: 8px;
}

.folder-node {
  text-align: left;
  background: transparent;
  border-radius: 8px;
  padding: 10px 11px;
  color: #344054;
}

.folder-node.active,
.folder-node:hover {
  background: #eef5fb;
  color: var(--brand-dark);
}

.file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  min-height: 260px;
}

.file-card {
  padding: 14px;
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 12px;
  align-items: start;
}

.file-card .ghost {
  grid-column: 1 / -1;
}

.file-icon {
  width: 52px;
  height: 62px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--brand-dark);
  background: linear-gradient(180deg, #ffffff, #e8eef4);
  border: 1px solid #d2dce7;
  font-weight: 800;
  font-size: 12px;
}

.finder-window {
  min-height: 620px;
  display: grid;
  grid-template-columns: 220px minmax(360px, 1fr) 340px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.06);
}

.finder-sidebar,
.finder-files,
.document-inspector {
  min-width: 0;
  min-height: 0;
}

.finder-sidebar {
  padding: 12px 10px;
  overflow-y: auto;
  border-right: 1px solid var(--line);
  background: rgba(242, 242, 247, 0.82);
}

.pane-title {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.pane-title > span {
  color: var(--muted);
  font-size: 12px;
}

.pane-title small,
.document-name small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.finder-sidebar .pane-title {
  margin: -4px 2px 8px;
  padding-left: 8px;
  padding-right: 8px;
  border-bottom: 0;
}

.folder-node {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding-left: calc(10px + var(--folder-depth, 0) * 16px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.folder-symbol {
  width: 16px;
  height: 12px;
  flex: 0 0 16px;
  position: relative;
  border-radius: 3px;
  background: #54a8f7;
}

.folder-symbol::before {
  content: "";
  position: absolute;
  left: 1px;
  top: -3px;
  width: 7px;
  height: 4px;
  border-radius: 2px 2px 0 0;
  background: #54a8f7;
}

.finder-files {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: #ffffff;
}

.finder-search {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfbfd;
}

.finder-search input {
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 8px;
  background: #ededf0;
}

.finder-search input:focus {
  outline: 2px solid rgba(0, 113, 227, 0.22);
}

.document-list-head,
.document-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.5fr) minmax(110px, 0.8fr) 72px 78px;
  align-items: center;
  column-gap: 12px;
}

.document-list-head {
  min-height: 34px;
  padding: 0 14px;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  background: #fbfbfd;
  font-size: 11px;
  font-weight: 700;
}

.document-list {
  overflow: auto;
}

.document-row {
  width: 100%;
  min-height: 62px;
  padding: 8px 14px;
  border-bottom: 1px solid rgba(60, 60, 67, 0.1);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.document-row:hover {
  background: #f5f9fd;
}

.document-row.active {
  color: #003b70;
  background: #e7f2fd;
}

.document-row > span:not(.document-name) {
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-name {
  min-width: 0;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.document-name strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.document-name strong .status-dot {
  display: inline-block;
  margin-right: 7px;
  vertical-align: 1px;
}

.document-status {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-weight: 700;
}

.document-row > span:not(.document-name) small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.file-icon.compact {
  width: 36px;
  height: 42px;
  border-radius: 7px;
  font-size: 9px;
}

.file-icon.large {
  width: 76px;
  height: 92px;
  margin: 0 auto 14px;
  font-size: 15px;
}

.document-inspector {
  display: grid;
  grid-template-rows: auto minmax(220px, 1fr) auto auto auto;
  background: #fbfbfd;
}

.inspector-title {
  padding: 10px 12px;
}

.inspector-title > div {
  min-width: 0;
}

.inspector-title-controls {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 4px;
}

.inspector-title strong {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.icon-button.subtle {
  width: 30px;
  height: 30px;
  flex-basis: 30px;
  border: 0;
  background: transparent;
  font-size: 21px;
}

.quicklook-media {
  min-height: 0;
  padding: 14px;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background: #f2f2f7;
}

.quicklook-media iframe,
.quicklook-media img {
  width: 100%;
  height: 100%;
  min-height: 300px;
  display: block;
  border: 0;
  border-radius: 6px;
  object-fit: contain;
  background: #ffffff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.09);
}

.quicklook-empty {
  min-height: 220px;
  display: grid;
  place-items: center;
  padding: 24px;
  color: var(--muted);
  text-align: center;
}

.quicklook-empty strong {
  display: block;
  margin-top: 10px;
  color: var(--ink);
}

.quicklook-symbol {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--brand);
  background: #ffffff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: var(--shadow);
}

.document-meta {
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.document-meta > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 5px 0;
  font-size: 12px;
}

.document-meta dt {
  color: var(--muted);
}

.document-meta dd {
  margin: 0;
  overflow: hidden;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px;
}

.inspector-actions .inspector-wide {
  grid-column: 1 / -1;
}

.document-workflow {
  max-height: 290px;
  padding: 12px 14px;
  overflow: auto;
  border-bottom: 1px solid var(--line);
  background: #ffffff;
}

.document-workflow-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.document-workflow-head small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.document-workflow > p {
  margin: 10px 0 2px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.compact-button {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
}

.document-workflow-steps {
  margin-top: 10px;
}

.document-workflow .step {
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  padding: 9px 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.document-workflow .step-number {
  width: 24px;
  height: 24px;
  font-size: 11px;
}

.document-workflow .signature-thumb {
  max-width: 150px;
}

.workflow-layout {
  min-height: 520px;
  display: grid;
  grid-template-columns: minmax(280px, 0.75fr) minmax(420px, 1.25fr);
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.workflow-list {
  border-right: 1px solid var(--line);
  background: #fbfbfd;
}

.workflow-plan-row {
  width: 100%;
  min-height: 64px;
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  color: var(--ink);
  background: transparent;
  text-align: left;
}

.workflow-plan-row:hover,
.workflow-plan-row.active {
  background: #e7f2fd;
}

.workflow-plan-row small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #a1a1a6;
}

.status-dot.status-approved {
  background: var(--green);
}

.status-dot.status-approved_with_comments {
  background: #3a8c70;
  box-shadow: 0 0 0 2px #d7eee5;
}

.status-dot.status-in_review,
.status-dot.status-new {
  background: var(--yellow);
}

.status-dot.status-rejected,
.status-dot.status-changes_requested {
  background: var(--red);
}

.workflow-stage {
  min-width: 0;
  padding: 18px;
}

.plan-number-preview {
  margin-top: 14px;
  padding: 18px;
  border-radius: 10px;
  background: #111827;
  color: #ffffff;
  font-size: 28px;
  font-weight: 800;
  letter-spacing: 0;
}

.signature-pad {
  border: 1px dashed #a7b4c2;
  border-radius: 10px;
  background: #ffffff;
  padding: 8px;
}

.signature-pad canvas {
  width: 100%;
  height: 160px;
  display: block;
  border-radius: 7px;
  touch-action: none;
}

.signature-thumb {
  display: block;
  width: 180px;
  max-width: 100%;
  margin-top: 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #ffffff;
}

.changes-routing {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.changes-routing legend {
  margin-bottom: 8px;
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
}

.routing-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.routing-option {
  position: relative;
  min-width: 0;
  cursor: pointer;
}

.routing-option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.routing-option > span {
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  transition: border-color 120ms ease, background 120ms ease, box-shadow 120ms ease;
}

.routing-option:hover > span {
  border-color: #9ab7c7;
  background: #f8fbfc;
}

.routing-option input:checked + span {
  border-color: #1775a7;
  background: #edf7fb;
  box-shadow: inset 3px 0 0 #1775a7;
}

.routing-option input:focus-visible + span {
  outline: 2px solid #1775a7;
  outline-offset: 2px;
}

.routing-option strong,
.routing-option small {
  display: block;
  min-width: 0;
}

.routing-option strong {
  color: #17232c;
  font-size: 12px;
}

.routing-option small {
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}

.routing-hint {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.step-routing {
  width: fit-content;
  display: block;
  margin-top: 7px;
  padding: 3px 7px;
  border-radius: 5px;
  color: #8b3f3b;
  background: #fff0ee;
  font-size: 10px;
  font-weight: 750;
}

.step-routing.continued {
  color: #305f76;
  background: #eaf5fa;
}

.step-routing.waiting {
  color: #7b5419;
  background: #fff4df;
}

.run-stage.return-pending {
  border-color: #d6a35a;
  background: #fffaf1;
}

.viewer-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 13, 20, 0.92);
  display: grid;
  grid-template-rows: 68px 1fr;
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
  color: #ffffff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.viewer-overlay iframe {
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

body.modal-open {
  overflow: hidden;
}

.section-head.compact {
  align-items: center;
  margin-bottom: 12px;
}

.section-head.compact h3 {
  margin: 0;
}

.compact-empty {
  min-height: 150px;
}

.plan-detail {
  margin-top: 18px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.align-start {
  justify-self: start;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.42);
  backdrop-filter: blur(7px);
}

.modal-panel {
  width: min(640px, calc(100vw - 40px));
  max-height: min(860px, calc(100vh - 40px));
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  background: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.24);
}

.modal-panel.wide {
  width: min(860px, calc(100vw - 40px));
}

.modal-panel.issue-workspace-modal {
  width: calc(100vw - 24px);
  max-width: none;
  height: calc(100vh - 24px);
  max-height: none;
  border-radius: 10px;
}

.issue-workspace-modal .modal-head {
  min-height: 64px;
  padding: 12px 18px;
  background: #f7f8fa;
}

.issue-workspace-modal .modal-head h2 {
  max-width: min(900px, calc(100vw - 140px));
  overflow: hidden;
  font-size: 17px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-workspace-modal .modal-body {
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}

.issue-workspace-modal .modal-body > .error {
  flex: 0 0 auto;
  margin: 10px 12px 0;
}

.issue-workspace-form {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
}

.issue-workspace-layout {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
}

.issue-document-area {
  min-width: 0;
  overflow: auto;
  padding: 30px 34px 44px;
  background: #e9edf0;
}

.issue-document-sheet {
  width: min(830px, 100%);
  min-height: calc(100vh - 190px);
  margin: 0 auto;
  padding: 48px 58px 64px;
  border: 1px solid #d8dde1;
  border-radius: 3px;
  background: #fff;
  box-shadow: 0 7px 26px rgba(31, 42, 52, .11);
}

.issue-document-kicker {
  color: var(--cde-teal-dark);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.issue-document-title,
.issue-document-heading {
  width: 100%;
  margin: 12px 0 16px;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #17232d;
  background: transparent;
  font-size: 29px;
  font-weight: 720;
  line-height: 1.2;
  letter-spacing: 0;
}

.issue-document-title:focus {
  outline: 0;
  box-shadow: none;
}

.issue-document-title::placeholder { color: #9aa3aa; }
.issue-document-rule { height: 1px; margin-bottom: 28px; background: #dce1e4; }
.issue-editor-section + .issue-editor-section { margin-top: 34px; }

.issue-editor-label {
  display: block;
  margin-bottom: 8px;
  color: #52616b;
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}

.issue-rich-editor {
  overflow: hidden;
  border: 1px solid #cfd6da;
  border-radius: 6px;
  background: #fff;
}

.issue-rich-editor:focus-within {
  border-color: #6c9fa5;
  box-shadow: 0 0 0 3px rgba(47, 121, 130, .11);
}

.issue-editor-toolbar {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border-bottom: 1px solid #dce1e4;
  background: #f7f8f9;
}

.issue-toolbar-group {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding-right: 5px;
  border-right: 1px solid #d8dee2;
}

.issue-toolbar-group:last-child { border-right: 0; }

.issue-editor-toolbar button {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #34434d;
  background: transparent;
  font-size: 15px;
}

.issue-editor-toolbar button:hover,
.issue-editor-toolbar button:focus-visible {
  border-color: #c7d1d5;
  background: #fff;
}

.issue-editor-toolbar button.text-tool { font-size: 10px; font-weight: 800; }

.issue-image-upload {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #34434d;
  cursor: pointer;
  font-size: 16px;
}

.issue-image-upload:hover { border-color: #c7d1d5; background: #fff; }
.issue-image-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

.issue-editor-page {
  min-height: 360px;
  padding: 26px 30px;
  outline: 0;
  color: #25343e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 16px;
  line-height: 1.68;
}

.issue-document-sheet-edit .issue-editor-page { min-height: 230px; }
.issue-editor-page:empty::before { color: #9aa3aa; content: attr(data-placeholder); }
.issue-editor-page p { margin: 0 0 12px; }
.issue-editor-page h2 { margin: 20px 0 8px; color: #17232d; font-family: inherit; font-size: 20px; }
.issue-editor-page ul,
.issue-editor-page ol { padding-left: 28px; }
.issue-editor-page blockquote { margin: 16px 0; padding: 3px 0 3px 15px; border-left: 3px solid #6c9fa5; color: #53646d; }
.issue-editor-page img,
.issue-rich-preview img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 18px auto;
  border: 1px solid #d2d9dd;
  border-radius: 4px;
  box-shadow: 0 4px 14px rgba(31, 42, 52, .09);
}
.issue-editor-page img { cursor: pointer; }
.issue-editor-page img.issue-editor-image-selected { outline: 3px solid rgba(13, 126, 137, .34); outline-offset: 3px; }

.issue-rich-preview {
  min-height: 120px;
  padding: 24px 28px;
  border-left: 3px solid #8aabb0;
  color: #25343e;
  background: #f5f8f8;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 15px;
  line-height: 1.65;
}
.issue-rich-preview p { margin: 0 0 10px; }
.issue-rich-preview p:last-child { margin-bottom: 0; }
.issue-rich-preview h2 { margin: 16px 0 7px; font-size: 19px; }
.issue-rich-preview ul,
.issue-rich-preview ol { padding-left: 25px; }

.issue-conversation { margin-top: 42px; border-top: 1px solid #dbe1e4; }
.immutable-question .issue-rich-preview { border-left: 3px solid #9eb7bc; background: #f6f9f9; }
.supplement-section { padding: 20px 0; border-top: 1px solid #e0e6e8; border-bottom: 1px solid #e0e6e8; }
.issue-conversation-head { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.issue-conversation-head span { color: #364751; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.issue-conversation-head b { color: #75828a; font-size: 9px; }
.issue-message { position: relative; margin-left: 18px; padding: 0 0 24px 25px; border-left: 2px solid #cbd7da; }
.issue-message::before { position: absolute; top: 5px; left: -7px; width: 12px; height: 12px; border: 3px solid #fff; border-radius: 50%; background: #4f8e99; content: ""; }
.issue-message.answer::before { background: #398269; }
.issue-message header { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 9px; }
.issue-message header span { color: #3a4b55; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.issue-message header small { color: #79858c; font-size: 8px; }
.issue-message .issue-rich-preview { min-height: 0; padding: 15px 17px; font-size: 13px; }

.issue-status-panel {
  min-height: 52px;
  display: grid;
  grid-template-columns: 9px minmax(0, 1fr);
  align-content: center;
  gap: 2px 9px;
  margin-top: 14px;
  padding: 9px 11px;
  border: 1px solid #d6dde1;
  border-radius: 6px;
  background: #fff;
}
.issue-status-panel .status-dot { grid-row: 1 / span 2; align-self: center; }
.issue-status-panel span { color: #76838b; font-size: 8px; text-transform: uppercase; }
.issue-status-panel strong { color: #31414a; font-size: 11px; }

.issue-properties {
  min-width: 0;
  overflow-y: auto;
  padding: 20px 18px 28px;
  border-left: 1px solid #d7dde1;
  background: #f8f9fa;
}

.issue-properties .field { margin-top: 15px; }
.issue-properties .field label { color: #637079; font-size: 9px; font-weight: 800; }
.issue-properties input,
.issue-properties select { min-height: 39px; background: #fff; }

.issue-properties-head {
  min-height: 36px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dde2e5;
}

.issue-properties-head strong { color: #263640; font-size: 12px; }
.issue-properties-head span { color: #697780; font-size: 9px; }
.issue-properties-head a { color: var(--cde-teal-dark); font-size: 9px; font-weight: 800; }
.issue-properties-head.compact { margin-bottom: 10px; }
.issue-properties-divider { height: 1px; margin: 20px 0; background: #dde2e5; }

.issue-properties-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.issue-properties-facts span {
  min-width: 0;
  padding: 9px 10px;
  border-left: 2px solid #86aeb3;
  color: #718089;
  background: #eef2f3;
  font-size: 8px;
}

.issue-properties-facts strong {
  display: block;
  overflow: hidden;
  margin-top: 3px;
  color: #394851;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-properties .issue-file-list { margin-bottom: 10px; border: 0; border-radius: 0; background: transparent; }
.issue-properties .issue-file-row { grid-template-columns: 48px minmax(0, 1fr); padding: 8px 0; background: transparent; }
.issue-properties .issue-file-row .row-actions { grid-column: 2; justify-content: flex-start; }
.issue-properties .issue-files-empty { margin-bottom: 10px; padding: 14px 8px; }
.issue-properties .issue-attachment-picker { grid-template-columns: 1fr; }
.issue-properties .issue-attachment-picker span { grid-row: auto; }

.issue-workspace-footer {
  min-height: 64px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 18px;
  border-top: 1px solid #d8dde1;
  background: #fff;
}

.issue-workspace-footer .btn,
.issue-workspace-footer .ghost { min-height: 39px; }

/* Coordination room */
.issue-room-form,
.issue-create-room { min-height: 0; flex: 1 1 auto; background: #f3f5f6; }
.issue-room-form { display: grid; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; }
.issue-room-summary { min-height: 106px; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 17px 26px; border-bottom: 1px solid #d7dee1; background: #fff; }
.issue-room-summary > div:first-child { min-width: 0; }
.issue-room-summary span { color: #27717a; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.issue-room-summary h1 { overflow: hidden; margin: 5px 0 3px; color: #1e2d36; font-size: 22px; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.issue-room-summary p { margin: 0; color: #748189; font-size: 10px; }
.issue-summary-badges { flex: 0 0 auto; display: flex; align-items: center; gap: 7px; }
.issue-summary-badges b { padding: 7px 10px; border: 1px solid #d7dee1; border-radius: 5px; color: #52616a; background: #f6f8f9; font-size: 9px; }
.issue-summary-badges .priority-high,
.issue-summary-badges .priority-critical { border-color: #e3b7ae; color: #8b3f36; background: #fff1ee; }
.issue-summary-badges .status-answered,
.issue-summary-badges .status-closed { border-color: #a8cdbb; color: #276a4e; background: #edf8f1; }

.issue-room-grid { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 340px; overflow: hidden; }
.issue-room-main { min-width: 0; overflow-y: auto; padding: 26px clamp(22px, 4vw, 58px) 36px; }
.issue-thread-stream,
.issue-composer { width: min(880px, 100%); margin-inline: auto; }
.issue-thread-date { display: flex; align-items: center; gap: 12px; margin: 2px 0 24px; color: #7d888e; font-size: 8px; text-transform: uppercase; }
.issue-thread-date::before,
.issue-thread-date::after { height: 1px; flex: 1; background: #d7dde0; content: ""; }
.issue-thread-entry { position: relative; display: grid; grid-template-columns: 38px minmax(0, 1fr); gap: 12px; padding-bottom: 24px; }
.issue-thread-entry:not(:last-child)::before { position: absolute; top: 38px; bottom: 0; left: 18px; width: 1px; background: #cfd9dc; content: ""; }
.issue-thread-avatar { position: relative; z-index: 1; width: 38px; height: 38px; display: grid; place-items: center; border: 3px solid #f3f5f6; border-radius: 50%; color: #fff; background: #497d86; font-size: 9px; font-weight: 850; }
.issue-thread-entry.answer .issue-thread-avatar { background: #3e7960; }
.issue-thread-bubble { overflow: hidden; border: 1px solid #d4dcdf; border-radius: 7px; background: #fff; box-shadow: 0 3px 12px rgba(31, 49, 57, .05); }
.issue-thread-bubble > header { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid #e1e6e8; background: #fafbfb; }
.issue-thread-bubble header div { display: flex; align-items: center; gap: 8px; }
.issue-thread-bubble header strong { color: #26363f; font-size: 10px; }
.issue-thread-bubble header span { padding: 3px 6px; border-radius: 3px; color: #276a73; background: #e7f2f3; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.issue-thread-entry.answer .issue-thread-bubble header span { color: #2c684f; background: #e8f3ed; }
.issue-thread-bubble time { color: #7e898f; font-size: 8px; }
.issue-thread-bubble .issue-rich-preview { min-height: 0; padding: 18px 20px; border: 0; color: #26363f; background: #fff; font-family: inherit; font-size: 12px; line-height: 1.6; }

.issue-composer { overflow: hidden; margin-top: 8px; border: 1px solid #bdcbcf; border-radius: 7px; background: #fff; box-shadow: 0 10px 30px rgba(29, 58, 65, .10); }
.issue-composer > header { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 9px 13px; border-bottom: 1px solid #dce3e5; background: #f8fafb; }
.issue-composer > header span,
.issue-composer > header strong { display: block; }
.issue-composer > header span { color: #6f7f87; font-size: 7px; font-weight: 800; text-transform: uppercase; }
.issue-composer > header strong { margin-top: 2px; color: #293b44; font-size: 11px; }
.issue-composer-switch { display: inline-flex; padding: 3px; border: 1px solid #d1dadd; border-radius: 5px; background: #eef2f3; }
.issue-composer-switch button { min-height: 28px; padding: 4px 9px; border: 0; border-radius: 3px; color: #6d7a81; background: transparent; font-size: 8px; font-weight: 800; }
.issue-composer-switch button.active { color: #235f68; background: #fff; box-shadow: 0 1px 4px rgba(31, 52, 59, .12); }
.issue-composer .issue-rich-editor { border: 0; border-radius: 0; }
.issue-composer .issue-rich-editor:focus-within { box-shadow: none; }
.issue-composer .issue-editor-toolbar { min-height: 39px; }
.issue-composer .issue-editor-page { min-height: 140px; padding: 18px 20px; font-family: inherit; font-size: 12px; line-height: 1.6; }
.issue-composer-actions { min-height: 62px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-top: 1px solid #e0e5e7; background: #fafbfb; }
.issue-inline-attachment { min-width: 145px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1px 7px; align-items: center; cursor: pointer; }
.issue-inline-attachment input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.issue-inline-attachment span { grid-row: 1 / span 2; padding: 6px 8px; border: 1px solid #c8d3d6; border-radius: 4px; color: #3f6269; background: #fff; font-size: 8px; font-weight: 800; }
.issue-inline-attachment small { overflow: hidden; color: #78858b; font-size: 7px; text-overflow: ellipsis; white-space: nowrap; }
.issue-inline-attachment.selected span { border-color: #4f8e99; color: #fff; background: #4f8e99; }
.issue-composer .btn.success { background: #317a5b; }
.issue-composer.readonly { display: grid; gap: 3px; padding: 18px; color: #64727a; }
.issue-closed-summary { display: flex; align-items: center; gap: 12px; padding: 22px; }
.issue-closed-summary > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #378265; }
.issue-closed-summary strong,
.issue-closed-summary small { display: block; }
.issue-closed-summary small { margin-top: 3px; color: #748188; }

.issue-room-context { min-width: 0; overflow-y: auto; padding: 16px; border-left: 1px solid #d6dde0; background: #fff; }
.issue-context-section { padding: 14px 4px; border-bottom: 1px solid #e0e5e7; }
.issue-context-section:first-child { padding-top: 4px; }
.issue-context-heading { min-height: 28px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.issue-context-heading > span { color: #5e6c74; font-size: 9px; font-weight: 850; text-transform: uppercase; }
.issue-context-heading > b { color: #65747c; font-size: 8px; }
.issue-lifecycle { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 11px; }
.issue-lifecycle > span { position: relative; display: grid; justify-items: center; gap: 5px; color: #98a2a7; text-align: center; }
.issue-lifecycle > span:not(:last-child)::after { position: absolute; top: 10px; left: calc(50% + 11px); width: calc(100% - 22px); height: 2px; background: #dbe1e3; content: ""; }
.issue-lifecycle > span.done:not(:last-child)::after { background: #5a9a7b; }
.issue-lifecycle i { position: relative; z-index: 1; width: 21px; height: 21px; display: grid; place-items: center; border: 2px solid #ccd5d8; border-radius: 50%; background: #fff; font-size: 7px; font-style: normal; }
.issue-lifecycle b { font-size: 6px; line-height: 1.25; }
.issue-lifecycle .done i,
.issue-lifecycle .current i { border-color: #4b9170; color: #fff; background: #4b9170; }
.issue-lifecycle .current b { color: #2d644c; }
.issue-related-card { width: 100%; display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: 6px; padding: 9px; border: 1px solid #d7dfe2; border-radius: 5px; text-align: left; background: #f8fafb; }
.issue-related-card:not(:disabled):hover { border-color: #89adb2; background: #f0f7f7; }
.issue-related-card > i { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 4px; color: #27646c; background: #dcecee; font-size: 8px; font-style: normal; font-weight: 850; }
.issue-related-card strong,
.issue-related-card small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.issue-related-card strong { color: #31434c; font-size: 9px; }
.issue-related-card small { margin-top: 3px; color: #7a878d; font-size: 7px; }
.issue-person { display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 8px; margin-top: 8px; }
.issue-person > i { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #5b7f87; font-size: 7px; font-style: normal; font-weight: 850; }
.issue-person small,
.issue-person strong { display: block; }
.issue-person small { color: #7b878d; font-size: 7px; }
.issue-person strong { margin-top: 2px; color: #34444d; font-size: 9px; }
.issue-context-section.compact-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.issue-context-section.compact-fields .field { gap: 4px; }
.issue-context-section.compact-fields input,
.issue-context-section.compact-fields select { min-height: 35px; font-size: 9px; }
.issue-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.issue-facts span { padding: 8px; border-left: 2px solid #89adb2; background: #f4f7f8; }
.issue-facts small,
.issue-facts strong { display: block; }
.issue-facts small { color: #7b878d; font-size: 7px; }
.issue-facts strong { margin-top: 3px; font-size: 9px; }
.issue-room-context .issue-file-list { margin-top: 6px; border: 0; }
.issue-room-context .issue-file-row { grid-template-columns: 44px minmax(0, 1fr); padding: 8px 0; background: transparent; }
.issue-room-context .issue-file-row .row-actions { grid-column: 2; justify-content: flex-start; }
.issue-room-context .issue-files-empty { padding: 12px 0; font-size: 8px; }
.issue-pdf-action { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; align-items: center; gap: 9px; margin-top: 14px; padding: 10px; border: 1px solid #cbd7da; border-radius: 5px; color: inherit; background: #f5f9f9; text-decoration: none; }
.issue-pdf-action > span { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 4px; color: #fff; background: #b84e43; font-size: 8px; font-weight: 850; }
.issue-pdf-action strong,
.issue-pdf-action small { display: block; }
.issue-pdf-action strong { font-size: 9px; }
.issue-pdf-action small { margin-top: 3px; color: #748189; font-size: 7px; }

.issue-create-room { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; overflow: hidden; }
.issue-create-intro { padding: 23px 28px 18px; border-bottom: 1px solid #d8dfe2; background: #fff; }
.issue-create-intro > span { color: #27717a; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.issue-create-intro h1 { margin: 5px 0; color: #213039; font-size: 21px; }
.issue-create-intro p { max-width: 780px; margin: 0; color: #718087; font-size: 9px; line-height: 1.5; }
.issue-create-grid { min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr) 360px; overflow: hidden; }
.issue-create-main { overflow-y: auto; padding: 24px clamp(24px, 5vw, 70px); }
.issue-create-main > * { width: min(850px, 100%); margin-inline: auto; }
.issue-title-field input { min-height: 48px; font-size: 15px; font-weight: 700; }
.issue-create-main .issue-editor-page { min-height: 290px; font-family: inherit; font-size: 13px; }
.issue-create-context { overflow-y: auto; padding: 20px; border-left: 1px solid #d7dee1; background: #fff; }
.issue-create-context .field { margin-top: 12px; }
.issue-drop-attachment { min-height: 84px; display: grid; place-content: center; justify-items: center; gap: 4px; margin-top: 18px; border: 1px dashed #9db8bd; border-radius: 6px; cursor: pointer; color: #34656d; background: #f4f9f9; }
.issue-drop-attachment input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.issue-drop-attachment span { font-size: 9px; font-weight: 850; }
.issue-drop-attachment small { color: #7c898e; font-size: 7px; }
.issue-drop-attachment.selected { border-color: #277782; background: #e9f4f4; }
.issue-create-footer { min-height: 66px; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 20px; border-top: 1px solid #d6dde0; background: #fff; }
.issue-create-footer > span { color: #758188; font-size: 8px; }

.modal-head {
  min-height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfd;
}

.modal-head span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.icon-button {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: #344054;
  background: #ffffff;
  font-size: 25px;
  line-height: 1;
}

.icon-button:hover {
  color: var(--brand-dark);
  background: var(--surface-soft);
}

.modal-body {
  min-width: 0;
  overflow-y: auto;
  padding: 20px;
}

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

.modal-body .grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.modal-actions,
.decision-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  padding-top: 7px;
  border-top: 1px solid var(--line);
}

.modal-actions > *,
.decision-actions > * {
  min-width: 120px;
}

.modal-body .plan-number-preview {
  margin-top: 0;
}

@media (max-width: 1040px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: sticky;
    top: 0;
    z-index: 12;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(217, 224, 231, 0.9);
  }

  .brand span,
  .user-box .small {
    display: none;
  }

  .nav {
    display: flex;
    gap: 4px;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
  }

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

  .nav button {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 9px 11px;
  }

  .nav button::after {
    display: none;
  }

  .user-box {
    margin: 0;
    padding: 0 0 0 12px;
    border: 0;
    border-left: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .file-explorer,
  .detail-layout,
  .grid.two,
  .grid.three,
  .workspace-panel .grid.two {
    grid-template-columns: minmax(0, 1fr);
    min-width: 0;
  }

  .main,
  .content,
  .card,
  .pad,
  .grid,
  .form,
  .workspace-panel,
  .section-head,
  .topbar > div {
    min-width: 0;
    max-width: 100%;
  }

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

  .finder-window {
    grid-template-columns: 200px minmax(0, 1fr);
  }

  .finder-files {
    border-right: 0;
  }

  .document-inspector {
    grid-column: 1 / -1;
    min-height: 520px;
    border-top: 1px solid var(--line);
  }

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

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

@media (max-width: 720px) {
  .sidebar {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .nav {
    grid-column: 1 / -1;
    grid-row: 2;
    padding-top: 2px;
  }

  .user-box strong {
    display: none;
  }

  .user-box {
    border-left: 0;
    padding-left: 0;
  }

  .topbar {
    height: auto;
    min-height: 78px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 14px 20px;
  }

  .topbar p {
    overflow-wrap: anywhere;
  }

  .tabs {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .tabs::-webkit-scrollbar {
    display: none;
  }

  .modal-backdrop {
    align-items: end;
    padding: 8px;
  }

  .modal-panel,
  .modal-panel.wide {
    width: 100%;
    max-height: calc(100vh - 16px);
    border-radius: 10px;
  }

  .modal-head,
  .modal-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .modal-body .grid.two,
  .modal-body .grid.three {
    grid-template-columns: minmax(0, 1fr);
  }

  .modal-actions > *,
  .decision-actions > * {
    flex: 1 1 140px;
  }

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

  .command-strip {
    align-items: stretch;
    flex-direction: column;
  }

  .plan-number-preview {
    font-size: 22px;
  }

  .finder-window {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr);
  }

  .finder-sidebar {
    display: flex;
    gap: 6px;
    padding: 9px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .finder-sidebar .pane-title {
    display: none;
  }

.finder-sidebar .folder-node {
  width: auto;
  flex: 0 0 auto;
}

  .document-list-head,
  .document-row {
    grid-template-columns: minmax(0, 1fr) 64px;
  }

  .document-list-head span:nth-child(2),
  .document-list-head span:nth-child(4),
  .document-row > span:nth-child(2),
  .document-row > span:nth-child(4) {
    display: none;
  }

  .document-inspector {
    grid-column: 1;
    min-height: 480px;
  }

  .quicklook-media iframe,
  .quicklook-media img {
    min-height: 260px;
  }

  .workflow-stage {
    padding: 14px;
  }
}

/* 2026 workspace redesign */
body { background: #f3f5f7; }
.app-shell { min-height: 100vh; display: block; }
.global-header {
  min-height: 64px; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto auto;
  align-items: center; gap: 22px; padding: 9px 24px; position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid #dfe3e8; background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 1px 10px rgba(25, 35, 45, 0.04); backdrop-filter: blur(18px);
}
.global-header .brand { min-width: 0; padding: 0; color: var(--ink); background: transparent; text-align: left; }
.global-header .brand-mark { width: 36px; height: 36px; border-radius: 7px; background: #1169aa; border: 0; color: #fff; box-shadow: none; }
.global-header .brand span { color: var(--muted); font-size: 11px; }
.global-nav { display: flex; align-items: center; gap: 4px; }
.global-nav button {
  min-height: 36px; padding: 8px 13px; border-radius: 6px; color: #52606d;
  background: transparent; font-size: 13px; font-weight: 650;
}
.global-nav button:hover, .global-nav button.active { color: #0f5f99; background: #edf5fb; }
.global-actions, .account-menu { display: flex; align-items: center; gap: 8px; }
.account-menu { padding-left: 16px; border-left: 1px solid #e2e6ea; }
.account-menu > span:nth-child(2) { min-width: 0; }
.account-menu strong, .account-menu small {
  display: block; max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.account-menu strong { font-size: 12px; }
.account-menu small { margin-top: 2px; color: var(--muted); font-size: 10px; }
.avatar {
  width: 32px; height: 32px; display: grid; flex: 0 0 32px; place-items: center; border-radius: 50%;
  color: #0b5d8d; background: #e4f1f8; font-size: 12px; font-weight: 800;
}
.main { min-width: 0; display: block; }
.content { width: 100%; max-width: 1540px; margin: 0 auto; padding: 30px 34px 48px; display: block; }
.content > .notice, .content > .error { margin-bottom: 16px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 26px; }
.page-heading h1 { margin: 4px 0 3px; font-size: 30px; line-height: 1.15; letter-spacing: 0; }
.page-heading p, .home-section-head p { margin: 0; color: var(--muted); }
.eyebrow, .revision-label { color: #1674ad; font-size: 10px; font-weight: 800; letter-spacing: 0; text-transform: uppercase; }

.home-summary {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 34px;
  border: 1px solid #dfe4e8; border-radius: 8px; background: #fff;
}
.summary-metric {
  min-width: 0; display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center;
  gap: 10px; padding: 16px 20px; border-right: 1px solid #e5e8eb;
}
.summary-metric:last-child { border-right: 0; }
.summary-metric span { color: #5f6d79; font-size: 13px; }
.summary-metric strong { font-size: 22px; }
.home-section { margin-bottom: 34px; }
.home-section-head {
  min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 14px;
}
.home-section-head.compact { margin-bottom: 0; padding: 16px 18px; border-bottom: 1px solid #e4e8eb; }
.home-section-head h2 { margin: 0 0 3px; font-size: 17px; letter-spacing: 0; }
.home-section-head p { font-size: 12px; }
.project-grid { display: grid; grid-template-columns: repeat(3, minmax(250px, 1fr)); gap: 14px; }
.project-card {
  min-width: 0; min-height: 230px; display: grid; grid-template-rows: auto minmax(70px, 1fr) auto auto auto;
  gap: 14px; padding: 18px; border: 1px solid #dce2e7; border-radius: 8px; color: var(--ink);
  background: #fff; text-align: left; box-shadow: 0 4px 14px rgba(22, 32, 42, 0.035);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}
.project-card:hover { border-color: #9dbdd2; box-shadow: 0 10px 24px rgba(22, 32, 42, 0.08); transform: translateY(-2px); }
.project-card-empty { min-height: 180px; place-content: center; text-align: center; }
.project-card-empty span { color: var(--muted); }
.project-card-top, .project-card-foot, .project-card-stats { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.project-code { color: #687580; font-size: 10px; font-weight: 800; }
.project-card h3 { margin: 0 0 6px; overflow-wrap: anywhere; font-size: 17px; letter-spacing: 0; }
.project-card p { min-height: 34px; margin: 0; overflow: hidden; color: var(--muted); font-size: 12px; line-height: 1.45; }
.project-progress { height: 5px; overflow: hidden; border-radius: 3px; background: #e9edf0; }
.project-progress span { height: 100%; display: block; background: #2c8b5f; }
.project-card-stats { justify-content: flex-start; }
.project-card-stats span { color: var(--muted); font-size: 11px; }
.project-card-stats strong { color: var(--ink); }
.project-card-foot { padding-top: 12px; border-top: 1px solid #e8ebee; color: var(--muted); font-size: 11px; }
.project-card-foot strong { color: #1169a5; font-size: 12px; }

.task-board { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.task-column { min-width: 0; overflow: hidden; border: 1px solid #dfe4e8; border-radius: 8px; background: #fff; }
.revision-column { border-top-color: #d8a348; }
.count-badge {
  min-width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%;
  color: #17628f; background: #e8f3f9; font-size: 11px; font-weight: 800;
}
.count-badge.alert { color: #8b5913; background: #fff1d5; }
.task-list { display: grid; }
.task-row {
  width: 100%; min-width: 0; min-height: 66px; display: grid; grid-template-columns: 42px minmax(0, 1fr) 20px;
  align-items: center; gap: 12px; padding: 11px 16px; border-bottom: 1px solid #e8ebee;
  border-radius: 0; color: var(--ink); background: #fff; text-align: left;
}
.task-row:last-child { border-bottom: 0; }
.task-row:hover { background: #f6f9fb; }
.task-row > span:nth-child(2) { min-width: 0; }
.task-row strong, .task-row small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-row small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.task-kind { padding: 5px 4px; border-radius: 5px; color: #126497; background: #e9f3f9; font-size: 9px; font-weight: 800; text-align: center; }
.task-kind.revision { color: #8a590f; background: #fff0d2; }
.task-arrow { color: #6e7880; }
.task-empty { min-height: 112px; display: grid; place-content: center; gap: 4px; padding: 20px; color: var(--muted); text-align: center; }
.task-empty strong { color: #34404a; font-size: 13px; }
.task-empty span { font-size: 11px; }

.content.project-page { max-width: none; padding-top: 0; }
.project-workspace { min-width: 0; }
.project-context {
  min-height: 126px; display: grid; grid-template-columns: 40px minmax(260px, 1fr) auto auto;
  align-items: center; gap: 18px; padding: 22px 4px;
}
.back-button {
  width: 36px; height: 36px; border: 1px solid #d8dfe4; border-radius: 50%; color: #344552;
  background: #fff; font-size: 18px;
}
.project-identity { min-width: 0; }
.project-identity > div { display: flex; align-items: center; gap: 10px; }
.project-identity h1 { margin: 7px 0 3px; overflow-wrap: anywhere; font-size: 25px; line-height: 1.15; letter-spacing: 0; }
.project-identity p { margin: 0; color: var(--muted); font-size: 12px; }
.project-context-stats { display: flex; gap: 20px; padding: 0 18px; border-left: 1px solid #dfe4e8; border-right: 1px solid #dfe4e8; }
.project-context-stats span, .project-context-stats strong { display: block; text-align: center; }
.project-context-stats span { color: var(--muted); font-size: 10px; }
.project-context-stats strong { margin-bottom: 2px; color: var(--ink); font-size: 17px; }
.project-tabs {
  min-height: 48px; display: flex; align-items: end; gap: 2px; padding: 0 4px; overflow-x: auto;
  border: 0; border-bottom: 1px solid #d7dde2; background: transparent;
}
.project-tabs button {
  min-height: 46px; flex: 0 0 auto; padding: 11px 14px 10px; border-bottom: 3px solid transparent;
  border-radius: 0; color: #64717c; background: transparent; font-size: 12px; font-weight: 700;
}
.project-tabs button:hover, .project-tabs button.active { color: #0e659e; border-bottom-color: #1680bd; background: transparent; }
.project-stage { min-width: 0; padding: 22px 4px 0; }
.project-stage .command-strip { border-color: #dde3e7; box-shadow: none; }

.revision-notice {
  display: flex; align-items: center; justify-content: space-between; gap: 18px; margin: 14px 0; padding: 15px 16px;
  border: 1px solid #e1b768; border-left: 4px solid #c88618; border-radius: 7px; background: #fff9ec;
}
.revision-notice strong, .revision-notice small { display: block; }
.revision-notice p { margin: 5px 0; color: #5d4b2d; font-size: 12px; }
.revision-notice small { color: #7c6848; font-size: 10px; }
.document-inspector .revision-notice { margin: 0; border-width: 0 0 1px 4px; border-radius: 0; }
.document-inspector .revision-notice .btn { flex: 0 0 auto; }
.revision-modal-note { padding: 12px 14px; border: 1px solid #e2bd78; border-radius: 7px; background: #fff8e9; }
.revision-modal-note p { margin: 5px 0 0; color: #665334; }
.document-inspector { display: block; max-height: 760px; overflow-y: auto; }
.quicklook-media { height: 310px; }
.document-versions { border-bottom: 1px solid var(--line); background: #fff; }
.document-versions summary {
  display: flex; align-items: center; justify-content: space-between; padding: 12px 14px;
  cursor: pointer; font-size: 12px; font-weight: 750;
}
.document-versions summary span { color: var(--muted); }
.document-versions > div { border-top: 1px solid var(--line); }
.document-versions a { display: block; padding: 9px 14px; border-bottom: 1px solid #edf0f2; color: var(--ink); text-decoration: none; }
.document-versions a small { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.inspector-actions { grid-template-columns: 1fr 1fr; }
.inspector-actions .inspector-wide { grid-column: 1 / -1; }

@media (max-width: 1120px) {
  .global-header { grid-template-columns: auto minmax(210px, 1fr) auto; }
  .global-actions { display: none; }
  .project-grid { grid-template-columns: repeat(2, minmax(240px, 1fr)); }
  .project-context { grid-template-columns: 40px minmax(240px, 1fr) auto; }
  .project-context > .ghost { display: none; }
  .finder-window { grid-template-columns: 200px minmax(0, 1fr); }
  .document-inspector { grid-column: 1 / -1; max-height: none; border-top: 1px solid var(--line); }
}

@media (max-width: 760px) {
  .global-header { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 9px 14px 0; }
  .global-header .brand span, .account-menu > span:nth-child(2), .account-menu .avatar { display: none; }
  .account-menu { padding-left: 0; border-left: 0; }
  .global-nav { grid-column: 1 / -1; grid-row: 2; overflow-x: auto; border-top: 1px solid #edf0f2; }
  .global-nav button { flex: 0 0 auto; border-radius: 0; }
  .content { padding: 22px 16px 36px; }
  .page-heading { margin-bottom: 20px; }
  .page-heading h1 { font-size: 25px; }
  .home-summary { grid-template-columns: 1fr 1fr; }
  .summary-metric:nth-child(2) { border-right: 0; }
  .summary-metric:nth-child(-n + 2) { border-bottom: 1px solid #e5e8eb; }
  .project-grid, .task-board { grid-template-columns: minmax(0, 1fr); }
  .home-section-head { align-items: stretch; }
  .project-context { grid-template-columns: 38px minmax(0, 1fr); align-items: start; padding-top: 18px; }
  .project-context-stats {
    grid-column: 1 / -1; justify-content: space-around; padding: 14px 0 0;
    border: 0; border-top: 1px solid #dfe4e8;
  }
  .project-identity h1 { font-size: 21px; }
  .project-stage { padding-top: 16px; }
  .finder-window { grid-template-columns: minmax(0, 1fr); min-height: 0; }
  .finder-sidebar, .finder-files, .document-inspector { grid-column: 1; }
  .finder-sidebar { border-right: 0; }
  .revision-notice { align-items: stretch; flex-direction: column; }
  .document-inspector .revision-notice .btn { width: 100%; }
  .quicklook-media { height: 280px; }
}

.finder-window.resizable-explorer,
.plan-explorer.resizable-explorer {
  grid-template-columns: var(--folder-pane, 220px) 7px minmax(360px, 1fr) 7px var(--preview-pane, 340px);
}

/* Version control and review attachments */
.version-picker {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f7f9fa;
}

.version-picker > small { grid-column: 2; color: var(--muted); font-size: 9px; }

.version-controls {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 6px;
  min-width: 0;
}

.version-controls button,
.viewer-version button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  padding: 0;
  border: 1px solid #cbd4da;
  border-radius: 6px;
  color: #1c4f68;
  background: #fff;
  font-size: 21px;
  line-height: 1;
  cursor: pointer;
}

.version-controls button:disabled,
.viewer-version button:disabled { opacity: .35; cursor: default; }

.version-picker label,
.viewer-version span {
  color: var(--muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.version-picker select,
.viewer-version select {
  width: 100%;
  min-width: 0;
  height: 34px;
  padding: 0 32px 0 10px;
  border: 1px solid #cbd4da;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  font: inherit;
}

.version-list {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.version-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  border-bottom: 1px solid #e8ecef;
}

.version-item:last-child { border-bottom: 0; }
.version-item.active { background: #eaf3f8; box-shadow: inset 3px 0 #1673a7; }
.version-item.annotated { background: #fbfcfd; }
.version-item.annotated .version-badge {
  border-color: #9ebbc9;
  color: #17658c;
  background: #eaf5fa;
  font-size: 8px;
}
.version-item.annotated.active { background: #eaf5fa; }

.version-item > button {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 0;
  color: var(--ink);
  text-align: left;
  background: transparent;
  cursor: pointer;
}

.version-item > button > span:last-child,
.version-item > button strong,
.version-item > button small { display: block; min-width: 0; }
.version-item > button strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; }
.version-item > button small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.version-item > button .version-open { color: #126891; font-weight: 800; }
.version-item > a { display: grid; place-items: center; padding: 0 12px; color: #126891; font-size: 10px; font-weight: 750; text-decoration: none; }
.version-item > a:hover { background: rgba(18, 104, 145, .08); }

.version-badge {
  display: grid;
  width: 34px;
  height: 28px;
  place-items: center;
  border: 1px solid #cad5db;
  border-radius: 5px;
  color: #35515f;
  background: #f8fafb;
  font-size: 10px;
  font-weight: 800;
}

.document-versions .version-list { border: 0; border-radius: 0; }
.document-versions .version-item > button { grid-template-columns: 34px minmax(0, 1fr); padding: 9px 12px; }

.attachment-upload {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 12px;
  min-height: 68px;
  padding: 12px;
  border: 1px dashed #8eabb9;
  border-radius: 7px;
  background: #f5f9fb;
  cursor: pointer;
}

.attachment-upload:hover { border-color: #1673a7; background: #edf6fa; }
.attachment-upload input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.attachment-upload span { grid-row: 1 / span 2; padding: 9px 12px; border-radius: 5px; color: #fff; background: #126f9f; font-size: 11px; font-weight: 800; }
.attachment-upload small { min-width: 0; overflow: hidden; color: #5f6e77; text-overflow: ellipsis; white-space: nowrap; }

.step-attachment {
  width: min(100%, 420px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  max-width: 100%;
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid #d5e1e7;
  border-radius: 6px;
  background: #f7fafb;
}

.step-attachment button {
  min-width: 0;
  display: block;
  padding: 8px 10px;
  border: 0;
  color: #184e68;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-attachment button:hover { background: #edf6fa; }
.step-attachment strong,
.step-attachment span { display: block; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-attachment strong { font-size: 10px; }
.step-attachment span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.step-attachment > a {
  display: grid;
  place-items: center;
  padding: 0 10px;
  border-left: 1px solid #d5e1e7;
  color: #126891;
  font-size: 9px;
  font-weight: 750;
  text-decoration: none;
}
.step-attachment > a:hover { background: #edf6fa; }

.viewer-overlay { grid-template-rows: 76px minmax(0, 1fr); }
.viewer-bar { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(260px, 420px) auto; background: #171d22; }
.viewer-title { min-width: 0; }
.viewer-title strong,
.viewer-title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-title strong { color: #fff; }
.viewer-title small { margin-top: 4px; color: rgba(255, 255, 255, .65); font-size: 10px; }
.viewer-version { display: grid; grid-template-columns: auto 34px minmax(0, 1fr) 34px; align-items: center; gap: 8px; min-width: 0; }
.viewer-version span { color: rgba(255, 255, 255, .65); }
.viewer-version select { border-color: rgba(255, 255, 255, .24); color: #fff; background: #242b31; }
.viewer-version button { border-color: rgba(255, 255, 255, .24); color: #fff; background: #242b31; }
.viewer-review-toggle { gap: 7px; }
.viewer-review-toggle span { min-width: 20px; padding: 2px 5px; border-radius: 4px; color: #dcecef; background: rgba(255,255,255,.12); font-size: 9px; }
.viewer-review-toggle.active { border-color: #66a2aa; color: #fff; background: #28535a; }
.viewer-content { min-width: 0; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); overflow: hidden; }
.viewer-content.review-open { grid-template-columns: minmax(0, 1fr) 360px; }
.viewer-content > iframe { min-width: 0; min-height: 0; }
.viewer-review { min-width: 0; overflow-y: auto; border-left: 1px solid #d8e0e4; background: #f7f9fa; }
.viewer-review > header { min-height: 86px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; border-bottom: 1px solid #d8e0e4; background: #fff; }
.viewer-review > header span,
.viewer-review > header strong,
.viewer-review > header small { display: block; }
.viewer-review > header span { color: #54727c; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.viewer-review > header strong { margin-top: 4px; color: #20343d; font-size: 14px; }
.viewer-review > header small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.viewer-review > header a { min-width: 42px; min-height: 30px; display: grid; place-items: center; border: 1px solid #b7c9cf; border-radius: 5px; color: #28636d; background: #f7fbfb; font-size: 9px; font-weight: 850; text-decoration: none; }
.viewer-review .version-run-history { padding: 0 14px 20px; border-top: 0; background: #fff; }
.viewer-review .version-run-steps { padding-left: 12px; }
.viewer-review .step { grid-template-columns: 26px minmax(0, 1fr); gap: 8px; padding: 9px; border-radius: 5px; }
.viewer-review .step > .pill { grid-column: 2; justify-self: start; }
.viewer-review .step-number { width: 24px; height: 24px; font-size: 10px; }
.viewer-review .version-run-empty { margin: 14px; padding: 18px; border: 1px dashed #cbd7dc; border-radius: 6px; background: #fff; }

@media (max-width: 760px) {
  .viewer-overlay { grid-template-rows: auto minmax(0, 1fr); }
  .viewer-bar { grid-template-columns: minmax(0, 1fr); padding: 10px; gap: 10px; }
  .viewer-title { grid-column: 1; grid-row: 1; }
  .viewer-title small { display: none; }
  .viewer-version { grid-column: 1 / -1; grid-row: 2; }
  .viewer-bar .button-row { grid-column: 1; grid-row: 3; justify-content: flex-end; }
  .viewer-bar .button-row { flex-wrap: nowrap; }
  .viewer-bar .button-row .ghost { display: inline-flex; }
  .viewer-content.review-open { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) minmax(220px, 42vh); }
  .viewer-review { border-top: 1px solid #d8e0e4; border-left: 0; }
  .attachment-upload { grid-template-columns: minmax(0, 1fr); }
  .attachment-upload span { grid-row: auto; text-align: center; }
  .version-picker { grid-template-columns: minmax(0, 1fr); }
  .version-picker > small { grid-column: 1; }
}

@media (max-width: 1120px) {
  .finder-window.resizable-explorer,
  .plan-explorer.resizable-explorer { grid-template-columns: 200px minmax(0, 1fr); }
  .resizable-explorer > .finder-sidebar,
  .plan-explorer > .plan-register-pane { grid-column: 1; grid-row: 1; }
  .resizable-explorer > .finder-files,
  .plan-explorer > .plan-files-pane { grid-column: 2; grid-row: 1; }
  .resizable-explorer > .document-inspector,
  .plan-explorer > .plan-inspector { grid-column: 1 / -1; grid-row: 2; }
}

@media (max-width: 760px) {
  .finder-window.resizable-explorer,
  .plan-explorer.resizable-explorer { grid-template-columns: minmax(0, 1fr); }
  .resizable-explorer > .finder-sidebar,
  .plan-explorer > .plan-register-pane { grid-column: 1; grid-row: 1; }
  .resizable-explorer > .finder-files,
  .plan-explorer > .plan-files-pane { grid-column: 1; grid-row: 2; }
  .resizable-explorer > .document-inspector,
  .plan-explorer > .plan-inspector { grid-column: 1; grid-row: 3; }
}

/* Context actions, project tiles and recycle bin */
.global-nav button { position: relative; }
.global-nav { scrollbar-width: none; }
.global-nav::-webkit-scrollbar { display: none; }
.nav-count {
  min-width: 18px; height: 18px; display: inline-grid; place-items: center; margin-left: 6px;
  border-radius: 9px; color: #fff; background: #56636e; font-size: 9px; font-weight: 800;
}
.global-nav button.active .nav-count { background: #1479b5; }

.project-card {
  min-height: 244px; position: relative; display: block; padding: 0; overflow: hidden;
  border-color: #d9e0e5; background: #fff;
}
.project-card::before {
  content: ""; position: absolute; inset: 0 auto 0 0; z-index: 2; width: 4px; background: #d0a035;
}
.project-card-red::before { background: #c7473f; }
.project-card-green::before { background: #299263; }
.project-card-main {
  width: 100%; min-height: 242px; display: grid; grid-template-rows: auto minmax(76px, 1fr) auto auto auto;
  gap: 15px; padding: 18px 18px 16px 22px; color: #18212a; background: transparent; text-align: left;
}
.project-card:hover .project-card-main { background: #fbfdfe; }
.project-card-title { min-width: 0; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: start; gap: 12px; }
.project-monogram {
  width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid #d7e2e9; border-radius: 7px;
  color: #0b679d; background: #eaf4fa; font-size: 12px; font-weight: 850;
}
.project-card-delete {
  width: 30px; height: 30px; position: absolute; z-index: 3; top: 48px; right: 13px;
  border: 1px solid #e0e5e8; border-radius: 50%; color: #8a4d4b; background: rgba(255,255,255,.94);
  font-size: 18px; line-height: 1; opacity: 0; box-shadow: 0 3px 10px rgba(20,32,42,.08);
  transition: opacity 120ms ease, color 120ms ease, background 120ms ease;
}
.project-card:hover .project-card-delete,
.project-card-delete:focus-visible { opacity: 1; }
.project-card-delete:hover { color: #fff; background: #b33b36; }
.project-card-empty { display: grid; padding: 24px; }

.project-context-actions { display: flex; align-items: center; gap: 8px; }
.project-delete-action,
.delete-action {
  min-height: 38px; padding: 8px 12px; border: 1px solid #e2c8c6; border-radius: 6px;
  color: #9d3734; background: #fff; font-size: 11px; font-weight: 750;
}
.project-delete-action:hover,
.delete-action:hover { color: #fff; border-color: #ad3e39; background: #ad3e39; }

.folder-node-row {
  width: 100%; display: grid; grid-template-columns: minmax(0, 1fr) 28px; align-items: center;
}
.folder-node-row .folder-node { padding-left: calc(10px + var(--folder-depth, 0) * 16px); }
.folder-delete {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 5px;
  color: #8b5652; background: transparent; font-size: 16px; opacity: 0;
}
.folder-node-row:hover .folder-delete,
.folder-delete:focus-visible { opacity: 1; }
.folder-delete:hover { color: #fff; background: #b5413c; }

.delete-confirmation {
  display: grid; grid-template-columns: 48px minmax(0, 1fr); align-items: center; gap: 14px;
  padding: 16px; border: 1px solid #ead0ce; border-radius: 7px; background: #fff7f6;
}
.delete-symbol {
  width: 44px; height: 44px; display: grid; place-items: center; border-radius: 50%;
  color: #a13c37; background: #f8dfdd; font-size: 25px;
}
.delete-confirmation strong { font-size: 14px; }
.delete-confirmation p { margin: 5px 0 0; color: #725b59; font-size: 12px; line-height: 1.45; }

.trash-list { overflow: hidden; border: 1px solid #dce2e6; border-radius: 8px; background: #fff; }
.trash-list-head,
.trash-row {
  display: grid; grid-template-columns: 52px minmax(190px, 1fr) minmax(150px, .7fr) minmax(170px, .8fr) auto;
  align-items: center; gap: 14px;
}
.trash-list-head {
  min-height: 38px; padding: 0 16px; border-bottom: 1px solid #dfe4e8;
  color: #6b7780; background: #f8fafb; font-size: 10px; font-weight: 800; text-transform: uppercase;
}
.trash-row { min-height: 72px; padding: 10px 16px; border-bottom: 1px solid #e6eaed; }
.trash-row:last-child { border-bottom: 0; }
.trash-row:hover { background: #fafcfd; }
.trash-kind {
  width: 42px; height: 38px; display: grid; place-items: center; border: 1px solid #d8e1e6; border-radius: 6px;
  color: #53636f; background: #f1f5f7; font-size: 9px; font-weight: 850;
}
.trash-name strong, .trash-name small, .trash-date small { display: block; }
.trash-name small, .trash-date, .trash-project { color: #687681; font-size: 11px; }
.trash-name small, .trash-date small { margin-top: 4px; }
.trash-empty { min-height: 360px; display: grid; place-content: center; justify-items: center; text-align: center; }
.trash-empty h2 { margin: 16px 0 5px; font-size: 18px; }
.trash-empty p { margin: 0; color: #6b7780; font-size: 12px; }
.trash-symbol {
  width: 64px; height: 64px; display: grid; place-items: center; border: 1px solid #d9e1e6; border-radius: 50%;
  color: #586975; background: #fff; font-size: 28px; box-shadow: 0 8px 22px rgba(20,32,42,.07);
}

@media (max-width: 1120px) {
  .project-context-actions { display: none; }
}

@media (max-width: 760px) {
  .routing-options { grid-template-columns: minmax(0, 1fr); }
  .global-nav button { padding: 7px 9px; font-size: 11px; }
  .project-card-delete { opacity: 1; }
  .folder-delete { opacity: .75; }
  .trash-list-head { display: none; }
  .trash-row { grid-template-columns: 44px minmax(0, 1fr) auto; gap: 10px; }
  .trash-project { display: none; }
  .trash-date { grid-column: 2; }
  .trash-row > .ghost { grid-column: 3; grid-row: 1 / span 2; }
}

/* Final CDE visual overrides */
.global-header { min-height: 60px; padding: 8px 22px; border-bottom-color: #d9dfe3; background: rgba(252, 253, 253, 0.96); }
.global-header .brand-mark { width: 34px; height: 34px; border-radius: 6px; background: var(--cde-teal-dark); }
.global-nav button { border-radius: 5px; }
.global-nav button:hover, .global-nav button.active { color: var(--cde-teal-dark); background: #e9f3f3; }
.btn { border-color: var(--cde-teal); border-radius: 6px; background: var(--cde-teal); }
.btn:hover { background: var(--cde-teal-dark); }
.ghost, .danger, .success, .warning, input, select, textarea { border-radius: 6px; }
.content.project-page { padding: 0 28px 46px; }
.project-context { min-height: 104px; grid-template-columns: 38px minmax(260px, 1fr) auto auto; padding: 17px 4px 15px; }
.project-identity h1 { margin-top: 5px; font-size: 22px; }
.project-tabs { position: sticky; top: 60px; z-index: 12; min-height: 45px; padding: 0 2px; background: rgba(243, 245, 247, 0.97); backdrop-filter: blur(16px); }
.project-tabs button { min-height: 44px; padding: 10px 13px 9px; border-bottom-width: 2px; font-size: 12px; }
.project-tabs button:hover, .project-tabs button.active { color: var(--cde-teal-dark); border-bottom-color: var(--cde-teal); }
.project-stage { padding-top: 18px; }

@media (max-width: 760px) {
  .content.project-page { padding: 0 14px 34px; }
  .project-context { min-height: 88px; grid-template-columns: 34px minmax(0, 1fr); gap: 10px; }
  .project-context-stats, .project-context-actions { display: none; }
  .project-tabs { top: 94px; margin: 0 -14px; padding-left: 12px; }
}

/* Visual workflow studio */
.workflow-commandbar {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.workflow-commandbar h2 { margin: 4px 0 2px; font-size: 20px; letter-spacing: 0; }
.workflow-commandbar p { margin: 0; color: var(--cde-muted); font-size: 11px; }

.workflow-studio {
  min-width: 0;
  min-height: 610px;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--cde-line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 3px 14px rgba(28, 40, 48, 0.045);
}

.workflow-library {
  min-width: 0;
  border-right: 1px solid var(--cde-line);
  background: #f7f9fa;
}

.workflow-library .pane-title { border-bottom: 1px solid var(--cde-line); background: #fff; }

.workflow-template-item {
  width: 100%;
  min-height: 66px;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 12px;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-bottom: 1px solid #e4e8eb;
  border-radius: 0;
  color: #42505a;
  background: transparent;
  text-align: left;
}

.workflow-template-item:hover { background: #edf5f5; }
.workflow-template-item.active { color: var(--cde-teal-dark); background: #e5f1f1; box-shadow: inset 3px 0 0 var(--cde-teal); }
.workflow-template-item > span:nth-child(2) { min-width: 0; }
.workflow-template-item strong,
.workflow-template-item small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-template-item strong { font-size: 11px; }
.workflow-template-item small { margin-top: 4px; color: #78848c; font-size: 9px; }
.workflow-template-item > b { color: #859199; font-size: 15px; }
.workflow-list-symbol {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  color: #17646b;
  background: #d8ecec;
  font-size: 8px;
  font-weight: 850;
}

.workflow-canvas-panel { min-width: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); }
.workflow-canvas-head {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 13px 17px;
  border-bottom: 1px solid var(--cde-line);
  background: rgba(255,255,255,.96);
}

.workflow-canvas-head h3 { margin: 3px 0 2px; font-size: 15px; letter-spacing: 0; }
.workflow-canvas-head p { margin: 0; color: var(--cde-muted); font-size: 10px; }
.workflow-version { padding: 5px 8px; border: 1px solid #cfdbdf; border-radius: 5px; color: #596871; background: #f7f9fa; font-size: 9px; font-weight: 750; }

.workflow-visual {
  min-width: 0;
  min-height: 530px;
  overflow: auto;
  padding: 66px 44px 32px;
  background-color: #fbfcfc;
  background-image: linear-gradient(#e9edef 1px, transparent 1px), linear-gradient(90deg, #e9edef 1px, transparent 1px);
  background-size: 24px 24px;
}

.workflow-flow {
  width: max-content;
  min-width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.workflow-board {
  width: max-content;
  min-width: 100%;
  min-height: 310px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 18px 0;
}

.workflow-stage-column {
  position: relative;
  width: 188px;
  min-width: 188px;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #cbd7da;
  border-radius: 6px;
  background: rgba(246, 249, 250, .96);
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}

.workflow-stage-column > header {
  min-height: 27px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 3px;
  color: #5c6b73;
  font-size: 8px;
  text-transform: uppercase;
}

.workflow-stage-column > header span { font-weight: 850; }
.workflow-stage-column > header b { color: #24717a; font-size: 7px; }
.workflow-stage-column.has-parallel { border-color: #83afb5; background: rgba(237, 246, 247, .97); box-shadow: inset 0 3px 0 #4f8e99; }
.workflow-parallel-stack { position: relative; display: grid; gap: 8px; }
.workflow-stage-column.has-parallel .workflow-parallel-stack { padding-left: 10px; }
.workflow-stage-column.has-parallel .workflow-parallel-stack::before {
  content: "";
  position: absolute;
  top: 18px;
  bottom: 18px;
  left: 1px;
  width: 2px;
  background: #76a8af;
}
.workflow-stage-column.has-parallel .workflow-review-node::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -11px;
  width: 10px;
  height: 2px;
  background: #76a8af;
}
.workflow-stage-column .workflow-review-node { width: 100%; min-height: 126px; flex-basis: auto; }
.workflow-board.editable .workflow-review-node { cursor: grab; user-select: none; }
.workflow-board.editable .workflow-review-node:active { cursor: grabbing; }
.workflow-review-node.dragging { opacity: .42; transform: scale(.98); }
.workflow-stage-column.drop-ready,
.workflow-new-stage-drop.drop-ready { border-style: dashed; }
.workflow-stage-column.drag-over,
.workflow-new-stage-drop.drag-over { border-color: var(--cde-teal); background: #e5f3f3; box-shadow: 0 0 0 3px rgba(9, 126, 135, .12); }
.workflow-drag-handle { margin-left: auto; color: #6f858c; font-size: 13px; font-style: normal; letter-spacing: 0; }
.workflow-board:not(.editable) .workflow-drag-handle { display: none; }
.workflow-add-parallel {
  min-height: 30px;
  border: 1px dashed #8eb4ba;
  border-radius: 4px;
  color: #24636c;
  background: #fff;
  font-size: 8px;
  font-weight: 800;
}
.workflow-add-parallel:hover { border-style: solid; background: #e8f3f3; }
.workflow-new-stage-drop {
  width: 108px;
  min-width: 108px;
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  margin: 0 12px;
  padding: 10px;
  border: 1px dashed #aab9be;
  border-radius: 6px;
  color: #75838a;
  background: rgba(255,255,255,.72);
  text-align: center;
}
.workflow-new-stage-drop span { font-size: 20px; }
.workflow-new-stage-drop b { font-size: 8px; text-transform: uppercase; }
.workflow-new-stage-drop small { font-size: 7px; }

.workflow-terminal,
.workflow-review-node {
  width: 164px;
  min-height: 130px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 6px;
  flex: 0 0 164px;
  padding: 13px;
  border: 1px solid #b8c7cc;
  border-radius: 6px;
  color: #283740;
  background: rgba(255,255,255,.97);
  box-shadow: 0 7px 18px rgba(34, 54, 64, .07);
  text-align: center;
}

.workflow-terminal { width: 138px; min-height: 108px; flex-basis: 138px; }
.workflow-terminal.start { border-color: #77aeb2; box-shadow: inset 0 4px 0 var(--cde-teal); }
.workflow-terminal.finish { border-color: #75a98e; background: #f1f8f4; box-shadow: inset 0 4px 0 #2a865f; }
.workflow-terminal > span { color: #76838b; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.workflow-terminal strong { font-size: 12px; }
.workflow-terminal small { color: #74818a; font-size: 9px; }

.workflow-review-node {
  position: relative;
  align-content: start;
  justify-items: stretch;
  padding: 0;
  border-color: #91b7bd;
  text-align: left;
}

.workflow-review-node header {
  min-height: 33px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-bottom: 1px solid #d8e1e4;
  color: #2d5f65;
  background: #eaf4f4;
}

.workflow-review-node header span { width: 19px; height: 19px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--cde-teal); font-size: 8px; font-weight: 850; }
.workflow-review-node header b { font-size: 9px; text-transform: uppercase; }
.workflow-review-node > strong { padding: 12px 10px 0; overflow-wrap: anywhere; font-size: 11px; line-height: 1.3; }
.workflow-review-node > small { padding: 0 10px 12px; overflow: hidden; color: #77838b; font-size: 8px; line-height: 1.35; text-overflow: ellipsis; white-space: nowrap; }
.workflow-review-node footer { margin-top: auto; padding: 7px 10px; border-top: 1px solid #e1e6e8; color: #8b5a13; background: #fff7e7; font-size: 8px; font-weight: 800; }
.workflow-review-node footer.continue { color: #665219; background: #f7f3df; }
.workflow-node-routes { margin-top: auto; border-top: 1px solid #e1e6e8; }
.workflow-node-routes span { display: block; padding: 5px 9px; overflow: hidden; font-size: 7px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.workflow-node-routes .approval-route { color: #286474; background: #eef6f7; }
.workflow-node-routes .revision-route { color: #8b5a13; background: #fff7e7; }
.workflow-add-arrow { min-height: 27px; margin: 6px; border: 1px solid #8db5bb; border-radius: 4px; color: #1f6670; background: #fff; font-size: 8px; font-weight: 850; }
.workflow-add-arrow:hover { color: #fff; background: var(--cde-teal); }

.workflow-connector {
  position: relative;
  width: 76px;
  height: 2px;
  flex: 0 0 76px;
  background: #4f8e99;
}

.workflow-connector::after {
  content: "";
  position: absolute;
  top: -4px;
  right: -1px;
  border-top: 5px solid transparent;
  border-bottom: 5px solid transparent;
  border-left: 8px solid #4f8e99;
}

.workflow-connector i { position: absolute; left: 50%; bottom: 6px; transform: translateX(-50%); color: #648089; font-size: 7px; font-style: normal; font-weight: 750; white-space: nowrap; }
.workflow-connector.final { background: #378265; }
.workflow-connector.final::after { border-left-color: #378265; }
.workflow-connector.final.direct { height: 3px; }
.workflow-skipped { max-width: 96px; margin-left: 10px; padding: 6px 8px; border: 1px dashed #b8c2c7; border-radius: 4px; color: #738088; background: rgba(255,255,255,.9); font-size: 7px; font-weight: 750; text-align: center; }

.workflow-revision-lane {
  width: max-content;
  min-width: 78%;
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 62px auto 0;
  padding: 12px 30px;
  border: 1px solid #ebd4ad;
  border-radius: 6px;
  background: rgba(255, 249, 238, .92);
}

.revision-route-label { color: #95601a; font-size: 9px; font-weight: 850; white-space: nowrap; }
.revision-route-line { width: 72px; height: 2px; background: #d89531; }
.workflow-route-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.workflow-route-chips span { display: inline-flex; align-items: center; gap: 5px; padding: 5px 7px; border: 1px solid #e7c78f; border-radius: 4px; color: #81551a; background: #fff; font-size: 8px; font-weight: 750; white-space: nowrap; }
.workflow-route-chips b { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #d89531; font-size: 7px; }
.workflow-rework-node { min-width: 190px; padding: 10px 13px; border: 1px solid #dbad66; border-radius: 5px; background: #fff; }
.workflow-rework-node strong,
.workflow-rework-node small { display: block; }
.workflow-rework-node strong { color: #6e4c1b; font-size: 10px; }
.workflow-rework-node small { margin-top: 3px; color: #8b7350; font-size: 8px; }
.revision-route-back { color: #95601a; font-size: 9px; font-weight: 750; white-space: nowrap; }

.workflow-legend { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: 22px; color: #6d7981; font-size: 8px; }
.workflow-legend span { display: inline-flex; align-items: center; gap: 5px; }
.workflow-legend-dot { width: 7px; height: 7px; border-radius: 50%; background: #4f8e99; }
.workflow-legend-dot.revision { background: #d89531; }
.workflow-legend-dot.continuation { border: 2px solid #d89531; background: #fff; }
.workflow-legend-dot.publish { background: #378265; }
.workflow-legend-dot.restart { border: 2px solid #d89531; background: #fff; }

.workflow-blank { min-height: 530px; display: grid; place-content: center; justify-items: center; gap: 7px; padding: 30px; text-align: center; }
.workflow-blank-symbol { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid #9abec1; border-radius: 50%; color: var(--cde-teal); font-size: 24px; }
.workflow-blank strong { margin-top: 5px; font-size: 14px; }
.workflow-blank p { max-width: 380px; margin: 0 0 10px; color: var(--cde-muted); font-size: 10px; }

.modal-panel.workflow-modal { width: min(1120px, calc(100vw - 34px)); max-width: 1120px; max-height: calc(100vh - 34px); }
.workflow-designer-preview { overflow: auto; border: 1px solid var(--cde-line); border-radius: 6px; }
.workflow-designer-label { min-height: 42px; display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; border-bottom: 1px solid var(--cde-line); background: #f7f9fa; }
.workflow-designer-label strong { font-size: 10px; }
.workflow-designer-label span { color: #77838b; font-size: 8px; }
.workflow-designer-preview .workflow-visual { min-height: 260px; padding: 42px 28px 20px; background-size: 20px 20px; }
.workflow-designer-preview .workflow-free-visual { min-height: 560px; padding: 0; }
.workflow-canvas-actions { display: flex; align-items: center; gap: 8px; }

.workflow-free-visual {
  position: relative;
  overflow: auto;
  background-color: #fbfcfc;
  background-image: linear-gradient(#e5eaed 1px, transparent 1px), linear-gradient(90deg, #e5eaed 1px, transparent 1px);
  background-size: 20px 20px;
}

.workflow-free-canvas { position: relative; min-width: 100%; }
.workflow-connection-layer { position: absolute; inset: 0; z-index: 1; overflow: visible; pointer-events: none; }
.workflow-connection-layer marker#workflowArrowTeal path { fill: #4f8e99; }
.workflow-connection-layer marker#workflowArrowGold path { fill: #cf9239; }
.workflow-free-edge { fill: none; stroke: #4f8e99; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; marker-end: url(#workflowArrowTeal); vector-effect: non-scaling-stroke; pointer-events: stroke; cursor: pointer; }
.workflow-free-edge:hover { stroke: #0a7480; stroke-width: 3; }
.workflow-free-edge.revision { stroke: #cf9239; stroke-width: 1.8; stroke-dasharray: 6 6; marker-end: url(#workflowArrowGold); }
.workflow-free-edge.revision.wait { stroke-width: 2.5; stroke-dasharray: 10 5; }
.workflow-free-edge.revision:hover { stroke: #a96818; }
.workflow-free-edge.continuation { stroke: #d49a3d; stroke-width: 1.9; stroke-dasharray: 2 5; marker-end: url(#workflowArrowGold); }
.workflow-free-edge.continuation:hover { stroke: #a96818; stroke-width: 2.8; }
.workflow-free-edge.restart { stroke: #b9741b; stroke-width: 2.2; marker-end: url(#workflowArrowGold); }
.workflow-free-edge.restart:hover { stroke: #9b5d12; stroke-width: 3.5; }

.workflow-free-terminal,
.workflow-free-rework,
.workflow-free-node {
  position: absolute;
  z-index: 2;
  box-sizing: border-box;
  border: 1px solid #9ebec3;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 5px 16px rgba(31, 54, 61, .09);
}

.workflow-free-terminal {
  width: 140px;
  min-height: 94px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 15px;
  border-top: 4px solid var(--cde-teal);
  text-align: center;
}
.workflow-free-visual.editable .workflow-free-terminal,
.workflow-free-visual.editable .workflow-free-rework { cursor: grab; touch-action: none; user-select: none; }
.workflow-free-terminal.dragging,
.workflow-free-rework.dragging { z-index: 6; cursor: grabbing; box-shadow: 0 14px 34px rgba(24, 82, 91, .2); }
.workflow-free-terminal > button,
.workflow-free-rework > button { min-height: 24px; margin-top: 4px; border: 1px solid #b7c8cc; border-radius: 4px; color: #35656d; background: rgba(255,255,255,.82); font-size: 7px; font-weight: 850; }
.workflow-free-terminal > button:hover,
.workflow-free-rework > button:hover { border-color: #6e9ca3; background: #fff; }
.workflow-free-terminal.finish { border-color: #74a68e; border-top-color: #378265; background: #f1f8f4; }
.workflow-free-terminal span,
.workflow-free-rework span { color: #6c7a82; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.workflow-free-terminal strong,
.workflow-free-rework strong { color: #263740; font-size: 11px; }
.workflow-free-terminal small,
.workflow-free-rework small { color: #7b878e; font-size: 8px; }

.workflow-free-node {
  width: 190px;
  min-height: 142px;
  display: grid;
  grid-template-rows: auto auto auto 1fr auto;
  gap: 7px;
  padding: 0 12px 11px;
  border-top: 4px solid var(--cde-teal);
  cursor: grab;
  touch-action: none;
  user-select: none;
}
.workflow-free-node:active,
.workflow-free-node.dragging { cursor: grabbing; }
.workflow-free-node.dragging { z-index: 6; border-color: #4f8e99; box-shadow: 0 14px 34px rgba(24, 82, 91, .2); }
.workflow-free-node > header { min-height: 32px; display: flex; align-items: center; justify-content: space-between; margin: 0 -12px; padding: 0 10px; border-bottom: 1px solid #d8e0e3; background: #e8f2f3; }
.workflow-free-node > header span { color: #276771; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.workflow-free-node > header i { color: #688087; font-size: 13px; font-style: normal; }
.workflow-free-node > strong { overflow: hidden; color: #263740; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-free-node > small { overflow: hidden; color: #7b878e; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-free-node .workflow-node-routes { display: grid; gap: 3px; }
.workflow-free-node .workflow-node-routes span { padding: 3px 5px; border-left: 2px solid #4f8e99; color: #52646d; background: #f1f6f7; font-size: 7px; }
.workflow-free-node .workflow-node-routes .revision-route { border-left-color: #cf9239; background: #fff7e9; }
.workflow-free-node > button { min-height: 27px; border: 1px solid #a9c2c6; border-radius: 4px; color: #286771; background: #fff; font-size: 8px; font-weight: 800; }
.workflow-free-node > button:hover { background: #eaf4f4; }

.workflow-free-rework {
  width: 210px;
  min-height: 72px;
  display: grid;
  align-content: center;
  gap: 3px;
  padding: 11px 15px;
  border-color: #d8ac69;
  border-top: 4px solid #cf9239;
  background: #fffaf1;
  text-align: center;
}
.workflow-free-visual.readonly .workflow-free-node,
.workflow-free-visual.readonly .workflow-free-terminal,
.workflow-free-visual.readonly .workflow-free-rework { cursor: default; }
.workflow-free-visual > .workflow-legend { position: sticky; bottom: 0; z-index: 8; min-height: 34px; margin: 0; border-top: 1px solid #dce2e5; background: rgba(255,255,255,.94); }
.workflow-visual.compact .workflow-terminal { width: 116px; min-height: 86px; flex-basis: 116px; }
.workflow-visual.compact .workflow-review-node { width: 100%; min-height: 150px; flex-basis: auto; }
.workflow-visual.compact .workflow-stage-column { width: 178px; min-width: 178px; }
.workflow-visual.compact .workflow-board { min-height: 330px; justify-content: flex-start; }
.workflow-visual.compact .workflow-connector { width: 48px; flex-basis: 48px; }
.workflow-visual.compact .workflow-revision-lane { min-height: 64px; margin-top: 36px; padding: 8px 20px; }
.workflow-visual.compact .workflow-legend { margin-top: 14px; }
.workflow-editor-head { min-height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--cde-line); }
.workflow-editor-head strong,
.workflow-editor-head span { display: block; }
.workflow-editor-head strong { font-size: 11px; }
.workflow-editor-head span { margin-top: 2px; color: #77838b; font-size: 8px; }
.workflow-step-list { display: grid; gap: 7px; }
.workflow-step-editor { display: grid; grid-template-columns: 28px minmax(150px, 1fr) minmax(160px, .9fr) minmax(112px, .62fr) minmax(132px, .7fr) auto; align-items: end; gap: 9px; padding: 9px; border: 1px solid var(--cde-line); border-radius: 6px; background: #fafbfb; }
.workflow-step-editor .field { gap: 4px; }
.workflow-step-editor input,
.workflow-step-editor select { min-height: 36px; }
.workflow-step-index { width: 26px; height: 26px; display: grid; place-items: center; align-self: center; border-radius: 50%; color: #fff; background: var(--cde-teal); font-size: 9px; font-weight: 850; }
.workflow-route-readout { min-width: 0; min-height: 36px; display: grid; align-content: center; padding: 5px 8px; border-left: 3px solid #4f8e99; border-radius: 3px; background: #eef6f7; }
.workflow-route-readout.revision { border-left-color: #d89531; background: #fff7e7; }
.workflow-route-readout span,
.workflow-route-readout strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workflow-route-readout span { color: #728087; font-size: 7px; text-transform: uppercase; }
.workflow-route-readout strong { margin-top: 2px; color: #37505a; font-size: 8px; }
.workflow-step-actions { display: flex; align-items: center; gap: 3px; padding-bottom: 2px; }
.workflow-connector-editor { display: grid; gap: 9px; padding: 11px; border: 1px solid #8fb8bd; border-radius: 6px; background: #f3f8f8; box-shadow: 0 8px 22px rgba(24, 66, 73, .08); }
.workflow-connector-editor[hidden] { display: none; }
.workflow-connector-editor header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.workflow-connector-editor header span,
.workflow-connector-editor header strong { display: block; }
.workflow-connector-editor header span { color: #748189; font-size: 8px; text-transform: uppercase; }
.workflow-connector-editor header strong { margin-top: 2px; font-size: 11px; }
.workflow-connection-choice { display: grid; grid-template-columns: 160px repeat(2, minmax(150px, 1fr)); gap: 6px; align-items: center; }
.workflow-connection-choice.revision-choice { grid-template-columns: 160px repeat(3, minmax(145px, 1fr)); }
.workflow-connection-choice > span { color: #52616a; font-size: 9px; font-weight: 800; }
.workflow-connection-choice button { min-height: 34px; border: 1px solid #c7d4d8; border-radius: 4px; color: #53636c; background: #fff; font-size: 9px; font-weight: 750; }
.workflow-connection-choice button:hover { border-color: #699da5; }
.workflow-connection-choice button:disabled { cursor: not-allowed; border-color: #d8dfe2; color: #929da3; background: #f5f7f8; box-shadow: none; }
.workflow-connection-choice button.active { border-color: #4f8e99; color: #1e616b; background: #e5f1f1; box-shadow: inset 0 0 0 1px #4f8e99; }
.workflow-connection-choice button.active.publish { border-color: #3d8968; color: #216348; background: #e7f3ec; box-shadow: inset 0 0 0 1px #3d8968; }
.workflow-connection-choice button.active.revision { border-color: #cf9239; color: #805218; background: #fff3df; box-shadow: inset 0 0 0 1px #cf9239; }
.workflow-routing-explanation { margin-left: 166px; padding: 8px 10px; border-left: 3px solid #cf9239; color: #6f5631; background: #fffaf1; font-size: 9px; line-height: 1.45; }
.workflow-routing-explanation.continue { border-left-color: #4f8e99; color: #365d65; background: #eef6f7; }
.workflow-node-editor { display: grid; grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr); gap: 10px 16px; align-items: end; padding: 12px; border: 1px solid #cf9239; border-radius: 6px; background: #fffaf1; box-shadow: 0 8px 22px rgba(112, 75, 25, .08); }
.workflow-node-editor[hidden] { display: none; }
.workflow-node-editor > header { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; }
.workflow-node-editor header span,
.workflow-node-editor header strong { display: block; }
.workflow-node-editor header span { color: #8b6c42; font-size: 8px; text-transform: uppercase; }
.workflow-node-editor header strong { margin-top: 2px; color: #49371f; font-size: 11px; }
.workflow-node-note { display: grid; gap: 3px; padding: 9px; border-left: 3px solid #378265; background: #f1f8f4; }
.workflow-node-note strong { color: #285e48; font-size: 9px; }
.workflow-node-note span { color: #61746a; font-size: 8px; line-height: 1.45; }
.danger-icon { color: #a44239; }

/* Workflow builder 2.0 */
.modal-panel.workflow-modal {
  width: calc(100vw - 24px);
  max-width: none;
  height: calc(100vh - 24px);
  max-height: none;
  border-radius: 8px;
}

.workflow-modal .modal-head {
  min-height: 62px;
  padding: 11px 18px;
  border-bottom: 1px solid #dfe4e7;
  background: #f8f9fa;
}

.workflow-modal .modal-body {
  min-height: 0;
  overflow: hidden;
  padding: 0;
}

.workflow-designer-form {
  height: 100%;
  display: block;
  overflow: auto;
  background: #f3f5f6;
}

.workflow-meta-bar {
  position: sticky;
  top: 0;
  z-index: 15;
  display: grid;
  grid-template-columns: minmax(220px, .75fr) minmax(300px, 1.4fr) auto;
  align-items: end;
  gap: 12px;
  padding: 12px 18px;
  border-bottom: 1px solid #dce2e5;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

.workflow-meta-bar .field { gap: 4px; }
.workflow-meta-bar input { min-height: 38px; background: #fff; }
.workflow-meta-summary { min-width: 120px; min-height: 38px; display: grid; align-content: center; justify-items: end; padding: 0 4px; }
.workflow-meta-summary span,
.workflow-meta-summary strong { display: block; white-space: nowrap; }
.workflow-meta-summary span { color: #7a858c; font-size: 8px; text-transform: uppercase; }
.workflow-meta-summary strong { margin-top: 2px; color: #26343d; font-size: 11px; }

.workflow-phase-builder {
  min-width: 0;
  margin: 14px 14px 0;
  overflow: hidden;
  border: 1px solid #d7dee2;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 30px rgba(31, 45, 55, .06);
}

.workflow-builder-toolbar {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 14px;
  border-bottom: 1px solid #dfe4e7;
  background: #fbfcfc;
}

.workflow-builder-toolbar > div:first-child strong,
.workflow-builder-toolbar > div:first-child span { display: block; }
.workflow-builder-toolbar > div:first-child strong { color: #202f38; font-size: 12px; }
.workflow-builder-toolbar > div:first-child span { margin-top: 3px; color: #6f7b83; font-size: 9px; }
.workflow-builder-toolbar > div:last-child { display: flex; align-items: center; gap: 7px; }

.workflow-phase-scroll {
  min-height: 350px;
  overflow: auto;
  overscroll-behavior: contain;
  background-color: #f7f9fa;
  background-image: linear-gradient(#e9edef 1px, transparent 1px), linear-gradient(90deg, #e9edef 1px, transparent 1px);
  background-size: 24px 24px;
}

.workflow-phase-rail {
  width: max-content;
  min-width: 100%;
  min-height: 350px;
  display: flex;
  align-items: center;
  padding: 28px 24px;
}

.workflow-builder-terminal {
  width: 148px;
  min-width: 148px;
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 14px;
  border: 1px solid #aabec5;
  border-top: 4px solid var(--cde-teal);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 7px 18px rgba(35, 52, 62, .08);
  text-align: center;
}

.workflow-builder-terminal.finish { border-color: #82ad98; border-top-color: #2f8b62; background: #f2f8f5; }
.workflow-builder-terminal span { color: #718089; font-size: 8px; font-weight: 850; text-transform: uppercase; }
.workflow-builder-terminal strong { overflow-wrap: anywhere; color: #26343d; font-size: 12px; }
.workflow-builder-terminal small { color: #7c888f; font-size: 8px; }

.workflow-phase-column {
  width: 252px;
  min-width: 252px;
  align-self: stretch;
  display: grid;
  grid-template-rows: auto minmax(132px, 1fr) auto auto;
  gap: 8px;
  padding: 10px;
  border: 1px solid #cfd8dc;
  border-top: 3px solid #7c979f;
  border-radius: 7px;
  background: rgba(250, 251, 252, .96);
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.workflow-phase-column.parallel { border-color: #7ea8b0; border-top-color: var(--cde-teal); background: rgba(241, 247, 248, .97); }
.workflow-phase-column.drop-ready { border-style: dashed; }
.workflow-phase-column.drag-over { border-color: var(--cde-teal); background: #eaf4f5; box-shadow: 0 0 0 3px color-mix(in srgb, var(--cde-teal) 15%, transparent); }

.workflow-phase-header { min-height: 40px; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 2px 7px; border-bottom: 1px solid #dfe5e8; }
.workflow-phase-header span,
.workflow-phase-header strong { display: block; }
.workflow-phase-header span { color: var(--cde-teal-dark); font-size: 8px; font-weight: 850; text-transform: uppercase; }
.workflow-phase-header strong { margin-top: 2px; color: #26343d; font-size: 10px; }
.workflow-phase-header b { padding: 4px 6px; border: 1px solid #ccd8dc; border-radius: 4px; color: #63737b; background: #fff; font-size: 8px; }
.workflow-phase-column.parallel .workflow-phase-header b { border-color: #88b0b6; color: var(--cde-teal-dark); background: #edf6f6; }
.workflow-phase-stack { display: grid; align-content: center; gap: 8px; }

.workflow-builder-card {
  position: relative;
  min-height: 116px;
  display: grid;
  grid-template-rows: auto auto auto 1fr;
  gap: 5px;
  padding: 10px;
  border: 1px solid #cad4d8;
  border-radius: 6px;
  color: #26343d;
  background: #fff;
  box-shadow: 0 3px 10px rgba(35, 52, 62, .055);
  cursor: grab;
  touch-action: none;
  user-select: none;
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.workflow-builder-card:hover { border-color: #8eadb4; box-shadow: 0 7px 16px rgba(35, 52, 62, .09); transform: translateY(-1px); }
.workflow-builder-card.selected { border-color: var(--cde-teal); box-shadow: inset 0 0 0 1px var(--cde-teal), 0 7px 18px color-mix(in srgb, var(--cde-teal) 14%, transparent); }
.workflow-builder-card.dragging { opacity: .45; cursor: grabbing; transform: scale(.98); }
.workflow-builder-card.pointer-dragging { z-index: 40; opacity: .82; box-shadow: 0 18px 36px rgba(27, 50, 60, .2); }
.workflow-builder-card.drag-over { border-color: var(--cde-teal); background: #edf6f7; }
.workflow-builder-card > header { display: flex; align-items: center; justify-content: space-between; }
.workflow-builder-card > header i { color: #71838a; font-size: 13px; font-style: normal; }
.workflow-card-avatar { width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: var(--cde-teal); font-size: 8px; font-weight: 850; }
.workflow-builder-card > strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-builder-card > small { overflow: hidden; color: #78858c; font-size: 8px; text-overflow: ellipsis; white-space: nowrap; }
.workflow-builder-card > footer { display: flex; flex-wrap: wrap; align-content: end; gap: 4px; margin-top: 3px; }
.workflow-builder-card > footer span { padding: 3px 5px; border-radius: 3px; color: #326771; background: #eaf3f4; font-size: 7px; font-weight: 800; }
.workflow-builder-card > footer span.revision { color: #875918; background: #fff3df; }
.workflow-card-remove { position: absolute; top: 7px; right: 28px; width: 24px; height: 24px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 50%; color: #8a979d; background: transparent; font-size: 15px; }
.workflow-card-remove:hover { color: #9f3932; background: #fbeceb; }
.workflow-card-remove:disabled { display: none; }

.workflow-add-parallel-modern { min-height: 32px; border: 1px dashed #90afb6; border-radius: 5px; color: #316a73; background: #fff; font-size: 8px; font-weight: 850; }
.workflow-add-parallel-modern:hover { border-style: solid; border-color: var(--cde-teal); background: #edf6f6; }
.workflow-add-parallel-modern span { font-size: 13px; vertical-align: -1px; }
.workflow-phase-routes { display: flex; flex-wrap: wrap; gap: 4px; padding-top: 2px; }
.workflow-phase-routes span { color: #6f7c83; font-size: 7px; }
.workflow-phase-routes span + span::before { content: "·"; margin-right: 4px; }
.workflow-phase-routes .return-route { width: 100%; display: flex; align-items: center; gap: 5px; padding: 6px 7px; border: 1px solid #e2bc82; border-radius: 4px; color: #7a5117; background: #fff5e4; font-size: 8px; font-weight: 800; }
.workflow-phase-routes .return-route::before { content: none; }
.workflow-phase-routes .return-route b { font-size: 15px; line-height: 1; }

.workflow-stage-bridge {
  position: relative;
  width: 118px;
  min-width: 118px;
  align-self: stretch;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 7px;
  padding: 12px 7px;
  color: #6f7d84;
}

.workflow-stage-bridge.join { width: 176px; min-width: 176px; }
.workflow-stage-bridge.first { width: 98px; min-width: 98px; }
.workflow-bridge-line { position: relative; width: 100%; height: 2px; background: #6a9ba4; }
.workflow-bridge-line::after { content: ""; position: absolute; top: -4px; right: -1px; border-top: 5px solid transparent; border-bottom: 5px solid transparent; border-left: 8px solid #6a9ba4; }
.workflow-stage-bridge.join .workflow-bridge-line::before { content: ""; position: absolute; top: -7px; left: calc(50% - 7px); width: 14px; height: 14px; border: 2px solid var(--cde-teal); border-radius: 50%; background: #f7f9fa; }
.workflow-stage-bridge strong { max-width: 155px; color: #617078; font-size: 7px; font-weight: 800; text-align: center; }
.workflow-stage-bridge > button { width: 26px; height: 26px; display: grid; place-items: center; padding: 0; border: 1px solid #a8b9be; border-radius: 50%; color: #547078; background: #fff; font-size: 15px; box-shadow: 0 2px 7px rgba(35, 52, 62, .07); }
.workflow-stage-bridge > button:hover { border-color: var(--cde-teal); color: #fff; background: var(--cde-teal); }
.workflow-stage-bridge.first > button { display: none; }
.workflow-stage-bridge.drop-ready { border-radius: 7px; outline: 1px dashed #9eafb4; outline-offset: -6px; }
.workflow-stage-bridge.drag-over { background: #eaf4f5; outline: 2px dashed var(--cde-teal); }

.workflow-builder-explainer {
  min-height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  padding: 8px 14px;
  border-top: 1px solid #dfe4e7;
  color: #68767d;
  background: #fff;
  font-size: 8px;
}
.workflow-builder-explainer span { display: inline-flex; align-items: center; gap: 5px; }
.workflow-builder-explainer i { width: 8px; height: 8px; border-radius: 50%; background: #7f959d; }
.workflow-builder-explainer i.parallel { background: var(--cde-teal); }
.workflow-builder-explainer i.join { border: 2px solid var(--cde-teal); background: #fff; }
.workflow-builder-explainer i.revision { background: #cf9239; }

.workflow-modal .workflow-connector-editor,
.workflow-modal .workflow-node-editor { margin: 12px 14px 0; padding: 14px; border-radius: 7px; }
.workflow-step-config { display: grid; grid-template-columns: minmax(200px, 1fr) minmax(210px, 1fr) minmax(150px, .55fr) minmax(220px, .8fr); align-items: end; gap: 10px; }
.workflow-parallel-status { min-height: 40px; display: grid; align-content: center; padding: 6px 9px; border-left: 3px solid #9aaab0; background: #f1f3f4; }
.workflow-parallel-status.active { border-left-color: var(--cde-teal); background: #e9f4f5; }
.workflow-parallel-status span,
.workflow-parallel-status strong { display: block; }
.workflow-parallel-status span { color: #738188; font-size: 7px; text-transform: uppercase; }
.workflow-parallel-status strong { margin-top: 2px; color: #36545c; font-size: 9px; }
.workflow-phase-rule { padding: 5px 8px; border-left: 3px solid #7d969d; color: #66747b; background: #fff; font-size: 8px; }

.workflow-advanced-canvas { margin: 12px 14px 0; border: 1px solid #d8dfe2; border-radius: 7px; background: #fff; }
.workflow-advanced-canvas > summary { min-height: 48px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 12px; cursor: pointer; list-style: none; }
.workflow-advanced-canvas > summary::-webkit-details-marker { display: none; }
.workflow-advanced-canvas > summary span strong,
.workflow-advanced-canvas > summary span small { display: block; }
.workflow-advanced-canvas > summary span strong { color: #2f3e46; font-size: 10px; }
.workflow-advanced-canvas > summary span small { margin-top: 3px; color: #7a868d; font-size: 8px; }
.workflow-advanced-canvas > summary b { color: var(--cde-teal-dark); font-size: 8px; }
.workflow-advanced-canvas[open] > summary { border-bottom: 1px solid #dfe4e7; }
.workflow-advanced-canvas[open] > summary b { font-size: 0; }
.workflow-advanced-canvas[open] > summary b::after { content: "Schließen"; font-size: 8px; }
.workflow-advanced-canvas .workflow-designer-preview { border: 0; border-radius: 0; }
.workflow-free-node.parallel { border-top-color: #2f8b62; }

.workflow-savebar {
  position: sticky;
  bottom: 0;
  z-index: 15;
  min-height: 64px;
  margin-top: 12px;
  padding: 10px 18px;
  border-top: 1px solid #dce2e5;
  background: rgba(255, 255, 255, .97);
  backdrop-filter: blur(14px);
}

.version-run-steps { display: grid; gap: 10px; }
.run-stage { overflow: hidden; border: 1px solid #d9e0e3; border-radius: 7px; background: #fafbfb; }
.run-stage > header { min-height: 42px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 7px 10px; border-bottom: 1px solid #e1e6e8; }
.run-stage > header span,
.run-stage > header strong { display: block; }
.run-stage > header span { color: #748188; font-size: 7px; font-weight: 850; text-transform: uppercase; }
.run-stage > header strong { margin-top: 2px; color: #33434c; font-size: 9px; }
.run-stage > header b { color: #6f7d84; font-size: 8px; font-weight: 750; }
.run-stage > .steps { gap: 0; padding: 7px; }
.run-stage > .steps .step { margin: 0; border-radius: 5px; }
.run-stage.parallel { border-color: #94b5bb; background: #f3f8f8; }
.run-stage.parallel > header { background: #e9f3f4; }
.run-stage.parallel > .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.run-stage.active { box-shadow: inset 3px 0 0 var(--cde-teal); }
.run-stage.active > header b { color: var(--cde-teal-dark); }

@media (max-width: 850px) {
  .modal-backdrop:has(.workflow-modal) { padding: 0; }
  .modal-panel.workflow-modal { width: 100vw; height: 100vh; max-height: none; border: 0; border-radius: 0; }
  .workflow-meta-bar { grid-template-columns: 1fr 1fr; padding: 10px 12px; }
  .workflow-meta-summary { grid-column: 1 / -1; min-height: 24px; grid-auto-flow: column; justify-content: space-between; justify-items: start; }
  .workflow-phase-builder,
  .workflow-modal .workflow-connector-editor,
  .workflow-modal .workflow-node-editor,
  .workflow-advanced-canvas { margin-right: 8px; margin-left: 8px; }
  .workflow-builder-toolbar { align-items: flex-start; }
  .workflow-builder-toolbar > div:first-child span { max-width: 420px; }
  .workflow-step-config { grid-template-columns: 1fr 1fr; }
  .workflow-parallel-status { grid-column: 1 / -1; }
  .run-stage.parallel > .steps { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .workflow-modal .modal-head { min-height: 56px; padding: 9px 12px; }
  .workflow-meta-bar { position: static; grid-template-columns: 1fr; }
  .workflow-meta-summary { grid-column: auto; }
  .workflow-builder-toolbar { display: grid; }
  .workflow-builder-toolbar > div:last-child { width: 100%; }
  .workflow-builder-toolbar > div:last-child button { flex: 1 1 0; }
  .workflow-phase-scroll { min-height: 330px; }
  .workflow-phase-rail { min-height: 330px; padding: 22px 16px; }
  .workflow-phase-column { width: 232px; min-width: 232px; }
  .workflow-step-config { grid-template-columns: 1fr; }
  .workflow-connection-choice { grid-template-columns: 1fr; }
  .workflow-builder-explainer { justify-content: flex-start; }
  .workflow-savebar { padding: 9px 12px; }
}

@media (max-width: 900px) {
  .workflow-studio { grid-template-columns: 190px minmax(0, 1fr); }
  .workflow-visual { padding-left: 28px; padding-right: 28px; }
  .workflow-step-editor { grid-template-columns: 28px minmax(0, 1fr) minmax(160px, .8fr); }
  .workflow-step-editor > .workflow-route-readout:nth-child(4) { grid-column: 2; }
  .workflow-step-editor > .workflow-route-readout:nth-child(5) { grid-column: 3; }
  .workflow-step-actions { grid-column: 3; justify-content: end; }
  .workflow-connection-choice { grid-template-columns: 130px repeat(2, minmax(120px, 1fr)); }
  .workflow-connection-choice.revision-choice { grid-template-columns: 130px repeat(3, minmax(118px, 1fr)); }
  .workflow-routing-explanation { margin-left: 136px; }
}

@media (max-width: 700px) {
  .execution-choice-grid { grid-template-columns: 1fr; }
  .workflow-commandbar { align-items: end; }
  .workflow-commandbar p { display: none; }
  .workflow-studio { min-height: 0; grid-template-columns: 1fr; }
  .workflow-library { max-height: 210px; overflow: auto; border-right: 0; border-bottom: 1px solid var(--cde-line); }
  .workflow-canvas-head { min-height: 66px; }
  .workflow-visual { min-height: 430px; padding: 44px 24px 24px; }
  .workflow-flow,
  .workflow-board { justify-content: flex-start; }
  .workflow-revision-lane { justify-content: flex-start; margin-left: 0; }
  .workflow-step-editor { grid-template-columns: 28px minmax(0, 1fr); }
  .workflow-step-editor > .field { grid-column: 2; }
  .workflow-step-editor > .workflow-route-readout { grid-column: 2 !important; }
  .workflow-step-actions { grid-column: 2; justify-content: end; }
  .workflow-designer-label span { display: none; }
  .workflow-connection-choice { grid-template-columns: 1fr; }
  .workflow-connection-choice.revision-choice { grid-template-columns: 1fr; }
  .workflow-connection-choice > span { margin-top: 4px; }
  .workflow-routing-explanation { margin-left: 0; }
}

@media (max-width: 840px) {
  .modal-backdrop:has(.issue-workspace-modal) { padding: 0; }
  .modal-panel.issue-workspace-modal {
    width: 100vw;
    height: 100vh;
    max-height: 100vh;
    border: 0;
    border-radius: 0;
  }
  .issue-workspace-modal .modal-head { min-height: 58px; }
  .issue-workspace-layout {
    display: block;
    overflow-y: auto;
  }
  .issue-document-area {
    overflow: visible;
    padding: 16px 12px 24px;
  }
  .issue-document-sheet {
    min-height: 520px;
    padding: 30px 24px 38px;
  }
  .issue-document-title,
  .issue-document-heading { font-size: 24px; }
  .issue-editor-page { min-height: 300px; padding: 20px; font-size: 15px; }
  .issue-properties {
    overflow: visible;
    padding: 22px 16px 30px;
    border-top: 1px solid #d7dde1;
    border-left: 0;
  }
  .issue-workspace-footer {
    overflow-x: auto;
    justify-content: flex-start;
  }
  .issue-workspace-footer > * { flex: 0 0 auto; }
  .issue-room-summary { min-height: 92px; padding: 14px 16px; }
  .issue-room-summary h1 { font-size: 17px; }
  .issue-room-summary p { display: none; }
  .issue-summary-badges { display: none; }
  .issue-room-grid,
  .issue-create-grid { display: block; overflow-y: auto; }
  .issue-room-main { overflow: visible; padding: 20px 14px 26px; }
  .issue-room-context,
  .issue-create-context { overflow: visible; border-top: 1px solid #d6dde0; border-left: 0; }
  .issue-create-main { overflow: visible; padding: 20px 14px; }
  .issue-create-intro { padding: 17px 16px 14px; }
  .issue-create-intro h1 { font-size: 17px; }
  .issue-create-intro p { display: none; }
  .issue-create-footer { position: sticky; bottom: 0; }
  .issue-create-footer > span { display: none; }
  .issue-create-footer .button-row { width: 100%; justify-content: flex-end; }
  .issue-composer-actions { align-items: flex-end; flex-direction: column; }
  .issue-composer-actions .button-row { width: 100%; overflow-x: auto; justify-content: flex-end; }
  .issue-inline-attachment { align-self: flex-start; }
}

@media (max-width: 480px) {
  .issue-document-title,
  .issue-document-heading { font-size: 21px; }
  .issue-editor-toolbar { flex-wrap: wrap; }
  .issue-room-summary h1 { white-space: normal; }
  .issue-thread-entry { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
  .issue-thread-avatar { width: 30px; height: 30px; }
  .issue-thread-entry:not(:last-child)::before { top: 30px; left: 14px; }
  .issue-thread-bubble > header { align-items: flex-start; flex-direction: column; gap: 4px; }
  .issue-composer > header { align-items: flex-start; flex-direction: column; }
  .issue-context-section.compact-fields { grid-template-columns: 1fr; }
  .workflow-node-editor { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .issue-file-row { grid-template-columns: 50px minmax(0, 1fr); }
  .issue-file-row .row-actions { grid-column: 2; justify-content: flex-start; }
  .issue-attachment-picker { grid-template-columns: 1fr; }
  .issue-attachment-picker span { grid-row: auto; }
}

/* Organisation, billing and unified review surfaces */
.brand-logo {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  object-fit: contain;
  border: 1px solid #d7dde1;
  border-radius: 6px;
  background: #fff;
}

.license-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.license-overview article {
  min-height: 112px;
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 17px 18px;
  border: 1px solid #d9dfe3;
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(29, 43, 52, .05);
}

.license-overview span,
.license-overview small { color: #6d7880; }
.license-overview span { font-size: 11px; font-weight: 750; }
.license-overview strong { color: #18232b; font-size: 25px; line-height: 1.1; }
.license-overview small { font-size: 10px; }

.user-management-panel,
.pending-invites,
.workspace-brand-panel {
  padding: 20px;
  border: 1px solid #d9dfe3;
  border-radius: 7px;
  background: #fff;
}

.pending-invites { margin-top: 14px; }
.user-management-panel > .section-head,
.pending-invites > .section-head,
.workspace-brand-panel > .section-head { padding: 0 0 15px; }
.user-management-panel .table-wrap { margin: 0 -20px -20px; border-top: 1px solid #e1e5e8; border-radius: 0 0 7px 7px; }
.user-management-panel table th:first-child,
.user-management-panel table td:first-child { padding-left: 20px; }
.user-management-panel table th:last-child,
.user-management-panel table td:last-child { padding-right: 20px; text-align: right; }
.inactive-user { opacity: .56; }

.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell > i {
  width: 30px;
  height: 30px;
  display: grid;
  flex: 0 0 30px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #52636d;
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.user-cell strong,
.user-cell small { display: block; }
.user-cell small { margin-top: 2px; color: #738088; font-size: 10px; }
.access-chip { display: inline-flex; padding: 4px 7px; border-radius: 4px; font-size: 9px; font-weight: 800; }
.access-chip.internal { color: #175d45; background: #e5f3ec; }
.access-chip.external { color: #665228; background: #f7f0df; }

.pending-invite-row {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 9px 2px;
  border-top: 1px solid #e4e8ea;
  color: #6e7b83;
  font-size: 10px;
}
.pending-invite-row strong,
.pending-invite-row small { display: block; }
.pending-invite-row strong { color: #26343c; font-size: 11px; }
.pending-invite-row small { margin-top: 3px; }

.invite-type-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; }
#inviteTeamFields[hidden],
#inviteProjectFields[hidden] { display: none; }
.invite-type-picker label { position: relative; }
.invite-type-picker input { position: absolute; opacity: 0; pointer-events: none; }
.invite-type-picker span {
  min-height: 78px;
  display: grid;
  align-content: center;
  gap: 5px;
  padding: 13px 15px;
  border: 1px solid #d5dce0;
  border-radius: 6px;
  background: #fafbfb;
  cursor: pointer;
}
.invite-type-picker input:checked + span { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: color-mix(in srgb, var(--brand) 7%, white); }
.invite-type-picker strong,
.invite-type-picker small { display: block; }
.invite-type-picker strong { font-size: 12px; }
.invite-type-picker small { color: #6f7b83; font-size: 10px; line-height: 1.4; }
.license-inline-note { min-height: 66px; display: grid; align-content: center; gap: 4px; padding: 10px 13px; border-left: 3px solid #3d8968; background: #f0f7f3; }
.license-inline-note strong { font-size: 11px; }
.license-inline-note span { color: #607168; font-size: 10px; }

.workspace-admin-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; gap: 16px; align-items: start; }
.brand-preview {
  min-height: 78px;
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px;
  border: 1px solid #d8dfe3;
  border-left: 5px solid var(--preview-brand);
  border-radius: 6px;
  background: #f8fafb;
}
.brand-preview > div:last-child strong,
.brand-preview > div:last-child span { display: block; }
.brand-preview > div:last-child strong { font-size: 14px; }
.brand-preview > div:last-child span { margin-top: 3px; color: #738088; font-size: 10px; }
.brand-logo-preview { width: 48px; height: 48px; display: grid; flex: 0 0 48px; place-items: center; overflow: hidden; border: 1px solid #d6dde1; border-radius: 6px; color: #fff; background: var(--preview-brand); }
.brand-logo-preview img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.color-field { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 7px; }
.color-field input[type="color"] { width: 48px; padding: 4px; }
.brand-logo-upload { min-height: 62px; display: grid; align-content: center; gap: 3px; padding: 10px 13px; border: 1px dashed #aebbc2; border-radius: 6px; cursor: pointer; }
.brand-logo-upload input { display: none; }
.brand-logo-upload span { color: var(--brand-dark); font-size: 11px; font-weight: 800; }
.brand-logo-upload small { color: #748088; font-size: 9px; }

.subscription-panel { padding: 20px; border: 1px solid #cad3d8; border-top: 4px solid var(--brand); border-radius: 7px; background: #fff; box-shadow: 0 7px 24px rgba(25, 42, 52, .07); }
.subscription-panel h2 { margin: 6px 0 15px; font-size: 17px; }
.subscription-total { display: flex; align-items: baseline; gap: 7px; font-size: 29px; }
.subscription-total small { color: #748088; font-size: 10px; font-weight: 650; }
.subscription-meter { height: 7px; overflow: hidden; margin: 18px 0; border-radius: 4px; background: #e6eaed; }
.subscription-meter span { height: 100%; display: block; background: var(--brand); }
.subscription-panel dl { margin: 0 0 18px; }
.subscription-panel dl > div { display: flex; justify-content: space-between; gap: 15px; padding: 9px 0; border-top: 1px solid #e4e8ea; }
.subscription-panel dt { color: #6f7b83; font-size: 10px; }
.subscription-panel dd { margin: 0; font-size: 10px; font-weight: 800; }
.subscription-panel .btn { width: 100%; }

.issue-delete-action { width: 100%; min-height: 36px; border: 1px solid #e1c4c0; border-radius: 5px; color: #9b3e36; background: #fff; font-size: 9px; font-weight: 800; }
.issue-delete-action:hover { background: #fff5f4; }

@media (max-width: 1000px) {
  .license-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-admin-layout { grid-template-columns: 1fr; }
}

@media (max-width: 650px) {
  .license-overview,
  .invite-type-picker { grid-template-columns: 1fr; }
  .license-overview article { min-height: 92px; }
  .pending-invite-row { align-items: flex-start; flex-direction: column; gap: 4px; }
  .workspace-brand-panel,
  .subscription-panel,
  .user-management-panel,
  .pending-invites { padding: 15px; }
  .user-management-panel .table-wrap { margin: 0 -15px -15px; }
}

/* Product workspace refinement */
body {
  color: #17202a;
  background: #f4f6f8;
  font-size: 14px;
}

.global-header {
  min-height: 64px;
  padding: 9px 24px;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 1px 0 rgba(20, 32, 43, .08);
  backdrop-filter: saturate(160%) blur(22px);
}

.global-nav { gap: 3px; }
.global-nav button {
  min-height: 40px;
  padding: 8px 13px;
  color: #52606c;
  font-size: 13px;
  font-weight: 650;
}
.global-nav button.active { color: #0a5f78; background: #eaf4f5; }

.personal-work {
  margin: 0 0 30px;
  padding: 22px;
  border: 1px solid #dce3e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 28px rgba(31, 45, 57, .05);
}
.personal-work > .home-section-head { margin-bottom: 16px; }
.task-board { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.task-column { border-radius: 7px; box-shadow: 0 2px 8px rgba(22, 34, 44, .035); }
.task-row { min-height: 74px; }
.task-row strong { font-size: 13px; }
.task-row small { font-size: 11px; line-height: 1.45; white-space: normal; }

.project-tabs {
  overflow: visible;
  align-items: stretch;
}
.project-more-menu {
  position: relative;
  flex: 0 0 auto;
  align-self: stretch;
}
.project-more-menu > summary {
  min-height: 46px;
  display: flex;
  align-items: center;
  padding: 11px 25px 10px 14px;
  border-bottom: 3px solid transparent;
  color: #5e6b75;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  list-style: none;
}
.project-more-menu > summary::-webkit-details-marker { display: none; }
.project-more-menu > summary::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 20px;
  width: 6px;
  height: 6px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: rotate(45deg);
}
.project-more-menu > summary.active { color: var(--brand); border-bottom-color: var(--brand); }
.project-more-menu > div {
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  right: 0;
  width: 210px;
  display: grid;
  gap: 2px;
  padding: 7px;
  border: 1px solid #d8e0e5;
  border-radius: 7px;
  background: rgba(255, 255, 255, .98);
  box-shadow: 0 18px 46px rgba(20, 34, 45, .17);
  backdrop-filter: blur(18px);
}
.project-more-menu > div button {
  width: 100%;
  min-height: 40px;
  padding: 9px 11px;
  border: 0;
  border-radius: 5px;
  text-align: left;
}
.project-more-menu > div button.active { background: #eaf4f5; }

.plan-explorer.review-focus {
  grid-template-columns: minmax(0, 1fr);
  min-height: calc(100vh - 224px);
}
.plan-explorer.review-focus > .plan-register-pane,
.plan-explorer.review-focus > .plan-files-pane,
.plan-explorer.review-focus > .pane-resizer { display: none; }
.plan-explorer.review-focus > .plan-inspector {
  grid-column: 1;
  grid-row: 1;
  max-height: none;
  overflow: visible;
  background: #fff;
}
.plan-explorer.review-focus .inspector-title {
  position: sticky;
  top: 109px;
  z-index: 11;
  min-height: 56px;
  padding: 10px 16px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(18px);
}
.plan-explorer.review-focus .quicklook-media {
  height: calc(100vh - 258px);
  min-height: 520px;
  border-bottom: 1px solid #dfe5e9;
  background: #e9edf0;
}
.plan-explorer.review-focus .quicklook-media iframe,
.plan-explorer.review-focus .quicklook-media img { width: 100%; height: 100%; object-fit: contain; }
.plan-explorer.review-focus .document-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px 20px;
  padding: 14px 16px;
}
.plan-explorer.review-focus .document-meta > div { display: block; min-width: 0; }
.plan-explorer.review-focus .document-meta dd { text-align: left; margin-top: 5px; white-space: normal; overflow-wrap: anywhere; }
.plan-explorer.review-focus .document-meta dd small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.4; }
.document-meta .pill { white-space: normal; }
.plan-explorer.review-focus .plan-inspector-body { min-height: 230px; padding: 18px; }
.plan-explorer.review-focus .inspector-actions { padding: 16px; }
.review-back { min-width: 98px; }

.review-decision-context {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 3px 12px;
  padding: 13px 15px;
  border: 1px solid #cddde2;
  border-left: 4px solid var(--brand);
  border-radius: 6px;
  background: #f3f8f9;
}
.review-decision-context > span {
  grid-row: 1 / span 2;
  align-self: center;
  padding: 5px 7px;
  border-radius: 4px;
  color: #0e6470;
  background: #dceff0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.review-decision-context strong { overflow: hidden; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.review-decision-context small { color: #617079; font-size: 11px; }
.decision-options {
  overflow: hidden;
  border: 1px solid #d8e0e4;
  border-radius: 6px;
  background: #fff;
}
.decision-options > summary {
  min-height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 11px 14px;
  cursor: pointer;
  list-style: none;
}
.decision-options > summary::-webkit-details-marker { display: none; }
.decision-options > summary strong,
.decision-options > summary small { display: block; }
.decision-options > summary strong { font-size: 12px; }
.decision-options > summary small { margin-top: 3px; color: #6d7880; font-size: 10px; }
.decision-options > summary b { color: var(--brand); font-size: 11px; }
.decision-options-body { display: grid; gap: 15px; padding: 15px; border-top: 1px solid #e0e5e8; background: #fafbfc; }
.decision-form { gap: 16px; }
.decision-actions {
  position: sticky;
  z-index: 10;
  bottom: -20px;
  margin: 0 -20px -20px;
  padding: 14px 20px;
  border-top: 1px solid #d8e0e5;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 -10px 26px rgba(22, 36, 47, .08);
  backdrop-filter: blur(18px);
}
.decision-actions button { min-height: 42px; }
.decision-actions button:disabled { cursor: wait; opacity: .55; }
.approve-comment { border: 1px solid #579487; color: #1d6657; background: #e8f4f0; }
.approve-comment:hover { background: #d9ede7; }

.execution-flow {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 28px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 13px;
  border: 1px solid #d8e1e5;
  border-radius: 6px;
  background: #f7f9fa;
}
.execution-flow > span { min-width: 0; display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 2px 9px; align-items: center; }
.execution-flow b { grid-row: 1 / span 2; width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; color: #fff; background: #75838d; font-size: 11px; }
.execution-flow .done b { background: #2f8660; }
.execution-flow small { color: #6b7881; font-size: 9px; text-transform: uppercase; }
.execution-flow strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.execution-flow > i { color: #7c8991; font-size: 18px; font-style: normal; text-align: center; }

.history-toolbar {
  min-height: 54px;
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}
.history-toolbar label { width: min(520px, 100%); display: grid; gap: 5px; color: #586773; font-size: 11px; font-weight: 750; }
.history-toolbar input { min-height: 40px; background: #fff; }
.history-toolbar small { padding-bottom: 10px; color: #707c85; }
.history-row.actionable { cursor: pointer; }
.history-row.actionable:hover { background: #eef6f7; }
.history-row td { font-size: 12px; }
.history-row td:first-child { color: #65737e; white-space: nowrap; }

.invite-summary { display: grid; gap: 4px; margin: 14px 0 20px; padding: 14px; border-left: 4px solid var(--brand); background: #f2f7f9; }
.invite-summary strong { font-size: 14px; }
.invite-summary span, .invite-summary small { color: #63717b; }
.auth-link {
  min-height: 38px;
  display: inline-grid;
  place-items: center;
  padding: 7px 4px;
  color: var(--brand);
  background: transparent;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  text-decoration: none;
}
.auth-link:hover { text-decoration: underline; }

@media (max-width: 1120px) {
  .task-board { grid-template-columns: 1fr; }
  .plan-explorer.review-focus { grid-template-columns: 1fr; }
  .plan-explorer.review-focus > .plan-inspector { grid-column: 1; grid-row: 1; }
}

@media (max-width: 760px) {
  .global-header { padding: 8px 12px; }
  .global-nav { width: 100%; overflow-x: auto; }
  .global-nav button { min-height: 44px; padding: 9px 12px; }
  .personal-work { padding: 14px; }
  .project-tabs { overflow-x: auto; overflow-y: visible; }
  .project-more-menu > div { position: fixed; top: 150px; right: 12px; left: 12px; width: auto; }
  .plan-row-status span { display: inline; }
  .plan-list-head,
  .plan-row { grid-template-columns: minmax(0, 1fr) minmax(90px, auto) 42px; }
  .plan-list-head span:nth-child(2) { display: block; }
  .plan-explorer.review-focus .quicklook-media { height: 66vh; min-height: 420px; }
  .plan-explorer.review-focus .document-meta { grid-template-columns: 1fr 1fr; }
  .review-decision-context { grid-template-columns: 1fr; }
  .review-decision-context > span { grid-row: auto; justify-self: start; }
  .decision-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .decision-actions > * { min-width: 0; }
  .decision-actions .approve-comment { grid-column: 1 / -1; }
  .execution-flow { grid-template-columns: 1fr; }
  .execution-flow > i { transform: rotate(90deg); }
  .history-toolbar { align-items: stretch; flex-direction: column; }
  .history-toolbar small { padding: 0; }
}
.record-approval { display: flex; align-items: center; gap: 8px; min-width: 0; }
.record-approval small, .plan-row-status small { display: block; margin-top: 3px; color: #52645c; font-size: 11px; line-height: 1.35; }
.execution-history { padding: 18px 0; border-top: 1px solid #dfe5e8; }
.execution-history h3 { margin: 0 0 14px; font-size: 14px; }
.execution-entry { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #edf0f2; }
.execution-entry > div { min-width: 0; }
.execution-entry strong { display: block; font-size: 13px; }
.execution-entry small { display: block; margin-top: 5px; color: #66737d; font-size: 11px; }
.execution-entry p { margin: 8px 0 0; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 13px; }
.execution-check { flex: 0 0 24px; width: 24px; height: 24px; border-radius: 50%; background: #e5f2eb; color: #226d49; text-align: center; line-height: 24px; }
.viewer-review .execution-history { padding: 18px; }
.viewer-review .run-stage.parallel > .steps { grid-template-columns: minmax(0, 1fr); }
.viewer-review .run-stage > header { flex-wrap: wrap; gap: 6px; }
.run-stage .step > div { min-width: 0; overflow-wrap: anywhere; }
.run-stage .step > .pill { white-space: normal; }
.run-stage > header b { white-space: normal; text-align: right; }
.decision-route-summary { grid-column: 1 / -1; margin: 7px 0 0; color: #6d4b13; font-size: 12px; line-height: 1.5; }
.decision-form .error { margin: 0; }
.modal-actions { position: sticky; bottom: -20px; background: #fff; }
@media (max-width: 600px) {
  .version-run-steps, .viewer-review .version-run-steps { padding-left: 0; }
  .version-run > summary { flex-wrap: wrap; }
  .version-run > summary > .pill { max-width: 100%; margin-left: 20px; }
  .version-run > summary > span:first-child { flex-basis: calc(100% - 30px); }
  .run-stage > header { flex-wrap: wrap; gap: 5px; }
  .run-stage > header b { text-align: left; }
  .plan-explorer.review-focus .inspector-title { position: static; }
  .plan-explorer.review-focus .document-meta { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .step-attachment { grid-template-columns: minmax(0, 1fr) auto; }
  .step-attachment strong { white-space: normal; }
}
.execution-version { color: #526273; font-size: 13px; }
.execution-conditions { border-left: 3px solid #be881d; padding: 12px 16px; background: #fff9eb; font-size: 13px; }
.execution-conditions p { white-space: pre-wrap; overflow-wrap: anywhere; }
.execution-conditions label { display: flex; align-items: flex-start; gap: 8px; line-height: 1.5; }
.execution-conditions input { width: 17px; min-width: 17px; height: 17px; margin-top: 2px; }
