:root {
  color-scheme: dark;
  --bg: #080b10;
  --panel: #111722;
  --panel-2: #151d2a;
  --border: #263244;
  --text: #f7f9fc;
  --muted: #94a3b8;
  --blue: #2f80ff;
  --blue-2: #6aa7ff;
  --green: #35d07f;
  --yellow: #f0c35a;
  --red: #ff6575;
  --shadow: rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 0%, rgba(47, 128, 255, 0.16), transparent 28rem),
    linear-gradient(135deg, #080b10 0%, #101722 54%, #0a0e15 100%);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 28px;
}

.topbar,
.summary-panel,
.card,
.check-form {
  border: 1px solid var(--border);
  background: rgba(17, 23, 34, 0.86);
  box-shadow: 0 18px 45px var(--shadow);
  backdrop-filter: blur(14px);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 10px 12px 10px 18px;
  border-radius: 8px;
}

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

.brand-mark {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 5px rgba(47, 128, 255, 0.16);
}

.lang-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #0b111a;
}

.lang-button {
  min-width: 44px;
  min-height: 34px;
  border: 0;
  border-radius: 6px;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}

.lang-button.active {
  color: var(--text);
  background: var(--panel-2);
}

.workspace {
  padding: 64px 0 28px;
}

.intro {
  max-width: 760px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--blue-2);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.1rem, 5vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.08rem;
  line-height: 1.7;
}

.check-form {
  margin-top: 34px;
  padding: 18px;
  border-radius: 8px;
}

.check-form label {
  display: block;
  margin-bottom: 10px;
  color: #cbd5e1;
  font-size: 0.92rem;
  font-weight: 700;
}

.input-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

input {
  width: 100%;
  min-height: 52px;
  border: 1px solid #334155;
  border-radius: 8px;
  padding: 0 16px;
  color: var(--text);
  background: #0b111a;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 128, 255, 0.18);
}

#submit-button {
  min-height: 52px;
  min-width: 148px;
  border: 0;
  border-radius: 8px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--blue);
  font-weight: 800;
  cursor: pointer;
}

#submit-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.hint {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.summary-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  border-radius: 8px;
}

.summary-panel h2 {
  margin: 0;
  font-size: 1.35rem;
}

.summary-status {
  padding: 10px 14px;
  border-radius: 8px;
  background: #0b111a;
  font-weight: 800;
  white-space: nowrap;
}

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

.card {
  min-height: 230px;
  border-radius: 8px;
  padding: 18px;
}

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

.card h3 {
  margin: 0;
  font-size: 1.02rem;
}

.badge {
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--muted);
  background: #0b111a;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.badge.success,
.summary-status.success {
  color: #07130d;
  background: var(--green);
}

.badge.warning,
.summary-status.warning {
  color: #1c1504;
  background: var(--yellow);
}

.badge.failed,
.summary-status.failed {
  color: #26070b;
  background: var(--red);
}

.record-group {
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.record-group:first-child {
  border-top: 0;
  padding-top: 0;
}

.record-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #dbe6f4;
  font-size: 0.82rem;
  font-weight: 900;
}

.record-values {
  margin: 8px 0 0;
  padding: 0;
  color: var(--muted);
  list-style: none;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.6;
}

.metric-list {
  display: grid;
  gap: 12px;
  margin: 0;
}

.metric {
  display: grid;
  grid-template-columns: minmax(100px, 0.75fr) minmax(0, 1fr);
  gap: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.metric:first-child {
  border-top: 0;
  padding-top: 0;
}

.metric dt {
  color: var(--muted);
}

.metric dd {
  margin: 0;
  color: #e5edf7;
  overflow-wrap: anywhere;
}

.message {
  min-height: 24px;
  margin: 18px 0 0;
  color: var(--muted);
}

.message.error {
  color: var(--red);
}

.hidden {
  display: none;
}

.footer {
  padding-top: 20px;
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
}

@media (max-width: 760px) {
  .shell {
    width: min(100% - 20px, 1120px);
    padding-top: 10px;
  }

  .workspace {
    padding-top: 42px;
  }

  .input-row,
  .status-grid {
    grid-template-columns: 1fr;
  }

  #submit-button {
    width: 100%;
  }

  .summary-panel {
    align-items: flex-start;
    flex-direction: column;
  }

  .metric {
    grid-template-columns: 1fr;
    gap: 4px;
  }
}
