:root {
  --bg: #f2f3ef;
  --surface: #ffffff;
  --ink: #202622;
  --muted: #6f7771;
  --line: #dfe3dd;
  --accent: #176b58;
  --accent-soft: #e7f1ed;
  --danger: #a83b38;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

button,
input {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.94);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: white;
  font-family: "Songti SC", "STSong", serif;
  font-size: 18px;
}

.brand-copy {
  display: grid;
  gap: 1px;
}

.brand-copy strong {
  font-family: "Songti SC", "STSong", serif;
  font-size: 19px;
  letter-spacing: 0;
}

.brand-copy small {
  color: var(--muted);
  font-size: 9px;
  letter-spacing: 0.12em;
}

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

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.boot {
  display: flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
}

.auth-panel {
  width: min(440px, 100%);
  margin: 0 auto;
  padding: 32px;
}

h1 {
  margin: 8px 0 8px;
  font-size: 30px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.muted {
  color: var(--muted);
  line-height: 1.6;
}

.muted.compact {
  margin: 12px 0 0;
  font-size: 14px;
}

form {
  display: grid;
  gap: 10px;
  margin-top: 24px;
}

label {
  margin-top: 6px;
  font-size: 13px;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

input:focus {
  border-color: var(--accent);
  outline: 3px solid var(--accent-soft);
}

.primary-button,
.quiet-button {
  min-height: 42px;
  border-radius: 6px;
  cursor: pointer;
}

.primary-button {
  margin-top: 8px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: white;
  font-weight: 650;
}

.primary-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.quiet-button {
  padding: 0 16px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
}

.form-error {
  min-height: 20px;
  margin: 4px 0 0;
  color: var(--danger);
  font-size: 13px;
}

.page-heading {
  margin-bottom: 24px;
}

.status-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--accent);
  font-size: 13px;
  font-weight: 650;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.status-dot.pending {
  animation: pulse 1.2s ease-in-out infinite;
}

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

.grid .wide {
  grid-column: 1 / -1;
}

.details {
  display: grid;
  gap: 12px;
  margin: 16px 0 0;
}

.details div,
.boundary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.details dt,
.boundary-label {
  color: var(--muted);
  font-size: 14px;
}

.details dd {
  margin: 0;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.boundary {
  margin-top: 14px;
}

.boundary strong {
  color: var(--danger);
}

[hidden] {
  display: none !important;
}

@keyframes pulse {
  50% {
    opacity: 0.35;
  }
}

@media (max-width: 640px) {
  .topbar {
    padding: 0 16px;
  }

  .shell {
    width: calc(100% - 24px);
    margin: 24px auto;
  }

  .auth-panel,
  .panel {
    padding: 20px;
  }

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

  .grid .wide {
    grid-column: auto;
  }

  h1 {
    font-size: 26px;
  }
}
