:root {
  color-scheme: light dark;
  --bg: #f7f8fb;
  --panel: #ffffff;
  --text: #111827;
  --muted: #6b7280;
  --line: #d9dee7;
  --accent: #0f766e;
  --accent-strong: #0b5d57;
  --soft: #e6f4f1;
  --danger: #b91c1c;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(15, 118, 110, 0.12), transparent 40%),
    linear-gradient(300deg, rgba(29, 78, 216, 0.10), transparent 38%),
    var(--bg);
  color: var(--text);
}

button,
input {
  font: inherit;
}

.shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.panel {
  width: min(100%, 430px);
  background: color-mix(in srgb, var(--panel) 96%, transparent);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.12);
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.brand img {
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.45);
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
  letter-spacing: 0;
}

p {
  margin: 0;
}

#connection-state,
.detail,
.field span,
dt {
  color: var(--muted);
}

#connection-state {
  margin-top: 5px;
  font-size: 14px;
}

.field {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.field span {
  font-size: 13px;
  font-weight: 650;
}

.field input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 14px;
  background: var(--panel);
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0;
}

.field input:focus {
  border-color: var(--accent);
  outline: 3px solid color-mix(in srgb, var(--accent) 22%, transparent);
}

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

button {
  min-height: 46px;
  border: 0;
  border-radius: 8px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--accent);
  color: #ffffff;
  font-weight: 750;
  cursor: pointer;
}

button:hover {
  background: var(--accent-strong);
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

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

button.secondary:hover {
  background: #d4ece8;
}

.button-icon {
  display: inline-grid;
  place-items: center;
  width: 20px;
  height: 20px;
  font-weight: 900;
}

.status-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0 0;
}

.status-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: color-mix(in srgb, var(--panel) 72%, var(--soft));
}

dt {
  font-size: 12px;
  font-weight: 700;
}

dd {
  margin: 6px 0 0;
  font-size: 15px;
  font-weight: 800;
}

.detail {
  min-height: 42px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.45;
}

.detail.error {
  color: var(--danger);
}

@media (max-width: 440px) {
  .shell {
    padding: 14px;
    place-items: stretch;
    align-content: center;
  }

  .panel {
    padding: 18px;
  }

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

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b1018;
    --panel: #111827;
    --text: #f9fafb;
    --muted: #a8b1c0;
    --line: #293447;
    --accent: #14b8a6;
    --accent-strong: #2dd4bf;
    --soft: #123331;
    --danger: #f87171;
  }

  .panel {
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.36);
  }
}
