/*
  QAQC Gate Checklist
  Original project styling created by SolBaby.
  Styles for the local QAQC field inspection checklist prototype.
*/

* {
  box-sizing: border-box;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  background: #f3f6f9;
  color: #1f2937;
  overflow-x: hidden;
}

.workspace-loader {
  position: fixed;
  inset: 0;
  z-index: 5000;
  display: grid;
  place-items: center;
  min-height: 100svh;
  padding: 28px;
  background:
    linear-gradient(rgba(22, 101, 52, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 101, 52, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 50% 36%, rgba(22, 163, 74, 0.08), transparent 32%),
    #ffffff;
  background-size: 28px 28px, 28px 28px, auto, auto;
  color: #0f172a;
  opacity: 1;
  transition: opacity 520ms ease, visibility 520ms ease;
}

.workspace-loader.is-complete {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.workspace-loader-center {
  width: min(100%, 460px);
  display: grid;
  justify-items: center;
  text-align: center;
}

.workspace-loader-logo {
  width: 72px;
  height: 72px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 18px;
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.field-quality-emblem {
  display: block;
  overflow: visible;
}

.loader-emblem {
  width: 52px;
  height: 52px;
}

.workspace-loader-brand {
  margin: 14px 0 4px;
  color: #166534;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.workspace-loader h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  letter-spacing: 0;
}

.workspace-loader-steps {
  width: min(100%, 360px);
  margin: 24px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
  list-style: none;
  text-align: left;
}

.workspace-loader-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-height: 28px;
  color: #64748b;
  font-size: 14px;
  font-weight: 700;
  opacity: 0.55;
  transition: color 220ms ease, opacity 220ms ease, transform 220ms ease;
}

.workspace-loader-steps li.is-active {
  color: #0f172a;
  opacity: 1;
  transform: translateX(2px);
}

.workspace-loader-steps li.is-complete {
  color: #166534;
  opacity: 1;
}

.workspace-step-check {
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border: 1px solid #cbd5e1;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.86);
  color: transparent;
  font-size: 13px;
  font-weight: 900;
  transition: background 220ms ease, border-color 220ms ease, color 220ms ease;
}

.workspace-loader-steps li.is-complete .workspace-step-check {
  border-color: #16a34a;
  background: #16a34a;
  color: #ffffff;
}

.workspace-loader-steps li.is-complete .workspace-step-check::before {
  content: "\2713";
}

.workspace-loader-progress {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: #e2e8f0;
}

.workspace-loader-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: #16a34a;
  transition: width 260ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-loader,
  .workspace-loader-progress span,
  .workspace-loader-steps li,
  .workspace-step-check,
  .handoff-save-panel::after {
    animation: none;
    transition: none;
  }
}

header {
  background: #0f172a;
  color: white;
  text-align: center;
  padding: 22px 16px;
}

header h1 {
  margin: 0;
  font-size: 28px;
}

header p {
  margin: 6px 0 0;
  color: #cbd5e1;
}

#appTitle {
  cursor: pointer;
  user-select: none;
}

.easter-egg {
  color: #bfdbfe;
  font-weight: bold;
}

.session-toolbar {
  margin-top: 10px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.role-badge {
  margin: 0;
  padding: 7px 12px;
  border: 1px solid #475569;
  border-radius: 999px;
  background: #1e293b;
  color: #f8fafc;
  font-size: 12px;
}

.session-toolbar .compact-button {
  width: auto;
  margin: 0;
  min-width: 0;
  padding: 9px 12px;
}

.view-mode-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  min-height: 40px;
  padding: 3px;
  border: 1px solid rgba(148, 163, 184, 0.46);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.view-mode-switcher button {
  width: auto;
  min-width: 0;
  min-height: 32px;
  margin: 0;
  padding: 6px 10px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #e2e8f0;
  box-shadow: none;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.view-mode-switcher button.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.18);
}

.view-mode-switcher button:hover {
  background: rgba(255, 255, 255, 0.2);
  box-shadow: none;
}

.view-mode-switcher button.active:hover {
  background: #ffffff;
}

.sidebar-view-switcher {
  width: 100%;
  justify-content: center;
  background: rgba(15, 23, 42, 0.24);
}

.app {
  width: 100%;
  max-width: 560px;
  margin: 20px auto;
  padding: 12px;
}

.screen-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 10px;
}

.toolbar-back {
  width: auto;
  margin: 0;
  padding: 10px 16px;
  border-radius: 999px;
  background: #0f172a;
  font-size: 14px;
  font-weight: 600;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18);
}

#globalBackBar[hidden],
.toolbar-back[hidden] {
  display: none;
}

.screen {
  display: none;
}

.screen.active {
  display: block;
}

.card {
  background: white;
  padding: 20px;
  border-radius: 18px;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  margin-bottom: 18px;
}

.card h2 {
  margin-top: 0;
  font-size: 24px;
}

.card h3 {
  margin-top: 24px;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.screen-context-bar {
  display: flex;
  justify-content: flex-start;
  margin: 0 0 8px;
}

.desktop-sidebar {
  display: none;
}

.desktop-mission-control {
  display: grid;
  gap: 14px;
}

.technician-dashboard-hidden {
  display: none !important;
}

.mobile-home-actions {
  display: none;
}

.link-button {
  width: auto;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  box-shadow: none;
  font-size: 13px;
  font-weight: 800;
}

.link-button:hover {
  background: transparent;
  color: #1d4ed8;
  box-shadow: none;
}

#home.card {
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f8fafc;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.08);
}

.mission-hero {
  display: grid;
  gap: 16px;
  padding: 22px 18px 18px;
  background:
    linear-gradient(180deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.92) 62%, rgba(248, 250, 252, 0.98) 100%),
    url("assets/mission-control-data-center-construction.jpg") center / cover no-repeat;
  border-bottom: 1px solid #e2e8f0;
}

.mission-kicker {
  margin: 0 0 6px;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.mission-hero h2 {
  margin: 0;
  color: #0f172a;
  font-size: 25px;
  line-height: 1.12;
}

.mission-hero p {
  margin: 8px 0 0;
  color: #334155;
  font-size: 15px;
}

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

.mission-intel-card {
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.08);
}

.mission-intel-card small,
.mission-intel-card strong {
  display: block;
  line-height: 1.15;
}

.mission-intel-card small {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-intel-card strong {
  margin-top: 3px;
  color: #0f172a;
  font-size: 13px;
}

.mission-intel-icon {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eff6ff;
}

.calendar-icon::before {
  content: "";
  width: 18px;
  height: 18px;
  border: 2px solid #2563eb;
  border-radius: 5px;
  background:
    linear-gradient(#2563eb 0 4px, transparent 4px),
    linear-gradient(90deg, transparent 0 5px, rgba(37, 99, 235, 0.3) 5px 7px, transparent 7px 11px, rgba(37, 99, 235, 0.3) 11px 13px, transparent 13px);
}

.weather-icon {
  overflow: hidden;
  background: linear-gradient(145deg, #eff6ff, #fff7ed);
}

.weather-sun {
  position: absolute;
  top: 7px;
  left: 7px;
  width: 15px;
  height: 15px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
}

.weather-cloud {
  position: absolute;
  right: 6px;
  bottom: 8px;
  width: 20px;
  height: 10px;
  border-radius: 999px;
  background: #93c5fd;
  box-shadow:
    -8px 1px 0 -1px #bfdbfe,
    -4px -5px 0 0 #dbeafe;
}

.weather-icon.clear .weather-cloud {
  display: none;
}

.weather-icon.rain .weather-sun,
.weather-icon.snow .weather-sun,
.weather-icon.fog .weather-sun {
  opacity: 0.32;
}

.weather-icon.rain::after,
.weather-icon.snow::after,
.weather-icon.fog::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 8px;
  bottom: 4px;
  height: 8px;
}

.weather-icon.rain::after {
  background:
    linear-gradient(115deg, transparent 0 35%, #2563eb 36% 48%, transparent 49%) 0 0 / 8px 8px repeat-x;
}

.weather-icon.snow::after {
  background:
    radial-gradient(circle, #60a5fa 0 2px, transparent 2.5px) 0 0 / 8px 8px repeat-x;
}

.weather-icon.fog::after {
  height: 10px;
  border-top: 2px solid #94a3b8;
  border-bottom: 2px solid #cbd5e1;
}

.mission-project-select {
  min-height: 58px;
  margin-top: 14px;
  display: grid;
  padding: 10px 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.96);
  color: #0f172a;
  text-align: left;
}

.mission-project-select label {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-project-select select {
  width: 100%;
  min-height: 28px;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  font-size: 18px;
  font-weight: 900;
  outline: 0;
}

.mission-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 11px;
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.mission-hero-actions {
  display: flex;
  justify-content: stretch;
}

.mission-hero-actions button {
  width: 100%;
  min-height: 44px;
  margin: 0;
  border-radius: 10px;
}

.mission-metrics,
.mission-next-panel,
.mission-action-center,
.mission-workspace-grid,
.mission-lower-grid,
.mobile-command-menu {
  width: auto;
  margin: 14px;
}

.mission-action-center {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.055);
}

.mission-action-center-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
}

.mission-action-center-head h3 {
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  color: #0f172a;
}

.mission-action-center-head p {
  margin: 4px 0 0;
}

.mission-action-center-tabs {
  display: flex;
  gap: 7px;
}

.mission-action-center-tabs button {
  width: auto;
  margin: 0;
}

.mission-action-center-tabs button.active {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.mission-action-center-tabs span {
  display: inline-grid;
  min-width: 20px;
  place-items: center;
  margin-left: 4px;
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(37, 99, 235, 0.1);
  font-size: 10px;
}

.mission-action-alert-list {
  display: grid;
  gap: 9px;
}

.mission-action-alert {
  position: relative;
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 14px 14px 18px;
  border: 1px solid #dbe3ee;
  border-radius: 11px;
  overflow: hidden;
}

.mission-action-alert::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #3b82f6;
}

.mission-action-alert.severity-urgent::before {
  background: #ef4444;
}

.mission-action-alert.severity-awareness::before {
  background: #94a3b8;
}

.mission-action-severity {
  color: #1d4ed8;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.severity-urgent .mission-action-severity {
  color: #b91c1c;
}

.mission-action-copy {
  display: grid;
  gap: 3px;
}

.mission-action-copy strong {
  color: #0f172a;
}

.mission-action-copy p,
.mission-action-copy small {
  margin: 0;
  color: #64748b;
}

.mission-action-copy p {
  font-size: 12px;
}

.mission-action-assignment-meta {
  color: #334155;
  font-size: 11px;
  font-weight: 750;
}

.mission-action-controls {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.mission-action-controls button {
  width: auto;
  margin: 0;
}

.mission-action-closed {
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-transform: capitalize;
}

.mission-action-empty {
  padding: 20px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  text-align: center;
}

.mission-action-empty p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.mission-next-panel {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff, #ffffff 58%);
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.08);
}

.mission-next-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.mission-next-kicker,
.mission-next-action .mission-next-copy > span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.mission-next-head h3 {
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  color: #0f172a;
  font-size: 19px;
}

.mission-next-head p {
  margin: 4px 0 0;
}

.mission-next-role {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
}

.mission-next-action-list {
  display: grid;
  gap: 9px;
}

.mission-next-action {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  padding: 14px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
}

.mission-next-action.primary {
  border-color: #93c5fd;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.1);
}

.mission-next-action.danger.primary {
  border-color: #fecaca;
  background: linear-gradient(135deg, #fff7f7, #ffffff);
}

.mission-next-rank {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
}

.mission-next-action.danger .mission-next-rank {
  background: #fee2e2;
  color: #b91c1c;
}

.mission-next-action h4 {
  margin: 4px 0;
  color: #0f172a;
  font-size: 15px;
}

.mission-next-action p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.mission-next-action button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 42px;
  margin: 0;
}

.mobile-command-menu {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid #dbe3ee;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.mobile-command-menu button {
  min-height: 58px;
  margin: 0;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 10px;
  border-radius: 12px;
  background: #f8fafc;
  color: #0f172a;
  box-shadow: none;
  text-align: left;
  font-size: 13px;
}

.mobile-command-menu span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 11px;
  font-weight: 900;
}

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

.mission-metric-card {
  position: relative;
  min-height: 112px;
  margin: 0;
  display: grid;
  align-content: start;
  gap: 5px;
  padding: 14px 13px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
  text-align: left;
}

.mission-metric-accent {
  display: none;
}

.mission-metric-label,
.mission-metric-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-metric-card strong {
  color: #0f172a;
  font-size: 30px;
  line-height: 1;
}

.mission-metric-icon {
  position: absolute;
  right: 13px;
  bottom: 13px;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.mission-metric-card.danger {
  border-color: #fecaca;
  background: #fff5f5;
}

.mission-metric-card.danger strong {
  color: #b91c1c;
}

.mission-metric-card.danger .mission-metric-icon {
  background: #fee2e2;
  color: #b91c1c;
}

.mission-metric-card.success {
  border-color: #bbf7d0;
  background: #f7fef9;
}

.mission-metric-card.success strong {
  color: #15803d;
}

.mission-metric-card.success .mission-metric-icon {
  background: #dcfce7;
  color: #15803d;
}

.mission-metric-card.info {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.mission-metric-card.info strong {
  color: #2563eb;
}

.mission-metric-card.info .mission-metric-icon {
  background: #dbeafe;
  color: #2563eb;
}

.mission-metric-card.neutral .mission-metric-icon {
  background: #f8fafc;
  color: #0f172a;
}

.mission-panel {
  padding: 15px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.055);
}

.mission-panel-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.mission-panel h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.mission-work-list {
  display: grid;
  gap: 10px;
}

.mission-work-item {
  position: relative;
  display: grid;
  gap: 12px;
  min-height: 0;
  padding: 15px 14px 15px 19px;
  border: 1px solid #dbe3ee;
  border-radius: 12px;
  background: #ffffff;
  overflow: hidden;
}

.mission-work-item::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #2563eb;
}

.mission-work-item.danger::before {
  background: #ef4444;
}

.mission-work-item.success::before {
  background: #22c55e;
}

.mission-work-item.warning::before {
  background: #f59e0b;
}

.mission-work-item h4 {
  margin: 5px 0;
  color: #0f172a;
  font-size: 15px;
}

.mission-work-item p {
  margin: 0;
  color: #475569;
  font-size: 13px;
}

.mission-work-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.mission-mini-progress {
  width: 96px;
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.mission-mini-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #2563eb;
}

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

.mission-quick-actions button {
  min-height: 92px;
  margin: 0;
  display: grid;
  justify-items: start;
  align-content: center;
  gap: 8px;
  padding: 14px;
  border-radius: 12px;
  background: #ffffff;
  color: #0f172a;
  text-align: left;
  font-size: 13px;
}

.mission-quick-actions span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #eff6ff;
  color: #2563eb;
  font-weight: 900;
}

.operations-portal {
  display: none;
  gap: 18px;
}

.operations-portal.screen.active {
  display: grid;
}

.operations-hero {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(22, 163, 74, 0.06)),
    #f8fafc;
}

.operations-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.operations-hero h2 {
  margin: 10px 0 6px;
}

.user-management-screen.screen.active {
  display: grid;
  gap: 18px;
}

.user-management-hero {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}

.user-management-hero h2 {
  margin: 10px 0 6px;
  letter-spacing: -0.025em;
}

.user-management-warning {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  background: #eff6ff;
  color: #1e3a8a;
}

.user-management-warning strong,
.user-management-warning span {
  color: inherit;
}

.user-management-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.user-management-summary article {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.user-management-summary span,
.user-management-summary small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.user-management-summary strong {
  color: #0f172a;
  font-size: 22px;
}

.user-management-access-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 10px;
}

.user-management-access-preview article {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.user-management-access-preview span {
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-management-access-preview strong {
  color: #0f172a;
  font-size: 18px;
}

.user-management-access-preview small {
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.4;
}

.user-management-roster {
  display: grid;
  gap: 10px;
}

.roster-disclosure {
  overflow: hidden;
  padding: 0;
  border: 2px solid #d4e3fb;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.roster-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  transition: background-color 160ms ease;
}

.roster-disclosure-summary::-webkit-details-marker {
  display: none;
}

.roster-disclosure-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.roster-disclosure-summary > span:first-child > small,
.roster-disclosure-summary > span:first-child > span {
  color: #64748b;
}

.roster-disclosure-summary > span:first-child > small {
  font-weight: 900;
  text-transform: uppercase;
}

.roster-disclosure-summary #accessRosterCount {
  padding: 0.55rem 0.8rem;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  white-space: nowrap;
}

.roster-disclosure[open] .roster-disclosure-summary {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
}

.roster-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1.5fr) repeat(3, minmax(150px, 1fr));
  gap: 0.75rem;
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #eef2f7;
  background: #fbfdff;
}

.roster-disclosure #userManagementRoster {
  padding: 18px 20px 20px;
}

.member-bulk-editor {
  margin: 0;
  padding: 18px 20px;
  border-bottom: 1px solid #bfdbfe;
  background: linear-gradient(135deg, #eff6ff 0%, #f8fbff 100%);
}

.member-bulk-editor[hidden] {
  display: none;
}

.member-bulk-editor-head,
.member-bulk-review {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.member-bulk-editor-head small {
  color: #2563eb;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.member-bulk-editor-head h3,
.member-bulk-editor-head p,
.member-bulk-review p {
  margin: 0;
}

.member-bulk-editor-head p,
.member-bulk-review p {
  margin-top: 0.25rem;
  color: #52637a;
}

.member-bulk-editor-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.member-bulk-fieldset {
  display: grid;
  align-content: start;
  gap: 0.7rem;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #cbdcf7;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
}

.member-bulk-fieldset legend {
  padding: 0 0.4rem;
  color: #172033;
  font-weight: 900;
}

.member-bulk-fieldset > label:not(.member-bulk-setting) {
  margin: 0;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.member-bulk-fieldset > select {
  width: 100%;
  margin: 0;
}

.member-bulk-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.member-bulk-check,
.member-bulk-setting {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 0.6rem;
  min-width: 0;
  margin: 0;
  padding: 10px;
  border: 1px solid #dbe5f2;
  border-radius: 9px;
  background: #f8fafc;
}

.member-bulk-check:has(input:checked),
.member-bulk-setting:has(input:checked) {
  border-color: #60a5fa;
  background: #eff6ff;
}

.member-bulk-check:has(input:disabled) {
  opacity: 0.55;
}

.member-bulk-check input,
.member-bulk-setting input,
.member-select-cell input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
}

.member-bulk-check span,
.member-bulk-setting span {
  display: grid;
  min-width: 0;
}

.member-bulk-check small,
.member-bulk-setting small,
.member-bulk-fieldset > small {
  color: #64748b;
  font-size: 0.72rem;
  line-height: 1.35;
}

.member-bulk-review {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid #cbdcf7;
}

.member-bulk-review button {
  width: auto;
  min-width: 210px;
  margin: 0;
}

.member-bulk-review-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 0.65rem;
}

.roster-filter-bar label {
  display: grid;
  gap: 0.35rem;
  color: #475569;
  font-size: 0.78rem;
  font-weight: 800;
}

.roster-filter-bar input,
.roster-filter-bar select {
  width: 100%;
  min-height: 42px;
  margin: 0;
}

@media (max-width: 900px) {
  .roster-filter-bar {
    grid-template-columns: 1fr;
  }

  .member-bulk-editor-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .member-editor-summary,
  .roster-disclosure-summary,
  .member-audit-summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: flex-start;
    padding: 16px;
  }

  .member-disclosure-action {
    width: 100%;
    gap: 9px;
    padding-top: 10px;
    border-top: 1px solid #e2e8f0;
  }

  .member-editor-open-label,
  .roster-disclosure-summary #accessRosterCount {
    padding: 0.45rem 0.65rem;
    font-size: 0.78rem;
  }

  .roster-filter-bar,
  .roster-disclosure #userManagementRoster,
  .member-bulk-editor,
  .people-access-audit-list,
  .member-editor-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .member-bulk-editor-head,
  .member-bulk-review {
    display: grid;
  }

  .member-bulk-check-grid {
    grid-template-columns: 1fr;
  }

  .member-bulk-review button {
    width: 100%;
  }

  .member-bulk-review-actions {
    display: grid;
  }
}

.user-management-provision {
  display: grid;
  gap: 14px;
  overflow: hidden;
  padding: 0;
  border: 2px solid #cfe0ff;
  border-radius: 16px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(22, 163, 74, 0.04)),
    #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.045);
}

.user-management-provision.is-editing {
  border-color: #76a7ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.08), 0 14px 34px rgba(15, 23, 42, 0.08);
}

.member-editor-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  list-style: none;
  padding: 18px 20px;
  transition: background-color 160ms ease;
}

.member-editor-summary::-webkit-details-marker {
  display: none;
}

.member-editor-summary h3 {
  margin: 0.15rem 0;
}

.member-editor-summary small,
.member-editor-summary span span {
  color: #64748b;
}

.member-editor-open-label {
  flex: 0 0 auto;
  padding: 0.65rem 0.9rem;
  border-radius: 999px;
  background: #2563eb;
  color: #fff;
  white-space: nowrap;
}

.member-editor-open-label > span {
  color: inherit;
}

.member-editor-open-label .when-open {
  display: none;
}

.member-editor-disclosure[open] .member-editor-open-label {
  background: #475569;
}

.member-editor-disclosure[open] .member-editor-open-label .when-closed {
  display: none;
}

.member-editor-disclosure[open] .member-editor-open-label .when-open {
  display: inline;
}

.member-editor-disclosure[open] .member-editor-summary {
  border-bottom: 1px solid #dbe4ef;
  background: rgba(248, 251, 255, 0.84);
}

.member-editor-body {
  padding: 20px;
}

.user-management-audit-disclosure > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  font-weight: 800;
}

.member-audit-summary {
  padding: 18px 20px;
  list-style: none;
  transition: background-color 160ms ease;
}

.member-audit-summary::-webkit-details-marker {
  display: none;
}

.member-audit-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.member-audit-summary > span:first-child > small,
.member-audit-summary > span:first-child > span {
  color: #64748b;
}

.member-audit-summary > span:first-child > small {
  font-weight: 900;
  text-transform: uppercase;
}

.user-management-audit-disclosure[open] .member-audit-summary {
  border-bottom: 1px solid #e2e8f0;
  background: #f8fbff;
}

.user-management-audit-disclosure[hidden] {
  display: none !important;
}

.member-disclosure-action {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex: 0 0 auto;
}

.member-disclosure-open-label {
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.member-disclosure-open-label .when-open {
  display: none;
}

details[open] > summary .member-disclosure-open-label .when-closed {
  display: none;
}

details[open] > summary .member-disclosure-open-label .when-open {
  display: inline;
}

.member-disclosure-chevron {
  position: relative;
  display: grid;
  place-items: center;
  flex: 0 0 38px;
  width: 38px;
  height: 38px;
  border: 1px solid #bfd3f5;
  border-radius: 11px;
  background: #eaf2ff;
  transition: background-color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.member-disclosure-chevron::after {
  content: "";
  width: 9px;
  height: 9px;
  margin-top: -5px;
  border-right: 3px solid #1d4ed8;
  border-bottom: 3px solid #1d4ed8;
  transform: rotate(45deg);
  transition: transform 180ms ease, margin 180ms ease;
}

details[open] > summary .member-disclosure-chevron {
  border-color: #93b4ec;
  background: #dbeafe;
}

details[open] > summary .member-disclosure-chevron::after {
  margin-top: 5px;
  transform: rotate(225deg);
}

.member-editor-summary:hover,
.roster-disclosure-summary:hover,
.member-audit-summary:hover,
.member-subdisclosure-summary:hover {
  background: #f8fafc;
}

.member-editor-summary:hover .member-disclosure-chevron,
.roster-disclosure-summary:hover .member-disclosure-chevron,
.member-audit-summary:hover .member-disclosure-chevron,
.member-subdisclosure-summary:hover .member-disclosure-chevron {
  border-color: #6f9ee8;
  background: #dbeafe;
  transform: scale(1.04);
}

.member-editor-summary:focus-visible,
.roster-disclosure-summary:focus-visible,
.member-audit-summary:focus-visible,
.member-subdisclosure-summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.25);
  outline-offset: -3px;
}

.member-subdisclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.member-subdisclosure-summary::-webkit-details-marker {
  display: none;
}

.member-subdisclosure-summary > span:first-child {
  display: grid;
  gap: 2px;
}

.member-subdisclosure-summary small {
  color: #64748b;
  font-weight: 650;
}

.user-management-advanced-panel[open] .member-subdisclosure-summary {
  border-bottom: 1px solid #e2e8f0;
}

.user-management-row.member-update-highlight {
  background: rgba(37, 99, 235, 0.08);
  box-shadow: inset 4px 0 0 #2563eb;
}

.member-work-assignment {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #dbe4ef;
  border-radius: 16px;
  background: #f8fafc;
}

.member-project-assignment {
  grid-column: 1 / -1;
}

.access-preset-example {
  margin: 0.55rem 0 0;
  padding: 0.7rem 0.8rem;
  border-left: 3px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #334155;
  font-size: 0.82rem;
  line-height: 1.45;
}

.access-preset-example strong {
  color: #1d4ed8;
}

.user-management-read-comparison {
  display: grid;
  gap: 10px;
  padding: 16px;
  border: 1px solid #fde68a;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(245, 158, 11, 0.08), rgba(217, 119, 6, 0.06)),
    #fffbeb;
}

.admin-operational-read-results {
  display: grid;
  gap: 10px;
}

.admin-operational-read-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid #fbbf24;
  border-radius: 10px;
  background: #ffffff;
}

.admin-operational-read-card h4 {
  margin: 0;
  color: #92400e;
}

.admin-operational-read-module {
  display: grid;
  gap: 8px;
}

.admin-operational-read-module span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #92400e;
  font-size: 11px;
}

.admin-operational-read-card .admin-operational-match {
  color: #065f46;
  border-left: 4px solid #22c55e;
  padding-left: 8px;
}

.admin-operational-read-card .admin-operational-mismatch {
  color: #b91c1c;
  border-left: 4px solid #ef4444;
  padding-left: 8px;
}

.admin-operational-read-card .admin-operational-warning {
  color: #9a3412;
  border-left: 4px solid #f97316;
  padding-left: 8px;
}

.user-management-qa {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.admin-loop-checks {
  display: grid;
  gap: 10px;
}

.admin-loop-checks article {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-left: 5px solid #f59e0b;
  border-radius: 10px;
  background: #fffbeb;
}

.admin-loop-checks article.passed {
  border-left-color: #22c55e;
  background: #f0fdf4;
}

.admin-loop-checks span {
  color: #64748b;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-loop-checks strong {
  color: #0f172a;
}

.admin-loop-checks small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.user-management-form-grid {
  display: grid;
  gap: 12px;
}

.user-management-advanced-panel {
  margin-top: 8px;
  padding: 0;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.user-management-advanced-panel summary {
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
  color: #1e293b;
  list-style: none;
}

.user-management-advanced-panel summary::-webkit-details-marker {
  display: none;
}

.user-management-advanced-panel > div {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.user-management-advanced-panel > p {
  margin: 0;
  padding: 14px 16px 0;
}

.user-management-form-grid label,
.user-management-provision > div > label {
  display: block;
  margin-bottom: 6px;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.user-management-form-grid input,
.user-management-form-grid select {
  width: 100%;
  min-height: 44px;
  margin: 0;
}

.user-management-projects {
  display: grid;
  gap: 9px;
}

.user-management-table-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.user-management-table-head h3 {
  margin: 0;
}

.user-management-table-head span {
  color: #64748b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-management-table {
  display: grid;
  gap: 7px;
}

.user-management-row {
  display: grid;
  gap: 10px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.user-management-row-head {
  padding: 8px 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.user-management-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
  color: #0f172a;
  font-size: 13px;
}

.user-management-row-head,
.user-management-row {
  grid-template-columns: 32px minmax(190px, 1.7fr) minmax(120px, 0.9fr) minmax(140px, 1fr) minmax(140px, 1fr) minmax(140px, 0.9fr) minmax(120px, 0.8fr) minmax(82px, 0.5fr);
}

.user-management-row .member-select-cell {
  display: flex;
  justify-content: center;
}

.member-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.user-management-row small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.35;
}

.user-status-pill {
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  text-transform: uppercase;
}

.user-status-pill.trusted {
  background: #dcfce7;
  color: #166534;
}

.user-status-pill.fallback,
.user-status-pill.local {
  background: #ffedd5;
  color: #9a3412;
}

.user-status-pill.planned {
  background: #dbeafe;
  color: #1d4ed8;
}

.user-status-pill.invitation-pending {
  background: #dbeafe;
  color: #1d4ed8;
}

.user-status-pill.suspended {
  background: #fee2e2;
  color: #991b1b;
}

.user-status-pill.disabled {
  background: #e5e7eb;
  color: #334155;
}

.people-access-audit {
  display: grid;
  gap: 0;
  overflow: hidden;
  padding: 0;
  border: 2px solid #dbe4ef;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.people-access-audit-list {
  display: grid;
  gap: 8px;
  padding: 18px 20px 20px;
}

.people-access-audit-list article {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
}

.people-access-audit-list article strong {
  color: #0f172a;
  font-size: 13px;
}

.people-access-audit-list article span {
  color: #64748b;
  font-size: 11px;
}

.people-access-audit-list article small {
  color: #334155;
  font-size: 11px;
  line-height: 1.35;
}

.people-access-invite {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.people-access-invite h3 {
  margin: 0;
  font-size: 14px;
}

.people-access-invite textarea {
  width: 100%;
  min-height: 110px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  padding: 10px;
  background: #ffffff;
  color: #0f172a;
}

.command-view-screen.screen.active {
  display: grid;
  gap: 10px;
}

.command-view-hero {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.06), rgba(22, 163, 74, 0.035)),
    #ffffff;
}

.command-view-hero h2 {
  margin: 6px 0 3px;
  font-size: 24px;
  line-height: 1.12;
}

.command-view-hero p {
  margin: 0;
  color: #475569;
  font-size: 13px;
  line-height: 1.35;
}

.command-view-screen .user-management-summary {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.command-view-screen .user-management-summary article {
  min-height: 62px;
  padding: 9px 11px;
  border-radius: 8px;
}

.command-view-screen .user-management-summary span,
.command-view-screen .user-management-summary small {
  font-size: 10px;
}

.command-view-screen .user-management-summary strong {
  font-size: 18px;
  line-height: 1;
}

.command-view-screen .user-management-summary {
  min-height: 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
  color: #475569;
}

.command-view-screen .user-management-summary span {
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  font-size: 12px;
  font-weight: 750;
}

.command-view-screen .user-management-summary strong {
  color: #0f172a;
  font-size: 14px;
}

.command-view-screen .user-management-summary i {
  color: #94a3b8;
  font-style: normal;
}

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

.command-view-screen:not(.is-edit-mode) .command-edit-only {
  display: none !important;
}

.command-view-menu {
  position: relative;
}

.command-view-menu > summary,
.command-view-filter-disclosure > summary {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 7px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  cursor: pointer;
  font-size: 12px;
  font-weight: 900;
  list-style: none;
}

.command-view-menu > summary::-webkit-details-marker,
.command-view-filter-disclosure > summary::-webkit-details-marker {
  display: none;
}

.command-view-menu[open] > summary,
.command-view-filter-disclosure[open] > summary {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1d4ed8;
}

.command-view-menu[open] > summary span,
.command-view-filter-disclosure[open] > summary span {
  transform: rotate(180deg);
}

.command-view-menu > div {
  position: absolute;
  top: calc(100% + 7px);
  right: 0;
  z-index: 80;
  width: max-content;
  min-width: 178px;
  display: grid;
  gap: 7px;
  padding: 8px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(15, 23, 42, 0.16);
}

.command-view-menu > div button {
  width: 100%;
  margin: 0;
}

.command-view-workspace {
  position: relative;
  overflow: hidden;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.command-view-controls {
  display: block;
  padding: 10px 12px;
  border-bottom: 1px solid #e2e8f0;
  background: #f8fafc;
}

.command-view-primary-filters,
.command-view-advanced-filters {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.command-view-primary-filters > label {
  flex: 1 1 220px;
  max-width: 320px;
}

.command-view-filter-disclosure {
  align-self: flex-end;
}

.command-view-filter-disclosure[open] {
  flex: 1 0 100%;
}

.command-view-advanced-filters {
  margin-top: 10px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.command-view-advanced-filters label {
  flex: 1 1 150px;
}

.command-view-controls label {
  display: grid;
  gap: 4px;
  min-width: 150px;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-view-controls select {
  min-height: 36px;
  margin: 0;
  font-size: 13px;
}

.command-view-zoom-controls {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 18;
  display: block;
  color: #334155;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-view-chart-shell {
  position: relative;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
}

.command-view-zoom-controls > div {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 3px;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
}

.command-view-zoom-controls button {
  min-height: 28px;
  padding: 5px 9px;
  font-size: 12px;
}

.command-view-zoom-controls output {
  min-width: 48px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
  text-transform: none;
}

.command-view-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 340px);
  min-height: 560px;
  overflow: hidden;
}

.command-view-layout.is-detail-collapsed {
  grid-template-columns: minmax(0, 1fr);
}

.command-view-layout.is-detail-collapsed .command-view-detail {
  display: none;
}

.command-view-chart {
  position: relative;
  min-width: 0;
  min-height: 560px;
  overflow: hidden;
  background: #ffffff;
  cursor: grab;
  user-select: none;
  touch-action: none;
}

.command-view-chart.is-panning {
  cursor: grabbing;
}

.command-view-canvas {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 1;
  display: grid;
  gap: 12px;
  min-width: var(--command-chart-width, 920px);
  padding: 0 0 28px;
  transform-origin: 0 0;
  will-change: transform;
  transition: transform 90ms linear;
}

.command-view-chart button,
.command-view-chart select,
.command-view-chart input {
  user-select: auto;
}

.command-view-connectors {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: visible;
}

.command-connector {
  fill: none;
  stroke: #b8c4d4;
  stroke-width: 1.5;
  stroke-linecap: round;
  opacity: 0.42;
}

.command-connector.is-highlighted {
  stroke: #2563eb;
  stroke-width: 2.5;
  opacity: 0.95;
}

.command-connector.is-muted {
  stroke: #cbd5e1;
  stroke-width: 1.25;
  opacity: 0.28;
}

.command-connector.is-add-preview {
  stroke: #94a3b8;
  stroke-dasharray: 5 5;
  opacity: 0.62;
}

.command-connector.is-group {
  stroke: #64748b;
  stroke-dasharray: 8 5;
  opacity: 0.72;
}

.command-view-level {
  position: relative;
  z-index: 1;
  --command-level-accent: #2563eb;
  --command-level-soft: #eff6ff;
  --command-level-border: #bfdbfe;
  --command-level-text: #1d4ed8;
  display: grid;
  grid-template-columns: 150px minmax(var(--command-members-width, 660px), 1fr);
  gap: 18px;
  align-items: center;
  min-width: var(--command-level-width, 828px);
}

.command-view-level.project-manager {
  --command-level-accent: #1d4ed8;
  --command-level-soft: #eff6ff;
  --command-level-border: #93c5fd;
  --command-level-text: #1e40af;
}

.command-view-level.superintendent {
  --command-level-accent: #15803d;
  --command-level-soft: #f0fdf4;
  --command-level-border: #86efac;
  --command-level-text: #166534;
}

.command-view-level.foreman {
  --command-level-accent: #d97706;
  --command-level-soft: #fffbeb;
  --command-level-border: #fcd34d;
  --command-level-text: #92400e;
}

.command-view-level.lead {
  --command-level-accent: #7c3aed;
  --command-level-soft: #f5f3ff;
  --command-level-border: #c4b5fd;
  --command-level-text: #5b21b6;
}

.command-view-level.technician {
  --command-level-accent: #0284c7;
  --command-level-soft: #f0f9ff;
  --command-level-border: #7dd3fc;
  --command-level-text: #075985;
}

.command-view-level.installer {
  --command-level-accent: #0f766e;
  --command-level-soft: #f0fdfa;
  --command-level-border: #5eead4;
  --command-level-text: #115e59;
}

.command-view-level-label {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  align-content: center;
  min-height: 70px;
  padding-left: 11px;
  border-left: 4px solid var(--command-level-accent);
}

.command-view-level-label strong {
  color: #0f172a;
  font-size: 13px;
  line-height: 1.1;
}

.command-view-level-label span {
  margin-top: 3px;
  color: var(--command-level-text);
  font-size: 12px;
  line-height: 1.2;
}

.command-view-level-label small {
  display: block;
  margin-top: 3px;
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
}

.command-level-toggle {
  width: fit-content;
  min-width: 58px;
  min-height: 28px;
  margin: 0;
  padding: 5px 7px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  box-shadow: none;
  font-size: 10px;
  font-weight: 900;
}

.command-level-toggle:hover {
  border-color: #2563eb;
  color: #2563eb;
  transform: none;
}

.command-view-level-members {
  position: relative;
  display: grid;
  grid-template-columns: repeat(var(--command-chart-columns, 3), minmax(214px, 1fr));
  gap: 12px;
}

.command-view-level.is-collapsed .command-view-level-members {
  grid-template-columns: minmax(160px, 260px);
}

.command-member-card,
.command-member-placeholder {
  min-height: 92px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--command-level-border, #d7e0ea);
  border-radius: 8px;
  background: linear-gradient(90deg, var(--command-level-soft, #ffffff) 0, rgba(255, 255, 255, 0.96) 42%);
  color: #0f172a;
  text-align: left;
}

.command-member-card {
  position: relative;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.command-member-card::before {
  content: "";
  position: absolute;
  top: 50%;
  left: -13px;
  width: 13px;
  height: 1px;
  background: var(--command-level-accent, #cbd5e1);
  opacity: 0;
}

.command-member-card:hover,
.command-member-card.is-selected {
  border-color: var(--command-level-accent, #2563eb);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.1);
  transform: translateY(-1px);
}

.command-member-card.is-selected {
  background: var(--command-level-soft, #eff6ff);
}

.command-member-card.is-manager-path {
  border-color: var(--command-level-accent, #93c5fd);
  background: var(--command-level-soft, #f8fbff);
  box-shadow: none;
}

.command-member-card.is-direct-report {
  border-color: var(--command-level-accent, #bbf7d0);
  background: var(--command-level-soft, #f0fdf4);
}

.command-member-card.is-outside-focus {
  opacity: 0.34;
  filter: saturate(0.45);
}

.command-member-card.is-outside-focus:hover {
  opacity: 0.72;
  filter: none;
}

.command-member-card.is-selected::before,
.command-member-card.is-manager-path::before,
.command-member-card.is-direct-report::before {
  opacity: 1;
}

.command-member-card.is-selected .command-member-avatar,
.command-member-card.is-manager-path .command-member-avatar {
  background: var(--command-level-accent, #2563eb);
}

.command-member-card.is-direct-report .command-member-avatar {
  background: var(--command-level-accent, #16a34a);
}

.command-member-card.is-manager-path::after,
.command-member-card.is-direct-report::after {
  content: "";
}

.command-member-card.is-manager-path::after {
  content: "";
}

.command-member-card.is-direct-report::after {
  content: "";
}

.command-member-card mark {
  grid-column: 2;
  justify-self: start;
  margin-top: 2px;
}

.command-member-add-card {
  border-style: dashed;
  border-color: var(--command-level-border, #b9c6d6);
  background: var(--command-level-soft, #f8fafc);
  color: var(--command-level-text, #475569);
}

.command-member-group-card {
  border-style: dashed;
  border-color: var(--command-level-border, #94a3b8);
  background: var(--command-level-soft, #f8fafc);
}

.command-member-group-card .command-member-avatar {
  background: var(--command-level-accent, #334155);
  font-size: 12px;
  letter-spacing: 0;
}

.command-member-group-card strong {
  color: #0f172a;
}

.command-member-group-manager {
  color: #94a3b8;
  font-size: 11px;
}

.command-department-chip {
  width: fit-content;
  max-width: 100%;
  padding: 2px 6px;
  border: 1px solid color-mix(in srgb, var(--command-level-accent, #2563eb) 24%, #dbeafe);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--command-level-text, #2563eb);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
}

.command-group-member-list {
  display: grid;
  gap: 7px;
  max-height: 360px;
  overflow: auto;
  padding-right: 3px;
}

.command-group-member-list button {
  width: 100%;
  min-height: 58px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: none;
  text-align: left;
}

.command-group-member-list button:hover {
  border-color: #2563eb;
  background: #eff6ff;
  transform: none;
}

.command-group-member-list .command-member-avatar {
  width: 34px;
  height: 34px;
}

.command-group-member-list span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.command-group-member-list strong,
.command-group-member-list small {
  overflow: hidden;
  text-overflow: ellipsis;
}

.command-group-member-list strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.15;
}

.command-group-member-list small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.2;
}

.command-move-preview {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.command-move-preview strong {
  color: #0f172a;
  font-size: 12px;
  line-height: 1.2;
}

.command-move-preview span,
.command-move-preview small {
  color: #475569;
  font-size: 11px;
  line-height: 1.25;
}

.command-member-add-card:hover {
  border-color: var(--command-level-accent, #2563eb);
  background: var(--command-level-soft, #eff6ff);
}

.command-member-add-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--command-level-border, #e2e8f0);
  color: var(--command-level-text, #334155);
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.command-member-add-card:hover .command-member-add-icon {
  background: var(--command-level-accent, #2563eb);
  color: #ffffff;
}

.command-member-avatar {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--command-level-accent, #0f172a);
  color: #ffffff;
  font-size: 10px;
  font-weight: 900;
}

.command-member-avatar.large {
  width: 46px;
  height: 46px;
  font-size: 14px;
}

.command-member-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.command-member-copy strong {
  color: #0f172a;
  font-size: 15px;
  line-height: 1.15;
}

.command-member-copy small,
.command-member-copy em {
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: normal;
  line-height: 1.25;
}

.command-member-copy small {
  color: var(--command-level-text, #2563eb);
  font-weight: 900;
}

.command-member-placeholder {
  grid-template-columns: 1fr;
  border-style: dashed;
  background: rgba(248, 250, 252, 0.86);
  color: #64748b;
  text-align: center;
}

.command-member-placeholder strong {
  color: #334155;
}

.command-level-collapsed-note {
  min-height: 48px;
  border-color: #cbd5e1;
  background: rgba(241, 245, 249, 0.92);
}

.command-view-detail {
  display: flex;
  flex-direction: column;
  min-height: 0;
  max-height: clamp(560px, 68vh, 880px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border-left: 1px solid #e2e8f0;
  background: #fbfdff;
}

.command-detail-header,
.command-detail-person,
.command-detail-section,
.command-detail-actions,
.command-view-detail-empty {
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
}

.command-detail-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
}

.command-detail-close {
  min-height: 30px;
  padding: 5px 9px;
}

.command-detail-header h3 {
  margin: 6px 0 3px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.15;
}

.command-detail-header small {
  color: #64748b;
  font-size: 11px;
}

.command-detail-person {
  display: flex;
  align-items: center;
  gap: 10px;
}

.command-detail-person div {
  display: grid;
  gap: 4px;
}

.command-detail-person small {
  color: #64748b;
  font-size: 11px;
}

.command-detail-section h4 {
  margin: 0 0 9px;
  color: #0f172a;
  font-size: 13px;
}

.command-detail-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.command-detail-section-head span {
  min-width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
  font-weight: 900;
}

.command-report-list {
  display: grid;
  gap: 7px;
}

.command-report-list article {
  display: grid;
  gap: 2px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.command-report-list small {
  color: #64748b;
  font-size: 11px;
}

.command-reporting-editor {
  display: grid;
  gap: 9px;
}

.command-reporting-editor label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.command-reporting-editor label span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-reporting-editor select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.command-reporting-editor small {
  color: #64748b;
  font-size: 11px;
  line-height: 1.3;
}

.command-reporting-editor .command-rule-note {
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #f8fafc;
  color: #334155;
  font-weight: 800;
}

.command-reporting-editor small.is-success {
  color: #15803d;
}

.command-reporting-editor small.is-warning {
  color: #b45309;
}

.command-reporting-editor small.is-muted {
  color: #64748b;
}

.command-detail-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.command-detail-list div {
  display: grid;
  grid-template-columns: minmax(82px, 0.65fr) minmax(0, 1fr);
  gap: 12px;
}

.command-detail-list dt {
  color: #64748b;
  font-size: 12px;
}

.command-detail-list dd {
  margin: 0;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
}

.command-detail-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: auto;
}

.command-detail-actions button {
  width: 100%;
}

.command-action-status {
  margin: 0;
  padding: 0 12px 12px;
}

.command-action-status.is-success {
  color: #15803d;
}

.command-action-status.is-warning {
  color: #b45309;
}

.command-member-drawer {
  border: 1px solid #d7e0ea;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.command-member-drawer[hidden] {
  display: none;
}

.command-member-drawer form {
  display: grid;
  gap: 14px;
  padding: 14px;
}

.command-member-drawer-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
}

.command-member-drawer-head h3 {
  margin: 4px 0 0;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.15;
}

.command-member-form-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.command-member-form-grid label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.command-member-form-grid span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.command-member-form-grid input,
.command-member-form-grid select {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 7px;
  background: #ffffff;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
}

.command-member-access-panel {
  display: grid;
  gap: 8px;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.command-member-access-panel > div:first-child {
  display: grid;
  gap: 2px;
}

.command-member-access-panel span {
  color: #0f172a;
  font-size: 12px;
  font-weight: 900;
}

.command-member-access-panel small {
  color: #64748b;
  font-size: 11px;
}

.command-member-feature-checks {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.command-member-feature-checks label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid #e2e8f0;
  border-radius: 7px;
  background: #ffffff;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.command-member-feature-checks input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.command-member-form-status {
  margin: 0;
}

.command-member-form-status.is-success {
  color: #15803d;
}

.command-member-form-status.is-warning {
  color: #b45309;
}

.command-member-form-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.command-view-empty,
.command-view-detail-empty {
  display: grid;
  gap: 7px;
  align-content: center;
  min-height: 220px;
  color: #64748b;
}

.command-view-empty strong,
.command-view-detail-empty strong {
  color: #0f172a;
}

@media (max-width: 1180px) {
  .command-view-hero,
  .command-view-layout {
    grid-template-columns: 1fr;
  }

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

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

  .command-view-level {
    grid-template-columns: 140px minmax(var(--command-members-width, 600px), 1fr);
    min-width: var(--command-level-width, 758px);
  }

  .command-view-level-members {
    grid-template-columns: repeat(var(--command-chart-columns, 2), minmax(250px, 1fr));
  }

  .command-view-hero {
    display: grid;
  }

  .command-view-actions {
    justify-content: flex-start;
  }

  .command-view-zoom-controls {
    margin-left: 0;
  }

  .command-view-detail {
    border-top: 1px solid #e2e8f0;
    border-left: 0;
    max-height: clamp(420px, 58vh, 620px);
  }

  .command-detail-actions {
    margin-top: 0;
  }
}

@media (min-width: 721px) and (max-width: 1180px) {
  .command-view-layout.has-selection {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 320px);
  }

  .command-view-layout.has-selection .command-view-detail {
    border-top: 0;
    border-left: 1px solid #e2e8f0;
  }
}

@media (max-width: 720px) {
  .command-view-screen.screen.active {
    gap: 10px;
  }

  .command-view-hero {
    gap: 10px;
  }

  .command-view-screen .user-management-summary {
    flex-wrap: wrap;
    gap: 5px 8px;
  }

  .command-view-controls,
  .command-view-actions {
    display: grid;
    gap: 8px;
  }

  .command-view-controls label,
  .command-view-actions button,
  .command-member-form-actions button {
    width: 100%;
  }

  .command-view-primary-filters,
  .command-view-advanced-filters {
    display: grid;
    grid-template-columns: 1fr;
  }

  .command-view-primary-filters > label {
    max-width: none;
  }

  .command-view-filter-disclosure,
  .command-view-filter-disclosure > summary,
  .command-view-menu,
  .command-view-menu > summary {
    width: 100%;
  }

  .command-view-menu > div {
    position: static;
    width: 100%;
    min-width: 0;
    margin-top: 7px;
    box-shadow: none;
  }

  .command-view-zoom-controls {
    top: 8px;
    right: 8px;
    width: auto;
  }

  .command-view-zoom-controls > div {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .command-view-zoom-controls button {
    width: 100%;
    padding-inline: 6px;
  }

  .command-member-drawer-head,
  .command-member-form-actions {
    display: grid;
  }

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

  .command-member-feature-checks {
    grid-template-columns: 1fr;
  }

  .command-view-controls {
    padding: 9px;
  }

  .command-view-chart {
    min-height: 420px;
  }

  .command-view-chart-shell {
    min-height: 420px;
  }

  .command-view-layout.has-selection .command-view-chart,
  .command-view-layout.has-selection .command-view-chart-shell {
    min-height: 280px;
    height: 280px;
  }

  .command-view-connectors {
    display: none;
  }

  .command-view-canvas {
    top: 10px;
    left: 10px;
    min-width: var(--command-chart-width, 650px);
  }

  .command-view-level {
    grid-template-columns: 120px minmax(var(--command-members-width, 430px), 1fr);
    gap: 12px;
    min-width: var(--command-level-width, 562px);
  }

  .command-view-level-label {
    min-height: 72px;
    gap: 7px;
  }

  .command-level-toggle {
    min-width: 54px;
    padding: 5px 6px;
  }

  .command-view-level-members {
    grid-template-columns: repeat(var(--command-chart-columns, 2), minmax(204px, 1fr));
    gap: 10px;
  }

  .command-member-card,
  .command-member-placeholder {
    min-height: 82px;
  }

  .command-view-detail {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 52vh;
    overflow-y: auto;
  }

  .command-detail-header,
  .command-detail-person,
  .command-detail-section,
  .command-detail-actions {
    padding: 10px;
  }

  .command-detail-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .command-detail-list div {
    display: grid;
    gap: 3px;
  }

  .command-detail-list dd {
    text-align: left;
  }
}

.operations-hero p {
  margin: 0;
  color: #475569;
}

.operations-session-card {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid rgba(203, 213, 225, 0.86);
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.operations-session-card small,
.operations-card span,
.operations-card small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.operations-session-card strong {
  color: #0f172a;
  font-size: 22px;
}

.operations-session-card span {
  color: #475569;
  font-weight: 800;
}

.operations-access-notice {
  display: grid;
  gap: 4px;
  padding: 13px 15px;
  border: 1px solid #bbf7d0;
  border-left: 5px solid #22c55e;
  border-radius: 10px;
  background: #f0fdf4;
  color: #14532d;
}

.operations-access-notice.blocked {
  border-color: #fed7aa;
  border-left-color: #f97316;
  background: #fff7ed;
  color: #7c2d12;
}

.operations-access-notice span {
  color: inherit;
  opacity: 0.84;
}

.operations-layout {
  display: grid;
  gap: 16px;
}

.operations-section-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.operations-section-head h3,
.operations-role-matrix h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.operations-card-grid {
  display: grid;
  gap: 12px;
}

.operations-card,
.operations-role-matrix {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.operations-card {
  display: grid;
  gap: 9px;
  padding: 16px;
}

.operations-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.operations-card p {
  margin: 0;
  color: #475569;
  line-height: 1.45;
}

.operations-card button {
  margin: 4px 0 0;
}

.operations-card.locked {
  background: #f8fafc;
  opacity: 0.74;
}

.operations-card.locked button {
  cursor: not-allowed;
}

.operations-role-matrix {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.operations-role-matrix div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.operations-role-matrix div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.operations-role-matrix strong {
  color: #0f172a;
}

.operations-role-matrix span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.account-profile-screen {
  display: none;
  gap: 18px;
}

.account-profile-screen.screen.active {
  display: grid;
}

.account-hero {
  display: grid;
  gap: 16px;
  padding: 22px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.06), rgba(37, 99, 235, 0.08)),
    #f8fafc;
}

.account-hero h2 {
  margin: 10px 0 6px;
}

.account-hero p {
  margin: 0;
  color: #475569;
}

.account-auth-state,
.account-form-panel,
.account-summary-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.06);
}

.account-auth-state {
  display: grid;
  gap: 4px;
  padding: 14px;
}

.account-auth-state small {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.account-auth-state strong {
  color: #0f172a;
  font-size: 22px;
}

.account-auth-state span {
  color: #475569;
  font-weight: 800;
}

.account-profile-layout {
  display: grid;
  gap: 16px;
}

.account-auth-panel {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fafc;
}

.account-auth-fields,
.account-auth-actions {
  display: grid;
  gap: 10px;
}

.account-auth-fields label {
  margin-top: 0;
  font-size: 12px;
}

.account-auth-fields input {
  margin-top: 6px;
}

.account-auth-actions button {
  margin: 0;
}

.account-auth-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-radius: 9px;
  background: #fff7ed;
  color: #7c2d12;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
}

.account-auth-status.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #14532d;
}

.account-auth-status.warning {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #7c2d12;
}

.account-form-panel,
.account-summary-panel {
  padding: 16px;
}

.account-form-grid {
  display: grid;
  gap: 12px;
}

.account-form-grid label {
  margin-top: 0;
  font-size: 12px;
}

.account-form-grid input,
.account-form-grid select {
  margin-top: 6px;
}

.account-project-access {
  margin-top: 16px;
}

.account-project-access h3,
.account-summary-panel h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

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

.account-project-option {
  min-height: 68px;
  margin: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.account-project-option input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
}

.account-project-option:has(input:disabled) {
  background: #eef6ff;
  border-color: #bfdbfe;
}

.account-project-option input:disabled {
  cursor: not-allowed;
}

.account-project-option strong,
.account-project-option small {
  display: block;
}

.account-project-option small {
  margin-top: 2px;
  color: #64748b;
}

.account-action-row {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.account-trusted-access {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid #fed7aa;
  border-left: 5px solid #f97316;
  border-radius: 10px;
  background: #fff7ed;
  color: #7c2d12;
}

.account-trusted-access.trusted {
  border-color: #bbf7d0;
  border-left-color: #22c55e;
  background: #f0fdf4;
  color: #14532d;
}

.account-trusted-access div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: baseline;
  justify-content: space-between;
}

.account-trusted-access strong {
  color: inherit;
}

.account-trusted-access span,
.account-trusted-access small {
  color: inherit;
  opacity: 0.84;
  font-size: 12px;
  line-height: 1.35;
}

.account-access-model {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.account-access-model span {
  display: grid;
  gap: 2px;
  padding: 8px;
  border: 1px solid rgba(20, 83, 45, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  font-size: 12px;
}

.account-access-model strong {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.72;
}

.account-access-detail-list {
  display: grid;
  gap: 7px;
  margin-top: 8px;
}

.account-access-detail-list article {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 2px 8px;
  padding: 8px;
  border: 1px solid rgba(20, 83, 45, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
}

.account-access-detail-list article strong {
  grid-row: span 2;
  align-self: center;
}

.account-summary-panel {
  display: grid;
  gap: 12px;
}

.account-summary-panel div {
  display: grid;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e8f0;
}

.account-summary-panel div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.account-summary-panel strong {
  color: #0f172a;
}

.account-summary-panel span {
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.shift-handoff-hero {
  display: grid;
  gap: 10px;
}

.shift-handoff-kicker {
  display: inline-flex;
  width: fit-content;
  padding: 5px 10px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #075985;
  font-size: 12px;
  font-weight: 800;
}

.shift-handoff-hero h2 {
  margin-bottom: 0;
}

.shift-handoff-tabs {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 8px;
  padding: 4px;
  border: 1px solid #d8e2ee;
  border-radius: 12px;
  background: #f8fafc;
}

.shift-handoff-tabs button {
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  box-shadow: none;
  font-weight: 800;
}

.shift-handoff-tabs button.active {
  background: #2563eb;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.22);
}

.shift-handoff-page {
  margin-top: 14px;
}

.shift-handoff-hero-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
}

.shift-handoff-hero-actions button {
  margin: 0;
}

.shift-handoff-history {
  margin-top: 18px;
}

.shift-handoff-history-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e5e7eb;
}

.shift-handoff-history-head h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.shift-handoff-history-head p {
  margin: 4px 0 0;
}

.shift-handoff-history-head button {
  margin: 0;
}

.shift-handoff-history-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.shift-handoff-filters {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr)) auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.shift-handoff-filters label {
  margin-top: 0;
  font-size: 12px;
}

.shift-handoff-filters select,
.shift-handoff-filters button {
  margin: 0;
}

.shift-handoff-empty {
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.shift-handoff-empty strong {
  display: block;
  color: #0f172a;
}

.shift-handoff-empty p {
  margin-bottom: 0;
}

.shift-handoff-storage-notice {
  margin: 0 0 16px;
  padding: 14px 16px;
  border: 1px solid #facc15;
  border-left: 5px solid #d97706;
  border-radius: 8px;
  background: #fffbeb;
  color: #713f12;
}

.handoff-roadmap-draft-notice {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #93c5fd;
  border-radius: 12px;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.handoff-roadmap-draft-notice[hidden] {
  display: none;
}

.handoff-roadmap-draft-notice div {
  display: grid;
  gap: 2px;
}

.handoff-roadmap-draft-notice span {
  color: #2563eb;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.handoff-roadmap-draft-notice strong {
  color: #0f172a;
  font-size: 16px;
}

.handoff-roadmap-draft-notice small,
.handoff-roadmap-draft-notice p {
  color: #475569;
}

.handoff-roadmap-draft-notice p {
  margin: 0;
  font-size: 12px;
}

.roadmap-start-handoff {
  border-color: #93c5fd;
  color: #1d4ed8;
}

.roadmap-daily-update-action {
  background: #2563eb;
  color: #ffffff;
}

.roadmap-submit-qa {
  border-color: #86efac;
  color: #15803d;
}

.roadmap-daily-intent-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
  padding: 12px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #eff6ff;
}

.roadmap-daily-intent-notice strong {
  color: #1d4ed8;
}

.roadmap-daily-intent-notice span {
  color: #475569;
  font-size: 12px;
}

.handoff-reference-chip.roadmap-pending,
.roadmap-linked-activity .roadmap-activity-pending {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.handoff-reference-chip.roadmap-applied,
.roadmap-linked-activity .roadmap-activity-applied {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.handoff-reference-chip.roadmap-review-required,
.roadmap-linked-activity .roadmap-activity-review {
  border-color: #fecaca;
  background: #fef2f2;
  color: #991b1b;
}

.roadmap-conflict-review {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fff7f7;
}

.roadmap-conflict-head {
  display: grid;
  gap: 3px;
}

.roadmap-conflict-head span {
  color: #b91c1c;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-conflict-review article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid #fecaca;
  border-radius: 9px;
  background: #ffffff;
}

.roadmap-conflict-review article > div:first-child {
  display: grid;
  gap: 3px;
}

.roadmap-conflict-review article span,
.roadmap-conflict-review article small {
  color: #64748b;
}

.roadmap-conflict-actions {
  display: flex;
  gap: 8px;
}

.roadmap-conflict-actions button {
  margin: 0;
}

.roadmap-conflict-waiting {
  color: #92400e;
  font-weight: 800;
}

@media (max-width: 720px) {
  .mission-action-center-head,
  .mission-action-alert {
    grid-template-columns: 1fr;
  }

  .mission-action-center-head {
    display: grid;
  }

  .mission-action-center-tabs,
  .mission-action-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mission-action-controls button:first-child {
    grid-column: 1 / -1;
  }

  .mission-action-controls button {
    width: 100%;
  }

  .roadmap-conflict-review article,
  .roadmap-conflict-actions {
    grid-template-columns: 1fr;
  }

  .roadmap-conflict-actions {
    display: grid;
  }
}

.shift-handoff-storage-notice strong {
  display: block;
  margin-bottom: 4px;
  color: #713f12;
}

.shift-handoff-storage-notice p {
  margin: 0;
  color: #854d0e;
  line-height: 1.45;
}

.shift-handoff-select-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: auto;
  margin: 0 0 10px;
  padding: 8px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 13px;
  font-weight: 700;
}

.shift-handoff-select-row input {
  width: 18px;
  height: 18px;
  margin: 0;
  accent-color: #2563eb;
}

.shift-handoff-card.is-selected {
  outline: 3px solid #93c5fd;
  background: #f8fbff;
}

.shift-handoff-form-wrap {
  margin-top: 18px;
}

.handoff-step-progress {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background:
    linear-gradient(rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.035) 1px, transparent 1px),
    #ffffff;
  background-size: 18px 18px;
}

.handoff-step-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.handoff-step-progress-top strong {
  color: #0f172a;
  font-size: 15px;
}

.handoff-step-progress-top span {
  color: #475569;
  font-size: 13px;
  font-weight: 800;
}

.handoff-step-progress-track {
  height: 5px;
  margin-bottom: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.handoff-step-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #16a34a);
  transition: width 180ms ease;
}

.handoff-step-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.handoff-step-list button {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 7px;
  align-items: center;
  min-height: 44px;
  margin: 0;
  padding: 8px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  text-align: left;
}

.handoff-step-list button span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
}

.handoff-step-list button strong {
  overflow-wrap: anywhere;
  color: inherit;
  font-size: 12px;
  line-height: 1.15;
}

.handoff-step-list button.is-active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.handoff-step-list button.is-active span {
  background: #2563eb;
  color: #ffffff;
}

.handoff-step-list button.is-complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.handoff-step-list button.is-complete span {
  background: #16a34a;
  color: #ffffff;
}

.handoff-panel {
  transition: border-color 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.handoff-panel .form-panel-heading {
  cursor: pointer;
}

.handoff-panel:not(.is-active) {
  opacity: 0.82;
}

.handoff-panel:not(.is-active) > :not(.form-panel-heading) {
  display: none;
}

.handoff-panel.is-active {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
}

.handoff-panel.is-complete .form-step {
  background: #16a34a;
}

.handoff-panel.is-complete .form-step::before {
  content: "\2713";
}

.handoff-step-nav {
  display: grid;
  grid-template-columns: minmax(0, 0.6fr) minmax(0, 1.4fr);
  gap: 10px;
  align-items: center;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--handoff-panel-border);
}

.handoff-step-nav button {
  margin: 0;
}

.handoff-step-nav button:only-child {
  grid-column: 1 / -1;
}

.handoff-step-nav small {
  display: block;
  grid-column: 1 / -1;
  color: #166534;
  font-weight: 800;
  text-align: center;
}

.shift-handoff-form-wrap:not(.is-review-ready) .shift-handoff-actions,
.shift-handoff-form-wrap:not(.is-review-ready) .shift-handoff-preview {
  display: none;
}

.shift-handoff-continuation {
  margin-bottom: 14px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 10px;
  background: #eff6ff;
}

.shift-handoff-continuation strong {
  display: block;
  color: #1e3a8a;
}

.shift-handoff-continuation p {
  margin: 6px 0 0;
  color: #334155;
}

.shift-handoff-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 18px;
}

.shift-handoff-actions button {
  margin: 0;
}

.shift-handoff-actions .handoff-review-action {
  min-height: 54px;
  font-size: 16px;
}

.shift-handoff-actions .handoff-cancel-action {
  justify-self: center;
  width: auto;
  min-width: 132px;
  padding: 10px 18px;
  color: #64748b;
}

.shift-handoff-preview {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-left: 5px solid #16a34a;
  border-radius: 10px;
  background: #f0fdf4;
}

.shift-handoff-preview.needs-escalation {
  border-color: #fde68a;
  border-left-color: #d97706;
  background: #fffbeb;
}

.shift-handoff-preview strong {
  display: block;
  margin-bottom: 8px;
  color: #14532d;
}

.shift-handoff-preview p {
  margin: 7px 0;
  color: #334155;
}

.shift-handoff-preview span {
  font-weight: 800;
  color: #0f172a;
}

.shift-handoff-preview small {
  display: block;
  margin-top: 10px;
  color: #166534;
  font-weight: 700;
}

.shift-handoff-save-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  margin-top: 12px;
}

.shift-handoff-save-row button {
  margin: 0;
}

.handoff-save-panel {
  margin-top: 12px;
  padding: 12px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background:
    linear-gradient(rgba(22, 101, 52, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(22, 101, 52, 0.04) 1px, transparent 1px),
    #f8fffb;
  background-size: 18px 18px;
  color: #14532d;
  overflow: hidden;
  position: relative;
}

.handoff-save-panel[hidden] {
  display: none;
}

.handoff-save-panel::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: 42%;
  height: 2px;
  background: #16a34a;
  animation: handoff-save-progress 1.4s ease-in-out infinite;
}

.handoff-save-panel.is-slow {
  border-color: #fde68a;
  background:
    linear-gradient(rgba(217, 119, 6, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(217, 119, 6, 0.045) 1px, transparent 1px),
    #fffbeb;
  color: #78350f;
}

.handoff-save-panel.is-slow::after {
  background: #d97706;
}

.handoff-save-panel-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #0f172a;
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
}

.handoff-save-panel strong {
  display: block;
  margin: 0 0 3px;
  color: inherit;
  font-size: 14px;
}

.handoff-save-panel p {
  margin: 0;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

@keyframes handoff-save-progress {
  0% {
    transform: translateX(-105%);
  }
  55% {
    transform: translateX(90%);
  }
  100% {
    transform: translateX(245%);
  }
}

.handoff-celebration {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: rgba(15, 23, 42, 0.08);
  pointer-events: none;
  animation: handoffScreenIn 260ms ease-out both;
}

.handoff-celebration.is-leaving {
  animation: handoffScreenOut 420ms ease-in both;
}

.handoff-celebration-card {
  position: relative;
  z-index: 2;
  width: min(360px, calc(100vw - 32px));
  padding: 22px 24px 20px;
  border: 1px solid #bbf7d0;
  border-top: 5px solid #16a34a;
  border-radius: 18px;
  background: #f0fdf4;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.26);
  text-align: center;
  animation: handoffToastIn 360ms ease-out both;
}

.handoff-celebration.is-leaving .handoff-celebration-card {
  animation: handoffToastOut 420ms ease-in both;
}

.handoff-celebration-card strong {
  display: block;
  color: #14532d;
  font-size: 17px;
}

.handoff-celebration-card small {
  display: block;
  margin-top: 4px;
  color: #166534;
  font-weight: 700;
}

.handoff-fireworks {
  position: absolute;
  top: 25%;
  width: 120px;
  height: 90px;
  pointer-events: none;
}

.handoff-fireworks-left {
  left: min(14vw, 150px);
}

.handoff-fireworks-right {
  right: min(14vw, 150px);
}

.handoff-fireworks span {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #f59e0b;
  box-shadow:
    0 -18px 0 #2563eb,
    16px -8px 0 #16a34a,
    -16px -8px 0 #f97316,
    12px 13px 0 #a855f7,
    -12px 13px 0 #22c55e;
  opacity: 0;
  animation: handoffFirework 1600ms ease-out both;
}

.handoff-fireworks span:nth-child(1) {
  left: 12px;
  top: 48px;
}

.handoff-fireworks span:nth-child(2) {
  left: 54px;
  top: 24px;
  background: #2563eb;
  animation-delay: 90ms;
}

.handoff-fireworks span:nth-child(3) {
  right: 12px;
  top: 50px;
  background: #16a34a;
  animation-delay: 160ms;
}

.handoff-confetti {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.handoff-confetti span {
  position: absolute;
  width: 8px;
  height: 14px;
  border-radius: 2px;
  background: #f59e0b;
  opacity: 0;
}

.handoff-confetti-fall span {
  top: -24px;
  animation: handoffConfettiFall 3000ms cubic-bezier(0.15, 0.7, 0.3, 1) both;
}

.handoff-confetti-fall span:nth-child(1) {
  left: 5%;
  background: #2563eb;
  --fall-x: 36px;
  animation-delay: 20ms;
}

.handoff-confetti-fall span:nth-child(2) {
  left: 13%;
  background: #16a34a;
  --fall-x: -20px;
  animation-delay: 120ms;
}

.handoff-confetti-fall span:nth-child(3) {
  left: 22%;
  background: #f97316;
  --fall-x: 48px;
  animation-delay: 60ms;
}

.handoff-confetti-fall span:nth-child(4) {
  left: 31%;
  background: #a855f7;
  --fall-x: -34px;
  animation-delay: 180ms;
}

.handoff-confetti-fall span:nth-child(5) {
  left: 40%;
  background: #22c55e;
  --fall-x: 24px;
  animation-delay: 260ms;
}

.handoff-confetti-fall span:nth-child(6) {
  left: 50%;
  background: #eab308;
  --fall-x: -46px;
  animation-delay: 40ms;
}

.handoff-confetti-fall span:nth-child(7) {
  left: 60%;
  background: #06b6d4;
  --fall-x: 42px;
  animation-delay: 160ms;
}

.handoff-confetti-fall span:nth-child(8) {
  left: 70%;
  background: #ef4444;
  --fall-x: -28px;
  animation-delay: 90ms;
}

.handoff-confetti-fall span:nth-child(9) {
  left: 78%;
  background: #2563eb;
  --fall-x: 24px;
  animation-delay: 220ms;
}

.handoff-confetti-fall span:nth-child(10) {
  left: 85%;
  background: #16a34a;
  --fall-x: -38px;
  animation-delay: 130ms;
}

.handoff-confetti-fall span:nth-child(11) {
  left: 92%;
  background: #f97316;
  --fall-x: 18px;
  animation-delay: 280ms;
}

.handoff-confetti-fall span:nth-child(12) {
  left: 18%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #ec4899;
  --fall-x: 72px;
  animation-delay: 320ms;
}

.handoff-confetti-fall span:nth-child(13) {
  left: 47%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #14b8a6;
  --fall-x: 54px;
  animation-delay: 210ms;
}

.handoff-confetti-fall span:nth-child(14) {
  left: 74%;
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #f59e0b;
  --fall-x: -66px;
  animation-delay: 300ms;
}

.handoff-confetti-burst span {
  left: 50%;
  top: 50%;
  animation: handoffConfettiBurst 2100ms ease-out both;
}

.handoff-confetti-burst span:nth-child(1) {
  background: #2563eb;
  --confetti-x: -42vw;
  --confetti-y: -28vh;
  --confetti-rotate: -34deg;
}

.handoff-confetti-burst span:nth-child(2) {
  background: #16a34a;
  --confetti-x: 40vw;
  --confetti-y: -30vh;
  --confetti-rotate: 28deg;
  animation-delay: 45ms;
}

.handoff-confetti-burst span:nth-child(3) {
  background: #f97316;
  --confetti-x: -43vw;
  --confetti-y: 14vh;
  --confetti-rotate: 74deg;
  animation-delay: 90ms;
}

.handoff-confetti-burst span:nth-child(4) {
  background: #a855f7;
  --confetti-x: 42vw;
  --confetti-y: 16vh;
  --confetti-rotate: -74deg;
  animation-delay: 120ms;
}

.handoff-confetti-burst span:nth-child(5) {
  background: #22c55e;
  --confetti-x: -24vw;
  --confetti-y: 34vh;
  --confetti-rotate: 120deg;
  animation-delay: 70ms;
}

.handoff-confetti-burst span:nth-child(6) {
  background: #eab308;
  --confetti-x: 28vw;
  --confetti-y: 35vh;
  --confetti-rotate: -118deg;
  animation-delay: 130ms;
}

.handoff-confetti-burst span:nth-child(7) {
  background: #06b6d4;
  --confetti-x: -10vw;
  --confetti-y: -39vh;
  --confetti-rotate: 22deg;
  animation-delay: 20ms;
}

.handoff-confetti-burst span:nth-child(8) {
  background: #ef4444;
  --confetti-x: 10vw;
  --confetti-y: -40vh;
  --confetti-rotate: -22deg;
  animation-delay: 150ms;
}

@keyframes handoffScreenIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes handoffScreenOut {
  from {
    opacity: 1;
  }

  to {
    opacity: 0;
  }
}

@keyframes handoffToastIn {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes handoffToastOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(8px) scale(0.96);
  }
}

@keyframes handoffFirework {
  0% {
    opacity: 0;
    transform: translateY(8px) scale(0.5) rotate(0deg);
  }

  35% {
    opacity: 1;
    transform: translateY(-8px) scale(1.25) rotate(18deg);
  }

  100% {
    opacity: 0;
    transform: translateY(-28px) scale(1.7) rotate(42deg);
  }
}

@keyframes handoffConfettiFall {
  0% {
    opacity: 0;
    transform: translate(0, 0) rotate(0deg);
  }

  12% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(var(--fall-x), 108vh) rotate(420deg);
  }
}

@keyframes handoffConfettiBurst {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6) rotate(0deg);
  }

  18% {
    opacity: 1;
  }

  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--confetti-x)), calc(-50% + var(--confetti-y))) scale(1) rotate(var(--confetti-rotate));
  }
}

@media (prefers-reduced-motion: reduce) {
  .handoff-celebration,
  .handoff-celebration.is-leaving,
  .handoff-celebration-card,
  .handoff-celebration.is-leaving .handoff-celebration-card,
  .handoff-confetti span,
  .handoff-fireworks span {
    animation: none;
  }
}

.shift-handoff-card {
  --handoff-accent: #2563eb;
  --handoff-accent-soft: #eff6ff;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid #d8e2ee;
  border-left: 5px solid var(--handoff-accent);
  border-radius: 10px;
  background: #ffffff;
}

.shift-handoff-card.handoff-accent-blue {
  --handoff-accent: #2563eb;
  --handoff-accent-soft: #eff6ff;
}

.shift-handoff-card.handoff-accent-green {
  --handoff-accent: #16a34a;
  --handoff-accent-soft: #f0fdf4;
}

.shift-handoff-card.handoff-accent-purple {
  --handoff-accent: #7c3aed;
  --handoff-accent-soft: #f5f3ff;
}

.shift-handoff-card.handoff-accent-orange {
  --handoff-accent: #ea580c;
  --handoff-accent-soft: #fff7ed;
}

.shift-handoff-card.handoff-accent-teal {
  --handoff-accent: #0f766e;
  --handoff-accent-soft: #f0fdfa;
}

.shift-handoff-card.handoff-accent-rose {
  --handoff-accent: #e11d48;
  --handoff-accent-soft: #fff1f2;
}

.shift-handoff-card.needs-escalation {
  border-left-color: #d97706;
  background: linear-gradient(90deg, #fffbeb 0, #fffbeb 45%, var(--handoff-accent-soft) 100%);
}

.shift-handoff-card:not(.needs-escalation) {
  background: linear-gradient(90deg, #ffffff 0, #ffffff 58%, var(--handoff-accent-soft) 100%);
}

.shift-handoff-card.is-complete {
  border-left-color: #16a34a;
  background: linear-gradient(90deg, #f8fafc 0, #f8fafc 62%, #f0fdf4 100%);
  opacity: 0.92;
}

.shift-handoff-card.is-complete .handoff-progress-top span,
.shift-handoff-card.is-complete .shift-handoff-card-head p,
.shift-handoff-card.is-complete .shift-handoff-meta span {
  color: #64748b;
}

.shift-handoff-card.is-complete .handoff-progress-track span {
  background: linear-gradient(90deg, #16a34a, #86efac);
}

.shift-handoff-scope-toggle {
  width: 100%;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  text-align: left;
}

.shift-handoff-scope-toggle:hover {
  background: transparent;
  transform: none;
}

.shift-handoff-scope-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 6px;
  border-radius: 8px;
}

.shift-handoff-scope-main {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.shift-handoff-scope-main strong {
  color: #0f172a;
  font-size: 16px;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.shift-handoff-scope-main small {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.shift-handoff-scope-meta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.shift-handoff-scope-meta .shift-handoff-flags {
  justify-content: flex-end;
}

.shift-handoff-scope-count {
  white-space: nowrap;
  padding: 6px 9px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 11px;
  font-weight: 900;
}

.shift-handoff-scope-chevron {
  width: 18px;
  height: 18px;
  position: relative;
  flex: 0 0 auto;
}

.shift-handoff-scope-chevron::before {
  content: "";
  position: absolute;
  inset: 4px 5px 6px;
  border-right: 2px solid #64748b;
  border-bottom: 2px solid #64748b;
  transform: rotate(45deg);
  transition: transform 180ms ease;
}

.shift-handoff-scope-toggle[aria-expanded="true"] .shift-handoff-scope-chevron::before {
  transform: translateY(4px) rotate(225deg);
}

.shift-handoff-expanded {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.shift-handoff-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.shift-handoff-card-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.shift-direction-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.handoff-progress {
  margin: 12px 0;
}

.handoff-progress-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.handoff-progress-top strong {
  color: #0f172a;
}

.handoff-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #e2e8f0;
}

.handoff-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--handoff-accent, #2563eb), #16a34a);
}

.handoff-progress small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.building-pulse {
  display: grid;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: linear-gradient(135deg, #ffffff, #f8fbff);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.building-pulse-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.building-pulse-head div {
  display: grid;
  gap: 2px;
}

.building-pulse-head span {
  color: #2563eb;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.building-pulse-head strong {
  color: #0f172a;
  font-size: 18px;
}

.building-pulse-head p {
  margin: 0;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.building-pulse-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
}

.building-pulse-card {
  min-height: 76px;
  display: grid;
  align-content: center;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 11px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: none;
  text-align: left;
  cursor: pointer;
}

.building-pulse-card strong {
  color: #0f172a;
  font-size: 24px;
  line-height: 1;
}

.building-pulse-card span {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.building-pulse-card.active {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.building-pulse-card.blocked {
  border-color: #fecaca;
  background: #fff1f2;
}

.building-pulse-card.qa-ready {
  border-color: #fde68a;
  background: #fffbeb;
}

.building-pulse-card.complete {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.building-pulse-card.waiting {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.building-pulse-card.is-active {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  transform: translateY(-1px);
}

.building-pulse-detail {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}

.building-pulse-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.building-pulse-detail-head strong {
  color: #0f172a;
  font-size: 15px;
}

.building-pulse-detail-head .compact-button {
  width: auto;
  min-height: 34px;
  margin: 0;
  padding: 8px 12px;
}

.building-pulse-detail-row {
  display: grid;
  gap: 3px;
  width: 100%;
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: none;
  color: #1f2937;
  text-align: left;
}

.building-pulse-detail-row span {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.building-pulse-detail-row small {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

.building-pulse-detail-row em {
  color: #64748b;
  font-size: 12px;
  font-style: normal;
}

.handoff-scope-snapshot {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.72);
}

.handoff-scope-counts,
.handoff-scope-crews {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.handoff-scope-counts span,
.handoff-scope-crews strong,
.handoff-scope-crews span {
  display: inline-flex;
  min-height: 25px;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.handoff-scope-counts strong {
  margin-right: 4px;
  color: #0f172a;
}

.handoff-scope-counts .needs-attention {
  background: #fee2e2;
  color: #991b1b;
}

.handoff-scope-counts .needs-attention strong {
  color: #7f1d1d;
}

.handoff-scope-counts .qa-ready {
  background: #fef3c7;
  color: #92400e;
}

.handoff-scope-counts .qa-ready strong {
  color: #78350f;
}

.handoff-scope-crews span {
  background: transparent;
  padding-left: 0;
  color: #64748b;
}

.handoff-scope-crews strong {
  background: #eef2ff;
  color: #3730a3;
}

.handoff-scope-alert {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
}

.handoff-scope-alert span {
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.handoff-scope-alert strong {
  color: #0f172a;
}

.handoff-scope-alert.blocked {
  border: 1px solid #fecaca;
  background: #fff1f2;
}

.handoff-scope-alert.qa-ready {
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.handoff-completion-slider {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 12px;
  margin: 10px 0 4px;
  padding: 12px;
  border: 1px solid #dbe4ef;
  border-radius: 8px;
  background: #f8fafc;
}

.handoff-completion-slider input[type="range"] {
  width: 100%;
  height: 32px;
  margin: 0;
  accent-color: #2563eb;
  cursor: pointer;
}

.handoff-completion-slider strong {
  min-width: 52px;
  padding: 6px 10px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 14px;
  text-align: center;
}

.handoff-live-progress {
  display: grid;
  gap: 6px;
  margin: 10px 0 16px;
  padding: 11px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fbff;
}

.handoff-live-progress > strong {
  color: #0f172a;
  font-size: 13px;
}

.handoff-live-progress .handoff-progress {
  margin: 2px 0;
}

.handoff-live-progress p {
  margin: 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.work-step-builder {
  display: grid;
}

.handoff-work-step-list,
.handoff-work-step-summary {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.handoff-work-step-summary {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ccfbf1;
  border-radius: 10px;
  background: #f0fdfa;
}

.handoff-work-step-summary > strong {
  color: #115e59;
}

.handoff-work-step-card,
.handoff-work-step-empty {
  padding: 11px;
  border: 1px solid #dbe4ef;
  border-radius: 10px;
  background: #ffffff;
}

.handoff-work-step-empty {
  border-style: dashed;
  background: #f8fafc;
}

.handoff-work-step-empty strong {
  display: block;
  color: #0f172a;
}

.handoff-work-step-empty p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.handoff-work-step-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}

.handoff-work-step-top strong {
  color: #0f172a;
}

.handoff-work-step-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 7px;
}

.handoff-work-step-meta span {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.handoff-work-step-card p {
  margin: 8px 0 0;
  color: #475569;
  font-size: 13px;
}

.handoff-work-step-card button {
  width: auto;
  min-height: 34px;
  margin: 10px 0 0;
  padding: 7px 10px;
  font-size: 12px;
}

.work-step-status-row {
  display: inline-flex;
  gap: 8px;
  align-items: center;
}

.work-step-status-select {
  min-height: 28px;
  border-radius: 6px;
  border: 1px solid #dbe4ef;
  background: #fff;
  padding: 2px 8px;
  color: #1f2937;
  font-size: 12px;
  font-weight: 700;
}

.work-step-status {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.work-step-status.planned {
  background: #e2e8f0;
  color: #334155;
}

.work-step-status.in-progress {
  background: #dbeafe;
  color: #1d4ed8;
}

.work-step-status.blocked {
  background: #fee2e2;
  color: #b91c1c;
}

.work-step-status.qa-ready {
  background: #fef3c7;
  color: #92400e;
}

.work-step-status.complete {
  background: #dcfce7;
  color: #166534;
}

.shift-handoff-card-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.shift-handoff-card-actions button {
  margin: 0;
}

.shift-handoff-timeline-dropdown {
  margin-top: 12px;
}

.shift-handoff-timeline-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  margin: 0;
  min-height: 48px;
  padding: 13px 14px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
  color: #0f1f3d;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
  font-weight: 800;
  text-align: left;
}

.shift-handoff-timeline-toggle:hover {
  border-color: #2563eb;
  background: #eff6ff;
  color: #0f3f9f;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.14);
}

.shift-handoff-timeline-toggle:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.22);
  outline-offset: 2px;
  border-color: #2563eb;
}

.shift-handoff-timeline-chevron {
  width: 10px;
  height: 10px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg);
  transition: transform 160ms ease;
}

.shift-handoff-timeline-toggle[aria-expanded="true"] .shift-handoff-timeline-chevron {
  transform: rotate(225deg);
}

.handoff-accept-button {
  background: #f97316;
  color: #111827;
  border: 1px solid #fb923c;
  box-shadow: 0 2px 10px rgba(251, 146, 60, 0.2);
}

.handoff-accept-button:hover {
  background: #ea580c;
}

.shift-handoff-acceptance {
  display: grid;
  gap: 3px;
  margin: 12px 0;
  padding: 10px;
  border-radius: 10px;
  font-size: 13px;
}

.shift-handoff-acceptance strong {
  color: #0f172a;
}

.shift-handoff-acceptance span,
.shift-handoff-acceptance p {
  margin: 0;
  color: #475569;
}

.shift-handoff-acceptance.accepted {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
}

.shift-handoff-acceptance.pending {
  border: 1px solid #fde68a;
  background: #fffbeb;
}

.previous-handoff-reference {
  margin: 0 0 10px;
  padding: 9px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.previous-handoff-reference-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

.previous-handoff-reference-head strong {
  display: block;
  color: #1e3a8a;
  font-size: 13px;
}

.previous-handoff-reference-head p {
  margin: 2px 0 0;
  color: #475569;
  font-size: 12px;
}

.previous-handoff-reference-head button {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  font-size: 12px;
}

.previous-handoff-reference-body {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid #bfdbfe;
}

.previous-handoff-reference-body p {
  margin: 5px 0;
  color: #334155;
  font-size: 13px;
}

.previous-handoff-reference-body span {
  color: #0f172a;
  font-weight: 800;
}

.shift-handoff-card-head strong {
  display: block;
  color: #0f172a;
}

.shift-handoff-card-head p,
.shift-handoff-meta span,
.shift-handoff-detail p {
  margin: 5px 0;
  color: #475569;
  font-size: 14px;
}

.shift-handoff-meta strong {
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.task-type-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  margin: 6px 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
  font-weight: 800;
}

.handoff-reference-chip {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  min-height: 24px;
  margin: 6px 6px 6px 0;
  padding: 4px 9px;
  border-radius: 999px;
  background: #ecfeff;
  color: #0e7490;
  font-size: 12px;
  font-weight: 800;
}

.handoff-reference-summary {
  margin: 12px 0;
  padding: 10px;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  background: #f0f9ff;
}

.handoff-reference-summary > strong {
  display: block;
  margin-bottom: 5px;
  color: #0c4a6e;
}

.handoff-reference-summary p {
  margin: 0 0 8px;
  color: #334155;
  font-size: 13px;
}

.handoff-reference-summary .attachment-gallery {
  margin-top: 8px;
}

.handoff-reference-tray {
  display: grid;
  gap: 8px;
  margin: 10px 0 14px;
}

.handoff-reference-empty {
  padding: 10px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #64748b;
  font-size: 13px;
}

.handoff-reference-tray-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #eff6ff;
}

.handoff-reference-tray-head strong {
  color: #1e3a8a;
  font-size: 13px;
}

.handoff-reference-list {
  display: grid;
  gap: 8px;
}

.handoff-reference-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.handoff-reference-item strong,
.handoff-reference-item span {
  display: block;
  overflow-wrap: anywhere;
}

.handoff-reference-item span {
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
}

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

.handoff-reference-item-actions button {
  margin: 0;
}

.shift-handoff-flags {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
}

.shift-handoff-meta {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  margin: 10px 0;
}

.shift-handoff-detail {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e2e8f0;
}

.shift-handoff-detail span {
  color: #0f172a;
  font-weight: 800;
}

.shift-handoff-detail small {
  display: block;
  margin-top: 10px;
  color: #64748b;
  font-weight: 700;
}

.shift-handoff-timeline {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.shift-handoff-timeline > strong {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
}

.shift-handoff-timeline-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 10px;
  padding: 12px 0;
  border-top: 1px solid #eef2f7;
}

.shift-handoff-timeline-item:first-of-type {
  border-top: 0;
}

.shift-handoff-timeline-dot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 900;
}

.shift-handoff-timeline-item p {
  margin: 5px 0;
  color: #475569;
  font-size: 14px;
}

.shift-handoff-timeline-item span {
  color: #0f172a;
  font-weight: 800;
}

.shift-handoff-timeline-item small {
  display: block;
  margin-top: 8px;
  color: #64748b;
  font-weight: 700;
}

.field-hint {
  margin: -4px 0 12px;
  color: #64748b;
  font-size: 13px;
}

input.trusted-member-identity[readonly] {
  border-color: #93c5fd;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 800;
  cursor: default;
}

input.trusted-member-identity[readonly]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.form-panel {
  margin-top: 16px;
  padding: 16px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #f8fafc;
}

.form-panel-heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

.form-panel-heading h3 {
  margin: 0;
  padding: 0;
  border: 0;
  color: #0f172a;
  font-size: 17px;
}

.form-step {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 32px;
  border-radius: 6px;
  background: #0f172a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
}

.handoff-panel {
  --handoff-panel-accent: #2563eb;
  --handoff-panel-bg: #f8fbff;
  --handoff-panel-border: #bfdbfe;
  position: relative;
  overflow: hidden;
  border-color: var(--handoff-panel-border);
  border-left: 5px solid var(--handoff-panel-accent);
  background:
    linear-gradient(90deg, var(--handoff-panel-bg) 0, #ffffff 72%),
    #ffffff;
}

.handoff-panel .form-panel-heading {
  border-bottom-color: var(--handoff-panel-border);
}

.handoff-panel .form-step {
  background: var(--handoff-panel-accent);
}

.handoff-panel-info {
  --handoff-panel-accent: #2563eb;
  --handoff-panel-bg: #eff6ff;
  --handoff-panel-border: #bfdbfe;
}

.handoff-panel-people {
  --handoff-panel-accent: #16a34a;
  --handoff-panel-bg: #f0fdf4;
  --handoff-panel-border: #bbf7d0;
}

.handoff-panel-worksteps {
  --handoff-panel-accent: #0f766e;
  --handoff-panel-bg: #f0fdfa;
  --handoff-panel-border: #99f6e4;
}

.handoff-panel-summary {
  --handoff-panel-accent: #7c3aed;
  --handoff-panel-bg: #f5f3ff;
  --handoff-panel-border: #ddd6fe;
}

.handoff-panel-priority {
  --handoff-panel-accent: #d97706;
  --handoff-panel-bg: #fffbeb;
  --handoff-panel-border: #fde68a;
}

.handoff-panel-safety {
  --handoff-panel-accent: #dc2626;
  --handoff-panel-bg: #fff1f2;
  --handoff-panel-border: #fecdd3;
}

.handoff-panel-references {
  --handoff-panel-accent: #0891b2;
  --handoff-panel-bg: #ecfeff;
  --handoff-panel-border: #a5f3fc;
}

.handoff-panel-signoff {
  --handoff-panel-accent: #0f766e;
  --handoff-panel-bg: #f0fdfa;
  --handoff-panel-border: #99f6e4;
}

label {
  display: block;
  font-weight: bold;
  margin-top: 14px;
  margin-bottom: 6px;
}

.required-label::after,
.required-star {
  content: " *";
  color: #dc2626;
  font-weight: bold;
}

input,
select,
textarea {
  width: 100%;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 16px;
  background: white;
}

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

.validation-focus {
  outline: 3px solid rgba(37, 99, 235, 0.5);
  outline-offset: 4px;
  scroll-margin: 120px;
  transition: outline-color 0.18s ease, box-shadow 0.18s ease;
}

.validation-focus:not(input):not(select):not(textarea) {
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.iac-section {
  margin-top: 18px;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #1d4ed8;
  border-radius: 8px;
  background: #f8fafc;
}

.iac-section-heading {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #bfdbfe;
}

.iac-section-heading h3 {
  margin: 0;
  padding: 0;
  border: 0;
}

.iac-kicker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 46px;
  padding: 6px 8px;
  border-radius: 6px;
  background: #1e3a8a;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
}

button {
  width: 100%;
  padding: 15px;
  margin-top: 14px;
  border: none;
  border-radius: 12px;
  background: #2563eb;
  color: white;
  font-size: 17px;
  font-weight: bold;
  cursor: pointer;
}

.inspection-action-row {
  display: grid;
  grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr);
  gap: 10px;
  margin-top: 18px;
}

.test-fill-button,
.submit-inspection-button {
  display: block;
  width: 100%;
  margin-top: 0;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
}

.test-fill-button {
  background: #475569;
}

.submit-inspection-button {
  background: #166534;
}

.submit-inspection-button:hover {
  background: #14532d;
}

button:hover {
  opacity: 0.92;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

button.secondary {
  background: #475569;
}

button.danger {
  background: #dc2626;
}

button.approve {
  background: #16a34a;
}

button.compact-button {
  padding: 11px;
  font-size: 15px;
}

.status-counts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 16px;
}

.manager-action-groups {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}

.manager-action-group {
  display: grid;
  gap: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  padding: 12px;
}

.manager-action-group h3 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
}

.manager-action-grid {
  display: grid;
  gap: 10px;
}

.project-setup-card {
  margin-bottom: 14px;
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.project-setup-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.project-setup-head p {
  margin: 4px 0 0;
  max-width: 680px;
  color: #475569;
  font-size: 15px;
  line-height: 1.5;
}

.project-setup-panel {
  display: grid;
  gap: 16px;
  padding-top: 8px;
}

.project-setup-panel[hidden] {
  display: none;
}

.project-setup-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.project-setup-list button {
  display: grid;
  gap: 4px;
  width: 100%;
  margin: 0;
  padding: 13px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #0f172a;
  text-align: left;
}

.project-setup-list button strong {
  font-size: 15px;
}

.project-setup-list button span {
  color: #334155;
  font-size: 14px;
}

.project-setup-list button.active {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.08);
}

.project-setup-list small {
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.project-setup-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
}

.project-setup-form > div {
  min-width: 0;
}

.project-setup-form label {
  display: block;
  margin-bottom: 7px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.project-setup-form input {
  min-height: 54px;
  padding: 15px 16px;
  border-color: #b6c7dc;
  border-radius: 8px;
  color: #0f172a;
  font-size: 17px;
  line-height: 1.25;
}

.project-setup-form input::placeholder {
  color: #94a3b8;
}

.project-setup-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
  outline: none;
}

.project-setup-wide {
  grid-column: 1 / -1;
}

.project-setup-wide input {
  font-weight: 700;
}

.project-setup-panel .field-link-actions {
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  margin-top: 0;
}

.project-setup-status {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-size: 14px;
  font-weight: 700;
}

.project-setup-status[hidden] {
  display: none;
}

.project-setup-status[data-tone="success"] {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.project-setup-status[data-tone="warning"] {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.status-count-card {
  width: 100%;
  margin: 0;
  padding: 10px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
  color: inherit;
  text-align: left;
  cursor: default;
}

.status-count-card strong {
  display: block;
  font-size: 24px;
  color: #0f172a;
}

.status-count-card span {
  display: block;
  margin-top: 2px;
  color: #64748b;
  font-size: 13px;
}

.status-count-card.clickable {
  cursor: pointer;
}

.status-count-card.clickable:hover {
  opacity: 1;
  border-color: #93c5fd;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.12);
}

.status-count-card:disabled {
  opacity: 1;
}

.status-count-card.approved {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.status-count-card.rejected {
  border-color: #fecaca;
  background: #fef2f2;
}

.status-count-card.warn {
  border-color: #fde68a;
  background: #fffbeb;
}

.archive-filters {
  margin-bottom: 16px;
  padding: 12px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  background: #f8fafc;
}

.archive-filters label {
  margin-top: 10px;
}

.archive-status-tabs {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.archive-status-tabs button {
  margin: 0;
  padding: 10px 8px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #334155;
  font-size: 14px;
}

.archive-status-tabs button.active {
  border-color: #2563eb;
  background: #eff6ff;
  color: #1d4ed8;
}

.archive-status-tabs button.warn-tab {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #92400e;
}

.archive-selection-bar {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) repeat(4, minmax(0, auto));
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.archive-selection-bar span {
  color: #1e3a8a;
  font-weight: 700;
}

.archive-selection-bar button {
  width: auto;
  margin: 0;
  white-space: nowrap;
}

.phase-roadmap {
  margin: 16px 0;
}

.phase-roadmap summary {
  cursor: pointer;
  color: #334155;
  font-weight: 700;
}

.phase-roadmap[open] summary {
  margin-bottom: 12px;
}

.system-status-panel {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.system-status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

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

.system-status-grid > div {
  min-height: 58px;
  padding: 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #fff;
}

.system-status-grid span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 12px;
}

.system-status-grid strong {
  display: block;
  color: #0f172a;
  font-size: 14px;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status-badge.ok {
  background: #dcfce7;
  color: #166534;
}

.status-badge.warn {
  background: #fef3c7;
  color: #92400e;
}

.status-badge.neutral {
  background: #e2e8f0;
  color: #334155;
}

.system-status-note {
  margin: 10px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.shared-storage-downtime-notice {
  margin: 0 0 12px;
  padding: 12px;
  border: 1px solid #f59e0b;
  border-radius: 8px;
  background: #fffbeb;
  color: #78350f;
}

.shared-storage-downtime-notice strong {
  display: block;
  margin-bottom: 4px;
}

.shared-storage-downtime-notice p {
  margin: 0;
  line-height: 1.45;
}

.shared-storage-downtime-notice small,
.shift-handoff-storage-notice small {
  display: block;
  margin-top: 8px;
  color: #92400e;
  overflow-wrap: anywhere;
}

.downtime-sync-button {
  margin-top: 10px;
}

.sms-toggle-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.sms-toggle-card.enabled {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.sms-toggle-card.disabled {
  border-color: #fde68a;
  background: #fffbeb;
}

.sms-toggle-card strong {
  color: #0f172a;
}

.sms-toggle-card p {
  margin: 4px 0 0;
}

.sms-switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  font-weight: 800;
  white-space: nowrap;
}

.sms-switch input {
  width: 20px;
  height: 20px;
  margin: 0;
}

.system-status-actions {
  margin-top: 12px;
}

.notification-sender-card {
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.notification-preview {
  margin: 8px 0 0;
  padding: 10px;
  border: 1px dashed #94a3b8;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-family: Consolas, "Courier New", monospace;
  font-size: 0.88rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.system-status-actions label {
  margin-top: 0;
}

.inline-test-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.inline-test-row input {
  margin: 0;
}

.phase-status {
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 8px;
}

.phase-complete {
  border-left: 4px solid #16a34a;
  background: #f0fdf4;
}

.phase-pending {
  border-left: 4px solid #94a3b8;
  background: #f8fafc;
}

.phase-status p {
  margin: 6px 0 0;
}

.future-feature {
  margin-bottom: 16px;
  padding: 12px;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
}

.future-feature p {
  margin: 6px 0 0;
}

.field-link-builder {
  margin: 16px 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #eff6ff;
}

.field-links-section {
  scroll-margin-top: 18px;
}

.builder-workflow-step {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  align-items: flex-start;
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: linear-gradient(135deg, #eff6ff, #f8fafc);
}

.workflow-step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 0 10px;
  height: 32px;
  border-radius: 999px;
  background: #0f766e;
  color: #ffffff;
  font-weight: 800;
  font-size: 14px;
}

.workflow-step-content h3 {
  margin: 0;
  font-size: 15px;
}

.workflow-step-content p {
  margin: 6px 0 0;
}

.builder-subtabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
  padding: 6px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fafc;
}

.builder-tab-button {
  margin: 0;
  border-radius: 8px;
}

.builder-tab-button.active {
  background: #0f766e;
  border-color: #0f766e;
  color: #ffffff;
}

.builder-subtab-panel[hidden] {
  display: none;
}

.builder-subtab-panel {
  margin-top: 4px;
}

.builder-divider {
  margin: 18px 0;
  height: 1px;
  background: linear-gradient(to right, #e2e8f0, #cbd5e1, #e2e8f0);
}

.field-links-section .field-link-builder {
  background: #ffffff;
  border-color: #cbd5e1;
}

.portal-link-builder {
  border-color: #99f6e4;
  background: #f0fdfa;
}

.portal-link-builder h4 {
  margin: 0 0 6px;
  font-size: 16px;
}

.assignment-link-builder {
  background: #f8fafc;
}

.assignment-link-builder summary {
  cursor: pointer;
  color: #334155;
  font-weight: 800;
}

.assignment-link-builder[open] summary {
  margin-bottom: 10px;
}

.field-link-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
}

.field-link-actions button {
  margin-top: 14px;
}

.link-preview {
  min-height: 86px;
  font-size: 13px;
  color: #334155;
  background: #f8fafc;
}

.field-link-manager-heading,
.field-portal-link-title,
.field-portal-link-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
}

.field-portal-link-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.field-portal-link-card {
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

.field-portal-link-card.closed,
.field-portal-link-card.expired {
  background: #f8fafc;
  opacity: 0.82;
}

.field-link-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.field-link-status.closed,
.field-link-status.expired {
  background: #fee2e2;
  color: #991b1b;
}

.field-portal-card-actions {
  display: grid;
  min-width: 140px;
  gap: 8px;
}

.field-portal-card-actions button {
  margin: 0;
}

.assignment-banner {
  margin: 0 0 16px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

.correction-history {
  margin-top: 12px;
  padding: 10px;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
}

.correction-history p {
  margin: 8px 0 0;
}

.original-submission {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.original-submission p {
  margin: 8px 0 0;
}

.original-checklist {
  margin-top: 12px;
}

.correction-card {
  padding: 14px 0;
}

.correction-summary p {
  margin: 8px 0 0;
}

.correction-reason {
  padding: 10px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b;
}

.correction-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

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

.question-card {
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  padding: 0;
  border-radius: 12px;
  margin-bottom: 12px;
}

.question-card strong {
  display: block;
  margin-bottom: 10px;
}

.check-item{
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  margin: 0;
  border-radius: 12px;
  background: #fff;
  cursor: pointer;
}

.check-item input{
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
}

.photo-box {
  border: 1px dashed #94a3b8;
  padding: 12px;
  border-radius: 12px;
  margin-bottom: 12px;
  background: #f8fafc;
}

.photo-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.photo-help {
  margin: 4px 0 8px;
}

.file-choice {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font-weight: 700;
  text-align: center;
  cursor: pointer;
}

.file-choice.secondary-choice {
  background: #475569;
}

.file-choice input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.photo-form-preview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.selected-photo-thumb {
  display: grid;
  gap: 6px;
}

.remove-photo {
  min-height: 0;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 12px;
}

.archive-photos {
  margin-top: 14px;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.photo-thumb {
  display: block;
  width: 100%;
  padding: 0;
  margin: 0;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  color: #334155;
  text-decoration: none;
}

.photo-thumb img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: #e2e8f0;
}

.photo-thumb span {
  display: grid;
  min-height: 98px;
  place-items: center;
  color: #64748b;
}

.photo-thumb small {
  display: block;
  padding: 8px;
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

.photo-preview {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  padding: 18px;
  background: rgba(15, 23, 42, 0.82);
}

.photo-preview.active {
  display: grid;
  place-items: center;
}

.photo-preview-panel {
  width: min(920px, 100%);
  max-height: 92vh;
  padding: 14px;
  border-radius: 8px;
  background: white;
  overflow: auto;
}

.photo-preview-panel img {
  display: block;
  width: 100%;
  max-height: 72vh;
  object-fit: contain;
  background: #e2e8f0;
}

.photo-preview-close {
  width: auto;
  margin: 0 0 12px auto;
  padding: 8px 12px;
  border-radius: 8px;
  background: #0f172a;
  font-size: 14px;
}

#photoPreviewCaption {
  margin: 10px 0 0;
  color: #475569;
  font-size: 14px;
  word-break: break-word;
}

.confirmation-section {
  margin-top: 24px;
}

.signature-box {
  position: relative;
  border: 1px solid #c7d2fe;
  border-radius: 8px;
  background: white;
  margin-bottom: 24px;
  overflow: hidden;
}

#signaturePad {
  display: block;
  width: 100%;
  height: 220px;
  touch-action: none;
  cursor: crosshair;
}

body.field-portal-mode {
  padding-left: 0 !important;
  background: #eef6f8;
}

body.field-portal-mode > header,
body.field-portal-mode .desktop-sidebar,
body.field-portal-mode .app-footer {
  display: none;
}

body.field-portal-mode .app {
  max-width: 760px;
  margin: 18px auto;
  padding: 12px;
}

.handoff-signature-box {
  margin-bottom: 10px;
}

.handoff-final-signoff {
  border-color: #bfdbfe;
  background: #f8fbff;
}

.handoff-confirmation-check {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  margin: 12px 0 16px;
  padding: 12px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  font-weight: 700;
  line-height: 1.35;
}

.handoff-confirmation-check input {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: #2563eb;
}

.handoff-signature-box canvas {
  display: block;
  width: 100%;
  height: 180px;
  touch-action: none;
  cursor: crosshair;
}

.signature-box::after {
  content: "";
  position: absolute;
  left: 22px;
  right: 22px;
  bottom: 42px;
  border-bottom: 2px solid #e0e7ff;
  pointer-events: none;
}

button.clear-signature {
  width: auto;
  position: absolute;
  right: 14px;
  bottom: 8px;
  margin: 0;
  padding: 4px 8px;
  background: transparent;
  color: #4f46e5;
  font-size: 14px;
  font-weight: normal;
}

.handoff-signature-summary {
  display: grid;
  gap: 6px;
  margin: 10px 0;
  padding: 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #f8fafc;
}

.handoff-signature-summary span {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.handoff-signature-summary img {
  width: 100%;
  max-width: 260px;
  height: 82px;
  object-fit: contain;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.handoff-signature-summary small {
  color: #475569;
  font-weight: 700;
}

.handoff-signature-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(15, 23, 42, 0.42);
}

.handoff-signature-modal[hidden] {
  display: none;
}

.handoff-signature-dialog {
  width: min(560px, 100%);
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 18px;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.28);
}

.handoff-signature-dialog h3 {
  margin-top: 0;
}

.handoff-signature-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.handoff-signature-actions button {
  margin: 0;
}

.confirm-label {
  line-height: 1.25;
}

.confirm-check {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: normal;
  margin-top: 12px;
}

.confirm-check input {
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
}

.sms-consent-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 8px 0 0;
  padding: 12px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
  color: #334155;
  font-size: 0.92rem;
  line-height: 1.4;
}

.sms-consent-check input {
  width: auto;
  min-width: 16px;
  margin-top: 3px;
  flex: 0 0 auto;
}

.archive-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 14px 0;
}

.template-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 10px 0 14px;
}

.template-summary-card {
  padding: 12px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #ffffff;
}

.template-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.template-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 24px;
}

.template-summary-card.active {
  border-left: 4px solid #16a34a;
}

.template-summary-card.retired {
  border-left: 4px solid #94a3b8;
}

.template-item {
  margin: 10px 0;
  border: 1px solid #d8e2ee;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.template-item.retired {
  border-left-color: #94a3b8;
}

.template-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
  list-style: none;
}

.template-summary::-webkit-details-marker {
  display: none;
}

.template-summary .small-text {
  margin: 6px 0 0;
}

.template-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.template-actions .compact-button {
  margin: 0;
}

.template-details {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid #e2e8f0;
}

.template-detail-section {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.template-detail-list {
  margin: 8px 0 0;
  padding-left: 20px;
  color: #334155;
}

.template-detail-list li {
  margin: 6px 0;
}

.template-builder-validation {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid #fde68a;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
  font-weight: 700;
}

.template-builder-validation:empty {
  display: none;
}

.template-editor-panel {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fbfdff;
}

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

.template-editor-head label {
  margin: 0;
}

.template-list-editor {
  display: grid;
  gap: 8px;
  margin-top: 8px;
}

.template-list-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: stretch;
}

.template-list-row input {
  margin: 0;
}

.template-list-row button {
  width: auto;
  margin: 0;
  padding: 11px;
}

.template-builder-inline-btn,
.template-list-row button,
.template-builder-actions button {
  width: auto;
}

.template-builder-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.archive-item {
  margin: 0 -10px;
  padding: 14px 10px;
  border-radius: 8px;
}

.archive-item.tone-a {
  background: #ffffff;
}

.archive-item.tone-b {
  background: #f8fafc;
}

.archive-item.selected {
  outline: 2px solid #93c5fd;
  background: #eff6ff;
}

.archive-item:last-child {
  border-bottom: none;
}

.pill {
  display: inline-block;
  padding: 5px 10px;
  margin-left: 6px;
  border-radius: 999px;
  font-size: 12px;
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.retired {
  background: #fee2e2;
  color: #b91c1c;
}

.pill.approved {
  background: #dcfce7;
  color: #166534;
}

.pill.rejected {
  background: #fee2e2;
  color: #b91c1c;
}

.pill.ready {
  background: #dbeafe;
  color: #1d4ed8;
}

.pill.pending {
  background: #fef3c7;
  color: #92400e;
}

.pill.neutral {
  background: #e2e8f0;
  color: #334155;
}

.archive-card {
  padding: 14px 0 14px 12px;
  border-left: 4px solid #cbd5e1;
}

.archive-card.ready {
  border-left-color: #2563eb;
}

.archive-card.approved {
  border-left-color: #16a34a;
}

.archive-card.rejected {
  border-left-color: #dc2626;
}

.archive-summary p {
  margin: 8px 0 0;
}

.archive-summary {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.archive-select {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 78px;
  margin: 2px 0 0;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
}

.archive-select input {
  width: 18px;
  height: 18px;
  margin: 0;
  flex: 0 0 auto;
}

.archive-details {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #e5e7eb;
}

.record-ownership-panel {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  background: #eff6ff;
}

.record-ownership-panel > strong {
  color: #1e3a8a;
}

.record-ownership-panel p {
  display: grid;
  gap: 3px;
  margin: 0;
  color: #334155;
}

.record-ownership-panel small,
.record-ownership-panel span {
  color: #64748b;
  font-size: 12px;
}

.workflow-analytics {
  display: grid;
  gap: 8px;
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #ccfbf1;
  border-left: 4px solid #0f766e;
  border-radius: 8px;
  background: #f0fdfa;
}

.workflow-analytics > strong {
  color: #134e4a;
}

.workflow-analytics p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  color: #334155;
}

.workflow-analytics p span {
  color: #64748b;
}

.workflow-analytics p strong {
  text-align: right;
  color: #0f172a;
}

.iac-record {
  margin: 12px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
}

.iac-record p {
  margin: 6px 0 0;
}

.notification-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.notification-summary-card {
  padding: 12px;
  border: 1px solid #d8e2ee;
  border-radius: 8px;
  background: #ffffff;
}

.notification-summary-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.notification-summary-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 24px;
}

.notification-summary-card.approved {
  border-left: 4px solid #16a34a;
}

.notification-summary-card.rejected {
  border-left: 4px solid #dc2626;
}

.notification-summary-card.pending {
  border-left: 4px solid #d97706;
}

.notification-group {
  margin: 10px 0;
  border: 1px solid #d8e2ee;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.notification-group.has-failure {
  border-left-color: #dc2626;
}

.notification-group-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f8fafc;
  cursor: pointer;
  list-style: none;
}

.notification-group-summary::-webkit-details-marker {
  display: none;
}

.notification-group-summary .small-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.notification-group-preview {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  color: #475569;
  font-size: 13px;
  text-align: right;
}

.notification-group-events {
  padding: 0 14px 12px;
}

.notification-event-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #d8e2ee;
}

.notification-event-row:first-child {
  border-top: 0;
}

.notification-event-row p {
  margin: 8px 0 0;
  color: #334155;
  font-size: 13px;
}

.notification-event-head,
.notification-event-details {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.notification-event-details {
  margin-top: 8px;
  color: #64748b;
  font-size: 12px;
}

.notification-error {
  padding: 8px;
  border-radius: 8px;
  background: #fef2f2;
  color: #991b1b !important;
}

.attachment-gallery {
  margin-top: 12px;
}

.attachment-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.attachment-card {
  display: grid;
  gap: 8px;
  align-content: start;
  min-height: 128px;
  padding: 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  text-decoration: none;
}

.attachment-card button {
  width: 100%;
  margin: 0;
}

.attachment-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 6px;
  object-fit: cover;
  background: #e2e8f0;
}

.attachment-file-icon {
  display: grid;
  min-height: 78px;
  place-items: center;
  border-radius: 6px;
  background: #e2e8f0;
  color: #1e3a8a;
  font-weight: 800;
}

.attachment-card small {
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
  word-break: break-word;
}

.attachment-category {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  padding: 3px 7px;
  border-radius: 999px;
  background: #e0f2fe;
  color: #0369a1;
  font-size: 11px;
  font-weight: 800;
}

.activity-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
  padding: 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #f8fafc;
}

.activity-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.activity-user-group {
  margin: 10px 0;
  border: 1px solid #dbeafe;
  border-left: 5px solid #2563eb;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.activity-user-summary {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: space-between;
  cursor: pointer;
  list-style: none;
  padding: 12px 14px;
  background: #f8fafc;
}

.activity-user-summary::-webkit-details-marker {
  display: none;
}

.activity-user-summary .small-text {
  display: block;
  margin-top: 4px;
  font-size: 12px;
}

.activity-preview {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
  text-align: right;
  font-size: 13px;
  color: #475569;
}

.activity-expand-hint {
  font-size: 12px;
  color: #2563eb;
  font-weight: 600;
}

.activity-user-events {
  padding: 0 14px 12px;
}

.activity-action-row {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed #dbeafe;
}

.activity-action-row:first-child {
  margin-top: 12px;
  padding-top: 12px;
  border-top: none;
}

.activity-action-row-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 8px;
  font-size: 13px;
}

.activity-action-meta {
  margin-top: 6px;
  color: #475569;
  font-size: 12px;
}

.activity-action-details {
  margin-top: 8px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 12px;
  color: #64748b;
}

.activity-action-details span {
  display: inline-flex;
  gap: 6px;
  font-size: 12px;
}

.report-summary-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.report-card,
.report-breakdown {
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.report-card span {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.report-card strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
  font-size: 26px;
}

.report-card small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.report-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 12px 0;
}

.execution-acc-status-section {
  margin: 14px 0 18px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 14px;
  background: linear-gradient(135deg, #eff6ff 0%, #ffffff 70%);
}

.execution-acc-section-heading,
.execution-acc-report-main {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.execution-acc-section-heading h3,
.execution-acc-report-card h4 {
  margin: 3px 0 4px;
}

.execution-acc-inline-summary,
.execution-acc-metric-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.execution-acc-inline-summary span,
.execution-acc-metric-grid span {
  padding: 8px 10px;
  border: 1px solid #dbeafe;
  border-radius: 10px;
  background: #ffffff;
  color: #475569;
  font-size: 12px;
}

.execution-acc-inline-summary strong,
.execution-acc-metric-grid strong {
  margin-right: 4px;
  color: #0f172a;
}

.execution-acc-status-list {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.execution-acc-report-card {
  padding: 13px;
  border: 1px solid #dbeafe;
  border-left: 4px solid #64748b;
  border-radius: 10px;
  background: #ffffff;
}

.execution-acc-report-card.status-active { border-left-color: #2563eb; }
.execution-acc-report-card.status-blocked { border-left-color: #dc2626; }
.execution-acc-report-card.status-qa_ready { border-left-color: #7c3aed; }
.execution-acc-report-card.status-completed { border-left-color: #16a34a; }

.execution-acc-status-pill {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.execution-acc-report-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 11px;
  padding-top: 11px;
  border-top: 1px solid #e2e8f0;
}

.execution-acc-report-meta span {
  min-width: 0;
  color: #475569;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.execution-acc-report-meta strong {
  display: block;
  margin-bottom: 2px;
  color: #64748b;
  font-size: 10px;
  text-transform: uppercase;
}

.execution-acc-report-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.execution-acc-report-actions button {
  width: auto;
  min-width: 110px;
  margin: 0;
}

.execution-acc-delete-modal {
  position: fixed;
  z-index: 10030;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(15, 23, 42, .62);
  backdrop-filter: blur(5px);
}

.execution-acc-delete-modal[hidden] { display: none; }

.execution-acc-delete-dialog {
  width: min(560px, 100%);
  padding: 22px;
  border: 1px solid #fecaca;
  border-radius: 18px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(15, 23, 42, .34);
}

.execution-acc-delete-dialog h3 { margin: 5px 0 8px; }
.execution-acc-delete-dialog textarea { width: 100%; resize: vertical; }
.execution-acc-delete-dialog > small { display: block; margin-top: 8px; color: #64748b; line-height: 1.45; }

.execution-acc-delete-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.execution-acc-delete-actions button { margin: 0; }

html[data-theme="dark"] .execution-acc-delete-dialog {
  border-color: #7f1d1d;
  background: #0f172a;
}

@media (max-width: 520px) {
  .execution-acc-delete-modal { align-items: end; padding: 12px; }
  .execution-acc-delete-dialog { padding: 18px; border-radius: 18px 18px 12px 12px; }
  .execution-acc-delete-actions { grid-template-columns: 1fr; }
}

.execution-acc-metric-card {
  border-color: #93c5fd;
  background: #eff6ff;
}

.execution-acc-metrics {
  border-color: #93c5fd;
  background: linear-gradient(135deg, #eff6ff, #ffffff);
}

.execution-acc-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin-top: 12px;
}

.execution-acc-metric-grid span {
  text-align: center;
}

.execution-acc-metric-grid strong {
  display: block;
  margin: 0 0 3px;
  font-size: 22px;
}

.execution-acc-completion-rate {
  color: #1d4ed8;
  white-space: nowrap;
}

@media (max-width: 760px) {
  .execution-acc-section-heading,
  .execution-acc-report-main {
    flex-direction: column;
  }

  .execution-acc-report-main button {
    width: 100%;
  }

  .execution-acc-report-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .execution-acc-report-meta,
  .execution-acc-metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.report-breakdown {
  margin-top: 12px;
}

.execution-roadmap-screen.screen.active {
  display: grid;
  gap: 14px;
  background: #f6f8fb;
}

.roadmap-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 0 0 2px;
  border-bottom: 0;
}

.roadmap-hero h2 {
  margin: 4px 0 5px;
  color: #020617;
  font-size: clamp(1.72rem, 2.1vw, 2.25rem);
  line-height: 1.05;
}

.roadmap-hero p {
  max-width: 840px;
  margin: 0;
  color: #334155;
  font-size: 0.94rem;
  font-weight: 800;
}

.roadmap-hero-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  min-width: min(360px, 100%);
}

.roadmap-hero-control-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.roadmap-date-pill {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 850;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.roadmap-storage-status {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 7px 10px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1e3a8a;
  text-align: right;
}

.roadmap-storage-status span,
.roadmap-storage-status small {
  font-size: 0.75rem;
  font-weight: 850;
  text-transform: uppercase;
}

.roadmap-storage-status strong {
  color: #0f172a;
  font-size: 0.95rem;
}

.roadmap-storage-status small {
  color: #475569;
  line-height: 1.25;
  text-transform: none;
}

.roadmap-storage-status.ready {
  border-color: #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.roadmap-storage-status.warning {
  border-color: #fde68a;
  background: #fffbeb;
  color: #92400e;
}

.roadmap-page-toggle {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  width: min(520px, 100%);
  margin: 0;
  padding: 5px;
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  background: #eef4fb;
}

.roadmap-page-toggle button {
  min-height: 38px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #475569;
  font-weight: 900;
}

.roadmap-page-toggle button:not(.active) {
  color: #64748b;
}

.roadmap-page-toggle button.active:nth-child(1) {
  border: 1px solid #bfdbfe;
}

.roadmap-page-toggle button.active:nth-child(2) {
  border: 1px solid #fed7aa;
}

.roadmap-page-toggle button:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.18);
  outline-offset: 2px;
}

.roadmap-page-toggle button.active {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.roadmap-connection-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(420px, 1.7fr) auto;
  gap: 22px;
  align-items: center;
  margin: 14px 0 18px;
  padding: 18px 20px;
  border: 1px solid #d7e2e8;
  border-radius: 16px;
  background: linear-gradient(120deg, #f8fbfc 0%, #eef6f7 100%);
  box-shadow: 0 10px 24px rgba(19, 55, 65, 0.06);
}

.roadmap-connection-copy,
.roadmap-connection-action {
  display: grid;
  gap: 5px;
}

.roadmap-connection-copy > strong {
  color: #153f49;
  font-size: 1rem;
}

.roadmap-connection-copy > small {
  color: #60737a;
  line-height: 1.45;
}

.roadmap-flow {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.roadmap-flow > span {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-width: 76px;
  color: #718188;
  text-align: center;
}

.roadmap-flow b {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #c9d7dc;
  border-radius: 50%;
  background: #fff;
  font-size: 0.78rem;
}

.roadmap-flow span.active b {
  border-color: #167887;
  background: #167887;
  color: #fff;
  box-shadow: 0 0 0 5px rgba(22, 120, 135, 0.11);
}

.roadmap-flow span.complete b {
  border-color: #66a496;
  background: #e6f3ef;
  color: #236c5d;
}

.roadmap-flow i {
  color: #9aadb3;
  font-style: normal;
}

.roadmap-flow small {
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.roadmap-connection-action {
  justify-items: end;
  white-space: nowrap;
}

.roadmap-connection-action > strong {
  color: #49636b;
  font-size: 0.78rem;
}

.roadmap-impact-button {
  border-color: #8eb7be;
  color: #176979;
}

@media (max-width: 1100px) {
  .roadmap-connection-bar {
    grid-template-columns: 1fr;
  }

  .roadmap-connection-action {
    justify-items: start;
  }
}

@media (max-width: 680px) {
  .roadmap-connection-bar {
    padding: 16px;
  }

  .roadmap-flow {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .roadmap-flow > i {
    display: none;
  }

  .roadmap-flow > span {
    grid-template-columns: 30px 1fr;
    justify-items: start;
    min-width: 0;
    text-align: left;
  }
}

.roadmap-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
}

.roadmap-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 104px;
  padding: 14px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.roadmap-summary-card span {
  display: block;
  margin-bottom: 10px;
  color: #0f172a;
  font-size: 0.78rem;
  font-weight: 900;
}

.roadmap-summary-card strong {
  color: #0f172a;
  font-size: 1.58rem;
  line-height: 1;
}

.roadmap-summary-card small {
  display: block;
  margin-top: 7px;
  color: #64748b;
  font-weight: 750;
}

.roadmap-summary-card em {
  display: block;
  margin-top: 9px;
  color: #2563eb;
  font-style: normal;
  font-size: 0.8rem;
  font-weight: 950;
}

.roadmap-summary-card b {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background: #dbeafe;
  color: #2563eb;
  font-size: 1rem;
  font-weight: 950;
}

.roadmap-summary-card.danger {
  border-color: #fecaca;
}

.roadmap-summary-card.success {
  border-color: #bbf7d0;
}

.roadmap-summary-card.progress {
  border-color: #bfdbfe;
}

.roadmap-summary-card.success b {
  background: #dcfce7;
  color: #15803d;
}

.roadmap-summary-card.info b {
  background: #dbeafe;
  color: #2563eb;
}

.roadmap-summary-card.quality b {
  background: #ede9fe;
  color: #7c3aed;
}

.roadmap-summary-card.warning b {
  background: #ffedd5;
  color: #f97316;
}

.roadmap-summary-card.danger b {
  background: #fee2e2;
  color: #dc2626;
}

.roadmap-summary-card.warning em {
  color: #f97316;
}

.roadmap-summary-card.danger em {
  color: #dc2626;
}

.roadmap-summary-card.success em {
  color: #16a34a;
}

.roadmap-layout {
  display: grid;
  grid-template-columns: minmax(320px, 0.88fr) minmax(0, 1.32fr);
  gap: 14px;
  align-items: start;
}

.roadmap-page-building #roadmapFormPanel,
.roadmap-page-building .roadmap-view-toggle,
.roadmap-page-building #roadmapSampleButton {
  display: none;
}

.roadmap-page-building .roadmap-layout {
  grid-template-columns: 1fr;
}

.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) .roadmap-page-toggle,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapSummary,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapFormPanel,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) .roadmap-view-toggle,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapSampleButton,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapNewScopeButton,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapConnectionBar,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) .roadmap-hero-control-row,
.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) #roadmapStorageStatus {
  display: none;
}

.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) .roadmap-layout {
  grid-template-columns: 1fr;
}

.execution-roadmap-screen:is([data-perspective="installer"], [data-perspective="technician"]) .roadmap-list-panel {
  border-left: 0;
}

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

.roadmap-page-builder .roadmap-form-panel,
.roadmap-page-builder .roadmap-list-panel {
  width: 100%;
  max-width: 100%;
}

.roadmap-page-builder .roadmap-list-panel {
  border-left-color: #94a3b8;
}

.roadmap-page-building .roadmap-list-panel {
  padding: 0;
  border-left: 0;
  border-color: transparent;
  background: transparent;
  box-shadow: none;
}

.roadmap-page-building #roadmapPlanWorkspace {
  border-top-color: #2563eb;
}

.roadmap-page-building .roadmap-connection-bar {
  grid-template-columns: minmax(220px, 1.35fr) minmax(390px, 1.7fr) auto;
  padding: 14px 18px;
  background: linear-gradient(120deg, #f9fbff 0%, #f3f7fb 100%);
  box-shadow: none;
}

.roadmap-page-building .roadmap-connection-copy > small {
  max-width: 560px;
}

.roadmap-page-building .roadmap-list-panel > .roadmap-section-head {
  padding: 16px 18px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.roadmap-page-building .roadmap-list-panel > .roadmap-section-head h3 {
  font-size: 1.05rem;
}

.roadmap-building-dashboard {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 300px);
  gap: 14px;
  align-items: start;
}

.roadmap-building-main {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.roadmap-tracker-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 17px;
  border: 1px solid #d7e1ef;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.035);
}

.roadmap-tracker-toolbar > div:first-child {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 12px;
  align-items: baseline;
}

.roadmap-tracker-toolbar .operations-kicker {
  grid-column: 1 / -1;
  margin-bottom: 4px;
}

.roadmap-tracker-toolbar strong {
  color: #0f172a;
  font-size: 1rem;
}

.roadmap-tracker-toolbar small {
  color: #64748b;
  font-weight: 700;
}

.roadmap-tracker-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roadmap-live-indicator {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #477168;
  font-size: 0.76rem;
  font-weight: 850;
}

.roadmap-live-indicator i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #22a06b;
  box-shadow: 0 0 0 4px rgba(34, 160, 107, 0.12);
}

.roadmap-building-insights {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.roadmap-building-bottom-insights {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.roadmap-insight-card {
  display: grid;
  gap: 12px;
  align-content: start;
  min-width: 0;
  min-height: 138px;
  padding: 15px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.roadmap-page-building .roadmap-filter-grid {
  padding: 12px 14px;
  border: 1px solid #e0e7ef;
  border-radius: 9px;
  background: #f8fafc;
}

.roadmap-page-building .roadmap-filter-grid label {
  color: #64748b;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}

.roadmap-page-building .roadmap-filter-grid input,
.roadmap-page-building .roadmap-filter-grid select {
  min-height: 38px;
  border-color: #d8e1eb;
  background: #fff;
}

.roadmap-scope-title-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.roadmap-scope-title-cell > div,
.roadmap-owner-cell > div {
  display: grid;
  min-width: 0;
}

.roadmap-scope-icon {
  display: grid;
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 7px;
  background: #eaf2ff;
  color: #2563eb;
  font-style: normal;
  font-size: 0.76rem;
  font-weight: 950;
}

.roadmap-owner-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.roadmap-owner-avatar {
  display: grid;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 50%;
  background: #153f49;
  color: #fff;
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 900;
}

.roadmap-scope-row.status-blocked .roadmap-scope-icon {
  background: #fee2e2;
  color: #dc2626;
}

.roadmap-scope-row.status-qa_ready .roadmap-scope-icon {
  background: #ede9fe;
  color: #7c3aed;
}

.roadmap-scope-row.status-complete .roadmap-scope-icon {
  background: #dcfce7;
  color: #15803d;
}

@media (max-width: 780px) {
  .roadmap-tracker-toolbar,
  .roadmap-tracker-toolbar-actions {
    align-items: flex-start;
    flex-direction: column;
  }

  .roadmap-tracker-toolbar > div:first-child {
    display: grid;
    grid-template-columns: 1fr;
  }
}

.roadmap-insight-card h4 {
  margin: 0;
  color: #0f172a;
  font-size: 0.94rem;
}

.roadmap-insight-card > small {
  color: #64748b;
  font-weight: 800;
}

.roadmap-insight-list {
  display: grid;
  gap: 8px;
}

.roadmap-insight-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #334155;
  min-width: 0;
  font-size: 0.84rem;
  font-weight: 750;
}

.roadmap-insight-list span:not(.danger) {
  padding-bottom: 7px;
  border-bottom: 1px solid #eef2f7;
}

.roadmap-insight-list span:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.roadmap-insight-list strong {
  color: #0f172a;
  font-weight: 950;
}

.roadmap-insight-list.compact span {
  justify-content: flex-start;
}

.roadmap-insight-list .danger {
  justify-content: flex-start;
  color: #991b1b;
}

.roadmap-insight-list .danger strong {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
}

.roadmap-progress-donut {
  display: grid;
  place-items: center;
  justify-self: center;
  width: 104px;
  height: 104px;
  border-radius: 999px;
  background: conic-gradient(#22c55e calc(var(--progress) * 1%), #dbeafe 0);
  position: relative;
}

.roadmap-progress-donut.workforce {
  background: conic-gradient(#2563eb calc(var(--progress) * 1%), #22c55e 0 75%, #a855f7 0 88%, #dbeafe 0);
}

.roadmap-health-card > strong {
  color: #16a34a;
  font-size: 1.32rem;
}

.roadmap-health-card > strong.warning {
  color: #f97316;
}

.roadmap-health-list {
  display: grid;
  gap: 9px;
}

.roadmap-health-list span {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #334155;
  font-size: 0.84rem;
  font-weight: 800;
}

.roadmap-health-list b {
  color: #16a34a;
  font-size: 0.78rem;
}

.roadmap-progress-donut::after {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  background: #ffffff;
}

.roadmap-progress-donut strong {
  position: relative;
  z-index: 1;
  color: #0f172a;
  font-size: 1.35rem;
}

.roadmap-page-building .roadmap-milestone-scopes {
  gap: 0;
  border: 0;
  border-radius: 0;
  overflow-x: hidden;
}

.roadmap-page-building .roadmap-scope-card {
  border: 0;
  border-left: 4px solid #3b82f6;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid #e2e8f0;
}

.roadmap-page-building .roadmap-scope-card:last-child {
  border-bottom: 0;
}

.roadmap-page-building .roadmap-daily-snapshot {
  background: #f8fafc;
}

.roadmap-panel {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.roadmap-form-panel {
  border-left: 5px solid #2563eb;
  background: #f6f8fb;
}

.roadmap-list-panel {
  border-left: 5px solid #f59e0b;
}

.roadmap-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.roadmap-section-head h3 {
  margin: 0 0 4px;
}

.roadmap-section-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.roadmap-view-toggle {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #f8fafc;
}

.roadmap-view-toggle button {
  min-height: 40px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #475569;
  font-weight: 900;
}

.roadmap-view-toggle button.active {
  background: #0f172a;
  color: #ffffff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.16);
}

.roadmap-view-toggle button:nth-child(1).active {
  background: #2563eb;
}

.roadmap-view-toggle button:nth-child(2).active {
  background: #b45309;
}

.roadmap-view-toggle button:nth-child(3).active {
  background: #15803d;
}

.roadmap-workspace-view {
  display: none;
}

.roadmap-workspace-view.active {
  display: grid;
  gap: 12px;
}

#roadmapPlanWorkspace {
  border-top: 4px solid #2563eb;
  padding-top: 12px;
}

#roadmapAssignmentWorkspace {
  border-top: 4px solid #f59e0b;
  padding-top: 12px;
}

#roadmapDailyWorkspace {
  border-top: 4px solid #22c55e;
  padding-top: 12px;
}

.roadmap-phase-pill {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-phase-pill.plan {
  background: #dbeafe;
  color: #1d4ed8;
}

.roadmap-phase-pill.assign {
  background: #fef3c7;
  color: #92400e;
}

.roadmap-phase-pill.daily {
  background: #dcfce7;
  color: #166534;
}

.roadmap-access-notice {
  padding: 10px 12px;
  border: 1px solid #c7d2fe;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  font-weight: 850;
}

.roadmap-ownership-preview {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #f8fbff;
}

.roadmap-ownership-preview span,
.roadmap-ownership-preview small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.roadmap-ownership-preview strong {
  color: #0f172a;
  line-height: 1.35;
}

.roadmap-ownership-preview small {
  text-transform: none;
}

.roadmap-work-step-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 14px;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.roadmap-work-step-panel-focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

.roadmap-work-step-head label {
  margin-bottom: 2px;
}

.roadmap-work-step-builder {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-items: stretch;
  min-width: 0;
}

.roadmap-work-step-builder input,
.roadmap-work-step-builder select,
.roadmap-work-step-builder button {
  min-width: 0;
}

.roadmap-work-step-builder input:first-child {
  grid-column: 1 / -1;
}

.roadmap-work-step-builder button {
  min-height: 44px;
}

.roadmap-work-step-list {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.roadmap-work-step-empty,
.roadmap-work-step-summary {
  max-width: 100%;
  padding: 10px;
  border: 1px dashed #bfdbfe;
  border-radius: 10px;
  color: #475569;
  font-size: 0.86rem;
  font-weight: 750;
  overflow-wrap: anywhere;
}

.roadmap-work-step-empty {
  display: grid;
  gap: 3px;
}

.roadmap-work-step-empty strong {
  color: #0f172a;
}

.roadmap-work-step-empty span {
  color: #64748b;
}

.roadmap-work-step-summary {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  border-style: solid;
  background: #eff6ff;
}

.roadmap-work-step-summary strong {
  color: #1d4ed8;
}

.roadmap-work-step-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px;
  border: 1px solid #d7e1ef;
  border-radius: 10px;
  background: #ffffff;
}

.roadmap-work-step-item div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.roadmap-work-step-item strong {
  color: #0f172a;
}

.roadmap-work-step-item small {
  color: #64748b;
  font-weight: 750;
}

.roadmap-form-panel.roadmap-readonly {
  background: #f8fafc;
}

.roadmap-form-panel.roadmap-readonly input,
.roadmap-form-panel.roadmap-readonly select,
.roadmap-form-panel.roadmap-readonly textarea {
  background: #eef2f7;
  color: #475569;
}

.roadmap-form-grid,
.roadmap-filter-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.roadmap-builder-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  align-items: start;
  gap: 14px;
}

.roadmap-builder-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  min-width: 0;
  padding: 14px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.roadmap-builder-plan,
.roadmap-builder-notes,
.roadmap-work-step-panel {
  grid-column: 1 / -1;
}

.roadmap-builder-location,
.roadmap-builder-status {
  grid-column: span 5;
}

.roadmap-builder-ownership {
  grid-column: span 7;
}

.roadmap-builder-plan {
  grid-template-columns: minmax(150px, 0.9fr) minmax(220px, 1.1fr) minmax(260px, 1.4fr);
}

.roadmap-builder-plan .roadmap-wide {
  grid-column: auto;
}

.roadmap-builder-section-head {
  grid-column: 1 / -1;
  display: flex;
  width: 100%;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  min-height: 0;
  margin: 0;
  padding: 0 2px 10px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  box-shadow: none;
  text-align: left;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.roadmap-builder-section-head span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.roadmap-builder-section-head::after {
  content: "−";
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1d4ed8;
  font-size: 1rem;
  font-weight: 900;
}

.roadmap-builder-section.is-collapsed > :not(.roadmap-builder-section-head),
.roadmap-work-step-panel.is-collapsed > :not(.roadmap-builder-section-head) {
  display: none;
}

.roadmap-builder-section.is-collapsed .roadmap-builder-section-head,
.roadmap-work-step-panel.is-collapsed .roadmap-builder-section-head {
  padding-bottom: 0;
  border-bottom: 0;
}

.roadmap-builder-section.is-collapsed .roadmap-builder-section-head::after,
.roadmap-work-step-panel.is-collapsed .roadmap-builder-section-head::after {
  content: "+";
}

.roadmap-builder-section-head strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.roadmap-builder-section-head small {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 800;
}

.roadmap-filter-grid {
  grid-template-columns: 0.75fr 0.75fr 0.75fr minmax(220px, 1.35fr);
  align-items: end;
  padding: 14px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.035);
}

.roadmap-wide {
  grid-column: 1 / -1;
}

.roadmap-form-grid label,
.roadmap-filter-grid label {
  display: block;
  margin-bottom: 7px;
  color: #0f172a;
  font-size: 0.82rem;
  font-weight: 900;
}

.roadmap-form-grid input,
.roadmap-form-grid select,
.roadmap-form-grid textarea,
.roadmap-filter-grid input,
.roadmap-filter-grid select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.94rem;
  padding: 11px 12px;
}

.roadmap-filter-grid input,
.roadmap-filter-grid select {
  min-height: 42px;
  background: #fbfdff;
}

.roadmap-form-grid textarea {
  resize: vertical;
}

.roadmap-form-grid input:focus,
.roadmap-form-grid select:focus,
.roadmap-form-grid textarea:focus,
.roadmap-filter-grid input:focus,
.roadmap-filter-grid select:focus {
  outline: 3px solid rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
}

.roadmap-actions,
.roadmap-card-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.roadmap-form-panel .roadmap-actions {
  display: grid;
  grid-template-columns: minmax(190px, 240px) repeat(3, auto);
  position: sticky;
  bottom: 12px;
  z-index: 20;
  justify-content: flex-end;
  margin-top: 0;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.roadmap-form-panel .roadmap-actions button {
  min-height: 40px;
  border-radius: 8px;
}

.roadmap-form-panel #roadmapSaveButton {
  flex: 0 1 240px;
}

.roadmap-form-panel #roadmapClearButton {
  flex: 0 0 auto;
}

.roadmap-form-panel #roadmapFormStatus {
  grid-column: 1 / -1;
  flex: 1 1 100%;
}

@media (max-width: 720px) {
  .roadmap-form-panel .roadmap-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    bottom: 8px;
    padding: 9px;
  }

  .roadmap-form-panel #roadmapSaveButton,
  .roadmap-form-panel #roadmapFormStatus {
    grid-column: 1 / -1;
  }

  .roadmap-form-panel #roadmapViewImpactButton {
    display: none;
  }
}

.roadmap-actions .danger {
  margin-left: auto;
}

.roadmap-card-actions button {
  min-width: 118px;
}

.roadmap-scope-list {
  display: grid;
  gap: 14px;
}

.roadmap-milestone-group {
  display: grid;
  gap: 0;
  overflow: hidden;
  border: 1px solid #d7e1ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.04);
}

.roadmap-milestone-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 4px 12px;
  align-items: center;
  padding: 14px 16px;
  border: 0;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  background: #f8fbff;
}

.roadmap-milestone-head span,
.roadmap-milestone-head small {
  color: #475569;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-milestone-head h4 {
  margin: 3px 0 0;
  color: #0f172a;
  font-size: 1rem;
}

.roadmap-milestone-head strong {
  color: #1d4ed8;
  font-size: 1.36rem;
  line-height: 1;
}

.roadmap-milestone-head small {
  text-transform: none;
}

.roadmap-milestone-breakdown,
.roadmap-milestone-ownerline {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.roadmap-milestone-breakdown span {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-milestone-ownerline {
  display: grid;
  gap: 2px;
}

.roadmap-milestone-ownerline span {
  color: #0f172a;
  font-size: 0.86rem;
  font-weight: 900;
  text-transform: none;
}

.roadmap-milestone-ownerline small {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
  text-transform: none;
}

.roadmap-milestone-scopes {
  display: grid;
  gap: 0;
}

.roadmap-scope-card {
  display: grid;
  gap: 9px;
  padding: 11px 12px;
  border: 1px solid #d7e1ef;
  border-left: 5px solid #3b82f6;
  border-radius: 12px;
  background: #ffffff;
}

.roadmap-scope-card.is-just-saved {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.16), 0 14px 32px rgba(37, 99, 235, 0.16);
  animation: roadmap-saved-pulse 900ms ease-out;
}

@keyframes roadmap-saved-pulse {
  0% { transform: scale(0.985); }
  55% { transform: scale(1.008); }
  100% { transform: scale(1); }
}

.roadmap-scope-glance {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.roadmap-collapsible-detail {
  display: grid;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid #e2e8f0;
}

.roadmap-collapsible-detail[hidden] {
  display: none;
}

.roadmap-detail-toggle::after {
  content: "⌄";
  margin-left: 6px;
}

.roadmap-detail-toggle[aria-expanded="true"]::after {
  content: "⌃";
}

.roadmap-scope-card.status-blocked {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.roadmap-scope-card.status-qa_ready {
  border-left-color: #22c55e;
}

.roadmap-scope-card.status-complete {
  border-left-color: #0f172a;
  background: #f8fafc;
}

.roadmap-scope-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.roadmap-scope-topline h4 {
  margin: 7px 0 0;
  color: #0f172a;
  font-size: 1.12rem;
}

.roadmap-status-chip,
.roadmap-priority,
.roadmap-window-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-status-chip {
  background: #dbeafe;
  color: #1d4ed8;
}

.roadmap-window-chip {
  margin-right: 6px;
  background: #f0fdfa;
  color: #0f766e;
}

.roadmap-status-chip.blocked {
  background: #fee2e2;
  color: #991b1b;
}

.roadmap-status-chip.qa_ready {
  background: #dcfce7;
  color: #166534;
}

.roadmap-status-chip.complete {
  background: #e2e8f0;
  color: #0f172a;
}

.roadmap-status-chip.not_started {
  background: #f1f5f9;
  color: #475569;
}

.roadmap-priority {
  background: #f1f5f9;
  color: #475569;
}

.roadmap-priority.high {
  background: #fef3c7;
  color: #92400e;
}

.roadmap-priority.low {
  background: #ecfdf5;
  color: #047857;
}

.roadmap-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.roadmap-progress-bar {
  overflow: hidden;
  height: 9px;
  border-radius: 999px;
  background: #e2e8f0;
}

.roadmap-progress-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2563eb, #22c55e);
}

.roadmap-scope-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  color: #475569;
  font-size: 0.88rem;
  font-weight: 750;
}

.roadmap-linked-activity {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}

.roadmap-linked-activity span {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 7px;
  background: #f1f7ff;
  color: #1d4ed8;
  font-size: 11.5px;
  font-weight: 800;
}

.roadmap-linked-activity .roadmap-no-work-steps {
  background: #f8fafc;
  color: #475569;
}

.roadmap-work-step-action {
  border-color: #475569;
  background: #475569;
  color: #ffffff;
}

.roadmap-work-step-action:hover,
.roadmap-work-step-action:focus-visible {
  border-color: #1e3a8a;
  background: #334155;
  color: #ffffff;
}

.roadmap-work-step-action:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.roadmap-page-building .roadmap-milestone-scopes {
  gap: 0;
  border: 0;
  border-radius: 0;
  overflow-x: hidden;
  background: #ffffff;
}

.roadmap-scope-table-head,
.roadmap-page-building .roadmap-scope-row {
  display: grid;
  grid-template-columns:
    minmax(144px, 1.42fr)
    minmax(84px, 0.82fr)
    minmax(84px, 0.72fr)
    minmax(78px, 0.7fr)
    minmax(62px, 0.5fr)
    minmax(78px, 0.58fr);
  gap: clamp(5px, 0.55vw, 8px);
  align-items: center;
  width: 100%;
  min-width: 0;
}

.roadmap-scope-table-head span:nth-child(3),
.roadmap-scope-table-head span:nth-child(7),
.roadmap-page-building .roadmap-scope-row > .roadmap-scope-cell:nth-child(3),
.roadmap-page-building .roadmap-scope-row > .roadmap-scope-trend-cell {
  display: none;
}

.roadmap-scope-table-head {
  padding: 10px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
  color: #334155;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.roadmap-page-building .roadmap-scope-row {
  gap: clamp(5px, 0.55vw, 8px);
  padding: 12px 10px;
  border: 0;
  border-left: 4px solid #3b82f6;
  border-bottom: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}

.roadmap-page-building .roadmap-scope-row:last-child {
  border-bottom: 0;
}

.roadmap-page-building .roadmap-scope-row.status-blocked {
  border-left-color: #ef4444;
  background: #fffafa;
}

.roadmap-page-building .roadmap-scope-row.status-qa_ready {
  border-left-color: #22c55e;
}

.roadmap-page-building .roadmap-scope-row.status-complete {
  border-left-color: #0f172a;
  background: #f8fafc;
}

.roadmap-scope-cell {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.roadmap-scope-cell strong,
.roadmap-scope-cell small,
.roadmap-scope-cell span {
  overflow-wrap: anywhere;
}

.roadmap-scope-cell strong {
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 900;
  line-height: 1.2;
}

.roadmap-scope-cell small,
.roadmap-scope-cell span {
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.25;
}

.roadmap-scope-title-cell strong {
  font-size: 0.96rem;
}

.roadmap-scope-progress-cell .roadmap-progress-row {
  grid-template-columns: minmax(44px, 1fr) 34px;
  gap: 7px;
}

.roadmap-page-building .roadmap-scope-progress-cell .roadmap-progress-bar {
  height: 8px;
}

.roadmap-scope-trend-cell {
  justify-items: start;
}

.roadmap-trend {
  display: inline-flex;
  align-items: end;
  gap: 3px;
  min-width: 68px;
  height: 26px;
  padding: 4px 6px;
  border-radius: 8px;
  background: #f1f5f9;
}

.roadmap-trend i {
  display: block;
  width: 8px;
  border-radius: 999px;
  background: #2563eb;
}

.roadmap-trend i:nth-child(1) {
  height: 8px;
}

.roadmap-trend i:nth-child(2) {
  height: 12px;
}

.roadmap-trend i:nth-child(3) {
  height: 10px;
}

.roadmap-trend i:nth-child(4) {
  height: 16px;
}

.roadmap-trend i:nth-child(5) {
  height: 20px;
}

.roadmap-trend.success {
  background: #ecfdf5;
}

.roadmap-trend.success i {
  background: #22c55e;
}

.roadmap-trend.warning {
  background: #fff7ed;
}

.roadmap-trend.warning i {
  background: #f97316;
}

.roadmap-trend.danger {
  background: #fef2f2;
}

.roadmap-trend.danger i {
  background: #ef4444;
}

.roadmap-scope-status-cell {
  align-content: center;
  justify-items: start;
  gap: 6px;
}

.roadmap-page-building .roadmap-scope-status-cell .roadmap-status-chip,
.roadmap-page-building .roadmap-scope-status-cell .roadmap-priority {
  min-height: 24px;
  max-width: 100%;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.68rem;
  line-height: 1;
  white-space: nowrap;
}

.roadmap-page-building .roadmap-scope-status-cell .roadmap-status-chip {
  background: #dbeafe;
  color: #1e40af;
}

.roadmap-page-building .roadmap-scope-status-cell .roadmap-status-chip.blocked {
  background: #fee2e2;
  color: #991b1b;
}

.roadmap-page-building .roadmap-scope-status-cell .roadmap-status-chip.not_started {
  background: #eef2f7;
  color: #475569;
}

.roadmap-row-actions {
  position: relative;
  z-index: 3;
  display: grid;
  gap: 7px;
  align-self: stretch;
}

.roadmap-row-actions .compact-button {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 7px 6px;
  border-radius: 7px;
  font-size: 0.72rem;
}

.roadmap-action-menu {
  min-width: 0;
}

.roadmap-action-menu > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  box-sizing: border-box;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.roadmap-action-menu > summary::-webkit-details-marker {
  display: none;
}

.roadmap-action-menu > summary span {
  font-size: 0.9rem;
  transition: transform 160ms ease;
}

.roadmap-action-menu[open] > summary span {
  transform: rotate(180deg);
}

.roadmap-action-menu-list {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding: 7px;
  border: 1px solid #d7e1ef;
  border-radius: 9px;
  background: #f8fafc;
}

.roadmap-action-menu:not([open]) .roadmap-action-menu-list {
  display: none;
}

.roadmap-row-detail {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 9px;
  padding-top: 4px;
}

.roadmap-row-detail .roadmap-linked-activity {
  margin-top: 0;
}

.roadmap-row-detail .roadmap-daily-snapshot {
  display: none;
}

.roadmap-inline-overview,
.roadmap-inline-work {
  display: grid;
  gap: 10px;
}

.roadmap-inline-overview[hidden],
.roadmap-inline-work[hidden] {
  display: none;
}

.roadmap-inline-work {
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 9px;
  background: #f8fbff;
}

.roadmap-inline-work-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
}

.roadmap-inline-work-head > div {
  display: grid;
  gap: 3px;
}

.roadmap-inline-work-head strong {
  color: #0f172a;
}

.roadmap-inline-work-head small,
.roadmap-inline-work-head > span {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 800;
}

.roadmap-inline-work-list {
  display: grid;
  gap: 7px;
}

.roadmap-inline-work-list article {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) minmax(180px, 1.2fr);
  gap: 9px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.roadmap-inline-work-list article small {
  color: #64748b;
}

.roadmap-inline-work-form {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(3, minmax(120px, 0.8fr)) minmax(130px, 0.7fr) auto;
  gap: 8px;
  align-items: stretch;
}

.roadmap-inline-work-form input,
.roadmap-inline-work-form select {
  min-width: 0;
  margin: 0;
  border-radius: 7px;
}

.roadmap-advanced-edit {
  justify-self: start;
}

@media (max-width: 900px) {
  .roadmap-page-building .roadmap-scope-row {
    grid-auto-rows: auto;
    align-items: start;
  }

  .roadmap-page-building .roadmap-scope-cell,
  .roadmap-page-building .roadmap-row-actions,
  .roadmap-page-building .roadmap-row-detail {
    min-height: 0;
  }

  .roadmap-inline-work-form,
  .roadmap-inline-work-list article {
    grid-template-columns: 1fr;
  }

  .roadmap-inline-work-head {
    flex-direction: column;
  }
}

.roadmap-row-note {
  margin: 0;
  padding: 9px 10px;
  border-radius: 7px;
  background: #f8fafc;
  color: #475569;
  font-size: 0.82rem;
}

.roadmap-daily-snapshot {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #f8fbff;
}

.roadmap-daily-snapshot.quiet {
  border-color: #e2e8f0;
  background: #f8fafc;
}

.roadmap-daily-snapshot-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.roadmap-daily-snapshot-head span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-daily-snapshot-head strong {
  color: #0f172a;
  font-size: 0.9rem;
}

.roadmap-daily-snapshot.active .roadmap-daily-snapshot-head strong {
  color: #166534;
}

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

.roadmap-daily-snapshot-grid span {
  display: grid;
  gap: 2px;
  min-height: 52px;
  padding: 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #64748b;
  font-size: 0.76rem;
  font-weight: 800;
}

.roadmap-daily-snapshot-grid strong {
  color: #0f172a;
  font-size: 1rem;
  line-height: 1.1;
}

.roadmap-assignment-panel {
  gap: 12px;
}

.roadmap-assignment-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.roadmap-assignment-summary-card {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 11px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #ffffff;
}

.roadmap-assignment-summary-card span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-assignment-summary-card strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

.roadmap-assignment-summary-card small {
  color: #64748b;
  font-weight: 750;
}

.roadmap-assignment-summary-card.warning {
  border-color: #fde68a;
  background: #fffbeb;
}

.roadmap-assignment-summary-card.danger {
  border-color: #fecaca;
  background: #fff7f7;
}

.roadmap-assignment-summary-card.success {
  border-color: #bbf7d0;
  background: #f0fdf4;
}

.roadmap-daily-panel {
  gap: 12px;
}

.roadmap-daily-report-form {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #f8fafc;
}

.roadmap-daily-report-form label {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-daily-report-form input,
.roadmap-daily-report-form select,
.roadmap-daily-report-form textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.92rem;
  padding: 10px;
}

.roadmap-daily-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 10px;
}

.roadmap-daily-actions button {
  min-width: 170px;
}

.roadmap-daily-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
}

.roadmap-daily-summary-card {
  display: grid;
  gap: 4px;
  min-height: 78px;
  padding: 11px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #ffffff;
}

.roadmap-daily-summary-card span {
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-daily-summary-card strong {
  color: #0f172a;
  font-size: 1.35rem;
  line-height: 1;
}

.roadmap-daily-summary-card small {
  color: #64748b;
  font-weight: 750;
}

.roadmap-daily-report-list {
  display: grid;
  gap: 9px;
}

.roadmap-daily-report-item {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-left: 5px solid #3b82f6;
  border-radius: 12px;
  background: #ffffff;
}

.roadmap-daily-report-item.status-blocked {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.roadmap-daily-report-item.status-qa_ready {
  border-left-color: #22c55e;
}

.roadmap-daily-report-item.status-complete {
  border-left-color: #0f172a;
  background: #f8fafc;
}

.roadmap-daily-report-item strong {
  display: block;
  margin-top: 5px;
  color: #0f172a;
}

.roadmap-daily-report-item small {
  color: #64748b;
  font-weight: 750;
}

.roadmap-daily-report-item p {
  margin: 0;
  color: #475569;
}

.roadmap-daily-report-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roadmap-daily-report-metrics span {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border-radius: 8px;
  background: #eef6ff;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 800;
}

.roadmap-daily-blocker {
  padding: 9px;
  border-radius: 8px;
  background: #fee2e2;
  color: #991b1b !important;
  font-weight: 800;
}

.roadmap-assignment-filters {
  display: grid;
  grid-template-columns: minmax(140px, 0.8fr) minmax(220px, 1.4fr);
  gap: 10px;
}

.roadmap-assignment-filters label,
.roadmap-assignment-card label span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-assignment-filters input,
.roadmap-assignment-filters select,
.roadmap-assignment-card input,
.roadmap-assignment-card select {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.92rem;
  padding: 10px;
}

.roadmap-assignment-list {
  display: grid;
  gap: 9px;
}

.roadmap-assignment-card {
  display: grid;
  grid-template-columns: minmax(180px, 1.4fr) repeat(4, minmax(110px, 0.95fr)) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-left: 5px solid #3b82f6;
  border-radius: 12px;
  background: #ffffff;
}

.roadmap-assignment-note {
  grid-column: 2 / -2;
}

.roadmap-pass-forward {
  border-color: #86b7a8;
  background: #edf8f4;
  color: #176954;
}

.roadmap-assignment-card.personal-task-card {
  grid-template-columns: minmax(260px, 1.4fr) minmax(150px, 0.55fr) minmax(260px, 1fr) auto;
  align-items: end;
}

.personal-task-card .roadmap-assignment-note {
  grid-column: auto;
}

.roadmap-task-assigned-by,
.roadmap-task-save-hint {
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 700;
}

.roadmap-task-save-hint {
  align-self: center;
  white-space: nowrap;
}

.roadmap-task-evidence {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid #dbe5f2;
}

.roadmap-task-evidence-head,
.roadmap-task-evidence-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.roadmap-task-evidence-head > div {
  display: grid;
  gap: 3px;
}

.roadmap-task-evidence-head > span {
  padding: 5px 9px;
  border-radius: 999px;
  background: #eaf2ff;
  color: #1d4ed8;
  font-size: 0.76rem;
  font-weight: 800;
}

.roadmap-task-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.roadmap-task-evidence-item {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  padding: 9px;
  border: 1px solid #d8e2ef;
  border-radius: 12px;
  background: #f8fbff;
}

.roadmap-task-evidence-item img {
  grid-row: 1 / span 2;
  width: 76px;
  height: 76px;
  border-radius: 10px;
  background: #e2e8f0;
  object-fit: cover;
}

.roadmap-task-evidence-item img.preview-unavailable {
  opacity: 0.45;
}

.roadmap-task-evidence-item > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.roadmap-task-evidence-item > div span {
  color: #2563eb;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.roadmap-task-evidence-item > div strong,
.roadmap-task-evidence-item > div small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.roadmap-task-evidence-item .danger-text {
  grid-column: 3;
  color: #b91c1c;
}

.roadmap-task-evidence-empty {
  grid-column: 1 / -1;
  margin: 0;
  padding: 14px;
  border: 1px dashed #b8c8db;
  border-radius: 12px;
  color: #64748b;
  background: #fbfdff;
  text-align: center;
}

.roadmap-task-evidence-actions {
  justify-content: flex-start;
}

.roadmap-task-evidence-actions label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  margin: 0;
  cursor: pointer;
}

.roadmap-task-evidence-actions > small {
  color: #64748b;
  font-weight: 700;
}

.execution-roadmap-screen[data-perspective="installer"] .roadmap-assignment-card {
  grid-template-columns: minmax(220px, 1.3fr) minmax(130px, 0.7fr) minmax(170px, 1fr) auto auto;
}

.execution-roadmap-screen[data-perspective="installer"] .roadmap-assignment-card > label:nth-of-type(-n+3) {
  display: none;
}

@media (max-width: 760px) {
  .execution-roadmap-screen[data-perspective="installer"] .roadmap-assignment-card {
    grid-template-columns: 1fr;
  }

  .roadmap-assignment-note {
    grid-column: auto;
  }

  .roadmap-assignment-card.personal-task-card {
    grid-template-columns: 1fr;
  }

  .roadmap-task-evidence-item {
    grid-template-columns: 68px minmax(0, 1fr);
  }

  .roadmap-task-evidence-item img {
    width: 68px;
    height: 68px;
  }

  .roadmap-task-evidence-item > button,
  .roadmap-task-evidence-item .danger-text {
    grid-column: auto;
  }
}

.roadmap-assignment-card.status-blocked {
  border-left-color: #ef4444;
  background: #fff7f7;
}

.roadmap-assignment-card.status-qa_ready {
  border-left-color: #22c55e;
}

.roadmap-assignment-card.status-complete {
  border-left-color: #0f172a;
  background: #f8fafc;
}

.roadmap-assignment-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.roadmap-assignment-main strong {
  color: #0f172a;
}

.roadmap-assignment-main small {
  color: #64748b;
  font-weight: 750;
}

.roadmap-scope-card p {
  margin: 0;
  color: #475569;
}

.roadmap-empty {
  padding: 24px 18px;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  background: #f8fafc;
  color: #64748b;
  text-align: center;
}

.report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid #e5e7eb;
}

.report-row:first-of-type {
  border-top: none;
}

.report-warning {
  padding: 10px;
  border-radius: 8px;
  background: #fffbeb;
  color: #92400e;
}

.report-workflow-panel {
  margin-top: 12px;
}

.report-workflow-accordion {
  border: 1px solid #dbeafe;
  border-left: 4px solid #1d4ed8;
  border-radius: 10px;
  background: #ffffff;
  overflow: hidden;
}

.report-workflow-accordion-summary,
.report-workflow-item-summary {
  display: grid;
  align-items: center;
  gap: 10px;
  grid-template-columns: minmax(200px, 1.9fr) minmax(160px, 1.3fr) repeat(3, minmax(110px, 1fr));
  padding: 12px 14px;
  background: #f8fafc;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
  list-style: none;
}

.report-workflow-accordion-summary strong,
.report-workflow-item-summary span {
  display: inline-flex;
  align-items: center;
}

.report-workflow-accordion-summary::-webkit-details-marker,
.report-workflow-item-summary::-webkit-details-marker {
  display: none;
}

.report-workflow-accordion-summary span,
.report-workflow-item-summary .report-workflow-time-pill {
  color: #475569;
  font-size: 12px;
}

.report-workflow-list {
  padding: 0 0 12px;
}

.report-workflow-item {
  border-top: 1px solid #e2e8f0;
}

.report-workflow-item-summary {
  background: #ffffff;
}

.report-workflow-item-summary:hover {
  background: #f1f5f9;
}

.report-workflow-item-details {
  padding: 0 14px 12px;
}

.report-workflow-item-details p {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 10px 0 0;
  color: #334155;
  font-size: 12px;
}

.report-workflow-item-details p span {
  color: #64748b;
}

.report-workflow-item-details p strong {
  color: #0f172a;
  text-align: right;
}

.report-workflow-time-pill {
  font-weight: 700;
  color: #0f172a !important;
  text-align: right;
}

.update-history-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.release-badge {
  flex: 0 0 auto;
  padding: 8px 10px;
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: #f0fdf4;
  color: #166534;
  font-size: 13px;
  font-weight: 800;
}

.feedback-screen.screen.active {
  display: grid;
  gap: 14px;
  background: #f8fbff;
}

.feedback-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 2px 2px;
  border-bottom: 1px solid #dbeafe;
}

.feedback-hero h2 {
  margin: 6px 0 4px;
  font-size: clamp(1.9rem, 3vw, 2.6rem);
}

.feedback-hero p {
  max-width: 760px;
  margin: 0 0 12px;
  color: #475569;
}

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

.feedback-summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.feedback-summary-card span {
  color: #64748b;
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-summary-card strong {
  color: #0f172a;
  font-size: 1.55rem;
}

.feedback-summary-card.is-critical strong {
  color: #b91c1c;
}

.feedback-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.34fr) minmax(320px, 0.82fr);
  gap: 14px;
  align-items: start;
}

.feedback-compose,
.feedback-recent {
  border: 1px solid #d7e1ef;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

.feedback-compose {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.feedback-section-head,
.feedback-recent-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feedback-compose h3,
.feedback-recent h3 {
  margin: 0 0 4px;
}

.feedback-secure-note {
  flex: 0 0 auto;
  padding: 6px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-type-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.feedback-type-card {
  position: relative;
  display: block;
  cursor: pointer;
}

.feedback-type-card input {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.feedback-type-card span {
  position: relative;
  z-index: 1;
  display: grid;
  min-height: 76px;
  gap: 5px;
  align-content: center;
  padding: 12px;
  border: 1px solid #d7e1ef;
  border-radius: 12px;
  background: #f8fafc;
  transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease, background 160ms ease;
}

.feedback-type-card strong {
  color: #0f172a;
  font-size: 0.98rem;
}

.feedback-type-card small {
  color: #64748b;
  font-weight: 750;
}

.feedback-type-card input:checked + span {
  border-color: #2563eb;
  background: #eff6ff;
  box-shadow: inset 0 0 0 1px #2563eb, 0 10px 22px rgba(37, 99, 235, 0.12);
}

.feedback-type-card:hover span {
  transform: translateY(-1px);
}

.feedback-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.feedback-form-grid label {
  display: block;
  margin-bottom: 6px;
  color: #0f172a;
  font-weight: 900;
}

.feedback-form-grid label span {
  color: #dc2626;
}

.feedback-form-grid input,
.feedback-form-grid select,
.feedback-form-grid textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 0.98rem;
  padding: 12px;
}

.feedback-form-grid textarea {
  resize: vertical;
  min-height: 150px;
}

.feedback-form-grid input:focus,
.feedback-form-grid select:focus,
.feedback-form-grid textarea:focus {
  outline: 3px solid rgba(37, 99, 235, 0.15);
  border-color: #2563eb;
}

.feedback-message-field {
  grid-column: 1 / -1;
}

.feedback-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.feedback-recent {
  padding: 16px;
}

.feedback-recent-head {
  margin-bottom: 12px;
}

.feedback-list {
  display: grid;
  gap: 10px;
}

.feedback-item {
  display: grid;
  gap: 9px;
  padding: 13px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.feedback-item.is-urgent {
  border-color: #fecaca;
  background: #fff7f7;
}

.feedback-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.feedback-item-head > div {
  display: grid;
  gap: 7px;
}

.feedback-item strong {
  color: #0f172a;
  line-height: 1.2;
}

.feedback-item p {
  margin: 0;
  color: #475569;
}

.feedback-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px 10px;
  color: #64748b;
  font-size: 0.84rem;
  font-weight: 750;
}

.feedback-pill,
.feedback-priority {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feedback-pill {
  background: #e0f2fe;
  color: #075985;
}

.feedback-pill.bug {
  background: #fef3c7;
  color: #92400e;
}

.feedback-pill.critical {
  background: #fee2e2;
  color: #991b1b;
}

.feedback-pill.general {
  background: #ede9fe;
  color: #5b21b6;
}

.feedback-priority {
  background: #f1f5f9;
  color: #475569;
}

.feedback-priority.urgent {
  background: #fee2e2;
  color: #991b1b;
}

.feedback-empty {
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
  padding: 24px 18px;
  color: #64748b;
  text-align: center;
  background: #f8fafc;
}

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

  .roadmap-layout,
  .roadmap-building-dashboard,
  .roadmap-building-bottom-insights,
  .roadmap-assignment-card,
  .roadmap-assignment-filters,
  .roadmap-assignment-summary,
  .roadmap-form-grid,
  .roadmap-builder-grid,
  .roadmap-builder-section,
  .roadmap-filter-grid,
  .roadmap-daily-snapshot-grid,
  .roadmap-daily-report-form,
  .roadmap-daily-summary,
  .roadmap-milestone-head,
  .roadmap-work-step-builder,
  .roadmap-scope-meta,
  .roadmap-page-building .roadmap-scope-row {
    grid-template-columns: 1fr;
  }

  .roadmap-scope-table-head {
    display: none;
  }

  .roadmap-page-building .roadmap-scope-row {
    gap: 11px;
    padding: 14px;
  }

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

  .roadmap-builder-plan,
  .roadmap-builder-location,
  .roadmap-builder-ownership,
  .roadmap-builder-status,
  .roadmap-builder-notes,
  .roadmap-work-step-panel,
  .roadmap-builder-plan .roadmap-wide {
    grid-column: 1 / -1;
  }

  .roadmap-hero,
  .roadmap-hero-control-row,
  .roadmap-section-head,
  .roadmap-scope-topline {
    align-items: flex-start;
    flex-direction: column;
  }

  .roadmap-hero-actions,
  .roadmap-storage-status {
    justify-items: stretch;
    text-align: left;
    width: 100%;
  }

  .feedback-layout,
  .feedback-form-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 640px) {
  .roadmap-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .roadmap-summary-card {
    min-height: 104px;
    padding: 13px;
  }

  .roadmap-summary-card b {
    width: 40px;
    height: 40px;
  }

  .feedback-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .feedback-summary-grid,
  .feedback-type-grid {
    grid-template-columns: 1fr;
  }

  .feedback-section-head,
  .feedback-recent-head,
  .feedback-item-head {
    flex-direction: column;
  }

  .feedback-compose,
  .feedback-recent {
    padding: 14px;
  }
}

.release-item {
  position: relative;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  padding: 0 0 18px;
}

.release-item::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 18px;
  bottom: 0;
  width: 2px;
  background: #dbeafe;
}

.release-item:last-child::before {
  display: none;
}

.release-marker {
  width: 18px;
  height: 18px;
  margin-top: 4px;
  border: 3px solid #93c5fd;
  border-radius: 50%;
  background: #ffffff;
  z-index: 1;
}

.release-item.current .release-marker {
  border-color: #16a34a;
  background: #dcfce7;
}

.release-content {
  padding: 14px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.release-item.current .release-content {
  border-color: #bbf7d0;
  background: #fbfffd;
}

.release-topline,
.release-tags,
.release-meta,
.release-verification {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.release-topline {
  justify-content: space-between;
  align-items: flex-start;
}

.release-version {
  margin: 0 0 2px;
  color: #2563eb;
  font-family: Consolas, "Courier New", monospace;
  font-size: 13px;
  font-weight: 800;
}

.release-content h3 {
  margin: 0;
  border-bottom: none;
  padding-bottom: 0;
}

.release-tags span {
  padding: 5px 8px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.release-meta {
  margin: 8px 0;
  color: #64748b;
  font-size: 13px;
}

.release-content p {
  margin: 8px 0;
}

.release-changes {
  margin: 10px 0;
  padding-left: 20px;
}

.release-changes li {
  margin: 6px 0;
}

.release-verification {
  align-items: baseline;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e5e7eb;
  color: #475569;
  font-size: 13px;
}

.release-verification strong {
  color: #0f172a;
}

.success {
  text-align: center;
  border-top: 6px solid #16a34a;
}

.small-text {
  font-size: 14px;
  color: #64748b;
}

.app-footer {
  max-width: 1180px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px auto 12px;
  padding: 0 12px;
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.2;
  text-align: center;
}

.app-footer p {
  margin: 0;
}

.app-footer p + p::before {
  content: "/";
  margin-right: 8px;
  color: #cbd5e1;
}

html[data-theme="dark"] {
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background:
    radial-gradient(circle at top, rgba(37, 99, 235, 0.14), transparent 34%),
    #020617;
  color: #e5e7eb;
}

html[data-theme="dark"] header {
  background:
    linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 41, 59, 0.96)),
    #020617;
  border-bottom: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] header p,
html[data-theme="dark"] .small-text,
html[data-theme="dark"] .app-footer,
html[data-theme="dark"] .release-meta,
html[data-theme="dark"] .report-card span,
html[data-theme="dark"] .report-card small,
html[data-theme="dark"] .notification-summary-card span,
html[data-theme="dark"] .activity-action-meta,
html[data-theme="dark"] .activity-action-details,
html[data-theme="dark"] .notification-event-details,
html[data-theme="dark"] .notification-group-preview,
html[data-theme="dark"] .report-workflow-accordion-summary span,
html[data-theme="dark"] .report-workflow-item-summary .report-workflow-time-pill,
html[data-theme="dark"] .report-workflow-item-details p span {
  color: #94a3b8;
}

html[data-theme="dark"] .role-badge,
html[data-theme="dark"] .view-mode-switcher,
html[data-theme="dark"] .theme-toggle {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.72);
  color: #f8fafc;
}

html[data-theme="dark"] .view-mode-switcher button {
  color: #cbd5e1;
}

html[data-theme="dark"] input.trusted-member-identity[readonly] {
  border-color: rgba(96, 165, 250, 0.62);
  background: rgba(30, 64, 175, 0.24);
  color: #dbeafe;
}

html[data-theme="dark"] .view-mode-switcher button.active {
  background: #e0f2fe;
  color: #0f172a;
}

html[data-theme="dark"] .card,
html[data-theme="dark"] .shift-handoff-card,
html[data-theme="dark"] .archive-item.tone-a,
html[data-theme="dark"] .archive-item.tone-b,
html[data-theme="dark"] .notification-summary-card,
html[data-theme="dark"] .notification-group,
html[data-theme="dark"] .activity-user-group,
html[data-theme="dark"] .report-card,
html[data-theme="dark"] .report-breakdown,
html[data-theme="dark"] .report-workflow-accordion,
html[data-theme="dark"] .report-workflow-item-summary,
html[data-theme="dark"] .record-ownership-panel,
html[data-theme="dark"] .account-auth-panel,
html[data-theme="dark"] .account-auth-state,
html[data-theme="dark"] .account-summary-panel,
html[data-theme="dark"] .template-summary,
html[data-theme="dark"] .template-editor-panel,
html[data-theme="dark"] .link-preview,
html[data-theme="dark"] .attachment-card,
html[data-theme="dark"] .operations-card,
html[data-theme="dark"] .operations-role-matrix,
html[data-theme="dark"] .manager-action-group,
html[data-theme="dark"] .account-hero,
html[data-theme="dark"] .phase-roadmap,
html[data-theme="dark"] .phase-status {
  border-color: rgba(148, 163, 184, 0.2);
  background: rgba(15, 23, 42, 0.94);
  color: #e5e7eb;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.28);
}

html[data-theme="dark"] .card h2,
html[data-theme="dark"] .card h3,
html[data-theme="dark"] .form-panel-heading h3,
html[data-theme="dark"] .shift-handoff-empty strong,
html[data-theme="dark"] .report-card strong,
html[data-theme="dark"] .report-workflow-item-details p strong,
html[data-theme="dark"] .report-workflow-time-pill,
html[data-theme="dark"] .notification-summary-card strong,
html[data-theme="dark"] .account-auth-state strong,
html[data-theme="dark"] .account-summary-panel strong,
html[data-theme="dark"] .user-management-summary strong,
html[data-theme="dark"] .user-management-access-preview strong,
html[data-theme="dark"] .user-management-row strong,
html[data-theme="dark"] .release-verification strong,
html[data-theme="dark"] .release-content h3,
html[data-theme="dark"] .record-ownership-panel > strong,
html[data-theme="dark"] .archive-summary strong {
  color: #f8fafc;
}

html[data-theme="dark"] .card h3,
html[data-theme="dark"] .shift-handoff-history-head,
html[data-theme="dark"] .form-panel-heading,
html[data-theme="dark"] .archive-details,
html[data-theme="dark"] .report-row,
html[data-theme="dark"] .report-workflow-item,
html[data-theme="dark"] .release-verification,
html[data-theme="dark"] .notification-event-row,
html[data-theme="dark"] .activity-action-row,
html[data-theme="dark"] .manager-action-group h3,
html[data-theme="dark"] .operations-section-head h3,
html[data-theme="dark"] .operations-section-head button {
  border-color: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .form-panel,
html[data-theme="dark"] .archive-filters,
html[data-theme="dark"] .shift-handoff-tabs,
html[data-theme="dark"] .shift-handoff-empty,
html[data-theme="dark"] .handoff-reference-empty,
html[data-theme="dark"] .handoff-completion-slider,
html[data-theme="dark"] .previous-handoff-reference,
html[data-theme="dark"] .handoff-confirmation-check,
html[data-theme="dark"] .confirm-check,
html[data-theme="dark"] .sms-consent-check,
html[data-theme="dark"] .notification-sender-card,
html[data-theme="dark"] .system-status-grid,
html[data-theme="dark"] .template-summary-grid,
html[data-theme="dark"] .template-list-row,
html[data-theme="dark"] .account-project-option,
html[data-theme="dark"] .release-tags span {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(30, 41, 59, 0.78);
  color: #e5e7eb;
}

html[data-theme="dark"] .notification-preview {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(15, 23, 42, 0.82);
  color: #cbd5e1;
}

html[data-theme="dark"] .account-project-option:has(input:disabled) {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(30, 64, 175, 0.24);
}

html[data-theme="dark"] .account-trusted-access {
  border-color: rgba(251, 146, 60, 0.42);
  border-left-color: #fb923c;
  background: rgba(124, 45, 18, 0.28);
  color: #fed7aa;
}

html[data-theme="dark"] .account-trusted-access.trusted {
  border-color: rgba(74, 222, 128, 0.36);
  border-left-color: #22c55e;
  background: rgba(20, 83, 45, 0.28);
  color: #bbf7d0;
}

html[data-theme="dark"] .account-access-model span,
html[data-theme="dark"] .account-access-detail-list article {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.36);
}

html[data-theme="dark"] .user-management-warning {
  border-color: rgba(96, 165, 250, 0.34);
  border-left-color: #60a5fa;
  background: rgba(30, 64, 175, 0.24);
  color: #bfdbfe;
}

html[data-theme="dark"] .user-management-advanced-panel {
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(30, 41, 59, 0.35);
  color: #cbd5e1;
}

html[data-theme="dark"] .user-management-advanced-panel summary {
  color: #e2e8f0;
}

html[data-theme="dark"] .user-management-advanced-panel > div {
  border-color: rgba(148, 163, 184, 0.18);
}

html[data-theme="dark"] .user-management-summary article,
html[data-theme="dark"] .user-management-access-preview article,
html[data-theme="dark"] .user-management-row,
html[data-theme="dark"] .user-management-qa,
html[data-theme="dark"] .user-management-provision,
html[data-theme="dark"] .roster-disclosure,
html[data-theme="dark"] .user-management-read-comparison,
html[data-theme="dark"] .people-access-audit,
html[data-theme="dark"] .people-access-audit-list article,
html[data-theme="dark"] .people-access-invite,
html[data-theme="dark"] .people-access-invite textarea,
html[data-theme="dark"] .admin-operational-read-card {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(15, 23, 42, 0.62);
}

html[data-theme="dark"] :is(.member-editor-summary, .roster-disclosure-summary, .member-audit-summary, .member-subdisclosure-summary):hover,
html[data-theme="dark"] :is(.member-editor-disclosure, .roster-disclosure, .user-management-audit-disclosure)[open] > summary,
html[data-theme="dark"] .roster-filter-bar {
  border-color: rgba(148, 163, 184, 0.18);
  background: rgba(30, 41, 59, 0.72);
}

html[data-theme="dark"] .member-bulk-editor {
  border-color: rgba(96, 165, 250, 0.3);
  background: linear-gradient(135deg, rgba(30, 64, 175, 0.2), rgba(15, 23, 42, 0.78));
}

html[data-theme="dark"] .member-bulk-fieldset,
html[data-theme="dark"] .member-bulk-check,
html[data-theme="dark"] .member-bulk-setting {
  border-color: rgba(148, 163, 184, 0.22);
  background: rgba(15, 23, 42, 0.68);
  color: #e2e8f0;
}

html[data-theme="dark"] .member-bulk-check:has(input:checked),
html[data-theme="dark"] .member-bulk-setting:has(input:checked) {
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(30, 64, 175, 0.28);
}

html[data-theme="dark"] .member-bulk-fieldset legend,
html[data-theme="dark"] .member-bulk-check strong,
html[data-theme="dark"] .member-bulk-setting strong {
  color: #f8fafc;
}

html[data-theme="dark"] .admin-loop-checks article {
  border-color: rgba(245, 158, 11, 0.24);
  border-left-color: #f59e0b;
  background: rgba(120, 53, 15, 0.22);
}

html[data-theme="dark"] .admin-loop-checks article.passed {
  border-color: rgba(34, 197, 94, 0.24);
  border-left-color: #22c55e;
  background: rgba(20, 83, 45, 0.24);
}

html[data-theme="dark"] .admin-operational-read-card {
  background: rgba(15, 23, 42, 0.56);
}

html[data-theme="dark"] .admin-operational-read-card .admin-operational-read-module span {
  color: #e2e8f0;
}

html[data-theme="dark"] .admin-operational-read-card .admin-operational-mismatch,
html[data-theme="dark"] .admin-operational-read-card .admin-operational-warning {
  color: #fdba74;
}

html[data-theme="dark"] .user-management-row-head {
  background: rgba(15, 23, 42, 0.38);
  color: #cbd5e1;
}

html[data-theme="dark"] .handoff-panel-info,
html[data-theme="dark"] .handoff-panel-people,
html[data-theme="dark"] .handoff-panel-worksteps,
html[data-theme="dark"] .handoff-panel-work,
html[data-theme="dark"] .handoff-panel-blockers,
html[data-theme="dark"] .handoff-panel-safety,
html[data-theme="dark"] .handoff-panel-references,
html[data-theme="dark"] .handoff-panel-signoff {
  background:
    linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(15, 23, 42, 0.82)),
    rgba(15, 23, 42, 0.92);
}

html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  border-color: rgba(148, 163, 184, 0.34);
  background: #020617;
  color: #f8fafc;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #64748b;
}

html[data-theme="dark"] input:focus,
html[data-theme="dark"] select:focus,
html[data-theme="dark"] textarea:focus {
  outline: 2px solid rgba(96, 165, 250, 0.55);
  border-color: #60a5fa;
}

html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .test-fill-button,
html[data-theme="dark"] .file-choice.secondary-choice {
  background: #334155;
}

html[data-theme="dark"] .handoff-accept-button {
  background: #fb923c;
  border-color: #fdba74;
}

html[data-theme="dark"] .toolbar-back,
html[data-theme="dark"] .shift-handoff-tabs button.active {
  background: #2563eb;
  color: #ffffff;
}

html[data-theme="dark"] .shift-handoff-tabs button,
html[data-theme="dark"] .archive-status-tabs button {
  color: #cbd5e1;
}

html[data-theme="dark"] .archive-status-tabs button {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.88);
}

html[data-theme="dark"] .archive-status-tabs button.active {
  border-color: #60a5fa;
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .archive-status-tabs button.warn-tab,
html[data-theme="dark"] .report-warning,
html[data-theme="dark"] .shift-handoff-storage-notice {
  border-color: rgba(250, 204, 21, 0.38);
  background: rgba(113, 63, 18, 0.28);
  color: #fde68a;
}

html[data-theme="dark"] .shift-handoff-storage-notice strong,
html[data-theme="dark"] .shift-handoff-storage-notice p {
  color: #fde68a;
}

html[data-theme="dark"] .notification-error {
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca !important;
}

html[data-theme="dark"] .handoff-work-step-summary,
html[data-theme="dark"] .handoff-work-step-card,
html[data-theme="dark"] .handoff-work-step-empty,
html[data-theme="dark"] .handoff-live-progress,
html[data-theme="dark"] .handoff-step-progress,
html[data-theme="dark"] .building-pulse,
html[data-theme="dark"] .handoff-scope-snapshot {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .handoff-work-step-summary > strong,
html[data-theme="dark"] .handoff-work-step-top strong,
html[data-theme="dark"] .handoff-work-step-empty strong,
html[data-theme="dark"] .handoff-live-progress > strong,
html[data-theme="dark"] .handoff-step-progress-top strong,
html[data-theme="dark"] .building-pulse-head strong,
html[data-theme="dark"] .building-pulse-card strong {
  color: #f8fafc;
}

html[data-theme="dark"] .handoff-work-step-card p,
html[data-theme="dark"] .handoff-work-step-empty p,
html[data-theme="dark"] .handoff-progress small,
html[data-theme="dark"] .handoff-live-progress p,
html[data-theme="dark"] .handoff-step-progress-top span,
html[data-theme="dark"] .building-pulse-card span {
  color: #94a3b8;
}

html[data-theme="dark"] .handoff-work-step-meta span {
  background: rgba(59, 130, 246, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .handoff-step-progress-track {
  background: rgba(148, 163, 184, 0.2);
}

html[data-theme="dark"] .handoff-step-list button {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
}

html[data-theme="dark"] .handoff-step-list button span {
  background: rgba(148, 163, 184, 0.18);
  color: #cbd5e1;
}

html[data-theme="dark"] .handoff-step-list button.is-active {
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(37, 99, 235, 0.22);
  color: #bfdbfe;
}

html[data-theme="dark"] .handoff-step-list button.is-complete {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.28);
  color: #bbf7d0;
}

html[data-theme="dark"] .shift-handoff-timeline,
html[data-theme="dark"] .shift-handoff-timeline-toggle {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
  color: #cbd5e1;
}

html[data-theme="dark"] .shift-handoff-timeline-toggle {
  border-color: rgba(147, 197, 253, 0.72);
  background: linear-gradient(180deg, rgba(239, 246, 255, 0.98) 0%, rgba(219, 234, 254, 0.94) 100%);
  color: #0f1f3d;
}

html[data-theme="dark"] .shift-handoff-timeline-toggle:hover {
  border-color: #93c5fd;
  background: #ffffff;
  color: #0f3f9f;
}

html[data-theme="dark"] .building-pulse-head span {
  color: #93c5fd;
}

html[data-theme="dark"] .building-pulse-head p,
html[data-theme="dark"] .building-pulse-card,
html[data-theme="dark"] .building-pulse-detail-row {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
}

html[data-theme="dark"] .building-pulse-detail-head strong,
html[data-theme="dark"] .building-pulse-detail-row span {
  color: #f8fafc;
}

html[data-theme="dark"] .building-pulse-detail-row small,
html[data-theme="dark"] .building-pulse-detail-row em {
  color: #94a3b8;
}

html[data-theme="dark"] .building-pulse-card.is-active {
  outline-color: rgba(96, 165, 250, 0.36);
}

html[data-theme="dark"] .building-pulse-card.active {
  border-color: rgba(96, 165, 250, 0.34);
  background: rgba(30, 64, 175, 0.24);
}

html[data-theme="dark"] .building-pulse-card.blocked {
  border-color: rgba(248, 113, 113, 0.34);
  background: rgba(127, 29, 29, 0.28);
}

html[data-theme="dark"] .building-pulse-card.qa-ready {
  border-color: rgba(250, 204, 21, 0.34);
  background: rgba(113, 63, 18, 0.28);
}

html[data-theme="dark"] .building-pulse-card.complete {
  border-color: rgba(74, 222, 128, 0.34);
  background: rgba(20, 83, 45, 0.28);
}

html[data-theme="dark"] .handoff-scope-counts span,
html[data-theme="dark"] .handoff-scope-crews strong {
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
}

html[data-theme="dark"] .shift-handoff-scope-main strong {
  color: #f8fafc;
}

html[data-theme="dark"] .shift-handoff-scope-main small {
  color: #94a3b8;
}

html[data-theme="dark"] .shift-handoff-scope-count {
  background: rgba(30, 41, 59, 0.88);
  color: #cbd5e1;
}

html[data-theme="dark"] .shift-handoff-scope-chevron::before {
  border-color: #94a3b8;
}

html[data-theme="dark"] .shift-handoff-expanded {
  border-top-color: rgba(148, 163, 184, 0.24);
}

html[data-theme="dark"] .handoff-scope-counts strong,
html[data-theme="dark"] .handoff-scope-alert strong {
  color: #f8fafc;
}

html[data-theme="dark"] .handoff-scope-crews span,
html[data-theme="dark"] .handoff-scope-alert span {
  color: #94a3b8;
}

html[data-theme="dark"] .handoff-scope-counts .needs-attention {
  background: rgba(127, 29, 29, 0.42);
  color: #fecaca;
}

html[data-theme="dark"] .handoff-scope-counts .qa-ready {
  background: rgba(113, 63, 18, 0.42);
  color: #fde68a;
}

html[data-theme="dark"] .handoff-scope-alert.blocked {
  border-color: rgba(248, 113, 113, 0.36);
  background: rgba(127, 29, 29, 0.28);
}

html[data-theme="dark"] .handoff-scope-alert.qa-ready {
  border-color: rgba(250, 204, 21, 0.36);
  background: rgba(113, 63, 18, 0.28);
}

html[data-theme="dark"] .shift-handoff-card.is-selected,
html[data-theme="dark"] .archive-item.selected {
  background: rgba(37, 99, 235, 0.18);
  outline-color: #60a5fa;
}

html[data-theme="dark"] .handoff-signature-dialog,
html[data-theme="dark"] .photo-modal-content {
  background: #0f172a;
  color: #e5e7eb;
}

html[data-theme="dark"] .signature-pad,
html[data-theme="dark"] canvas {
  background: #f8fafc;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .release-badge,
html[data-theme="dark"] .shift-handoff-kicker {
  background: rgba(37, 99, 235, 0.18);
  color: #bfdbfe;
}

html[data-theme="dark"] .success {
  border-top-color: #22c55e;
}

html[data-theme="dark"] label,
html[data-theme="dark"] legend,
html[data-theme="dark"] .card p,
html[data-theme="dark"] .form-panel p,
html[data-theme="dark"] .shift-handoff-card p,
html[data-theme="dark"] .archive-item p,
html[data-theme="dark"] .template-summary p,
html[data-theme="dark"] .template-editor-panel p,
html[data-theme="dark"] .notification-group p,
html[data-theme="dark"] .activity-user-group p,
html[data-theme="dark"] .release-content p,
html[data-theme="dark"] .modal p,
html[data-theme="dark"] .handoff-signature-dialog p {
  color: #dbeafe;
}

html[data-theme="dark"] .small-text,
html[data-theme="dark"] .help-text,
html[data-theme="dark"] .field-hint,
html[data-theme="dark"] .form-hint,
html[data-theme="dark"] .muted,
html[data-theme="dark"] .archive-details,
html[data-theme="dark"] .archive-summary,
html[data-theme="dark"] .handoff-work-step-top span,
html[data-theme="dark"] .handoff-work-step-meta,
html[data-theme="dark"] .handoff-scope-snapshot span,
html[data-theme="dark"] .handoff-scope-alert span,
html[data-theme="dark"] .handoff-reference-meta,
html[data-theme="dark"] .previous-handoff-reference,
html[data-theme="dark"] .notification-event-details,
html[data-theme="dark"] .activity-action-details,
html[data-theme="dark"] .report-row span {
  color: #cbd5e1;
}

html[data-theme="dark"] strong,
html[data-theme="dark"] .archive-item strong,
html[data-theme="dark"] .shift-handoff-card strong,
html[data-theme="dark"] .template-list-row strong,
html[data-theme="dark"] .handoff-panel strong,
html[data-theme="dark"] .handoff-signature-dialog strong {
  color: #f8fafc;
}

html[data-theme="dark"] .shift-handoff-continuation,
html[data-theme="dark"] .shift-handoff-preview,
html[data-theme="dark"] .handoff-reference-tray,
html[data-theme="dark"] .handoff-reference-card,
html[data-theme="dark"] .handoff-reference-empty,
html[data-theme="dark"] .previous-handoff-reference,
html[data-theme="dark"] .handoff-confirmation-check,
html[data-theme="dark"] .confirm-check,
html[data-theme="dark"] .signature-box,
html[data-theme="dark"] .system-status-card,
html[data-theme="dark"] .release-content,
html[data-theme="dark"] .release-verification,
html[data-theme="dark"] .notification-event-row,
html[data-theme="dark"] .activity-action-row,
html[data-theme="dark"] .template-list-row,
html[data-theme="dark"] .archive-details {
  border-color: rgba(148, 163, 184, 0.26);
  background: rgba(15, 23, 42, 0.82);
  color: #e5e7eb;
}

html[data-theme="dark"] .shift-handoff-preview strong,
html[data-theme="dark"] .shift-handoff-preview span,
html[data-theme="dark"] .shift-handoff-preview small,
html[data-theme="dark"] .shift-handoff-continuation strong,
html[data-theme="dark"] .shift-handoff-continuation p {
  color: #dcfce7;
}

html[data-theme="dark"] .shift-handoff-preview.needs-escalation,
html[data-theme="dark"] .handoff-scope-alert.qa-ready,
html[data-theme="dark"] .archive-status-tabs button.warn-tab {
  background: rgba(113, 63, 18, 0.34);
  color: #fde68a;
}

html[data-theme="dark"] .shift-handoff-preview.needs-escalation strong,
html[data-theme="dark"] .shift-handoff-preview.needs-escalation span,
html[data-theme="dark"] .shift-handoff-preview.needs-escalation small {
  color: #fde68a;
}

html[data-theme="dark"] .shared-storage-downtime-notice {
  border-color: rgba(245, 158, 11, 0.5);
  background: rgba(120, 53, 15, 0.35);
  color: #fde68a;
}

html[data-theme="dark"] .shared-storage-downtime-notice strong,
html[data-theme="dark"] .shared-storage-downtime-notice small,
html[data-theme="dark"] .shift-handoff-storage-notice small {
  color: #fef3c7;
}

html[data-theme="dark"] button.secondary,
html[data-theme="dark"] .compact-button.secondary,
html[data-theme="dark"] .test-fill-button,
html[data-theme="dark"] .file-choice.secondary-choice,
html[data-theme="dark"] .clear-signature {
  border-color: rgba(148, 163, 184, 0.34);
  background: rgba(30, 41, 59, 0.96);
  color: #f8fafc;
}

html[data-theme="dark"] button.secondary:hover,
html[data-theme="dark"] .compact-button.secondary:hover,
html[data-theme="dark"] .test-fill-button:hover,
html[data-theme="dark"] .clear-signature:hover {
  background: rgba(51, 65, 85, 0.98);
}

html[data-theme="dark"] button.danger,
html[data-theme="dark"] .danger {
  background: #b91c1c;
  color: #fff7ed;
}

html[data-theme="dark"] select option {
  background: #0f172a;
  color: #f8fafc;
}

html[data-theme="dark"] input[type="range"] {
  accent-color: #60a5fa;
}

html[data-theme="dark"] a {
  color: #93c5fd;
}

html[data-theme="dark"] .pill,
html[data-theme="dark"] .badge,
html[data-theme="dark"] .status-pill,
html[data-theme="dark"] .form-step,
html[data-theme="dark"] .release-tags span {
  border-color: rgba(147, 197, 253, 0.28);
  background: rgba(37, 99, 235, 0.2);
  color: #dbeafe;
}

html[data-theme="dark"] .shift-handoff-acceptance.accepted {
  border: 1px solid rgba(74, 222, 128, 0.42);
  background: rgba(20, 83, 45, 0.38);
  box-shadow: inset 0 0 0 1px rgba(187, 247, 208, 0.08);
}

html[data-theme="dark"] .shift-handoff-acceptance.pending {
  border: 1px solid rgba(250, 204, 21, 0.42);
  background: rgba(113, 63, 18, 0.36);
}

html[data-theme="dark"] .shift-handoff-acceptance strong,
html[data-theme="dark"] .shift-handoff-acceptance span,
html[data-theme="dark"] .shift-handoff-acceptance small,
html[data-theme="dark"] .shift-handoff-acceptance p {
  color: #f8fafc;
}

html[data-theme="dark"] .shift-handoff-acceptance.accepted small,
html[data-theme="dark"] .shift-handoff-acceptance.accepted p {
  color: #dcfce7;
}

html[data-theme="dark"] .shift-handoff-acceptance.pending span {
  color: #fde68a;
}

@media (min-width: 900px) {
  body {
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.03), transparent 220px),
      #eef3f8;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 100;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 16px 24px;
    padding: 18px max(32px, calc((100vw - 1180px) / 2 + 24px));
    text-align: left;
    box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16);
  }

  header h1 {
    font-size: 26px;
    line-height: 1.15;
  }

  header p {
    margin-top: 4px;
  }

  .session-toolbar {
    grid-column: 2;
    grid-row: 1 / span 2;
    justify-content: flex-end;
    margin-top: 0;
  }

  .app {
    max-width: 1180px;
    margin: 24px auto 34px;
    padding: 0 24px;
  }

  .card {
    padding: 24px;
    border-radius: 10px;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.08);
  }

  body {
    padding-left: 214px;
  }

  body > header {
    display: none;
  }

  .desktop-sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 300;
    width: 214px;
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 18px 12px 14px;
    background:
      linear-gradient(180deg, rgba(30, 64, 175, 0.24), transparent 42%),
      #07172c;
    color: #ffffff;
    box-shadow: 16px 0 36px rgba(15, 23, 42, 0.18);
  }

  .desktop-brand {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 0 6px 16px;
    border-bottom: 1px solid rgba(226, 232, 240, 0.14);
    text-transform: uppercase;
  }

  .desktop-brand-mark {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.08);
  }

  .sidebar-emblem {
    width: 31px;
    height: 31px;
  }

  .desktop-brand strong {
    font-size: 15px;
    line-height: 1.05;
    letter-spacing: 0;
  }

  .desktop-nav {
    display: grid;
    gap: 8px;
    align-content: start;
    padding-top: 16px;
  }

  .desktop-nav-group {
    display: grid;
    gap: 5px;
  }

  .desktop-nav-label {
    margin: 0;
    padding: 0 6px;
    color: #93c5fd;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: 0.01em;
    text-transform: uppercase;
  }

  .desktop-nav button,
  .desktop-sidebar-foot button {
    width: 100%;
    min-height: 38px;
    margin: 0;
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr);
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: transparent;
    color: #dbeafe;
    box-shadow: none;
    text-align: left;
    font-size: 14px;
    font-weight: 800;
  }

  .desktop-nav button:hover,
  .desktop-nav button.active,
  .desktop-sidebar-foot button:hover {
    border-color: rgba(147, 197, 253, 0.22);
    background: rgba(96, 165, 250, 0.16);
    color: #ffffff;
  }

  .desktop-nav button.is-restricted:not(.active) {
    opacity: 0.58;
  }

.desktop-sidebar-foot {
    display: grid;
    gap: 6px;
    padding-top: 12px;
    border-top: 1px solid rgba(226, 232, 240, 0.14);
  }

  .desktop-user-chip {
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin-top: 6px;
    padding: 6px 6px 0;
  }

  .desktop-user-chip > span {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #ffffff;
    color: #0f172a;
    font-weight: 900;
  }

  .desktop-user-chip strong,
  .desktop-user-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .desktop-user-chip small {
    color: #bfdbfe;
  }

  .app {
    max-width: 1220px;
  }

  body.command-view-focus-mode {
    padding-left: 0;
    overflow: hidden;
  }

  body.command-view-focus-mode .desktop-sidebar,
  body.command-view-focus-mode #globalBackBar {
    display: none;
  }

  body.command-view-focus-mode .app {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 10px;
  }

  body.command-view-focus-mode .command-view-screen.card {
    min-height: calc(100vh - 20px);
    margin: 0;
    padding: 12px;
    border-radius: 8px;
  }

  body.command-view-focus-mode .command-view-screen.screen.active {
    gap: 8px;
  }

  body.command-view-focus-mode .command-view-screen .screen-context-bar,
  body.command-view-focus-mode .command-view-hero .operations-kicker,
  body.command-view-focus-mode .command-view-hero p,
  body.command-view-focus-mode .command-view-actions .command-sample-action {
    display: none;
  }

  body.command-view-focus-mode .command-view-hero {
    display: grid;
    grid-template-columns: minmax(150px, auto) minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  body.command-view-focus-mode .command-view-hero h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.1;
  }

  body.command-view-focus-mode .command-view-actions {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
  }

  body.command-view-focus-mode .command-view-actions button {
    width: auto;
    min-height: 30px;
    padding: 6px 10px;
    border-radius: 7px;
    font-size: 12px;
  }

  body.command-view-focus-mode .command-view-screen .user-management-summary {
    display: none;
  }

  body.command-view-focus-mode .command-view-workspace {
    height: calc(100vh - 66px);
  }

  body.command-view-focus-mode .command-view-controls {
    gap: 8px;
    padding: 6px 8px;
  }

  body.command-view-focus-mode .command-view-controls label {
    min-width: 118px;
    gap: 3px;
    font-size: 9px;
  }

  body.command-view-focus-mode .command-view-controls select {
    min-height: 32px;
    font-size: 12px;
  }

  body.command-view-focus-mode .command-view-zoom-controls {
    gap: 3px;
  }

  body.command-view-focus-mode .command-view-zoom-controls > div {
    min-height: 32px;
    padding: 2px;
  }

  body.command-view-focus-mode .command-view-zoom-controls button {
    min-height: 28px;
    padding: 5px 8px;
  }

  body.command-view-focus-mode .command-view-layout,
  body.command-view-focus-mode .command-view-chart {
    min-height: calc(100vh - 122px);
  }

  #home.card {
    padding: 0;
    overflow: hidden;
    border-radius: 0 0 0 24px;
    background: #f8fafc;
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.08);
  }

  .mission-hero {
    min-height: 268px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    padding: 52px 44px 34px;
    background:
      linear-gradient(90deg, rgba(248, 250, 252, 0.98) 0%, rgba(248, 250, 252, 0.9) 38%, rgba(248, 250, 252, 0.16) 72%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(15, 23, 42, 0.04)),
      url("assets/mission-control-data-center-construction.jpg") center right / cover no-repeat;
    border-bottom: 1px solid #e2e8f0;
  }

  .mission-kicker {
    margin: 0 0 8px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mission-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 32px;
    line-height: 1.12;
  }

  .mission-hero p {
    margin: 10px 0 0;
    color: #334155;
    font-size: 17px;
  }

  .mission-site-intel {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
  }

  .mission-intel-card {
    min-height: 54px;
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 9px 13px;
    border: 1px solid rgba(226, 232, 240, 0.9);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 26px rgba(15, 23, 42, 0.08);
    backdrop-filter: blur(10px);
  }

  .mission-intel-card small,
  .mission-intel-card strong {
    display: block;
    line-height: 1.15;
  }

  .mission-intel-card small {
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
  }

  .mission-intel-card strong {
    margin-top: 3px;
    color: #0f172a;
    font-size: 14px;
  }

  .mission-intel-icon {
    position: relative;
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #eff6ff;
  }

  .calendar-icon::before {
    content: "";
    width: 18px;
    height: 18px;
    border: 2px solid #2563eb;
    border-radius: 5px;
    background:
      linear-gradient(#2563eb 0 4px, transparent 4px),
      linear-gradient(90deg, transparent 0 5px, rgba(37, 99, 235, 0.3) 5px 7px, transparent 7px 11px, rgba(37, 99, 235, 0.3) 11px 13px, transparent 13px);
  }

  .weather-card {
    min-width: 214px;
  }

  .weather-icon {
    overflow: hidden;
    background: linear-gradient(145deg, #eff6ff, #fff7ed);
  }

  .weather-sun {
    position: absolute;
    top: 7px;
    left: 7px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #f59e0b;
    box-shadow: 0 0 0 5px rgba(245, 158, 11, 0.16);
  }

  .weather-cloud {
    position: absolute;
    right: 6px;
    bottom: 8px;
    width: 20px;
    height: 10px;
    border-radius: 999px;
    background: #93c5fd;
    box-shadow:
      -8px 1px 0 -1px #bfdbfe,
      -4px -5px 0 0 #dbeafe;
  }

  .weather-icon.clear .weather-cloud {
    display: none;
  }

  .weather-icon.rain .weather-sun,
  .weather-icon.snow .weather-sun,
  .weather-icon.fog .weather-sun {
    opacity: 0.32;
  }

  .weather-icon.rain::after,
  .weather-icon.snow::after,
  .weather-icon.fog::after {
    content: "";
    position: absolute;
    left: 10px;
    right: 8px;
    bottom: 4px;
    height: 8px;
  }

  .weather-icon.rain::after {
    background:
      linear-gradient(115deg, transparent 0 35%, #2563eb 36% 48%, transparent 49%) 0 0 / 8px 8px repeat-x;
  }

  .weather-icon.snow::after {
    background:
      radial-gradient(circle, #60a5fa 0 2px, transparent 2.5px) 0 0 / 8px 8px repeat-x;
  }

  .weather-icon.fog::after {
    height: 10px;
    border-top: 2px solid #94a3b8;
    border-bottom: 2px solid #cbd5e1;
  }

  .mission-project-select {
    width: min(100%, 280px);
    min-height: 56px;
    margin: 18px 0 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    padding: 10px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.96);
    color: #0f172a;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
    text-align: left;
  }

  .mission-project-select label {
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
  }

  .mission-project-select select {
    width: 100%;
    margin: 2px 0 0;
    padding: 0 24px 0 0;
    border: 0;
    background: transparent;
    color: #0f172a;
    font-size: 17px;
    font-weight: 900;
    outline: 0;
  }

  .mission-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 12px;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
  }

  .mission-hero-actions {
    display: flex;
    gap: 10px;
    align-items: flex-start;
  }

  .mission-hero-actions button {
    width: auto;
    min-height: 40px;
    margin: 0;
    padding: 10px 16px;
    border-radius: 8px;
  }

  .mission-workspace-grid,
  .mission-lower-grid,
  .mission-metrics,
  .mission-next-panel,
  .mission-action-center {
    width: calc(100% - 56px);
    margin-left: 28px;
    margin-right: 28px;
  }

  .mission-next-panel {
    padding: 20px;
    border-radius: 12px;
  }

  .mission-next-action {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    align-items: center;
    padding: 15px 16px;
  }

  .mission-next-action button {
    grid-column: auto;
    width: auto;
    min-width: 150px;
  }

  .mobile-command-menu {
    display: none;
  }

  .mission-panel h3 {
    margin: 0;
    color: #0f172a;
    font-size: 19px;
  }

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

  .mission-metric-card,
  .mission-panel,
  .mission-quick-actions button,
  .mission-work-item {
    border: 1px solid rgba(203, 213, 225, 0.78);
    background: #ffffff;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.06);
  }

  .mission-metric-card {
    position: relative;
    min-height: 132px;
    margin: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 48px;
    grid-template-rows: auto 1fr auto;
    align-items: start;
    gap: 9px 14px;
    padding: 18px 18px 16px 20px;
    border-radius: 10px;
    background:
      linear-gradient(135deg, rgba(248, 250, 252, 0.2), rgba(255, 255, 255, 0.98)),
      #ffffff;
    color: #0f172a;
    text-align: left;
    overflow: hidden;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  .mission-metric-card:hover,
  .mission-metric-card:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.38);
    box-shadow: 0 22px 42px rgba(15, 23, 42, 0.1);
  }

  .mission-metric-card:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.22);
    outline-offset: 2px;
  }

  .mission-metric-accent {
    position: absolute;
    inset: 0 auto 0 0;
    width: 4px;
    background: #64748b;
  }

  .mission-metric-label,
  .mission-metric-card small {
    grid-column: 1;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .mission-metric-card strong {
    grid-column: 1;
    align-self: center;
    color: #0f172a;
    font-size: 34px;
    line-height: 1;
  }

  .mission-metric-card small {
    align-self: end;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
    text-transform: none;
  }

  .mission-metric-icon {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 900;
  }

  .mission-metric-card.danger strong {
    color: #991b1b;
  }

  .mission-metric-card.danger {
    border-color: #fecaca;
    background:
      linear-gradient(135deg, rgba(254, 242, 242, 0.96), rgba(255, 255, 255, 0.98)),
      #fff5f5;
    box-shadow: 0 18px 36px rgba(153, 27, 27, 0.08);
  }

  .mission-metric-card.danger .mission-metric-accent {
    background: #fca5a5;
  }

  .mission-metric-card.danger .mission-metric-icon {
    background: #fee2e2;
    color: #b91c1c;
  }

  .mission-metric-card.success strong {
    color: #15803d;
  }

  .mission-metric-card.success .mission-metric-accent {
    background: #22c55e;
  }

  .mission-metric-card.success .mission-metric-icon {
    background: #ecfdf5;
    color: #16a34a;
  }

  .mission-metric-card.info strong {
    color: #2563eb;
  }

  .mission-metric-card.info .mission-metric-accent {
    background: #3b82f6;
  }

  .mission-metric-card.info .mission-metric-icon {
    background: #eff6ff;
    color: #2563eb;
  }

  .mission-metric-card.neutral .mission-metric-accent {
    background: #0f172a;
  }

  .mission-metric-card.neutral .mission-metric-icon {
    background: #f8fafc;
    color: #0f172a;
  }

  .mission-workspace-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .mission-lower-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 14px;
  }

  .mission-panel {
    padding: 18px;
    border-radius: 10px;
    background:
      linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.72)),
      #ffffff;
  }

  .mission-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
  }

  .mission-panel-head p {
    margin: 4px 0 0;
  }

  .mission-work-list {
    display: grid;
    gap: 10px;
  }

  .mission-work-item {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 180px;
    gap: 16px;
    min-height: 92px;
    padding: 15px 15px 15px 22px;
    border-radius: 10px;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.045);
    overflow: hidden;
  }

  .mission-work-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: #2563eb;
  }

  .mission-work-item.danger::before {
    background: #ef4444;
  }

  .mission-work-item.success::before {
    background: #22c55e;
  }

  .mission-work-item.warning::before {
    background: #f59e0b;
  }

  .mission-work-item h4 {
    margin: 6px 0;
    color: #0f172a;
    font-size: 15px;
  }

  .mission-work-item p {
    margin: 0;
    color: #475569;
    font-size: 13px;
  }

  .mission-work-status {
    display: grid;
    justify-items: end;
    align-content: center;
    gap: 7px;
  }

  .mission-mini-progress {
    width: 96px;
    height: 6px;
    overflow: hidden;
    border-radius: 999px;
    background: #e2e8f0;
  }

  .mission-mini-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #2563eb;
  }

  .mission-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: 12px;
  }

  .mobile-quick-admin {
    display: none;
  }

  .mission-quick-actions button {
    min-height: 106px;
    margin: 0;
    display: grid;
    justify-items: center;
    align-content: center;
    gap: 8px;
    padding: 14px 12px;
    border-radius: 10px;
    background:
      linear-gradient(180deg, #ffffff, #f8fafc);
    color: #0f172a;
    text-align: center;
    font-size: 13px;
    transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
  }

  .mission-quick-actions .mobile-quick-admin {
    display: none;
  }

  .mission-quick-actions button:hover,
  .mission-quick-actions button:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(37, 99, 235, 0.34);
    box-shadow: 0 18px 30px rgba(15, 23, 42, 0.08);
  }

  .mission-quick-actions span {
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 900;
  }

  #home.screen.active {
    display: block;
  }

  .mobile-home-actions {
    display: none;
  }

  .operations-portal {
    padding: 28px;
  }

  .account-profile-screen {
    padding: 28px;
  }

  .operations-hero {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.32fr);
    align-items: center;
    padding: 28px;
  }

  .account-hero {
    grid-template-columns: minmax(0, 1fr) minmax(230px, 0.34fr);
    align-items: center;
    padding: 28px;
  }

  .operations-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
    align-items: start;
  }

  .account-profile-layout {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.38fr);
    align-items: start;
  }

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

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

  .account-auth-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .account-access-detail-list article {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .user-management-summary {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .user-management-form-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .admin-loop-checks {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .user-management-projects {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

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

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

  .desktop-mission-control {
    display: grid;
    gap: 18px;
  }

  .mobile-home-actions button,
  .manager-action-grid button {
    min-height: 72px;
    margin-top: 0;
    border-radius: 8px;
  }

  #managerMode.screen.active {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
  }

  #managerMode h2,
  #managerMode .status-counts,
  #managerMode .manager-action-groups,
  #managerMode .phase-roadmap {
    grid-column: 1 / -1;
  }

  .manager-action-group {
    grid-template-columns: 1fr;
  }

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

  .status-counts,
  .system-status-grid,
  .template-summary-grid,
  .report-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .filter-grid,
  .shift-handoff-filters {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
  }

  .shift-handoff-hero {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
  }

  .shift-handoff-hero h2,
  .shift-handoff-hero p {
    grid-column: 1;
  }

  .shift-handoff-tabs {
    grid-column: 2;
    grid-row: 1 / span 3;
    align-self: center;
    min-width: 360px;
  }

  .shift-handoff-hero-actions {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .shift-handoff-history-head {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .shift-handoff-card-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
  }

  .handoff-step-list {
    grid-template-columns: repeat(8, minmax(0, 1fr));
  }

  .handoff-step-nav,
  .shift-handoff-actions,
  .inspection-action-row,
  .report-actions,
  .field-link-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .form-panel {
    padding: 18px;
  }

  .handoff-panel,
  .template-editor-panel,
  .field-link-builder {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
    align-items: start;
  }

  #inspectionForm .form-panel-heading,
  .handoff-panel .form-panel-heading,
  .template-editor-head,
  .template-list-editor,
  .builder-workflow-step,
  .field-link-builder > p,
  .field-link-actions,
  .link-preview,
  #checklistQuestions,
  #photoRequirements,
  .photo-box,
  .handoff-completion-slider,
  .field-hint,
  .previous-handoff-reference,
  .work-step-builder,
  .handoff-work-step-list,
  .handoff-reference-tray,
  .handoff-confirmation-check,
  .signature-box,
  .confirmation-section .confirm-label,
  .confirm-check {
    grid-column: 1 / -1;
  }

  .iac-section,
  .confirmation-section {
    padding: 18px;
  }

  .builder-subtabs {
    width: min(100%, 680px);
  }

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

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

  .activity-toolbar {
    align-items: center;
  }

  .archive-status-tabs {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.desktop-nav [hidden],
.mobile-command-menu [hidden],
.mobile-home-actions [hidden] {
  display: none !important;
}

@media (min-width: 1280px) {
  .app {
    max-width: 1320px;
  }

  header {
    padding-left: max(42px, calc((100vw - 1320px) / 2 + 24px));
    padding-right: max(42px, calc((100vw - 1320px) / 2 + 24px));
  }

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

@media (max-width: 640px) {
  .user-management-hero,
  .user-management-table-head {
    display: grid;
  }

  .user-management-hero button {
    width: 100%;
  }

  header {
    position: sticky;
    top: 0;
    z-index: 250;
    padding: 14px 12px 12px;
    text-align: left;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  }

  header h1 {
    font-size: 22px;
    line-height: 1.2;
  }

  header p {
    font-size: 14px;
  }

  .session-toolbar {
    justify-content: flex-start;
    gap: 6px;
  }

  .role-badge {
    width: 100%;
    text-align: center;
  }

  .session-toolbar .compact-button,
  .theme-toggle {
    flex: 1 1 calc(50% - 6px);
    min-height: 38px;
    padding: 8px 10px;
  }

  .session-toolbar .view-mode-switcher {
    order: 5;
    width: 100%;
    justify-content: center;
  }

  .view-mode-switcher button {
    flex: 1 1 0;
  }

  .app {
    max-width: 100vw;
    margin: 10px auto 18px;
    padding: 10px;
  }

  .card {
    width: 100%;
    max-width: calc(100vw - 24px);
    border-radius: 12px;
    padding: 18px;
  }

  #home.card {
    max-width: none;
    padding: 0;
    border-radius: 16px;
  }

  .mission-hero {
    padding: 19px 14px 16px;
  }

  .mission-hero h2 {
    font-size: 23px;
  }

  .mission-site-intel {
    grid-template-columns: 1fr;
  }

  .mission-metrics,
  .mission-workspace-grid,
  .mission-lower-grid,
  .mobile-command-menu {
    margin: 10px;
  }

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

  .mobile-command-menu button {
    min-height: 52px;
  }

  .mission-metrics {
    gap: 8px;
  }

  .mission-metric-card {
    min-height: 104px;
    padding: 13px 11px;
  }

  .mission-metric-label {
    font-size: 11px;
  }

  .mission-metric-card strong {
    font-size: 28px;
  }

  .mission-panel {
    padding: 13px;
  }

  .mission-panel-head {
    grid-template-columns: 1fr;
  }

  .mission-panel-head .link-button {
    width: 100%;
    min-height: 36px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #f8fafc;
  }

  .mission-quick-actions {
    grid-template-columns: 1fr;
  }

  .mission-quick-actions button {
    min-height: 70px;
    grid-template-columns: 38px minmax(0, 1fr);
    justify-items: start;
    align-content: center;
    align-items: center;
  }

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

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

  .account-access-model,
  .account-access-detail-list article {
    grid-template-columns: 1fr;
  }

  .user-management-row,
  .user-management-row-head {
    grid-template-columns: 1fr;
  }

  .user-management-row-head {
    display: none;
  }

  .account-access-detail-list article strong {
    grid-row: auto;
  }

  .archive-selection-bar span {
    grid-column: 1 / -1;
  }

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

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

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

  .project-setup-head {
    display: grid;
  }

  .project-setup-head .compact-button {
    width: 100%;
  }

  .project-setup-list,
  .project-setup-form,
  .project-setup-panel .field-link-actions {
    grid-template-columns: 1fr;
  }

  .project-setup-form {
    padding: 12px;
  }

  .project-setup-form input {
    min-height: 52px;
    font-size: 16px;
  }

  .archive-selection-bar button {
    width: 100%;
  }

  .system-status-grid {
    grid-template-columns: 1fr;
  }

  .system-status-header {
    align-items: flex-start;
    flex-direction: column;
  }

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

  .shift-handoff-actions {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .handoff-step-list button {
    min-height: 48px;
  }

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

  .shift-handoff-actions .handoff-cancel-action {
    margin-top: 4px;
  }

  .shift-handoff-card-actions {
    grid-template-columns: 1fr;
  }

  .shift-handoff-history-head {
    grid-template-columns: 1fr;
  }

  .shift-handoff-filters {
    grid-template-columns: 1fr;
  }

  .previous-handoff-reference-head {
    grid-template-columns: 1fr;
  }

  .shift-handoff-hero-actions {
    grid-template-columns: 1fr;
  }

  .shift-handoff-card-head {
    flex-direction: column;
  }

  .shift-handoff-scope-toggle {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .shift-handoff-scope-meta {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .shift-handoff-scope-meta .shift-handoff-flags {
    justify-content: flex-start;
  }

  .shift-handoff-card-side {
    align-items: flex-start;
  }

  .shift-handoff-flags {
    justify-content: flex-start;
  }

  .field-link-actions {
    grid-template-columns: 1fr;
  }

  .activity-toolbar {
    flex-direction: column;
  }

  .activity-actions {
    width: 100%;
  }

  .activity-actions button {
    width: 100%;
  }

  .template-builder-actions,
  .template-editor-head,
  .template-list-row {
    display: grid;
    grid-template-columns: 1fr;
  }

  .builder-workflow-step {
    grid-template-columns: 1fr;
  }

  .template-editor-head button,
  .template-list-row button {
    width: 100%;
  }

  .report-summary-grid,
  .report-actions {
    grid-template-columns: 1fr;
  }

  .report-workflow-accordion-summary,
  .report-workflow-item-summary {
    grid-template-columns: 1fr;
  }

  .update-history-heading {
    flex-direction: column;
  }

  .release-badge {
    width: 100%;
    text-align: center;
  }

  .release-topline {
    flex-direction: column;
  }

  .release-tags span {
    flex: 1 1 auto;
    text-align: center;
  }
}

@media (max-width: 360px) {
  .mobile-command-menu {
    grid-template-columns: 1fr;
  }
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) {
  padding-left: 214px;
  background:
    linear-gradient(180deg, rgba(15, 23, 42, 0.03), transparent 220px),
    #eef3f8;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) > header {
  display: none;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 300;
  width: 214px;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px 12px 14px;
  background:
    linear-gradient(180deg, rgba(30, 64, 175, 0.24), transparent 42%),
    #07172c;
  color: #ffffff;
  box-shadow: 16px 0 36px rgba(15, 23, 42, 0.18);
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-mission-control {
  display: block;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .mobile-home-actions {
  display: none;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .app {
  max-width: 1180px;
  margin: 24px auto 34px;
  padding: 0 24px;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .card {
  padding: 24px;
  border-radius: 10px;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  padding: 0 6px 16px;
  border-bottom: 1px solid rgba(226, 232, 240, 0.14);
  text-transform: uppercase;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand-mark {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.08);
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .sidebar-emblem {
  width: 31px;
  height: 31px;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand strong {
  font-size: 15px;
  line-height: 1.05;
  letter-spacing: 0;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav {
  display: grid;
  gap: 8px;
  align-content: start;
  padding-top: 16px;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav-group {
  display: grid;
  gap: 5px;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav-label {
  margin: 0;
  padding: 0 6px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav button,
html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar-foot > button {
  width: 100%;
  min-height: 38px;
  margin: 0;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: #dbeafe;
  box-shadow: none;
  text-align: left;
  font-size: 14px;
  font-weight: 800;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav button:hover,
html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav button.active,
html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar-foot > button:hover {
  border-color: rgba(147, 197, 253, 0.22);
  background: rgba(96, 165, 250, 0.16);
  color: #ffffff;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar-foot {
  display: grid;
  gap: 6px;
  padding-top: 12px;
  border-top: 1px solid rgba(226, 232, 240, 0.14);
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-user-chip {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 6px;
  padding: 6px 6px 0;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-user-chip > span {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  font-weight: 900;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-user-chip strong,
html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-user-chip small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-user-chip small {
  color: #bfdbfe;
}

/* Compact enterprise navigation: icon rail with contextual hover/focus detail. */
@media (min-width: 900px) {
  body:not(.field-portal-mode),
  html[data-view-mode="desktop"] body:not(.field-portal-mode) {
    padding-left: 78px;
  }

  body:not(.field-portal-mode) .desktop-sidebar,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar {
    width: 78px;
    padding: 16px 10px 14px;
    overflow: visible;
    background:
      radial-gradient(circle at 38px 20px, rgba(57, 167, 255, 0.17), transparent 110px),
      linear-gradient(180deg, #091a31 0%, #071426 100%);
    border-right: 1px solid rgba(148, 163, 184, 0.16);
    box-shadow: 10px 0 30px rgba(15, 23, 42, 0.14);
    transition: width 220ms cubic-bezier(.2,.8,.2,1), box-shadow 220ms ease;
  }

  body:not(.field-portal-mode) .desktop-sidebar:hover,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar:hover,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar:focus-within {
    width: 238px;
    box-shadow: 20px 0 44px rgba(15, 23, 42, 0.24);
  }

  body:not(.field-portal-mode) .desktop-brand,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    min-width: 0;
    padding: 0 7px 15px;
  }

  body:not(.field-portal-mode) .desktop-brand-mark,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand-mark {
    width: 42px;
    height: 42px;
    margin-left: -1px;
    background: linear-gradient(145deg, rgba(96, 165, 250, .16), rgba(88, 199, 166, .1));
    border: 1px solid rgba(147, 197, 253, .16);
  }

  body:not(.field-portal-mode) .desktop-brand strong,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-brand strong,
  body:not(.field-portal-mode) .desktop-nav-text,
  body:not(.field-portal-mode) .desktop-user-chip > div,
  body:not(.field-portal-mode) .sidebar-view-switcher {
    opacity: 0;
    transform: translateX(-6px);
    pointer-events: none;
    white-space: nowrap;
    transition: opacity 150ms ease, transform 190ms ease;
  }

  body:not(.field-portal-mode) .desktop-sidebar:hover .desktop-brand strong,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .desktop-brand strong,
  body:not(.field-portal-mode) .desktop-sidebar:hover .desktop-nav-text,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .desktop-nav-text,
  body:not(.field-portal-mode) .desktop-sidebar:hover .desktop-user-chip > div,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .desktop-user-chip > div,
  body:not(.field-portal-mode) .desktop-sidebar:hover .sidebar-view-switcher,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .sidebar-view-switcher {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
    transition-delay: 65ms;
  }

  body:not(.field-portal-mode) .desktop-nav {
    gap: 9px;
    overflow-y: auto;
    overflow-x: visible;
    scrollbar-width: none;
  }

  body:not(.field-portal-mode) .desktop-nav::-webkit-scrollbar { display: none; }

  body:not(.field-portal-mode) .desktop-nav-group { gap: 4px; }

  body:not(.field-portal-mode) .desktop-nav-label {
    width: 34px;
    height: 1px;
    margin: 5px 0 5px 12px;
    padding: 0;
    overflow: hidden;
    color: transparent;
    background: rgba(148, 163, 184, .2);
    transition: width 200ms ease, height 200ms ease, margin 200ms ease, color 150ms ease, background 150ms ease;
  }

  body:not(.field-portal-mode) .desktop-sidebar:hover .desktop-nav-label,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .desktop-nav-label {
    width: auto;
    height: 14px;
    margin: 4px 8px 2px;
    color: #7ea9d8;
    background: transparent;
  }

  body:not(.field-portal-mode) .desktop-nav button,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-nav button {
    position: relative;
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    min-height: 44px;
    padding: 7px 9px;
    border-radius: 11px;
    color: #9fb0c4;
    font-weight: 700;
    transition: color 150ms ease, background 150ms ease, border-color 150ms ease, transform 150ms ease;
  }

  body:not(.field-portal-mode) .desktop-nav button:hover,
  body:not(.field-portal-mode) .desktop-nav button:focus-visible {
    transform: translateX(2px);
    background: rgba(255, 255, 255, .075);
    border-color: rgba(148, 197, 253, .16);
    color: #ffffff;
    outline: none;
  }

  body:not(.field-portal-mode) .desktop-nav button.active {
    background: linear-gradient(90deg, rgba(37, 99, 235, .32), rgba(59, 130, 246, .15));
    border-color: rgba(96, 165, 250, .28);
    color: #ffffff;
    box-shadow: inset 3px 0 0 #58c7a6, 0 8px 20px rgba(2, 8, 23, .14);
  }

  .desktop-nav-icon {
    width: 23px;
    height: 23px;
    justify-self: center;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: transform 170ms cubic-bezier(.2,.8,.2,1), stroke 150ms ease;
  }

  .desktop-nav button:hover .desktop-nav-icon,
  .desktop-nav button:focus-visible .desktop-nav-icon {
    transform: scale(1.08);
    stroke: #8fc5ff;
  }

  body:not(.field-portal-mode) .desktop-nav button::after {
    content: attr(data-nav-detail);
    position: absolute;
    z-index: 5;
    top: 50%;
    left: calc(100% + 10px);
    width: 220px;
    padding: 10px 12px;
    border: 1px solid rgba(148, 163, 184, .28);
    border-radius: 9px;
    background: rgba(7, 20, 38, .97);
    color: #dce8f7;
    box-shadow: 0 14px 34px rgba(2, 8, 23, .3);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.45;
    opacity: 0;
    transform: translate(5px, -50%);
    visibility: hidden;
    pointer-events: none;
    transition: opacity 140ms ease 180ms, transform 160ms ease 180ms, visibility 0s linear 340ms;
  }

  body:not(.field-portal-mode) .desktop-sidebar:hover .desktop-nav button:hover::after,
  body:not(.field-portal-mode) .desktop-sidebar:focus-within .desktop-nav button:focus-visible::after {
    opacity: 1;
    transform: translate(0, -50%);
    visibility: visible;
    transition-delay: 260ms;
  }

  body:not(.field-portal-mode) .desktop-sidebar-foot {
    min-width: 0;
  }

  body:not(.field-portal-mode) .desktop-sidebar-foot > button {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 10px;
    min-height: 42px;
    padding: 7px 9px;
    border-radius: 10px;
    overflow: hidden;
    white-space: nowrap;
  }

  body:not(.field-portal-mode) .desktop-user-chip {
    grid-template-columns: 38px minmax(0, 1fr);
    min-width: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .desktop-sidebar,
  .desktop-sidebar *,
  .desktop-nav button::after {
    transition-duration: 0.01ms !important;
    transition-delay: 0ms !important;
  }
}

.desktop-sidebar-foot .view-mode-switcher button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 32px;
  padding: 6px 9px;
  text-align: center;
  font-size: 11px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) {
  padding-left: 0;
  background: #f3f6f9;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) > header {
  position: sticky;
  top: 0;
  z-index: 250;
  display: block;
  padding: 14px 12px 12px;
  text-align: left;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .desktop-sidebar {
  display: none;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .desktop-mission-control {
  display: grid;
  gap: 14px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .mobile-home-actions {
  display: none;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .mobile-command-menu {
  display: grid;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .app {
  max-width: 560px;
  margin: 10px auto 18px;
  padding: 10px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .card {
  padding: 18px;
  border-radius: 16px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) #home.card {
  padding: 0;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-summary-card {
  min-height: 104px;
  padding: 13px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-summary-card b {
  width: 40px;
  height: 40px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-layout,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-building-dashboard,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-building-bottom-insights,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-assignment-card,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-assignment-filters,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-assignment-summary,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-form-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-section,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-filter-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-daily-snapshot-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-daily-report-form,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-daily-summary,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-milestone-head,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-work-step-builder,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-scope-meta,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-page-building .roadmap-scope-row {
  grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-scope-table-head {
  display: none;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-page-building .roadmap-scope-row {
  gap: 11px;
  padding: 14px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-row-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-plan,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-location,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-ownership,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-status,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-notes,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-work-step-panel,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-builder-plan .roadmap-wide {
  grid-column: 1 / -1;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-hero,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-hero-control-row,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-section-head,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-scope-topline {
  align-items: stretch;
  flex-direction: column;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-hero button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-assignment-card button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-actions button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-daily-actions button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-work-step-builder button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-section-head button {
  width: 100%;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .roadmap-actions .danger {
  margin-left: 0;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-screen.screen.active {
  gap: 12px;
  overflow: hidden;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-hero {
  align-items: stretch;
  flex-direction: column;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-hero .compact-button {
  width: 100%;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-summary-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-layout,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-form-grid {
  grid-template-columns: 1fr;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-summary-grid,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-type-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-compose,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-recent {
  min-width: 0;
  width: 100%;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-section-head,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-recent-head,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-item-head {
  flex-direction: column;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-secure-note {
  width: fit-content;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-type-card span {
  min-height: 82px;
}

html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-actions button,
html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-recent-head button {
  width: 100%;
}

@media (max-width: 420px) {
  html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-summary-grid,
  html[data-view-mode="mobile"] body:not(.field-portal-mode) .feedback-type-grid {
    grid-template-columns: 1fr;
  }
}

/* Use additional horizontal space on large desktop monitors without changing laptop density. */
@media (min-width: 1600px) {
  body:not(.field-portal-mode) .app,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .app {
    width: calc(100% - 64px);
    max-width: 1680px;
  }

  body:not(.field-portal-mode) .app-footer {
    max-width: 1680px;
  }

  .command-view-layout {
    grid-template-columns: minmax(0, 1fr) minmax(320px, 380px);
  }
}

/* Let Command View claim the available desktop canvas without hiding navigation. */
@media (min-width: 900px) {
  body.command-view-wide-mode:not(.field-portal-mode) .app,
  html[data-view-mode="desktop"] body.command-view-wide-mode:not(.field-portal-mode) .app {
    width: 100%;
    max-width: none;
    margin: 16px auto 28px;
    padding-right: 16px;
    padding-left: 16px;
  }

  body.command-view-wide-mode .command-view-screen.card {
    padding-right: 20px;
    padding-left: 20px;
  }

  body.command-view-wide-mode .command-view-layout,
  body.command-view-wide-mode .command-view-chart {
    min-height: clamp(560px, 68vh, 880px);
  }
}

@media (max-width: 899px) {
  .command-view-wide-button {
    display: none;
  }
}

html[data-view-mode="mobile"] .command-view-wide-button {
  display: none;
}

.account-access-center,
.member-access-request-queue {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  background: #f8fbff;
}

.member-access-request-queue[hidden] {
  display: none;
}

.account-profile-intro {
  margin: -4px 0 2px;
}

.account-profile-head-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.account-form-grid :is(input, select):disabled {
  color: #314158;
  border-color: #dbe3ef;
  background: #f3f6fa;
  opacity: 1;
  cursor: default;
}

.account-profile-save-row {
  justify-content: flex-end;
  padding-top: 4px;
}

.account-profile-save-row[hidden] {
  display: none !important;
}

.account-profile-save-row button {
  width: min(100%, 180px);
}

.account-settings-disclosure {
  overflow: hidden;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
}

.account-settings-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}

.account-settings-disclosure summary::-webkit-details-marker {
  display: none;
}

.account-settings-disclosure summary > span {
  display: grid;
  gap: 3px;
}

.account-settings-disclosure summary strong {
  color: #0f172a;
}

.account-settings-disclosure summary small {
  color: #64748b;
  font-weight: 750;
}

.account-settings-disclosure summary::after {
  content: "+";
  display: grid;
  place-items: center;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: #eef4ff;
  color: #1d4ed8;
  font-weight: 900;
}

.account-settings-disclosure[open] summary::after {
  content: "−";
}

.account-settings-disclosure[open] summary {
  border-bottom: 1px solid #e2e8f0;
}

.account-settings-disclosure .account-auth-panel,
.account-settings-disclosure .account-project-access {
  margin: 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

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

.account-access-current,
.account-access-capabilities {
  display: grid;
  gap: 5px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
}

.account-access-current span,
.account-access-current small {
  color: #64748b;
  font-size: 0.8rem;
  font-weight: 800;
}

.account-access-current strong {
  color: #0f172a;
  font-size: 1.05rem;
}

.account-access-capabilities {
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.account-access-capabilities span::before {
  content: "✓";
  margin-right: 7px;
  color: #16a34a;
  font-weight: 900;
}

.account-access-request-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 16px;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #ffffff;
}

.account-access-request-form[hidden] {
  display: none;
}

.account-access-request-form label {
  display: block;
  margin-bottom: 6px;
  font-weight: 850;
}

.account-access-request-form input,
.account-access-request-form select,
.account-access-request-form textarea {
  width: 100%;
  margin: 0;
}

.account-access-request-wide {
  grid-column: 1 / -1;
}

.account-access-history-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid #dbe3ef;
}

.account-access-request-history,
.member-access-request-list {
  display: grid;
  gap: 10px;
}

.account-access-request-history > article,
.member-access-request-list > article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding: 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
}

.account-access-request-history article > div,
.member-access-request-main,
.member-access-request-meta {
  display: grid;
  gap: 4px;
}

.account-access-request-history article > small,
.account-access-request-history article > p {
  grid-column: 1 / -1;
  margin: 0;
  color: #64748b;
}

.access-request-status {
  align-self: start;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fef3c7;
  color: #92400e;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.access-request-status.is-approved {
  background: #dcfce7;
  color: #166534;
}

.access-request-status.is-denied {
  background: #fee2e2;
  color: #991b1b;
}

.member-access-request-main span {
  color: #2563eb;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.member-access-request-main p {
  margin: 4px 0 0;
}

.member-access-request-meta {
  text-align: right;
  color: #64748b;
}

.member-access-request-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

html[data-theme="dark"] .account-access-center,
html[data-theme="dark"] .member-access-request-queue,
html[data-theme="dark"] .account-access-current,
html[data-theme="dark"] .account-access-capabilities,
html[data-theme="dark"] .account-access-request-form,
html[data-theme="dark"] .account-access-request-history > article,
html[data-theme="dark"] .member-access-request-list > article {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
  color: #e5e7eb;
}

html[data-theme="dark"] .account-settings-disclosure {
  border-color: rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.78);
}

html[data-theme="dark"] .account-settings-disclosure summary strong {
  color: #f8fafc;
}

@media (max-width: 720px) {
  .account-access-overview,
  .account-access-request-form,
  .account-access-capabilities,
  .account-access-request-history > article,
  .member-access-request-list > article {
    grid-template-columns: 1fr;
  }

  .account-access-request-wide,
  .account-access-capabilities,
  .member-access-request-actions {
    grid-column: auto;
  }

  .member-access-request-meta {
    text-align: left;
  }

  .member-access-request-actions {
    display: grid;
  }
}
.role-preview-banner {
  position: sticky;
  top: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 44px);
  color: #172033;
  background: #fff4cc;
  border-bottom: 1px solid #e9c85e;
  box-shadow: 0 5px 18px rgba(92, 70, 12, 0.12);
}

.role-preview-banner[hidden] { display: none; }
[data-beta-feature][hidden] { display: none !important; }
.role-preview-banner div { display: grid; gap: 2px; }
.role-preview-banner span { font-size: 0.82rem; }
.role-preview-panel { overflow: hidden; border: 1px solid rgba(36, 71, 242, 0.2); background: linear-gradient(135deg, rgba(36, 71, 242, 0.06), rgba(88, 199, 166, 0.08)); }
.role-preview-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; margin-bottom: 20px; padding-bottom: 18px; border-bottom: 1px solid rgba(100, 116, 139, 0.16); }
.role-preview-panel-head > div { min-width: 0; }
.role-preview-panel-head h3 { margin: 3px 0 5px; }
.role-preview-panel-head p { max-width: 620px; margin-bottom: 0; }
.role-preview-safety { flex: 0 0 auto; padding: 6px 10px; border-radius: 999px; background: #fff4cc; color: #705500; font-size: 0.76rem; font-weight: 800; }
.role-preview-profiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 270px), 1fr)); gap: 12px; }
.role-preview-profile { position: relative; display: grid; grid-template-columns: 42px minmax(0, 1fr); align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 78px; padding: 12px 64px 12px 12px; text-align: left; color: inherit; background: var(--card, #fff); border: 1px solid rgba(90, 105, 135, 0.2); border-radius: 14px; }
.role-preview-profile:hover, .role-preview-profile.is-active { border-color: #2447f2; box-shadow: 0 8px 22px rgba(36, 71, 242, 0.12); }
.role-preview-profile span:nth-child(2) { display: grid; min-width: 0; gap: 2px; }
.role-preview-profile strong { overflow-wrap: anywhere; line-height: 1.15; }
.role-preview-profile small { overflow-wrap: anywhere; color: var(--muted, #687186); font-size: 0.74rem; line-height: 1.25; }
.role-preview-profile em { position: absolute; top: 50%; right: 14px; max-width: 44px; transform: translateY(-50%); color: #2447f2; font-size: 0.7rem; line-height: 1.1; text-align: right; font-style: normal; font-weight: 800; }
.role-preview-avatar { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; color: #fff; background: linear-gradient(135deg, #2447f2, #39a7ff); font-weight: 800; }
.role-preview-disclaimer { margin: 16px 0 0; padding-top: 14px; border-top: 1px solid rgba(100, 116, 139, 0.12); color: var(--muted, #687186); font-size: 0.78rem; line-height: 1.45; }

.work-pipeline-screen { width: min(100%, 1240px); margin-inline: auto; gap: 18px; overflow: hidden; }
.work-pipeline-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 28px; padding: clamp(22px, 3vw, 34px); border-radius: 18px; color: #fff; background: linear-gradient(135deg, #102a56, #2447f2); }
.work-pipeline-hero > div { min-width: 0; }
.work-pipeline-hero h2 { margin: 5px 0 7px; color: #fff; font-size: clamp(1.75rem, 3vw, 2.4rem); line-height: 1.05; }
.work-pipeline-hero p { max-width: 680px; margin: 0; color: rgba(255,255,255,.84); font-size: .96rem; line-height: 1.5; }
.work-pipeline-hero .operations-kicker { color: #9eead3; }
.work-pipeline-hero .work-pipeline-new-button { width: auto; min-width: 154px; margin: 0; padding: 13px 18px; color: #17315d; background: #fff; white-space: nowrap; box-shadow: 0 8px 24px rgba(8, 25, 59, .2); }
.work-pipeline-principle { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid #bfdbfe; border-radius: 14px; background: #eff6ff; }
.work-pipeline-principle span { color: #52627a; font-size: .86rem; }
.work-pipeline-form { display: grid; gap: 16px; }
.work-pipeline-section { display: grid; gap: 18px; padding: clamp(18px, 2.5vw, 26px); border: 1px solid #dbe4f0; border-radius: 16px; background: var(--card, #fff); box-shadow: 0 8px 24px rgba(15, 23, 42, .035); }
.work-pipeline-section > div:first-child { display: flex; align-items: center; gap: 10px; }
.work-pipeline-section > div:first-child > span { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: #2447f2; background: #eaf1ff; font-size: .76rem; font-weight: 900; }
.work-pipeline-section h3 { margin: 0; }
.work-pipeline-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.work-pipeline-grid label, .work-pipeline-section > label { display: grid; align-content: start; gap: 7px; margin: 0; }
.work-pipeline-grid .wide { grid-column: 1 / -1; }
.work-pipeline-grid small { color: var(--muted, #64748b); font-weight: 500; }
.work-pipeline-photo-field { display: grid; gap: 8px; }
.work-pipeline-paste-zone { display: grid; place-items: center; gap: 6px; min-height: 130px; padding: 20px; border: 2px dashed #8fb2f7; border-radius: 14px; text-align: center; background: #f5f9ff; cursor: pointer; }
.work-pipeline-paste-zone:focus { outline: 3px solid rgba(36, 71, 242, .22); border-color: #2447f2; }
.work-pipeline-paste-zone span { max-width: 620px; color: #64748b; font-size: .84rem; line-height: 1.45; }
.work-pipeline-photo-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.work-pipeline-photo-actions button { width: auto; min-height: 48px; margin: 0; padding: 12px 18px; }
.work-pipeline-file-button { position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 16px; border-radius: 10px; color: #fff; background: #475569; font-weight: 800; cursor: pointer; }
.work-pipeline-file-button input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.work-pipeline-photo-preview { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 220px)); gap: 12px; }
.work-pipeline-photo-preview figure { position: relative; overflow: hidden; margin: 0; border: 1px solid #dbe4f0; border-radius: 12px; background: #0f172a; }
.work-pipeline-photo-preview figure.is-low-resolution { border-color: #f59e0b; box-shadow: 0 0 0 2px rgba(245,158,11,.14); }
.work-pipeline-photo-preview img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: contain; image-rendering: auto; background: #111827; }
.work-pipeline-photo-preview figcaption { min-height: 34px; padding: 9px 82px 9px 10px; color: #dbeafe; background: #172033; font-size: .7rem; font-weight: 700; }
.work-pipeline-photo-preview button { position: absolute; right: 6px; bottom: 5px; width: auto; min-height: 28px; margin: 0; padding: 6px 9px; font-size: .72rem; }
.work-pipeline-actions { position: sticky; bottom: 12px; z-index: 8; display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 12px; border: 1px solid #dbe4f0; border-radius: 14px; background: color-mix(in srgb, var(--card, #fff) 96%, transparent); box-shadow: 0 12px 32px rgba(15,23,42,.12); backdrop-filter: blur(12px); }
.work-pipeline-actions button { width: auto; min-height: 48px; margin: 0; padding: 12px 18px; }
.work-pipeline-actions .small-text { flex: 1 1 260px; }

.field-assignment-notice {
  position: fixed;
  z-index: 10020;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(430px, calc(100vw - 36px));
  padding: 14px 14px 14px 16px;
  border: 1px solid #bfdbfe;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, .22);
  animation: field-assignment-notice-in .22s ease-out both;
}

.field-assignment-notice.is-success { border-color: #86efac; }
.field-assignment-notice.is-queued { border-color: #fcd34d; }
.field-assignment-notice.is-leaving { animation: field-assignment-notice-out .22s ease-in both; }

.field-assignment-notice-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  font-size: 20px;
  font-weight: 900;
}

.field-assignment-notice.is-success .field-assignment-notice-icon {
  background: #dcfce7;
  color: #15803d;
}

.field-assignment-notice.is-queued .field-assignment-notice-icon {
  background: #fef3c7;
  color: #a16207;
}

.field-assignment-notice-copy strong,
.field-assignment-notice-copy small {
  display: block;
}

.field-assignment-notice-copy strong { color: #0f172a; }
.field-assignment-notice-copy small { margin-top: 3px; color: #64748b; line-height: 1.35; }

.field-assignment-notice button {
  align-self: start;
  width: 36px;
  min-height: 36px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #64748b;
  font-size: 24px;
}

@keyframes field-assignment-notice-in {
  from { opacity: 0; transform: translateY(-10px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes field-assignment-notice-out {
  to { opacity: 0; transform: translateY(-8px) scale(.98); }
}

html[data-theme="dark"] .field-assignment-notice {
  border-color: #334155;
  background: #0f172a;
}

html[data-theme="dark"] .field-assignment-notice-copy strong { color: #f8fafc; }

@media (max-width: 640px) {
  .field-assignment-notice {
    top: auto;
    right: max(12px, env(safe-area-inset-right));
    bottom: max(12px, env(safe-area-inset-bottom));
    left: max(12px, env(safe-area-inset-left));
    width: auto;
  }
}
.work-pipeline-record-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 14px; border: 1px solid #bfdbfe; border-radius: 14px; background: #eff6ff; }
.work-pipeline-record-meta[hidden] { display: none; }
.work-pipeline-record-meta span { display: grid; gap: 3px; min-width: 0; }
.work-pipeline-record-meta small { color: #64748b; font-size: .7rem; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.work-pipeline-record-meta strong { overflow-wrap: anywhere; }
html[data-theme="dark"] .work-pipeline-principle, html[data-theme="dark"] .work-pipeline-paste-zone { border-color: #35527d; background: #16243a; }
html[data-theme="dark"] .work-pipeline-record-meta { border-color: #35527d; background: #16243a; }
html[data-theme="dark"] .work-pipeline-principle span, html[data-theme="dark"] .work-pipeline-paste-zone span { color: #afbdd1; }
html[data-theme="dark"] .work-pipeline-actions { border-color: #334155; }
@media (max-width: 700px) {
  .work-pipeline-hero { grid-template-columns: 1fr; gap: 18px; }
  .work-pipeline-hero .work-pipeline-new-button { width: 100%; }
  .work-pipeline-grid { grid-template-columns: 1fr; }
  .work-pipeline-grid .wide { grid-column: auto; }
  .work-pipeline-actions { display: grid; }
  .work-pipeline-actions button, .work-pipeline-photo-actions button, .work-pipeline-file-button { width: 100%; }
  .work-pipeline-record-meta { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
  .role-preview-banner { align-items: flex-start; }
  .role-preview-banner span { display: none; }
  .role-preview-panel-head { display: grid; }
}

@media (max-width: 480px) {
  .role-preview-profile { padding-right: 54px; }
  .role-preview-profile em { right: 10px; }
}

.foreman-coverage-banner {
  position: sticky;
  top: 0;
  z-index: 119;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px clamp(16px, 4vw, 44px);
  color: #123b2d;
  background: #dcfce7;
  border-bottom: 1px solid #86efac;
}

.foreman-coverage-banner[hidden] { display: none; }
.foreman-coverage-banner > div { display: grid; gap: 2px; }
.foreman-coverage-banner span { font-size: 0.8rem; }
.foreman-coverage-panel { grid-column: 1 / -1; display: grid; gap: 14px; margin-top: 16px; padding: 16px; border: 1px solid #bbf7d0; border-radius: 14px; background: #f0fdf4; }
.foreman-coverage-panel[hidden], .foreman-coverage-form[hidden], .foreman-coverage-active[hidden] { display: none; }
.foreman-coverage-panel h4 { margin: 3px 0 4px; }
.foreman-coverage-form { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(210px, 1fr) auto; align-items: end; gap: 10px; }
.foreman-coverage-form label { display: grid; gap: 5px; }
.foreman-coverage-active { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px; border-radius: 10px; background: #dcfce7; }
.foreman-coverage-active span { color: #376052; font-size: 0.82rem; }

@media (max-width: 720px) {
  .foreman-coverage-form { grid-template-columns: 1fr; }
  .foreman-coverage-active { align-items: stretch; flex-direction: column; }
}

/* Touch and tablet interaction layer */
@media (min-width: 900px) {
  #managerMode.screen.active > * {
    grid-column: 1 / -1;
    min-width: 0;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 76px;
}

button,
[role="button"],
summary,
a {
  -webkit-tap-highlight-color: transparent;
}

button,
[role="button"],
summary {
  touch-action: manipulation;
}

button:focus-visible,
[role="button"]:focus-visible,
summary:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.34);
  outline-offset: 2px;
}

@media (pointer: coarse) {
  body {
    min-height: 100dvh;
    overscroll-behavior-y: none;
  }

  button,
  [role="button"],
  summary,
  .compact-button,
  .toolbar-back,
  .desktop-nav button,
  .mobile-command-menu button {
    min-height: 48px;
  }

  input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
  select,
  textarea {
    min-height: 48px;
    font-size: 16px;
  }

  input[type="checkbox"],
  input[type="radio"] {
    min-width: 22px;
    min-height: 22px;
  }

  button:hover,
  [role="button"]:hover,
  .role-preview-profile:hover {
    transform: none !important;
  }

  button:active,
  [role="button"]:active,
  summary:active {
    transform: scale(0.985) !important;
    filter: brightness(0.97);
  }

  summary,
  label,
  button {
    user-select: none;
    -webkit-user-select: none;
  }

  textarea,
  input {
    user-select: text;
    -webkit-user-select: text;
  }

  .desktop-sidebar,
  .mobile-command-menu,
  .builder-subtabs,
  .field-portal-link-list,
  .action-center-list,
  .notification-list,
  .activity-list {
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
  }

  .mobile-command-menu button {
    min-height: 56px;
  }

  .field-link-actions,
  .account-action-row,
  .template-builder-actions,
  .command-member-form-actions,
  .member-access-request-actions {
    gap: 12px;
  }

  .field-link-actions button,
  .account-action-row button,
  .template-builder-actions button,
  .command-member-form-actions button,
  .member-access-request-actions button {
    min-height: 50px;
  }
}

@media (pointer: coarse) and (min-width: 721px) and (max-width: 1180px) {
  body:not(.field-portal-mode) .app,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .app {
    width: 100%;
    max-width: none;
    margin: 16px auto 24px;
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
  }

  #managerMode.screen.active {
    width: 100%;
    min-width: 0;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
  }

  #managerMode.screen.active > * {
    grid-column: 1 / -1;
    min-width: 0;
  }

  #managerMode .role-preview-panel {
    width: 100%;
    min-width: 0;
    padding: 18px;
  }

  #managerMode .role-preview-panel-head {
    align-items: center;
  }

  #managerMode .role-preview-profiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #managerMode .role-preview-profile {
    min-width: 0;
    padding-right: 72px;
  }

  #managerMode .role-preview-profile strong,
  #managerMode .role-preview-profile small {
    overflow-wrap: normal;
    word-break: normal;
  }

  #managerMode .manager-action-groups {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-link-actions,
  .template-builder-actions,
  .account-action-row,
  .command-member-form-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .field-link-actions button,
  .template-builder-actions button,
  .account-action-row button,
  .command-member-form-actions button {
    width: 100%;
  }

  .builder-subtabs {
    position: sticky;
    top: 0;
    z-index: 25;
    overflow-x: auto;
    padding: 8px 0;
    background: var(--card, #ffffff);
  }

  .builder-subtabs button {
    flex: 1 0 180px;
  }
}

@media (pointer: coarse) and (min-width: 900px) and (max-width: 1180px) {
  body:not(.field-portal-mode),
  html[data-view-mode="desktop"] body:not(.field-portal-mode) {
    padding-left: 188px;
  }

  body:not(.field-portal-mode) .desktop-sidebar,
  html[data-view-mode="desktop"] body:not(.field-portal-mode) .desktop-sidebar {
    width: 188px;
  }
}

@media (pointer: coarse) and (max-width: 720px) {
  .app,
  .desktop-sidebar-foot,
  .role-preview-banner,
  .foreman-coverage-banner {
    padding-left: max(14px, env(safe-area-inset-left));
    padding-right: max(14px, env(safe-area-inset-right));
  }

  .app {
    padding-bottom: max(20px, env(safe-area-inset-bottom));
  }

  .field-link-actions,
  .template-builder-actions,
  .account-action-row,
  .command-member-form-actions,
  .member-access-request-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .field-link-actions button,
  .template-builder-actions button,
  .account-action-row button,
  .command-member-form-actions button,
  .member-access-request-actions button {
    width: 100%;
  }
}
