/* Auth pages — login, signup, reset password */
.auth-page {
  min-height: 100vh;
  background: var(--bg);
  cursor: auto;
}

.auth-page .custom-cursor,
.auth-page .cursor-glow {
  display: none;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}

.auth-brand {
  position: relative;
  padding: 48px 56px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 20%, rgba(232, 33, 39, 0.22), transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(232, 33, 39, 0.08), transparent 50%),
    linear-gradient(145deg, #111 0%, #0a0a0a 48%, #050505 100%);
  border-right: 1px solid var(--border);
}

.auth-brand::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, black 40%, transparent);
  pointer-events: none;
}

.auth-brand-inner {
  position: relative;
  z-index: 1;
}

.auth-logo {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: 3px;
  color: var(--text);
  display: inline-block;
  margin-bottom: 64px;
}

.auth-logo span {
  color: var(--tesla-red);
}

.auth-brand h1 {
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 16px;
  max-width: 420px;
}

.auth-brand h1 em {
  font-style: normal;
  color: var(--tesla-red);
}

.auth-brand-lead {
  color: #aaa;
  font-size: 1.05rem;
  max-width: 400px;
  line-height: 1.7;
  margin-bottom: 40px;
}

.auth-perks {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.auth-perks li {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  color: #ccc;
  font-size: 15px;
}

.auth-perk-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: rgba(232, 33, 39, 0.12);
  border: 1px solid rgba(232, 33, 39, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--tesla-red);
  font-size: 16px;
}

.auth-brand-foot {
  position: relative;
  z-index: 1;
  font-size: 12px;
  color: #555;
  letter-spacing: 0.5px;
}

.auth-brand-foot strong {
  color: var(--success);
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  letter-spacing: 1px;
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 24px;
  background: var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-card-header {
  margin-bottom: 32px;
}

.auth-card-header h2 {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.auth-card-header p {
  color: var(--muted);
  font-size: 15px;
}

.auth-form .form-group {
  margin-bottom: 20px;
}

.auth-form label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #aaa;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.auth-input-wrap {
  position: relative;
}

.auth-input-wrap input {
  width: 100%;
  padding: 14px 16px;
  padding-right: 44px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-size: 15px;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-input-wrap input::placeholder {
  color: #555;
}

.auth-input-wrap input:focus {
  outline: none;
  border-color: rgba(232, 33, 39, 0.6);
  background: rgba(232, 33, 39, 0.04);
  box-shadow: 0 0 0 3px rgba(232, 33, 39, 0.12);
}

.auth-toggle-pw {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 4px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.auth-toggle-pw:hover {
  color: var(--text);
}

.auth-hint {
  font-size: 12px;
  color: #666;
  margin-top: 6px;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
  font-size: 13px;
}

.auth-row a {
  color: var(--muted);
}

.auth-row a:hover {
  color: var(--tesla-red);
}

.auth-submit {
  width: 100%;
  padding: 15px 24px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  margin-top: 4px;
}

.auth-submit:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none !important;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 16px;
  margin: 28px 0;
  color: #555;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

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

.auth-switch {
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.auth-switch a {
  font-weight: 600;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 24px;
  transition: color 0.2s;
}

.auth-back:hover {
  color: var(--text);
}

.auth-forgot-panel {
  margin-top: 8px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.auth-forgot-panel summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
  user-select: none;
}

.auth-forgot-panel summary::-webkit-details-marker {
  display: none;
}

.auth-forgot-panel[open] summary {
  margin-bottom: 16px;
  color: var(--text);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: var(--success);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.auth-msg {
  padding: 14px 16px;
  border-radius: 10px;
  margin-top: 16px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
}

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

.auth-msg.ok {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #86efac;
}

.auth-msg.err {
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
}

.auth-msg a {
  color: var(--tesla-red);
  text-decoration: underline;
}

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

  .auth-brand {
    padding: 32px 24px 40px;
    border-right: none;
    border-bottom: 1px solid var(--border);
  }

  .auth-logo {
    margin-bottom: 32px;
  }

  .auth-brand h1 {
    font-size: 1.75rem;
  }

  .auth-perks {
    display: none;
  }

  .auth-main {
    padding: 32px 20px 48px;
  }
}
