﻿.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 110px 24px 40px;
  position: relative;
  overflow: hidden;
  background: var(--bg-primary);
}

.auth-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 720px 520px at 20% 18%, rgba(59,130,246,0.12), transparent 65%),
    radial-gradient(ellipse 620px 420px at 76% 80%, rgba(6,182,212,0.1), transparent 60%);
}

.auth-grid {
  position: absolute;
  inset: 0;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(59,130,246,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59,130,246,0.08) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 35%, black 10%, transparent 72%);
}

.auth-shell {
  position: relative;
  z-index: 2;
  max-width: 980px;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--border-light);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.auth-panel {
  padding: 42px 38px;
}

.auth-panel--form {
  background: var(--bg-card);
}

.auth-panel--promo {
  background: var(--bg-secondary);
  border-left: 1px solid var(--border);
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-logo-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--gradient-accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-family: "JetBrains Mono", monospace;
}

.auth-logo-text {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.auth-logo-text span {
  color: var(--accent-cyan);
}

.auth-title {
  font-size: 30px;
  line-height: 1.15;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 24px;
}

.auth-error {
  display: none;
  margin-bottom: 18px;
  background: rgba(244,63,94,0.14);
  border: 1px solid rgba(244,63,94,0.35);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 13px;
  color: var(--accent-rose);
}

.auth-error--show {
  display: block;
}

.auth-field {
  margin-bottom: 16px;
}

.auth-field label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  height: 46px;
  border: 1px solid var(--border-light);
  border-radius: 10px;
  background: var(--bg-card-hover);
  color: var(--text-primary);
  padding: 0 14px;
  font-size: 15px;
  outline: none;
}

.auth-field input:focus {
  border-color: var(--accent-blue);
}

.auth-field input.input-error {
  border-color: var(--accent-rose);
}

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

.auth-field-grid--two {
  grid-template-columns: 1fr 1fr;
}

.auth-plan-grid {
  margin: 8px 0 16px;
  border: 1px solid var(--border-light);
  border-radius: 12px;
  padding: 12px;
}

.auth-plan-grid legend {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  font-weight: 700;
  padding: 0 6px;
}

.auth-plan-option {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
}

.auth-plan-option + .auth-plan-option {
  margin-top: 6px;
}

.auth-plan-option:hover {
  border-color: var(--border-light);
  background: var(--bg-card-hover);
}

.auth-plan-option input {
  margin-top: 3px;
}

.auth-plan-option span {
  display: flex;
  flex-direction: column;
  line-height: 1.3;
}

.auth-plan-option strong {
  font-size: 14px;
  color: var(--text-primary);
}

.auth-plan-option small {
  font-size: 12px;
  color: var(--text-muted);
}

.auth-terms {
  margin-bottom: 16px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
}

.auth-link {
  background: transparent;
  border: none;
  color: var(--accent-cyan);
  font-size: 13px;
  font-weight: 600;
}

.auth-link:hover {
  text-decoration: underline;
}

.btn-login-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 12px;
  background: var(--gradient-accent);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 10px 22px rgba(59,130,246,0.25);
}

.btn-login-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

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

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-signup-copy {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
}

.auth-signup-copy a {
  color: var(--accent-cyan);
  font-weight: 600;
}

.auth-signup-copy a:hover {
  text-decoration: underline;
}

.promo-badge {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(16,185,129,0.36);
  background: rgba(16,185,129,0.12);
  color: var(--accent-emerald);
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 18px;
}

.promo-title {
  font-size: 28px;
  line-height: 1.2;
  margin-bottom: 10px;
  letter-spacing: -0.03em;
}

.promo-desc {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 20px;
}

.promo-note {
  margin-top: 12px;
  color: var(--text-muted);
  font-size: 12px;
}

.promo-plan {
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 16px;
  background: var(--bg-card-hover);
}

.promo-plan + .promo-plan {
  margin-top: 12px;
}

.promo-plan--pro {
  border-color: rgba(59,130,246,0.35);
}

.promo-plan-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 8px;
}

.promo-plan-header h3 {
  font-size: 17px;
  font-weight: 700;
}

.promo-plan-price {
  font-family: "JetBrains Mono", monospace;
  font-weight: 700;
}

.promo-plan-price--free {
  color: var(--accent-emerald);
}

.promo-plan-price--pro {
  color: var(--accent-cyan);
}

.promo-plan-price--pro span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 500;
}

.promo-plan-features {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 12px;
}

.promo-plan-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

.promo-plan-cta--free {
  border: 1px solid rgba(16,185,129,0.36);
  background: rgba(16,185,129,0.12);
  color: var(--accent-emerald);
}

.promo-plan-cta--pro {
  border: none;
  background: var(--gradient-accent);
  color: #fff;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(7,10,18,0.68);
}

.modal-overlay--open {
  display: flex;
}

.modal {
  width: 100%;
  max-width: 460px;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: 14px;
  padding: 24px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.modal-header h3 {
  font-size: 20px;
}

.modal-close {
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 26px;
  line-height: 1;
}

.modal-copy {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 14px;
}

.modal-actions {
  margin-top: 16px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.btn-secondary-light,
.btn-gradient {
  border-radius: 10px;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
}

.btn-secondary-light {
  border: 1px solid var(--border-light);
  background: var(--bg-card-hover);
  color: var(--text-secondary);
}

.btn-gradient {
  border: none;
  background: var(--gradient-accent);
  color: #fff;
}

.modal-help {
  margin-top: 12px;
  font-size: 12px;
  color: var(--text-muted);
}

.modal-help a {
  color: var(--accent-cyan);
}

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

  .auth-panel--promo {
    border-left: none;
    border-top: 1px solid var(--border);
  }
}

@media (max-width: 680px) {
  .auth-page {
    padding-left: 14px;
    padding-right: 14px;
  }

  .auth-field-grid--two {
    grid-template-columns: 1fr;
  }

  .auth-panel {
    padding: 32px 22px;
  }

  .promo-title {
    font-size: 24px;
  }

  .nav-links a:not(.nav-cta) {
    display: none;
  }
}
