:root {
  --auth-navy: #12203f;
  --auth-ink: #233252;
  --auth-gold: #c8a35a;
  --auth-cream: #fbf7ee;
  --auth-paper: #fffdfa;
  --auth-border: rgba(18, 32, 63, 0.12);
  --auth-muted: #68748f;
  --auth-success: #1f7a46;
  --auth-error: #b84242;
  --auth-shadow: 0 28px 70px rgba(18, 32, 63, 0.12);
}

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

body {
  margin: 0;
  min-height: 100vh;
  font-family: "DM Sans", sans-serif;
  color: var(--auth-ink);
  background:
    radial-gradient(circle at top left, rgba(200, 163, 90, 0.12), transparent 24rem),
    linear-gradient(135deg, #fffefb 0%, #f7f1e4 100%);
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 1.1fr) minmax(340px, 0.9fr);
  align-items: stretch;
}

.auth-panel {
  padding: 56px clamp(24px, 4vw, 56px);
}

.auth-panel--brand {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 20px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 251, 243, 0.92)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180' viewBox='0 0 180 180'%3E%3Cg fill='none' stroke='%23c8a35a' stroke-opacity='.17'%3E%3Ccircle cx='90' cy='90' r='70'/%3E%3Ccircle cx='90' cy='90' r='44'/%3E%3Cpath d='M90 14v152M14 90h152M34 34l112 112M146 34L34 146'/%3E%3C/g%3E%3C/svg%3E");
  border-right: 1px solid var(--auth-border);
}

.auth-kicker,
.auth-card__eyebrow {
  margin: 0;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--auth-gold);
}

.auth-title,
.auth-card h2,
.auth-callback-card h1 {
  margin: 0;
  font-family: "Playfair Display", serif;
  font-size: clamp(2.3rem, 3.2vw, 3.7rem);
  line-height: 1.02;
  color: var(--auth-navy);
}

.auth-card h2,
.auth-callback-card h1 {
  font-size: clamp(1.8rem, 2vw, 2.4rem);
}

.auth-copy,
.auth-card__header p,
.auth-callback-card p {
  margin: 0;
  max-width: 34rem;
  color: var(--auth-muted);
  font-size: 1rem;
  line-height: 1.75;
}

.auth-benefits {
  list-style: none;
  display: grid;
  gap: 14px;
  margin: 8px 0 0;
  padding: 0;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.98rem;
  color: var(--auth-ink);
}

.auth-benefits li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--auth-gold), #f1d081);
  box-shadow: 0 0 0 6px rgba(200, 163, 90, 0.12);
}

.auth-panel--form {
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-card,
.auth-callback-card {
  width: min(100%, 31rem);
  padding: 34px;
  border-radius: 30px;
  background: rgba(255, 253, 250, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.9);
  box-shadow: var(--auth-shadow);
  backdrop-filter: blur(16px);
}

.auth-card__header {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.auth-google-button,
.auth-submit-button,
.auth-toggle__button {
  font: inherit;
}

.auth-google-button,
.auth-submit-button {
  width: 100%;
  border: none;
  border-radius: 16px;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.auth-google-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 15px 18px;
  background: #ffffff;
  color: var(--auth-navy);
  border: 1px solid var(--auth-border);
  box-shadow: 0 14px 30px rgba(18, 32, 63, 0.08);
}

.auth-google-button:hover,
.auth-submit-button:hover {
  transform: translateY(-1px);
}

.auth-google-button__icon {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: var(--auth-cream);
  font-weight: 700;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0;
  color: var(--auth-muted);
  font-size: 0.88rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(18, 32, 63, 0.12);
}

.auth-toggle {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 6px;
  border-radius: 18px;
  background: rgba(18, 32, 63, 0.05);
  margin-bottom: 20px;
}

.auth-toggle__button {
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--auth-muted);
  padding: 12px 14px;
  font-weight: 700;
  cursor: pointer;
}

.auth-toggle__button.is-active {
  background: #ffffff;
  color: var(--auth-navy);
  box-shadow: 0 8px 22px rgba(18, 32, 63, 0.08);
}

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

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

.auth-field span {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-ink);
}

.auth-field input {
  width: 100%;
  border: 1px solid rgba(18, 32, 63, 0.14);
  border-radius: 16px;
  padding: 15px 16px;
  font: inherit;
  background: #fffefc;
  color: var(--auth-navy);
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-field input:focus {
  outline: none;
  border-color: rgba(200, 163, 90, 0.95);
  box-shadow: 0 0 0 5px rgba(200, 163, 90, 0.14);
}

.auth-submit-button {
  margin-top: 6px;
  padding: 15px 18px;
  background: linear-gradient(135deg, var(--auth-navy), #1e3568);
  color: #ffffff;
  box-shadow: 0 18px 32px rgba(18, 32, 63, 0.2);
}

.auth-status {
  min-height: 1.5rem;
  margin: 18px 2px 0;
  color: var(--auth-muted);
  font-size: 0.94rem;
}

.auth-status[data-tone="error"],
#callbackMessage[data-tone="error"] {
  color: var(--auth-error);
}

.auth-status[data-tone="success"] {
  color: var(--auth-success);
}

.auth-status[data-tone="info"] {
  color: var(--auth-ink);
}

.auth-shell--callback {
  display: grid;
  place-items: center;
  grid-template-columns: 1fr;
  padding: 24px;
}

.auth-callback-card {
  text-align: center;
  display: grid;
  gap: 14px;
  justify-items: center;
}

.auth-spinner {
  width: 3rem;
  height: 3rem;
  border-radius: 999px;
  border: 4px solid rgba(18, 32, 63, 0.12);
  border-top-color: var(--auth-gold);
  animation: auth-spin 1s linear infinite;
}

.auth-callback-link {
  color: var(--auth-navy);
  font-weight: 700;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

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

  .auth-panel--brand {
    border-right: none;
    border-bottom: 1px solid var(--auth-border);
  }
}

@media (max-width: 640px) {
  .auth-panel {
    padding: 28px 18px;
  }

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