:root {
  color-scheme: light dark;
  --bg-top: #eef3f8;
  --bg-bottom: #dde6f0;
  --panel-bg: rgba(248, 251, 254, 0.76);
  --panel-border: rgba(148, 163, 184, 0.32);
  --panel-shadow: 0 18px 42px -14px rgba(30, 41, 59, 0.14);
  --text: #1e293b;
  --muted: #475569;
  --input-bg: rgba(255, 255, 255, 0.82);
  --input-border: rgba(148, 163, 184, 0.48);
  --accent: #3b6285;
  --accent-hover: #315373;
  --accent-active: #284560;
  --accent-text: #f8fafc;
  --focus: #3b6285;
  --error-text: #b42318;
  --error-bg: rgba(180, 35, 24, 0.08);
  --error-border: rgba(180, 35, 24, 0.24);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg-top: #111923;
    --bg-bottom: #182330;
    --panel-bg: rgba(27, 38, 52, 0.76);
    --panel-border: rgba(148, 163, 184, 0.18);
    --panel-shadow: 0 20px 48px -14px rgba(0, 0, 0, 0.48);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --input-bg: rgba(15, 23, 34, 0.68);
    --input-border: rgba(148, 163, 184, 0.28);
    --accent: #4c789f;
    --accent-hover: #5a87b0;
    --accent-active: #3f678b;
    --accent-text: #f8fafc;
    --focus: #7aa6ce;
    --error-text: #fda29b;
    --error-bg: rgba(240, 68, 56, 0.14);
    --error-border: rgba(240, 68, 56, 0.32);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: system-ui, -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, var(--bg-top), var(--bg-bottom));
  -webkit-font-smoothing: antialiased;
}

.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 1.25rem;
}

.panel {
  width: min(100%, 22rem);
  padding: 1.75rem 1.5rem;
  border-radius: 1rem;
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  box-shadow: var(--panel-shadow);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
}

.title {
  margin: 0 0 1.25rem;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

.form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.45rem;
}

.label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--muted);
}

.input {
  width: 100%;
  padding: 0.625rem 0.75rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--input-bg);
  border: 1px solid var(--input-border);
  border-radius: 0.6rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.input:focus-visible,
.submit:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.status {
  margin: 0;
  padding: 0.55rem 0.75rem;
  font-size: 0.85rem;
  line-height: 1.4;
  color: var(--error-text);
  background: var(--error-bg);
  border: 1px solid var(--error-border);
  border-radius: 0.55rem;
}

.submit {
  width: 100%;
  padding: 0.65rem 1rem;
  font: inherit;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--accent-text);
  background: var(--accent);
  border: 1px solid transparent;
  border-radius: 0.6rem;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease;
}

.submit:hover:not(:disabled) {
  background: var(--accent-hover);
}

.submit:active:not(:disabled) {
  background: var(--accent-active);
}

.input:disabled,
.submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

@media (max-width: 360px) {
  .panel {
    padding: 1.35rem 1.1rem;
  }
}
