/* ═══════════════════════════════════════════
   AVCB.AI — Shared auth-page styles
   Used by: login.html, accept_terms.html, reset_password.html
   Replaces ~450 lines of duplicated inline CSS.
   ═══════════════════════════════════════════ */

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

/* Brand tokens (--auth-accent etc.) come from tokens.css. This block
   defines only the dark-by-default auth surface palette. */
:root {
  --auth-bg:          #0c1220;
  --auth-text:        #e2e8f0;
  --auth-text-dim:    #94a3b8;
  --auth-text-dimmer: #64748b;
  --auth-border:      rgba(148, 163, 184, 0.18);
  --auth-border-soft: rgba(148, 163, 184, 0.10);
  --auth-surface:     rgba(15, 23, 42, 0.85);
  --auth-input-bg:    rgba(15, 23, 42, 0.6);
  --auth-radius:    10px;
  --auth-radius-lg: 16px;
}

body {
  font-family: 'DM Sans', system-ui, sans-serif;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--auth-bg);
  background-image:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(30, 64, 120, 0.35), transparent),
    radial-gradient(ellipse 50% 40% at 80% 100%, rgba(180, 60, 30, 0.12), transparent);
  color: var(--auth-text);
  padding: 1.5rem;
}

.auth-wrapper {
  width: 100%;
  max-width: 420px;
  animation: fadeUp 0.6s ease both;
}

.auth-wrapper--wide { max-width: 480px; }

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

/* Brand */
.auth-brand {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-brand-logo {
  font-size: 2.2rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
}

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

.auth-brand-sub {
  font-size: 0.85rem;
  color: var(--auth-text-dim);
  margin-top: 0.35rem;
}

/* Card */
.auth-card {
  background: var(--auth-surface);
  backdrop-filter: blur(20px);
  border: 1px solid var(--auth-border-soft);
  border-radius: var(--auth-radius-lg);
  padding: 2.25rem 2rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.auth-card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: #f1f5f9;
  margin-bottom: 0.5rem;
}

.auth-card p {
  font-size: 0.9rem;
  color: var(--auth-text-dim);
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

/* Tabs */
.auth-tabs {
  display: flex;
  gap: 0;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--auth-border-soft);
  position: relative;
}

.auth-tab-btn {
  flex: 1;
  padding: 0.7rem 0;
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  color: var(--auth-text-dimmer);
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, border-color 0.2s;
}

.auth-tab-btn:hover { color: var(--auth-text-dim); }

.auth-tab-btn.active {
  color: var(--auth-accent);
  border-bottom-color: var(--auth-accent);
}

.auth-tab-panel { display: none; }
.auth-tab-panel.active { display: block; }

/* Form inputs */
.auth-form-group { margin-bottom: 1rem; }

.auth-form-group label {
  display: block;
  font-size: 0.82rem;
  color: var(--auth-text-dim);
  margin-bottom: 0.35rem;
  font-weight: 500;
}

.auth-form-group input {
  width: 100%;
  padding: 0.7rem 0.9rem;
  background: var(--auth-input-bg);
  border: 1px solid var(--auth-border);
  border-radius: 8px;
  color: var(--auth-text);
  font-family: inherit;
  font-size: 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-form-group input:focus {
  border-color: var(--auth-accent);
}

.auth-form-group input::placeholder {
  color: #475569;
}

/* Submit button */
.auth-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: var(--auth-accent);
  color: #fff;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--auth-radius);
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, box-shadow 0.2s;
  margin-top: 0.5rem;
}

.auth-submit:hover {
  background: var(--auth-accent-hover);
  transform: translateY(-1px);
}

.auth-submit:active { transform: scale(0.98); }

.auth-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

/* Google button */
.auth-google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #fff;
  color: #1e293b;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  border-radius: var(--auth-radius);
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.2);
}

.auth-google-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.auth-google-btn:active { transform: scale(0.98); }
.auth-google-btn svg { width: 20px; height: 20px; flex-shrink: 0; }

/* Divider */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.25rem 0;
  font-size: 0.75rem;
  color: var(--auth-text-dimmer);
}

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

/* Messages (replace site-wide eventually with toasts) */
.auth-msg {
  padding: 0.65rem 0.9rem;
  border-radius: 8px;
  font-size: 0.85rem;
  margin-bottom: 1rem;
  line-height: 1.5;
}

.auth-msg-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.2);
  color: #fca5a5;
}

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

.auth-msg-info {
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.2);
  color: #93c5fd;
}

/* Inline link button */
.auth-link-btn {
  background: none;
  border: none;
  color: var(--auth-accent);
  font-family: inherit;
  font-size: 0.82rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 0;
}

.auth-link-btn:hover { color: #fb923c; }

.auth-form-footer {
  text-align: center;
  margin-top: 0.75rem;
  font-size: 0.82rem;
  color: var(--auth-text-dimmer);
}

.auth-password-hint {
  font-size: 0.75rem;
  color: var(--auth-text-dimmer);
  margin-top: 0.25rem;
}

/* Disclaimer footer */
.auth-disclaimer {
  text-align: center;
  margin-top: 1rem;
  padding: 0.6rem 0.8rem;
  font-size: 0.7rem;
  color: var(--auth-text-dimmer);
  background: rgba(148, 163, 184, 0.05);
  border-radius: 8px;
  border: 1px solid rgba(148, 163, 184, 0.08);
  line-height: 1.5;
}

/* Terms checkbox */
.auth-terms-check {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 1rem 0 0.5rem;
}

.auth-terms-check input[type="checkbox"] {
  margin-top: 0.2rem;
  accent-color: var(--auth-accent);
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  cursor: pointer;
}

.auth-terms-check label {
  font-size: 0.8rem;
  color: var(--auth-text-dim);
  line-height: 1.5;
  cursor: pointer;
}

.auth-terms-check label a {
  color: var(--auth-accent);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-terms-check label a:hover { color: #fb923c; }

/* Footer line below the card (e.g. ownership / contact) */
.auth-footer-line {
  text-align: center;
  margin-top: 1.75rem;
  font-size: 0.75rem;
  color: var(--auth-text-dimmer);
}

.auth-footer-line a {
  color: var(--auth-text-dimmer);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-back-link, .auth-cancel-link {
  display: block;
  text-align: center;
  margin-top: 1rem;
  color: var(--auth-text-dimmer);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 0.85rem;
}

.auth-back-link:hover, .auth-cancel-link:hover { color: var(--auth-text-dim); }

/* Inline panel (forgot-password expansion) */
.auth-inline-panel { display: none; }
.auth-inline-panel.active { display: block; }

/* focus-visible rules moved to tokens.css. Input-specific glow is
   the only auth-specific override that remains. */
.auth-form-group input:focus-visible,
.auth-form-group input:focus {
  box-shadow: 0 0 0 3px var(--auth-accent-soft);
}
