/* Auth pages: login, register, forgot/reset, dashboard.
   Consumes brand.css design tokens. */

body {
  font-family: var(--ff-font);
  background:
    radial-gradient(ellipse 1200px 600px at 50% -10%, rgba(219, 32, 40, 0.12), transparent 60%),
    radial-gradient(ellipse 800px 400px at 90% 110%, rgba(96, 165, 250, 0.06), transparent 70%),
    var(--ff-bg-1);
  background-attachment: fixed;
  color: var(--ff-text);
  min-height: 100vh;
  overflow-x: hidden;
}

.auth-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  padding: 32px 24px;
}

.auth-card {
  background: var(--ff-bg-glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--ff-border);
  border-radius: var(--ff-radius-lg);
  padding: 44px 40px;
  width: 100%;
  max-width: 440px;
  box-shadow:
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 60px rgba(219, 32, 40, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  animation: ff-rise 600ms var(--ff-ease-out) both;
  position: relative;
}
.auth-card::before {
  content: '';
  position: absolute;
  top: 0; left: 24px; right: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--ff-brand-halo), transparent);
  opacity: 0.6;
}

/* ── Logo ── */
.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  text-decoration: none;
  line-height: 1;
}
.logo img {
  height: 72px;
  width: auto;
  display: block;
  filter:
    drop-shadow(0 0 12px var(--ff-brand-halo))
    drop-shadow(0 0 32px rgba(219, 32, 40, 0.25));
}
.logo--inline {
  margin-bottom: 0;
  justify-content: flex-start;
}
.logo--inline img {
  height: 48px;
  filter:
    drop-shadow(0 0 8px var(--ff-brand-halo))
    drop-shadow(0 0 18px rgba(219, 32, 40, 0.18));
}

/* ── Headings ── */
h1 {
  font-size: 22px;
  text-align: center;
  color: var(--ff-text-hi);
  margin-bottom: 6px;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h2 {
  color: var(--ff-text-hi);
  font-weight: 600;
}
.subtitle {
  text-align: center;
  color: var(--ff-text-dim);
  font-size: 14px;
  margin-bottom: 28px;
}

/* ── Form fields ── */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--ff-text);
  margin-bottom: 6px;
  letter-spacing: 0.01em;
}
.field input {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--ff-radius);
  border: 1px solid var(--ff-border-strong);
  background: rgba(10, 15, 28, 0.6);
  color: var(--ff-text-hi);
  font-size: 14px;
  font-family: inherit;
  transition:
    border-color var(--ff-dur),
    box-shadow var(--ff-dur),
    background var(--ff-dur);
}
.field input:focus {
  outline: none;
  border-color: var(--ff-brand);
  background: rgba(10, 15, 28, 0.85);
  box-shadow: 0 0 0 3px var(--ff-brand-tint), 0 0 18px rgba(219, 32, 40, 0.20);
}
.field input::placeholder { color: var(--ff-text-faint); }

.field-row {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 16px;
}
.link-small {
  color: var(--ff-info);
  text-decoration: none;
  font-size: 13px;
  transition: color var(--ff-dur);
}
.link-small:hover { color: var(--ff-info-hi); text-decoration: underline; }

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 11px 22px;
  border-radius: var(--ff-radius);
  border: none;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  font-family: inherit;
  transition:
    transform var(--ff-dur) var(--ff-ease-out),
    box-shadow var(--ff-dur) var(--ff-ease-out),
    background var(--ff-dur);
}
.btn-primary {
  background: linear-gradient(135deg, #DB2028 0%, #B81A21 100%);
  color: white;
  width: 100%;
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 0 28px var(--ff-brand-halo),
    0 0 64px var(--ff-brand-flame);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-outline {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--ff-border-strong);
  color: var(--ff-text);
}
.btn-outline:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: var(--ff-brand-hi);
  color: white;
  box-shadow: 0 0 18px var(--ff-brand-tint);
}

/* ── Messages ── */
.msg {
  padding: 11px 14px;
  border-radius: var(--ff-radius);
  margin-top: 14px;
  font-size: 13px;
  display: none;
  text-align: center;
  border: 1px solid transparent;
}
.msg-ok {
  background: var(--ff-success-soft);
  border-color: rgba(74, 222, 128, 0.3);
  color: var(--ff-success-hi);
}
.msg-err {
  background: var(--ff-danger-soft);
  border-color: rgba(248, 113, 113, 0.3);
  color: var(--ff-danger-hi);
}
.msg a { color: inherit; text-decoration: underline; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  margin: 26px 0;
}
.divider::before, .divider::after {
  content: '';
  flex: 1;
  border-top: 1px solid var(--ff-border);
}
.divider span {
  padding: 0 14px;
  color: var(--ff-text-faint);
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* ── Switch (sign-up ↔ sign-in) ── */
.switch {
  text-align: center;
  font-size: 13px;
  color: var(--ff-text-dim);
}
.switch a {
  color: var(--ff-brand-hi);
  text-decoration: none;
  font-weight: 600;
  transition: color var(--ff-dur);
}
.switch a:hover { color: white; text-decoration: underline; }

/* ──────────────────────────────────────────────────────────────────────
   Dashboard layout (uses .auth-container + .auth-card)
   ────────────────────────────────────────────────────────────────────── */
.dashboard-container {
  /* No max-width here — the container is the flex centerer.
     Width constraint goes on the card itself. */
}
/* High-specificity overrides so the dashboard is fully opaque. */
.auth-card.dashboard-card {
  max-width: 640px;
  background: #131c2e !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
.auth-card.dashboard-card .account-row {
  background: #0a0f1c;
}
/* Kill the breathing red halo behind the dashboard card so the body
   bg gradient can't bleed through visually. */
.auth-card.dashboard-card::after {
  display: none;
}
.dashboard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--ff-border);
}
.btn-sm { padding: 6px 14px; font-size: 12px; }
.btn-row {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.btn-row .btn { flex: 1; font-size: 13px; }

.dashboard-card h2 {
  font-size: 14px;
  margin-bottom: 14px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ff-text-dim);
  font-weight: 600;
}
.dashboard-card .section-block { margin-bottom: 24px; }

.text-muted   { color: var(--ff-text-dim); font-size: 13px; }
.text-faint   { color: var(--ff-text-faint); font-size: 13px; }
.text-ghost   { color: var(--ff-text-ghost); font-size: 12px; }
.text-error   { color: var(--ff-danger-hi); }
.text-strong  { color: var(--ff-text-hi); font-weight: 600; font-size: 15px; margin-bottom: 2px; }
.text-meta    { color: var(--ff-text-faint); font-size: 12px; }
.text-link    {
  color: var(--ff-brand-hi);
  font-size: 13px;
  text-decoration: none;
  font-weight: 500;
  transition: color var(--ff-dur);
}
.text-link:hover { color: white; text-decoration: underline; }

.tier-row { text-align: center; }
.tier-row strong {
  color: var(--ff-brand-hi);
  text-shadow: 0 0 12px var(--ff-brand-halo);
}

/* Connected account row */
.account-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  background: rgba(6, 9, 18, 0.5);
  border: 1px solid var(--ff-border-dim);
  border-radius: var(--ff-radius);
  margin-bottom: 8px;
  font-size: 13px;
  transition: border-color var(--ff-dur), background var(--ff-dur);
}
.account-row:hover {
  border-color: var(--ff-border-strong);
  background: rgba(6, 9, 18, 0.7);
}
.account-row .provider {
  font-weight: 700;
  text-transform: capitalize;
  margin-right: 6px;
}
.account-row .provider-gmail   { color: var(--ff-gmail); }
.account-row .provider-outlook { color: var(--ff-outlook); }
.account-row .btn-remove {
  padding: 4px 12px;
  font-size: 11px;
  color: var(--ff-danger-hi);
  border-color: rgba(248, 113, 113, 0.2);
  background: transparent;
}
.account-row .btn-remove:hover {
  background: var(--ff-danger-soft);
  border-color: var(--ff-danger-hi);
  color: white;
  box-shadow: none;
}
