@font-face {
  font-family: "Avenir Next";
  src: local("Avenir Next Regular"), local("AvenirNext-Regular");
  font-style: normal;
  font-weight: 400;
  font-display: block;
}

@font-face {
  font-family: "Avenir Next";
  src: local("Avenir Next Medium"), local("AvenirNext-Medium");
  font-style: normal;
  font-weight: 500;
  font-display: block;
}

@font-face {
  font-family: "Avenir Next";
  src: local("Avenir Next Demi Bold"), local("AvenirNext-DemiBold");
  font-style: normal;
  font-weight: 600;
  font-display: block;
}

:root {
  color-scheme: light;
  --surface-page: var(--nb-page,#f7f3ec);
  --surface-sidebar-top: #3d4c45;
  --surface-sidebar-bottom: #2f3d36;
  --surface-card-center: var(--nb-surface,#fffdfc);
  --surface-card-middle: var(--nb-surface,#fcf8f2);
  --surface-card-edge: var(--nb-surface,#f8f1e6);
  --surface-nav-active: #f2b58e;
  --surface-nav-hover: #4b5d54;
  --surface-row-hover: rgba(242, 181, 142, .14);
  --text-primary: var(--nb-text,#29342f);
  --text-helper: var(--nb-muted,#5e6760);
  --text-secondary: var(--text-helper);
  --border-card: var(--nb-line,rgba(191, 174, 150, .78));
  --border-subtle: var(--nb-line,#dccfbe);
  --border-row: var(--nb-line,#e8ddcf);
  --divider: var(--nb-line,#d9caba);
  --accent: #7a5ac8;
  --accent-soft: var(--nb-active,#6c9883);
  --ai-helper-idle-opacity: .40;
  --success: #218b5b;
  --warning: #d46d1c;
  --danger: #c85243;
  --info: #557ea4;
  --waiting: #7a5ac8;
  --font-family: "Avenir Next";
  --number-kpi-tracking: -1.4px;
  --number-kpi-leading-one-adjust: -6px;
  --sidebar-width: 240px;
  --shell-bottom-inset: 20px;
  --page-top: 48px;
  --page-pad-left: 33px;
  --page-pad-right: 47px;
  --card-radius: 7px;
  --metric-gap: 17px;
  --panel-gap: 16px;
  --metric-height: 300px;
  --panel-height: 467px;
  /* Shared form-control standard for existing and future Cockpit pages. */
  --form-control-width: 232px;
  --form-control-height: 36px;
  --form-control-padding: 7px 10px;
  --form-control-font-size: 15px;
  --form-label-font-size: 13px;
  --form-control-surface: var(--nb-surface,#fffdfc);
  --form-control-border: var(--nb-line,#dccfbe);
  --form-control-focus: #3d4c45;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  background: var(--surface-page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--surface-page);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; }

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: 100vh;
  background: var(--surface-page);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid var(--border-subtle);
  background: linear-gradient(180deg, var(--surface-sidebar-top) 0%, #34433c 54%, var(--surface-sidebar-bottom) 100%);
}

.brand {
  position: absolute;
  top: 36px;
  left: 21px;
  display: flex;
  align-items: center;
  gap: 11px;
  width: max-content;
  color: #fffaf2;
  line-height: 1.05;
}

.brand img { display: block; width: 34px; height: 34px; flex: 0 0 34px; }
.brand div { min-width: 0; }
.brand span,
.brand strong { display: block; }

.brand span { font-size: 16px; font-weight: 400; letter-spacing: 0; }

.brand strong {
  color: #f7c7a7;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0;
}

.nav-list {
  position: absolute;
  top: 126px;
  left: 9px;
  display: grid;
  width: 214px;
  gap: 16px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  width: 214px;
  height: 56px;
  padding: 0 17px;
  gap: 22px;
  border: 0;
  border-radius: 6px;
  color: #fffaf2;
  font-size: 17px;
  font-weight: 400;
  line-height: 1;
  white-space: nowrap;
}

.nav-link:hover { background: var(--surface-nav-hover); }

.nav-link.active { background: var(--surface-nav-active); color: var(--text-primary); }

.nav-link.active::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 3px;
  border-radius: 3px;
  background: #f8e4d3;
}

.nav-icon {
  width: 27px;
  height: 27px;
  flex: 0 0 27px;
  color: #fffaf2;
}

.nav-link.active .nav-icon { color: var(--text-primary); }

.nav-link[hidden] { display: none; }

.settings {
  position: absolute;
  right: 19px;
  bottom: 80px;
  left: 19px;
  width: auto;
  min-height: 77px;
  padding: 20px 7px 0;
  gap: 22px;
  border-top: 1px solid rgba(255, 250, 242, .28);
  border-radius: 0;
}

.dashboard {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: var(--page-top) var(--page-pad-right) 95px var(--page-pad-left);
  background: radial-gradient(circle at 72% 8%, rgba(242, 181, 142, .24) 0%, transparent 30%), radial-gradient(circle at 12% 92%, rgba(108, 152, 131, .11) 0%, transparent 28%), var(--nb-page,#f7f3ec);
}

.page-view[hidden] { display: none !important; }

.health-page {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: var(--page-top) var(--page-pad-right) 96px var(--page-pad-left);
  background: radial-gradient(circle at 72% 8%, rgba(242, 181, 142, .24) 0%, transparent 30%), radial-gradient(circle at 12% 92%, rgba(108, 152, 131, .11) 0%, transparent 28%), var(--nb-page,#f7f3ec);
}

.workflow-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  background: var(--surface-page);
}

.workflow-editor-frame {
  display: block;
  width: 100%;
  min-height: 100vh;
  border: 0;
  background: var(--surface-page);
}

.health-breadcrumb {
  display: flex;
  align-items: center;
  min-height: 20px;
  gap: 10px;
  color: var(--text-helper);
  font-size: 15px;
  line-height: 1;
}

.health-back { display: inline-flex; align-items: center; gap: 5px; }
.health-back:hover { color: var(--text-primary); }
.health-back-icon { width: 16px; height: 16px; }
.health-breadcrumb-current { color: var(--text-primary); }

.health-title {
  margin: 13px 0 0;
  color: var(--text-primary);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.55px;
}

.health-summary {
  display: grid;
  grid-template-columns: 286px 1px minmax(0, 1fr) 235px;
  align-items: center;
  min-height: 198px;
  margin-top: 18px;
  padding: 22px 28px;
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: radial-gradient(circle at 35% 46%, var(--surface-card-center) 0%, var(--surface-card-middle) 48%, var(--surface-card-edge) 100%);
  box-shadow: inset 0 0 38px rgba(0, 28, 62, .14);
}

.health-score-block {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  column-gap: 18px;
}

.health-summary-icon { width: 52px; height: 52px; color: var(--text-primary); }
.health-score-label { color: var(--text-primary); font-size: 20px; line-height: 1; }

.health-score-number {
  display: flex;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: center;
  margin-top: 8px;
  color: var(--text-primary);
  font-size: 92px;
  font-weight: 600;
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "lnum" 1, "pnum" 1;
  letter-spacing: var(--number-kpi-tracking);
  line-height: .92;
  text-shadow: 0 0 24px rgba(143, 182, 239, .16);
}

.health-score-number-tail { margin-inline-start: var(--number-kpi-leading-one-adjust); }
.health-summary-divider { width: 1px; height: 132px; background: var(--nb-line,#d9caba); }
.health-summary-copy { padding: 0 38px; }

.health-operational {
  display: flex;
  align-items: center;
  gap: 11px;
  color: var(--text-primary);
  font-size: 20px;
  line-height: 1;
}

.health-dot { display: inline-block; width: 16px; height: 16px; flex: 0 0 16px; border-radius: 50%; background: var(--success); }

.health-summary-message {
  max-width: 590px;
  margin: 17px 0 0;
  color: var(--text-helper);
  font-size: 18px;
  line-height: 1.42;
}

.health-summary-meta { margin-top: 14px; color: var(--text-helper); font-size: 15px; line-height: 1; }
.health-summary-action { display: flex; justify-content: flex-end; }

.health-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  gap: 10px;
  border: 0;
  border-radius: 6px;
  background: var(--surface-nav-active);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 15px;
  font-weight: 500;
  cursor: not-allowed;
}

.health-refresh:not([aria-disabled="true"]):hover { background: #e8a679; }
.health-refresh-icon { width: 18px; height: 18px; }

.health-section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  margin-top: 24px;
}

.health-section-head h2 { margin: 0; color: var(--text-primary); font-size: 20px; font-weight: 400; line-height: 1; }
.health-section-head span { color: var(--text-helper); font-size: 15px; line-height: 1; }

.health-check-list {
  overflow: hidden;
  margin-top: 14px;
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: linear-gradient(150deg, var(--nb-surface,#fffdfc) 0%, var(--nb-surface,#fcf8f2) 62%, var(--nb-surface,#f8f1e6) 100%);
}

.health-check-item { border-bottom: 1px solid var(--border-row); }
.health-check-item:last-child { border-bottom: 0; }

.health-check-toggle {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 224px 142px 22px;
  align-items: center;
  width: 100%;
  min-height: 84px;
  padding: 0 24px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: 16px;
  text-align: left;
  cursor: pointer;
}

.health-check-toggle:hover { background: var(--surface-row-hover); }
.health-check-icon { width: 34px; height: 34px; color: var(--text-primary); }
.health-check-name { display: block; color: var(--text-primary); font-size: 17px; line-height: 1.15; }
.health-check-finding { display: block; margin-top: 5px; color: var(--text-helper); font-size: 15px; line-height: 1.1; }
.health-coverage { color: var(--text-primary); font-size: 15px; line-height: 1.2; }
.health-coverage > span { display: block; margin-top: 4px; color: var(--text-helper); font-size: 14px; }
.health-check-state { justify-self: end; text-align: right; }
.health-state-line { display: inline-flex; align-items: center; justify-content: flex-end; gap: 8px; color: var(--text-primary); font-size: 15px; }
.health-state-line .health-dot { width: 12px; height: 12px; flex-basis: 12px; }
.health-check-time { display: block; margin-top: 5px; color: var(--text-helper); font-size: 14px; }
.health-chevron { width: 19px; height: 19px; justify-self: end; transition: transform .16s ease; }
.health-check-toggle[aria-expanded="true"] .health-chevron { transform: rotate(180deg); }

.health-check-detail {
  display: grid;
  grid-template-columns: 1.25fr 1fr auto;
  gap: 28px;
  padding: 20px 24px 22px 72px;
  border-top: 1px solid var(--border-row);
  background: rgba(248, 241, 230, .86);
}

.health-check-detail[hidden] { display: none; }
.health-detail-label { color: var(--text-helper); font-size: 14px; line-height: 1; }
.health-detail-value { margin-top: 6px; color: var(--text-primary); font-size: 15px; line-height: 1.35; }
.health-detail-action { align-self: center; color: var(--accent-soft); font-size: 15px; line-height: 1.25; white-space: nowrap; }
.health-detail-action small { display: block; margin-top: 4px; color: var(--text-helper); font-size: 14px; }

.health-gate-note {
  display: flex;
  align-items: center;
  min-height: 56px;
  margin-top: 8px;
  padding: 0 20px;
  gap: 14px;
  border-top: 0;
  border-bottom: 0;
  color: var(--text-helper);
  font-size: 15px;
  line-height: 1.3;
}

.health-gate-icon { width: 24px; height: 24px; flex: 0 0 24px; color: var(--accent-soft); }

.page-header h1 {
  margin: 0;
  color: var(--text-primary);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.55px;
}

.dashboard-header { display:flex; align-items:flex-end; justify-content:space-between; gap:18px; }
.dashboard-header p { max-width:720px; margin:8px 0 0; color:var(--text-helper); font-size:16px; line-height:1.42; }

.metric-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--metric-gap);
  height: var(--metric-height);
  margin-top: 25px;
}

.dashboard-metric-grid { grid-template-columns:repeat(4, minmax(0, 1fr)); height:auto; }
.dashboard-metric-grid .metric-card { min-width:0; padding-inline:24px; }

.metric-card,
.work-panel {
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: var(--card-radius);
  background: radial-gradient(circle at 54% 48%, var(--surface-card-center) 0%, var(--surface-card-middle) 48%, var(--surface-card-edge) 100%);
  box-shadow: 0 10px 30px var(--nb-shadow08,rgba(72, 55, 35, .08));
}

.metric-card {
  display: grid;
  grid-template-rows: 70px 123px 1px 64px 42px;
  height: var(--metric-height);
  padding: 0 42px;
  color: var(--text-primary);
  text-align: center;
  transition: border-color .16s ease, filter .16s ease;
}

.metric-card:hover,
.metric-card:focus-within {
  border-color: var(--border-card);
}

.metric-card:hover {
  filter: brightness(1.05);
}

.metric-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 19px;
  padding-top: 12px;
}

.metric-heading h2,
.panel-header h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.dashboard-panel-scope { margin:4px 0 0; color:var(--text-helper); font-size:13px; line-height:1.25; }

.metric-icon {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  color: var(--text-primary);
}

.metric-value {
  display: flex;
  align-items: center;
  justify-content: center;
  padding-top: 5px;
  color: var(--text-primary);
  font-size: 96px;
  font-weight: 600;
  font-variant-numeric: lining-nums proportional-nums;
  font-feature-settings: "lnum" 1, "pnum" 1;
  letter-spacing: var(--number-kpi-tracking);
  line-height: 1;
}

.metric-value-tail {
  margin-inline-start: var(--number-kpi-leading-one-adjust);
}

.metric-divider {
  height: 1px;
  background: var(--divider);
  opacity: .92;
}

.status {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  margin: 0;
  gap: 10px;
  color: var(--text-primary);
  font-size: 18px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  white-space: normal;
}

.status-group {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  gap: 10px;
}

.status-group > span:last-child { min-width: 0; overflow-wrap: anywhere; }

.status-dot {
  display: inline-block;
  width: 17px;
  height: 17px;
  flex: 0 0 17px;
  border-radius: 50%;
}

.status-dot.success { background: var(--success); }
.status-dot.warning { background: var(--warning); }
.status-dot.danger { background: var(--danger); }
.status-dot.info { background: var(--info); }
.status-dot.waiting { background: var(--waiting); }
.separator { margin: 0 2px; padding: 0; color: var(--text-primary); }

.metric-meta {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  margin: 0;
  padding-top: 3px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1;
}

.work-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.07fr);
  gap: var(--panel-gap);
  height: var(--panel-height);
  margin-top: 21px;
}

.dashboard-work-grid--single { grid-template-columns:1fr; }

.work-panel {
  display: flex;
  min-width: 0;
  height: var(--panel-height);
  flex-direction: column;
}

.work-panel[hidden] { display: none !important; }

.panel-header {
  display: flex;
  align-items: center;
  min-height: 73px;
  padding: 0 27px;
  gap: 19px;
  border-bottom: 1px solid var(--border-subtle);
}

.panel-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  color: var(--text-primary);
}

.work-list {
  display: block;
  margin: 0;
  padding: 0;
  list-style: none;
}

.work-list li {
  display: grid;
  grid-template-columns: 66px minmax(0, 1fr) 150px;
  align-items: center;
  min-height: 81px;
  padding: 0 25px 0 18px;
  gap: 18px;
  border-bottom: 1px solid var(--border-row);
  transition: background-color .16s ease;
}

.work-list li:hover { background: var(--surface-row-hover); }

#freigaben .work-list li { grid-template-columns: 66px minmax(0, 1fr) 138px; }

.portrait {
  display: block;
  width: 64px;
  height: 64px;
  border: 0;
  border-radius: 50%;
  object-fit: cover;
  object-position: center 24%;
  background: var(--nb-page,#eadfd0);
}

.work-copy {
  display: block;
  min-width: 0;
}

.work-copy strong {
  display: block;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.18;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.work-copy span {
  display: block;
  margin-top: 4px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.05;
  white-space: nowrap;
}

.due {
  display: block;
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

.due strong {
  display: block;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.05;
}

.due span {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  margin-top: 5px;
  gap: 8px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1;
}

.due .status-dot {
  width: 12px;
  height: 12px;
  flex-basis: 12px;
}

.panel-action {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 68px;
  margin-top: auto;
  gap: 15px;
  border-top: 1px solid var(--nb-line,rgba(220, 207, 190, .82));
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1;
}

.panel-action:hover { color: var(--text-primary); }

.task-avatar,
.task-queue-icon {
  display: grid;
  width: 64px;
  height: 64px;
  place-items: center;
  border-radius: 50%;
  background: #ede7fb;
  color: #6245b1;
}

.task-avatar svg,
.task-queue-icon svg { width: 31px; height: 31px; }

.intake-work-item { cursor: pointer; }
.intake-work-item:focus-visible { outline: 3px solid var(--accent-soft); outline-offset: -3px; }

.tasks-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  padding: 46px var(--page-pad-right) 95px var(--page-pad-left);
  background: radial-gradient(circle at 72% 8%, rgba(242, 181, 142, .24) 0%, transparent 30%), radial-gradient(circle at 12% 92%, rgba(108, 152, 131, .11) 0%, transparent 28%), var(--nb-page,#f7f3ec);
}

.tasks-header { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; }
.tasks-header p { max-width:720px; margin:8px 0 0; color:var(--text-helper); font-size:16px; line-height:1.42; }
.tasks-mode { display:inline-flex; flex:0 0 auto; align-items:center; min-height:32px; padding:6px 10px; border:1px solid var(--border-card); border-radius:5px; background:#fff8e9; color:#815300; font-size:14px; font-weight:600; }
.tasks-role-picker { display:grid; flex:0 0 auto; gap:4px; min-width:154px; color:var(--text-helper); font-size:12px; font-weight:700; }
.tasks-role-picker select { min-height:34px; padding:6px 28px 6px 9px; border:1px solid var(--border-card); border-radius:5px; color:var(--text-primary); background:var(--nb-surface,#fffdfc); font:inherit; font-size:14px; font-weight:600; }
.tasks-role-picker select:focus-visible { outline:3px solid var(--accent-soft); outline-offset:2px; }
.context-page { padding: var(--page-top) 52px 90px; }
.context-page-card { max-width: 1030px; margin-top: 26px; padding: 26px; border: 1px solid var(--border-card); border-radius: 8px; background: var(--surface-card); box-shadow: var(--shadow-card); }
.context-page-kicker { display: inline-block; color: var(--text-helper); font-size: 13px; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.context-page-card h2 { margin: 9px 0 0; color: var(--text-primary); font-size: 23px; }
.context-page-card > p { max-width: 820px; margin: 9px 0 0; color: var(--text-helper); font-size: 16px; line-height: 1.5; }
.context-page-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 23px; }
.context-page-facts article { min-height: 108px; padding: 16px; border: 1px solid var(--border-card); border-radius: 6px; background: var(--surface-muted); }
.context-page-facts strong { display: block; color: var(--text-primary); font-size: 15px; }
.context-page-facts span { display: block; margin-top: 7px; color: var(--text-helper); font-size: 14px; line-height: 1.4; }
.tasks-layout { display:grid; grid-template-columns:minmax(310px,.78fr) minmax(0,1.22fr); gap:var(--panel-gap); margin-top:25px; height:720px; }
.task-queue,
.task-context { overflow:hidden; border:1px solid transparent; border-radius:var(--card-radius); background:radial-gradient(circle at 54% 48%,var(--surface-card-center) 0%,var(--surface-card-middle) 48%,var(--surface-card-edge) 100%); box-shadow:0 10px 30px var(--nb-shadow08,rgba(72,55,35,.08)); }
.task-panel-header { display:flex; align-items:center; min-height:88px; padding:0 24px; gap:16px; border-bottom:1px solid var(--border-subtle); }
.task-panel-header h2,.task-context h2 { margin:0; color:var(--text-primary); font-size:22px; font-weight:500; line-height:1.15; }
.task-panel-header p { margin:5px 0 0; color:var(--text-helper); font-size:14px; }
.task-queue-item { display:grid; grid-template-columns:48px minmax(0,1fr) auto; width:100%; min-height:88px; padding:12px 18px; align-items:center; gap:12px; border:0; border-bottom:1px solid var(--border-row); border-left:5px solid var(--accent); background:var(--nb-surface,#fffdfc); color:var(--text-primary); cursor:pointer; text-align:left; }
.task-queue-item:hover { background:var(--surface-row-hover); }
.task-queue-item:focus-visible,.task-open-button:focus-visible { outline:3px solid var(--accent-soft); outline-offset:3px; }
.task-queue-icon { width:44px; height:44px; }
.task-queue-icon svg { width:24px; height:24px; }
.task-queue-item .portrait { width:44px; height:44px; object-fit:cover; }
.task-queue-copy { min-width:0; }
.task-queue-copy strong { display:block; font-size:17px; font-weight:500; line-height:1.2; }
.task-queue-copy span { display:block; margin-top:4px; color:var(--text-helper); font-size:14px; }
.task-queue-count { min-width:30px; padding:5px 8px; border-radius:20px; background:#e2f0e6; color:#28523e; font-size:14px; font-weight:700; text-align:center; }
.task-queue-note { margin:0; padding:18px 22px; color:var(--text-helper); font-size:15px; line-height:1.45; }
.task-queue { overflow-y:auto; min-height:0; }
.task-queue-group-title { padding:20px 22px 12px; margin:0; font-size:17px; font-weight:500; }
.task-queue-item:not(.selected) { border-left-color:transparent; }
.task-queue-item.selected { background:var(--surface-row-hover); }
.task-context { display:flex; flex-direction:column; min-height:0; padding:0; }
.task-context > header { padding:28px 28px 0; flex-shrink:0; }
.task-title-row { display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.task-result-status { margin-top:13px; padding:4px 8px; border:1px solid var(--border-card); border-radius:5px; font-size:13px; color:var(--text-primary); background:#f1f3ef; }
.task-result-status[hidden] { display:none; }
.context-kicker { display:inline-flex; padding:4px 8px; border-radius:4px; background:#ede7fb; color:#5f479e; font-size:13px; font-weight:600; }
.task-context h2 { margin-top:13px; font-size:27px; }
.task-context header > p { max-width:650px; margin:9px 0 0; color:var(--text-helper); font-size:16px; line-height:1.45; }
.task-context-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:22px 0; }
.task-context-facts div { padding:12px; border:1px solid var(--border-card); border-radius:6px; background:var(--nb-surface,#fcf8f2); }
.task-context-facts dt { color:var(--text-helper); font-size:14px; }
.task-context-facts dd { margin:4px 0 0; color:var(--text-primary); font-size:15px; line-height:1.35; }
.task-tabs { display:flex; gap:2px; margin:22px 28px 0; border-bottom:1px solid var(--border-row); }
.task-tabs button { min-height:39px; padding:8px 12px; border:0; border-bottom:3px solid transparent; background:transparent; color:var(--text-helper); cursor:pointer; font-size:14px; font-weight:600; }
.task-tabs button:hover { color:var(--text-primary); background:var(--surface-row-hover); }
.task-tabs button[aria-selected="true"] { border-bottom-color:var(--accent); color:var(--text-primary); }
.task-tabs button:focus-visible { outline:3px solid var(--accent-soft); outline-offset:-3px; }
.task-tab-content { flex:1 1 auto; min-height:0; overflow:auto; padding:0 28px 4px; scrollbar-gutter:stable; }
.task-overview-note { padding:12px; border-left:4px solid var(--success); background:#f1f8f2; color:#31553f; font-size:14px; line-height:1.45; }
.task-overview-note strong { color:#214534; }
.task-role-section { margin-top:18px; padding:14px; border:1px solid var(--border-card); border-radius:6px; background:#fffaf2; }
.task-role-section h3 { margin:0; color:var(--text-primary); font-size:16px; }
.task-role-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:11px; }
.task-role-grid article { min-width:0; padding:11px; border:1px solid var(--border-card); border-radius:5px; background:var(--nb-surface,#fcf8f2); }
.task-role-grid h4 { margin:0; color:var(--text-primary); font-size:14px; }
.task-role-grid p { margin:4px 0 0; color:var(--text-helper); font-size:13px; line-height:1.4; }
.task-history-empty { display:grid; place-content:center start; min-height:270px; margin:0; padding:24px; border:1px dashed var(--border-card); border-radius:6px; background:var(--nb-surface,#fcf8f2); color:var(--text-helper); }
.task-history-empty h3 { margin:0; color:var(--text-primary); font-size:18px; }
.task-history-empty p { max-width:520px; margin:7px 0 0; font-size:14px; line-height:1.45; }
.task-entries-layout { display:grid; grid-template-columns:minmax(220px,.75fr) minmax(0,1.25fr); min-height:270px; }
.task-entry-list { padding:18px 16px 18px 0; border-right:1px solid var(--border-row); }
.task-entry-list h3,.task-entry-detail h3 { margin:0; color:var(--text-primary); font-size:18px; line-height:1.25; }
.task-entry-list > p,.task-entry-detail > p { margin:5px 0 0; color:var(--text-helper); font-size:14px; line-height:1.4; }
.task-entry-list > div { display:grid; gap:7px; margin-top:14px; }
.task-entry-row { width:100%; padding:9px 10px; border:1px solid var(--border-card); border-left:4px solid var(--accent); border-radius:5px; background:var(--nb-surface,#fffdfc); color:var(--text-primary); cursor:pointer; text-align:left; }
.task-entry-row.project { border-left-color:var(--warning); }
.task-entry-row.open { border-left-color:#819087; }
.task-entry-row[aria-pressed="true"] { border-color:var(--nb-active,#6c9883); box-shadow:0 0 0 1px var(--nb-active,#6c9883); }
.task-entry-row strong { display:block; font-size:14px; line-height:1.25; }
.task-entry-row span { display:block; margin-top:2px; color:var(--text-helper); font-size:12px; line-height:1.32; }
.task-entry-detail { min-width:0; padding:18px 0 18px 18px; }
.task-entry-facts { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:9px; margin-top:15px; }
.task-entry-fact { min-width:0; padding:9px; border:1px solid var(--border-card); border-radius:5px; background:var(--nb-surface,#fcf8f2); }
.task-entry-fact.wide { grid-column:1 / -1; }
.task-entry-fact span { display:block; color:var(--text-helper); font-size:12px; }
.task-entry-fact strong { display:block; margin-top:3px; color:var(--text-primary); font-size:14px; line-height:1.35; overflow-wrap:anywhere; }
.task-decision-options { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; margin-top:15px; }
.task-decision-option { display:flex; align-items:center; justify-content:center; min-width:0; height:44px; padding:0 10px; border:1px solid #c9ddcc; border-radius:5px; background:#edf5ef; color:#31553f; font:inherit; cursor:pointer; }
.task-decision-option strong { font-size:15px; font-weight:500; line-height:1.2; white-space:nowrap; }
.task-decision-option.continue { border-color:#c9ddcc; background:#edf5ef; color:#31553f; }
.task-decision-option.clarify { border-color:#e4cda5; background:#fff5e7; color:#73511b; }
.task-decision-option.stop { border-color:#cbd2cc; background:#f1f3ef; color:#4d5e54; }
.task-decision-option:hover { box-shadow:inset 0 0 0 1px currentColor; }
.task-decision-option:active { box-shadow:inset 0 0 0 2px currentColor; }
.task-decision-work { padding:18px 0; }
.task-decision-fields { display:grid; gap:8px; margin-top:18px; }
.task-decision-fields:empty { display:none; }
.task-decision-fields label { font-size:15px; font-weight:500; }
.task-decision-fields textarea,.task-decision-fields select { width:100%; min-width:0; padding:10px; border:1px solid var(--border-card); border-radius:5px; color:var(--text-primary); background:var(--nb-surface,#fffdfc); font:inherit; }
.task-decision-fields textarea { resize:vertical; min-height:80px; max-height:180px; }
.task-correct-button { margin-top:18px; padding:10px 16px; min-height:44px; border:1px solid var(--nb-control,#bcc8bf); border-radius:5px; background:var(--nb-surface,#fffdfc); color:var(--text-primary); font:inherit; font-size:15px; cursor:pointer; }
.task-decision-option:disabled,.task-correct-button:disabled { opacity:.55; cursor:not-allowed; }
.task-decision-option:focus-visible,.task-correct-button:focus-visible,.task-decision-result:focus-visible,.task-decision-fields :is(textarea,select):focus-visible { outline:3px solid var(--nb-active,#557863); outline-offset:3px; }
.task-decision-result { margin-top:18px; padding:16px; border:1px solid #c9ddcc; border-radius:5px; background:#edf5ef; overflow-wrap:anywhere; }
.task-decision-result.clarify { background:#fff5e7; border-color:#e4cda5; }
.task-decision-result.stop { background:#f1f3ef; border-color:#cbd2cc; }
.task-decision-result h3 { margin:0; font-size:18px; font-weight:500; }
.task-decision-result p { margin:8px 0 0; }
.task-decision-error { color:#8b3030; font-size:14px; }
.task-decision-error:empty { display:none; }
.task-decision-history { list-style:none; padding:0; margin:20px 0; }
.task-decision-history li { padding:14px 0; border-bottom:1px solid var(--border-card); overflow-wrap:anywhere; }
.task-decision-history strong,.task-decision-history span { display:block; }
.task-decision-history span { margin-top:5px; color:var(--text-helper); font-size:14px; }
.task-decision-history p { margin:8px 0 0; font-size:15px; }
.task-system-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:22px; }
.task-system-grid article { min-height:96px; padding:13px; border:1px solid var(--border-card); border-radius:6px; background:var(--nb-surface,#fcf8f2); }
.task-system-grid h3 { margin:0; color:var(--text-primary); font-size:15px; }
.task-system-grid p { margin:5px 0 0; color:var(--text-helper); font-size:14px; line-height:1.4; }
.task-boundary { flex-shrink:0; margin:18px 28px 28px; padding:12px; border-left:4px solid var(--accent); background:#fffaf2; color:var(--nb-muted,#46544d); font-size:14px; line-height:1.45; }

.chevron-icon {
  width: 18px;
  height: 18px;
  color: var(--text-primary);
}

.ai-helper {
  position: fixed;
  right: 39px;
  bottom: 20px;
  display: grid;
  width: 58px;
  height: 58px;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  cursor: pointer;
}

.ai-helper img {
  display: block;
  width: 54px;
  height: 54px;
  object-fit: contain;
  opacity: var(--ai-helper-idle-opacity);
  filter: drop-shadow(0 5px 9px rgba(72, 55, 35, .20));
  transition: opacity .16s ease, transform .16s ease, filter .16s ease;
}

.ai-helper:hover img,
.ai-helper:focus img,
.ai-helper:focus-visible img,
.ai-helper[aria-expanded="true"] img {
  opacity: 1;
  transform: translateY(-1px);
  filter: brightness(1.04) drop-shadow(0 5px 9px rgba(72, 55, 35, .20));
}

.ai-helper-popover {
  position: fixed;
  right: 32px;
  bottom: 88px;
  z-index: 30;
  width: min(310px, calc(100vw - 48px));
  padding: 16px 17px;
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  background: var(--surface-card-center);
  box-shadow: 0 14px 36px var(--nb-shadow14,rgba(41, 52, 47, .14));
}

.ai-helper-popover p { margin: 7px 0 0; color: var(--text-helper); font-size: 14px; line-height: 1.45; }

:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 3px;
}

.ai-helper,
.ai-helper:focus,
.ai-helper:focus-visible {
  border: 0;
  outline: none;
  box-shadow: none;
}

@media (max-width: 1180px) {
  .metric-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .work-grid {
    grid-template-columns: 1fr;
    height: auto;
  }

  .work-panel { min-height: var(--panel-height); }
  .tasks-layout { grid-template-columns:1fr; height:auto; }
  .task-queue { max-height:340px; }
  .task-context { height:720px; }

  .health-summary { grid-template-columns: 250px 1px minmax(0, 1fr); }
  .health-summary-action { grid-column: 3; justify-content: flex-start; padding: 14px 38px 0; }
  .health-check-toggle { grid-template-columns: 48px minmax(0, 1fr) 170px 130px 22px; }
}

@media (max-width: 1060px) {
  .brand { left: 20px; }
  .nav-list { left: 9px; width: 207px; }
  .nav-link { width: 207px; padding-inline: 13px; gap: 15px; }
  .settings { right: 14px; left: 14px; }
  .dashboard { padding-right: 24px; padding-left: 24px; }
  .tasks-page { padding-right: 24px; padding-left: 24px; }
  .health-page { padding-right: 24px; padding-left: 24px; }
}

@media (max-width: 760px) {
  .app-shell { display: block; }

  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    min-height: 0;
    padding: 20px 14px;
    border-right: 0;
    border-bottom: 1px solid var(--border-subtle);
  }

  .brand {
    position: static;
    display: inline-block;
    margin: 0 14px 16px;
    font-size: 20px;
  }

  .nav-list {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    width: 100%;
    gap: 6px;
  }

  .nav-link {
    justify-content: center;
    width: 100%;
    height: 48px;
    padding: 8px;
    gap: 8px;
    font-size: 14px;
  }

  .nav-icon { display: none; }
  .settings { display: none; }
  :root { --page-top: 26px; }
  .dashboard { padding: var(--page-top) 16px 90px; }
  .tasks-page { padding: 26px 16px 90px; }
  .context-page { padding: var(--page-top) 16px 90px; }
  .context-page-facts { grid-template-columns: 1fr; }
  .health-page { padding: var(--page-top) 16px 90px; }
  .page-header h1 { font-size: 30px; }
  .metric-grid { margin-top: 18px; }

  .metric-card {
    grid-template-rows: 64px 105px 1px 60px 40px;
    height: 270px;
    padding-inline: 20px;
  }

  .metric-value { font-size: 76px; }
  .status { font-size: 16px; }
  .work-grid { margin-top: 16px; }
  .work-panel { height: auto; min-height: var(--panel-height); }
  .panel-header { padding-inline: 18px; }

  .work-list li,
  #freigaben .work-list li {
    grid-template-columns: 54px minmax(0, 1fr);
    min-height: 96px;
    padding: 12px 14px;
    gap: 11px;
  }

  .portrait { width: 48px; height: 48px; }
  .work-copy strong { white-space: normal; }
  .due { grid-column: 2; text-align: left; }
  .due span { justify-content: flex-start; }
  .panel-action { min-height: 60px; }
  .tasks-header { align-items:flex-start; flex-direction:column; }
  .tasks-role-picker { width:100%; max-width:320px; }
  .task-context { min-height:0; }
  .task-context > header { padding:21px 18px 0; }
  .task-tabs { margin:18px 18px 0; overflow-x:auto; }
  .task-tabs button { flex:0 0 auto; }
  .task-tab-content { min-height:0; padding:0 18px 4px; }
  .task-context-facts,.task-system-grid,.task-role-grid { grid-template-columns:1fr; }
  .task-entries-layout { grid-template-columns:1fr; }
  .task-entry-list { padding:16px 0; border-right:0; border-bottom:1px solid var(--border-row); }
  .task-entry-detail { padding:16px 0; }
  .task-entry-facts { grid-template-columns:1fr; }
  .task-entry-fact.wide { grid-column:auto; }
  .task-boundary { margin:18px 18px 21px; }
  .ai-helper { right: 12px; bottom: 12px; }

  .health-title { font-size: 30px; }
  .health-summary { grid-template-columns: 1fr; padding: 22px 20px; }
  .health-score-block { max-width: 290px; }
  .health-summary-divider { width: 100%; height: 1px; margin: 18px 0; }
  .health-summary-copy { padding: 0; }
  .health-summary-action { grid-column: auto; justify-content: flex-start; padding: 20px 0 0; }
  .health-section-head { align-items: flex-start; gap: 12px; flex-direction: column; }
  .health-section-head span { line-height: 1.25; }
  .health-check-toggle { grid-template-columns: 40px minmax(0, 1fr) 22px; padding: 16px 14px; gap: 8px; }
  .health-check-icon { width: 30px; height: 30px; }
  .health-coverage { grid-column: 2; margin-top: 10px; }
  .health-check-state { grid-column: 2; justify-self: start; margin-top: 10px; text-align: left; }
  .health-state-line { justify-content: flex-start; }
  .health-check-time { text-align: left; }
  .health-chevron { grid-column: 3; grid-row: 1; }
  .health-check-detail { grid-template-columns: 1fr; padding: 18px 18px 20px 62px; gap: 18px; }
  .health-detail-action { white-space: normal; }
}

/* Workflows: shared desktop shell and the one approved workflow layout master. */
.sidebar-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  gap: 14px;
  border: 1px solid rgba(255, 250, 242, .3);
  border-radius: 6px;
  background: transparent;
  color: #fffaf2;
  font-family: var(--font-family);
  font-size: 14px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.sidebar-footer {
  position: absolute;
  right: 19px;
  bottom: var(--shell-bottom-inset);
  left: 19px;
  display: grid;
  gap: 8px;
}

.sidebar-session {
  overflow: hidden;
  color: rgba(255,250,242,.72);
  font-size: 12px;
  line-height: 1.3;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-logout {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 38px;
  padding: 0 8px;
  border: 1px solid rgba(255,250,242,.3);
  border-radius: 6px;
  background: transparent;
  color: #fffaf2;
  font: 14px var(--font-family);
  text-align: left;
  cursor: pointer;
}

.sidebar-logout:hover { background: var(--surface-nav-hover); }
.sidebar-logout .nav-icon { width: 23px; height: 23px; flex: 0 0 23px; }

.sidebar-toggle:hover { background: var(--surface-nav-hover); }
.sidebar-toggle .nav-icon { width: 23px; height: 23px; flex-basis: 23px; }
.sidebar-toggle .nav-icon { transition: transform .16s ease; }

.app-shell.sidebar-compact { --sidebar-width: 76px; }

.sidebar-compact .brand {
  top: 36px;
  left: 21px;
  width: 34px;
  height: 34px;
  background: none;
}

.sidebar-compact .brand div,
.sidebar-compact .nav-label,
.sidebar-compact .sidebar-toggle-label,
.sidebar-compact .sidebar-session,
.sidebar-compact .sidebar-logout-label { display: none; }

.sidebar-compact .nav-list {
  left: 9px;
  width: 58px;
  gap: 12px;
}

.sidebar-compact .nav-link {
  justify-content: center;
  width: 58px;
  padding: 0;
  gap: 0;
}

.sidebar-compact .sidebar-footer {
  right: auto;
  left: 9px;
  width: 58px;
}

.sidebar-compact .sidebar-logout {
  position: relative;
  justify-content: center;
  width: 58px;
  padding: 0;
}

.sidebar-compact .sidebar-toggle {
  width: 58px;
  justify-content: center;
  padding: 0;
  gap: 0;
}

.sidebar-compact .sidebar-toggle .nav-icon { transform: rotate(180deg); }

.sidebar-compact .nav-link::after,
.sidebar-compact .sidebar-toggle::after,
.sidebar-compact .sidebar-logout::after {
  position: absolute;
  z-index: 5;
  left: 66px;
  display: none;
  width: max-content;
  max-width: 190px;
  padding: 8px 10px;
  border-radius: 5px;
  background: var(--nb-text,#29342f);
  color: var(--nb-surface,#fffdfc);
  box-shadow: 0 6px 14px var(--nb-shadow18,rgba(41, 52, 47, .18));
  content: attr(data-label);
  font-size: 13px;
  line-height: 1;
  pointer-events: none;
}

.sidebar-compact .nav-link:hover::after,
.sidebar-compact .nav-link:focus-visible::after,
.sidebar-compact .sidebar-toggle:hover::after,
.sidebar-compact .sidebar-toggle:focus-visible::after,
.sidebar-compact .sidebar-logout:hover::after,
.sidebar-compact .sidebar-logout:focus-visible::after { display: block; }

/* Freigegebener Sidebar-Fuß v13: ohne Personenzusatz, rahmenlos und stabil am unteren Rand. */
.sidebar-footer { gap: 12px; }
.sidebar-session { display: none; }
.sidebar-toggle,
.sidebar-logout {
  border: 0;
  border-radius: 4px;
  transition: background .15s ease, color .15s ease;
}
.sidebar-toggle:hover,
.sidebar-toggle:focus-visible,
.sidebar-logout:hover,
.sidebar-logout:focus-visible {
  background: var(--surface-nav-active);
  color: var(--text-primary);
}
.sidebar-logout-zone {
  margin-top: 2px;
  padding-top: 14px;
  border-top: 1px solid rgba(255, 250, 242, .44);
}
.sidebar-logout-zone .sidebar-logout { width: 100%; }
.sidebar-compact .sidebar-logout-zone { width: 58px; }
@media (max-width: 760px) {
  .sidebar-footer,
  .sidebar-compact .sidebar-footer {
    position: static;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
    margin-top: 12px;
  }
  .sidebar-logout-zone { margin-top: 0; padding-top: 0; border-top: 0; }
}
.recruiting-photo-placeholder { object-fit: cover; object-position: center; background: var(--nb-selected,#dce8dd); }

/* The approved short-desktop shell keeps navigation scrollable above its fixed controls. */
@media (min-width: 761px) and (max-height: 700px) {
  .sidebar {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding-top: 126px;
  }
  .nav-list,
  .sidebar-compact .nav-list {
    position: static;
    flex: 1 1 auto;
    min-height: 0;
    margin-left: 9px;
    overflow-y: auto;
    align-content: start;
    overscroll-behavior: contain;
  }
  .sidebar-footer,
  .sidebar-compact .sidebar-footer {
    position: static;
    flex: 0 0 auto;
    margin: 8px 19px var(--shell-bottom-inset);
  }
  .sidebar-compact .sidebar-footer { margin-left: 9px; }
}

.workflow-overview {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  padding: 46px var(--page-pad-right) 96px var(--page-pad-left);
  background: radial-gradient(circle at 72% 8%, rgba(242, 181, 142, .24) 0%, transparent 30%), radial-gradient(circle at 12% 92%, rgba(108, 152, 131, .11) 0%, transparent 28%), var(--surface-page);
}

.workflow-overview-header { display:flex; align-items:flex-end; justify-content:space-between; gap:24px; }
.workflow-overview-header h1 {
  margin: 4px 0 0;
  color: var(--text-primary);
  font-size: 36px;
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -.55px;
}
.workflow-overview-header p { margin:8px 0 0; color:var(--text-helper); font-size:15px; line-height:1.42; }
.workflow-role-picker { min-width:170px; }

.workflow-overview-panel {
  margin-top: 24px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.workflow-overview-panel-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; }
.workflow-overview-panel-head h2 { margin: 0; color: var(--text-primary); font-size: 22px; font-weight: 500; line-height: 1.15; }
.workflow-panel-controls { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: flex-end; gap: 12px 18px; }
.workflow-area-select { display: grid; gap: 4px; color: var(--text-helper); font-size: var(--form-label-font-size); font-weight: 400; line-height: 1.4; }
.workflow-area-select select { width: 208px; height: var(--form-control-height); min-height: var(--form-control-height); padding: var(--form-control-padding); padding-right: 31px; border: 1px solid var(--form-control-border); border-radius: 4px; background: var(--form-control-surface); color: var(--text-primary); font: 400 var(--form-control-font-size)/1.4 var(--font-family), Avenir, sans-serif; }
.workflow-area-select select:focus-visible { outline: 2px solid var(--form-control-focus); outline-offset: 2px; }

.workflow-filters { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.workflow-filter {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 4px;
  background: var(--nb-surface,#fffdfc);
  color: var(--text-primary);
  font-family: var(--font-family);
  font-size: var(--form-control-font-size);
  line-height: 1;
  cursor: pointer;
}
.workflow-filter:hover { border-color: var(--accent-soft); background: var(--nb-hover,#f4f8f4); }
.workflow-filter[aria-pressed="true"] { color: var(--nb-surface,#fffdfc); box-shadow: 0 0 0 2px rgba(108, 152, 131, .14); }
.workflow-filter.filter-draft[aria-pressed="true"] { border-color: #805200; background: #805200; box-shadow: 0 0 0 2px rgba(128, 82, 0, .15); }
.workflow-filter.filter-review[aria-pressed="true"] { border-color: #d98b3a; background: #f4c58e; color: #593715; box-shadow: 0 0 0 2px rgba(217, 139, 58, .18); }
.workflow-filter.filter-review[aria-pressed="true"]:hover { border-color: #b96624; background: #f0b971; }
.workflow-filter.filter-review[aria-pressed="true"]:focus-visible { outline-color: #b96624; }
.workflow-filter.filter-active[aria-pressed="true"] { border-color: #176b46; background: #176b46; box-shadow: 0 0 0 2px rgba(23, 107, 70, .15); }
.workflow-filter.filter-retired[aria-pressed="true"] { border-color: #596973; background: #596973; box-shadow: 0 0 0 2px rgba(89, 105, 115, .15); }

.workflow-list { display: grid; gap: 12px; margin-top: 25px; }
.workflow-row {
  display: block;
  width: 100%;
  min-height: 92px;
  padding: 17px 20px;
  border: 1px solid var(--border-row);
  border-radius: 7px;
  background: var(--nb-surface,#fffdfc);
  color: var(--text-primary);
  font-family: var(--font-family);
  text-align: left;
  cursor: pointer;
  transition: border-color .16s ease, background-color .16s ease;
}

.workflow-row:hover { border-color: var(--border-row); background: var(--surface-row-hover); }
.workflow-row:focus-visible { outline: 2px solid #3d4c45; outline-offset: 2px; }
.workflow-row[hidden] { display: none !important; }
.workflow-row--planned { cursor: default; }
.workflow-row--planned:hover { border-color: var(--border-row); background: var(--surface-row-hover); }
.workflow-row-main { display: grid; min-width: 0; gap: 7px; }
.workflow-row-title-line { display: flex; min-width: 0; flex-wrap: wrap; align-items: flex-start; gap: 8px; }
.workflow-row-title { color: var(--text-primary); font-size: 18px; font-weight: 600; line-height: 1.24; }
.workflow-row-next { color: var(--text-helper); font-size: 15px; line-height: 1.35; }
.workflow-row-next strong { color: var(--text-primary); font-weight: 600; }
.workflow-status { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 6px; min-height: 24px; padding: 0 9px; border: 1px solid var(--border-card); border-radius: 4px; background: var(--nb-surface,#fffdfc); color: var(--text-primary); font-size: 12px; font-weight: 600; line-height: 1; white-space: nowrap; }
.workflow-status::before { content: ""; width: 7px; height: 7px; flex: 0 0 7px; border-radius: 50%; background: var(--waiting); }
.workflow-status-active::before { background: #176b46; }.workflow-status-review::before { background: #d46d1c; }.workflow-status-draft::before { background: #805200; }.workflow-status-retired::before { background: #596973; }

.workflow-detail-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  margin: 0;
  overflow: hidden;
  background: var(--surface-page);
}

.workflow-editor-viewport { min-width: 0; min-height: 100vh; overflow: hidden; overflow-anchor: none; background: var(--surface-page); }
.workflow-detail-page .workflow-editor-frame {
  display: block;
  width: calc(100% + 118px);
  min-height: 1000px;
  height: 100vh;
  margin-left: -118px;
  border: 0;
  overflow-anchor: none;
  background: var(--surface-page);
}

/* Both Recruiting renderers are standalone views without an inner sidebar.
   Keeping them in the page column prevents the workflow cards from being
   cropped behind the Cockpit sidebar. */
#workflow-recruiting .workflow-editor-frame,
#workflow-recruiting-vertical .workflow-editor-frame {
  width: 100%;
  margin-left: 0;
}

.settings-page {
  width: 100%;
  min-width: 0;
  min-height: 100vh;
  padding: var(--page-top) var(--page-pad-right) 96px var(--page-pad-left);
  background: radial-gradient(circle at 72% 8%, rgba(242, 181, 142, .24) 0%, transparent 30%), radial-gradient(circle at 12% 92%, rgba(108, 152, 131, .11) 0%, transparent 28%), var(--surface-page);
}

.settings-page-header { align-items: flex-start; }
.settings-registry { margin-top: 25px; }
.settings-registry-panel,
.settings-access-card {
  overflow: hidden;
  border: 1px solid var(--border-card);
  border-radius: var(--card-radius);
  background: var(--surface-card-center);
  box-shadow: 0 8px 25px var(--nb-shadow07,rgba(72, 55, 35, .07));
}

.settings-registry-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 18px;
  border-bottom: 1px solid var(--border-row);
}

.settings-access-kicker {
  display: block;
  color: #5f479e;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.settings-registry-header h2,
.settings-access-card h2 { margin: 6px 0 0; color: var(--text-primary); font-size: 23px; line-height: 1.18; }
.settings-registry-header p,
.settings-access-card > p { max-width:760px; margin: 7px 0 0; color: var(--text-helper); font-size: 15px; line-height: 1.47; }
.settings-registry-badge { flex: 0 0 auto; padding: 5px 8px; border: 1px solid #dec99e; border-radius: 4px; background: #fff8e9; color: #80541a; font-size: 12px; font-weight: 700; white-space: nowrap; }

.settings-registry-layout { display: grid; grid-template-columns: minmax(230px, .72fr) minmax(0, 1.28fr); gap: 16px; padding: 21px 24px; background: var(--surface-card-middle); }
.settings-source-list,
.settings-registry-detail { min-width: 0; overflow: hidden; border: 1px solid var(--border-card); border-radius: 7px; background: var(--surface-card-center); }
.settings-source-list > header { padding: 14px; border-bottom: 1px solid var(--border-row); }
.settings-source-list h3,
.settings-registry-detail h3 { margin: 0; color: var(--text-primary); font-size: 16px; line-height: 1.25; }
.settings-source-list p,
.settings-registry-detail > header p { margin: 4px 0 0; color: var(--text-helper); font-size: 12px; line-height: 1.42; }

.settings-source-item {
  display: grid;
  grid-template-columns: 29px minmax(0, 1fr) auto;
  width: 100%;
  gap: 9px;
  align-items: center;
  padding: 12px 13px;
  border: 0;
  border-bottom: 1px solid var(--border-row);
  border-left: 4px solid transparent;
  background: var(--surface-card-center);
  color: var(--text-primary);
  font-family: var(--font-family);
  text-align: left;
  cursor: pointer;
}

.settings-source-item:hover { background: var(--surface-card-middle); }
.settings-source-item[aria-pressed="true"] { border-left-color: var(--accent); background: #f8f4fe; }
.settings-source-item:focus-visible,
.settings-registry-tabs button:focus-visible { outline: 2px solid #3d4c45; outline-offset: -2px; }
.settings-source-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: #ede7fb; color: #6245b1; font-size: 13px; font-weight: 700; }
.settings-source-item strong { display: block; font-size: 13px; line-height: 1.25; }
.settings-source-item small { display: block; margin-top: 2px; color: var(--text-helper); font-size: 11px; line-height: 1.25; }
.settings-source-state { color: #31553f; font-size: 11px; font-weight: 700; }

.settings-registry-detail > header { padding: 15px 16px 10px; }
.settings-project-pilot-list { padding: 11px 14px; border-top: 1px solid var(--border-row); border-bottom: 1px solid var(--border-row); background: var(--surface-card-middle); }
.settings-project-pilot-list > header { display: flex; align-items: baseline; gap: 8px; }
.settings-project-pilot-list > header span { color: var(--text-primary); font-size: 12px; font-weight: 700; }
.settings-project-pilot-list > header small { color: var(--text-helper); font-size: 11px; line-height: 1.35; }
.settings-project-pilot-list > div { display: grid; gap: 6px; margin-top: 9px; }
.settings-project-pilot-list button { display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; width: 100%; gap: 8px; align-items: center; padding: 8px; border: 1px solid var(--border-row); border-left: 3px solid transparent; border-radius: 5px; background: var(--surface-card-center); color: var(--text-primary); font-family: var(--font-family); text-align: left; cursor: pointer; }
.settings-project-pilot-list button:hover { background: var(--nb-surface,#fcf8f2); }
.settings-project-pilot-list button[aria-pressed="true"] { border-left-color: var(--accent); background: #f8f4fe; }
.settings-project-pilot-list button:focus-visible { outline: 2px solid #3d4c45; outline-offset: 2px; }
.settings-project-pilot-number { display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: #ede7fb; color: #6245b1; font-size: 12px; font-weight: 700; }
.settings-project-pilot-list button strong { display: block; font-size: 12px; line-height: 1.25; }
.settings-project-pilot-list button small { display: block; margin-top: 2px; color: var(--text-helper); font-size: 10px; line-height: 1.3; }
.settings-project-pilot-list button em { color: #80541a; font-size: 10px; font-style: normal; font-weight: 700; white-space: nowrap; }
.settings-project-statuses { padding: 10px 14px; border-top: 1px solid var(--border-row); border-bottom: 1px solid var(--border-row); background: #fffaf2; }
.settings-project-statuses header { display: flex; align-items: baseline; gap: 9px; }
.settings-project-statuses header span { color: var(--text-primary); font-size: 12px; font-weight: 700; }
.settings-project-statuses header small { color: var(--text-helper); font-size: 12px; line-height: 1.35; }
.settings-project-statuses > div { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.settings-project-statuses button { border: 1px solid var(--border-subtle); border-radius: 4px; padding: 6px 8px; background: var(--surface-card-center); color: var(--text-helper); font-family: var(--font-family); font-size: 12px; font-weight: 700; cursor: pointer; }
.settings-project-statuses button:hover { background: var(--surface-card-middle); color: var(--text-primary); }
.settings-project-statuses button[aria-pressed="true"] { border-color: var(--accent); background: var(--accent); color: var(--nb-surface,#fffdfc); }
.settings-project-statuses button:focus-visible { outline: 2px solid #3d4c45; outline-offset: 2px; }
.settings-project-status-state { display: inline-block; margin-top: 8px; padding: 5px 8px; border: 1px solid #dec99e; border-radius: 4px; background: #fff8e9; color: #80541a; font-size: 11px; font-weight: 700; }
.settings-registry-tabs { display: flex; overflow: auto; padding: 0 11px; border-bottom: 1px solid var(--border-row); background: var(--surface-card-middle); }
.settings-registry-tabs button { flex: 0 0 auto; padding: 10px 10px 8px; border: 0; border-bottom: 3px solid transparent; background: transparent; color: var(--text-helper); font-family: var(--font-family); font-size: 12px; cursor: pointer; }
.settings-registry-tabs button[aria-pressed="true"] { border-color: var(--accent); color: var(--text-primary); font-weight: 700; }
.settings-registry-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; padding: 14px; }
.settings-registry-fact { min-width: 0; padding: 10px; border: 1px solid var(--border-row); border-radius: 6px; background: var(--surface-card-middle); }
.settings-registry-fact.wide { grid-column: 1 / -1; border-left: 4px solid var(--success); background: #f1f8f2; }
.settings-registry-fact span { display: block; color: var(--nb-muted,#5f6d64); font-size: 11px; }
.settings-registry-fact strong { display: block; margin-top: 3px; color: var(--text-primary); font-size: 13px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.settings-registry-protected { margin: 0 14px 14px; padding: 10px 11px; border-left: 4px solid var(--warning); background: #fff8e9; color: #674b2b; font-size: 13px; line-height: 1.45; }
.settings-registry-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 14px 15px; }
.settings-registry-actions button { padding: 8px 10px; border: 1px solid var(--border-subtle); border-radius: 5px; background: var(--nb-page,#f4efe8); color: var(--nb-muted,#788078); font-family: var(--font-family); font-size: 12px; font-weight: 700; }
.settings-registry-actions button:disabled { cursor: not-allowed; opacity: .9; }
.settings-registry-panel > footer { padding: 15px 24px; border-top: 1px solid var(--border-row); background: #fffaf2; color: var(--text-helper); font-size: 13px; line-height: 1.48; }
.settings-registry-panel > footer strong { color: var(--text-primary); }

.settings-access-card { padding: 25px; }
.settings-source-context-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 11px; margin-top: 18px; }
.settings-source-context-card { min-width: 0; padding: 13px; border: 1px solid var(--border-row); border-radius: 6px; background: var(--surface-card-middle); }
.settings-source-context-card span { display: block; color: var(--nb-muted,#5f6d64); font-size: 11px; }
.settings-source-context-card strong { display: block; margin-top: 4px; color: var(--text-primary); font-size: 14px; }
.settings-source-context-card p { margin: 5px 0 0; color: var(--text-helper); font-size: 12px; line-height: 1.4; }
.settings-access-rule { margin-top: 16px; padding: 12px; border-left: 4px solid var(--success); background: #f1f8f2; color: #31553f; font-size: 13px; line-height: 1.45; }
.settings-access-rule strong { color: #214534; }

@media (max-width: 1180px) {
  .workflow-overview-panel-head { align-items: stretch; flex-direction: column; }
  .workflow-panel-controls, .workflow-filters { justify-content: flex-start; }
}

@media (max-width: 1060px) {
  .workflow-overview, .settings-page { padding-right: 24px; padding-left: 24px; }
  .settings-registry-layout { grid-template-columns: 1fr; }
}

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

@media (max-width: 760px) {
  .dashboard-header { align-items:flex-start; flex-direction:column; }
  .workflow-overview-header { align-items:flex-start; flex-direction:column; }
  .workflow-role-picker { width:100%; max-width:320px; }
  .dashboard-metric-grid { grid-template-columns:1fr; }
  .settings-page { padding-top: var(--page-top); padding-right: 16px; padding-left: 16px; }
  .settings-page-header { align-items: flex-start; flex-direction: column; }
  .settings-registry-header { align-items: flex-start; flex-direction: column; }
  .settings-registry-layout { padding: 14px; }
  .settings-registry-facts, .settings-source-context-grid { grid-template-columns: 1fr; }
  .settings-registry-panel > footer { padding-right: 14px; padding-left: 14px; }
}
