:root {
  --auth-blue: #1e90ff;
  --auth-sky: #4aa3ff;
  --auth-ink: #0a121c;
  --auth-muted: #5a6b7c;
  --auth-line: #c5d0db;
  --auth-err: #fde8e8;
  --auth-err-text: #b42318;
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.auth {
  font-family: "Public Sans", "Segoe UI", sans-serif;
  color: var(--auth-ink);
  background:
    radial-gradient(ellipse 70% 55% at 78% 18%, rgba(30, 144, 255, 0.28), transparent 58%),
    radial-gradient(ellipse 55% 45% at 12% 88%, rgba(46, 196, 168, 0.16), transparent 55%),
    linear-gradient(165deg, #070d16 0%, #101b2c 48%, #162338 100%);
  min-height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 32px 16px;
}
.auth-card {
  width: min(560px, 100%);
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 24px 60px rgba(10, 18, 28, .35);
  padding: 28px 32px 32px;
  position: relative;
}
.auth-wide { width: min(1080px, 100%); }
.auth-logo {
  text-align: center;
  font-family: "Titillium Web", sans-serif;
  font-weight: 700;
  font-size: 1.65rem;
  color: var(--auth-blue);
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.auth-logo a { color: inherit; text-decoration: none; }
.auth-tabs {
  display: flex;
  justify-content: flex-start;
  gap: 22px;
  border-bottom: 1px solid var(--auth-line);
  margin-bottom: 22px;
}
.auth-tabs a {
  text-decoration: none;
  color: var(--auth-ink);
  font-weight: 700;
  padding: 10px 0 12px;
  border-bottom: 3px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.auth-tabs a:hover { color: var(--auth-blue); }
.auth-tabs a.active { color: var(--auth-blue); border-bottom-color: var(--auth-blue); }
.auth-field { position: relative; margin: 14px 0; }
.auth-field input {
  width: 100%;
  border: 1px solid var(--auth-line);
  border-radius: 4px;
  padding: 12px 12px 12px 42px;
  font: inherit;
}
.auth-field.plain input { padding-left: 12px; }
.auth-field label { display: block; font-size: .86rem; font-weight: 700; margin-bottom: 6px; }
.auth-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #9aa3b5;
  width: 18px;
  height: 18px;
}
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.auth-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.auth-btn {
  border: 0;
  border-radius: 4px;
  padding: 11px 14px;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.auth-btn.primary { background: var(--auth-blue); color: #fff; }
.auth-btn.primary:hover {
  background: #4aa3ff;
}
.auth-btn.ghost { background: #fff; color: var(--auth-ink); border: 1px solid var(--auth-line); }
.auth-btn.ghost:hover {
  border-color: var(--auth-blue);
  color: var(--auth-blue);
}
.auth-signup-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.auth-signup-actions .auth-btn {
  min-width: 180px;
}
.auth-error {
  background: var(--auth-err);
  color: var(--auth-err-text);
  border-radius: 4px;
  padding: 10px 12px;
  font-size: .92rem;
  margin: 10px 0;
}
.auth-ok {
  background: #ecfdf3;
  color: #067647;
  border-radius: 4px;
  padding: 10px 12px;
  margin: 10px 0;
}
.auth-foot {
  margin-top: 22px;
  color: #fff;
  font-size: .92rem;
}
.auth-foot a { color: #fff; }
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(10, 18, 28, .45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,.2);
}
.modal h3 {
  margin: 0;
  background: var(--auth-blue);
  color: #fff;
  padding: 12px 16px;
  font-size: 1rem;
}
.modal .body { padding: 18px 16px; }
.modal .actions { display: flex; justify-content: flex-end; gap: 8px; padding: 0 16px 16px; }
.hint { color: var(--auth-muted); font-size: .95rem; }
.hint a { color: var(--auth-blue); }
.plans {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 20px;
}
.plan {
  border: 1px solid var(--auth-line);
  border-radius: 12px;
  padding: 22px;
  background: #fff;
}
.plan.featured { border-color: var(--auth-blue); box-shadow: 0 10px 30px rgba(30,144,255,.18); }
.plan h2 { margin: 4px 0 8px; }
.plan .price { font-size: 2.2rem; font-weight: 800; }
.plan ul { padding: 0; list-style: none; margin: 16px 0 20px; }
.plan li { padding: 6px 0 6px 18px; position: relative; }
.plan li::before { content: "✓"; position: absolute; left: 0; color: var(--auth-blue); font-weight: 800; }
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.topbar a { color: var(--auth-muted); font-weight: 700; text-decoration: none; }
#checkout { min-height: 480px; }
@media (max-width: 900px) {
  .plans, .row-2, .auth-actions { grid-template-columns: 1fr; }
  .auth-wide { width: min(560px, 100%); }
}
