:root {
  --bg: #f4f7fb;
  --panel: #ffffff;
  --panel-soft: #f8fafc;
  --text: #162033;
  --text-strong: #0f172a;
  --muted: #667085;
  --muted-light: #98a2b3;
  --line: #e4e9f1;
  --line-strong: #d4dbe7;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-soft: #eff6ff;
  --danger: #d92d20;
  --danger-soft: #fff1f0;
  --success: #078552;
  --success-soft: #ecfdf3;
  --warning: #b25e09;
  --warning-soft: #fff7e8;
  --violet: #7047eb;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow: 0 10px 30px rgba(25, 42, 70, .07);
  --radius: 14px;
  --radius-sm: 9px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, "SF Pro Display", "PingFang SC", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

button,
input,
select {
  font: inherit;
}

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

svg {
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

form {
  margin: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid rgba(228, 233, 241, .9);
  backdrop-filter: blur(16px);
}

.topbar-inner {
  width: min(1400px, calc(100vw - 48px));
  height: 72px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #fff;
  border-radius: 11px;
  background: linear-gradient(145deg, #3578f6, #174bc8);
  box-shadow: 0 6px 16px rgba(37, 99, 235, .23);
}

.brand-mark svg {
  width: 22px;
  height: 22px;
  stroke-width: 1.9;
}

.brand-copy {
  display: grid;
  gap: 0;
}

.brand-copy strong {
  color: var(--text-strong);
  font-size: 15px;
  letter-spacing: -.01em;
}

.brand-copy small {
  color: var(--muted-light);
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: .045em;
  text-transform: uppercase;
}

.topbar-actions,
.service-state {
  display: flex;
  align-items: center;
}

.topbar-actions {
  gap: 14px;
}

.service-state {
  gap: 8px;
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

.status-dot {
  width: 7px;
  height: 7px;
  display: inline-block;
  border-radius: 50%;
  background: #12b76a;
  box-shadow: 0 0 0 4px rgba(18, 183, 106, .12);
}

.topbar-divider {
  width: 1px;
  height: 24px;
  background: var(--line);
}

.shell {
  width: min(1400px, calc(100vw - 48px));
  margin: 38px auto 32px;
}

.page-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 26px;
}

.eyebrow,
.section-kicker {
  display: inline-block;
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.page-header h1 {
  margin: 5px 0 5px;
  color: var(--text-strong);
  font-size: clamp(27px, 2.4vw, 34px);
  line-height: 1.25;
  letter-spacing: -.035em;
}

.page-header p,
.panel-head p,
.readiness-head p {
  margin: 0;
  color: var(--muted);
}

.btn {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 15px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: #fff;
  color: #344054;
  font-weight: 650;
  white-space: nowrap;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid rgba(37, 99, 235, .18);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: .55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
  box-shadow: 0 4px 10px rgba(37, 99, 235, .18);
}

.btn-primary:hover {
  border-color: var(--primary-dark);
  background: var(--primary-dark);
  box-shadow: 0 7px 16px rgba(37, 99, 235, .23);
}

.btn-secondary {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover,
.btn-ghost:hover {
  border-color: #c6d0df;
  background: #f7f9fc;
}

.btn-ghost {
  border-color: transparent;
  background: transparent;
  color: #475467;
}

.btn-danger {
  border-color: transparent;
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  border-color: #ffd5d2;
  background: var(--danger-soft);
}

.btn-sm {
  min-height: 34px;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 12px;
}

.btn-icon {
  width: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 8px;
}

.btn-block {
  width: 100%;
}

.alert {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin-bottom: 18px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 11px;
  box-shadow: var(--shadow-sm);
}

.alert > svg {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  margin-top: 1px;
}

.alert > div {
  display: grid;
  gap: 1px;
}

.alert strong {
  font-size: 13px;
}

.alert span {
  font-size: 13px;
}

.alert-success {
  border-color: #abefc6;
  background: var(--success-soft);
  color: #067647;
}

.alert-error {
  border-color: #fecdca;
  background: var(--danger-soft);
  color: #b42318;
}

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

.metric {
  position: relative;
  min-height: 150px;
  padding: 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

.metric::after {
  position: absolute;
  right: -20px;
  bottom: -32px;
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: currentColor;
  content: "";
  opacity: .035;
}

.metric-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #475467;
  font-size: 13px;
  font-weight: 650;
}

.metric-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 10px;
}

.metric-icon svg {
  width: 19px;
  height: 19px;
}

.metric strong {
  display: block;
  margin-top: 10px;
  color: var(--text-strong);
  font-size: 31px;
  line-height: 1.15;
  letter-spacing: -.035em;
}

.metric small {
  display: block;
  margin-top: 5px;
  color: var(--muted-light);
  font-size: 12px;
}

.metric-blue { color: var(--primary); }
.metric-green { color: var(--success); }
.metric-amber { color: var(--warning); }
.metric-violet { color: var(--violet); }
.metric-blue .metric-icon { background: var(--primary-soft); }
.metric-green .metric-icon { background: var(--success-soft); }
.metric-amber .metric-icon { background: var(--warning-soft); }
.metric-violet .metric-icon { background: #f4f0ff; }

.workspace-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 350px;
  gap: 20px;
  align-items: stretch;
  margin-bottom: 20px;
}

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

.panel {
  scroll-margin-top: 92px;
}

.panel-head {
  min-height: 92px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 20px 22px;
  border-bottom: 1px solid var(--line);
}

.panel-head h2,
.readiness-head h2 {
  margin: 3px 0 2px;
  color: var(--text-strong);
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -.018em;
}

.panel-head p,
.readiness-head p {
  font-size: 13px;
}

.panel-head-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 12px;
  background: var(--primary-soft);
  color: var(--primary);
}

.panel-head-icon svg {
  width: 23px;
  height: 23px;
}

.panel-body {
  padding: 22px;
}

.certificate-form {
  display: grid;
  grid-template-columns: 1fr 1fr minmax(220px, .75fr);
  gap: 16px;
  align-items: start;
}

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

.field label {
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.field > small {
  color: var(--muted-light);
  font-size: 11px;
}

input,
select {
  width: 100%;
  height: 43px;
  padding: 9px 12px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--text);
  outline: 0;
  transition: border-color .18s ease, box-shadow .18s ease;
}

input::placeholder {
  color: #a6afbd;
}

input:hover,
select:hover {
  border-color: #b8c2d1;
}

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

.submit-certificate {
  grid-column: 1 / -1;
  justify-self: start;
  margin-top: 3px;
}

.readiness-card {
  padding: 22px;
  background: linear-gradient(150deg, #fbfdff 0%, #f5f8ff 100%);
}

.readiness-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--line);
}

.readiness-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 11px;
  background: #eaf1ff;
  color: var(--primary);
}

.readiness-icon svg {
  width: 21px;
  height: 21px;
}

.check-list {
  display: grid;
  gap: 17px;
  margin: 19px 0;
  padding: 0;
  list-style: none;
}

.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.check-list li > span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #cddcff;
  border-radius: 50%;
  background: #fff;
  color: var(--primary);
  font-size: 11px;
  font-weight: 750;
}

.check-list li div {
  display: grid;
  gap: 1px;
}

.check-list strong {
  color: #344054;
  font-size: 13px;
}

.check-list small {
  color: var(--muted);
  font-size: 11px;
}

code {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.readiness-tip {
  display: flex;
  gap: 9px;
  padding: 11px;
  border: 1px solid #dbe7ff;
  border-radius: 9px;
  background: rgba(255, 255, 255, .75);
  color: #475467;
  font-size: 11px;
}

.readiness-tip svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  color: var(--primary);
}

.certificate-panel {
  overflow: hidden;
}

.list-head {
  min-height: 96px;
}

.record-count {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  table-layout: fixed;
}

th,
td {
  padding: 17px 18px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  padding-top: 11px;
  padding-bottom: 11px;
  background: #fafbfc;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
}

tbody tr {
  transition: background .16s ease;
}

tbody tr:hover {
  background: #fbfcfe;
}

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

th:nth-child(1) { width: 25%; }
th:nth-child(2) { width: 14%; }
th:nth-child(3) { width: 14%; }
th:nth-child(4) { width: 24%; }
th:nth-child(5) { width: 23%; }

.domain-cell {
  position: relative;
}

.domain-line {
  display: flex;
  align-items: center;
  gap: 10px;
}

.domain-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid #dce6f7;
  border-radius: 9px;
  background: #f3f7fd;
  color: #3b6fc4;
}

.domain-icon svg {
  width: 18px;
  height: 18px;
}

.domain-line > div {
  min-width: 0;
  display: grid;
}

.domain {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.domain-line > div > span {
  overflow: hidden;
  color: var(--muted-light);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.environment-tag {
  display: inline-flex;
  margin: 8px 0 0 44px;
  padding: 2px 7px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.environment-Production {
  background: #edf7f1;
  color: #087443;
}

.environment-Staging {
  background: #f4f0ff;
  color: #6941c6;
}

.row-error {
  max-width: 100%;
  display: flex;
  align-items: center;
  gap: 5px;
  margin-top: 8px;
  padding: 5px 7px;
  overflow: hidden;
  border-radius: 6px;
  background: var(--danger-soft);
  color: #b42318;
  font-size: 10px;
}

.row-error svg {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
}

.row-error span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.badge > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

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

.badge-pending,
.badge-issuing {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge-issuing > span {
  animation: pulse 1.3s ease-in-out infinite;
}

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

@keyframes pulse {
  50% { opacity: .3; transform: scale(.75); }
}

.cell-hint {
  display: block;
  margin-top: 6px;
  color: var(--muted-light);
  font-size: 10px;
}

.date-pair {
  display: flex;
  align-items: baseline;
  gap: 7px;
  white-space: nowrap;
}

.date-pair + .date-pair {
  margin-top: 5px;
}

.date-pair span {
  color: var(--muted-light);
  font-size: 10px;
}

.date-pair strong {
  color: #344054;
  font-size: 12px;
}

.date-pair small {
  color: var(--muted);
  font-size: 11px;
}

.file-path {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
  color: #475467;
}

.file-path + .file-path {
  margin-top: 6px;
}

.file-path svg {
  width: 14px;
  height: 14px;
  flex: 0 0 auto;
  color: #6b87ad;
}

.file-path code {
  display: block;
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-path {
  color: var(--muted-light);
}

.empty-value {
  color: var(--muted-light);
  font-size: 11px;
}

.action-column {
  text-align: right;
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.empty-state {
  display: grid;
  justify-items: center;
  padding: 60px 24px 64px;
  text-align: center;
}

.empty-icon {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 1px solid #dce6f7;
  border-radius: 17px;
  background: #f3f7fd;
  color: var(--primary);
}

.empty-icon svg {
  width: 29px;
  height: 29px;
}

.empty-state h3 {
  margin: 15px 0 4px;
  color: var(--text-strong);
  font-size: 16px;
}

.empty-state p {
  margin: 0 0 16px;
  color: var(--muted);
  font-size: 13px;
}

.page-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 2px 0;
  color: var(--muted-light);
  font-size: 10px;
}

/* Login */
.login-page {
  min-height: 100vh;
  background: #fff;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(430px, .9fr) 1.1fr;
}

.login-visual {
  position: relative;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  padding: 48px clamp(42px, 5vw, 82px) 38px;
  background:
    radial-gradient(circle at 15% 18%, rgba(77, 128, 255, .2), transparent 31%),
    radial-gradient(circle at 82% 76%, rgba(40, 181, 157, .12), transparent 32%),
    linear-gradient(145deg, #101e3a 0%, #122b59 56%, #163367 100%);
  color: #fff;
}

.login-visual::before,
.login-visual::after {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 50%;
  content: "";
}

.login-visual::before {
  width: 470px;
  height: 470px;
  right: -230px;
  top: -150px;
  box-shadow: 0 0 0 90px rgba(255, 255, 255, .018), 0 0 0 180px rgba(255, 255, 255, .012);
}

.login-visual::after {
  width: 280px;
  height: 280px;
  left: -150px;
  bottom: -120px;
}

.login-visual-content,
.login-copyright {
  position: relative;
  z-index: 1;
}

.brand-on-dark .brand-mark {
  color: #1c4fbd;
  background: #fff;
  box-shadow: 0 8px 25px rgba(4, 18, 45, .2);
}

.brand-on-dark .brand-copy strong {
  color: #fff;
}

.brand-on-dark .brand-copy small {
  color: rgba(255, 255, 255, .55);
}

.login-intro {
  max-width: 570px;
  margin-top: clamp(100px, 17vh, 180px);
}

.eyebrow-dark {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: #a9c6ff;
}

.login-intro h1 {
  margin: 18px 0 18px;
  color: #fff;
  font-size: clamp(36px, 4vw, 58px);
  line-height: 1.14;
  letter-spacing: -.045em;
}

.login-intro p {
  max-width: 520px;
  margin: 0;
  color: rgba(224, 233, 250, .75);
  font-size: 16px;
  line-height: 1.8;
}

.login-features {
  max-width: 570px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 48px;
}

.login-feature {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 12px;
  background: rgba(255, 255, 255, .055);
  backdrop-filter: blur(10px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 9px;
  background: rgba(255, 255, 255, .1);
  color: #bcd2ff;
}

.feature-icon svg {
  width: 19px;
  height: 19px;
}

.login-feature > span:last-child {
  display: grid;
}

.login-feature strong {
  color: #f5f8ff;
  font-size: 12px;
}

.login-feature small {
  color: rgba(225, 233, 248, .58);
  font-size: 10px;
}

.login-copyright {
  margin: 40px 0 0;
  color: rgba(255, 255, 255, .35);
  font-size: 10px;
}

.login-panel {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 48px;
  background: #fff;
}

.login-card {
  width: min(420px, 100%);
}

.mobile-brand {
  display: none;
}

.login-heading {
  margin-bottom: 28px;
}

.login-heading h2 {
  margin: 8px 0 6px;
  color: var(--text-strong);
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -.035em;
}

.login-heading p {
  margin: 0;
  color: var(--muted);
}

.login-card .alert {
  margin-bottom: 20px;
}

.login-form {
  display: grid;
  gap: 19px;
}

.input-wrap {
  position: relative;
}

.input-wrap > svg {
  position: absolute;
  left: 13px;
  top: 50%;
  width: 18px;
  height: 18px;
  color: #98a2b3;
  transform: translateY(-50%);
  pointer-events: none;
}

.input-wrap input {
  height: 48px;
  padding-left: 42px;
}

.login-form .btn {
  min-height: 48px;
  margin-top: 4px;
}

.login-form .btn svg {
  margin-left: auto;
}

.security-note {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  margin-top: 24px;
  color: var(--muted-light);
  font-size: 10px;
}

.security-note svg {
  width: 14px;
  height: 14px;
  color: #7b8da8;
}

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

  .workspace-grid {
    grid-template-columns: 1fr;
  }

  .readiness-card {
    display: grid;
    grid-template-columns: 230px 1fr 280px;
    align-items: center;
    gap: 22px;
  }

  .readiness-head {
    padding: 0 22px 0 0;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .check-list {
    grid-template-columns: repeat(3, 1fr);
    margin: 0;
  }
}

@media (max-width: 900px) {
  .certificate-form {
    grid-template-columns: 1fr 1fr;
  }

  .certificate-form .field:last-of-type {
    grid-column: 1 / -1;
  }

  .readiness-card {
    display: block;
  }

  .readiness-head {
    padding: 0 0 17px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .check-list {
    grid-template-columns: 1fr;
    margin: 19px 0;
  }

  .login-shell {
    grid-template-columns: minmax(380px, .8fr) 1.2fr;
  }

  .login-visual {
    padding: 38px;
  }

  .login-features {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .shell {
    width: min(100% - 28px, 1400px);
  }

  .topbar-inner {
    height: 64px;
  }

  .brand-copy small,
  .service-state,
  .topbar-divider {
    display: none;
  }

  .shell {
    margin-top: 26px;
  }

  .page-header {
    align-items: flex-start;
  }

  .page-header .btn {
    min-width: 42px;
    padding: 9px 11px;
    font-size: 0;
  }

  .page-header .btn svg {
    width: 19px;
    height: 19px;
  }

  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .metric {
    min-height: 132px;
    padding: 16px;
  }

  .metric strong {
    font-size: 27px;
  }

  .metric small {
    line-height: 1.35;
  }

  .panel-head,
  .panel-body,
  .readiness-card {
    padding-left: 17px;
    padding-right: 17px;
  }

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

  .certificate-form .field:last-of-type {
    grid-column: auto;
  }

  .submit-certificate {
    width: 100%;
  }

  .list-head {
    align-items: flex-start;
  }

  .page-footer {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .login-shell {
    display: block;
  }

  .login-visual {
    display: none;
  }

  .login-panel {
    min-height: 100vh;
    padding: 32px 22px;
  }

  .mobile-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 72px;
    color: var(--text-strong);
  }
}

@media (max-width: 430px) {
  .metrics {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: 125px;
  }

  .topbar-actions .btn {
    width: 36px;
    padding: 0;
    font-size: 0;
  }
}

/* Challenge method selection and delegated DNS */
.challenge-field {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 4px 0 0;
  padding: 0;
  border: 0;
}

.challenge-field legend {
  margin-bottom: 8px;
  padding: 0;
  color: #344054;
  font-size: 13px;
  font-weight: 650;
}

.challenge-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.challenge-option {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-columns: 18px 38px 1fr;
  gap: 11px;
  align-items: flex-start;
  padding: 15px;
  border: 1px solid var(--line-strong);
  border-radius: 11px;
  background: #fff;
  cursor: pointer;
  transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.challenge-option:hover {
  border-color: #a9bce1;
  background: #fbfdff;
}

.challenge-option:has(input:checked) {
  border-color: #8eb2ff;
  background: #f5f8ff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .07);
}

.challenge-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.challenge-radio {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  margin-top: 2px;
  border: 1.5px solid #b8c2d1;
  border-radius: 50%;
  background: #fff;
}

.challenge-option input:checked + .challenge-radio {
  border: 5px solid var(--primary);
}

.challenge-option-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: #eef4ff;
  color: var(--primary);
}

.challenge-option-icon svg {
  width: 20px;
  height: 20px;
}

.challenge-option-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.challenge-option-copy > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.challenge-option-copy strong {
  color: var(--text-strong);
  font-size: 13px;
}

.challenge-option-copy em {
  padding: 2px 6px;
  border-radius: 5px;
  background: #eaf2ff;
  color: var(--primary);
  font-size: 9px;
  font-style: normal;
  font-weight: 750;
}

.challenge-option-copy .compat-tag {
  background: #f2f4f7;
  color: #667085;
}

.challenge-option-copy small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.challenge-option-copy b {
  color: var(--danger);
  font-size: 10px;
  font-weight: 650;
}

.challenge-disabled {
  opacity: .62;
  cursor: not-allowed;
}

.mode-help {
  margin-top: 10px;
  padding: 9px 11px;
  border-radius: 8px;
  background: #f7f9fc;
  color: #667085;
  font-size: 11px;
}

.mode-help[hidden] {
  display: none;
}

.dns-service-state,
.dns-service-empty {
  display: grid;
  gap: 10px;
  margin: 18px 0;
}

.dns-service-state > div {
  min-width: 0;
  display: grid;
  gap: 3px;
  padding-bottom: 8px;
  border-bottom: 1px dashed #dce3ef;
}

.dns-service-state > div > span {
  color: var(--muted-light);
  font-size: 10px;
}

.dns-service-state code {
  overflow: hidden;
  color: #344054;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dns-service-state p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--success);
  font-size: 11px;
  font-weight: 650;
}

.dns-service-empty {
  padding: 13px;
  border: 1px solid #fedf89;
  border-radius: 9px;
  background: #fffaeb;
}

.dns-service-empty strong {
  color: #93370d;
  font-size: 12px;
}

.dns-service-empty p {
  margin: 0;
  color: #b54708;
  font-size: 10px;
}

.domain-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 8px 0 0 44px;
}

.domain-tags .environment-tag {
  margin: 0;
}

.challenge-tag {
  display: inline-flex;
  padding: 2px 7px;
  border-radius: 5px;
  background: #eef4ff;
  color: #315ea8;
  font-size: 9px;
  font-weight: 750;
}

.challenge-http-01 {
  background: #f2f4f7;
  color: #667085;
}

.cname-config {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  padding: 9px;
  border: 1px solid #dce6f7;
  border-radius: 8px;
  background: #f7faff;
}

.cname-config > div {
  min-width: 0;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  gap: 6px;
  align-items: center;
}

.cname-config span {
  color: var(--muted-light);
  font-size: 9px;
}

.cname-config code {
  overflow: hidden;
  color: #344054;
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.copy-button {
  padding: 2px 6px;
  border: 0;
  border-radius: 5px;
  background: #e8f0ff;
  color: #315ea8;
  font-size: 9px;
  font-weight: 650;
  cursor: pointer;
}

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

table {
  min-width: 1260px;
}

th:nth-child(1) { width: 32%; }
th:nth-child(2) { width: 13%; }
th:nth-child(3) { width: 12%; }
th:nth-child(4) { width: 21%; }
th:nth-child(5) { width: 22%; }

@media (max-width: 900px) {
  .challenge-options {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .challenge-option {
    grid-template-columns: 18px 34px 1fr;
    padding: 13px;
  }

  .challenge-option-icon {
    width: 34px;
    height: 34px;
  }
}
