:root {
  --bg: #f1f4f9;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --ink: #1a2434;
  --muted: #6b7891;
  --line: #e3e8f1;
  --line-strong: #d4dbe7;
  --primary: #2563eb;
  --primary-strong: #1d4ed8;
  --primary-soft: #e8efff;
  --primary-ink: #1e40af;
  --accent: #0f766e;
  --accent-soft: #e6f5f2;
  --blue: #2563eb;
  --blue-soft: #e8efff;
  --warn: #b45309;
  --warn-soft: #fff7ed;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --ok: #16794c;
  --ok-soft: #edfdf5;
  --sidebar-bg: #1f2a44;
  --sidebar-bg-soft: #243355;
  --sidebar-ink: #e8edf6;
  --sidebar-muted: #93a0bd;
  --sidebar-line: #2c3a5a;
  --sidebar-active: #2c64ff;
  --sidebar-active-bg: rgba(56, 110, 255, 0.16);
  --shadow: 0 8px 24px rgba(31, 42, 68, 0.06);
  --shadow-card: 0 1px 2px rgba(31, 42, 68, 0.04), 0 4px 12px rgba(31, 42, 68, 0.04);
  --radius: 8px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: "SF Pro Text", "PingFang SC", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }

button {
  border: 1px solid var(--primary-strong);
  border-radius: var(--radius);
  padding: 9px 14px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

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

button:active {
  transform: translateY(1px);
}

button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.22);
}

button.secondary {
  background: #fff;
  color: var(--ink);
  border-color: var(--line-strong);
  font-weight: 600;
}

button.secondary:hover {
  background: var(--panel-soft);
  border-color: #c4cee0;
  color: var(--primary-strong);
}

button:disabled,
button.secondary:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  background: var(--panel-soft);
  color: var(--muted);
  border-color: var(--line);
  transform: none;
}

input, select, textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 9px 11px;
  background: #fff;
  color: var(--ink);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

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

textarea.compact { min-height: 76px; }

label {
  display: grid;
  gap: 6px;
  color: #32413d;
  font-size: 13px;
  font-weight: 700;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  gap: 0;
  padding: 0;
  background: var(--bg);
}

.sidebar,
.main-shell {
  min-width: 0;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--sidebar-bg);
  color: var(--sidebar-ink);
  min-height: 100vh;
  padding: 18px 14px 24px;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow-y: auto;
}

.main-shell {
  padding: 20px 24px 32px;
}

.panel,
.metric-card,
.record-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.topbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 16px 20px;
}

.panel {
  padding: 18px 20px 20px;
}

.panel.flat,
.panel.no-accent {
  background: var(--panel);
  border-color: var(--line);
}

.inspection-announcement.panel {
  background: #f5f9ff;
  border-color: #c8d8f3;
}

.brand-card {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 6px 8px 18px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--sidebar-line);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 4px 12px rgba(29, 78, 216, 0.4);
}

.brand-card h1,
.topbar h2,
.panel h3 {
  margin: 0;
}

.brand-card h1 {
  font-size: 16px;
  color: var(--sidebar-ink);
  font-weight: 700;
}

.brand-card p {
  margin: 2px 0 0;
  color: var(--sidebar-muted);
  font-size: 12px;
}

.topbar p,
.panel p {
  margin: 0;
  color: var(--muted);
}

.nav-card {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  display: grid;
  gap: 14px;
}

.side-panel {
  background: var(--sidebar-bg-soft);
  border: 1px solid var(--sidebar-line);
  border-radius: 8px;
  padding: 14px 14px 12px;
  color: var(--sidebar-muted);
  margin-top: auto;
}

.nav-group,
.page-stack,
.content-wrap,
.stack-list,
.step-list,
.field-grid,
.table-card-grid,
.bucket-list {
  display: grid;
  gap: 12px;
}

.nav-group {
  gap: 2px;
}

.nav-title,
.panel-title,
.page-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--sidebar-muted);
}

.nav-title {
  padding: 0 10px 6px;
}

.panel-title {
  color: var(--sidebar-muted);
  margin-bottom: 8px;
}

.page-eyebrow {
  color: #7a8aa6;
  margin-bottom: 4px;
}

.nav-link {
  position: relative;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-radius: 7px;
  border: 1px solid transparent;
  color: var(--sidebar-ink);
  font-weight: 500;
  font-size: 13.5px;
  transition: background 120ms ease, color 120ms ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
}

.nav-link.active {
  background: var(--sidebar-active-bg);
  border-color: transparent;
  color: #ffffff;
  font-weight: 600;
}

.nav-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--sidebar-active);
}

.step-item {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  color: var(--sidebar-muted);
  font-size: 12.5px;
}

.step-item span {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(56, 110, 255, 0.18);
  color: #93b4ff;
  font-size: 12px;
  font-weight: 700;
  flex: none;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 16px;
}

.topbar h2 {
  font-size: 22px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.icon-button {
  width: 38px;
  height: 38px;
  padding: 0;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}

.icon-button:hover {
  background: var(--panel-soft);
  color: var(--primary);
  border-color: var(--primary-soft);
}

.status {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--primary-soft);
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--primary-ink);
  font-weight: 600;
  font-size: 13px;
}

.status.error {
  border-color: #fbd5d0;
  background: var(--danger-soft);
  color: var(--danger);
}

.status.warn {
  border-color: #fed7aa;
  background: var(--warn-soft);
  color: var(--warn);
}

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

.section-head h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.005em;
}

.section-head p {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

.section-head.no-accent { padding-left: 0; }

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

.metric-card {
  position: relative;
  padding: 16px 18px 16px 20px;
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  transition: transform 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.metric-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(31, 42, 68, 0.08);
}

.metric-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 14px;
  bottom: 14px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.metric-card.warn::before { background: var(--warn); }
.metric-card.ok::before { background: var(--ok); }
.metric-card.danger::before { background: var(--danger); }
.metric-card.blue::before { background: var(--primary); }
.metric-card.neutral::before { background: #94a3b8; }

.metric-card.warn { background: #fffaf3; border-color: #fadcb8; }
.metric-card.danger { background: var(--danger-soft); border-color: #f4c5bf; }
.metric-card.ok { background: var(--ok-soft); border-color: #c4ebd6; }

.metric-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.metric-value {
  margin-top: 6px;
  font-size: 26px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.metric-note {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.ops-page {
  gap: 10px;
}

.inspection-announcement {
  padding: 14px 18px;
  border-color: #c8d8f3;
  background: #f5f9ff;
  box-shadow: none;
}

.announcement-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.announcement-head h3 {
  margin: 0;
  font-size: 15px;
  color: var(--primary-ink);
}

.announcement-head p {
  margin: 0;
  color: var(--muted);
}

.announcement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.announcement-status,
.announcement-note {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #c8d8f3;
  border-radius: 6px;
  background: #fff;
  font-size: 13px;
}

.announcement-status strong {
  color: var(--primary-ink);
}

.announcement-status span,
.announcement-note {
  color: #354660;
}

.compact-head {
  margin-bottom: 10px;
}

.compact-head h3 {
  font-size: 15px;
}

.compact-head p {
  font-size: 12px;
}

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

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

.field-grid .wide {
  grid-column: 1 / -1;
}

.inline-form,
.form-actions {
  display: flex;
  gap: 10px;
  align-items: end;
}

.inline-form label {
  min-width: min(380px, 100%);
}

.check-label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 40px;
}

.check-label input {
  width: auto;
}

.diagnostic-control-wrap {
  margin-top: 8px;
}

.diagnostic-control-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
  background: #fff;
}

.diagnostic-control-table th,
.diagnostic-control-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.diagnostic-control-table th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  background: var(--panel-soft);
}

.diagnostic-control-table tr:last-child td {
  border-bottom: 0;
}

.diagnostic-control-table input {
  min-width: 0;
  padding: 8px 9px;
}

.diagnostic-control-table button {
  width: 72px;
  padding: 8px 0;
}

.compact-check {
  min-height: 0;
  font-size: 13px;
  white-space: nowrap;
}

.diagnostic-result {
  margin-top: 14px;
  display: grid;
  gap: 12px;
}

.diagnostic-filter-bar,
.diagnostic-list-head,
.diagnostic-pager {
  display: flex;
  gap: 10px;
  align-items: end;
  justify-content: space-between;
}

.diagnostic-filter-bar {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #fff;
}

.diagnostic-filter-bar label {
  width: min(220px, 100%);
}

.diagnostic-filter-meta {
  flex: 1;
  min-width: 220px;
  color: var(--muted);
}

.diagnostic-list-head {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.diagnostic-pager {
  align-items: center;
}

.diagnostic-pager button {
  width: auto;
  padding: 7px 10px;
}

.diagnostic-pager span {
  min-width: 52px;
  text-align: center;
  color: var(--muted);
  font-weight: 800;
}

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

.diagnostic-table {
  min-width: 980px;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}

.resource-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
  background: #fff;
}

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

.resource-table th {
  color: #4a5871;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #f4f7fc;
  border-bottom: 1px solid var(--line-strong);
}

.resource-table tbody tr:hover td {
  background: #f7f9fd;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--blue-soft);
  color: var(--primary-ink);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid rgba(37, 99, 235, 0.16);
}

.badge.warn { background: var(--warn-soft); color: var(--warn); border-color: #f7d2a0; }
.badge.danger { background: var(--danger-soft); color: var(--danger); border-color: #f4c5bf; }
.badge.error { background: var(--danger-soft); color: var(--danger); border-color: #f4c5bf; }
.badge.ok { background: var(--ok-soft); color: var(--ok); border-color: #b8e3cc; }
.badge.neutral { background: #eef1f7; color: #475569; border-color: #dee3ec; }
.badge.blue { background: var(--blue-soft); color: var(--primary-ink); border-color: rgba(37, 99, 235, 0.16); }

.ghost-link {
  color: var(--primary);
  font-weight: 600;
  font-size: 13px;
}

.ghost-link:hover {
  color: var(--primary-strong);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.record-card {
  padding: 12px;
  display: grid;
  gap: 6px;
}

.record-title {
  font-weight: 800;
}

.analysis-card {
  gap: 10px;
}

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

.analysis-section {
  display: grid;
  gap: 6px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
}

.problem-point {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  background: var(--warn-soft);
  color: #3a2a18;
}

.problem-point strong {
  font-size: 15px;
}

.analysis-label {
  color: #53615d;
  font-size: 12px;
  font-weight: 800;
}

.analysis-text {
  color: #243330;
  word-break: break-word;
}

.analysis-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.analysis-list {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-left: 3px solid #93b4ff;
  background: var(--blue-soft);
  color: #243047;
  border-radius: 4px;
}

.analysis-steps {
  margin: 0;
  padding-left: 20px;
  color: #243330;
}

.direct-steps {
  padding-top: 4px;
}

.direct-steps li + li {
  margin-top: 4px;
}

.analysis-raw summary {
  color: var(--muted);
  cursor: pointer;
  font-weight: 700;
}

.record-meta,
.summary-line,
.empty-state {
  color: var(--muted);
}

.summary-line {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel-soft);
}

.ads-quality-state {
  margin-bottom: 12px;
}

.ads-quality-page,
.ads-quality-page > .panel,
.ads-quality-page .table-wrap {
  min-width: 0;
}

.ads-anomaly-toolbar,
.ads-anomaly-pagination {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.ads-anomaly-toolbar {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.ads-anomaly-toolbar label {
  display: grid;
  gap: 6px;
  min-width: 180px;
}

.ads-anomaly-search {
  flex: 1 1 320px;
}

.ads-anomaly-table-scroll {
  overflow-x: auto;
}

.ads-anomaly-table {
  min-width: 1040px;
}

.ads-anomaly-warnings {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
}

.ads-anomaly-warnings ul {
  margin: 0;
  padding-left: 20px;
}

.ads-anomaly-pagination {
  align-items: center;
  margin-top: 12px;
}

.ads-rule-toolbar,
.ads-rule-row-actions,
.ads-rule-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.ads-rule-toolbar {
  margin-bottom: 12px;
}

.ads-rule-toolbar h2 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

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

.ads-rule-toolbar .actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ads-rule-open-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fed7aa;
  border-left: 4px solid var(--warn);
  border-radius: 6px;
  background: var(--warn-soft);
  color: var(--warn);
}

.ads-rule-list-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ads-rule-list-toolbar label {
  width: min(520px, 100%);
}

.ads-rule-grid-scroll {
  overflow-x: auto;
}

.ads-rule-table {
  min-width: 1440px;
}

.ads-rule-row-actions {
  align-items: center;
  justify-content: flex-start;
}

.ads-rule-row-actions button {
  padding: 6px 10px;
}

.ads-rule-edit-input {
  min-width: 148px;
  min-height: 44px;
}

.ads-rule-edit-rule-text {
  min-width: 260px;
  min-height: 44px;
}

.ads-rule-import-errors {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid #fecaca;
  border-left: 4px solid var(--danger);
  border-radius: 6px;
  background: var(--danger-soft);
  color: var(--danger);
}

.ads-rule-import-errors ul {
  margin: 0;
  padding-left: 20px;
}

.ads-rule-pagination {
  margin-top: 12px;
}

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

.bucket-row {
  display: grid;
  grid-template-columns: 120px 1fr 72px;
  align-items: center;
  gap: 10px;
}

.bucket-track {
  height: 8px;
  border-radius: 999px;
  background: #e5ebf5;
  overflow: hidden;
}

.bucket-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #60a5fa);
  border-radius: 999px;
}

.hidden {
  display: none;
}

.log-result {
  margin-top: 14px;
  display: grid;
  gap: 10px;
}

.log-box {
  margin: 0;
  max-height: 340px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #101817;
  color: #d6f3ec;
  white-space: pre-wrap;
  word-break: break-word;
}

.bridge-output {
  margin: 0;
  margin-top: 12px;
  max-height: min(420px, 48vh);
  overflow: auto;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcff;
  color: var(--ink);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
}

.bridge-output.bridge-dispatch-summary {
  background: #fff;
  color: var(--ink);
  white-space: normal;
  font-family: inherit;
  font-size: 13px;
  max-height: min(460px, 52vh);
  padding: 14px;
  border-color: #d7e0ee;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.bridge-dispatch-summary .bridge-dispatch-head {
  display: inline-flex;
  margin-bottom: 10px;
}

.bridge-dispatch-summary .bridge-dispatch-section {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafd;
}

.bridge-dispatch-summary .bridge-dispatch-section h4 {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.bridge-dispatch-summary ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 210px;
  overflow: auto;
}

.bridge-dispatch-summary code {
  font-size: 11px;
  overflow-wrap: anywhere;
}

.bridge-path-list {
  padding-right: 4px;
}

.bridge-path-list li {
  line-height: 1.55;
}

.bridge-missing-section {
  border-color: #f2d3aa;
  background: #fffaf3;
}

.bridge-error-section {
  border-color: #f4c5bf;
  background: #fff7f6;
}

.bridge-scan-chips {
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  margin: 8px 0 0;
}

.bridge-page {
  gap: 14px;
}

.bridge-hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  min-height: 104px;
  padding: 20px 22px;
  border: 1px solid #dbe4f0;
  border-radius: 10px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 255, 0.92)),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(15, 118, 110, 0.08));
  box-shadow: var(--shadow-card);
}

.bridge-hero-band h3 {
  margin: 4px 0 3px;
  font-size: 22px;
  line-height: 1.2;
  color: #18263a;
}

.bridge-hero-band p {
  color: #64748b;
}

.bridge-hero-kicker {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border: 1px solid #c8d7ee;
  border-radius: 999px;
  background: #eef5ff;
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.bridge-hero-flow {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 8px;
  align-items: center;
}

.bridge-hero-flow span {
  position: relative;
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border: 1px solid #d8e0eb;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #42526b;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.bridge-hero-flow span + span::before {
  content: "→";
  position: absolute;
  left: -14px;
  color: #94a3b8;
}

.bridge-split-uneven {
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: start;
}

.bridge-split-uneven > .panel,
.bridge-command-grid > .panel {
  display: flex;
  flex-direction: column;
}

.bridge-report-card,
.bridge-dispatch-card,
.bridge-events-panel {
  border-color: #dbe3ef;
  box-shadow: 0 8px 22px rgba(31, 42, 68, 0.06);
}

.bridge-metric-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.bridge-metric-chip {
  position: relative;
  padding: 13px 14px 13px 16px;
  border: 1px solid #dce4f0;
  border-radius: 8px;
  background: #fff;
  display: grid;
  gap: 4px;
  min-width: 0;
  box-shadow: 0 1px 0 rgba(15, 30, 27, 0.02), 0 4px 12px rgba(31, 42, 68, 0.03);
  transition: transform 120ms ease, box-shadow 120ms ease;
  overflow: hidden;
}

.bridge-metric-chip:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(15, 30, 27, 0.06);
}

.bridge-metric-chip::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--primary);
}

.bridge-metric-chip.warn {
  background: #fffaf3;
  border-color: #fadcb8;
}

.bridge-metric-chip.warn::before { background: var(--warn); }
.bridge-metric-chip.ok::before { background: var(--ok); }
.bridge-metric-chip.danger::before { background: var(--danger); }
.bridge-metric-chip.blue::before { background: var(--blue); }

.bridge-metric-chip .chip-label {
  font-size: 11px;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.bridge-metric-chip .chip-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--ink);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.bridge-metric-chip .chip-note {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bridge-config {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dce4f0;
  border-radius: 8px;
}

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

.bridge-scan-form,
.bridge-filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-end;
  margin-bottom: 12px;
  padding: 10px 12px;
  background: #f8fbff;
  border: 1px solid #dce4f0;
  border-radius: 8px;
}

.bridge-dispatch-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
  align-items: end;
  padding: 14px;
  background: #f8fbff;
  border: 1px solid #dce4f0;
  border-radius: 8px;
}

.bridge-dispatch-form .wide {
  grid-column: 1 / -1;
}

.bridge-task-input {
  gap: 6px;
}

.bridge-dispatch-form textarea {
  min-height: 64px;
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 13px;
  resize: vertical;
  background: #fff;
}

.bridge-dispatch-form input {
  min-height: 34px;
  padding: 6px 9px;
}

.bridge-dispatch-form label {
  font-size: 12px;
  gap: 5px;
}

.bridge-dispatch-form .form-actions button {
  padding: 8px 13px;
}

.bridge-dispatch-grid {
  display: grid;
  grid-template-columns: minmax(132px, 0.85fr) minmax(200px, 1.15fr);
  gap: 10px;
  align-items: end;
}

.bridge-dispatch-grid label:last-child {
  grid-column: 1 / -1;
}

.bridge-input-with-action {
  display: flex;
  gap: 6px;
  align-items: center;
}

.bridge-dispatch-options,
.bridge-dispatch-toolbar {
  display: grid;
  grid-template-columns: minmax(172px, 1fr) minmax(88px, 0.48fr) minmax(96px, 0.55fr);
  gap: 10px;
  font-size: 12px;
  align-items: stretch;
}

.bridge-dispatch-options .inline-field.tight,
.bridge-dispatch-toolbar .inline-field.tight {
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  gap: 5px;
}

.bridge-dispatch-options .inline-field.tight input,
.bridge-dispatch-toolbar .inline-field.tight input {
  width: 100%;
  min-height: 34px;
  padding: 6px 8px;
}

.checkbox-field {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
}

.checkbox-field input[type="checkbox"] {
  appearance: none;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border: 1px solid #b8c5d8;
  border-radius: 6px;
  background: #fff;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.checkbox-field input[type="checkbox"]:checked {
  background: var(--primary);
  border-color: var(--primary);
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.22);
}

.checkbox-field input[type="checkbox"]:checked::after {
  content: "";
  width: 8px;
  height: 14px;
  margin-top: -2px;
  border: solid #fff;
  border-width: 0 3px 3px 0;
  transform: rotate(45deg);
}

.bridge-option-card,
.bridge-risk-switch {
  min-height: 62px;
  padding: 10px 12px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
}

.bridge-option-card {
  justify-content: flex-start;
}

.bridge-option-card span,
.bridge-risk-switch span {
  display: grid;
  gap: 2px;
  line-height: 1.25;
}

.bridge-option-card strong,
.bridge-risk-switch strong {
  color: var(--ink);
  font-size: 13px;
}

.bridge-option-card small,
.bridge-risk-switch small {
  color: var(--muted);
  font-size: 12px;
}

.bridge-risk-switch {
  display: flex;
  align-items: center;
  border-color: #f2c6c0;
  background: #fff8f7;
}

.checkbox-field.danger span {
  color: var(--danger);
  font-weight: 700;
}

.checkbox-field.danger input[type="checkbox"]:checked {
  background: var(--danger);
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(180, 35, 24, 0.18);
}

.bridge-limit-field {
  min-width: 0;
  padding: 9px 10px;
  border: 1px solid #d8e2ef;
  border-radius: 8px;
  background: #fff;
}

.bridge-dispatch-hint {
  margin-top: -2px;
}

.bridge-input-with-action input {
  flex: 1;
  min-width: 0;
}

.link-button {
  background: transparent;
  border: 1px dashed #cbd5e1;
  color: var(--accent, var(--text));
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}

.link-button:hover {
  background: #eef7f5;
  border-style: solid;
}

.inline-field {
  display: grid;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
  min-width: 130px;
}

.inline-field input,
.inline-field select {
  font-size: 13px;
  font-weight: 400;
  color: var(--ink);
  padding: 6px 9px;
}

.bridge-filter-bar .inline-field,
.bridge-scan-form .inline-field {
  flex: 1 1 180px;
  min-width: 0;
}

.bridge-filter-bar .bridge-event-search-field {
  flex: 1.5 1 260px;
}

.inline-field.clickable-field {
  cursor: pointer;
  padding: 4px 8px;
  margin: -4px -8px;
  border-radius: var(--radius);
  transition: background 0.12s ease;
}

.inline-field.clickable-field:hover {
  background: var(--blue-soft);
}

.inline-field.clickable-field input,
.inline-field.clickable-field select {
  cursor: pointer;
}

.bridge-multi-field {
  position: relative;
}

.bridge-multi-select {
  position: relative;
  min-width: 0;
}

.bridge-multi-trigger {
  width: 100%;
  min-height: 34px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
  box-shadow: none;
}

.bridge-multi-trigger:hover,
.bridge-multi-select.open .bridge-multi-trigger {
  border-color: #9bbcff;
  box-shadow: 0 0 0 3px rgba(45, 105, 255, 0.12);
}

.bridge-multi-caret {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 11px;
}

.bridge-multi-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 30;
  display: none;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.16);
}

.bridge-multi-select.open .bridge-multi-menu {
  display: grid;
  gap: 3px;
}

.bridge-multi-menu label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 5px 7px;
  border-radius: 6px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
}

.bridge-multi-menu label:hover {
  background: var(--blue-soft);
}

.bridge-multi-menu input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--blue);
}

.bridge-scroll-table {
  max-height: 460px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.bridge-filter-toolbar {
  position: relative;
  align-items: center;
  min-height: 54px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.bridge-filter-title {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 0 10px;
  border-right: 1px solid #dce4f0;
  color: #46566f;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.bridge-events-panel .bridge-filter-bar {
  margin-bottom: 14px;
}

.bridge-events-table {
  overflow-x: hidden;
}

.bridge-events-table .resource-table {
  min-width: 0;
  table-layout: fixed;
  border-collapse: separate;
  border-spacing: 0 6px;
}

.bridge-events-table .resource-table th,
.bridge-events-table .resource-table td {
  padding: 7px 10px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.bridge-events-table .resource-table thead th {
  height: 34px;
  border-bottom: 1px solid #dfe7f3;
  color: #46566f;
  font-size: 12px;
  font-weight: 800;
}

.bridge-events-table .resource-table tbody tr {
  background: #fff;
  transition: background 0.12s ease, box-shadow 0.12s ease;
}

.bridge-events-table .resource-table tbody td {
  height: 54px;
  border-top: 1px solid transparent;
  border-bottom: 1px solid #e4ebf5;
}

.bridge-events-table .resource-table tbody tr:hover td {
  background: #f8fbff;
}

.bridge-events-table .resource-table tbody tr.bridge-event-selected td {
  background: #fff;
  border-top-color: #2f7df6;
  border-bottom-color: #2f7df6;
  box-shadow: 0 0 0 1px rgba(47, 125, 246, 0.08);
}

.bridge-events-table .resource-table tbody tr.bridge-event-selected td:first-child {
  border-left: 2px solid #2f7df6;
  border-radius: 8px 0 0 8px;
}

.bridge-events-table .resource-table tbody tr.bridge-event-selected td:last-child {
  border-right: 2px solid #2f7df6;
  border-radius: 0 8px 8px 0;
}

.bridge-events-table .resource-table th:nth-child(1),
.bridge-events-table .resource-table td:nth-child(1) {
  width: 6%;
}

.bridge-events-table .resource-table th:nth-child(2),
.bridge-events-table .resource-table td:nth-child(2) {
  width: 13%;
}

.bridge-events-table .resource-table th:nth-child(3),
.bridge-events-table .resource-table td:nth-child(3) {
  width: 7%;
}

.bridge-events-table .resource-table th:nth-child(4),
.bridge-events-table .resource-table td:nth-child(4) {
  width: 31%;
}

.bridge-events-table .resource-table th:nth-child(5),
.bridge-events-table .resource-table td:nth-child(5) {
  width: 15%;
}

.bridge-events-table .resource-table th:nth-child(6),
.bridge-events-table .resource-table td:nth-child(6) {
  width: 15%;
}

.bridge-events-table .resource-table th:nth-child(7),
.bridge-events-table .resource-table td:nth-child(7) {
  width: 13%;
}

.bridge-events-table .resource-table th:not(:nth-child(4)),
.bridge-events-table .resource-table td:not(:nth-child(4)) {
  text-align: center;
}

.bridge-checks-table,
.bridge-dispatch-log-table {
  overflow-x: hidden;
  overflow-y: auto;
}

.bridge-checks-table .resource-table,
.bridge-dispatch-log-table .resource-table {
  min-width: 0;
  table-layout: fixed;
}

.bridge-checks-table .resource-table th,
.bridge-checks-table .resource-table td,
.bridge-dispatch-log-table .resource-table th,
.bridge-dispatch-log-table .resource-table td {
  padding: 10px 12px;
  overflow-wrap: anywhere;
}

.bridge-checks-table .resource-table th:nth-child(1),
.bridge-checks-table .resource-table td:nth-child(1) {
  width: 96px;
}

.bridge-checks-table .resource-table th:nth-child(3),
.bridge-checks-table .resource-table td:nth-child(3) {
  width: 116px;
}

.bridge-checks-table .resource-table th:nth-child(4),
.bridge-checks-table .resource-table td:nth-child(4) {
  width: 142px;
}

.bridge-checks-table .resource-table th:nth-child(5),
.bridge-checks-table .resource-table td:nth-child(5) {
  width: 190px;
}

.bridge-dispatch-log-table .resource-table th:nth-child(1),
.bridge-dispatch-log-table .resource-table td:nth-child(1) {
  width: 118px;
}

.bridge-dispatch-log-table .resource-table th:nth-child(3),
.bridge-dispatch-log-table .resource-table td:nth-child(3) {
  width: 88px;
}

.bridge-dispatch-log-table .resource-table th:nth-child(4),
.bridge-dispatch-log-table .resource-table td:nth-child(4) {
  width: 96px;
}

.bridge-dispatch-log-table .resource-table th:nth-child(5),
.bridge-dispatch-log-table .resource-table td:nth-child(5) {
  width: 120px;
}

.bridge-event-main {
  min-width: 0;
}

.bridge-event-title {
  max-width: 100%;
  color: var(--ink);
  font-weight: 700;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bridge-event-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  justify-content: center;
}

.bridge-event-error {
  margin-top: 3px;
  color: var(--danger);
}

.bridge-schedule-summary {
  min-width: 0;
  display: grid;
  gap: 2px;
  justify-items: center;
  align-content: start;
  text-align: center;
}

.bridge-schedule-summary strong {
  color: var(--ink);
  font-weight: 800;
  line-height: 1.35;
}

.bridge-page .table-wrap {
  border: none;
  border-radius: 10px;
  background: transparent;
}

.bridge-scroll-table table thead th {
  position: sticky;
  top: 0;
  background: #f4f7fc;
  z-index: 1;
  box-shadow: 0 1px 0 var(--line-strong);
}

.bridge-actions {
  display: inline-flex;
  max-width: 100%;
  gap: 5px;
  justify-content: center;
  align-items: center;
  align-content: center;
  flex-wrap: nowrap;
  white-space: nowrap;
}

.bridge-actions button {
  min-width: 34px;
  padding: 4px 6px;
  font-size: 12px;
  line-height: 1.2;
  border-radius: 6px;
}

.bridge-drawer-open {
  overflow: hidden;
}

.bridge-detail-backdrop.hidden {
  display: none;
}

.bridge-detail-backdrop {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  justify-content: flex-end;
  background: rgba(15, 23, 42, 0.28);
}

.bridge-detail-scrim {
  position: absolute;
  inset: 0;
}

.bridge-detail-drawer {
  position: relative;
  z-index: 1;
  width: min(760px, 92vw);
  height: 100vh;
  background: #fff;
  box-shadow: -18px 0 45px rgba(21, 33, 57, 0.22);
  display: grid;
  grid-template-rows: auto 1fr;
  overflow: hidden;
}

.bridge-detail h4,
.bridge-detail-drawer h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.4;
}

.bridge-detail-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
  background: #f8fbff;
}

.bridge-detail-body {
  min-height: 0;
  padding: 16px 20px 22px;
  overflow-y: auto;
  display: grid;
  align-content: start;
  gap: 14px;
}

.bridge-detail-section {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  padding: 14px;
  display: grid;
  gap: 12px;
}

.bridge-detail-section-title {
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.bridge-detail-title {
  color: var(--ink);
  font-weight: 700;
  line-height: 1.35;
}

.bridge-detail-meta-grid {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}

.bridge-detail-meta-grid div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.bridge-detail-meta-grid .wide {
  grid-column: 1 / -1;
}

.bridge-detail-meta-grid dt {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.bridge-detail-meta-grid dd {
  margin: 4px 0 0;
  color: var(--ink);
  font-size: 13px;
  overflow-wrap: anywhere;
}

.bridge-detail-error {
  padding: 10px 12px;
  border: 1px solid rgba(220, 38, 38, 0.28);
  border-radius: 8px;
  color: var(--danger);
  background: #fff5f5;
  font-size: 13px;
}

.bridge-schedule-detail-grid {
  display: grid;
  gap: 10px;
}

.bridge-schedule-detail-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 128px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
}

.bridge-schedule-detail-card strong {
  display: block;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.bridge-schedule-detail-main {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.bridge-detail-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 4px;
  font-size: 13px;
}

.bridge-check-dedupe-note {
  padding: 8px 10px;
  border: 1px solid #d7e2f2;
  border-radius: 8px;
  background: #f8fbff;
  color: var(--muted);
  font-size: 12px;
}

.bridge-check-result-grid {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.bridge-check-result-head,
.bridge-check-result-row {
  display: grid;
  grid-template-columns: minmax(118px, 1fr) minmax(130px, 1.08fr) 86px minmax(112px, 0.92fr) minmax(140px, 1.15fr);
  gap: 10px;
  align-items: center;
}

.bridge-check-result-head {
  padding: 9px 12px;
  background: #f4f7fc;
  color: #46566f;
  font-size: 11px;
  font-weight: 800;
  border-bottom: 1px solid var(--line-strong);
}

.bridge-check-result-row {
  min-height: 72px;
  padding: 10px 12px;
  border-top: 1px solid var(--line);
}

.bridge-check-result-head + .bridge-check-result-row {
  border-top: 0;
}

.bridge-check-result-row.is-failed {
  background: #fffafa;
}

.bridge-check-result-row.is-skipped {
  background: #fbfcff;
}

.bridge-check-cell {
  min-width: 0;
  display: grid;
  gap: 4px;
  align-content: center;
  justify-items: start;
}

.bridge-check-label {
  display: none;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.bridge-check-table code {
  display: block;
  max-width: 100%;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bridge-check-status {
  justify-items: center;
}

.bridge-check-logic {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.bridge-check-evidence strong {
  color: var(--ink);
  font-size: 12px;
  line-height: 1.35;
}

.bridge-check-evidence .record-meta {
  font-size: 12px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.bridge-check-process {
  grid-column: 1 / -1;
  display: grid;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid #dce7f5;
  border-radius: 8px;
  background: #f8fbff;
}

.bridge-check-process-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}

.bridge-check-process-steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.bridge-check-process-step {
  min-width: 0;
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.bridge-check-process-index {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: #eef4ff;
  color: var(--primary);
  font-size: 12px;
  font-weight: 800;
}

.bridge-check-process-content {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.bridge-check-process-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.bridge-check-process-head strong {
  color: var(--ink);
  font-size: 12px;
}

.bridge-check-process-target {
  color: var(--ink);
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.bridge-collapsible-body.hidden {
  display: none;
}

.usage-hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: end;
  margin-bottom: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: linear-gradient(135deg, #ffffff 0%, #eef6ff 100%);
  box-shadow: var(--shadow-card);
}

.usage-hero-band h2 {
  margin: 2px 0 8px;
  font-size: 24px;
}

.usage-hero-band p {
  margin: 0;
  color: var(--muted);
}

.usage-filter-card {
  display: grid;
  grid-template-columns: repeat(2, 150px) auto;
  gap: 10px;
  align-items: end;
}

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

.usage-summary-card,
.panel-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
}

.usage-summary-card {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.usage-summary-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.usage-summary-card strong {
  font-size: 26px;
}

.panel-card {
  margin-top: 18px;
  padding: 16px;
}

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

.section-heading h3 {
  margin: 0;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--primary-ink);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.usage-api-call-detail {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-soft);
}

@media (max-width: 1180px) {
  .bridge-split-uneven {
    grid-template-columns: 1fr;
  }

  .bridge-hero-band {
    grid-template-columns: 1fr;
  }

  .bridge-hero-flow {
    grid-template-columns: repeat(2, minmax(0, auto));
    justify-content: start;
  }
}

code {
  font-family: "SFMono-Regular", Consolas, Menlo, monospace;
  font-size: 12px;
}

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

  .main-shell {
    order: 2;
    padding: 16px;
  }

  .sidebar {
    order: 1;
    position: static;
    min-height: 0;
    max-height: none;
    padding: 14px 16px;
  }

  .nav-link.active::before {
    display: none;
  }

  .side-panel {
    display: none;
  }

  .metric-grid,
  .split-grid,
  .analysis-grid,
  .field-grid,
  .table-card-grid,
  .compact-metrics {
    grid-template-columns: 1fr;
  }

  .topbar,
  .section-head,
  .inline-form,
  .ads-rule-toolbar,
  .ads-rule-toolbar .actions,
  .ads-rule-list-toolbar,
  .ads-anomaly-toolbar,
  .ads-anomaly-pagination,
  .diagnostic-filter-bar,
  .diagnostic-list-head {
    flex-direction: column;
    align-items: stretch;
  }

  .ads-anomaly-toolbar,
  .ads-anomaly-toolbar label,
  .ads-anomaly-pagination,
  .ads-anomaly-pagination button {
    width: 100%;
  }

  .ads-anomaly-search {
    flex: 1 1 auto;
  }

  .ads-anomaly-search input {
    height: auto;
    min-height: 44px;
  }

  .bridge-hero-band,
  .bridge-dispatch-grid,
  .bridge-dispatch-toolbar,
  .usage-hero-band,
  .usage-filter-card,
  .usage-summary-grid {
    grid-template-columns: 1fr;
  }

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

  .bridge-hero-flow {
    grid-template-columns: 1fr;
  }

  .bridge-hero-flow span + span::before {
    display: none;
  }

  .bridge-filter-title {
    width: 100%;
    border-right: 0;
    border-bottom: 1px solid #dce4f0;
    padding: 0 0 8px;
  }

  .bridge-filter-toolbar {
    align-items: stretch;
  }

  .bridge-filter-bar .inline-field,
  .bridge-scan-form .inline-field {
    flex-basis: 100%;
  }

  .bridge-events-table .resource-table,
  .bridge-events-table .resource-table thead,
  .bridge-events-table .resource-table tbody,
  .bridge-events-table .resource-table tr,
  .bridge-events-table .resource-table th,
  .bridge-events-table .resource-table td {
    display: block;
    width: 100%;
  }

  .bridge-events-table .resource-table thead {
    display: none;
  }

  .bridge-events-table .resource-table tr {
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
  }

  .bridge-events-table .resource-table td {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 8px;
    border-bottom: 0;
    padding: 6px 12px;
  }

  .bridge-events-table .resource-table td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
  }

  .bridge-events-table .bridge-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bridge-detail-drawer {
    width: min(680px, 96vw);
  }

  .bridge-check-result-head {
    display: none;
  }

  .bridge-check-result-row {
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .bridge-check-process-steps {
    grid-template-columns: 1fr;
  }

  .bridge-check-label {
    display: block;
  }

  .bridge-check-status {
    justify-items: start;
  }
}
