:root {
  --bg: #f5f5f7;
  --surface: #ffffff;
  --ink: #1d1d1f;
  --ink-muted: #424245;
  --ink-soft: #6e6e73;
  --accent: #0a7c6e;
  --accent-hover: #086357;
  --line: rgba(0, 0, 0, 0.08);
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
  --shadow-soft: 0 1px 4px rgba(0, 0, 0, 0.04);
  --radius: 18px;
  --radius-sm: 12px;
  --pill: 980px;
  --font-display: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Helvetica Neue", sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "PingFang SC", "Noto Sans SC",
    "Helvetica Neue", sans-serif;

  /* 兼容旧变量名，映射到新色板 */
  --paper: var(--bg);
  --panel: var(--surface);
  --panel-strong: var(--surface);
  --teal: var(--accent);
  --teal-deep: var(--accent);
  --teal-soft: rgba(10, 124, 110, 0.1);
  --sand: #86868b;
  --sand-soft: rgba(134, 134, 139, 0.12);
  --moss: var(--accent-hover);
  --danger: #b42318;
  --warning: #9a6700;
  --success: #067647;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.auth-atmosphere {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.auth-atmosphere__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(48px);
  opacity: 0.45;
  animation: rise-in 1.2s ease both;
}

.auth-atmosphere__orb--a {
  width: 40vw;
  height: 40vw;
  left: -10%;
  bottom: -10%;
  background: rgba(15, 122, 107, 0.2);
}

.auth-atmosphere__orb--b {
  width: 28vw;
  height: 28vw;
  right: 8%;
  top: 8%;
  background: rgba(216, 181, 106, 0.22);
}

.page-shell {
  position: relative;
  z-index: 1;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.page-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.brand-panel {
  position: relative;
  overflow: hidden;
  padding: 64px;
  color: #f5f5f7;
  background: #1d1d1f;
}

.brand-panel__glow,
.brand-panel__mist {
  display: none;
}

.brand-mark {
  margin: 0 0 28px;
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(245, 245, 247, 0.7);
}

.brand-points {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 28px 0 0;
  padding: 0;
  list-style: none;
}

.brand-points li {
  padding: 8px 14px;
  border: 1px solid rgba(247, 255, 251, 0.28);
  border-radius: 999px;
  font-size: 0.88rem;
  color: rgba(247, 255, 251, 0.9);
  background: rgba(255, 255, 255, 0.08);
}

.brand-panel__content {
  position: relative;
  z-index: 1;
  max-width: 460px;
  animation: rise-in 700ms ease both;
}

.brand-mark,
.topbar__brand,
.eyebrow {
  letter-spacing: -0.01em;
  text-transform: none;
}

.brand-panel h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 4vw, 3.6rem);
  line-height: 1.15;
  font-weight: 700;
}

.brand-copy {
  margin: 22px 0 0;
  font-size: 1.05rem;
  line-height: 1.7;
  color: rgba(247, 255, 251, 0.86);
}

.form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
}

.form-panel__inner {
  width: min(100%, 440px);
  animation: rise-in 700ms ease 80ms both;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 36px 32px;
}

.auth-card__header h2 {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1.2;
}

.eyebrow {
  margin: 0;
  color: var(--teal);
  font-size: 0.85rem;
  font-weight: 700;
}

.subtitle {
  margin: 12px 0 0;
  color: var(--ink-soft);
  line-height: 1.6;
}

.auth-form {
  display: grid;
  gap: 16px;
  margin-top: 28px;
}

.field {
  display: grid;
  gap: 8px;
}

.field span {
  font-size: 0.92rem;
  font-weight: 500;
}

.field input,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  font: inherit;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.92);
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}

.field input:focus,
.field select:focus {
  border-color: rgba(15, 122, 107, 0.55);
  box-shadow: 0 0 0 4px rgba(15, 122, 107, 0.12);
}

.login-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 22px;
}

.login-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.55);
  color: var(--ink-soft);
  font-weight: 600;
  text-decoration: none;
}

.login-tab:hover {
  text-decoration: none;
  border-color: rgba(15, 122, 107, 0.35);
}

.login-tab.is-active {
  background: rgba(15, 122, 107, 0.12);
  color: var(--teal-deep);
  border-color: rgba(15, 122, 107, 0.35);
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
}

.check-row {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-soft);
  font-size: 0.95rem;
  cursor: pointer;
  user-select: none;
  pointer-events: auto;
}

.check-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  flex-shrink: 0;
  cursor: pointer;
  accent-color: var(--accent);
  pointer-events: auto;
}

.primary-btn,
.ghost-btn {
  font: inherit;
  cursor: pointer;
  border-radius: var(--pill);
  min-height: 44px;
  transition: background 160ms ease, color 160ms ease, transform 120ms ease,
    border-color 160ms ease;
}

.primary-btn {
  border: 0;
  background: var(--accent);
  color: #fff;
  padding: 14px 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.primary-btn:hover {
  background: var(--accent-hover);
  filter: none;
  transform: none;
  box-shadow: none;
  text-decoration: none;
}

.primary-btn:active,
.ghost-btn:active {
  transform: scale(0.98);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  padding: 12px 18px;
  font-weight: 600;
}

.ghost-btn--solid {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.ghost-btn--solid:hover {
  background: #ebebed;
  text-decoration: none;
}

.ghost-btn--quiet {
  background: transparent;
  border-color: transparent;
  color: var(--ink-soft);
  font-weight: 500;
  min-height: 36px;
  padding: 6px 12px;
  box-shadow: none;
}

.ghost-btn--quiet:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
  text-decoration: none;
}

.auth-card__footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 18px;
}

.flash {
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 0.92rem;
  line-height: 1.5;
  border: 1px solid transparent;
}

.flash--error {
  background: #fef3f2;
  color: var(--danger);
  border-color: #fecdca;
}

.flash--warning {
  background: #fffaeb;
  color: var(--warning);
  border-color: #fedf89;
}

.flash--success {
  background: #ecfdf3;
  color: var(--success);
  border-color: #abeFC6;
}

.field-hint {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.4;
}

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

.field-hint--bad {
  color: var(--danger);
}

.field-error {
  margin-top: 6px;
  font-size: 0.88rem;
  color: var(--danger);
}

.reset-box {
  margin-top: 18px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(15, 122, 107, 0.08);
  border: 1px dashed rgba(15, 122, 107, 0.35);
}

.reset-box p {
  margin: 0 0 10px;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.reset-link {
  display: block;
  word-break: break-all;
  font-size: 0.9rem;
  line-height: 1.5;
}

.field-error {
  color: var(--danger);
  font-size: 0.85rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(251, 251, 253, 0.86);
  backdrop-filter: saturate(180%) blur(20px);
}

.topbar__brand {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.topbar__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar__user {
  color: var(--ink-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (max-width: 900px) {
  .page-shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    min-height: 280px;
    padding: 36px 28px;
  }

  .brand-panel h1 {
    font-size: 2.2rem;
  }

  .auth-card {
    padding: 28px 22px;
  }

  .auth-card__footer {
    flex-direction: column;
  }
}
