:root {
  --bg: #f4efe6;
  --panel: rgba(255, 255, 255, 0.72);
  --panel-strong: #fffdf8;
  --line: rgba(23, 28, 36, 0.08);
  --ink: #111827;
  --muted: #667085;
  --accent: #d94841;
  --accent-dark: #992b24;
  --teal: #0f766e;
  --shadow: 0 24px 80px rgba(17, 24, 39, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", "Avenir Next", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 118, 110, 0.16), transparent 28%),
    radial-gradient(circle at bottom right, rgba(217, 72, 65, 0.2), transparent 26%),
    linear-gradient(135deg, #f7f2ea 0%, #f3ede3 45%, #efe8dc 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
}

.auth-brand-panel,
.auth-panel {
  padding: 40px;
}

.auth-brand-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 32px;
}

.auth-brand-panel::before {
  content: "";
  position: absolute;
  inset: 20px;
  border-radius: 32px;
  background: linear-gradient(160deg, rgba(17, 24, 39, 0.98), rgba(17, 24, 39, 0.84));
  box-shadow: var(--shadow);
}

.auth-brand-panel--register::before {
  background: linear-gradient(160deg, rgba(15, 118, 110, 0.95), rgba(17, 24, 39, 0.92));
}

.auth-brand-mark,
.auth-brand-copy,
.auth-brand-metrics,
.auth-brand-steps {
  position: relative;
  z-index: 1;
}

.auth-brand-mark {
  width: 64px;
  height: 64px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #f97316, #facc15);
  color: #111827;
  font-weight: 700;
  font-size: 24px;
}

.auth-kicker,
.auth-eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 12px;
}

.auth-kicker {
  color: rgba(255, 255, 255, 0.72);
}

.auth-brand-copy h1 {
  margin: 0;
  max-width: 560px;
  color: #fff;
  font-size: clamp(36px, 5vw, 64px);
  line-height: 0.98;
}

.auth-summary {
  max-width: 520px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.74);
  font-size: 16px;
  line-height: 1.65;
}

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

.metric-card,
.step-chip {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 22px;
  padding: 18px 20px;
  background: rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
}

.metric-label {
  display: block;
  color: rgba(255, 255, 255, 0.65);
  font-size: 12px;
  margin-bottom: 10px;
}

.metric-value {
  color: #fff;
  font-size: 28px;
}

.auth-brand-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.step-chip {
  color: #fff;
  font-size: 14px;
}

.auth-panel {
  display: grid;
  place-items: center;
}

.auth-card {
  width: min(100%, 500px);
  padding: 38px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 32px;
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: var(--shadow);
}

.auth-eyebrow {
  color: var(--accent);
}

.auth-card h2 {
  margin: 0;
  font-size: 34px;
}

.auth-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

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

.field {
  display: grid;
  gap: 8px;
  font-size: 14px;
}

.field span {
  color: #344054;
  font-weight: 500;
}

.field input {
  width: 100%;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.8);
  font: inherit;
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.field input:focus {
  border-color: rgba(217, 72, 65, 0.55);
  box-shadow: 0 0 0 4px rgba(217, 72, 65, 0.12);
  transform: translateY(-1px);
}

.primary-btn,
.ghost-btn {
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 15px 18px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, opacity 0.18s ease;
}

.primary-btn {
  background: linear-gradient(135deg, var(--accent), #f97316);
  color: #fff;
  box-shadow: 0 18px 36px rgba(217, 72, 65, 0.24);
}

.ghost-btn {
  background: var(--panel-strong);
  color: var(--ink);
  border: 1px solid var(--line);
}

.primary-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
}

.auth-divider {
  position: relative;
  margin: 22px 0;
  text-align: center;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
}

.auth-divider span {
  position: relative;
  padding: 0 10px;
  background: rgba(247, 242, 234, 0.92);
  color: var(--muted);
  font-size: 13px;
}

.google-login-mount {
  min-height: 42px;
  display: grid;
  place-items: center;
}

.auth-footer {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 14px;
  color: var(--muted);
}

.auth-footer a {
  color: var(--teal);
  text-decoration: none;
  font-weight: 600;
}

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 20px;
  display: grid;
  gap: 10px;
  z-index: 100;
}

.toast {
  min-width: 220px;
  padding: 12px 14px;
  border-radius: 14px;
  background: rgba(17, 24, 39, 0.92);
  color: #fff;
  font-size: 13px;
  box-shadow: var(--shadow);
}

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

  .auth-brand-panel {
    min-height: 420px;
  }
}

@media (max-width: 640px) {
  .auth-brand-panel,
  .auth-panel {
    padding: 20px;
  }

  .auth-card {
    padding: 24px;
    border-radius: 24px;
  }

  .auth-brand-metrics {
    grid-template-columns: 1fr;
  }
}

body[data-auth-mode="login"] {
  min-height: 100vh;
  background: #ececec;
  color: #2f343b;
  display: grid;
  grid-template-rows: 52px 1fr 46px;
  font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.gc-topbar {
  background: #fff;
  border-bottom: 1px solid #e4e7eb;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 14px;
}

.gc-wordmark {
  display: inline-flex;
  align-items: center;
}

.gc-wordmark-img {
  display: block;
  width: 84px;
  height: auto;
}

.gc-lang {
  border: 0;
  background: transparent;
  color: #50545d;
  font-size: 12px;
  cursor: pointer;
}

.auth-lang-floating {
  position: fixed;
  top: 18px;
  right: 20px;
  z-index: 20;
  height: 32px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(17, 24, 39, 0.1);
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(10px);
}

.gc-login-stage {
  min-height: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 24px;
}

.login-form-container {
  margin: 0 auto;
  width: 548px;
  height: 768px;
  padding: 50px;
  box-sizing: border-box;
  border-radius: 20px;
  background: #ffffff;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.login-form-content {
  width: 448px;
  min-height: 586px;
  box-sizing: border-box;
  border: 0;
  background: transparent;
  padding: 0;
}

.logo-container {
  text-align: center;
}

.logo-img {
  max-width: 100%;
  max-height: 120px;
  height: 92px;
}

.title {
  font-size: 32px;
  font-weight: 500;
  margin-top: 28px;
  margin-bottom: 0;
  text-align: center;
  color: #2f343c;
}

.subtitle {
  font-size: 18px;
  margin-bottom: 36px;
  margin-top: 8px;
  text-align: center;
  color: #626874;
}

.gc-form {
  display: grid;
  gap: 0;
}

.edition-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: -12px 0 22px;
}

.edition-card {
  min-height: 78px;
  border: 1px solid #d8dde3;
  border-radius: 12px;
  background: #fff;
  color: #4a5160;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 6px;
  justify-content: center;
  padding: 12px 14px;
  text-align: left;
  font-family: inherit;
  transition: border-color .15s, box-shadow .15s, background .15s;
}

.edition-card:hover {
  border-color: #7ac4cd;
  background: #f8fcfd;
}

.edition-card--active {
  border-color: #3aa9b7;
  background: #eef9fb;
  box-shadow: inset 0 0 0 1px #3aa9b7;
}

.edition-title {
  color: #2f343c;
  font-size: 16px;
  font-weight: 700;
}

.edition-copy {
  color: #737b87;
  font-size: 12px;
  line-height: 1.35;
}

.gc-field input {
  width: 100%;
  height: 52px;
  border: 1px solid #d8dde3;
  border-radius: 10px;
  background: #eff2f5;
  padding: 0 16px;
  font-size: 18px;
  color: #4a5160;
  outline: none;
}

.gc-field {
  margin-bottom: 28px;
}

.gc-field-password {
  margin-bottom: 14px;
}

.gc-field input:focus {
  border-color: #7ac4cd;
  background: #fff;
}

.gc-field-password {
  position: relative;
}

.gc-eye {
  position: absolute;
  right: 14px;
  top: 15px;
  color: #b8bdc6;
  font-size: 16px;
}

.forgot-pwd {
  margin: -2px 0 48px;
  display: flex;
  justify-content: flex-end;
  font-size: 16px;
}

.forgot-pwd a {
  color: #3aa8b9;
  text-decoration: none;
}

.gc-login-btn {
  border: 0;
  height: 52px;
  border-radius: 36px;
  background: #3aa9b7;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  width: 100%;
}

.navigate-row {
  margin-top: 50px;
}

.navigate-row-or {
  display: flex;
  align-items: center;
  margin-bottom: 22px;
}

.navigate-row-or span {
  margin: 0 18px;
  font-size: 16px;
  color: #9aa0aa;
}

.navigate-row-or .line {
  height: 1px;
  background: #e0e4e9;
  flex: 1;
}

.navigate-row-thirdParty {
  display: flex;
  justify-content: center;
  gap: 42px;
}

.third-btn {
  width: 52px;
  height: 52px;
  border-radius: 64px;
  border: 1px solid #d2d7dd;
  background: #fff;
  color: #5c636f;
  font-size: 20px;
  cursor: pointer;
  display: grid;
  place-items: center;
}

.third-btn img {
  width: 24px;
  height: 24px;
}

.navigate-row-signup {
  text-align: center;
  margin-top: 48px;
  font-size: 16px;
  color: #838996;
}

.navigate-row-signup a {
  margin-left: 8px;
  color: #43adbd;
  text-decoration: none;
}

.gc-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  color: #9fa4ac;
  font-size: 11px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 0 12px;
}

.gc-footer a {
  color: #79aebf;
  text-decoration: none;
}

@media (max-width: 640px) {
  body[data-auth-mode="login"] {
    grid-template-rows: 52px 1fr 64px;
  }

  .gc-login-stage {
    height: auto;
    min-height: calc(100vh - 116px);
    padding: 16px;
  }

  .login-form-container {
    width: 100%;
    max-width: 548px;
    height: auto;
    min-height: 700px;
    padding: 28px;
  }

  .login-form-content {
    width: 100%;
    min-height: auto;
  }

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

  .gc-footer {
    white-space: normal;
    text-align: center;
    line-height: 1.5;
  }
}
