:root {
  color-scheme: light;
  --bg: #f5f7fb;
  --panel: #ffffff;
  --text: #172033;
  --muted: #5d6b82;
  --line: #d9e1ee;
  --accent: #176b87;
  --accent-strong: #0f5268;
  --danger: #b42318;
  --ok: #067647;
  --code: #111827;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: var(--bg);
}

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

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 32px;
  box-shadow: 0 16px 40px rgba(23, 32, 51, 0.08);
}

.heading {
  margin-bottom: 24px;
}

.title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 28px;
  line-height: 1.25;
}

.command-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 12px;
}

input {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 14px;
  color: var(--text);
  font-size: 16px;
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.14);
}

button {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  padding: 0 18px;
  color: #ffffff;
  background: var(--accent);
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

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

.secondary-button {
  min-height: 40px;
  border: 1px solid var(--line);
  padding: 0 14px;
  color: var(--text);
  background: #ffffff;
  font-size: 14px;
}

.secondary-button:hover {
  background: #eef3f8;
}

button:disabled {
  cursor: wait;
  opacity: 0.7;
}

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

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

.message.success {
  color: var(--ok);
}

.result {
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.hidden {
  display: none;
}

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

.summary div {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 14px;
}

dt {
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 13px;
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: 15px;
  font-weight: 700;
}

.qr-block {
  margin-top: 20px;
}

h2 {
  margin: 0 0 10px;
  font-size: 18px;
}

a {
  color: var(--accent);
}

.qr-block img {
  width: 180px;
  height: 180px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.auth-shell {
  width: min(440px, calc(100% - 32px));
  min-height: 100vh;
  display: grid;
  align-items: center;
  padding: 32px 0;
}

.auth-panel {
  padding: 28px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.auth-form button {
  margin-top: 8px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 20px, 960px);
    padding: 20px 0;
  }

  .panel {
    padding: 20px;
  }

  h1 {
    font-size: 22px;
  }

  .command-row,
  .summary {
    grid-template-columns: 1fr;
  }

  .title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  button {
    width: 100%;
  }
}
