/* ============================================================
   AUTH.CSS — Shared styles for login, request-access,
   create-account pages. Matches ConstellaGen dashboard design.
============================================================ */

*, *::before, *::after { margin:0; padding:0; box-sizing:border-box; }

:root {
  --gold:         #f8d04f;
  --gold-dim:     rgba(248, 208, 79, 0.65);
  --gold-faint:   rgba(248, 208, 79, 0.07);
  --gold-border:  rgba(248, 208, 79, 0.16);
  --navy-deep:    #090f1d;
  --navy:         #0d1424;
  --navy-mid:     #111c30;
  --text-body:    rgba(248, 230, 150, 0.75);
  --text-muted:   rgba(248, 230, 150, 0.4);
  --danger:       rgb(253, 75, 75);
  --danger-bg:    rgba(253, 75, 75, 0.07);
  --danger-border:rgba(253, 75, 75, 0.22);
}

html, body {
  min-height: 100%;
  background: var(--navy);
  font-family: "Inter", sans-serif;
  color: var(--gold);
}

/* ============================================================
   BACKGROUND
============================================================ */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.auth-glow {
  position: absolute;
  top: -20%;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 500px;
  background: radial-gradient(ellipse, rgba(248,208,79,0.05) 0%, transparent 70%);
  border-radius: 50%;
}

.auth-stars { position: absolute; inset: 0; }

.auth-star {
  position: absolute;
  width: 2px; height: 2px;
  background: #f8d04f;
  border-radius: 50%;
  opacity: 0;
  animation: auth-twinkle var(--d) ease-in-out infinite var(--delay);
}
@keyframes auth-twinkle {
  0%, 100% { opacity: 0; transform: scale(0.5); }
  50%       { opacity: var(--op); transform: scale(1); }
}

/* ============================================================
   LAYOUT
============================================================ */
.auth-wrap {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
}

/* ============================================================
   CARD
============================================================ */
.auth-card {
  width: 100%;
  max-width: 460px;
  background: var(--navy-mid);
  border: 1px solid var(--gold-border);
  border-radius: 20px;
  padding: 36px 36px 32px;
  position: relative;
  overflow: hidden;
  animation: card-in 0.5s cubic-bezier(0.34, 1.3, 0.64, 1) both;
}
@keyframes card-in {
  from { opacity: 0; transform: translateY(20px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* Shimmer line on top of card */
.auth-shimmer {
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(248,208,79,0) 20%,
    rgba(248,208,79,0.6) 50%,
    rgba(248,208,79,0) 80%,
    transparent 100%);
  background-size: 200% 100%;
  animation: shimmer-move 4s ease-in-out infinite;
}
@keyframes shimmer-move {
  0%   { background-position: -200% 0; opacity: 0.4; }
  50%  { opacity: 1; }
  100% { background-position: 200% 0; opacity: 0.4; }
}

/* ============================================================
   LOGO
============================================================ */
.auth-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  margin-bottom: 28px;
}
.auth-logo-img {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: rgba(248,208,79,0.1);
  border: 1px solid rgba(248,208,79,0.22);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
}
.auth-logo-img img { width: 100%; height: 100%; object-fit: contain; }
.auth-logo span {
  font-family: "Montserrat", sans-serif;
  font-size: 1rem; font-weight: 800;
  color: var(--gold); letter-spacing: 0.01em;
}

/* ============================================================
   HEADINGS
============================================================ */
.beta-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold-dim);
  background: rgba(248,208,79,0.07);
  border: 1px solid rgba(248,208,79,0.18);
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 14px;
}
.beta-badge-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--gold);
  animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%,100% { opacity:1; transform:scale(1); }
  50%      { opacity:0.4; transform:scale(0.6); }
}

.auth-title {
  font-family: "Montserrat", sans-serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.auth-sub {
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 24px;
}

/* ============================================================
   ALERT
============================================================ */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--danger-bg);
  border: 1px solid var(--danger-border);
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 0.82rem;
  color: var(--danger);
  line-height: 1.5;
  margin-bottom: 18px;
}
.auth-alert.hidden { display: none; }

/* ============================================================
   FORM
============================================================ */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.form-group { display: flex; flex-direction: column; gap: 6px; }

.form-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-body);
  letter-spacing: 0.03em;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.form-label-link {
  font-weight: 500;
  color: var(--gold-dim);
  text-decoration: none;
  font-size: 0.74rem;
  transition: color 0.2s;
}
.form-label-link:hover { color: var(--gold); }
.form-label-hint {
  font-weight: 400;
  color: var(--text-muted);
  font-size: 0.72rem;
}

.form-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.form-input {
  width: 100%;
  padding: 10px 14px;
  background: rgba(248,208,79,0.04);
  border: 1px solid rgba(248,208,79,0.16);
  border-radius: 8px;
  color: var(--gold);
  font-family: "Inter", sans-serif;
  font-size: 0.875rem;
  outline: none;
  transition: border-color 0.2s, background 0.2s;
  resize: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: rgba(248,208,79,0.45);
  background: rgba(248,208,79,0.06);
}
.form-input.error {
  border-color: var(--danger-border);
  background: var(--danger-bg);
}
.form-textarea { min-height: 80px; }

/* Password toggle wrapper */
.input-wrap { position: relative; }
.input-wrap .form-input { padding-right: 42px; }
.input-toggle {
  position: absolute;
  right: 12px; top: 50%;
  transform: translateY(-50%);
  background: none; border: none;
  cursor: pointer; padding: 2px;
  color: var(--text-muted); transition: color 0.2s;
}
.input-toggle:hover { color: var(--gold); }

/* Password strength */
.password-strength {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
}
.strength-bar {
  flex: 1; height: 3px;
  background: rgba(248,208,79,0.1);
  border-radius: 2px; overflow: hidden;
}
.strength-fill {
  height: 100%; width: 0%;
  border-radius: 2px;
  transition: width 0.35s ease, background 0.35s ease;
}
.strength-label {
  font-size: 0.68rem; font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  min-width: 44px; text-align: right;
}

/* ============================================================
   BUTTONS
============================================================ */
.btn-auth {
  width: 100%;
  padding: 12px;
  font-family: "Montserrat", sans-serif;
  font-size: 0.88rem; font-weight: 800;
  color: var(--navy);
  background: var(--gold);
  border: none; border-radius: 8px;
  cursor: pointer; letter-spacing: 0.03em;
  transition: all 0.25s ease;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  position: relative; overflow: hidden;
  margin-top: 4px;
}
.btn-auth::before {
  content:''; position:absolute; top:0; left:-100%;
  width:100%; height:100%;
  background: linear-gradient(90deg,transparent,rgba(255,255,255,0.25),transparent);
  transition: left 0.4s ease;
}
.btn-auth:hover:not(:disabled)::before { left:100%; }
.btn-auth:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(248,208,79,0.4);
}
.btn-auth:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-auth-ghost {
  display: block;
  width: 100%;
  padding: 11px;
  font-family: "Inter", sans-serif;
  font-size: 0.85rem; font-weight: 500;
  color: var(--text-body);
  border: 1px solid var(--gold-border);
  border-radius: 8px;
  text-decoration: none; text-align: center;
  transition: all 0.2s ease;
}
.btn-auth-ghost:hover {
  color: var(--gold);
  border-color: rgba(248,208,79,0.4);
  background: var(--gold-faint);
}

/* Spinner inside button */
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(15,23,42,0.3);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-spinner.hidden { display: none; }
.btn-text.hidden    { display: none; }

/* ============================================================
   DIVIDER
============================================================ */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 16px;
  color: var(--text-muted);
  font-size: 0.75rem;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1; height: 1px;
  background: var(--gold-border);
}

/* ============================================================
   SUCCESS / STEPS
============================================================ */
.success-icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(248,208,79,0.07);
  border: 1px solid rgba(248,208,79,0.2);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto;
}

.success-steps {
  display: flex;
  align-items: center;
  margin: 28px 0 24px;
  gap: 0;
}
.success-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.success-step span {
  font-size: 0.65rem;
  font-weight: 500;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}
.success-step.done span { color: var(--gold-dim); }

.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem; font-weight: 700;
}
.success-step.done .step-circle {
  background: rgba(248,208,79,0.15);
  border: 1.5px solid rgba(248,208,79,0.5);
  color: var(--gold);
}
.success-step.pending .step-circle {
  background: rgba(248,208,79,0.04);
  border: 1.5px solid rgba(248,208,79,0.14);
  color: var(--text-muted);
}
.success-step-line {
  height: 1px; width: 20px; flex-shrink: 0;
  background: rgba(248,208,79,0.14);
  margin-bottom: 22px;
}

/* ============================================================
   FOOTER NOTE
============================================================ */
.auth-footer-note {
  margin-top: 20px;
  font-size: 0.72rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ============================================================
   UTILITY
============================================================ */
.hidden { display: none !important; }
