/* =============================================================
   Domain Expiry Tracker — auth.css
   Dark luxury auth pages
   ============================================================= */

.auth-body {
  background: var(--bg-base);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  position: relative;
}

/* ── Animated background grid ─────────────────────────────── */
.auth-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.auth-grid {
  position: absolute;
  inset: -50%;
  width: 200%;
  height: 200%;
  background-image:
    linear-gradient(rgba(56,189,248,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56,189,248,0.04) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridScroll 20s linear infinite;
}

@keyframes gridScroll {
  0%   { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

/* Radial glow */
.auth-body::before {
  content: '';
  position: fixed;
  top: -200px; left: 50%;
  transform: translateX(-50%);
  width: 700px; height: 600px;
  background: radial-gradient(ellipse, rgba(56,189,248,0.08) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

/* ── Auth wrapper ─────────────────────────────────────────── */
.auth-wrap {
  width: 100%;
  max-width: 440px;
  position: relative;
  z-index: 1;
}

/* ── Brand ────────────────────────────────────────────────── */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  justify-content: center;
}

a.auth-brand {
  text-decoration: none;
  color: inherit;
  transition: opacity .15s;
}
a.auth-brand:hover { opacity: 0.8; }

.auth-brand-icon {
  width: 44px; height: 44px;
  background: var(--accent-dim);
  border: 1px solid var(--accent-glow);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--accent);
}

.auth-brand-name {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.auth-brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ── Auth card ────────────────────────────────────────────── */
.auth-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow:
    0 0 0 1px rgba(255,255,255,0.03),
    0 24px 60px rgba(0,0,0,0.6),
    0 0 80px rgba(56,189,248,0.04);
  animation: slideUp 0.35s cubic-bezier(0.16,1,0.3,1);
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--text);
  line-height: 1.2;
  margin: 0 0 4px 0;
}

.auth-subtitle {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Alert messages ───────────────────────────────────────── */
.auth-alert {
  border-radius: var(--radius);
  padding: 12px 16px;
  font-size: 0.83rem;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 20px;
  line-height: 1.5;
}
.auth-alert i { margin-top: 2px; flex-shrink: 0; }
.auth-alert a { text-decoration: underline; opacity: 0.8; }
.auth-alert a:hover { opacity: 1; }

.auth-alert--error   { background: var(--critical-bg); color: #fca5a5; border: 1px solid rgba(239,68,68,.2); }
.auth-alert--info    { background: var(--accent-dim);  color: #7dd3fc; border: 1px solid rgba(56,189,248,.2); }
.auth-alert--warning { background: var(--warning-bg);  color: #fcd34d; border: 1px solid rgba(245,158,11,.2); }
.auth-alert--success { background: var(--good-bg);     color: #86efac; border: 1px solid rgba(34,197,94,.2); }

/* ── Form fields ──────────────────────────────────────────── */
.auth-field {
  margin-bottom: 18px;
}

.auth-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin-bottom: 7px;
}

.auth-label-link {
  font-size: 0.78rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--accent);
  opacity: 0.8;
  transition: opacity .15s;
}
.auth-label-link:hover { opacity: 1; }

.auth-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.auth-input-icon {
  position: absolute;
  left: 13px;
  color: var(--text-muted);
  font-size: 0.9rem;
  pointer-events: none;
  z-index: 1;
}

.auth-input {
  width: 100%;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  padding: 11px 42px 11px 38px;
  transition: border-color .2s, box-shadow .2s;
  outline: none;
}
.auth-input::placeholder { color: var(--text-faint); }
.auth-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-dim);
}
.auth-input:invalid:not(:placeholder-shown) {
  border-color: rgba(239,68,68,0.5);
}

.auth-toggle-pw {
  position: absolute;
  right: 11px;
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.9rem;
  padding: 4px;
  transition: color .15s;
  line-height: 1;
}
.auth-toggle-pw:hover { color: var(--text); }

.auth-hint {
  display: block;
  font-size: 0.73rem;
  color: var(--text-faint);
  margin-top: 5px;
}

/* ── Password strength ────────────────────────────────────── */
.pw-strength-wrap {
  height: 3px;
  background: var(--bg-surface);
  border-radius: 3px;
  margin-top: 6px;
  overflow: hidden;
}

.pw-strength-bar {
  height: 100%;
  width: 0%;
  border-radius: 3px;
  transition: width .3s, background .3s;
}
.pw-strength-bar.weak     { width: 25%; background: var(--critical); }
.pw-strength-bar.fair     { width: 50%; background: var(--warning); }
.pw-strength-bar.good     { width: 75%; background: #84cc16; }
.pw-strength-bar.strong   { width: 100%; background: var(--good); }

/* ── Checkbox ─────────────────────────────────────────────── */
.auth-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}
.auth-checkbox input[type="checkbox"] {
  width: 17px;
  height: 17px;
  margin-top: 1px;
  accent-color: var(--accent);
  flex-shrink: 0;
  cursor: pointer;
}
.auth-checkbox-label {
  font-size: 0.83rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.auth-checkbox-label a { color: var(--accent); }

/* ── Submit button ────────────────────────────────────────── */
.auth-btn {
  width: 100%;
  background: var(--accent);
  border: none;
  border-radius: var(--radius);
  color: #000;
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 700;
  padding: 13px 20px;
  cursor: pointer;
  transition: background .15s, transform .15s, box-shadow .15s;
  margin-top: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.auth-btn:hover:not(:disabled) {
  background: #7dd3fc;
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(56,189,248,.35);
}
.auth-btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-spinner {
  display: inline-block;
  width: 14px; height: 14px;
  border: 2px solid rgba(0,0,0,0.3);
  border-top-color: #000;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Footer link ──────────────────────────────────────────── */
.auth-footer-link {
  text-align: center;
  font-size: 0.83rem;
  color: var(--text-muted);
  margin-top: 20px;
}
.auth-footer-link a { color: var(--accent); font-weight: 500; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 28px 20px; border-radius: 16px; }
  .auth-title { font-size: 1.25rem; }
}

.d-none { display: none !important; }
