:root {
  --auth-blue: #3b5bfd;
  --auth-sky: #4f8cff;
  --auth-ink: #1b2437;
  --auth-muted: #6b7385;
  --auth-line: #d9dee9;
  --auth-err: #fde8e8;
  --auth-err-text: #b42318;
}
* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body.auth {
  font-family: Manrope, "Segoe UI", sans-serif;
  color: var(--auth-ink);
  background: linear-gradient(135deg, #5b7cff 0%, #38bdf8 55%, #7dd3fc 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(21, 28, 58, .18);
  padding: 28px 32px 32px;
  position: relative;
}
.auth-wide { width: min(1080px, 100%); }
.auth-logo {
  text-align: center;
  font-weight: 800;
  font-size: 2rem;
  color: var(--auth-blue);
  letter-spacing: -0.04em;
  margin-bottom: 8px;
}
.auth-logo a { color: inherit; text-decoration: none; }
.auth-tabs {
  display: flex;
  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;
}
.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;
}
.auth-btn.primary { background: var(--auth-blue); color: #fff; }
.auth-btn.ghost { background: #fff; color: var(--auth-ink); border: 1px solid var(--auth-line); }
.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; }
.auth-pw { position: relative; display: block; }
.auth-pw input { padding-right: 40px; }
.auth-field.plain .auth-pw-toggle {
  appearance: none;
  -webkit-appearance: none;
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 4px;
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #5a6b7c;
  cursor: pointer;
  line-height: 0;
}
.auth-field.plain .auth-pw-toggle svg { width: 20px; height: 20px; }
.auth-field.plain .auth-pw-toggle .eye-shut,
.auth-field.plain .auth-pw-toggle[aria-pressed="true"] .eye-open { display: none; }
.auth-field.plain .auth-pw-toggle[aria-pressed="true"] .eye-shut { display: block; }
.auth-signup-actions {
  display: flex;
  justify-content: center;
  margin-top: 18px;
}
.auth-signup-actions .auth-btn { min-width: 180px; }
.modal-back {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .35);
  padding: 20px;
}
.modal {
  position: fixed;
  width: min(357px, calc(100% - 40px));
  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;
  cursor: move;
  user-select: none;
  touch-action: none;
}
.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(59,91,253,.15); }
.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%); }
}
