:root {
  --bg: #f4f7fb;
  --surface: #ffffff;
  --line: #d9e2ee;
  --line-strong: #c6d3e1;
  --text: #111827;
  --muted: #667085;
  --accent: #0f766e;
  --accent-strong: #0b5d58;
  --accent-soft: #e8f6f3;
  --nav: #08111f;
  --nav-2: #0d1a2d;
  --cyan: #0891b2;
  --cyan-soft: #e6f7fb;
  --warning: #b45309;
  --danger: #b42318;
  --ok: #15803d;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-raised: 0 10px 28px rgba(15, 23, 42, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a {
  color: var(--accent);
  text-decoration: none;
}

h1,
h2 {
  margin: 0 0 16px;
  line-height: 1.2;
}

h1 {
  font-size: 24px;
}

h2 {
  font-size: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
  background: #0d1524;
  color: #f9fafb;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  font-weight: 700;
}

.brand__mark {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.22), 0 8px 18px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.brand__mark img {
  display: block;
  width: 28px;
  height: 28px;
}

.brand__word {
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  letter-spacing: 0;
}

.brand__primary {
  color: #ffffff;
  font-size: 15px;
  font-weight: 760;
}

.brand__secondary {
  color: #9fd8cf;
  font-size: 14px;
  font-weight: 650;
}

.topbar__meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: #d1d5db;
  font-size: 13px;
}

.topbar__link {
  color: #e5e7eb;
  font-weight: 650;
}

.topbar__link:hover {
  color: #ffffff;
}

.language-switcher {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
}

.language-switcher a {
  min-width: 34px;
  padding: 3px 8px;
  border-radius: 999px;
  color: #d1d5db;
  font-size: 12px;
  font-weight: 750;
  text-align: center;
}

.language-switcher a.is-active {
  background: #ffffff;
  color: #0d1524;
}

.shell {
  max-width: 1180px;
  margin: 0 auto;
  padding: 24px;
}

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

.tabs a {
  padding: 10px 12px;
  color: var(--text);
  border-bottom: 2px solid transparent;
}

.tabs a:hover,
.tabs a.is-active {
  border-color: var(--accent);
}

.tabs a.is-active {
  color: var(--accent-strong);
  font-weight: 700;
}

.page-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 24px;
  align-items: center;
  padding: 24px;
  margin-bottom: 20px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #eef8f5 100%);
  box-shadow: var(--shadow);
}

.page-hero--simple {
  grid-template-columns: 1fr;
}

.page-hero h1 {
  max-width: 760px;
  margin-bottom: 10px;
  font-size: 28px;
}

.page-hero p,
.workflow-band p,
.support-card p,
.step-card p {
  margin: 0;
  color: var(--muted);
}

.eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
}

.hero-meter {
  display: grid;
  place-items: center;
  min-height: 132px;
  border: 1px solid #b9d6c8;
  border-radius: 8px;
  background: #ffffff;
}

.hero-meter__value {
  color: var(--accent-strong);
  font-size: 34px;
  font-weight: 780;
}

.hero-meter__label {
  color: var(--muted);
  font-size: 12px;
}

.operation-steps,
.support-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 22px;
}

.step-card,
.support-card {
  display: flex;
  gap: 14px;
  min-height: 170px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.step-card--ok {
  border-color: #b9d6c8;
}

.step-card--warning,
.step-card--danger {
  border-color: #efd8a7;
}

.step-card--danger {
  border-color: #f4b8b2;
}

.step-card__number {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 780;
}

.step-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.step-card__title {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  justify-content: space-between;
}

.step-card__title h2,
.support-card h2,
.workflow-band h2 {
  margin: 0;
}

.step-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.workflow-band {
  display: flex;
  gap: 20px;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  margin-bottom: 18px;
  border: 1px solid #cfe0dc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: var(--shadow);
}

.workflow-band--action {
  border-color: #b9d6c8;
  background: linear-gradient(135deg, #ffffff 0%, #f6fbf9 100%);
}

.workflow-band__content {
  min-width: 0;
}

.workflow-band__status {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.support-card {
  flex-direction: column;
}

.support-card--recommended {
  border-color: #b9d6c8;
  background: #fbfffd;
}

.support-card__tag {
  align-self: flex-start;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.support-card .button {
  align-self: flex-start;
  margin-top: auto;
}

.cutover-lane {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 20px;
}

.cutover-lane__item {
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  color: #344054;
  font-weight: 700;
  text-align: center;
  box-shadow: var(--shadow);
}

.cutover-lane__item:hover,
.cutover-lane__item.is-active {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

.panel--narrow {
  max-width: 440px;
  margin: 48px auto;
}

.auth-brand {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  box-shadow: 0 12px 24px rgba(15, 61, 94, 0.16);
  overflow: hidden;
}

.auth-brand img {
  display: block;
  width: 44px;
  height: 44px;
}

.auth-reason {
  margin: -4px 0 16px;
  color: var(--muted);
}

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

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

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

.metric__value {
  display: block;
  font-size: 28px;
  font-weight: 700;
}

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

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

.split > * {
  min-width: 0;
}

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

.section-heading--compact {
  margin-top: 20px;
  margin-bottom: 10px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

th,
td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  overflow-wrap: break-word;
  word-break: normal;
}

th {
  background: #f1f4f8;
  color: #344054;
  font-weight: 650;
}

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

.mono {
  font-family: "Cascadia Mono", "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  overflow-wrap: anywhere;
}

.secret {
  padding: 10px 12px;
  background: #f1f4f8;
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow-wrap: anywhere;
}

.subtle {
  color: var(--muted);
  font-size: 12px;
}

.visually-hidden-field {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden;
  border: 0 !important;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #344054;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

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

.badge--ok {
  background: #e7f6ee;
  color: var(--ok);
}

.badge--muted {
  background: #f2f4f7;
  color: var(--muted);
}

.badge--warning {
  background: #fff7e6;
  color: #9a5b00;
}

.badge--danger {
  background: #fff1f0;
  color: var(--danger);
}

.bot-score {
  display: grid;
  grid-template-columns: auto minmax(62px, 1fr);
  gap: 8px;
  align-items: center;
  max-width: 180px;
}

.bot-score__track {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e9ef;
}

.bot-score__fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #14b8a6, #dc2626);
}

.bot-score__fill--0 { width: 0%; }
.bot-score__fill--1 { width: 10%; }
.bot-score__fill--2 { width: 20%; }
.bot-score__fill--3 { width: 30%; }
.bot-score__fill--4 { width: 40%; }
.bot-score__fill--5 { width: 50%; }
.bot-score__fill--6 { width: 60%; }
.bot-score__fill--7 { width: 70%; }
.bot-score__fill--8 { width: 80%; }
.bot-score__fill--9 { width: 90%; }
.bot-score__fill--10 { width: 100%; }

.reason-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.reason-list span {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f4f8;
  color: #475467;
  font-size: 11px;
  font-weight: 650;
}

.reason-list--compact {
  max-width: 220px;
}

.quick-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.quick-filters a {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
}

.quick-filters a:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 12px;
}

.pagination + table {
  margin-top: 8px;
}

table + .pagination {
  margin-top: 12px;
  margin-bottom: 0;
}

.pagination__summary,
.pagination__page {
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}

.pagination__limits,
.pagination__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

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

.pagination__limits a {
  min-width: 34px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: #344054;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.pagination__limits a.is-active {
  border-color: #b9d6c8;
  background: #e7f6ee;
  color: var(--ok);
}

.button--disabled {
  opacity: 0.45;
  pointer-events: none;
}

.log-details {
  margin-top: 5px;
}

.log-details summary {
  width: fit-content;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.log-details > span {
  display: block;
  margin-top: 4px;
}

.log-details--inline {
  display: inline-flex;
  align-items: center;
  margin: 0;
}

.log-details--inline summary {
  padding: 2px 6px;
  border-radius: 999px;
  background: #f1f4f8;
}

.compact-token,
.compact-text {
  display: inline-block;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.compact-token {
  white-space: nowrap;
}

.compact-text {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  font-weight: 650;
  cursor: pointer;
}

.button:hover,
button:hover,
.button.is-active {
  border-color: var(--accent);
}

.button.is-active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.button--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: #ffffff;
}

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

.button--danger {
  color: var(--danger);
}

.link-button {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #ffffff;
}

.inline-form,
.actions form {
  display: inline;
}

.actions,
.stacked-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stacked-actions {
  max-width: 420px;
}

.compact-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.compact-form input[type="password"] {
  width: 170px;
}

.compact-form input[name="host"] {
  width: 260px;
}

.compact-form input[name="name"] {
  width: 200px;
}

.compact-form select[name="mode"] {
  width: 150px;
}

.compact-form input[name="reportPath"] {
  width: 250px;
}

.compact-form--stack {
  align-items: stretch;
  flex-direction: column;
}

.compact-form--stack input,
.compact-form--stack select,
.compact-form--stack button {
  width: 100%;
}

.compact-form--danger {
  align-items: center;
  padding-top: 6px;
  border-top: 1px solid var(--line);
}

.compact-form--danger .subtle {
  flex-basis: 100%;
  max-width: 320px;
}

.checkbox-set {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  min-width: 220px;
}

.checkbox-set label {
  display: flex;
  gap: 6px;
  align-items: center;
  min-width: 0;
}

.acme-form {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.4fr)
    minmax(150px, 1fr)
    minmax(130px, 0.7fr)
    auto
    auto
    minmax(190px, 1.2fr)
    auto
    auto;
  align-items: end;
}

.acme-form input,
.acme-form select {
  width: 100% !important;
}

.acme-form .check-line {
  align-self: center;
  white-space: nowrap;
}

.public-check-form input[name="httpPort"],
.public-check-form input[name="httpsPort"] {
  width: 96px;
}

.public-check-form input[name="path"],
.public-check-form input[name="timeoutMs"] {
  width: 170px;
}

.public-check-form input[name="site"],
.public-check-form input[name="blockedPorts"] {
  width: 260px;
}

.evidence-check-form input[name="acmePreflightReport"],
.evidence-check-form input[name="readinessReport"],
.evidence-check-form input[name="publicReport"],
.cutover-status-form input[name="acmePreflightReport"],
.cutover-status-form input[name="readinessReport"],
.cutover-status-form input[name="publicReport"],
.cutover-status-form input[name="rollbackReport"] {
  width: 320px;
}

.evidence-check-form input[name="expectedSiteCount"],
.cutover-status-form input[name="expectedSiteCount"] {
  width: 120px;
}

.evidence-check-form input[name="blockedPorts"],
.cutover-status-form input[name="blockedPorts"] {
  width: 260px;
}

.cutover-status-form select[name="phase"] {
  width: 160px;
}

.rollback-plan-form {
  align-items: center;
}

.step-list,
.command-list {
  margin: 0;
  padding-left: 20px;
}

.step-list li,
.command-list li {
  margin: 8px 0;
}

.command-list code {
  white-space: normal;
  word-break: break-word;
}

div.command-list {
  display: grid;
  gap: 8px;
  padding-left: 0;
}

div.command-list code {
  display: block;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.status-list {
  display: grid;
  gap: 8px;
  margin: 14px 0;
}

.status-list > div {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  min-height: 36px;
  padding: 8px 0;
  border-bottom: 1px solid #eef2f6;
}

.status-list strong {
  color: var(--accent-strong);
}

.guide-rail {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: guide-step;
}

.guide-rail li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  counter-increment: guide-step;
}

.guide-rail li::before {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 780;
  content: counter(guide-step);
}

.guide-rail strong,
.guide-rail span {
  grid-column: 2;
}

.guide-rail strong {
  align-self: end;
}

.guide-rail span {
  align-self: start;
  color: var(--muted);
  font-size: 12px;
}

.guide-rail .button {
  grid-row: 1 / span 2;
  grid-column: 3;
}

.command-chip {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f1f4f8;
}

.form-grid {
  display: grid;
  gap: 14px;
}

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

.filter-grid__check {
  min-height: 38px;
}

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

label span {
  display: block;
  margin-bottom: 5px;
  color: #344054;
  font-weight: 650;
}

input,
select {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

input[type="checkbox"] {
  width: auto;
  min-height: 0;
}

.checks {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.policy-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) minmax(180px, 1fr) minmax(180px, 1fr);
  gap: 14px;
  align-items: stretch;
}

.check-tile {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-height: 72px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.check-tile input {
  margin-top: 3px;
}

.check-tile strong,
.check-tile small {
  display: block;
}

.check-tile small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.form-section {
  grid-column: 1 / -1;
  padding: 14px 0 0;
  border: 0;
  border-top: 1px solid var(--line);
}

.form-section legend {
  padding: 0 8px 0 0;
  color: #344054;
  font-weight: 700;
}

.check-line {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.notice {
  padding: 10px 12px;
  margin-bottom: 14px;
  border: 1px solid #b9d6c8;
  border-radius: 6px;
  background: #eef8f3;
  color: var(--accent-strong);
}

.notice--error {
  border-color: #f4b8b2;
  background: #fff1f0;
  color: var(--danger);
}

.notice--warning {
  border-color: #f4d58d;
  background: #fff8e6;
  color: #8a5a00;
}

.danger-zone {
  border-color: #f4b8b2;
  background: linear-gradient(180deg, #ffffff 0%, #fffafa 100%);
}

.usage-bars {
  display: flex;
  align-items: end;
  gap: 5px;
  min-height: 180px;
  padding: 16px 8px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.usage-bar {
  position: relative;
  display: flex;
  flex: 1 1 0;
  align-items: end;
  min-width: 5px;
  height: 140px;
  border-radius: 999px;
  background: #e5e7eb;
  overflow: hidden;
}

.usage-bar__total,
.usage-bar__blocked {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  border-radius: 999px 999px 0 0;
}

.usage-bar__total {
  background: #0f766e;
  opacity: 0.65;
}

.usage-bar__blocked {
  z-index: 1;
  background: var(--danger);
}

.usage-chart {
  display: block;
  width: 100%;
  min-height: 180px;
  margin-top: 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.usage-chart__slot {
  fill: #e5e7eb;
}

.usage-chart__total {
  fill: #0f766e;
  opacity: 0.72;
}

.usage-chart__blocked {
  fill: var(--danger);
}

.usage-chart__axis {
  stroke: #cfd8e3;
  stroke-width: 1;
}

.usage-chart__label,
.usage-chart__peak {
  fill: #667085;
  font-size: 12px;
  font-weight: 700;
}

.usage-chart__label--end,
.usage-chart__peak {
  text-anchor: end;
}

.usage-chart__empty {
  fill: #667085;
  font-size: 14px;
  text-anchor: middle;
}

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

.signal-grid h3 {
  margin: 0 0 10px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.signal-row {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 6px 0;
  border-bottom: 1px solid #eef2f6;
}

.signal-row span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.site-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}

.site-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 190px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.site-card h2,
.site-card p {
  margin: 0;
}

.site-card p {
  margin: 8px 0 10px;
  color: var(--muted);
}

.site-card__heading {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
}

.site-card .button {
  align-self: flex-start;
  margin-top: 18px;
}

.empty-state {
  grid-column: 1 / -1;
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #ffffff;
  text-align: center;
}

.empty-state h2,
.empty-state p {
  margin: 0;
}

.empty-state p {
  margin-top: 6px;
  color: var(--muted);
}

.qr-box {
  display: grid;
  place-items: center;
  padding: 16px;
  margin-bottom: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.qr-box img {
  width: 220px;
  height: 220px;
}

.status-code {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 40px;
  font-weight: 700;
}

@media (max-width: 820px) {
  .topbar,
  .section-heading,
  .workflow-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 12px;
    padding: 14px 16px;
  }

  .topbar__meta {
    flex-wrap: wrap;
    gap: 8px 12px;
    width: 100%;
    font-size: 12px;
  }

  .shell {
    padding: 16px;
  }

  .tabs {
    flex-wrap: nowrap;
    gap: 4px;
    margin: 0 -16px 18px;
    padding: 0 16px 4px;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .tabs a {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .page-hero,
  .site-card-grid,
  .metrics,
  .operation-steps,
  .support-grid,
  .cutover-lane,
  .split,
  .policy-grid,
  .filter-grid,
  .signal-grid,
  .form-grid--wide {
    grid-template-columns: 1fr;
  }

  .workflow-band__status {
    justify-content: flex-start;
  }

  .checkbox-set {
    grid-template-columns: 1fr;
    min-width: 0;
  }

  .compact-form {
    align-items: stretch;
  }

  .compact-form label,
  .compact-form input,
  .compact-form select,
  .compact-form button,
  .compact-form .button {
    width: 100% !important;
  }

  .compact-form input[type="checkbox"],
  .compact-form input[type="radio"] {
    width: auto !important;
  }

  .compact-form .check-line {
    width: auto !important;
  }

  .pagination {
    align-items: stretch;
  }

  .pagination__summary,
  .pagination__limits,
  .pagination__actions {
    width: 100%;
  }

  .pagination__actions .button {
    flex: 1 1 0;
  }

  .compact-token,
  .compact-text,
  .reason-list--compact {
    max-width: 100%;
  }

  .acme-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .acme-form .check-line {
    width: 100% !important;
    white-space: normal;
  }

  .guide-rail li {
    grid-template-columns: 36px minmax(0, 1fr);
  }

  .guide-rail .button {
    grid-row: auto;
    grid-column: 1 / -1;
  }

  table {
    display: block;
    overflow-x: auto;
  }

  table.responsive-table {
    display: block;
    overflow: visible;
    border: 0;
    background: transparent;
    box-shadow: none;
  }

  table.responsive-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  table.responsive-table tbody,
  table.responsive-table tr,
  table.responsive-table td {
    display: block;
    width: 100%;
  }

  table.responsive-table tr {
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
  }

  table.responsive-table tr:last-child {
    margin-bottom: 0;
  }

  table.responsive-table td {
    display: grid;
    grid-template-columns: minmax(92px, 0.36fr) minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-width: 0;
    padding: 10px 12px;
    border-bottom: 1px solid #eef2f6;
    overflow-wrap: break-word;
    word-break: normal;
  }

  table.responsive-table td > * {
    min-width: 0;
  }

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

  table.responsive-table td::before {
    color: #667085;
    font-size: 12px;
    font-weight: 700;
    content: attr(data-label);
  }

  table.responsive-table td.responsive-table__span,
  table.responsive-table td[colspan] {
    display: block;
  }

  table.responsive-table td.responsive-table__span::before,
  table.responsive-table td[colspan]::before {
    display: none;
  }

  table.responsive-table td.actions,
  table.responsive-table td.stacked-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding-top: 12px;
    max-width: none;
  }

  table.responsive-table td.actions::before,
  table.responsive-table td.stacked-actions::before {
    flex: 0 0 100%;
  }

  table.responsive-table td.actions .button,
  table.responsive-table td.actions button {
    flex: 1 1 120px;
  }

  table.responsive-table td.stacked-actions > form,
  table.responsive-table td.stacked-actions .checkbox-set {
    width: 100%;
  }

  table.responsive-table td.stacked-actions .button,
  table.responsive-table td.stacked-actions button {
    flex: 0 0 auto;
  }
}

/* Command Center Shell */
.admin-shell,
.portal-shell,
.public-shell {
  min-height: 100vh;
}

.admin-shell::before,
.portal-shell::before {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 0;
  width: 260px;
  background:
    radial-gradient(circle at 24px 26px, rgba(20, 184, 166, 0.16), transparent 130px),
    linear-gradient(180deg, var(--nav) 0%, var(--nav-2) 100%);
  content: "";
}

.topbar__crumb {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  color: var(--muted);
  font-weight: 650;
}

.topbar__crumb strong {
  color: var(--text);
}

.host-chip,
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: #344054;
  font-weight: 700;
}

.host-chip {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-chip::before {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #22c55e;
  content: "";
}

.admin-shell .brand__mark,
.portal-shell .brand__mark,
.auth-shell .brand__mark,
.restricted-shell .brand__mark {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.admin-shell .brand__mark img,
.portal-shell .brand__mark img,
.auth-shell .brand__mark img,
.restricted-shell .brand__mark img {
  width: 26px;
  height: 26px;
}

.admin-shell .brand__word,
.portal-shell .brand__word,
.auth-shell .brand__word,
.restricted-shell .brand__word {
  display: block;
}

.admin-shell .brand__primary,
.portal-shell .brand__primary,
.auth-shell .brand__primary,
.restricted-shell .brand__primary {
  display: block;
  color: #ffffff;
  font-size: 16px;
}

.admin-shell .brand__secondary,
.portal-shell .brand__secondary,
.auth-shell .brand__secondary,
.restricted-shell .brand__secondary {
  display: block;
  color: #93c5fd;
  font-size: 12px;
}

.admin-shell .topbar,
.portal-shell .topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin-left: 260px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
  backdrop-filter: blur(10px);
}

.admin-shell .topbar > .brand,
.portal-shell .topbar > .brand {
  position: fixed;
  top: 22px;
  left: calc(-260px + 16px);
  z-index: 30;
  gap: 11px;
  min-height: 40px;
  color: #ffffff;
}

.admin-shell .topbar__meta,
.portal-shell .topbar__meta {
  color: var(--muted);
}

.admin-shell .topbar__link,
.portal-shell .topbar__link,
.admin-shell .link-button,
.portal-shell .link-button {
  color: var(--accent);
}

.admin-shell .topbar__link:hover,
.portal-shell .topbar__link:hover,
.admin-shell .link-button:hover,
.portal-shell .link-button:hover {
  color: var(--accent-strong);
}

.admin-shell .language-switcher,
.portal-shell .language-switcher {
  border-color: var(--line);
  background: #ffffff;
}

.admin-shell .language-switcher a,
.portal-shell .language-switcher a {
  color: var(--muted);
}

.admin-shell .language-switcher a.is-active,
.portal-shell .language-switcher a.is-active {
  background: var(--nav);
  color: #ffffff;
}

.admin-shell .shell,
.portal-shell .shell {
  position: relative;
  z-index: 1;
  max-width: none;
  margin-left: 260px;
  padding: 26px 30px 34px;
}

.admin-shell .tabs {
  position: fixed;
  top: 92px;
  left: 16px;
  z-index: 25;
  display: grid;
  width: 228px;
  gap: 4px;
  margin: 0;
  padding: 0;
  border: 0;
}

.tabs__section {
  display: block;
  margin: 0 0 8px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.admin-shell .tabs a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 0 10px;
  border: 0;
  border-radius: 7px;
  color: #cbd5e1;
  font-weight: 650;
}

.admin-shell .tabs a::before {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #3b82f6;
  opacity: 0.45;
  content: "";
}

.admin-shell .tabs a:hover,
.admin-shell .tabs a.is-active {
  border: 0;
  background: rgba(20, 184, 166, 0.16);
  color: #ffffff;
}

.admin-shell .tabs a.is-active::before {
  background: #2dd4bf;
  opacity: 1;
}

.admin-shell h1,
.portal-shell h1,
.public-shell h1 {
  font-size: 26px;
  letter-spacing: 0;
}

.admin-shell h2,
.portal-shell h2,
.public-shell h2 {
  font-size: 16px;
}

.page-hero {
  border-color: var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.page-hero h1 {
  font-size: 26px;
}

.panel,
.metric,
.step-card,
.support-card,
.workflow-band,
.site-card,
.guide-rail li,
.empty-state,
table {
  border-color: var(--line);
  box-shadow: var(--shadow);
}

.panel {
  padding: 18px;
}

.section-heading {
  min-height: 42px;
}

.metric {
  display: grid;
  gap: 7px;
}

.metric__label {
  font-size: 12px;
  font-weight: 760;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

th {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.button,
button,
input,
select,
.command-chip,
.secret,
.notice {
  border-radius: 7px;
}

.button,
button {
  border-color: var(--line-strong);
  font-weight: 760;
}

.button--primary {
  box-shadow: 0 8px 18px rgba(15, 118, 110, 0.16);
}

.badge {
  padding: 0 9px;
  font-weight: 800;
}

.badge--warning {
  background: #fff7e6;
  color: var(--warning);
}

.badge--cyan {
  background: var(--cyan-soft);
  color: var(--cyan);
}

.form-grid {
  gap: 14px;
}

label span {
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}

input:focus,
select:focus,
button:focus-visible,
.button:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(8, 145, 178, 0.22);
  outline-offset: 2px;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  min-height: 100vh;
  background: #f4f7fb;
}

.auth-visual,
.restricted-visual {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 42px;
  background:
    radial-gradient(circle at 18% 18%, rgba(20, 184, 166, 0.18), transparent 32%),
    linear-gradient(180deg, var(--nav), var(--nav-2));
  color: #ffffff;
}

.auth-visual .brand,
.restricted-visual .brand {
  gap: 11px;
  min-height: 40px;
  margin-bottom: 72px;
}

.auth-visual__copy,
.restricted-visual__copy {
  margin-top: auto;
  margin-bottom: auto;
}

.auth-visual__copy .eyebrow,
.restricted-visual__copy .eyebrow {
  color: #7dd3fc;
}

.auth-visual__copy h1,
.restricted-visual__copy h1 {
  max-width: 640px;
  margin-bottom: 18px;
  color: #ffffff;
  font-size: 42px;
  line-height: 1.08;
}

.auth-visual__copy p,
.restricted-visual__copy p {
  max-width: 540px;
  color: #bfdbfe;
  font-size: 16px;
}

.restricted-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 470px;
  min-height: 100vh;
  background: #f4f7fb;
}

.auth-shell .shell.auth-card {
  display: grid;
  align-content: center;
  max-width: none;
  margin: 0;
  padding: 44px;
  background: #ffffff;
}

.restricted-shell .shell.restricted-card {
  display: grid;
  align-content: center;
  max-width: none;
  margin: 0;
  padding: 44px;
  background: #ffffff;
}

.auth-shell .panel,
.auth-shell .panel--narrow,
.restricted-shell .panel,
.restricted-shell .panel--narrow {
  max-width: 420px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.auth-shell .auth-brand {
  display: none;
}

.auth-shell .panel h1,
.restricted-shell .panel h1 {
  margin-bottom: 12px;
  font-size: 28px;
}

.auth-shell .auth-reason,
.auth-shell .panel p,
.restricted-shell .panel p {
  color: var(--muted);
}

.auth-shell .button,
.auth-shell button {
  width: 100%;
}

.qr-box {
  width: fit-content;
  background: #ffffff;
}

@media (max-width: 1100px) {
  .metrics,
  .metrics--compact {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .operation-steps,
  .support-grid,
  .site-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-shell::before,
  .portal-shell::before {
    display: none;
  }

  .admin-shell .topbar,
  .portal-shell .topbar,
  .public-shell .topbar {
    position: sticky;
    top: 0;
    z-index: 30;
    gap: 10px;
    align-items: stretch;
    margin-left: 0;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
  }

  .admin-shell .topbar > .brand,
  .portal-shell .topbar > .brand {
    position: static;
    color: var(--text);
  }

  .admin-shell .brand__mark,
  .portal-shell .brand__mark {
    border-color: var(--line);
    background: #ffffff;
    box-shadow: var(--shadow);
  }

  .admin-shell .brand__primary,
  .portal-shell .brand__primary {
    color: var(--text);
  }

  .admin-shell .brand__secondary,
  .portal-shell .brand__secondary {
    color: var(--accent);
  }

  .topbar__crumb {
    display: none;
  }

  .admin-shell .topbar__meta,
  .portal-shell .topbar__meta,
  .public-shell .topbar__meta {
    align-items: center;
    gap: 8px;
    width: 100%;
  }

  .host-chip {
    max-width: 100%;
    min-height: 32px;
  }

  .user-chip {
    min-height: 32px;
  }

  .admin-shell .shell,
  .portal-shell .shell,
  .public-shell .shell {
    margin-left: 0;
    padding: 16px;
  }

  .admin-shell .tabs {
    position: sticky;
    top: 93px;
    z-index: 25;
    display: flex;
    width: auto;
    gap: 6px;
    margin: -16px -16px 18px;
    padding: 10px 14px;
    overflow-x: auto;
    border: 0;
    background: var(--nav);
    scrollbar-width: none;
  }

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

  .tabs__section {
    display: none;
  }

  .admin-shell .tabs a {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 10px;
    white-space: nowrap;
  }

  .admin-shell .tabs a::before {
    width: 6px;
    height: 6px;
  }

  .auth-shell,
  .restricted-shell {
    display: block;
  }

  .auth-visual,
  .restricted-visual {
    min-height: 280px;
    padding: 28px 22px;
  }

  .auth-visual .brand,
  .restricted-visual .brand {
    margin-bottom: 34px;
  }

  .auth-visual__copy,
  .restricted-visual__copy {
    margin: 0;
  }

  .auth-visual__copy h1,
  .restricted-visual__copy h1 {
    font-size: 30px;
  }

  .auth-shell .shell.auth-card,
  .restricted-shell .shell.restricted-card {
    display: block;
    padding: 26px 22px;
  }

  .auth-shell .panel,
  .auth-shell .panel--narrow,
  .restricted-shell .panel,
  .restricted-shell .panel--narrow {
    max-width: none;
  }

  .page-hero {
    gap: 18px;
    padding: 18px;
  }

  .page-hero h1,
  .admin-shell h1,
  .portal-shell h1,
  .public-shell h1 {
    font-size: 24px;
  }

  .panel {
    padding: 16px;
  }

  .metrics,
  .metrics--compact,
  .operation-steps,
  .support-grid,
  .site-card-grid {
    grid-template-columns: 1fr;
  }

  table.responsive-table td {
    grid-template-columns: minmax(104px, 0.36fr) minmax(0, 1fr);
    gap: 10px;
  }

  table.responsive-table td::before {
    align-self: start;
    line-height: 1.35;
  }

  table.responsive-table td.actions,
  table.responsive-table td.stacked-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  table.responsive-table td.actions .button,
  table.responsive-table td.actions button,
  table.responsive-table td.stacked-actions .button,
  table.responsive-table td.stacked-actions button,
  table.responsive-table td.stacked-actions input[type="password"] {
    width: 100% !important;
  }
}

@media (max-width: 460px) {
  .topbar__meta {
    font-size: 12px;
  }

  .language-switcher a {
    min-width: 31px;
    padding: 3px 7px;
  }

  .button,
  button {
    min-height: 38px;
  }

  table.responsive-table td {
    grid-template-columns: minmax(88px, 0.34fr) minmax(0, 1fr);
    padding: 10px;
  }

  .mono,
  table.responsive-table td {
    overflow-wrap: anywhere;
  }
}

.visually-hidden-field {
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
}

.compact-form input.visually-hidden-field,
.form-grid input.visually-hidden-field {
  width: 1px !important;
  min-width: 0 !important;
  height: 1px !important;
  min-height: 0 !important;
}
