:root {
  --bg0: #0b1220;
  --bg1: #122033;
  --panel: #f4f7fb;
  --ink: #102033;
  --muted: #5b6b7c;
  --line: #d7e0ea;
  --accent: #0f6e56;
  --accent-ink: #ffffff;
  --warn: #8a3b12;
  --warn-bg: #fff1e6;
  --ok: #0f6e56;
  --ok-bg: #e7f6f0;
  --shadow: 0 24px 60px rgba(8, 18, 32, 0.28);
  --radius: 18px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: radial-gradient(1200px 600px at 10% 10%, #1a3354 0%, transparent 55%),
    radial-gradient(900px 500px at 90% 80%, #0f6e5633 0%, transparent 50%), var(--bg0);
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
}

.brand-panel {
  color: #e8eef7;
  padding: clamp(2rem, 5vw, 4.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1.25rem;
}

.brand-mark {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  opacity: 0.9;
}

.brand-title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 3.6rem);
  line-height: 1.05;
  margin: 0;
  max-width: 11ch;
}

.brand-title em {
  font-style: italic;
  color: #9fd9c5;
}

.brand-copy {
  max-width: 36ch;
  color: #b7c4d6;
  line-height: 1.55;
  margin: 0;
}

.brand-features {
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.65rem;
  color: #d5deea;
  font-size: 0.95rem;
}

.brand-features li::before {
  content: "✓ ";
  color: #9fd9c5;
}

.brand-features code {
  font-size: 0.85em;
  color: #9fd9c5;
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: linear-gradient(180deg, #eef3f8, #e4ebf3);
}

.card {
  width: min(420px, 100%);
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.6rem 1.5rem 1.4rem;
  animation: rise 0.45s ease both;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

h2 {
  margin: 0 0 0.25rem;
  font-size: 1.55rem;
}

h3 {
  margin: 0.4rem 0 0.6rem;
  font-size: 1rem;
}

.muted {
  color: var(--muted);
  margin: 0 0 1.1rem;
  font-size: 0.92rem;
}

.social {
  display: grid;
  gap: 0.55rem;
}

.social-btn,
.primary,
.ghost {
  font: inherit;
  cursor: pointer;
  border-radius: 12px;
  padding: 0.72rem 0.9rem;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}

.social-btn {
  background: #fff;
  border: 1px solid var(--line);
  text-align: left;
  font-weight: 500;
}

.social-btn:hover,
.ghost:hover {
  transform: translateY(-1px);
  border-color: #b8c6d6;
}

.divider {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 0.6rem;
  align-items: center;
  margin: 1rem 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: var(--line);
}

form {
  display: grid;
  gap: 0.7rem;
}

label {
  display: grid;
  gap: 0.3rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #304457;
}

input {
  font: inherit;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  background: #fff;
}

input:focus {
  outline: 2px solid #0f6e5540;
  border-color: var(--accent);
}

.primary {
  border: none;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  margin-top: 0.25rem;
}

.primary:hover {
  filter: brightness(1.05);
  transform: translateY(-1px);
}

.ghost {
  margin-top: 0.9rem;
  width: 100%;
  background: transparent;
  border: 1px solid var(--line);
}

.switch {
  margin: 1rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.switch a {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.test-banner {
  margin: 0 0 1rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  background: #e7f6f0;
  color: #0f6e56;
  font-size: 0.88rem;
  line-height: 1.4;
}

.social-optional {
  margin-top: 1.1rem;
  border-top: 1px solid var(--line);
  padding-top: 0.75rem;
  color: var(--muted);
  font-size: 0.85rem;
}

.social-optional summary {
  cursor: pointer;
  margin-bottom: 0.6rem;
  font-weight: 600;
}

.social-optional .social {
  margin-top: 0.4rem;
}

.alert {
  width: min(420px, 100%);
  margin-bottom: 0.8rem;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  font-size: 0.9rem;
}

.alert.error {
  background: var(--warn-bg);
  color: var(--warn);
}

.alert.ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.user-dl {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: 0.35rem 0.75rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.user-dl dt {
  color: var(--muted);
}

.user-dl dd {
  margin: 0;
  word-break: break-all;
}

.profile {
  border-top: 1px solid var(--line);
  padding-top: 0.9rem;
}

@media (max-width: 900px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .brand-panel {
    padding-bottom: 1rem;
  }

  .brand-title {
    max-width: none;
  }
}
