:root {
  color-scheme: light;
  --ink: #2c394b;
  --ink-strong: #172235;
  --muted: #68778b;
  --muted-2: #8a97a8;
  --canvas: #edf1f5;
  --surface: #ffffff;
  --surface-2: #f7f9fb;
  --surface-3: #e8edf3;
  --line: #d6dee8;
  --line-strong: #c1ccd9;
  --blue: #1677e8;
  --blue-soft: #e7f1ff;
  --green: #23845a;
  --green-soft: #e8f5ee;
  --amber: #a86c13;
  --amber-soft: #fff3dc;
  --red: #c74a46;
  --red-soft: #fdebea;
  --cyan: #168b98;
  --cyan-soft: #e5f4f5;
  --violet: #765cc4;
  --violet-soft: #f0ecfb;
  --focus: 0 0 0 3px rgba(22, 119, 232, 0.2);
}

/* Keep archive-list completion meters on the same visual scale as today's audit. */
.project-archive-row .project-rule-mini.named-rules > span {
  --rule-fill-start: rgba(86, 104, 119, 0.14);
  --rule-fill-end: rgba(86, 104, 119, 0.04);
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
}

.project-archive-row .project-rule-mini.named-rules > span::before {
  position: absolute;
  z-index: 0;
  top: 0;
  bottom: 0;
  left: 0;
  width: var(--rule-progress, 0%);
  background: linear-gradient(90deg, var(--rule-fill-start), var(--rule-fill-end));
  box-shadow: inset -1px 0 rgba(86, 104, 119, 0.12);
  content: "";
}

.project-archive-row .project-rule-mini.named-rules > span.partial {
  --rule-fill-start: rgba(191, 135, 50, 0.28);
  --rule-fill-end: rgba(232, 179, 83, 0.12);
}

.project-archive-row .project-rule-mini.named-rules > span.complete {
  --rule-fill-start: rgba(48, 133, 87, 0.28);
  --rule-fill-end: rgba(104, 179, 134, 0.14);
}

.project-archive-row .project-rule-mini.named-rules > span > b,
.project-archive-row .project-rule-mini.named-rules > span > small {
  position: relative;
  z-index: 1;
}

.audit-material-bell.constraint { color: #c43731 !important; }
.audit-material-item.constraint { border-color: #e6aaa5; background: #fff7f6; }
.audit-material-item em {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: 5px;
  color: #b3312c;
  font-size: 9px;
  font-style: normal;
  line-height: 14px;
}
.audit-material-item em svg { width: 12px; height: 12px; flex: 0 0 auto; }

.material-constraint-label { display: flex; align-items: center; gap: 3px; margin-top: 3px; color: #b3312c; font-size: 9px; }
.material-constraint-label svg { width: 12px; height: 12px; }
.material-due-cell { display: grid; gap: 3px; }
.material-due-cell small { color: #b3312c; font-size: 9px; line-height: 13px; }

html,
body,
.loading-screen,
.workspace,
#app,
.page,
.audit-page,
.audit-project-page,
.photo-work-area {
  background: var(--canvas);
  color: var(--ink);
}

.brand-mark,
.auth-brand .brand-mark,
.loading-screen .brand-mark {
  border-color: #b8d9cc;
  background: #ffffff;
  box-shadow: 0 5px 15px rgba(17, 112, 78, 0.18), inset 0 1px 0 #ffffff;
}

.brand-mark img,
.auth-brand .brand-mark img,
.loading-screen .brand-mark img {
  position: relative;
  z-index: 1;
  opacity: 1;
}

.brand-mark::before,
.auth-brand .brand-mark::before,
.loading-screen .brand-mark::before {
  display: none;
}

.topbar {
  border-bottom-color: #d5dde7;
  background: #ffffff;
  box-shadow: 0 4px 14px rgba(31, 50, 74, 0.08), inset 0 1px 0 #ffffff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.topbar::after {
  background: #d5dde7;
}

.topbar-context strong { color: #172235; }

.business-date,
.data-status,
.account-status {
  border-color: #cbd5df;
  background: #f7f9fb;
  box-shadow: none;
  color: #526174;
}

.data-status.ready,
.account-status.admin {
  border-color: #9fcfb5;
  background: #eaf7f0;
  color: #176a43;
}

.data-status.awaiting,
.data-status.warning,
.account-status.guest {
  border-color: #e7c27f;
  background: #fff5e2;
  color: #8a590b;
}

.data-status.processing {
  border-color: #a8c9ed;
  background: #edf5ff;
  color: #1768b5;
}

.data-status.blocked {
  border-color: #e6aaa7;
  background: #fff0ef;
  color: #ad3733;
}

.data-status-indicator {
  position: relative;
  display: block;
  width: 9px;
  height: 9px;
  flex: 0 0 9px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 14%, transparent);
}

.data-status.ready .data-status-indicator::after {
  position: absolute;
  inset: -5px;
  border: 1px solid currentColor;
  border-radius: 50%;
  animation: data-status-idle-breathe 2.2s ease-in-out infinite;
  content: "";
}

.data-status.processing .data-status-indicator {
  width: 13px;
  height: 13px;
  flex-basis: 13px;
  border: 2px solid color-mix(in srgb, currentColor 28%, transparent);
  border-top-color: currentColor;
  background: transparent;
  box-shadow: none;
  animation: loading-spin 800ms linear infinite;
}

@keyframes data-status-idle-breathe {
  0%, 100% { opacity: 0.18; transform: scale(0.72); }
  50% { opacity: 0.52; transform: scale(1.08); }
}

.audit-material-bell {
  position: relative;
  display: grid;
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  place-items: center;
  border: 1px solid #e1a23a;
  border-radius: 50%;
  background: #fff0cb;
  box-shadow: 0 3px 8px rgba(176, 102, 4, 0.18);
  color: #b86b00;
  transform-origin: 50% 18%;
  animation: material-reminder-bell 3.2s ease-in-out infinite;
}

.audit-material-bell::after {
  position: absolute;
  inset: -5px;
  border: 2px solid #d88a12;
  border-radius: 50%;
  animation: material-reminder-halo 3.2s ease-out infinite;
  content: "";
  pointer-events: none;
}

.audit-material-bell svg {
  width: 18px;
  height: 18px;
  color: currentColor;
  stroke-width: 2.55;
}
@keyframes material-reminder-bell {
  0%, 24%, 100% {
    box-shadow: 0 3px 8px rgba(176, 102, 4, 0.18);
    transform: rotate(0deg) scale(1);
  }
  4% {
    box-shadow: 0 0 0 4px rgba(216, 138, 18, 0.15), 0 4px 10px rgba(176, 102, 4, 0.24);
    transform: rotate(-12deg) scale(1.08);
  }
  8% { transform: rotate(11deg) scale(1.08); }
  12% { transform: rotate(-8deg) scale(1.05); }
  16% { transform: rotate(6deg) scale(1.03); }
  20% { transform: rotate(-3deg) scale(1.01); }
}

@keyframes material-reminder-halo {
  0% { opacity: 0.62; transform: scale(0.7); }
  22% { opacity: 0; transform: scale(1.24); }
  23%, 100% { opacity: 0; transform: scale(0.7); }
}

.audit-progress-head .audit-rule-action {
  min-height: 32px;
  min-width: 116px;
  width: 116px;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 11px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
  transition: border-color 140ms ease, background 140ms ease, box-shadow 140ms ease, transform 140ms ease;
}

.audit-material-summary .audit-material-action,
.audit-pending-head .audit-quick-review {
  min-height: 32px;
  min-width: 92px;
  width: 92px;
  flex: 0 0 auto;
  gap: 6px;
  padding: 0 8px;
  color: #ffffff;
  font-size: 10px;
  font-weight: 760;
  white-space: nowrap;
}

.audit-progress-head .audit-rule-action {
  border-color: #0e62b9;
  background: #1677d8;
  box-shadow: 0 0 0 2px rgba(22, 119, 216, 0.14), 0 5px 12px rgba(22, 92, 165, 0.22);
}

.audit-progress-head .audit-rule-action:hover {
  border-color: #79ace7;
  background: #f1f7ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 216, 0.14), 0 7px 16px rgba(22, 92, 165, 0.18);
  color: #0f62bd;
  transform: translateY(-1px);
}

.audit-progress-head .audit-rule-action:hover span,
.audit-progress-head .audit-rule-action:hover svg {
  color: #0f62bd;
}

.audit-material-summary .audit-material-action {
  border-color: #b86c05;
  background: #c97a0a;
  box-shadow: 0 0 0 2px rgba(201, 122, 10, 0.15), 0 5px 12px rgba(146, 86, 6, 0.23);
}

.audit-pending-head .audit-quick-review {
  border-color: #0e62b9;
  background: #1677d8;
  box-shadow: 0 0 0 2px rgba(22, 119, 216, 0.14), 0 5px 12px rgba(22, 92, 165, 0.22);
}

.audit-pending-head .audit-quick-review:hover {
  border-color: #79ace7;
  background: #f1f7ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 216, 0.14), 0 7px 16px rgba(22, 92, 165, 0.18);
  color: #0f62bd;
  transform: translateY(-1px);
}

.audit-pending-head .audit-quick-review:hover span,
.audit-pending-head .audit-quick-review:hover svg {
  color: #0f62bd;
}

.audit-material-summary .audit-material-action:hover {
  border-color: #79ace7;
  background: #f1f7ff;
  box-shadow: 0 0 0 3px rgba(22, 119, 216, 0.14), 0 7px 16px rgba(22, 92, 165, 0.18);
  color: #0f62bd;
  transform: translateY(-1px);
}

.audit-material-summary .audit-material-action:hover,
.audit-material-summary .audit-material-action:hover span,
.audit-material-summary .audit-material-action:hover svg {
  color: #0f62bd;
}

.audit-progress-head .audit-rule-action:focus-visible,
.audit-material-summary .audit-material-action:focus-visible {
  outline: 3px solid rgba(255, 255, 255, 0.92);
  outline-offset: -4px;
}

.audit-material-summary.complete .audit-material-bell,
.audit-material-bell.complete {
  border-color: #9bd1ad;
  background: #edf9f1;
  box-shadow: none;
  color: #23834e;
  animation: none;
}

.audit-material-summary.complete .audit-material-bell::after,
.audit-material-bell.complete::after {
  display: none;
  animation: none;
}

.audit-material-summary.complete .audit-material-bell svg,
.audit-material-bell.complete svg {
  color: currentColor;
}

.audit-progress-head .audit-rule-action svg,
.audit-material-summary .audit-material-action svg,
.audit-pending-head .audit-quick-review svg {
  width: 16px;
  height: 16px;
}

.audit-material-summary .audit-material-action svg {
  width: 16px;
  height: 16px;
  color: #ffffff;
  stroke-width: 2.35;
}

.audit-overall-progress.dormant i,
.audit-material-summary.dormant .progress-track span {
  background: linear-gradient(90deg, #e3e9ee 0%, #aab6c2 100%);
}

.audit-overall-progress.partial i,
.audit-material-summary.partial .progress-track span {
  background: linear-gradient(90deg, #b8dfc4 0%, #4f9a68 100%);
}

.audit-overall-progress.complete i,
.audit-material-summary.complete .progress-track span {
  background: #23834e;
}

.audit-overall-progress.dormant b,
.audit-material-summary.dormant .progress-inline b { color: #7f8c99; }
.audit-overall-progress.partial b,
.audit-material-summary.partial .progress-inline b { color: #4f8d63; }
.audit-overall-progress.complete b,
.audit-material-summary.complete .progress-inline b { color: #287d55; }

.rule-governance-warning {
  border: 1px solid #e4a5a2;
  border-left: 4px solid #d34b46;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(129, 45, 41, 0.1);
  color: #344156;
}

.rule-governance-warning > svg { color: #c43f3a; }
.rule-governance-warning strong { color: #9f302c; font-weight: 760; }
.rule-governance-warning span { color: #657386; }

* { scrollbar-color: #aeb9c7 #edf1f5; }
*::-webkit-scrollbar-track { background: #edf1f5; }
*::-webkit-scrollbar-thumb { border-color: #edf1f5; background: #aeb9c7; }

.surface,
.metrics-strip,
.summary-band,
.audit-project-header,
.followup-table-wrap,
.project-archive-list,
.dashboard-dimension,
.dashboard-risk-panel,
.dashboard-health-panel,
.dashboard-chart-panel,
.dashboard-photographer-panel,
.dashboard-aging-panel,
.gantt-panel,
.rule-library,
.rule-project-scope,
.engine-events-panel,
.import-management,
.import-history,
.user-management,
.empty-state {
  border-color: var(--line);
  background: #ffffff;
  box-shadow: 0 3px 11px rgba(31, 50, 74, 0.07), inset 0 1px #ffffff;
  color: var(--ink);
}

.page:not(.flush) > .page-head,
.page:has(.dashboard-command) > .page-head,
.page:has(.project-archive-list) > .page-head,
.page:has(.rule-library) > .page-head {
  min-height: 76px;
  align-items: center;
  border-color: #33465c;
  background:
    linear-gradient(90deg, rgba(23, 37, 56, 0.98) 0%, rgba(24, 49, 73, 0.92) 48%, rgba(20, 54, 70, 0.62) 100%),
    url('/assets/concepts/jianwei-road-intelligence-scene-v1.jpg') center 58% / cover no-repeat;
  box-shadow: 0 8px 20px rgba(24, 43, 66, 0.17), inset 0 1px rgba(255, 255, 255, 0.08);
  color: #f5f8fc;
}

.page:not(.flush) > .page-head p { color: #aebdce; }
.page:not(.flush) > .page-head .page-head-copy p {
  margin: 0;
  font-size: 14px;
  font-weight: 560;
  line-height: 21px;
}

.section-head,
.panel-head,
.table-head {
  border-color: var(--line);
  background: #f7f9fc;
  color: var(--ink);
}

.page-head h1,
.workspace-head h1,
.section-head h2,
.surface h2,
.surface h3 { color: var(--ink-strong); }

.page-head p,
.workspace-head p,
.section-head p,
.surface p,
.cell-sub,
.muted { color: var(--muted); }

.button,
.icon-button,
.action-icon {
  border-color: #c4cfdb;
  background: #ffffff;
  color: #425168;
  box-shadow: inset 0 1px #ffffff;
}

.button:hover,
.icon-button:hover,
.action-icon:hover {
  border-color: #79ace7;
  background: #f1f7ff;
  color: #0f62bd;
}

.button.primary { border-color: #126bd0; background: #1677e8; color: #ffffff; }
.button.primary:hover { border-color: #0e5db7; background: #0f69cf; }
.button.success { border-color: #72b28f; background: #e8f5ee; color: #1d704b; }
.button.danger { border-color: #df8f8b; background: #fdebea; color: #a93632; }

.input,
.select,
.textarea,
.photo-filter-search,
.photo-filter-control,
.photo-filter-reset,
.audit-project-search input {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(31, 50, 74, 0.045);
}

input::placeholder,
textarea::placeholder { color: #95a1b1; }

.segmented { border-color: #cbd5e1; background: #e7ecf2; }
.segmented button { color: #59687b; }
.segmented button:hover:not(.active) {
  background: #f7f9fc;
  color: #27415f;
  box-shadow: inset 0 0 0 1px #a9bdd4;
}
.segmented button.active {
  border-color: #7eafe7;
  background: #ffffff;
  color: #0e5cae;
  box-shadow: 0 3px 9px rgba(22, 119, 232, 0.13);
}

.badge,
.status-badge { border-color: #cbd5e0; background: #f3f6f9; color: #59687b; }
.badge.blue,
.status-badge.blue { border-color: #9bc3ee; background: #e7f1ff; color: #0d5eb8; }
.badge.green,
.status-badge.green { border-color: #91c9aa; background: #e8f5ee; color: #1d704b; }
.badge.amber,
.status-badge.amber { border-color: #e2bd7d; background: #fff3dc; color: #87520a; }
.badge.red,
.status-badge.red { border-color: #e5a09d; background: #fdebea; color: #a93632; }
.badge.cyan,
.status-badge.cyan { border-color: #8bc8cd; background: #e5f4f5; color: #0c6f79; }
.badge.violet,
.status-badge.violet { border-color: #b7a8e1; background: #f0ecfb; color: #5a43a2; }

.progress-track,
.archive-progress,
.dashboard-dimension-track,
.dashboard-distribution-row > div:last-child,
.dashboard-aging-row > div:last-child,
.audit-live-progress-track { background: #e4e9ef; }

.progress-inline { background: transparent; }

/* Completion meters share one state language across desktop and mobile. */
.progress-track.dormant span,
.archive-progress.dormant i,
.audit-live-progress-track.dormant span,
.dashboard-dimension.completion.dormant .dashboard-dimension-track span {
  background: linear-gradient(90deg, #e3e9ee 0%, #aab6c2 100%);
}

.progress-track.partial span,
.archive-progress.partial i,
.audit-live-progress-track.partial span,
.dashboard-dimension.completion.partial .dashboard-dimension-track span {
  background: linear-gradient(90deg, #b8dfc4 0%, #4f9a68 100%);
}

.progress-track.complete span,
.archive-progress.complete i,
.audit-live-progress-track.complete span,
.dashboard-dimension.completion.complete .dashboard-dimension-track span {
  background: #23834e;
}

/* Project archive keeps its existing meter layout but shares audit progress colors. */
.project-rules-detail .progress-track.partial span {
  background: linear-gradient(90deg, #b47a27 0%, #e1ad51 100%);
}

.project-rules-detail .project-rule-row {
  min-height: 64px;
  grid-template-columns: 44px minmax(230px, 1fr) minmax(140px, 0.68fr) minmax(230px, 1.25fr) 88px;
  gap: 12px;
  padding: 8px 14px;
}

.project-rules-detail .project-rule-code {
  color: #536174;
  font-size: 11px;
  line-height: 1;
}

.project-rules-detail .project-rule-name {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px;
}

.project-rules-detail .project-rule-name > strong {
  margin-right: 2px;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 18px;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag {
  display: inline-flex;
  min-height: 20px;
  align-items: center;
  margin: 0;
  padding: 2px 6px;
  border: 1px solid #d8e0e8;
  border-radius: 3px;
  background: #f4f7f9;
  color: #5e6c7e;
  font-size: 10px;
  font-weight: 620;
  line-height: 14px;
  white-space: nowrap;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain {
  border-color: #cbdced;
  background: #edf5fc;
  color: #35658f;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-a {
  border-color: #bdd5ec;
  background: #eaf3fc;
  color: #275f91;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-b {
  border-color: #c9d0eb;
  background: #eef0fa;
  color: #4b5f9b;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-c {
  border-color: #b9ded9;
  background: #e8f6f4;
  color: #25746d;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-d {
  border-color: #e7cf9f;
  background: #fff5e3;
  color: #875912;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-lifecycle {
  border-color: #c2ddcb;
  background: #ebf6ef;
  color: #34704a;
}

:is(.project-rules-detail .project-rule-name, .rules-page .process-rule-title) .project-rule-tag.chain-bypass {
  border-color: #d3dbe3;
  background: #f1f3f5;
  color: #657282;
}

.project-material-panel {
  overflow: hidden;
}

.project-material-summary {
  position: relative;
  display: grid;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  padding: 9px 16px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.project-material-summary-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.project-material-summary-title > span {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  border: 1px solid #c8d9eb;
  border-radius: 4px;
  background: #eaf3fc;
  color: #2e6596;
}

.project-material-summary-title svg {
  width: 17px;
  height: 17px;
}

.project-material-summary-title strong {
  display: block;
}

.project-material-summary-title strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 18px;
}

.project-material-summary-meter {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: min(220px, calc(100% - 42px));
  min-width: 140px;
  grid-template-rows: 17px 7px;
  gap: 3px;
  transform: translate(-50%, -50%);
}

.project-material-summary-meter > strong {
  align-self: end;
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 680;
  font-variant-numeric: tabular-nums;
  line-height: 17px;
  text-align: center;
}

.project-material-summary-meter > strong small {
  color: #667487;
  font-size: 10px;
  font-weight: 600;
}

.project-material-summary-meter > b {
  position: absolute;
  left: calc(100% + 8px);
  bottom: -1px;
  color: #536174;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  line-height: 13px;
  white-space: nowrap;
}

.project-material-summary-meter .progress-track {
  height: 7px;
}

.project-material-table {
  width: 100%;
  min-width: 640px;
  table-layout: fixed;
}

.project-material-table th,
.project-material-table td {
  padding-right: 14px;
  padding-left: 14px;
  font-size: 12px;
}

.project-material-table th {
  height: 36px;
  color: #697689;
  font-size: 11px;
  font-weight: 650;
}

.project-material-table td {
  height: 44px;
  color: #48576a;
  line-height: 17px;
}

.project-material-table th:nth-child(1) { width: 20%; }
.project-material-table th:nth-child(2) { width: 30%; }
.project-material-table th:nth-child(3) { width: 14%; }
.project-material-table th:nth-child(4) { width: 36%; }

.project-material-stage {
  display: inline-flex;
  min-height: 22px;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #d4e0eb;
  border-radius: 3px;
  background: #f2f6fa;
  color: #49677f;
  font-size: 10px;
  font-weight: 650;
  line-height: 16px;
}

.project-material-name strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 18px;
}

.project-material-table .status-badge {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 16px;
}

.project-material-table .material-due-cell > span {
  color: #526175;
  font-size: 11px;
  line-height: 16px;
}

.problem-record-groups {
  display: grid;
  gap: 18px;
}

.problem-record-group {
  display: grid;
  gap: 8px;
}

.problem-record-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2px;
}

.problem-record-group-head strong {
  color: var(--ink-strong);
  font-size: 12px;
  font-weight: 680;
  line-height: 18px;
}

.problem-record-group-head span {
  color: #748194;
  font-size: 10px;
  line-height: 15px;
}

.problem-record-group .problem-record-list {
  gap: 8px;
}

.problem-record-group .problem-record,
.problem-closed-archive .problem-record {
  display: grid;
  overflow: hidden;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  padding: 0;
  border-left: 3px solid #d7dee6;
}

.problem-record-group .problem-record.is-open {
  border-left-color: #d59a39;
}

.problem-record-group .problem-record.is-resolved,
.problem-closed-archive .problem-record.is-resolved {
  border-left-color: #4f9a68;
}

.problem-record-header {
  display: flex;
  min-height: 42px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 12px;
  border-bottom: 1px solid #e5eaf0;
  background: #f8fafc;
}

.problem-record-header .problem-record-labels .badge,
.problem-record-header .problem-record-labels .status-badge {
  min-height: 22px;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 16px;
}

.problem-record-header > .button,
.problem-record-header > .inline-actions .button {
  min-height: 28px;
  font-size: 10px;
}

.problem-record-header > .inline-actions {
  flex-wrap: nowrap;
}

.problem-record-content {
  display: grid;
  gap: 4px;
  padding: 11px 14px 7px;
}

.problem-record-content > strong {
  color: var(--ink-strong);
  font-size: 13px;
  font-weight: 680;
  line-height: 19px;
}

.problem-record-content > p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: #657386;
  font-size: 11px;
  line-height: 17px;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.problem-record-meta {
  display: flex;
  min-width: 0;
  flex-wrap: wrap;
  align-items: center;
  gap: 5px 14px;
  padding: 0 14px 11px;
  color: #748194;
  font-size: 10px;
  line-height: 15px;
}

.problem-record-next {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #59687a;
  font-weight: 620;
}

.problem-record-next svg {
  width: 13px;
  height: 13px;
}

.problem-record.is-open .problem-record-next {
  color: #8a5b13;
}

.problem-record.is-resolved .problem-record-next {
  color: #287d55;
}

.problem-record-history {
  border-top: 1px solid #e5eaf0;
  background: #fbfcfd;
}

.problem-record-history > summary {
  display: grid;
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  color: #657386;
  cursor: pointer;
  list-style: none;
}

.problem-record-history > summary::-webkit-details-marker {
  display: none;
}

.problem-record-history > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 620;
}

.problem-record-history > summary > span svg {
  width: 13px;
  height: 13px;
}

.problem-record-history > summary > b {
  color: #748194;
  font-size: 10px;
  font-weight: 600;
}

.problem-record-history > summary > svg {
  width: 14px;
  height: 14px;
  transition: transform 160ms ease;
}

.problem-record-history[open] > summary > svg {
  transform: rotate(180deg);
}

.problem-record-history-list {
  display: grid;
  gap: 8px;
  padding: 0 14px 12px;
}

.problem-record-detail > p {
  margin: 0;
  padding: 0 14px 11px;
  color: #5e6d80;
  font-size: 11px;
  line-height: 18px;
  white-space: pre-line;
}

.problem-record-history-list .problem-reply-item {
  padding: 8px 0 0;
}

.problem-record-history-list .problem-reply-item strong {
  font-size: 11px;
  line-height: 17px;
}

.problem-record-history-list .problem-reply-item span,
.problem-record-history-list .problem-reply-evidence {
  font-size: 10px;
  line-height: 15px;
}

.problem-open-empty {
  display: flex;
  min-height: 76px;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid #d8e7de;
  border-radius: 6px;
  background: #f7fbf8;
}

.problem-open-empty > svg {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  color: #3e8a60;
}

.problem-open-empty > div {
  display: grid;
  gap: 2px;
}

.problem-open-empty strong {
  color: #2f4b3a;
  font-size: 12px;
  line-height: 18px;
}

.problem-open-empty span {
  color: #6d7d72;
  font-size: 10px;
  line-height: 15px;
}

.problem-closed-archive {
  overflow: hidden;
  padding: 0;
}

.problem-closed-archive > summary {
  display: grid;
  min-height: 44px;
  grid-template-columns: minmax(0, 1fr) auto 16px;
  align-items: center;
  gap: 10px;
  padding: 9px 13px;
  color: #59687a;
  cursor: pointer;
  list-style: none;
}

.problem-closed-archive > summary::-webkit-details-marker {
  display: none;
}

.problem-closed-archive > summary > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 650;
  line-height: 18px;
}

.problem-closed-archive > summary > span svg,
.problem-closed-archive > summary > svg {
  width: 15px;
  height: 15px;
}

.problem-closed-archive > summary > b {
  color: #758194;
  font-size: 10px;
  font-weight: 620;
}

.problem-closed-archive > summary > svg {
  transition: transform 160ms ease;
}

.problem-closed-archive[open] > summary > svg {
  transform: rotate(180deg);
}

.problem-closed-archive > .problem-record-list {
  gap: 8px;
  padding: 0 10px 10px;
  border-top: 1px solid #e5eaf0;
  background: #f8fafb;
}

.problem-closed-archive > .problem-record-list > .problem-record {
  margin-top: 8px;
}

.problem-record-header .problem-readonly {
  font-size: 10px;
}

@media (max-width: 767px) {
  .problem-record-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .problem-record-header > .inline-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .project-material-summary {
    grid-template-columns: minmax(0, 1fr);
    gap: 9px;
    padding: 10px 12px;
  }

  .project-material-summary-meter {
    position: relative;
    top: auto;
    left: auto;
    grid-column: 1;
    justify-self: center;
    transform: none;
  }
}

.project-rule-progress .progress-inline {
  min-width: 0;
  grid-template-columns: minmax(96px, 1fr) 34px;
  gap: 8px;
}

.project-rule-progress .progress-inline > b {
  color: #647287;
  font-size: 11px;
  font-weight: 650;
  line-height: 15px;
}

.project-rules-detail .project-rule-progress .progress-inline.partial > b {
  color: #976217;
}

.project-rules-detail .project-rule-sites {
  display: block;
  min-width: 0;
}

.project-rules-detail .project-rule-sites > span {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid #e2e8ef;
  border-radius: 4px;
  background: #f6f8fa;
}

.project-rules-detail .project-rule-sites b,
.project-rules-detail .project-rule-sites small {
  font-size: 11px;
  line-height: 16px;
}

.project-rules-detail .project-rule-sites b {
  color: #6d7887;
  font-weight: 680;
  white-space: nowrap;
}

.project-rules-detail .project-rule-sites small {
  overflow-wrap: anywhere;
  color: #526175;
  font-weight: 500;
}

.project-rules-detail .project-rule-sites .is-missing {
  border-color: #edd8ad;
  background: #fffaf0;
}

.project-rules-detail .project-rule-sites .is-missing b {
  color: #976217;
}

.project-rules-detail .project-rule-sites .is-complete b {
  color: #287d55;
}

.project-rules-detail .project-rule-status .badge {
  min-height: 24px;
  justify-content: center;
  padding: 3px 8px;
  font-size: 10px;
  font-weight: 650;
  line-height: 16px;
  white-space: nowrap;
}

@media (max-width: 1199px) {
  .project-rules-detail .project-rule-row {
    grid-template-columns: 40px minmax(190px, 0.9fr) minmax(125px, 0.65fr) minmax(180px, 1.1fr) 82px;
    gap: 10px;
    padding-right: 12px;
    padding-left: 12px;
  }
}

@media (max-width: 767px) {
  .project-rules-detail .project-rule-row {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    gap: 8px;
    padding: 8px 12px;
  }

  .project-rules-detail .project-rule-row > :nth-child(3),
  .project-rules-detail .project-rule-sites {
    grid-column: 2 / -1;
  }

  .project-rules-detail .project-rule-status {
    grid-column: 3;
    grid-row: 1;
  }

  .project-rule-progress .progress-inline {
    width: 100%;
  }
}

.progress-inline.dormant > b,
.audit-live-progress.dormant .audit-live-progress-head span { color: #7f8c99; }
.progress-inline.partial > b,
.audit-live-progress.partial .audit-live-progress-head span { color: #4f8d63; }
.progress-inline.complete > b,
.audit-live-progress.complete .audit-live-progress-head span { color: #287d55; }

.progress-track.amber span { background: var(--amber); }
.progress-track.red span { background: var(--red); }

/* Archive progress reuses the same track/fill component as the audit workspace. */
.project-archive-row .project-rule-mini > span,
.archive-rule-matrix > div {
  background: var(--surface-2);
}
.project-archive-row .project-rule-mini > span.dormant,
.archive-rule-matrix > div.dormant { color: #7f8c99; }
.project-archive-row .project-rule-mini > span.partial,
.archive-rule-matrix > div.partial { color: #4f8d63; }
.project-archive-row .project-rule-mini > span.complete,
.archive-rule-matrix > div.complete { color: #287d55; }
.archive-rule-matrix > div.dormant,
.archive-rule-matrix > div.partial,
.archive-rule-matrix > div.complete { border-color: var(--line); background: var(--surface-2); }
.archive-rule-matrix > div.partial > strong { color: #4f8d63; }
.project-archive-row .project-rule-mini > span > b,
.project-archive-row .project-rule-mini > span > small,
.archive-rule-matrix > div > span:not(.archive-rule-progress),
.archive-rule-matrix > div > strong,
.archive-rule-matrix > div > small {
  position: relative;
  z-index: 1;
}
.archive-rule-progress {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 4px;
  margin-top: 4px;
}

.filter-bar,
.photo-list-toolbar {
  border-color: #ccd6e1;
  background: rgba(255, 255, 255, 0.97);
  box-shadow: 0 6px 16px rgba(31, 50, 74, 0.09);
}

.photo-status-filter button { border-color: #c6d0dc; background: #f7f9fb; color: #526176; }
.photo-status-filter button.active { border-color: #73a9e5; background: #e5f1ff; color: #0d5eb8; }
.photo-status-filter button[data-photo-filter-value="approved"].active { border-color: #78bb97; background: #e5f4eb; color: #1d704b; }
.photo-status-filter button[data-photo-filter-value="pending"] { color: #1677e8; }
.photo-status-filter button[data-photo-filter-value="pending"].active { border-color: #8ab7ee; background: #e7f1ff; color: #1677e8; }
.photo-status-filter button[data-photo-filter-value="rejected"].active { border-color: #df8a86; background: #fde6e5; color: #a93632; }
.photo-status-filter button[data-photo-filter-value="suspect"].active { border-color: #d7a956; background: #ffefcf; color: #84520b; }
.photo-status-filter button:hover:not(.active) { border-color: #9bb7d6; background: #edf5ff; color: #174f8a; }
.photo-status-filter button[data-photo-filter-value="approved"]:hover:not(.active) { border-color: #78bb97; background: #eef8f2; color: #1d704b; }
.photo-status-filter button[data-photo-filter-value="rejected"]:hover:not(.active) { border-color: #df8a86; background: #fff0ef; color: #a93632; }
.photo-status-filter button[data-photo-filter-value="suspect"]:hover:not(.active) { border-color: #d7a956; background: #fff6e4; color: #84520b; }

.audit-project-rail,
.audit-project-panel,
.audit-project-workspace,
.audit-context { border-color: var(--line); background: #ffffff; }
.audit-project-search { border-bottom-color: var(--line); background: #f7f9fb; }
.audit-project-tab { border-color: #d3dbe5; background: #ffffff; box-shadow: 0 1px 4px rgba(31, 50, 74, 0.045); }
.audit-project-tab:hover { border-color: #91b9e4; background: #f2f7fd; }
.audit-project-tab.active {
  border-color: #75a9df;
  background: #e7f2ff;
  box-shadow: inset 5px 0 0 #1677e8, inset 0 0 0 1px rgba(22, 119, 232, 0.09), 0 5px 14px rgba(31, 75, 124, 0.13);
}
.audit-project-tab.readonly.active {
  border-color: #78bbc2;
  background: #e5f4f5;
  box-shadow: inset 5px 0 0 #168b98, inset 0 0 0 1px rgba(22, 139, 152, 0.08), 0 5px 14px rgba(31, 75, 124, 0.12);
}
.audit-project-tab > strong { color: #354359; }
.audit-project-tab.active > strong { color: #17395e; }
.audit-project-summary { border-top-color: #d3dbe5; }
.audit-project-summary > div:nth-child(1) { background: #e8f2ff; }
.audit-project-summary > div:nth-child(2) { background: #e8f5ee; }
.audit-project-summary > div:nth-child(3) { background: #eff3f7; }
.audit-project-summary > div:nth-child(4) { background: #fff3dc; }
.audit-project-summary > div > span,
.audit-project-summary .audit-pending-head > span {
  color: #647287;
  font-weight: 560;
}

.audit-rule-summary .project-rule-mini.named-rules > span,
.project-rule-mini.named-rules > span,
.project-rule-row,
.project-rule-config-row,
.audit-material-item,
.issue-record,
.problem-reply-history > li {
  border-color: var(--line);
  background: #f8fafc;
  color: var(--ink);
}

.photo-card { border-color: #c7d1dd; background: #ffffff; box-shadow: 0 4px 12px rgba(31, 50, 74, 0.1); }
.photo-card:hover { border-color: #5b9ee5; box-shadow: 0 10px 24px rgba(31, 75, 124, 0.16); }
.photo-card.is-current { border-color: #1677e8; background: #eaf3ff; box-shadow: 0 0 0 3px rgba(22, 119, 232, 0.23); }
.photo-meta,
.audit-photo-meta { border-top-color: #d3dbe5; background: #ffffff; color: var(--ink); }
.photo-review-reason-chip {
  border-color: #e4aaa6;
  background: #fff1f0;
  color: #9f312d;
}
.photo-review-reason-chip span,
.audit-photo-meta .photo-review-reason-chip span { color: #9f312d; }
.photo-actions { border-top-color: #d3dbe5; background: #f8fafc; }

.photo-actions button.requires-rule-mapping {
  border-color: #e5a09d;
  background: #fff0ef;
  color: #b42318;
}

.project-archive-columns { border-color: var(--line); background: #f4f7fa; color: #69788b; }
.project-archive-row { border-color: var(--line); background: #ffffff; color: var(--ink); }
.project-archive-row:hover { background: #f4f8fc; }
.project-archive-row.is-current,
.project-archive-row.is-current:hover {
  background: #e7f2ff;
  box-shadow: inset 6px 0 0 #1677e8, inset 0 0 0 1px #79abe1, 0 6px 16px rgba(31, 75, 124, 0.13);
}
.project-archive-row.lifecycle-archived,
.project-archive-row.lifecycle-archived:hover,
.project-archive-row.lifecycle-archived.is-current,
.project-archive-row.lifecycle-archived.is-current:hover { background: #e9f5ee; }

.data-table,
.followup-table { background: #ffffff; color: var(--ink); }
.data-table th,
.followup-table th { border-color: var(--line); background: #f4f7fa; color: #68778a; }
.data-table td,
.followup-table td { border-color: var(--line); background: #ffffff; color: var(--ink); }
.data-table tbody tr:hover td,
.followup-table tbody tr:hover td { background: #f4f8fc; }

.dashboard-command {
  border-color: #b8c9dc;
  background: linear-gradient(115deg, #f8fbff, #eef5fc 72%, #edf8f7);
  color: var(--ink);
}
.dashboard-command-stats > div,
.dashboard-health-item,
.dashboard-risk-row,
.dashboard-distribution-row,
.dashboard-aging-row { border-color: var(--line); background: #ffffff; }
.dashboard-dimension:hover,
.dashboard-risk-row:hover,
.dashboard-health-item:hover { background: #f4f8fc; }
.dashboard-command-icon,
.dashboard-health-icon { border-color: #9bc1ea; background: #e8f2ff; color: #176fcf; }
.dashboard-footnote,
.dashboard-list-foot,
.dashboard-health-note { border-color: var(--line); background: #f7f9fb; color: #718095; }
.gantt-board,
.gantt-scroll,
.gantt-grid,
.gantt-track,
.gantt-axis-track { border-color: var(--line); background-color: #ffffff; }
.gantt-project-row,
.gantt-path-row { border-color: #dfe5ec; }

.rule-row,
.rule-profile-summary,
.rule-backup-summary,
.rule-admin-auth,
.import-issues-summary,
.import-issue,
.import-issue.resolved,
.import-issue-source,
.pipeline-step,
.drop-zone,
.account-session-state {
  border-color: var(--line);
  background: #ffffff;
  color: var(--ink);
}
.rule-row:hover,
.import-issues-summary:hover,
.pipeline-step:hover { background: #f4f8fc; }
.rule-code { color: #684fc0; }
.import-issue-explanation { border-color: #e6b2af; background: #fff5f4; color: #9f4a46; }

.modal,
.drawer {
  border-color: #bfcbd8;
  background: #ffffff;
  box-shadow: 0 30px 90px rgba(18, 34, 53, 0.28), inset 0 1px #ffffff;
  color: var(--ink);
}
.modal-head,
.drawer-head,
.modal-foot,
.drawer-foot { border-color: var(--line); background: #f7f9fb; }
.modal-body,
.drawer-body { background: #ffffff; }

.auth-screen {
  isolation: isolate;
  justify-items: end;
  padding-right: clamp(36px, 6vw, 92px);
  background: #edf2f7;
}

.auth-screen::before {
  inset: -2% auto -2% -2%;
  width: 78%;
  background: url('/assets/concepts/jianwei-road-intelligence-scene-v1.jpg') center / cover no-repeat;
  filter: saturate(0.9) contrast(0.96);
  opacity: 0.94;
  transform: scale(1.015);
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 60%, rgba(0, 0, 0, 0.86) 74%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 60%, rgba(0, 0, 0, 0.86) 74%, transparent 100%);
}

.auth-screen::after {
  position: absolute;
  z-index: 0;
  display: block;
  inset: 0;
  background: linear-gradient(90deg, rgba(237, 242, 247, 0.04) 0%, rgba(237, 242, 247, 0.08) 50%, rgba(237, 242, 247, 0.72) 70%, #edf2f7 84%);
  content: "";
  pointer-events: none;
}

.auth-panel {
  border-color: rgba(190, 202, 215, 0.92);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 26px 72px rgba(30, 48, 69, 0.18), inset 0 1px #ffffff;
  color: var(--ink);
  animation: auth-panel-enter 620ms cubic-bezier(.2, .8, .2, 1) both;
  -webkit-backdrop-filter: blur(18px) saturate(108%);
  backdrop-filter: blur(18px) saturate(108%);
}

.auth-brand .brand-mark {
  animation: auth-brand-breathe 3.4s ease-in-out infinite;
}

.auth-brand strong,
.auth-heading h1 { color: var(--ink-strong); }

.auth-brand span,
.auth-heading p,
.auth-safety,
.auth-form > label { color: var(--muted); }

.auth-heading > span { color: #0f67c7; }
.auth-safety { border-top-color: var(--line); }

.auth-input {
  border-color: var(--line-strong);
  background: #ffffff;
  color: var(--ink);
  box-shadow: inset 0 1px 2px rgba(31, 50, 74, 0.04);
}

.auth-input:hover { border-color: #8db7e4; }
.auth-input:focus-within { border-color: var(--blue); box-shadow: var(--focus); }
.auth-input input { color: var(--ink-strong); }
.auth-password-toggle { color: var(--muted); }

.auth-guest {
  border-color: #c4cfdb;
  background: #ffffff;
  color: #425168;
}

.audit-unavailable-page .audit-workspace {
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.93) 48%, rgba(244, 249, 253, 0.72) 100%),
    url('/assets/concepts/jianwei-road-intelligence-scene-v1.jpg') center 58% / cover no-repeat;
}

/* Media inspection remains dark so photographs and annotations dominate. */
.photo-detail-workspace,
.photo-detail-drawer,
.photo-detail-body,
.photo-detail-info,
.photo-evidence-panel,
.photo-evidence-panel-body,
.viewer-overlay,
.viewer-main,
.viewer-review-actions,
.photo-filmstrip { color-scheme: dark; }

.photo-detail-workspace .drawer-head,
.photo-detail-workspace .drawer-body,
.photo-detail-workspace .drawer-foot,
.photo-detail-drawer,
.photo-detail-body,
.photo-detail-info { border-color: #334357; background: #18222e; color: #dce5ef; }

@media (max-width: 767px) {
  .auth-screen {
    padding: 20px;
    background: #edf2f7;
  }

  .auth-screen::before {
    display: none;
  }

  .auth-screen::after { display: none; }
  .auth-panel {
    min-height: 100dvh;
    justify-content: flex-start;
    padding-top: max(48px, env(safe-area-inset-top));
    background: #ffffff;
  }
  .auth-heading { margin-top: 30px; }
  .audit-mobile-switch { border-bottom-color: var(--line); background: #ffffff; }
}

/* Login opens on the brand scene, then rotates through real reviewed photos. */
.auth-case-showcase {
  position: absolute;
  z-index: 1;
  inset: 0 auto 0 0;
  width: 78%;
  overflow: hidden;
  color: #ffffff;
  -webkit-mask-image: linear-gradient(90deg, #000 0%, #000 66%, rgba(0, 0, 0, .9) 78%, transparent 100%);
  mask-image: linear-gradient(90deg, #000 0%, #000 66%, rgba(0, 0, 0, .9) 78%, transparent 100%);
}

.auth-case-showcase::after {
  position: absolute;
  z-index: 1;
  right: 8%;
  bottom: -19%;
  left: 9%;
  height: 54%;
  background-image:
    repeating-linear-gradient(90deg, rgba(85, 215, 255, .18) 0 1px, transparent 1px 76px),
    repeating-linear-gradient(0deg, rgba(85, 215, 255, .15) 0 1px, transparent 1px 54px);
  content: "";
  opacity: 0;
  pointer-events: none;
  transform: perspective(420px) rotateX(62deg);
  transform-origin: bottom;
  -webkit-mask-image: linear-gradient(180deg, transparent, #000 28%, #000 82%, transparent);
  mask-image: linear-gradient(180deg, transparent, #000 28%, #000 82%, transparent);
}

.auth-case-showcase.is-concept::after {
  opacity: .7;
}

.auth-case-slide {
  position: absolute;
  z-index: 0;
  inset: 0;
  background-position: center;
  background-size: cover;
  opacity: 0;
  filter: saturate(.88) contrast(.98);
  transform: scale(1.045) translate3d(.35%, .15%, 0);
  transition:
    opacity 720ms cubic-bezier(.22, .61, .36, 1),
    transform 8.5s cubic-bezier(.2, .65, .3, 1);
  will-change: opacity, transform;
}

.auth-case-showcase.is-concept .auth-case-slide.is-active {
  animation: auth-concept-zoom 9s linear both;
}

.auth-case-showcase.is-concept .auth-case-slide.is-active::before {
  position: absolute;
  z-index: 2;
  inset: 9% 7% 11% 6%;
  background:
    linear-gradient(90deg, rgba(103, 224, 255, .92), rgba(103, 224, 255, .92)) left top / 68px 1px no-repeat,
    linear-gradient(180deg, rgba(103, 224, 255, .92), rgba(103, 224, 255, .92)) left top / 1px 54px no-repeat,
    linear-gradient(90deg, rgba(103, 224, 255, .72), rgba(103, 224, 255, .72)) right top / 68px 1px no-repeat,
    linear-gradient(180deg, rgba(103, 224, 255, .72), rgba(103, 224, 255, .72)) right top / 1px 54px no-repeat,
    linear-gradient(90deg, rgba(103, 224, 255, .72), rgba(103, 224, 255, .72)) left bottom / 68px 1px no-repeat,
    linear-gradient(180deg, rgba(103, 224, 255, .72), rgba(103, 224, 255, .72)) left bottom / 1px 54px no-repeat,
    linear-gradient(90deg, rgba(103, 224, 255, .9), rgba(103, 224, 255, .9)) right bottom / 68px 1px no-repeat,
    linear-gradient(180deg, rgba(103, 224, 255, .9), rgba(103, 224, 255, .9)) right bottom / 1px 54px no-repeat;
  content: "";
  filter: drop-shadow(0 0 7px rgba(83, 211, 255, .42));
  pointer-events: none;
  animation: auth-hud-frame 1.9s ease-in-out infinite;
}

.auth-case-slide::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8, 15, 24, .04) 32%, rgba(7, 14, 23, .78) 100%);
  content: "";
}

.auth-case-showcase.is-concept .auth-case-slide.is-active::after {
  z-index: 1;
  background:
    linear-gradient(180deg, transparent 0%, rgba(103, 224, 255, .03) 44%, rgba(103, 224, 255, .64) 49.8%, rgba(103, 224, 255, .1) 51%, transparent 56%) 0 -110% / 100% 220% no-repeat,
    linear-gradient(180deg, rgba(8, 15, 24, .04) 32%, rgba(7, 14, 23, .78) 100%);
  animation: auth-vertical-scan 12s linear infinite;
}

.auth-case-slide.is-active { opacity: 1; transform: scale(1.012) translate3d(0, 0, 0); }

.auth-case-caption {
  position: absolute;
  z-index: 2;
  bottom: clamp(42px, 7vh, 82px);
  left: clamp(28px, 5vw, 76px);
  display: grid;
  max-width: min(520px, 62vw);
  gap: 5px;
  text-shadow: 0 2px 18px rgba(0, 0, 0, .6);
}

.auth-case-caption.is-entering {
  animation: auth-caption-enter 420ms cubic-bezier(.2, .8, .2, 1) both;
}

.auth-case-showcase.is-concept .auth-case-caption {
  padding: 12px 16px;
  border-left: 2px solid rgba(103, 224, 255, .9);
  background: linear-gradient(90deg, rgba(7, 26, 41, .58), rgba(7, 26, 41, .08) 76%, transparent);
  box-shadow: -7px 0 20px rgba(68, 196, 238, .12);
}

.auth-case-showcase.is-concept .auth-case-caption::before,
.auth-case-showcase.is-concept .auth-case-caption::after {
  position: absolute;
  left: 0;
  width: 92px;
  height: 1px;
  background: linear-gradient(90deg, rgba(103, 224, 255, .9), transparent);
  content: "";
}

.auth-case-showcase.is-concept .auth-case-caption::before { top: 0; }
.auth-case-showcase.is-concept .auth-case-caption::after { bottom: 0; }
}

.auth-case-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #ffd7df;
  font-size: 11px;
  font-weight: 750;
}

.auth-case-eyebrow svg { width: 14px; height: 14px; fill: currentColor; }
.auth-case-showcase.is-concept .auth-case-eyebrow svg { animation: auth-hud-pulse 2.2s ease-in-out infinite; }
.auth-case-caption strong { font-size: clamp(22px, 2.4vw, 36px); line-height: 1.2; }
.auth-case-caption > span:last-child { color: rgba(255, 255, 255, .78); font-size: 12px; }

.excellent-case-hero-controls button {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .28);
  border-radius: 50%;
  background: rgba(14, 23, 34, .62);
  color: #ffffff;
  backdrop-filter: blur(12px);
}

.excellent-case-hero-controls button:hover { background: rgba(23, 119, 232, .9); }
.excellent-case-hero-controls svg { width: 15px; height: 15px; }
.auth-screen.has-excellent-cases::before { opacity: 0; }
.auth-screen.has-excellent-cases .auth-panel { z-index: 3; }

@keyframes auth-panel-enter {
  from { opacity: 0; transform: translateX(18px) scale(.99); }
  to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes auth-brand-breathe {
  0%, 100% { box-shadow: 0 5px 15px rgba(17, 112, 78, .16), 0 0 0 0 rgba(33, 143, 102, 0), inset 0 1px #ffffff; transform: scale(1); }
  50% { box-shadow: 0 9px 28px rgba(17, 112, 78, .34), 0 0 0 7px rgba(33, 143, 102, .11), inset 0 1px #ffffff; transform: scale(1.055); }
}

@keyframes auth-concept-zoom {
  from { transform: scale(1.012) translate3d(0, 0, 0); }
  to { transform: scale(1.065) translate3d(-.45%, -.22%, 0); }
}

@keyframes auth-hud-frame {
  0%, 100% { filter: drop-shadow(0 0 4px rgba(83, 211, 255, .28)); opacity: .72; }
  50% { filter: drop-shadow(0 0 10px rgba(83, 211, 255, .62)); opacity: 1; }
}

@keyframes auth-vertical-scan {
  0%, 6% { background-position: 0 110%, 0 0; }
  66%, 100% { background-position: 0 -110%, 0 0; }
}

@keyframes auth-hud-pulse {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(106, 222, 255, 0)); opacity: .78; transform: scale(.94); }
  50% { filter: drop-shadow(0 0 7px rgba(106, 222, 255, .78)); opacity: 1; transform: scale(1.08); }
}

@keyframes auth-caption-enter {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .auth-panel,
  .auth-brand .brand-mark,
  .auth-case-showcase::after,
  .auth-case-showcase.is-concept .auth-case-eyebrow svg,
  .auth-case-showcase.is-concept .auth-case-slide.is-active,
  .auth-case-showcase.is-concept .auth-case-slide.is-active::before,
  .auth-case-showcase.is-concept .auth-case-slide.is-active::after,
  .auth-case-caption.is-entering {
    animation: none;
  }

  .auth-case-slide { transition: opacity 180ms linear; }
}

.photo-excellent-toggle {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .72);
  border-radius: 50%;
  background: rgba(20, 27, 36, .76);
  color: #ffffff;
  box-shadow: 0 5px 16px rgba(0, 0, 0, .22);
  backdrop-filter: blur(10px);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, color 140ms ease;
}

.photo-excellent-toggle.card,
.photo-excellent-toggle.case {
  position: absolute;
  z-index: 5;
  top: 7px;
  right: 7px;
}

.photo-excellent-toggle:hover:not(.is-ineligible):not(:disabled) { transform: scale(1.08); }
.photo-excellent-toggle svg { width: 17px; height: 17px; }
.photo-excellent-toggle.is-excellent {
  border-color: #ffb2c1;
  background: #d94362;
  color: #ffffff;
}
.photo-excellent-toggle.is-excellent svg { fill: currentColor; }
.photo-excellent-toggle.is-ineligible { cursor: help; opacity: .68; }
.photo-excellent-toggle.is-ineligible:hover { border-color: #f0c66d; color: #ffe39b; opacity: .95; }
.photo-excellent-toggle.is-denied { animation: excellent-heart-denied 320ms ease; }
.photo-excellent-toggle.is-loading svg { animation: excellent-heart-pulse 720ms ease-in-out infinite alternate; }
.photo-excellent-toggle.is-saved { animation: excellent-heart-saved 480ms ease; }

.photo-detail-tools .photo-excellent-toggle,
.viewer-tools .photo-excellent-toggle {
  border-color: #4a5360;
  background: #292d33;
  color: #f5f7f8;
  box-shadow: none;
}
.photo-detail-tools .photo-excellent-toggle.is-excellent,
.viewer-tools .photo-excellent-toggle.is-excellent { border-color: #df6b82; background: #713143; color: #ffdce4; }

@keyframes excellent-heart-pulse { to { transform: scale(.78); opacity: .55; } }
@keyframes excellent-heart-saved { 50% { transform: scale(1.22); } }
@keyframes excellent-heart-denied { 25% { transform: translateX(-2px); } 75% { transform: translateX(2px); } }

.excellent-action-hint {
  position: fixed;
  z-index: 260;
  display: flex;
  min-height: 38px;
  align-items: flex-start;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid #d7b45f;
  border-radius: 6px;
  background: rgba(37, 32, 21, .96);
  color: #fff2c7;
  box-shadow: 0 12px 28px rgba(10, 17, 26, .28);
  font-size: 11px;
  line-height: 18px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-3px);
  transition: opacity 150ms ease, transform 150ms ease;
  backdrop-filter: blur(14px);
}
.excellent-action-hint.visible { opacity: 1; transform: translateY(0); }
.excellent-action-hint svg { width: 15px; height: 15px; flex: 0 0 auto; margin-top: 1px; color: #f0c66d; }

.excellent-cases-page { padding-bottom: 52px; }
.excellent-cases-page > .page-head { margin-bottom: 14px; }
.excellent-cases-page > .page-head .badge { align-self: center; border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .1); color: #eef5fc; }
.excellent-case-head-actions { display: flex; align-items: center; gap: 8px; }
.case-image-mode-toggle { display: inline-flex; min-height: 34px; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid #b9c8d8; border-radius: 5px; background: rgba(255, 255, 255, .94); color: #617186; box-shadow: 0 3px 10px rgba(25, 48, 73, .08); cursor: pointer; }
.case-image-mode-toggle:hover { border-color: #72a8df; background: #f7fbff; }
.case-image-mode-toggle:focus-visible { outline: 2px solid #69a8e7; outline-offset: 2px; }
.case-image-mode-option { font-size: 11px; font-weight: 650; white-space: nowrap; transition: color 160ms ease, font-weight 160ms ease; }
.case-image-mode-option.selected { color: #135fae; font-weight: 780; }
.case-image-mode-toggle.active .case-image-mode-option.selected { color: #14765e; }
.case-image-mode-track { position: relative; width: 36px; height: 20px; flex: 0 0 auto; border: 1px solid #91a2b5; border-radius: 999px; background: #aab7c5; box-shadow: inset 0 1px 3px rgba(31, 49, 69, .2); transition: border-color 160ms ease, background 160ms ease; }
.case-image-mode-thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 4px rgba(25, 48, 73, .35); transition: transform 180ms ease; }
.case-image-mode-toggle.active .case-image-mode-track { border-color: #238a70; background: #31a987; }
.case-image-mode-toggle.active .case-image-mode-thumb { transform: translateX(16px); }

.excellent-case-hero {
  position: relative;
  height: clamp(250px, 31vw, 360px);
  overflow: hidden;
  border: 1px solid #b9c7d5;
  border-radius: 7px;
  background: #17212d;
  box-shadow: 0 10px 28px rgba(24, 43, 66, .18);
}

.excellent-case-hero > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 280ms ease, transform 7s ease;
}
.excellent-case-hero > img.is-changing { opacity: .25; }
.excellent-case-hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10, 19, 29, .84) 0%, rgba(10, 19, 29, .28) 58%, rgba(10, 19, 29, .05) 100%), linear-gradient(0deg, rgba(7, 13, 21, .42), transparent 58%); }
.excellent-case-hero-copy { position: absolute; bottom: 28px; left: 30px; display: grid; max-width: min(540px, 68%); gap: 5px; color: #ffffff; }
.excellent-case-hero-copy > span { display: inline-flex; align-items: center; gap: 6px; color: #ffc9d4; font-size: 11px; font-weight: 750; }
.excellent-case-hero-copy svg { width: 14px; height: 14px; }
.excellent-case-hero-copy h2 { margin: 0; color: #ffffff; font-size: 25px; letter-spacing: 0; }
.excellent-case-hero-copy p { margin: 0; color: rgba(255, 255, 255, .76); font-size: 12px; }
.excellent-case-hero-controls { position: absolute; right: 20px; bottom: 20px; display: flex; align-items: center; gap: 8px; }
.excellent-case-hero-controls span { min-width: 46px; color: rgba(255, 255, 255, .84); font-size: 11px; text-align: center; }

.excellent-case-filter-panel {
  position: sticky;
  z-index: 6;
  top: 0;
  display: grid;
  gap: 1px;
  margin: 14px -1px 0;
  padding: 6px 1px;
  border-bottom: 1px solid var(--line);
  background: rgba(237, 241, 245, .94);
  backdrop-filter: blur(16px);
}
.excellent-case-filter-row { display: grid; min-width: 0; grid-template-columns: 88px 1fr; align-items: center; }
.excellent-case-filter-label { padding: 0 10px 0 4px; color: #405066; font-size: 11px; font-weight: 760; white-space: nowrap; }
.excellent-case-filter-options { display: flex; min-width: 0; overflow-x: auto; gap: 6px; padding: 4px 2px; scrollbar-width: none; }
.excellent-case-filter-options::-webkit-scrollbar { display: none; }
.excellent-case-filter-options button { display: inline-flex; min-height: 30px; align-items: center; gap: 6px; flex: 0 0 auto; padding: 0 10px; border: 1px solid #c5d0dc; border-radius: 5px; background: #ffffff; color: #526174; font-size: 11px; font-weight: 680; }
.excellent-case-filter-options button span { color: #8a97a8; font-size: 10px; }
.excellent-case-filter-options button:hover { border-color: #7eaee1; color: #155fae; }
.excellent-case-filter-options button.active { border-color: #1677e8; background: #e7f1ff; color: #0f63bd; box-shadow: 0 0 0 2px rgba(22, 119, 232, .12); }
.excellent-case-filter-options button.active span { color: #4d83bf; }

.archive-photo-head { display: block; }
.archive-photo-head .photo-process-filter-panel { margin: -2px 0 5px; }
.photo-process-filter-panel { display: grid; gap: 1px; min-width: 0; padding: 2px 0 5px; border-bottom: 1px solid var(--line); }
.photo-process-filter-row { display: grid; min-width: 0; grid-template-columns: 88px minmax(0, 1fr); align-items: center; }
.photo-process-filter-label { padding: 0 10px 0 4px; color: #405066; font-size: 11px; font-weight: 760; white-space: nowrap; }
.photo-process-filter-options { display: flex; min-width: 0; overflow-x: auto; gap: 6px; padding: 3px 2px; scrollbar-width: none; }
.photo-process-filter-options::-webkit-scrollbar { display: none; }
.photo-process-filter-options button { display: inline-flex; min-height: 28px; align-items: center; gap: 5px; flex: 0 0 auto; padding: 0 9px; border: 1px solid #c5d0dc; border-radius: 5px; background: #ffffff; color: #526174; font-size: 11px; font-weight: 680; }
.photo-process-filter-options button span { color: #8a97a8; font-size: 10px; }
.photo-process-filter-options button:hover { border-color: #7eaee1; color: #155fae; }
.photo-process-filter-options button.active { border-color: #1677e8; background: #e7f1ff; color: #0f63bd; box-shadow: 0 0 0 2px rgba(22, 119, 232, .12); }
.photo-process-filter-options button.active span { color: #4d83bf; }

.excellent-process-groups { display: grid; gap: 14px; margin-top: 4px; }
.excellent-process-group { padding: 16px 0 4px; border-bottom: 1px solid var(--line); }
.excellent-process-group > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 13px; }
.excellent-process-group > header > div { display: flex; align-items: center; gap: 9px; }
.excellent-process-group > header span { padding: 3px 6px; border-radius: 4px; background: #e7f1ff; color: #1469c5; font-size: 10px; font-weight: 760; }
.excellent-process-group > header h2 { margin: 0; color: var(--ink-strong); font-size: 17px; letter-spacing: 0; }
.excellent-process-group > header small { color: var(--muted); }
.excellent-step-group { margin-bottom: 18px; }
.excellent-step-title { display: flex; align-items: baseline; gap: 8px; margin-bottom: 7px; }
.excellent-step-title strong { color: #314156; font-size: 12px; }
.excellent-step-title span { color: var(--muted-2); font-size: 10px; }
.excellent-case-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 10px; }
.excellent-case-card { position: relative; min-width: 0; overflow: hidden; border: 1px solid #cbd5df; border-radius: 6px; background: #ffffff; box-shadow: 0 3px 10px rgba(31, 50, 74, .07); transition: border-color 140ms ease, box-shadow 140ms ease, transform 140ms ease; }
.excellent-case-card:hover { border-color: #70a6dd; box-shadow: 0 9px 22px rgba(31, 75, 124, .15); transform: translateY(-1px); }
.excellent-case-card.is-current { border-color: #1677e8; box-shadow: 0 0 0 3px rgba(22, 119, 232, .22); }
.excellent-case-image { position: relative; display: block; width: 100%; aspect-ratio: 4 / 3; overflow: hidden; padding: 0; border: 0; border-bottom: 1px solid var(--line); background: #18212c; }
.excellent-case-image img { display: block; width: 100%; height: 100%; object-fit: contain; }
.excellent-case-rule { position: absolute; right: 7px; bottom: 7px; max-width: calc(100% - 14px); overflow: hidden; padding: 3px 6px; border-radius: 4px; background: rgba(14, 22, 32, .8); color: #e9f1f9; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.excellent-case-source-note { position: absolute; top: 7px; left: 7px; padding: 3px 6px; border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px; background: rgba(20, 31, 44, .82); color: #edf5fc; font-size: 9px; line-height: 14px; pointer-events: none; backdrop-filter: blur(10px); }
.excellent-case-card-copy { display: grid; gap: 3px; padding: 9px 10px 10px; }
.excellent-case-card-copy strong { color: var(--ink-strong); font-size: 12px; }
.excellent-case-card-copy span,
.excellent-case-card-copy small { overflow: hidden; color: var(--muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.excellent-case-card-copy p { overflow: hidden; margin: 2px 0 0; color: #405066; font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.excellent-cases-empty {
  display: grid;
  min-height: 420px;
  place-items: center;
  align-content: center;
  gap: 8px;
  overflow: hidden;
  padding: 32px;
  border: 1px solid #aebdca;
  border-radius: 7px;
  background:
    linear-gradient(90deg, rgba(14, 28, 43, 0.88), rgba(14, 31, 47, 0.56)),
    url('/assets/concepts/jianwei-road-intelligence-scene-v1.jpg') center 58% / cover no-repeat;
  box-shadow: 0 10px 28px rgba(24, 43, 66, .18);
  color: rgba(255, 255, 255, 0.78);
  text-align: center;
}
.excellent-cases-empty > svg { width: 40px; height: 40px; color: #ff9cad; fill: rgba(255, 156, 173, 0.22); }
.excellent-cases-empty h2 { margin: 4px 0 0; color: #ffffff; font-size: 18px; }
.excellent-cases-empty p { max-width: 460px; margin: 0 0 8px; font-size: 12px; line-height: 20px; }

@media (max-width: 767px) {
  .auth-screen.has-excellent-cases { display: grid; grid-template-rows: 190px auto; align-content: start; gap: 0; padding: 0; overflow: auto; background: #edf2f7; }
  .auth-screen.has-excellent-cases .auth-case-showcase { position: relative; inset: auto; width: 100%; height: 190px; -webkit-mask-image: none; mask-image: none; }
  .auth-screen.has-excellent-cases .auth-case-caption { bottom: 17px; left: 18px; max-width: calc(100% - 110px); }
  .auth-screen.has-excellent-cases .auth-case-caption strong { font-size: 18px; }
  .auth-screen.has-excellent-cases .auth-panel { width: 100%; min-height: auto; padding: 24px 20px max(28px, env(safe-area-inset-bottom)); border: 0; border-radius: 0; box-shadow: none; }
  .auth-screen.has-excellent-cases .auth-heading { margin-top: 22px; }
  .excellent-case-hero { height: 230px; border-radius: 5px; }
  .excellent-case-head-actions { gap: 6px; }
  .case-image-mode-toggle { min-height: 32px; gap: 5px; padding: 0 7px; }
  .case-image-mode-track { width: 34px; height: 19px; }
  .case-image-mode-thumb { width: 13px; height: 13px; }
  .case-image-mode-toggle.active .case-image-mode-thumb { transform: translateX(15px); }
  .excellent-case-hero-copy { bottom: 20px; left: 18px; max-width: calc(100% - 110px); }
  .excellent-case-hero-copy h2 { font-size: 19px; }
  .excellent-case-hero-controls { right: 12px; bottom: 14px; }
  .excellent-case-filter-panel { top: 0; margin-right: -16px; margin-left: -16px; padding-right: 0; padding-left: 16px; }
  .excellent-case-filter-row { grid-template-columns: 74px minmax(0, 1fr); }
  .excellent-case-filter-label { padding-left: 0; }
  .excellent-case-filter-options { padding-right: 16px; }
  .photo-process-filter-row { grid-template-columns: 74px minmax(0, 1fr); }
  .photo-process-filter-label { padding-left: 0; }
  .photo-process-filter-options { padding-right: 16px; }
  .excellent-case-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .excellent-case-card-copy { padding: 8px; }
  .excellent-case-rule { display: none; }
}

/* Photo review uses a dark image stage and light evidence surfaces. */
.photo-detail-info,
.photo-evidence-panel,
.photo-evidence-panel-body,
.photo-detail-drawer .viewer-review-actions,
.photo-detail-drawer > .photo-filmstrip {
  color-scheme: light;
}

.photo-detail-info {
  border-top-color: #d8e0e9;
  background: #ffffff;
  color: #26364a;
}

.photo-detail-byline { color: #536277; }
.photo-detail-byline i,
.photo-detail-copy i { color: #a0acba; }
.photo-detail-copy strong { color: #17283d; }
.photo-detail-copy span { color: #65758a; }

.photo-detail-info .photo-rule-edit {
  border-color: #98bce5;
  background: #edf5ff;
  color: #155fae;
}

.photo-detail-info .photo-rule-edit:hover {
  border-color: #4d8fd5;
  background: #dcecff;
  color: #0f559f;
}

.photo-detail-rejection {
  border-left-color: #dc554f;
  background: #fff2f1;
}

.photo-detail-rejection > span { color: #b13b36; }
.photo-detail-rejection > strong { color: #762722; }
.photo-detail-rejection > small { color: #8a5652; }

.photo-evidence-panel {
  border-left-color: #cfd9e4;
  background: #f6f8fb;
  color: #24364c;
}

.photo-evidence-panel-head {
  border-bottom-color: #d7e0ea;
  background: #ffffff;
}

.photo-evidence-panel-head strong { color: #17283d; }
.photo-evidence-panel-head small { color: #6f7f92; }

.photo-evidence-panel-icon {
  border-color: #a8c8ec;
  background: #e8f2fe;
  color: #156ac5;
}

.photo-evidence-panel-body { background: #f6f8fb; }

.photo-evidence-panel .photo-rule-mapping-editor {
  border-color: #cbd7e4;
  background: #ffffff;
}

.photo-evidence-panel .photo-rule-mapping-editor strong { color: #23364c; }
.photo-evidence-panel .photo-rule-mapping-editor small { color: #718096; }
.photo-evidence-panel .photo-rule-mapping-options {
  border-color: #b8c8d9;
  background: #ffffff;
  box-shadow: 0 12px 26px rgba(35, 55, 79, .16);
}
.photo-evidence-panel .photo-rule-mapping-editor .photo-rule-mapping-group-title { color: #59718b; }
.photo-evidence-panel .photo-rule-mapping-option { color: #263b53; }
.photo-evidence-panel .photo-rule-mapping-option:hover,
.photo-evidence-panel .photo-rule-mapping-option:focus-visible { background: #e5f1ff; color: #0f63bd; }
.photo-evidence-panel .photo-rule-mapping-search-empty { color: #b42318 !important; }

.photo-evidence-panel .photo-rule-mapping-intro.required {
  border-color: #f0a29c;
  background: #fff0ef;
}

.photo-evidence-panel .photo-rule-mapping-intro.required > span { color: #d92d20; }
.photo-evidence-panel .photo-rule-mapping-intro.required strong { color: #b42318; }
.photo-evidence-panel .photo-rule-mapping-intro.required small { color: #8f2d25; }

.photo-evidence-panel .photo-rule-readiness { border-top-color: #d5dee8; }

.photo-evidence-panel .photo-rule-readiness-summary > span.complete {
  background: #e4f5ea;
  color: #238450;
}

.photo-evidence-panel .photo-rule-readiness-summary > span.missing {
  background: #fff0d8;
  color: #ad690d;
}

.photo-evidence-panel .photo-rule-readiness-summary strong { color: #23364c; }
.photo-evidence-panel .photo-rule-readiness-summary small { color: #6f7f92; }
.photo-evidence-panel .photo-rule-legend { color: #718096; }

.photo-evidence-panel .photo-rule-readiness details,
.photo-evidence-panel .photo-rule-readiness-group {
  border-color: #d4dde7;
  background: #ffffff;
}

.photo-evidence-panel .photo-rule-readiness summary,
.photo-evidence-panel .photo-rule-readiness-group > header {
  border-bottom-color: #dde5ed;
  color: #2b3e54;
}

.photo-evidence-panel .photo-rule-readiness li { border-top-color: #e2e8ef; }
.photo-evidence-panel .photo-rule-readiness li strong { color: #34465a; }
.photo-evidence-panel .photo-rule-readiness li small,
.photo-evidence-panel .photo-rule-readiness li b,
.photo-evidence-panel .photo-rule-empty { color: #7d8b9c; }
.photo-evidence-panel .photo-rule-readiness.unmatched strong { color: #2b3e54; }
.photo-evidence-panel .photo-rule-readiness.unmatched small { color: #718096; }

.photo-detail-drawer .viewer-review-actions {
  border-top-color: #d5dee8;
  background: #ffffff;
}

.photo-detail-drawer .viewer-review-actions button {
  border-color: #c7d2de;
  background: #f7f9fb;
  color: #31445a;
  box-shadow: 0 1px 2px rgba(29, 49, 73, 0.05);
}

.photo-detail-drawer .viewer-review-actions button[data-viewer-review="approved"] {
  border-color: #80c79d;
  background: #eef9f2;
  color: #176c3e;
}

.photo-detail-drawer .viewer-review-actions button[data-viewer-review="rejected"] {
  border-color: #e0a09c;
  background: #fff2f1;
  color: #a53833;
}

.photo-detail-drawer .viewer-review-actions button[data-viewer-review="suspect"] {
  border-color: #e2bd7c;
  background: #fff8e9;
  color: #95600d;
}

.photo-detail-drawer .viewer-review-actions button:hover[data-viewer-review="approved"] {
  border-color: #43a96d;
  background: #def3e6;
}

.photo-detail-drawer .viewer-review-actions button:hover[data-viewer-review="rejected"] {
  border-color: #ca625c;
  background: #ffe4e2;
}

.photo-detail-drawer .viewer-review-actions button:hover[data-viewer-review="suspect"] {
  border-color: #c79031;
  background: #ffefc9;
}

.photo-detail-drawer .viewer-review-actions button.requires-rule-mapping {
  border-color: #e0a09c;
  background: #fff0ef;
  color: #b42318;
}

.photo-detail-drawer .viewer-review-actions button.requires-rule-mapping:hover {
  border-color: #ca625c;
  background: #ffe4e2;
  color: #9f312d;
}

.photo-detail-drawer .viewer-review-actions kbd {
  border-color: currentColor;
  background: rgba(255, 255, 255, 0.72);
  color: inherit;
  opacity: 0.72;
}

.photo-detail-drawer > .photo-filmstrip {
  border-top-color: #d4dde7;
  background: #eef2f6;
  scrollbar-color: #a6b3c2 transparent;
}

.photo-detail-drawer > .photo-filmstrip .photo-filmstrip-item {
  border-color: #b8c4d1;
  background: #ffffff;
}

.photo-detail-drawer > .photo-filmstrip .photo-filmstrip-item:hover { border-color: #5e9bdd; }

.photo-detail-drawer > .photo-filmstrip .photo-filmstrip-item.active {
  border-color: #ffffff;
  box-shadow: 0 0 0 3px #1677e8, 0 7px 18px rgba(32, 87, 180, 0.24);
}

/* Keep the standard photo detail surface light; fullscreen and annotation stay dark. */
.photo-detail-workspace,
.photo-detail-drawer,
.photo-detail-body {
  color-scheme: light;
}

.photo-detail-workspace {
  width: min(1060px, calc(100vw - 72px));
  border-color: #bcc8d5;
  background: #ffffff;
  box-shadow: 0 30px 82px rgba(19, 35, 56, 0.28), 0 0 0 1px rgba(255, 255, 255, 0.72);
}

.photo-detail-drawer {
  background: #ffffff;
  color: #26364a;
}

.photo-detail-head {
  border-bottom-color: #d3dce6;
  background: #ffffff;
}

.photo-detail-head h2 { color: #17283d; }
.photo-detail-head span,
.photo-position { color: #68788c; }

.photo-position b {
  border-color: #b7c4d2;
  background: #f1f4f7;
  color: #4c5d72;
}

.photo-detail-tools .icon-button,
.photo-detail-tools .photo-excellent-toggle {
  border-color: #c2ceda;
  background: #f7f9fb;
  color: #405168;
  box-shadow: 0 2px 6px rgba(31, 50, 74, 0.08);
}

.photo-detail-tools .icon-button:hover,
.photo-detail-tools .photo-excellent-toggle:hover:not(.is-ineligible):not(:disabled) {
  border-color: #75a9df;
  background: #e8f2ff;
  color: #155fae;
}

.photo-detail-tools .photo-excellent-toggle.is-excellent {
  border-color: #d96b81;
  background: #fff0f3;
  color: #c63755;
}

.photo-detail-body { background: #e8edf3; }

.photo-detail-drawer:not(.editing) .photo-detail-image {
  border-color: rgba(174, 191, 209, 0.48);
  background: #172433;
  box-shadow:
    0 12px 28px rgba(17, 31, 48, 0.18),
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    inset 0 0 36px rgba(2, 8, 15, 0.32);
}

@media (min-width: 768px) {
  .photo-detail-overlay {
    padding: 16px;
  }

  .photo-detail-workspace {
    height: min(700px, calc(100dvh - 32px));
  }

  .photo-detail-head {
    min-height: 50px;
    padding: 6px 10px;
  }

  .photo-detail-drawer:not(.editing) .photo-detail-body {
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
  }

  .photo-detail-drawer:not(.editing) .photo-detail-image {
    width: calc(100% - 28px);
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
    flex: none;
    margin: 10px 14px 8px;
    border: 1px solid rgba(174, 191, 209, 0.48);
    border-radius: 8px;
  }

  .photo-detail-drawer:not(.editing) .photo-detail-info {
    min-height: 0;
    max-height: min(32dvh, 220px);
    flex: 0 0 auto;
  }

  .photo-detail-drawer:not(.editing) .viewer-review-actions {
    padding: 6px 10px 8px;
  }

  .photo-detail-drawer:not(.editing) .viewer-review-actions button {
    min-height: 44px;
  }

  .photo-detail-drawer:not(.editing) > .photo-filmstrip {
    padding: 6px 10px;
  }

  .photo-detail-drawer:not(.editing) > .photo-filmstrip .photo-filmstrip-item {
    width: 68px;
    height: 50px;
  }
}

.photo-detail-drawer:not(.editing) .photo-detail-info {
  background: #ffffff;
}

.photo-detail-drawer:not(.editing) .photo-detail-body {
  background: #ffffff;
}

.photo-detail-drawer:not(.editing) .photo-detail-image-tools {
  z-index: 3;
  border-color: rgba(174, 188, 203, 0.92);
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 10px 26px rgba(35, 55, 79, 0.16);
}

.photo-detail-drawer:not(.editing) .photo-detail-image-tools .icon-button {
  border-color: #bbc8d5;
  background: #ffffff;
  color: #405168;
  box-shadow: 0 1px 3px rgba(31, 50, 74, 0.08);
}

.photo-detail-drawer:not(.editing) .photo-detail-image-tools .icon-button:hover,
.photo-detail-drawer:not(.editing) .photo-detail-image-tools .icon-button.active {
  border-color: #438bd5;
  background: #e5f1ff;
  color: #0f63bd;
}

.photo-detail-drawer.editing .photo-detail-body { color-scheme: dark; }

@media (max-width: 767px) {
  .photo-detail-workspace {
    width: calc(100vw - 16px);
  }

  .photo-detail-workspace > .photo-evidence-panel,
  .photo-detail-workspace > .viewer-reject-panel {
    border-top-color: #cfd9e4;
  }
}

.rule-config-notice.warning {
  border-color: #d7dee7;
  border-left-color: #d84a42;
  background: #ffffff;
  color: #4c5d72;
}

.rule-config-notice.warning svg,
.rule-config-notice.warning strong {
  color: #b82f2a;
}

.rule-config-notice.warning small {
  color: #5f6f82;
}

/* Soften the navigation rail against the white operational workspace. */
.sidebar {
  border-right-color: #34485d;
  background: #223142;
  box-shadow: 7px 0 22px rgba(27, 47, 76, 0.13);
}

.sidebar .brand {
  border-bottom-color: #34485d;
  background: #223142;
  cursor: pointer;
  transition: background-color 160ms ease, box-shadow 160ms ease;
}

.sidebar .brand:hover {
  background: #2a3b4e;
  box-shadow: inset 0 -1px rgba(126, 183, 244, 0.16);
}

.sidebar .brand:focus-visible {
  position: relative;
  z-index: 1;
  box-shadow: 0 0 0 3px rgba(126, 183, 244, 0.34), inset 0 -1px rgba(126, 183, 244, 0.16);
}

.sidebar .brand-copy {
  display: grid;
  align-content: center;
  gap: 1px;
}

.sidebar .brand-copy strong {
  font-size: 17px;
  line-height: 20px;
  letter-spacing: 0.02em;
}

.sidebar .brand-copy span {
  font-size: 10px;
  line-height: 15px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.sidebar .brand-copy strong { color: #f7f9fc; }
.sidebar .brand-copy span,
.sidebar .sidebar-footer { color: #a9b7c7; }

.sidebar .primary-nav a { color: #c0cad6; }

.sidebar .primary-nav a:hover {
  border-color: #49647f;
  background: #2b3d50;
  color: #ffffff;
}

.sidebar .primary-nav a.active {
  border-color: #5d8fc4;
  background: #2c4b6a;
  color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(126, 183, 244, 0.11), 0 4px 12px rgba(13, 29, 48, 0.14);
}

.sidebar .nav-count {
  border-color: #52677d;
  background: #314356;
  color: #e1e8f0;
}

.sidebar .nav-count.warning {
  border-color: #8b6b35;
  background: #554225;
  color: #ffe0a7;
}

.sidebar .sidebar-footer { border-top-color: #34485d; }

.sidebar .sidebar-toggle {
  border-color: #465b71;
  background: #293a4c;
  color: #c6d0dc;
}

.sidebar .sidebar-toggle:hover {
  border-color: #6a9dd2;
  background: #31506e;
  color: #ffffff;
}

/* 2026-07-27 UX audit: responsive ergonomics and information clarity. */

.surface,
.metrics-strip,
.summary-band,
.audit-project-header,
.followup-table-wrap,
.project-archive-list,
.dashboard-dimension,
.dashboard-risk-panel,
.dashboard-health-panel,
.dashboard-chart-panel,
.dashboard-photographer-panel,
.dashboard-aging-panel,
.gantt-panel,
.rule-library,
.rule-project-scope,
.engine-events-panel,
.import-management,
.import-history,
.user-management,
.empty-state {
  box-shadow: none;
}

.section-head p,
.cell-sub,
.fact-cell span,
.event-row span,
.project-archive-identity small,
.project-latest small,
.project-material-progress small,
.process-rule-title span,
.process-rule-content > p,
.process-rule-meta > span:not(.badge),
.rule-profile-summary span,
.rule-profile-summary small,
.dashboard-command-stats span,
.dashboard-command-stats small,
.dashboard-footnote,
.dashboard-list-foot,
.dashboard-health-note {
  font-size: 11px;
  line-height: 17px;
}

.data-table th,
.data-table td,
.followup-table th,
.followup-table td,
.photo-card,
.project-archive-row,
.process-rule-row {
  font-size: 12px;
}

.button:focus-visible,
.icon-button:focus-visible,
.segmented button:focus-visible,
.audit-project-tab:focus-visible,
.project-archive-row:focus-visible,
.settings-nav button:focus-visible,
.process-rule-details summary:focus-visible {
  outline: 0;
  box-shadow: var(--focus);
}

.audit-project-tab.active,
.project-archive-row.is-current,
.project-archive-row.is-current:hover {
  border-color: #4f91d8;
  box-shadow: inset 5px 0 0 #1677e8, inset 0 0 0 2px rgba(22, 119, 232, .24), 0 6px 16px rgba(31, 75, 124, .12);
}

.project-archive-row .project-rule-mini.named-rules {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}

.project-archive-columns > span {
  text-align: center;
}

.project-archive-row .project-rule-mini.named-rules > span {
  min-height: 34px;
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  place-items: initial;
  align-items: center;
  gap: 5px;
  padding: 3px 6px;
  text-align: center;
}

.project-archive-row .project-rule-mini.named-rules b {
  overflow: hidden;
  color: var(--ink-strong);
  font-size: 10px;
  font-weight: 620;
  line-height: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-archive-row .project-rule-mini.named-rules small {
  color: var(--muted-2);
  font-size: 9px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  line-height: 12px;
  text-align: right;
  white-space: nowrap;
}

.project-archive-row .project-rule-mini.named-rules .partial small { color: #8a5b13; }
.project-archive-row .project-rule-mini.named-rules .complete small { color: #236a48; }

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

.project-archive-material-summary {
  display: grid;
  min-width: 0;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  align-items: center;
  gap: 2px;
}

.project-archive-material-summary .project-material-metric {
  grid-column: 1;
  grid-row: 1;
  min-width: 0;
  margin: 0;
  text-align: center;
}

.project-archive-material-summary .project-material-metric strong {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--ink);
  font-size: 12px;
  line-height: 15px;
}

.project-archive-material-summary .project-material-metric small {
  margin: 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 12px;
}

.project-archive-material-summary > .project-archive-material-meter {
  grid-column: 1;
  grid-row: 2;
  width: min(100%, 104px);
  min-width: 0;
  margin: 0 auto;
}

.project-archive-row .project-archive-identity strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 18px;
  text-overflow: ellipsis;
  white-space: normal;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.archive-detail-rule-summary {
  min-width: 0;
  padding-top: 2px;
}

.archive-detail-progress-head {
  grid-template-columns: minmax(0, 1fr);
  margin-bottom: 5px;
}

.archive-detail-progress-head .audit-overall-progress {
  width: 100%;
}

.archive-detail-material-summary {
  display: grid;
  min-height: 96px;
  grid-template-rows: minmax(0, 1fr) auto;
  align-content: center;
  gap: 6px;
}

.archive-detail-material-summary .audit-material-data {
  grid-template-rows: 28px 14px;
}

.archive-detail-material-summary .audit-material-progress {
  width: min(100%, 184px);
  margin: 0 auto;
}

.archive-detail-overdue {
  color: var(--muted);
  font-size: 10px;
  line-height: 14px;
  text-align: center;
}

.archive-process-cloud {
  position: relative;
  height: clamp(260px, 36vh, 360px);
  min-height: 260px;
  overflow: hidden;
  padding: 34px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eaf2f6;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.archive-process-cloud-heading,
.archive-health-panel-heading {
  position: absolute;
  z-index: 2;
  top: 10px;
  left: 12px;
  color: #42566b;
  font-size: 12px;
  font-weight: 760;
  line-height: 16px;
}

.archive-process-cloud-back {
  position: absolute;
  z-index: 3;
  top: 6px;
  right: 8px;
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  gap: 4px;
  padding: 0 7px;
  border: 1px solid var(--line-strong);
  border-radius: 4px;
  background: var(--surface);
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
  cursor: pointer;
}

.archive-process-cloud-back:hover,
.archive-process-cloud-back:focus-visible {
  border-color: var(--blue);
  box-shadow: var(--focus);
  outline: 0;
}

.archive-process-cloud-back svg { width: 12px; height: 12px; }

.archive-process-cloud-canvas {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

.archive-process-cloud-tile {
  container-type: size;
  position: absolute;
  top: calc(var(--tile-y) + 3px);
  left: calc(var(--tile-x) + 3px);
  width: calc(var(--tile-w) - 6px);
  height: calc(var(--tile-h) - 6px);
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-content: stretch;
  justify-items: stretch;
  gap: 2px;
  min-width: 0;
  padding: 4px 5px;
  overflow: hidden;
  border: 1px solid var(--tile-border, transparent);
  border-radius: 5px;
  background: linear-gradient(145deg, var(--tile-highlight, #7cc8f4), var(--tile-bg, #1281d3) 72%);
  -webkit-backdrop-filter: blur(12px) saturate(1.18);
  backdrop-filter: blur(12px) saturate(1.18);
  box-shadow: 0 5px 14px rgba(25, 67, 94, .08), inset 0 1px 0 rgba(255, 255, 255, .48), inset 0 -1px 0 rgba(17, 54, 79, .08);
  color: var(--tile-color, #f7fcff);
  text-align: center;
  transition: border-color 130ms ease, box-shadow 130ms ease, filter 130ms ease;
}

button.archive-process-cloud-tile {
  cursor: pointer;
}

.archive-process-cloud-tile.is-empty {
  cursor: default;
  filter: saturate(.72);
}

.archive-process-cloud-content {
  display: grid;
  width: 100%;
  height: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  align-content: center;
  justify-items: stretch;
  gap: 2px;
}

.archive-process-cloud-tile.is-horizontal .archive-process-cloud-content {
  grid-template-columns: minmax(0, 1fr) auto;
  align-content: center;
  align-items: center;
  gap: 6px;
}

.archive-process-cloud-tile.is-horizontal strong {
  grid-column: 1;
  grid-row: 1;
}

.archive-process-cloud-tile.is-horizontal small {
  width: auto;
  min-width: max-content;
  grid-column: 2;
  grid-row: 1;
  padding: 0 2px;
}

.archive-process-cloud-tile strong {
  display: flex;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  flex-direction: column;
  align-items: stretch;
  overflow: visible;
  justify-self: stretch;
  color: currentColor;
  font-size: var(--tile-size, 12px);
  font-size: max(6px, min(var(--tile-size, 12px), var(--tile-width-fit, 12px), var(--tile-height-fit, 12px)));
  line-height: 1.16;
  text-align: center;
}

.archive-process-cloud-tile strong span {
  display: block;
  width: 100%;
  max-width: 100%;
  text-align: center;
  white-space: nowrap;
}

.archive-process-cloud-tile small {
  display: block;
  width: 100%;
  min-width: 0;
  justify-self: stretch;
  overflow: visible;
  color: var(--tile-number-color, currentColor);
  font-size: var(--tile-number-size, 10px);
  font-size: max(6px, min(var(--tile-number-size, 10px), 28cqh));
  font-weight: 780;
  line-height: 1.15;
  text-align: center;
  white-space: nowrap;
}

@container (max-height: 24px) {
  .archive-process-cloud-tile small {
    display: none;
  }

  .archive-process-cloud-tile.is-horizontal small {
    display: block;
  }
}

.archive-process-cloud-tile:hover,
.archive-process-cloud-tile:focus-visible {
  z-index: 4;
  border-color: var(--tile-focus, #8be3ff);
  box-shadow: 0 0 0 2px var(--tile-glow, rgba(22, 119, 232, .16)), 0 7px 18px rgba(25, 67, 94, .12), inset 0 1px 0 rgba(255, 255, 255, .56);
  filter: saturate(1.16) brightness(1.03);
  outline: 0;
}

.archive-process-cloud-empty {
  display: grid;
  height: 100%;
  place-items: center;
  color: var(--muted);
  font-size: 11px;
}

@media (max-width: 767px) {
  .archive-process-cloud {
    height: clamp(280px, 50vh, 400px);
  }

  .archive-process-cloud-tile {
    padding: 3px 4px;
  }

  .archive-process-cloud-tile strong {
    font-size: var(--tile-size, 12px);
    font-size: max(6px, min(var(--tile-size, 12px), 12px, var(--tile-width-fit, 12px), var(--tile-height-fit, 12px)));
  }
}

.archive-health-radar-wrap {
  display: grid;
  min-height: 214px;
  grid-template-columns: minmax(0, 1fr) 76px;
  align-items: center;
  gap: 3px;
}

.archive-health-radar {
  min-width: 0;
}

.archive-health-radar svg {
  display: block;
  width: 100%;
  height: 194px;
  overflow: visible;
}

.archive-health-radar-grid polygon {
  fill: none;
  stroke: #c8d7e7;
  stroke-width: 1;
}

.archive-health-radar-axes line {
  stroke: #dbe4ee;
  stroke-width: 1;
}

.archive-health-radar-value {
  fill: rgba(22, 119, 232, .2);
  stroke: #1677e8;
  stroke-width: 2;
  stroke-linejoin: round;
}

.archive-health-radar text {
  fill: #526174;
  font-size: 10px;
  font-weight: 700;
}

.archive-summary-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.archive-summary-band > button {
  display: flex;
  min-width: 0;
  height: 44px;
  min-height: 0 !important;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 4px 7px !important;
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: inherit;
  font-family: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 130ms ease, box-shadow 130ms ease;
}

.archive-summary-band > button:last-child {
  border-right: 0;
}

.archive-summary-band > button:hover {
  background: #f3f7fb;
}

.archive-summary-band > button:active {
  background: #eaf2fb;
}

.archive-summary-band > button:focus-visible {
  z-index: 1;
  outline: 0;
  box-shadow: inset 0 0 0 2px #7eafe7;
}

.archive-summary-band span {
  min-width: 0;
  font-size: 12px;
  font-weight: 600;
  line-height: 14px;
  white-space: nowrap;
}

.archive-summary-band strong {
  min-width: 0;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 22px;
  white-space: nowrap;
}

.archive-summary-band strong .archive-stat-total {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

.archive-summary-band strong .archive-stat-unit {
  color: var(--muted);
  font-size: 10px;
  font-weight: 600;
}

@media (max-width: 767px) {
  .archive-summary-band {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .archive-summary-band > button {
    height: 40px;
    min-height: 0 !important;
    gap: 4px;
    padding: 4px 3px !important;
    border-right: 1px solid var(--line);
    border-top: 0 !important;
  }

  .archive-summary-band > button:last-child { border-right: 0; }

  .archive-summary-band span {
    font-size: 9px;
    line-height: 13px;
  }

  .archive-summary-band strong {
    font-size: 17px;
    line-height: 19px;
  }

  .archive-summary-band strong .archive-stat-unit {
    font-size: 9px;
  }
}

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

.archive-process-cloud {
  height: clamp(320px, 42vh, 460px);
}

.archive-health-radar-wrap {
  grid-template-columns: minmax(300px, 1fr) 120px;
}

@media (max-width: 767px) {
  .archive-process-cloud {
    height: clamp(300px, 45vh, 420px);
  }

  .archive-health-radar-wrap {
    grid-template-columns: minmax(0, 1fr) 88px;
  }
}

.archive-overview-grid {
  display: grid;
  width: 100%;
  min-width: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  align-items: stretch;
}

.site-detail-updated {
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  line-height: 18px;
  white-space: nowrap;
}

.project-archive-title-row {
  flex-wrap: nowrap;
  gap: 8px;
  min-height: 30px;
}

.project-archive-title-row h1 {
  overflow: hidden;
  color: var(--ink);
  font-size: 19px;
  font-weight: 720;
  line-height: 24px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-archive-back {
  display: inline-flex;
  flex: 0 0 auto;
  min-height: 26px;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--blue);
  font-size: 11px;
  font-weight: 650;
  line-height: 16px;
  cursor: pointer;
}

.project-archive-back:hover,
.project-archive-back:focus-visible {
  background: var(--blue-soft);
  outline: 0;
}

.project-archive-back svg,
.project-status-action svg {
  width: 13px;
  height: 13px;
}

.project-archive-title-divider {
  width: 1px;
  height: 16px;
  flex: 0 0 auto;
  background: var(--line-strong);
}

.project-archive-title-row > .badge {
  flex: 0 0 auto;
  min-height: 20px;
  padding: 2px 6px;
  font-size: 10px;
  line-height: 14px;
}

.project-archive-title-row .project-status-action {
  min-height: 28px;
  gap: 4px;
  padding: 0 8px;
  font-size: 11px;
  line-height: 16px;
}

@media (max-width: 767px) {
  .project-archive-title-row {
    flex-wrap: wrap;
    gap: 6px 8px;
  }

  .project-archive-title-row h1 {
    max-width: calc(100vw - 150px);
    font-size: 18px;
  }

  .project-archive-back,
  .project-archive-title-row .project-status-action {
    min-height: 44px;
  }
}

.tabs.project-archive-tabs {
  width: fit-content;
  max-width: calc(100% - 40px);
  min-height: 36px;
  align-items: center;
  gap: 2px;
  margin: 8px 20px 0;
  padding: 3px;
  overflow-x: auto;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #e7ecf2;
  box-shadow: inset 0 1px 2px rgba(31, 50, 74, .05);
  scrollbar-width: none;
}

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

.tabs.project-archive-tabs button {
  position: static;
  flex: 0 0 auto;
  min-width: 0;
  min-height: 28px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #59687b;
  font-size: 12px;
  font-weight: 550;
  line-height: 18px;
  white-space: nowrap;
}

.tabs.project-archive-tabs button:hover:not(.active) {
  border-color: #a9bdd4;
  background: #f7f9fc;
  color: #27415f;
}

.tabs.project-archive-tabs button.active {
  border-color: #7eafe7;
  background: #ffffff;
  color: #0e5cae;
  font-weight: 700;
  box-shadow: 0 3px 9px rgba(22, 119, 232, .13), inset 0 0 0 1px rgba(22, 119, 232, .06);
}

.tabs.project-archive-tabs button.active::after {
  display: none;
}

@media (max-width: 767px) {
  .tabs.project-archive-tabs {
    max-width: calc(100% - 24px);
    margin-right: 12px;
    margin-left: 12px;
  }

  .tabs.project-archive-tabs button {
    min-height: 38px;
    padding: 0 10px;
  }
}

.archive-overview-grid > .archive-section {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}

.archive-process-cloud,
.archive-health-radar-wrap {
  height: clamp(300px, calc(100svh - 340px), 540px);
  min-height: 300px;
}

.archive-health-radar-wrap {
  grid-template-columns: minmax(0, 1fr) 96px;
}

.archive-process-card .archive-process-cloud {
  width: 100%;
  height: max(334px, calc(100dvh - 267px));
  min-height: 334px;
}

.archive-process-card {
  display: flex;
  align-items: center;
  padding: 14px;
}

.archive-health-card {
  display: flex;
  align-items: center;
  padding: 14px;
}

.archive-health-panel {
  position: relative;
  width: 100%;
  height: max(334px, calc(100dvh - 267px));
  min-height: 334px;
  padding: 34px 12px 12px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(234, 242, 246, .88);
  -webkit-backdrop-filter: blur(12px) saturate(1.12);
  backdrop-filter: blur(12px) saturate(1.12);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .74);
}

.archive-health-card .archive-health-radar-wrap {
  width: 100%;
  height: 100%;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.archive-health-card .archive-health-radar {
  display: grid;
  height: 100%;
  min-width: 0;
  min-height: 0;
  place-items: center;
}

.archive-health-card .archive-health-radar svg {
  width: 100%;
  height: 100%;
  max-width: 540px;
  max-height: 460px;
  margin: auto;
}

.archive-health-card .archive-health-radar text {
  font-size: 9px;
}

.archive-health-card .archive-health-radar-percent {
  fill: #1677e8;
  font-weight: 800;
}

.archive-health-radar-label {
  cursor: pointer;
  outline: 0;
}

.archive-health-radar-label text {
  transition: fill 120ms ease;
}

.archive-health-radar-label:hover text,
.archive-health-radar-label:focus-visible text {
  fill: #135fbd;
}

.archive-health-radar-point-hit {
  fill: transparent;
  pointer-events: all;
}

.archive-health-radar-point-dot {
  fill: #ffffff;
  stroke: #1677e8;
  stroke-width: 2;
  pointer-events: none;
  transition: r 120ms ease, fill 120ms ease;
}

.archive-health-radar-point:hover .archive-health-radar-point-dot {
  r: 5px;
  fill: #d9ecff;
}

.archive-health-radar-tooltip {
  position: absolute;
  z-index: 5;
  display: grid;
  max-width: 190px;
  gap: 2px;
  padding: 7px 9px;
  border: 1px solid rgba(121, 174, 221, .34);
  border-radius: 6px;
  background: rgba(21, 45, 68, .92);
  box-shadow: 0 8px 24px rgba(17, 43, 65, .18);
  color: #f7fbff;
  pointer-events: none;
}

.archive-health-radar-tooltip[hidden] {
  display: none;
}

.archive-health-radar-tooltip strong {
  font-size: 11px;
  line-height: 15px;
}

.archive-health-radar-tooltip span {
  color: rgba(247, 251, 255, .76);
  font-size: 9px;
  line-height: 13px;
}

.archive-overview-body {
  padding-top: 8px;
  padding-bottom: 0;
}

.archive-overview-body .archive-summary-band {
  margin-bottom: 8px;
}

.archive-overview-body .archive-overview-grid {
  gap: 8px;
}

@media (max-width: 767px) {
  .archive-overview-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .archive-process-cloud,
  .archive-health-radar-wrap {
    height: clamp(300px, calc(100svh - 300px), 460px);
    min-height: 300px;
  }

  .archive-health-radar-wrap {
    grid-template-columns: minmax(0, 1fr) 88px;
  }

  .archive-process-card .archive-process-cloud {
    height: calc(clamp(300px, calc(100svh - 300px), 460px) + 34px);
    min-height: 334px;
  }

  .archive-health-panel {
    height: calc(clamp(300px, calc(100svh - 300px), 460px) + 34px);
    min-height: 334px;
  }

  .archive-health-card .archive-health-radar-wrap {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    gap: 0;
  }

  .archive-health-card .archive-health-radar svg {
    max-width: 420px;
    max-height: 360px;
  }
}

.dashboard-dimensions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.dashboard-dimension {
  border: 0;
  border-right: 1px solid var(--line);
  border-radius: 0;
  background: #ffffff;
}

.dashboard-dimension:last-child { border-right: 0; }
.dashboard-dimension:hover { background: #f7faff; }

.rule-governance-warning {
  padding-top: 10px;
  padding-bottom: 10px;
}

.rule-project-scope {
  min-height: 70px;
  margin-bottom: 12px;
}

.process-rule-row {
  min-height: 92px;
  align-items: start;
}

.process-rule-content > p {
  margin-bottom: 7px;
}

.process-rule-details {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #ffffff;
}

.process-rule-details summary {
  display: grid;
  min-height: 36px;
  grid-template-columns: minmax(0, 1fr) auto 18px;
  align-items: center;
  gap: 10px;
  padding: 7px 9px;
  color: #33465c;
  cursor: pointer;
  list-style: none;
}

.process-rule-details summary::-webkit-details-marker { display: none; }
.process-rule-details summary:hover { background: #f4f8fc; }
.process-rule-details summary span { font-size: 11px; font-weight: 700; }
.process-rule-details summary b { color: var(--muted); font-size: 10px; font-weight: 600; }
.process-rule-details summary svg { width: 15px; transition: transform 150ms ease; }
.process-rule-details[open] summary { border-bottom: 1px solid var(--line); background: #f7f9fb; }
.process-rule-details[open] summary svg { transform: rotate(180deg); }

.process-rule-detail-body {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(220px, .7fr);
  gap: 14px;
  padding: 10px;
}

.process-rule-content .process-rule-detail-body ol {
  margin: 0;
}

.process-rule-step-groups,
.process-rule-step-group {
  display: grid;
  align-content: start;
  gap: 8px;
}

.process-rule-step-group > strong {
  color: #33465c;
  font-size: 11px;
}

.process-rule-content .process-rule-detail-body li {
  font-size: 11px;
  line-height: 17px;
}

.process-rule-content .process-rule-detail-body li small {
  font-size: 10px;
  line-height: 15px;
}

.process-rule-materials {
  display: grid;
  align-content: start;
  gap: 6px;
}

.process-rule-materials > strong { font-size: 11px; }
.process-rule-materials > span {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 1px 6px;
  padding: 6px 7px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #f8fafc;
}
.process-rule-materials svg { width: 14px; color: var(--blue); }
.process-rule-materials b { font-size: 10px; }
.process-rule-materials small { grid-column: 2; color: var(--muted); font-size: 10px; line-height: 15px; }
.process-rule-materials .empty { display: block; color: var(--muted); font-size: 11px; }

.settings-nav {
  position: sticky;
  z-index: 8;
  top: 0;
  display: flex;
  gap: 4px;
  margin-bottom: 12px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 5px 14px rgba(31, 50, 74, .08);
  backdrop-filter: blur(14px);
}

.settings-nav button {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 7px;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #5b6a7e;
  font-size: 12px;
  font-weight: 680;
}

.settings-nav button:hover { background: #f1f6fc; color: #174f8a; }
.settings-nav button.active { border-color: #83afe0; background: #e8f2ff; color: #0e5cae; }
.settings-nav svg { width: 15px; }
.settings-section > .surface,
.settings-section > .import-management { margin-bottom: 0; }
.settings-empty-state { display: grid; min-height: 180px; place-items: center; align-content: center; gap: 7px; color: var(--muted); }
.settings-empty-state svg { width: 28px; color: var(--green); }
.settings-empty-state strong { color: var(--ink); }
.settings-empty-state span { font-size: 11px; }

.permission-management {
  overflow: hidden;
}

.permission-management-body {
  display: grid;
  min-height: 560px;
  grid-template-columns: 236px minmax(0, 1fr);
  border-top: 1px solid var(--line);
}

.permission-group-list {
  display: grid;
  align-content: start;
  gap: 3px;
  padding: 10px;
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.permission-group-row {
  display: grid;
  min-width: 0;
  min-height: 58px;
  grid-template-columns: 30px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.permission-group-row:hover {
  background: #eef4fb;
}

.permission-group-row.active {
  border-color: #a9c7e8;
  background: #e8f2ff;
  color: #174f8a;
}

.permission-group-row > span:nth-child(2),
.permission-group-row strong,
.permission-group-row small {
  display: block;
  min-width: 0;
}

.permission-group-row strong {
  overflow: hidden;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.permission-group-row small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.permission-group-row > b {
  padding: 2px 4px;
  border-radius: 3px;
  background: #dcecff;
  color: #1d5f9f;
  font-size: 9px;
}

.permission-group-row-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid #cdd9e7;
  border-radius: 5px;
  background: #fff;
  color: var(--blue);
}

.permission-group-row-icon svg {
  width: 15px;
}

.permission-group-editor {
  min-width: 0;
  padding: 14px 16px 16px;
}

.permission-editor-head,
.permission-scope-head,
.permission-editor-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.permission-editor-head h3,
.permission-scope-head h3,
.permission-subgroup h4 {
  margin: 0;
}

.permission-editor-head h3 {
  margin-top: 2px;
  font-size: 16px;
  line-height: 22px;
}

.permission-editor-kicker {
  color: var(--blue);
  font-size: 10px;
  font-weight: 700;
}

.permission-editor-fields {
  display: grid;
  grid-template-columns: minmax(180px, .65fr) minmax(260px, 1.35fr);
  gap: 12px;
  margin-top: 13px;
}

.permission-editor-fields .form-field > label small {
  color: var(--muted);
  font-weight: 500;
}

.permission-scope {
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.permission-scope-head {
  margin-bottom: 9px;
}

.permission-scope-head h3 {
  font-size: 13px;
  line-height: 19px;
}

.permission-scope-head p {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.permission-option-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 5px 8px;
}

.permission-option {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 20px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid #dce3ec;
  border-radius: 4px;
  background: #fbfcfe;
  cursor: pointer;
}

.permission-option:hover {
  border-color: #b6cae1;
  background: #f4f8fd;
}

.permission-option:has(input:disabled) {
  cursor: default;
}

.permission-option:has(input:disabled):hover {
  border-color: #dce3ec;
  background: #fbfcfe;
}

.permission-option:has(input:disabled):has(input:checked):hover {
  border-color: #9abce1;
  background: #edf5ff;
}

.permission-option:has(input:checked) {
  border-color: #9abce1;
  background: #edf5ff;
}

.permission-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.permission-option-check {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 1px solid #aebdce;
  border-radius: 4px;
  background: #fff;
  color: transparent;
}

.permission-option input:checked + .permission-option-check {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.permission-option input:focus-visible + .permission-option-check {
  outline: 2px solid #8bb9e9;
  outline-offset: 2px;
}

.permission-option-check svg {
  width: 13px;
}

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

.permission-option-copy strong {
  font-size: 11px;
  line-height: 16px;
}

.permission-option-copy small {
  margin-top: 1px;
  color: var(--muted);
  font-size: 9px;
  line-height: 14px;
}

.permission-action-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px 18px;
}

.permission-subgroup h4 {
  margin-bottom: 5px;
  color: #53667c;
  font-size: 10px;
  line-height: 15px;
}

.permission-editor-foot {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
}

.permission-editor-foot > div:first-child {
  min-width: 0;
}

.permission-editor-foot .form-message {
  margin: 0 0 3px;
}

.permission-editor-foot small {
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
}

.access-control-management {
  overflow: hidden;
}

.access-control-head {
  display: flex;
  min-height: 86px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(100deg, #f7faff, #f0f6fc);
}

.access-control-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-width: 0;
}
.access-control-head-actions .inline-actions { flex-wrap: nowrap; }
.access-control-head-actions .button { white-space: nowrap; }

.access-control-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  line-height: 24px;
}

.access-control-head p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 17px;
}

.access-control-stats {
  display: flex;
  align-items: center;
  gap: 6px;
}

.access-control-stats span {
  display: inline-flex;
  min-height: 38px;
  align-items: baseline;
  gap: 4px;
  padding: 7px 10px;
  border: 1px solid #d5e1ee;
  border-radius: 5px;
  background: rgba(255, 255, 255, .84);
  color: var(--muted);
  font-size: 10px;
}

.access-control-stats strong {
  color: var(--ink);
  font-size: 17px;
}

.access-control-nav {
  display: flex;
  gap: 4px;
  padding: 7px 12px;
  border-bottom: 1px solid var(--line);
  background: #fbfcfe;
}

.access-control-nav button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  gap: 7px;
  padding: 0 11px;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: #607187;
  font-size: 11px;
  font-weight: 680;
}

.access-control-nav button:hover { background: #eef4fa; color: #174f8a; }
.access-control-nav button.active { border-color: #9bbce0; background: #e8f2ff; color: #0e5cae; }
.access-control-nav svg { width: 14px; }
.access-control-nav b {
  min-width: 19px;
  padding: 1px 5px;
  border-radius: 9px;
  background: #e5ebf2;
  color: #617287;
  font-size: 9px;
  text-align: center;
}
.access-control-nav button.active b { background: #cfe4fb; color: #0e5cae; }

.access-control-content {
  min-height: min(590px, calc(100dvh - 300px));
}

.access-subview > .section-head {
  min-height: 72px;
  margin: 0;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.access-subview > .section-head h2 { font-size: 15px; }
.access-subview > .section-head p { font-size: 10px; line-height: 16px; }
.access-control-management .user-management { margin-bottom: 0; }
.access-control-management .permission-management-body { border-top: 0; }

.access-entity-list {
  display: grid;
  gap: 0;
}

.access-entity-row {
  display: grid;
  min-width: 0;
  min-height: 78px;
  grid-template-columns: 36px minmax(210px, 1.4fr) minmax(180px, .8fr) 76px auto;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}

/* Roles have a fixed information hierarchy: identity, permission group,
   member count, then actions. Stable tracks keep long role names from
   pushing the action area out of alignment with neighboring rows. */
.role-management .access-entity-row {
  grid-template-columns: 36px minmax(250px, 1.6fr) minmax(210px, 1fr) 76px minmax(168px, auto);
}
.role-management .access-entity-copy,
.role-management .access-entity-policy,
.role-management .access-entity-members,
.role-management .access-entity-row > .inline-actions { min-width: 0; }
.role-management .access-entity-row > .inline-actions { justify-content: flex-end; }
.role-management .access-entity-row > .inline-actions .button { flex: 0 0 auto; }

.access-entity-row:last-child { border-bottom: 0; }
.access-entity-row:hover { background: #f8fbfe; }

.access-entity-icon {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid #cddbeb;
  border-radius: 5px;
  background: #edf5ff;
  color: var(--blue);
}

.access-entity-icon svg { width: 16px; }
.access-entity-copy,
.access-entity-policy { min-width: 0; }
.access-entity-copy > div { display: flex; align-items: center; gap: 7px; }
.access-entity-copy strong { font-size: 12px; }
.access-entity-copy p {
  overflow: hidden;
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 15px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.access-entity-policy,
.access-entity-members {
  display: grid;
  gap: 2px;
}

.access-entity-policy small,
.access-entity-members small { color: var(--muted); font-size: 9px; }
.access-entity-policy strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.access-entity-policy span { color: var(--muted); font-size: 10px; }
.access-entity-members strong { font-size: 16px; }

.access-source-list {
  display: flex !important;
  max-width: 420px;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 4px;
}

.access-source-chip {
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  padding: 2px 5px;
  border: 1px solid #dae3ed;
  border-radius: 3px;
  background: #f5f8fb;
  color: #5b6d82;
  font-size: 9px;
  line-height: 14px;
}

.access-source-chip b { color: #1c67aa; }
.access-control-management .user-table { min-width: 1120px; }
.access-entity-modal .textarea { min-height: 78px; resize: vertical; }
.user-status-toggle { min-width: 62px; }
.user-status-toggle.is-enabled { border-color: #e4b2ad; background: #fff7f6; color: #a93632; }
.user-status-toggle.is-enabled:hover { border-color: #d98b84; background: #fdebea; color: #8f2e2b; }
.user-status-toggle.is-disabled { border-color: #a8d4b8; background: #f0faf3; color: #287d55; }
.user-status-toggle.is-disabled:hover { border-color: #7ebc96; background: #e5f4ea; color: #1d704b; }
.user-status-toggle svg { width: 13px; }

.password-input-wrap { position: relative; display: flex; align-items: center; }
.password-input-wrap .input { padding-right: 40px; }
.password-toggle { position: absolute; right: 8px; display: grid; width: 28px; height: 28px; place-items: center; border: 0; border-radius: 6px; background: transparent; color: var(--muted); cursor: pointer; }
.password-toggle:hover { background: rgba(49, 111, 186, 0.08); color: var(--blue); }
.password-toggle svg { width: 15px; }

.ai-settings-panel { min-width: 0; }
.ai-settings-panel > .section-head { min-height: 76px; }
.ai-settings-form { display: grid; gap: 16px; padding: 16px 18px 18px; }
.ai-engine-toggle {
  display: grid;
  min-height: 58px;
  grid-template-columns: 34px 1fr;
  align-items: center;
  column-gap: 11px;
  padding: 11px 13px;
  border: 1px solid #cfe0ef;
  border-radius: 6px;
  background: #f7fbff;
  cursor: pointer;
}
.ai-engine-toggle > input { position: absolute; opacity: 0; pointer-events: none; }
.ai-engine-switch {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  border-radius: 11px;
  background: #c4ced9;
  transition: background .18s ease;
}
.ai-engine-switch::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(25, 45, 68, .28);
  content: "";
  transition: transform .18s ease;
}
.ai-engine-toggle > input:checked + .ai-engine-switch { background: #2f996d; }
.ai-engine-toggle > input:checked + .ai-engine-switch::after { transform: translateX(14px); }
.ai-engine-toggle > input:focus-visible + .ai-engine-switch { outline: 3px solid rgba(42, 116, 191, .22); }
.ai-engine-toggle strong,
.ai-engine-toggle small { display: block; }
.ai-engine-toggle strong { color: var(--ink-strong); font-size: 12px; line-height: 17px; }
.ai-engine-toggle small { margin-top: 2px; color: var(--muted); font-size: 10px; line-height: 15px; }
.ai-engine-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px 16px; }
.ai-engine-grid .form-field.full { grid-column: 1 / -1; }
.ai-provider-config-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.ai-provider-config { display: grid; min-width: 0; gap: 12px; padding: 14px; border: 1px solid #d5e0ea; border-radius: 6px; background: #fbfcfe; }
.ai-provider-config > header { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid #e0e7ee; }
.ai-provider-config > header > div { display: flex; min-width: 0; align-items: center; gap: 9px; }
.ai-provider-config > header > div > div { min-width: 0; }
.ai-provider-config > header strong,
.ai-provider-config > header small { display: block; }
.ai-provider-config > header strong { color: var(--ink-strong); font-size: 12px; line-height: 17px; }
.ai-provider-config > header small { overflow: hidden; margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.ai-provider-config > header .button { flex: 0 0 auto; white-space: nowrap; }
.ai-model-control { display: grid; grid-template-columns: minmax(120px, 1fr) auto auto; gap: 7px; }
.ai-model-control .button { min-height: 36px; padding: 6px 8px; white-space: nowrap; }
.ai-model-control .button svg { width: 13px; }
.ai-model-control .button:disabled svg { animation: loading-spin 1s linear infinite; }
.ai-provider-status { display: none; min-height: 28px; align-items: center; padding: 6px 8px; border: 1px solid #b9dcc8; border-radius: 4px; background: #f0faf4; color: #347153; font-size: 9px; line-height: 14px; }
.ai-provider-status.visible { display: flex; }
.ai-provider-status.error { border-color: #efc1bc; background: #fff4f2; color: #a53a33; }
.ai-key-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 5px; color: var(--muted); font-size: 10px; }
.ai-key-meta > span { display: inline-flex; align-items: center; gap: 4px; }
.ai-key-meta svg { width: 13px; }
.ai-key-meta label { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }
.ai-provider-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ai-provider-links > div { display: grid; min-width: 0; grid-template-columns: 30px minmax(0, 1fr) auto; align-items: center; gap: 9px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 5px; background: #fbfcfe; }
.ai-provider-links > div > span:nth-child(2) { min-width: 0; }
.ai-provider-links strong,
.ai-provider-links small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ai-provider-links strong { color: var(--ink-strong); font-size: 11px; line-height: 16px; }
.ai-provider-links small { margin-top: 2px; color: var(--muted); font-size: 9px; line-height: 14px; }
.ai-provider-mark { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 6px; color: #fff; font-size: 9px; font-weight: 760; }
.ai-provider-mark.deepseek { background: #365ba8; }
.ai-provider-mark.qwen { background: #2c8b83; }
.ai-provider-links .button svg { width: 13px; }
.ai-safety-note { display: flex; align-items: flex-start; gap: 9px; padding: 10px 12px; border: 1px solid #c9e1d2; border-radius: 5px; background: #f2fbf5; color: #397254; }
.ai-safety-note > svg { flex: 0 0 auto; width: 16px; margin-top: 1px; }
.ai-safety-note strong,
.ai-safety-note span { display: block; }
.ai-safety-note strong { color: #286445; font-size: 11px; line-height: 16px; }
.ai-safety-note span { margin-top: 2px; color: #527663; font-size: 10px; line-height: 15px; }
.ai-settings-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding-top: 3px; }
.ai-settings-foot small { color: var(--muted); font-size: 10px; }

.import-source-nav {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #f4f7fa;
}
.import-source-nav button {
  display: grid;
  min-width: 0;
  min-height: 48px;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  text-align: left;
  cursor: pointer;
}
.import-source-nav button:hover { border-color: #c7d8e9; background: #fff; color: #245e99; }
.import-source-nav button.active { border-color: #83afe0; background: #fff; color: #0e5cae; box-shadow: 0 2px 7px rgba(37, 89, 145, .08); }
.import-source-nav button > svg { width: 18px; justify-self: center; }
.import-source-nav button > span { min-width: 0; }
.import-source-nav strong,
.import-source-nav small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-source-nav strong { color: inherit; font-size: 12px; line-height: 17px; }
.import-source-nav small { margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 13px; }
.import-source-nav b { display: grid; min-width: 24px; height: 24px; place-items: center; padding: 0 6px; border-radius: 4px; background: #e6edf4; color: #5d6c7e; font-size: 10px; }
.import-source-nav button.active b { background: #e8f2ff; color: #0e5cae; }

.camera-api-panel { min-width: 0; }
.camera-api-form { display: grid; gap: 14px; padding: 16px 18px 18px; }
.camera-auto-toggle { margin: 0; padding: 10px 12px; border: 1px solid #d9e6f1; border-radius: 8px; background: #f7fbff; }
.camera-api-fields { display: grid; grid-template-columns: 1.15fr 1fr 1fr; align-items: start; gap: 14px; }
.camera-api-fields .form-field { min-width: 0; }
.camera-api-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid #c8dceb;
  border-radius: 5px;
  background: #f2f8fc;
  color: #456a86;
}
.camera-api-note > svg { flex: 0 0 auto; width: 16px; margin-top: 1px; }
.camera-api-note strong,
.camera-api-note span { display: block; }
.camera-api-note strong { color: #275b80; font-size: 11px; line-height: 16px; }
.camera-api-note span { margin-top: 2px; font-size: 10px; line-height: 16px; }
.camera-api-actions { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.camera-api-actions > div:first-child { min-width: 0; }
.camera-api-actions small { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 15px; }
.camera-api-status { display: none; color: #347153; font-size: 10px; line-height: 15px; }
.camera-api-status.visible { display: block; }
.camera-api-status.error { color: #a53a33; }
.camera-api-runtime-error { color: #a53a33 !important; display: flex !important; align-items: flex-start; gap: 4px; }
.camera-api-runtime-error svg { width: 13px; flex: 0 0 auto; margin-top: 2px; }
.camera-api-actions .button { white-space: nowrap; }
.camera-api-actions [data-camera-api-test]:disabled svg { animation: loading-spin 1s linear infinite; }

.access-operation-log-panel { min-width: 0; }
.access-operation-log-panel > .section-head { align-items: center; }
.access-operation-log-list {
  max-height: min(620px, calc(100dvh - 360px));
  overflow: auto;
  overscroll-behavior: contain;
  background: #fbfcfe;
}
.access-log-row { border-bottom: 1px solid var(--line); background: #fff; }
.access-log-row:last-child { border-bottom: 0; }
.access-log-row summary {
  display: grid;
  min-height: 56px;
  grid-template-columns: 140px 150px auto minmax(180px, .8fr) minmax(220px, 1.5fr) 18px;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  color: var(--ink);
  cursor: pointer;
  list-style: none;
}
.access-log-row summary::-webkit-details-marker { display: none; }
.access-log-row summary:hover { background: #f6f9fc; }
.access-log-time,
.access-log-actor,
.access-log-target,
.access-log-summary { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.access-log-time { color: var(--muted); font-size: 10px; }
.access-log-actor { color: #334b65; font-size: 10px; font-weight: 680; }
.access-log-target { color: #1e5e96; font-size: 11px; font-weight: 680; }
.access-log-summary { color: var(--muted); font-size: 10px; }
.access-log-chevron { display: inline-flex; color: #8091a5; transition: transform .16s ease; }
.access-log-chevron svg { width: 14px; }
.access-log-row[open] .access-log-chevron { transform: rotate(180deg); }
.access-log-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 0 16px 14px 306px;
  background: #f7f9fc;
}
.access-log-details > div { min-width: 0; padding: 10px 12px; border: 1px solid #dce5ee; border-radius: 5px; background: #fff; }
.access-log-compare-label { display: block; margin-bottom: 7px; color: #607187; font-size: 10px; font-weight: 700; }
.access-log-snapshot { display: grid; gap: 5px; }
.access-log-field { display: grid; grid-template-columns: 86px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 10px; line-height: 15px; }
.access-log-field > span { color: var(--muted); }
.access-log-field strong { min-width: 0; overflow-wrap: anywhere; color: #283c52; font-size: 10px; font-weight: 600; }
.access-log-no-snapshot { color: var(--muted); font-size: 10px; }

.org-workspace {
  display: grid;
  min-height: 520px;
  max-height: calc(100vh - 286px);
  grid-template-columns: minmax(290px, .72fr) minmax(430px, 1.28fr);
  border-top: 1px solid var(--line);
}

.org-tree-panel {
  display: grid;
  min-width: 0;
  min-height: 0;
  grid-template-rows: 44px minmax(0, 1fr);
  border-right: 1px solid var(--line);
  background: #f7f9fc;
}

.org-tree-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 13px;
  border-bottom: 1px solid var(--line);
  color: #334b65;
}

.org-tree-title > span { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; }
.org-tree-title svg { width: 14px; }
.org-tree-title b { color: var(--muted); font-size: 10px; font-weight: 600; }
.org-tree-scroll { overflow: auto; min-height: 0; padding: 9px 8px 16px; }
.org-tree-empty { display: grid; min-height: 160px; place-items: center; color: var(--muted); font-size: 11px; }

.org-tree-branch { position: relative; min-width: 0; }
.org-tree-children { position: relative; margin-left: 15px; padding-left: 13px; border-left: 1px solid #c7d4e2; }
.org-tree-children > .org-tree-branch::before { position: absolute; top: 22px; left: -13px; width: 12px; border-top: 1px solid #c7d4e2; content: ""; }

.org-tree-node {
  display: grid;
  min-width: 0;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: stretch;
  border: 1px solid transparent;
  border-radius: 5px;
}

.org-tree-node:hover { background: #edf3fa; }
.org-tree-node.active { border-color: #9ebfe3; background: #e7f2ff; box-shadow: inset 3px 0 0 #2d78bd; }
.org-tree-toggle { display: grid; min-width: 28px; min-height: 44px; place-items: center; border: 0; background: transparent; color: #71859a; }
.org-tree-toggle:disabled { color: #bbc5d0; }
.org-tree-toggle svg { width: 13px; }
.org-tree-select { display: grid; min-width: 0; min-height: 44px; grid-template-columns: 28px minmax(0, 1fr); align-items: center; gap: 7px; padding: 4px 7px 4px 0; border: 0; background: transparent; color: var(--ink); text-align: left; }
.org-tree-icon { display: grid; width: 26px; height: 26px; place-items: center; border: 1px solid #cedbe8; border-radius: 5px; background: #fff; color: #2671af; }
.org-tree-icon svg { width: 13px; }
.org-tree-copy,
.org-tree-copy strong,
.org-tree-copy small { display: block; min-width: 0; }
.org-tree-copy strong { overflow: hidden; font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.org-tree-copy small { margin-top: 1px; color: var(--muted); font-size: 9px; line-height: 13px; }

.org-detail-panel { min-width: 0; min-height: 0; overflow: auto; padding: 16px 18px 20px; background: #fff; }
.org-detail-panel.empty { display: grid; place-items: center; align-content: center; gap: 7px; color: var(--muted); text-align: center; }
.org-detail-panel.empty svg { width: 30px; color: #4d8cbf; }
.org-detail-panel.empty strong { color: var(--ink); }
.org-detail-panel.empty span { font-size: 10px; }
.org-detail-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.org-detail-head > div { min-width: 0; }
.org-detail-head .permission-editor-kicker { display: block; overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.org-detail-head h3 { margin: 3px 0 0; font-size: 18px; line-height: 24px; }
.org-detail-head p { margin: 3px 0 0; color: var(--muted); font-size: 10px; line-height: 16px; }

.org-detail-stats {
  display: grid;
  margin-top: 14px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #f8fafc;
}

.org-detail-stats > span { display: grid; min-width: 0; min-height: 58px; place-items: center; align-content: center; border-right: 1px solid var(--line); text-align: center; }
.org-detail-stats > span:last-child { border-right: 0; }
.org-detail-stats strong { overflow: hidden; max-width: 100%; padding: 0 8px; font-size: 16px; line-height: 21px; text-overflow: ellipsis; white-space: nowrap; }
.org-detail-stats small { margin-top: 2px; color: var(--muted); font-size: 9px; }
.org-detail-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }

.org-detail-sections { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.org-detail-sections > section { min-width: 0; }
.org-detail-section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 7px; }
.org-detail-section-head h4 { margin: 0; font-size: 12px; }
.org-detail-section-head span { color: var(--muted); font-size: 9px; }
.org-member-list,
.org-child-list { display: grid; max-height: 260px; overflow: auto; }
.org-member-row,
.org-child-row { display: grid; min-width: 0; min-height: 47px; align-items: center; border-bottom: 1px solid #e7ecf2; }
.org-member-row { grid-template-columns: 30px minmax(0, 1fr); gap: 8px; }
.org-member-avatar { display: grid; width: 28px; height: 28px; flex: 0 0 28px; place-items: center; border-radius: 50%; background: #dfeefe; color: #236aa7; font-size: 10px; font-weight: 700; }
.org-member-row > span:last-child,
.org-member-row strong,
.org-member-row small { display: block; min-width: 0; }
.org-member-row strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.org-member-row small { margin-top: 1px; color: var(--muted); font-size: 9px; }
.org-child-row { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 5px; border-width: 0 0 1px; background: transparent; color: var(--ink); text-align: left; }
.org-child-row:hover { background: #f3f7fb; }
.org-child-row > span { display: flex; min-width: 0; align-items: center; gap: 6px; }
.org-child-row > span svg { width: 13px; flex: 0 0 auto; color: #2f7db7; }
.org-child-row strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.org-child-row small { display: flex; align-items: center; gap: 3px; color: var(--muted); font-size: 9px; }
.org-child-row small svg { width: 12px; }
.org-detail-empty { display: flex; min-height: 84px; align-items: center; justify-content: center; gap: 5px; color: var(--muted); font-size: 10px; }
.org-detail-empty svg { width: 17px; }

.department-member-modal { width: min(880px, calc(100vw - 32px)); }
.department-member-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.department-member-toolbar .search-field { width: min(360px, 100%); min-height: 38px; }
.department-member-summary { display: flex; min-height: 34px; align-items: center; gap: 14px; margin-top: 9px; padding: 0 10px; border: 1px solid var(--line); border-radius: 4px; background: #f8fafc; color: var(--muted); font-size: 10px; }
.department-member-summary strong { color: var(--ink); font-size: 13px; }
.department-member-summary .green { color: #338458; }
.department-member-summary .red { color: #b3534b; }
.department-member-list { display: grid; max-height: min(52vh, 520px); overflow: auto; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; margin-top: 9px; padding-right: 3px; }
.department-member-option { position: relative; display: grid; min-width: 0; min-height: 52px; grid-template-columns: 20px 28px minmax(0, 1fr) auto; align-items: center; gap: 7px; padding: 6px 8px; border: 1px solid #dce4ed; border-radius: 5px; background: #fff; cursor: pointer; }
.department-member-option:hover { border-color: #b8cde2; background: #f8fbfe; }
.department-member-option.selected { border-color: #96bce1; background: #edf6ff; }
.department-member-option > input { position: absolute; opacity: 0; pointer-events: none; }
.department-member-option > input:checked + .permission-option-check { border-color: var(--blue); background: var(--blue); color: #fff; }
.department-member-copy,
.department-member-copy strong,
.department-member-copy small { display: block; min-width: 0; }
.department-member-copy strong { overflow: hidden; font-size: 11px; line-height: 16px; text-overflow: ellipsis; white-space: nowrap; }
.department-member-copy small { overflow: hidden; color: var(--muted); font-size: 9px; line-height: 14px; text-overflow: ellipsis; white-space: nowrap; }
.department-member-current { max-width: 94px; overflow: hidden; padding: 2px 5px; border-radius: 3px; background: #eef2f6; color: #63758a; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.department-member-current.current { background: #dff1e7; color: #377759; }

.auth-case-caption:not(.is-entering) {
  padding: 12px 16px;
  border-left: 2px solid rgba(255, 255, 255, .72);
  background: linear-gradient(90deg, rgba(8, 17, 28, .68), rgba(8, 17, 28, .08) 88%, transparent);
}

.auth-case-caption > span:last-child {
  color: rgba(255, 255, 255, .9);
  font-size: 13px;
}

.auth-case-showcase:not(.is-concept) .auth-case-caption {
  top: clamp(34px, 6vh, 66px);
  bottom: auto;
  max-width: min(500px, 58vw);
}

/* Keep high-frequency operational labels readable without loosening the layout. */
.audit-project-tab b,
.audit-project-summary > div > span,
.audit-project-summary .audit-pending-head > span,
.audit-progress-title span,
.audit-overall-progress b,
.audit-progress-head .button,
.audit-rule-summary .named-rules small,
.photo-status-filter button b,
.evidence-status,
.project-lifecycle-badge,
.process-rule-code span,
.excellent-case-rule {
  font-size: 10px;
}

.audit-project-tab b,
.audit-project-summary > div > span,
.audit-project-summary .audit-pending-head > span,
.audit-progress-title span,
.audit-overall-progress b {
  line-height: 15px;
}

@media (min-width: 768px) {
  .audit-rule-summary,
  .audit-material-summary {
    --audit-desktop-track-width: 120px;
    --audit-desktop-label-width: 32px;
    --audit-desktop-meter-gap: 7px;
    --audit-desktop-meter-width: 159px;
    --audit-desktop-track-center-offset: 19.5px;
  }

  .audit-progress-title {
    min-height: 32px;
    align-self: center;
    align-items: center;
  }

  .audit-progress-value {
    width: var(--audit-desktop-track-width);
    justify-self: center;
    line-height: 19px;
  }

  .audit-overall-progress {
    display: grid;
    width: var(--audit-desktop-meter-width);
    min-width: 0;
    grid-template-columns: var(--audit-desktop-track-width) var(--audit-desktop-label-width);
    justify-self: center;
    column-gap: var(--audit-desktop-meter-gap);
    transform: translateX(var(--audit-desktop-track-center-offset));
  }

  .audit-progress-meter {
    grid-column: 1;
    grid-row: 1;
    grid-template-rows: 18px 7px;
    row-gap: 2px;
  }

  .audit-overall-progress > b {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }

  .audit-material-head {
    align-items: center;
  }

  .audit-material-metric {
    width: var(--audit-desktop-track-width);
    justify-self: center;
  }

  .audit-material-progress {
    width: var(--audit-desktop-meter-width);
    transform: translateX(var(--audit-desktop-track-center-offset));
  }

  .audit-material-progress .progress-inline {
    grid-template-columns: var(--audit-desktop-track-width) var(--audit-desktop-label-width);
    gap: var(--audit-desktop-meter-gap);
  }

  .audit-project-summary .audit-count-summary > span,
  .audit-project-summary .audit-pending-head > span {
    display: flex;
    min-height: 32px;
    align-items: center;
  }

  .audit-progress-title span,
  .audit-material-head > span,
  .audit-project-summary .audit-count-summary > span,
  .audit-project-summary .audit-pending-head > span {
    font-size: 12px;
    font-weight: 600;
    line-height: 16px;
  }
}

.excellent-case-hero > img {
  object-fit: contain;
  background: #172433;
}

@media (min-width: 768px) and (max-width: 1023px) {
  :root { --sidebar-width: 64px; }

  .sidebar { width: 64px; }
  .workspace { margin-left: 64px; }
  .sidebar .brand { justify-content: center; padding: 0; }
  .sidebar .brand-mark { width: 34px; height: 34px; }
  .sidebar .brand-copy,
  .sidebar .primary-nav a span,
  .sidebar .nav-count,
  .sidebar .sidebar-toggle span { display: none; }
  .sidebar .primary-nav { padding-right: 8px; padding-left: 8px; }
  .sidebar .primary-nav a { justify-content: center; padding: 0; }
  .sidebar .primary-nav a.active::before { left: -8px; }
  .sidebar .sidebar-footer { display: grid; place-items: center; padding: 12px 8px; }
  .sidebar .sidebar-toggle { width: 40px; padding: 0; }

  #open-import {
    width: 38px;
    min-width: 38px;
    flex: 0 0 38px;
    padding: 0;
  }

  #open-import span { display: none; }
  .topbar-actions { gap: 6px; }
  .account-status { max-width: 118px; }
  .account-status span { overflow: hidden; text-overflow: ellipsis; }
  .data-status small { display: none; }

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

  .audit-rule-summary,
  .audit-material-summary {
    grid-column: auto;
    min-height: 72px;
  }

  .audit-rule-summary .project-rule-mini { display: none; }
  .audit-progress-head { min-height: 0; }
  .audit-rule-action,
  .audit-material-action,
  .audit-quick-review { min-width: 36px; width: 36px; padding: 0 8px; }
  .audit-rule-action span,
  .audit-material-action span,
  .audit-quick-review span { display: none; }
  .audit-project-summary > div:nth-child(2) { border-right: 0; }
  .audit-project-summary > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
}

@media (max-width: 767px) {
  .audit-project-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .audit-rule-summary,
  .audit-material-summary {
    --audit-summary-track-width: 64px;
    --audit-summary-label-width: 28px;
    --audit-summary-meter-gap: 5px;
    --audit-summary-meter-width: 97px;
    --audit-summary-track-center-offset: 16.5px;
    --audit-summary-track-color: #d8e1eb;
    --audit-summary-fill-start: #b8dfc4;
    --audit-summary-fill-end: #4f9a68;
    --audit-summary-label-color: #4f8d63;
    grid-column: auto;
    min-height: 76px !important;
    border-right: 1px solid var(--line) !important;
  }

  .audit-project-summary > div.audit-rule-summary,
  .audit-project-summary > div.audit-material-summary {
    padding-top: 6px;
    padding-bottom: 6px;
    background: linear-gradient(180deg, #f6f9fc 0%, #edf3f8 100%);
  }

  .audit-material-summary { border-right: 0 !important; }
  .audit-rule-summary {
    display: grid;
    align-content: center;
  }
  .audit-rule-summary .project-rule-mini { display: none; }
  .audit-progress-head {
    min-height: 0;
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-rows: 36px auto;
    align-items: center;
    gap: 2px 5px;
  }
  .audit-progress-title {
    min-width: 0;
    grid-column: 1;
    grid-row: 1;
    align-self: center;
    justify-self: start;
    gap: 4px;
    white-space: nowrap;
  }
  .audit-progress-value {
    width: var(--audit-summary-track-width);
    justify-self: center;
    text-align: center;
    font-size: 12px;
    line-height: 16px;
  }
  .audit-overall-progress {
    display: grid;
    width: var(--audit-summary-meter-width);
    min-width: 0;
    grid-column: 1 / -1;
    grid-row: 2;
    grid-template-columns: var(--audit-summary-track-width) var(--audit-summary-label-width);
    justify-self: center;
    column-gap: var(--audit-summary-meter-gap);
    transform: translateX(var(--audit-summary-track-center-offset));
  }
  .audit-progress-meter {
    grid-column: 1;
    grid-row: 1;
    grid-template-rows: 16px 6px;
    row-gap: 4px;
  }
  .audit-overall-progress > b {
    grid-column: 2;
    grid-row: 1;
    align-self: end;
  }
  .audit-progress-meter > span,
  .audit-material-progress .progress-track {
    height: 6px;
    border: 0;
    border-radius: 999px;
    background: var(--audit-summary-track-color) !important;
    box-shadow: inset 0 0 0 1px rgba(92, 116, 140, 0.08);
  }
  .audit-overall-progress i,
  .audit-overall-progress.complete i,
  .audit-material-progress .progress-track span {
    background: linear-gradient(90deg, var(--audit-summary-fill-start) 0%, var(--audit-summary-fill-end) 100%) !important;
  }
  .audit-overall-progress.dormant,
  .audit-material-summary.dormant {
    --audit-summary-fill-start: #e3e9ee;
    --audit-summary-fill-end: #aab6c2;
    --audit-summary-label-color: #7f8c99;
  }
  .audit-overall-progress.partial,
  .audit-material-summary.partial {
    --audit-summary-fill-start: #b8dfc4;
    --audit-summary-fill-end: #4f9a68;
    --audit-summary-label-color: #4f8d63;
  }
  .audit-overall-progress.complete,
  .audit-material-summary.complete {
    --audit-summary-fill-start: #23834e;
    --audit-summary-fill-end: #23834e;
    --audit-summary-label-color: #287d55;
  }
  .audit-overall-progress.complete i,
  .audit-material-summary.complete .progress-track span {
    background: #23834e !important;
  }
  .audit-overall-progress > b,
  .audit-material-progress .progress-inline b {
    align-self: end;
    color: var(--audit-summary-label-color) !important;
    font-size: 10px;
    font-weight: 600;
    line-height: 12px;
    text-align: right;
  }
  .audit-progress-head .audit-rule-action,
  .audit-material-summary .audit-material-action,
  .audit-pending-head .audit-quick-review {
    position: relative;
    box-sizing: border-box;
    width: 36px;
    height: 36px;
    min-width: 36px;
    max-width: 36px;
    min-height: 36px;
    max-height: 36px;
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    margin: 0;
    padding: 0;
    border-width: 1px;
    border-radius: 6px;
  }
  .audit-progress-head .audit-rule-action::after,
  .audit-material-summary .audit-material-action::after {
    position: absolute;
    inset: -4px;
    content: "";
  }
  .audit-rule-action span { display: none; }
  .audit-rule-action svg { margin: 0; }
  .audit-progress-head .audit-rule-action svg {
    width: 17px;
    height: 17px;
    stroke-width: 2.3;
  }

  .audit-material-summary {
    grid-template-columns: minmax(0, 1fr) 36px;
    grid-template-rows: 36px 16px 6px;
    align-content: center;
    gap: 2px 5px;
  }
  .audit-material-head { display: contents; }
  .audit-material-data { display: contents; }
  .audit-material-head > span {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }
  .audit-material-metric {
    grid-column: 1 / -1;
    grid-row: 2;
    width: var(--audit-summary-track-width);
    align-self: center;
    justify-self: center;
    gap: 2px;
    margin-right: 0;
    transform: none;
  }
  .audit-material-metric > strong { gap: 1px; font-size: 12px; }
  .audit-material-progress {
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    place-self: center stretch;
    margin-top: 2px;
  }
  .audit-material-progress .progress-inline {
    width: var(--audit-summary-meter-width);
    min-width: 0;
    grid-template-columns: var(--audit-summary-track-width) var(--audit-summary-label-width);
    gap: var(--audit-summary-meter-gap);
    margin: 0 auto;
    background: transparent;
    transform: translateX(var(--audit-summary-track-center-offset));
  }
  .audit-material-summary .audit-material-bell { width: 20px; height: 20px; flex-basis: 20px; }
  .audit-material-action span { display: none; }
  .audit-quick-review span { display: none; }
  .audit-material-action svg { margin: 0; }
  .audit-material-summary .audit-material-action svg {
    width: 18px;
    height: 18px;
    stroke-width: 2.5;
  }

  .audit-project-summary > div {
    min-height: 62px;
    padding: 8px 9px;
  }

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

  .dashboard-dimension,
  .dashboard-dimension:last-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .dashboard-dimension:last-child { border-bottom: 0; }

  .project-archive-row .project-rule-mini.named-rules {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .archive-detail-rule-summary .project-rule-mini {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .archive-detail-rule-summary .project-rule-mini.named-rules > span {
    display: grid;
    min-height: 36px;
  }

  .process-rule-detail-body { grid-template-columns: 1fr; }
  .process-rule-details summary { grid-template-columns: minmax(0, 1fr) 18px; }
  .process-rule-details summary b { display: none; }

  .settings-nav {
    overflow-x: auto;
    margin-right: -12px;
    margin-left: -12px;
    padding-right: 12px;
    padding-left: 12px;
    border-right: 0;
    border-left: 0;
    border-radius: 0;
  }

  .settings-nav button { min-height: 44px; flex: 0 0 auto; }

  .permission-management-body {
    min-height: 0;
    grid-template-columns: 1fr;
  }

  .permission-group-list {
    display: flex;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .permission-group-row {
    width: 210px;
    flex: 0 0 210px;
  }

  .permission-group-editor {
    padding: 12px;
  }

  .permission-editor-fields,
  .permission-action-groups,
  .permission-option-list {
    grid-template-columns: 1fr;
  }

  .permission-editor-head,
  .permission-editor-foot {
    align-items: flex-start;
  }

  .permission-editor-foot {
    flex-direction: column;
  }

  .permission-editor-foot .inline-actions {
    width: 100%;
    justify-content: flex-end;
  }
}

/* Unified information hierarchy for the secondary workspaces. */
:is(.excellent-cases-page, .dashboard-page, .rules-page, .settings-page) > .page-head {
  align-items: center;
  margin-bottom: 14px;
}

:is(.excellent-cases-page, .dashboard-page, .rules-page, .settings-page) > .page-head .page-head-copy > p {
  margin: 0;
  color: #657386;
  font-size: 13px;
  font-weight: 540;
  line-height: 20px;
}

:is(.dashboard-page, .rules-page, .settings-page) .section-head {
  min-height: 54px;
}

:is(.dashboard-page, .rules-page, .settings-page) .section-head h2 {
  font-size: 15px;
  font-weight: 700;
  line-height: 21px;
}

:is(.dashboard-page, .rules-page, .settings-page) .section-head p {
  font-size: 11px;
  line-height: 17px;
}

:is(.dashboard-page, .rules-page, .settings-page) .data-table th {
  font-size: 11px;
  font-weight: 680;
}

:is(.dashboard-page, .rules-page, .settings-page) .data-table td {
  color: #33465c;
  font-size: 12px;
  line-height: 18px;
}

/* Excellent cases: imagery stays dominant while labels remain readable. */
.excellent-cases-page .excellent-case-hero-copy h2 {
  font-size: 22px;
  line-height: 29px;
}

.excellent-cases-page .excellent-case-hero-copy > span,
.excellent-cases-page .excellent-case-hero-copy p,
.excellent-cases-page .excellent-case-hero-controls span {
  font-size: 11px;
  line-height: 17px;
}

.excellent-cases-page .excellent-case-filter-label,
.excellent-cases-page .excellent-case-filter-options button {
  font-size: 12px;
}

.excellent-cases-page .excellent-case-filter-options button span {
  font-size: 11px;
}

.excellent-cases-page .excellent-process-group > header h2 {
  font-size: 15px;
  font-weight: 700;
  line-height: 21px;
}

.excellent-cases-page .excellent-process-group > header span,
.excellent-cases-page .excellent-process-group > header small {
  font-size: 11px;
}

.excellent-cases-page .excellent-step-title strong {
  font-size: 13px;
  line-height: 19px;
}

.excellent-cases-page .excellent-step-title span {
  font-size: 11px;
}

.excellent-cases-page .excellent-case-rule {
  font-size: 10px;
  line-height: 15px;
}

.excellent-cases-page .excellent-case-card-copy strong {
  font-size: 13px;
  line-height: 19px;
}

.excellent-cases-page .excellent-case-card-copy p {
  font-size: 12px;
  line-height: 18px;
}

.excellent-cases-page .excellent-case-card-copy span,
.excellent-cases-page .excellent-case-card-copy small {
  font-size: 11px;
  line-height: 17px;
}

.excellent-cases-page .excellent-cases-empty h2 { font-size: 16px; }
.excellent-cases-page .excellent-cases-empty p { font-size: 12px; line-height: 19px; }

/* Dashboard: conclusions first, supporting evidence second. */
.dashboard-page .dashboard-command-copy > span,
.dashboard-page .dashboard-command-stats span,
.dashboard-page .dashboard-command-stats small {
  font-size: 11px;
  line-height: 17px;
}

.dashboard-page .dashboard-command-copy h2 {
  font-size: 20px;
  line-height: 27px;
}

.dashboard-page .dashboard-command-copy p {
  font-size: 12px;
  line-height: 19px;
}

.dashboard-page .dashboard-command-stats strong {
  font-size: 20px;
  line-height: 24px;
}

.dashboard-page .dashboard-dimension-head > span,
.dashboard-page .dashboard-type-head strong,
.dashboard-page .dashboard-stage-head strong,
.dashboard-page .dashboard-material-head strong,
.dashboard-page .dashboard-relevance-head strong,
.dashboard-page .dashboard-health-item strong,
.dashboard-page .dashboard-material-item strong,
.dashboard-page .dashboard-reason-copy strong {
  font-size: 12px;
  line-height: 18px;
}

.dashboard-page .dashboard-dimension-head strong {
  font-size: 20px;
  line-height: 24px;
}

.dashboard-page .dashboard-dimension p,
.dashboard-page .dashboard-risk-project span,
.dashboard-page .dashboard-health-item small,
.dashboard-page .dashboard-health-note,
.dashboard-page .dashboard-list-foot,
.dashboard-page .dashboard-footnote,
.dashboard-page .dashboard-type-meta,
.dashboard-page .dashboard-stage-meta,
.dashboard-page .dashboard-relevance-meta,
.dashboard-page .dashboard-material-item div > span,
.dashboard-page .dashboard-reason-copy small,
.dashboard-page .dashboard-review-meta,
.dashboard-page .dashboard-activity-meta,
.dashboard-page .dashboard-chart-legend {
  font-size: 11px;
  line-height: 17px;
}

.dashboard-page .dashboard-risk-rank,
.dashboard-page .dashboard-risk-reasons .badge,
.dashboard-page .dashboard-priority-badge {
  font-size: 10px;
}

.dashboard-page .dashboard-risk-project strong {
  font-size: 13px;
  line-height: 19px;
}

.dashboard-page .dashboard-review-summary span,
.dashboard-page .dashboard-aging-total span,
.dashboard-page .dashboard-distribution-row b,
.dashboard-page .dashboard-aging-row b,
.dashboard-page .dashboard-distribution-row small,
.dashboard-page .dashboard-lifecycle-row small,
.dashboard-page .dashboard-material-kpi span,
.dashboard-page .dashboard-learning-kpis span,
.dashboard-page .dashboard-subhead span {
  font-size: 11px;
}

/* Dashboard BI workspace: compact navigation, comparable panels and action-first tables. */
.dashboard-page {
  --dashboard-gap: 14px;
}

.dashboard-page > .page-head {
  min-height: 38px;
}

.dashboard-period-control {
  position: relative;
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid #ccd7e4;
  border-radius: 6px;
  background: #fff;
}

.dashboard-period-control > span {
  padding: 0 8px;
  border-right: 1px solid #dbe3ec;
  color: #68788b;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}

.dashboard-period-control select {
  min-width: 112px;
  height: 34px;
  padding: 0 30px 0 9px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: #2f465d;
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.dashboard-period-control > svg {
  position: absolute;
  right: 9px;
  width: 13px;
  height: 13px;
  pointer-events: none;
  color: #748396;
}

.dashboard-period-control:focus-within {
  border-color: #6d9fd1;
  box-shadow: 0 0 0 3px rgba(49, 119, 185, 0.12);
}

.dashboard-period-range {
  flex: 0 0 auto;
  max-width: none;
  white-space: nowrap;
}

.dashboard-export-button.is-exporting svg {
  animation: loading-spin 800ms linear infinite;
}

.dashboard-export-capture {
  min-height: 100%;
  padding: 26px 30px 34px !important;
  background: #edf2f7;
}

.dashboard-export-header {
  display: flex;
  min-height: 72px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 14px;
  padding: 13px 18px;
  border: 1px solid #cbd8e4;
  border-left: 4px solid #2571b6;
  border-radius: 6px;
  background: #fff;
}

.dashboard-export-header > div,
.dashboard-export-header span,
.dashboard-export-header strong,
.dashboard-export-header b {
  display: block;
}

.dashboard-export-meta {
  text-align: right;
}

.dashboard-export-header span {
  color: #708195;
  font-size: 11px;
  line-height: 18px;
}

.dashboard-export-header strong {
  color: #20384f;
  font-size: 23px;
  line-height: 30px;
}

.dashboard-export-header b {
  color: #286ca8;
  font-size: 13px;
  line-height: 20px;
}

.dashboard-export-header .dashboard-export-contact {
  margin-bottom: 3px;
  color: #40566d;
  font-size: 12px;
  font-weight: 650;
}

.dashboard-export-capture .data-table-wrap,
.dashboard-export-capture .dashboard-activity-scroll,
.dashboard-export-capture .dashboard-optimization-panel {
  overflow: visible !important;
}

.dashboard-view-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: var(--dashboard-gap);
  padding: 4px;
  border: 1px solid #d3dde8;
  border-radius: 7px;
  background: #e9eef4;
}

.dashboard-view-tabs button {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #5d6d80;
  font-size: 12px;
  font-weight: 650;
}

.dashboard-view-tabs button:hover {
  background: rgba(255, 255, 255, 0.65);
  color: #255d9b;
}

.dashboard-view-tabs button.active {
  background: #fff;
  color: #175fa8;
  box-shadow: 0 1px 3px rgba(27, 47, 70, 0.12);
}

.dashboard-view-tabs svg {
  width: 15px;
  height: 15px;
}

.dashboard-view {
  display: grid;
  gap: var(--dashboard-gap);
}

.dashboard-view > *,
.dashboard-view .dashboard-activity-panel,
.dashboard-view .dashboard-health-panel,
.dashboard-view .dashboard-priority-layout,
.dashboard-view .dashboard-analysis-grid,
.dashboard-view .dashboard-section-grid,
.dashboard-view .dashboard-command,
.dashboard-view .dashboard-dimensions,
.dashboard-view .gantt-panel {
  margin-top: 0;
  margin-bottom: 0;
}

.dashboard-bi-grid {
  display: grid;
  min-width: 0;
  gap: var(--dashboard-gap);
  align-items: stretch;
}

.dashboard-risk-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(420px, 1.2fr);
  border-bottom: 1px solid #e0e7ed;
  background: #f7f9fb;
}

.dashboard-risk-summary-group {
  min-width: 0;
  padding: 10px 14px 12px;
  border-right: 1px solid #e0e7ed;
}

.dashboard-risk-summary-group:last-child {
  border-right: 0;
}

.dashboard-risk-summary-group > span {
  display: block;
  margin-bottom: 7px;
  color: #718194;
  font-size: 10px;
  font-weight: 650;
}

.dashboard-risk-summary-group > div {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-risk-summary-group.sources > div {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dashboard-risk-summary-group b {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 5px;
  color: #344b61;
  font-size: 17px;
  line-height: 22px;
}

.dashboard-risk-summary-group b.critical { color: #a9433f; }
.dashboard-risk-summary-group b.attention { color: #946516; }
.dashboard-risk-summary-group b.stable { color: #327956; }

.dashboard-risk-summary-group small {
  overflow: hidden;
  color: #748396;
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-bi-priority {
  grid-template-columns: minmax(0, 1.72fr) minmax(290px, 0.78fr);
}

.dashboard-bi-activity {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
}

.dashboard-bi-quality,
.dashboard-bi-people,
.dashboard-bi-governance {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-bi-people {
  grid-template-columns: minmax(0, 1.55fr) minmax(330px, 0.75fr);
}

.dashboard-bi-governance {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.dashboard-section-lead {
  display: grid;
  min-height: 72px;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px 16px;
  border-color: #b9cce1;
  background: linear-gradient(90deg, #eaf2fb 0%, #f7fafc 58%, #fff 100%);
}

.dashboard-section-lead-icon {
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 6px;
  background: #1f6fb8;
  color: #fff;
}

.dashboard-section-lead-icon svg {
  width: 18px;
  height: 18px;
}

.dashboard-section-lead h2 {
  margin: 0;
  color: #1f344b;
  font-size: 16px;
  line-height: 22px;
}

.dashboard-section-lead p {
  margin: 2px 0 0;
  color: #66788b;
  font-size: 11px;
  line-height: 17px;
}

.dashboard-decision-panel,
.dashboard-optimization-panel,
.dashboard-step-quality-panel,
.dashboard-rework-panel,
.dashboard-personnel-panel,
.dashboard-reviewer-panel,
.dashboard-rule-stability-panel {
  min-width: 0;
  overflow: hidden;
}

.dashboard-decision-list,
.dashboard-step-quality-list,
.dashboard-reviewer-list,
.dashboard-rule-stability-list {
  display: grid;
}

.dashboard-decision-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: 24px minmax(0, 1fr) auto 14px;
  align-items: center;
  gap: 9px;
  padding: 8px 12px;
  border: 0;
  border-top: 1px solid #e1e7ed;
  background: #fff;
  text-align: left;
}

.dashboard-decision-row:first-child {
  border-top: 0;
}

.dashboard-decision-row:hover {
  background: #f4f8fc;
}

.dashboard-decision-row > span:first-child {
  color: #8b98a8;
  font-size: 10px;
  font-weight: 720;
}

.dashboard-decision-row > div,
.dashboard-decision-row strong,
.dashboard-decision-row small {
  display: block;
  min-width: 0;
}

.dashboard-decision-row strong {
  color: #2c4056;
  font-size: 12px;
}

.dashboard-decision-row small {
  margin-top: 2px;
  overflow: hidden;
  color: #748396;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-decision-row > b {
  color: #42566d;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-decision-row.red > b { color: #a23d3a; }
.dashboard-decision-row.amber > b { color: #9a6a12; }
.dashboard-decision-row.blue > b { color: #286aa8; }
.dashboard-decision-row > svg { width: 13px; color: #8391a1; }

.dashboard-decision-empty {
  display: grid;
  min-height: 210px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #357859;
}

.dashboard-decision-empty svg { width: 25px; height: 25px; }
.dashboard-decision-empty strong { font-size: 12px; }

.dashboard-bi-activity > .dashboard-activity-panel,
.dashboard-bi-activity > .dashboard-chart-panel,
.dashboard-bi-activity > .dashboard-daily-quality-panel {
  min-height: 260px;
}

.dashboard-bi-activity .dashboard-activity-scroll {
  padding-top: 10px;
}

.dashboard-bi-activity .dashboard-trend {
  height: 148px;
  padding-top: 14px;
}

.dashboard-optimization-head,
.dashboard-optimization-row {
  display: grid;
  grid-template-columns: minmax(190px, 1.35fr) repeat(4, minmax(90px, 0.62fr)) minmax(190px, 1.25fr);
  align-items: center;
  gap: 10px;
}

.dashboard-optimization-head {
  min-width: 930px;
  padding: 8px 14px;
  border-block: 1px solid #dce4ec;
  background: #f1f5f8;
  color: #68798c;
  font-size: 10px;
  font-weight: 680;
}

.dashboard-optimization-list {
  min-width: 930px;
}

.dashboard-optimization-panel {
  overflow-x: auto;
}

.dashboard-optimization-row {
  min-height: 64px;
  padding: 8px 14px;
  border-bottom: 1px solid #e3e8ee;
}

.dashboard-optimization-row:last-child { border-bottom: 0; }
.dashboard-optimization-row.attention { box-shadow: inset 3px 0 0 #d8a13b; }
.dashboard-optimization-row.stable { box-shadow: inset 3px 0 0 #4f9b6c; }
.dashboard-optimization-row > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 7px; align-items: center; }
.dashboard-optimization-row > div:first-child small { grid-column: 2; }
.dashboard-optimization-row strong { overflow: hidden; color: #273b51; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-optimization-row b { display: block; color: #354a60; font-size: 12px; }
.dashboard-optimization-row span:not(.badge),
.dashboard-optimization-row small { display: block; color: #788798; font-size: 10px; line-height: 15px; }
.dashboard-optimization-row .risk { color: #ae4641; }
.dashboard-optimization-action { display: flex; align-items: center; gap: 6px; }
.dashboard-optimization-action svg { width: 13px; flex: 0 0 13px; color: #3977b4; }
.dashboard-optimization-action span { color: #365673 !important; }

.dashboard-step-quality-row {
  display: grid;
  min-height: 60px;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(70px, auto));
  align-items: center;
  gap: 10px;
  padding: 8px 13px;
  border-top: 1px solid #e2e8ee;
}

.dashboard-step-quality-row:first-child { border-top: 0; }
.dashboard-step-quality-row > div:first-child { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 7px; align-items: center; }
.dashboard-step-quality-row > div:first-child small { grid-column: 2; }
.dashboard-step-quality-row strong { overflow: hidden; color: #2c4056; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-step-quality-row small,
.dashboard-step-quality-row span { color: #778697; font-size: 10px; }
.dashboard-step-quality-row b { display: block; color: #34495f; font-size: 13px; }
.dashboard-step-quality-row .risk { color: #a43d39; }

.dashboard-rework-score {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.dashboard-rework-score > div:first-child strong,
.dashboard-rework-score > div:first-child span {
  display: block;
}

.dashboard-rework-score > div:first-child strong { color: #224b70; font-size: 26px; }
.dashboard-rework-score > div:first-child span { color: #748497; font-size: 11px; }
.dashboard-rework-score > div:last-child { display: flex; justify-content: space-between; color: #68798b; font-size: 11px; }
.dashboard-rework-score .risk { color: #aa413e; }
.dashboard-rework-track { height: 8px; overflow: hidden; border-radius: 999px; background: #dfe6ed; }
.dashboard-rework-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #79b895, #287955); }
.dashboard-rework-processes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; padding: 0 16px 16px; }
.dashboard-rework-processes > div { display: flex; justify-content: space-between; gap: 8px; padding: 9px 10px; border: 1px solid #e0e7ed; border-radius: 5px; background: #f7f9fb; font-size: 11px; }
.dashboard-rework-processes b { color: #aa413e; }
.dashboard-rework-processes p { grid-column: 1 / -1; margin: 0; color: #62778b; font-size: 11px; }

.dashboard-personnel-table {
  min-width: 940px;
  table-layout: fixed;
}

.dashboard-personnel-table th:first-child { width: 12%; }
.dashboard-personnel-table th:nth-child(2) { width: 10%; }
.dashboard-personnel-table th:nth-child(3) { width: 11%; }
.dashboard-personnel-table th:nth-child(4) { width: 11%; }
.dashboard-personnel-table th:last-child { width: 24%; }
.dashboard-personnel-table td strong,
.dashboard-personnel-table td small { display: block; }
.dashboard-personnel-table td small { margin-top: 2px; color: #7c8997; font-size: 10px; }
.dashboard-personnel-table td b { color: #334a60; }
.dashboard-personnel-table td b.risk { color: #ad413e; }
.dashboard-personnel-table td b.attention { color: #9a6a12; }
.dashboard-personnel-table .dashboard-metric-unit {
  margin-left: 3px;
  color: #7c8997;
  font-size: 9px;
  font-style: normal;
  font-weight: 500;
}
.dashboard-table-sort {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  white-space: nowrap;
}
.dashboard-table-sort svg {
  width: 12px;
  height: 12px;
  color: #8996a4;
}
.dashboard-personnel-table th[aria-sort="ascending"] .dashboard-table-sort,
.dashboard-personnel-table th[aria-sort="descending"] .dashboard-table-sort {
  color: #286ca8;
}
.dashboard-personnel-table th[aria-sort="ascending"] .dashboard-table-sort svg,
.dashboard-personnel-table th[aria-sort="descending"] .dashboard-table-sort svg {
  color: #286ca8;
}
.dashboard-table-sort:hover {
  color: #286ca8;
}
.dashboard-table-sort:focus-visible {
  border-radius: 3px;
  outline: 2px solid #8ab9e2;
  outline-offset: 3px;
}
.dashboard-advice { color: #3a607f; font-size: 11px; line-height: 16px; }

.dashboard-reviewer-row {
  display: grid;
  min-height: 66px;
  grid-template-columns: minmax(140px, 1.2fr) repeat(4, minmax(58px, 0.55fr));
  align-items: center;
  gap: 8px;
  padding: 9px 13px;
  border-top: 1px solid #e2e8ee;
}

.dashboard-reviewer-row:first-child { border-top: 0; }
.dashboard-reviewer-row strong,
.dashboard-reviewer-row small,
.dashboard-reviewer-row b,
.dashboard-reviewer-row span { display: block; }
.dashboard-reviewer-row strong { overflow: hidden; color: #2d4258; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-reviewer-row small,
.dashboard-reviewer-row span { color: #7a8898; font-size: 10px; }
.dashboard-reviewer-row b { color: #324a61; font-size: 13px; }

.dashboard-rule-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-block: 1px solid #dfe6ed;
  background: #f5f8fa;
}

.dashboard-rule-kpis > div { padding: 12px 14px; border-right: 1px solid #dfe6ed; }
.dashboard-rule-kpis > div:last-child { border-right: 0; }
.dashboard-rule-kpis strong,
.dashboard-rule-kpis span { display: block; }
.dashboard-rule-kpis strong { color: #294965; font-size: 18px; }
.dashboard-rule-kpis span { margin-top: 2px; color: #718194; font-size: 10px; }
.dashboard-rule-stability-list > div { display: grid; min-height: 50px; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 7px 13px; border-top: 1px solid #e4e9ee; }
.dashboard-rule-stability-list > div:first-child { border-top: 0; }
.dashboard-rule-stability-list > div > span { color: #8a97a6; font-size: 10px; font-weight: 700; }
.dashboard-rule-stability-list strong,
.dashboard-rule-stability-list small { display: block; }
.dashboard-rule-stability-list strong { color: #30465c; font-size: 11px; }
.dashboard-rule-stability-list small { margin-top: 2px; color: #7b8998; font-size: 10px; }
.dashboard-rule-stability-list b { color: #8d661d; font-size: 11px; white-space: nowrap; }
.dashboard-rule-stability-list > p { margin: 0; padding: 20px 14px; color: #708094; font-size: 11px; }

.dashboard-missing-panel {
  min-width: 0;
  overflow: hidden;
}

.dashboard-missing-list {
  display: grid;
}

.dashboard-missing-row {
  display: grid;
  min-height: 42px;
  grid-template-columns: minmax(110px, 0.55fr) minmax(220px, 1.8fr) 44px;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  border-top: 1px solid #e2e8ee;
}

.dashboard-missing-row:first-child { border-top: 0; }
.dashboard-missing-row > strong { overflow: hidden; color: #2d4258; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-missing-track { height: 9px; overflow: hidden; border-radius: 999px; background: #e6ebf0; }
.dashboard-missing-track span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #f2c96d, #d88a30); }
.dashboard-missing-row > b { color: #8d5d19; font-size: 12px; text-align: right; white-space: nowrap; }

.dashboard-reason-chart .dashboard-missing-track span {
  background: linear-gradient(90deg, #e99b92, #bd514c);
}

.dashboard-reason-chart .dashboard-missing-row > b {
  color: #a3423e;
}

.dashboard-daily-quality-panel {
  min-width: 0;
  overflow: hidden;
}

.dashboard-daily-quality-body {
  display: grid;
  min-height: 224px;
  grid-template-columns: minmax(260px, 0.72fr) minmax(0, 1.8fr);
  border-top: 1px solid #e2e8ee;
}

.dashboard-daily-quality-summary {
  display: grid;
  align-content: center;
  gap: 18px;
  padding: 18px 20px;
  border-right: 1px solid #e2e8ee;
  background: #f7fafc;
}

.dashboard-daily-quality-kpis {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-daily-quality-kpis > div {
  min-width: 0;
  padding-right: 16px;
}

.dashboard-daily-quality-kpis > div + div {
  padding-right: 0;
  padding-left: 16px;
  border-left: 1px solid #dbe4ec;
}

.dashboard-daily-quality-kpis span,
.dashboard-daily-quality-kpis strong {
  display: block;
}

.dashboard-daily-quality-kpis span {
  color: #718194;
  font-size: 11px;
}

.dashboard-daily-quality-kpis strong {
  color: #284b69;
  font-size: 28px;
  line-height: 34px;
}

.dashboard-daily-quality-kpis strong.attention {
  color: #a75f21;
}

.dashboard-daily-quality-kpis small {
  color: #8391a0;
  font-size: 10px;
  line-height: 18px;
}

.dashboard-daily-quality-value {
  display: flex;
  min-height: 36px;
  align-items: baseline;
  gap: 5px;
  margin-top: 3px;
}

.dashboard-daily-quality-review {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.dashboard-daily-quality-review > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #dde6ed;
  border-radius: 5px;
  background: #fff;
}

.dashboard-daily-quality-review span {
  color: #718194;
  font-size: 10px;
}

.dashboard-daily-quality-review b {
  color: #345068;
  font-size: 12px;
}

.dashboard-daily-quality-reasons {
  min-width: 0;
}

.dashboard-daily-quality-subhead {
  display: flex;
  min-height: 40px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 14px;
  border-bottom: 1px solid #e2e8ee;
}

.dashboard-daily-quality-subhead strong {
  color: #31475d;
  font-size: 12px;
}

.dashboard-daily-quality-subhead span {
  color: #8a5660;
  font-size: 10px;
}

.dashboard-daily-quality-empty {
  display: grid;
  min-height: 156px;
  place-items: center;
  align-content: center;
  gap: 8px;
  color: #6f8192;
  font-size: 11px;
}

.dashboard-daily-quality-empty svg {
  width: 20px;
  height: 20px;
  color: #4f956e;
}

.dashboard-bi-activity .dashboard-daily-quality-body {
  min-height: 0;
  grid-template-columns: 1fr;
}

.dashboard-bi-activity .dashboard-daily-quality-summary {
  gap: 10px;
  padding: 12px 14px;
  border-right: 0;
  border-bottom: 1px solid #e2e8ee;
}

.dashboard-bi-activity .dashboard-daily-quality-kpis > div {
  padding-right: 10px;
}

.dashboard-bi-activity .dashboard-daily-quality-kpis > div + div {
  padding-right: 0;
  padding-left: 10px;
}

.dashboard-bi-activity .dashboard-daily-quality-kpis strong {
  font-size: 23px;
  line-height: 28px;
}

.dashboard-bi-activity .dashboard-daily-quality-value {
  min-height: 30px;
}

.dashboard-bi-activity .dashboard-daily-quality-review > div {
  padding: 6px 8px;
}

.dashboard-bi-activity .dashboard-daily-quality-subhead {
  min-height: 36px;
  padding: 6px 12px;
}

.dashboard-bi-activity .dashboard-missing-row {
  min-height: 34px;
  grid-template-columns: minmax(84px, 0.85fr) minmax(72px, 1fr) 28px;
  gap: 8px;
  padding: 4px 12px;
}

.dashboard-bi-activity .dashboard-missing-row > strong {
  font-size: 11px;
}

.dashboard-bi-activity .dashboard-missing-row > b {
  font-size: 11px;
}

.dashboard-bi-activity .dashboard-daily-quality-empty {
  min-height: 116px;
}

.dashboard-rule-comparison-list {
  display: grid;
}

.dashboard-rule-comparison-row {
  display: grid;
  min-height: 48px;
  grid-template-columns: minmax(78px, 0.8fr) minmax(64px, 1fr) 92px;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid #e2e8ee;
}

.dashboard-rule-comparison-row:first-child { border-top: 0; }
.dashboard-rule-comparison-row > strong { overflow: hidden; color: #2d4258; font-size: 12px; line-height: 18px; text-overflow: ellipsis; white-space: nowrap; }
.dashboard-rule-comparison-track { position: relative; height: 10px; overflow: hidden; border-radius: 999px; background: #edf1f5; }
.dashboard-rule-comparison-track span { position: absolute; left: 0; border-radius: inherit; }
.dashboard-rule-comparison-track .sample { top: 0; height: 100%; background: #a9bfd3; }
.dashboard-rule-comparison-track .correction { top: 3px; height: 4px; background: #d88a30; }
.dashboard-rule-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.dashboard-rule-counts span { display: grid; justify-items: end; }
.dashboard-rule-counts b { color: #40566d; font-size: 12px; line-height: 15px; }
.dashboard-rule-counts span:last-child b { color: #9a651c; }
.dashboard-rule-counts small { color: #8391a0; font-size: 9px; line-height: 12px; }

@media (max-width: 1399px) {
  .dashboard-bi-people {
    grid-template-columns: 1fr;
  }

  .dashboard-bi-priority .dashboard-risk-row {
    grid-template-columns: 24px minmax(170px, 0.9fr) minmax(180px, 1.1fr) auto;
  }

  .dashboard-bi-priority .dashboard-priority-badge,
  .dashboard-bi-priority .dashboard-risk-actions .icon-button {
    display: none;
  }

  .dashboard-bi-priority .dashboard-risk-actions {
    grid-column: 4;
  }
}

@media (max-width: 1199px) {
  .dashboard-risk-overview {
    grid-template-columns: 1fr;
  }

  .dashboard-risk-summary-group {
    border-right: 0;
    border-bottom: 1px solid #e0e7ed;
  }

  .dashboard-risk-summary-group:last-child {
    border-bottom: 0;
  }

  .dashboard-bi-priority,
  .dashboard-bi-activity,
  .dashboard-bi-quality,
  .dashboard-bi-people,
  .dashboard-bi-governance {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 767px) {
  .dashboard-page { --dashboard-gap: 10px; }
  .dashboard-page > .page-head .head-actions { margin-top: 8px; }
  .dashboard-period-control > span { display: none; }
  .dashboard-period-control select { min-width: 126px; }
  .dashboard-period-range { display: none; }
  .dashboard-risk-summary-group.sources > div { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-view-tabs { display: flex; overflow-x: auto; }
  .dashboard-view-tabs button { min-width: 112px; flex: 1 0 auto; }
  .dashboard-section-lead { grid-template-columns: 34px minmax(0, 1fr); padding: 11px 12px; }
  .dashboard-section-lead > .badge { display: none; }
  .dashboard-section-lead-icon { width: 32px; height: 32px; }
  .dashboard-section-lead h2 { font-size: 14px; line-height: 20px; }
  .dashboard-bi-activity > .dashboard-activity-panel,
  .dashboard-bi-activity > .dashboard-chart-panel,
  .dashboard-bi-activity > .dashboard-daily-quality-panel { min-height: 0; }
  .dashboard-step-quality-row { grid-template-columns: minmax(150px, 1fr) repeat(2, minmax(58px, auto)); }
  .dashboard-step-quality-row > div:last-child { display: none; }
  .dashboard-rework-processes { grid-template-columns: 1fr; }
  .dashboard-reviewer-row { grid-template-columns: minmax(130px, 1.2fr) repeat(2, minmax(54px, 0.55fr)); }
  .dashboard-reviewer-row > div:nth-child(4),
  .dashboard-reviewer-row > div:nth-child(5) { display: none; }
  .dashboard-rule-kpis > div { padding: 10px 8px; }
  .dashboard-rule-kpis strong { font-size: 16px; }
  .dashboard-missing-row {
    grid-template-columns: minmax(96px, 0.8fr) minmax(110px, 1.2fr) 32px;
    gap: 8px;
    padding: 7px 11px;
  }
  .dashboard-daily-quality-body { grid-template-columns: 1fr; }
  .dashboard-daily-quality-summary { border-right: 0; border-bottom: 1px solid #e2e8ee; }
  .dashboard-personnel-table { min-width: 900px; }
  .dashboard-optimization-head { display: none; }
  .dashboard-optimization-list { min-width: 0; }
  .dashboard-optimization-row {
    min-width: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 9px 12px;
    padding: 12px;
  }
  .dashboard-optimization-row > div:first-child,
  .dashboard-optimization-action { grid-column: 1 / -1; }
  .dashboard-optimization-action {
    padding-top: 7px;
    border-top: 1px dashed #dbe3ea;
  }
}

/* Rules: rule identity and requirements stay prominent; implementation detail is secondary. */
.rules-page .rule-governance-warning strong {
  font-size: 13px;
  line-height: 19px;
}

.rules-page .rule-governance-warning span {
  font-size: 12px;
  line-height: 19px;
}

.rules-page .rule-project-scope label,
.rules-page .rule-profile-summary span,
.rules-page .rule-profile-summary small {
  font-size: 11px;
  line-height: 17px;
}

.rules-page .rule-profile-summary strong {
  font-size: 14px;
  line-height: 20px;
}

.rules-page .process-rule-code strong {
  font-size: 13px;
}

.rules-page .process-rule-code span,
.rules-page .process-rule-meta > span:not(.badge) {
  font-size: 11px;
  line-height: 17px;
}

.rules-page .process-rule-title strong {
  font-size: 14px;
  line-height: 20px;
}

.rules-page .process-rule-title span {
  font-size: 11px;
  line-height: 17px;
}

.rules-page .process-rule-title {
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.rules-page .process-rule-title > strong {
  margin-right: 2px;
}

.rules-page .process-rule-title .project-rule-tag {
  font-size: 10px;
  line-height: 14px;
}

.rules-page .process-rule-content > p {
  font-size: 12px;
  line-height: 19px;
}

.rules-page .process-rule-details summary span,
.rules-page .process-rule-step-group > strong,
.rules-page .process-rule-materials > strong {
  font-size: 12px;
  line-height: 18px;
}

.rules-page .process-rule-details summary b,
.rules-page .process-rule-content .process-rule-detail-body li small,
.rules-page .process-rule-materials small {
  font-size: 11px;
  line-height: 17px;
}

.rules-page .process-rule-content .process-rule-detail-body li,
.rules-page .process-rule-materials b,
.rules-page .process-rule-materials .empty {
  font-size: 12px;
  line-height: 18px;
}

/* Settings and every tab: consistent table, timeline and import typography. */
.settings-page .settings-nav button {
  min-height: 40px;
  font-size: 13px;
  font-weight: 680;
}

.settings-page .settings-empty-state strong,
.settings-page .user-identity strong,
.settings-page .cell-main strong,
.settings-page .backup-row strong {
  font-size: 13px;
  line-height: 19px;
}

.settings-page .settings-empty-state span,
.settings-page .user-identity small,
.settings-page .cell-main span,
.settings-page .backup-row span,
.settings-page .pipeline-copy span,
.settings-page .import-issue-meta,
.settings-page .import-issue-source-copy small,
.settings-page .import-issue-resolution,
.settings-page .import-issue-technical {
  font-size: 11px;
  line-height: 17px;
}

.settings-page .pipeline-copy strong,
.settings-page .pipeline-value,
.settings-page .import-issue-content,
.settings-page .import-issue-source-copy strong {
  font-size: 12px;
  line-height: 18px;
}

.settings-page .import-issues-summary h2,
.settings-page .drop-zone h2 {
  font-size: 15px;
  line-height: 21px;
}

.settings-page .import-issues-summary p,
.settings-page .drop-zone p {
  font-size: 12px;
  line-height: 19px;
}

.settings-page .import-issue-title strong {
  font-size: 13px;
  line-height: 19px;
}

.settings-page .import-issue-source-copy a,
.settings-page .import-issue-source-copy em {
  font-size: 10px;
  line-height: 15px;
}

.settings-page .event-row > strong {
  font-size: 13px;
  line-height: 19px;
}

.settings-page .event-row > span,
.settings-page .event-source-context small,
.settings-page .event-change-side small {
  font-size: 11px;
  line-height: 17px;
}

.settings-page .event-source-context b,
.settings-page .event-change-side b {
  font-size: 12px;
  line-height: 18px;
}

@media (max-width: 767px) {
  .import-source-nav { gap: 6px; padding: 6px; }
  .import-source-nav button { min-height: 44px; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 6px; padding: 6px 8px; }
  .import-source-nav button > svg { width: 16px; }
  .import-source-nav small { display: none; }
  .camera-api-form { padding: 13px; }
  .camera-api-fields { grid-template-columns: 1fr; gap: 11px; }
  .camera-api-actions { align-items: stretch; flex-direction: column; }
  .camera-api-actions .inline-actions { display: grid; width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .camera-api-actions .inline-actions .button { justify-content: center; }
  .camera-api-actions .inline-actions .button.primary { grid-column: 1 / -1; }
  :is(.excellent-cases-page, .dashboard-page, .rules-page, .settings-page) > .page-head {
    align-items: flex-start;
  }

  .excellent-cases-page .excellent-case-hero-copy h2 {
    font-size: 19px;
    line-height: 25px;
  }

  .settings-page .settings-nav button {
    min-height: 44px;
    font-size: 12px;
  }

  .access-control-head {
    align-items: flex-start;
    flex-direction: column;
    padding: 13px;
  }

  .access-control-head-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
  }

  .access-control-head-actions .inline-actions { justify-content: flex-start; }
  .access-control-stats { display: none; }

  .ai-settings-form { padding: 13px; }
  .ai-engine-grid,
  .ai-provider-links,
  .ai-provider-config-grid { grid-template-columns: 1fr; }
  .ai-provider-links > div { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ai-model-control { grid-template-columns: minmax(0, 1fr) auto auto; }
  .ai-settings-foot { align-items: stretch; flex-direction: column; }
  .ai-settings-foot .button { justify-content: center; }

  .access-control-nav {
    overflow-x: auto;
    padding-right: 10px;
    padding-left: 10px;
  }

  .access-control-nav button {
    min-height: 40px;
    flex: 0 0 auto;
  }

  .access-control-content { min-height: 0; }

  .access-entity-row {
    grid-template-columns: 34px minmax(0, 1fr) auto;
    gap: 9px;
    padding: 11px 12px;
  }

  .access-entity-policy {
    grid-column: 2;
  }

  .access-entity-members {
    grid-column: 3;
    grid-row: 1;
    text-align: right;
  }

  .access-entity-row > .inline-actions {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .access-entity-copy p { white-space: normal; }

  .org-workspace {
    max-height: none;
    grid-template-columns: 1fr;
  }

  .org-tree-panel {
    max-height: 310px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .org-detail-panel { padding: 14px 12px 18px; }
  .org-detail-head { gap: 8px; }
  .org-detail-head h3 { font-size: 16px; line-height: 22px; }
  .org-detail-actions .button { min-height: 40px; }
  .org-detail-sections { grid-template-columns: 1fr; gap: 15px; }
  .org-member-list,
  .org-child-list { max-height: 220px; }
  .department-member-toolbar { align-items: stretch; flex-direction: column; }
  .department-member-toolbar .search-field { width: 100%; }
  .department-member-toolbar .inline-actions { justify-content: stretch; }
  .department-member-toolbar .inline-actions .button { min-height: 40px; flex: 1; }
  .department-member-list { grid-template-columns: 1fr; max-height: 50vh; }
  .department-member-option { min-height: 56px; }
  .access-operation-log-list { max-height: 60vh; }
  .access-log-row summary {
    grid-template-columns: minmax(92px, .7fr) minmax(90px, .8fr) auto 16px;
    gap: 6px;
    padding: 9px 12px;
  }
  .access-log-target { grid-column: 1 / -1; grid-row: 2; }
  .access-log-summary { grid-column: 1 / 4; grid-row: 3; }
  .access-log-chevron { grid-column: 4; grid-row: 3; }
  .access-log-details { grid-template-columns: 1fr; padding: 0 12px 12px; }
}

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