:root {
  --auth-bg: #edf4f7;
  --auth-surface: #ffffff;
  --auth-surface-soft: #f8fbf7;
  --auth-primary: #d9e889;
  --auth-primary-hover: #c9db58;
  --auth-primary-border: #b7c949;
  --auth-accent: #12c9ad;
  --auth-text: #07152f;
  --auth-muted: #58708a;
  --auth-border: #d9e5ea;
  --auth-shadow: 0 24px 70px rgba(20, 42, 67, 0.14);
  --auth-radius: 28px;
  font-family: "Aptos", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
}

body.auth-page {
  min-height: 100dvh;
  margin: 0;
  color: var(--auth-text);
  background:
    radial-gradient(circle at 16% 14%, rgba(217, 232, 137, 0.42), transparent 28rem),
    radial-gradient(circle at 88% 82%, rgba(18, 201, 173, 0.18), transparent 26rem),
    linear-gradient(135deg, #f8fbfc 0%, var(--auth-bg) 72%);
}

.auth-page a {
  color: #17365f;
  font-weight: 700;
  text-decoration: none;
}

.auth-page a:hover,
.auth-page a:focus {
  text-decoration: underline;
}

.auth-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: clamp(1.25rem, 3vw, 3rem);
}

.auth-card {
  width: min(100%, 1060px);
  min-height: min(720px, calc(100dvh - 4rem));
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  overflow: hidden;
  background: var(--auth-surface);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: var(--auth-radius);
  box-shadow: var(--auth-shadow);
}

.auth-panel {
  position: relative;
}

.auth-panel-form {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(2rem, 5vw, 4.5rem);
}

.auth-brand {
  width: fit-content;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}

.auth-brand-mark {
  color: #102044;
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -0.08em;
}

.auth-brand-mark span {
  color: #13a98f;
}

.auth-brand-product {
  padding-left: 0.9rem;
  border-left: 1px solid var(--auth-border);
  color: var(--auth-muted);
  font-size: 1.05rem;
  font-weight: 800;
}

.auth-copy {
  max-width: 34rem;
}

.auth-eyebrow {
  margin: 0 0 0.65rem;
  color: #466515;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-copy h1 {
  margin: 0;
  font-size: clamp(2.15rem, 4vw, 4.2rem);
  line-height: 1.04;
  letter-spacing: -0.065em;
}

.auth-copy p:not(.auth-eyebrow) {
  max-width: 31rem;
  margin: 1rem 0 0;
  color: var(--auth-muted);
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  line-height: 1.6;
}

.auth-flashes {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.auth-alert {
  padding: 0.85rem 1rem;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  color: #8f2d20;
  background: #fff4f2;
  font-size: 0.95rem;
}

.auth-actions {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.5rem;
}

.auth-button {
  min-height: 3.15rem;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 0.8rem 1.1rem;
  border: 1px solid transparent;
  border-radius: 16px;
  color: var(--auth-text);
  font: inherit;
  font-weight: 850;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease;
}

.auth-button:hover:not(:disabled),
.auth-button:focus-visible:not(:disabled) {
  transform: translateY(-1px);
}

.auth-button:focus-visible {
  outline: 3px solid rgba(18, 201, 173, 0.36);
  outline-offset: 3px;
}

.auth-button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  filter: grayscale(0.8);
}

.auth-button-primary {
  background: var(--auth-primary);
  border-color: var(--auth-primary-border);
  box-shadow: 0 12px 24px rgba(153, 172, 55, 0.22);
}

.auth-button-primary:hover:not(:disabled),
.auth-button-primary:focus-visible:not(:disabled) {
  background: var(--auth-primary-hover);
}

.auth-button-secondary {
  background: #fff;
  border-color: var(--auth-border);
  box-shadow: 0 10px 24px rgba(20, 42, 67, 0.07);
}

.auth-button-icon {
  width: 1.2rem;
  height: 1.2rem;
  display: inline-grid;
  place-items: center;
}

.auth-button-icon svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.auth-button-icon-google {
  color: #1a73e8;
  font-size: 1.25rem;
  font-weight: 950;
}

.auth-footer {
  margin-top: auto;
  padding-top: 2rem;
  color: var(--auth-muted);
  font-size: 0.9rem;
}

.auth-panel-art {
  min-height: 100%;
  overflow: hidden;
  background:
    linear-gradient(145deg, rgba(217, 232, 137, 0.22), rgba(18, 201, 173, 0.08)),
    var(--auth-surface-soft);
}

.auth-contour {
  position: absolute;
  inset: -10%;
  opacity: 0.9;
  background:
    repeating-radial-gradient(
      ellipse at 35% 44%,
      transparent 0 22px,
      rgba(18, 201, 173, 0.2) 23px 25px,
      transparent 26px 42px
    ),
    radial-gradient(circle at 65% 20%, rgba(255, 255, 255, 0.95), transparent 18rem);
  transform: rotate(-8deg) scale(1.15);
}

.auth-panel-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.82));
}

.auth-art-copy {
  position: absolute;
  right: 2rem;
  bottom: 2rem;
  left: 2rem;
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(20, 42, 67, 0.12);
}

.auth-art-copy span {
  color: #176f5f;
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-art-copy strong {
  font-size: clamp(1.35rem, 2vw, 2.05rem);
  line-height: 1.05;
  letter-spacing: -0.045em;
}

.auth-loading-dot {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: auth-spin 0.7s linear infinite;
}

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

@media (max-width: 860px) {
  .auth-shell {
    display: block;
    padding: 0;
  }

  .auth-card {
    min-height: 100dvh;
    width: 100%;
    grid-template-columns: 1fr;
    border: 0;
    border-radius: 0;
  }

  .auth-panel-form {
    min-height: 100dvh;
    padding: clamp(1.5rem, 7vw, 2.5rem);
  }

  .auth-panel-art {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
