/* ═══════════════════════════════════════════════════════
   Swift Audience — Auth / Pre-login pages
   Shared by: login, signup, forgot/reset password, verify
═══════════════════════════════════════════════════════ */

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

body {
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.875rem;
  line-height: 1.6;
  color: #0f1d2e;
  background: #f0f5fa;
  display: flex;
  flex-direction: column;
}

/* ── Top navbar — thin brand stripe ───────────────────────── */
.auth-nav {
  height: 4px;
  background: linear-gradient(100deg, #1b8dc5 0%, #0d75aa 100%);
  flex-shrink: 0;
}

.auth-nav-brand { display: none; }

/* Pages without a split card (e.g. billing) show the full nav bar */
.auth-nav--branded {
  height: 52px;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

.auth-nav--branded .auth-nav-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}

.auth-nav--branded .auth-nav-brand img {
  height: 30px;
  width: 30px;
  object-fit: contain;
}

.auth-nav--branded .auth-nav-brand span {
  font-weight: 700;
  font-size: 0.9rem;
  color: #ffffff;
  letter-spacing: -0.01em;
}

/* ── Main centred area ─────────────────────────────────────── */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 1rem;
}

/* ── Card shell ────────────────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 860px;
  display: flex;
  background: #ffffff;
  box-shadow: 0 8px 32px rgba(10,30,60,0.12);
  overflow: hidden;
}

/* Narrow pages (forgot, reset, verify, error) */
.auth-card.narrow {
  max-width: 460px;
  flex-direction: column;
}

/* ── Left brand panel ──────────────────────────────────────── */
.auth-panel-brand {
  width: 42%;
  flex-shrink: 0;
  background: linear-gradient(160deg, #1b8dc5 0%, #0d6fa3 60%, #085d8f 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1.5rem;
  position: relative;
  overflow: hidden;
}

.auth-panel-brand::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: rgba(255,255,255,0.05);
  clip-path: polygon(50% 0%, 100% 50%, 50% 100%, 0% 50%);
}

.auth-panel-brand h2 {
  font-family: 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.25rem;
  color: #ffffff;
  margin: 0 0 0.4rem;
  text-align: center;
  position: relative;
}

.auth-panel-brand p {
  color: rgba(255,255,255,0.75);
  font-size: 0.8rem;
  text-align: center;
  margin: 0;
  position: relative;
}

.auth-panel-brand .brand-logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  margin-bottom: 1rem;
  position: relative;
}

/* ── Right form panel ──────────────────────────────────────── */
.auth-panel-form {
  flex: 1;
  padding: 1.5rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.narrow .auth-panel-form {
  padding: 1.5rem;
}

.auth-panel-form h2 {
  font-weight: 700;
  font-size: 1.05rem;
  color: #0f1d2e;
  margin: 0 0 0.875rem;
  text-align: center;
}

/* ── Form elements ─────────────────────────────────────────── */
.auth-field { margin-bottom: 0.6rem; }

.auth-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #3d5166;
  margin-bottom: 0.25rem;
}

.auth-input {
  width: 100%;
  border: 1.5px solid #c2cedf;
  padding: 0.55rem 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  color: #0f1d2e;
  background: #ffffff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.auth-input:focus {
  border-color: #1b8dc5;
  box-shadow: 0 0 0 3px rgba(27,141,197,0.12);
}

/* ── Buttons ───────────────────────────────────────────────── */
.auth-btn {
  width: 100%;
  padding: 0.6rem 1rem;
  background: #1b8dc5;
  border: none;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.35rem;
}

.auth-btn:hover { background: #156fa0; }

.auth-btn-ghost {
  width: 100%;
  padding: 0.5rem 1rem;
  background: transparent;
  border: 1.5px solid #1b8dc5;
  color: #1b8dc5;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s;
  margin-top: 0.35rem;
  text-align: center;
  text-decoration: none;
  display: block;
}

.auth-btn-ghost:hover { background: #e3f4fb; }

/* ── Alert ─────────────────────────────────────────────────── */
.auth-alert {
  padding: 0.65rem 0.875rem;
  font-size: 0.8rem;
  border-left: 3px solid transparent;
  margin-bottom: 1rem;
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.auth-alert-danger  { background: #fef2f2; border-color: #dc2626; color: #dc2626; }
.auth-alert-success { background: #ecfdf5; border-color: #059669; color: #059669; }
.auth-alert-warning { background: #fffbeb; border-color: #d97706; color: #d97706; }
.auth-alert-info    { background: #e3f4fb; border-color: #1b8dc5; color: #1b8dc5; }

/* ── Links ─────────────────────────────────────────────────── */
.auth-link-row {
  text-align: center;
  font-size: 0.78rem;
  color: #7a94ab;
  margin-top: 0.5rem;
}

.auth-link-row a {
  color: #1b8dc5;
  text-decoration: none;
  font-weight: 600;
}

.auth-link-row a:hover { text-decoration: underline; }

/* ── Status icon cards ─────────────────────────────────────── */
.auth-status-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 0.875rem;
  font-size: 1.5rem;
}

.auth-status-icon.success { background: #ecfdf5; color: #059669; }
.auth-status-icon.danger  { background: #fef2f2; color: #dc2626; }
.auth-status-icon.warning { background: #fffbeb; color: #d97706; }

/* ── Footer ────────────────────────────────────────────────── */
.auth-footer {
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.72rem;
  color: #7a94ab;
  flex-shrink: 0;
}

.auth-footer a { color: #7a94ab; text-decoration: none; }
.auth-footer a:hover { color: #1b8dc5; }

/* ── Bootstrap co-existence overrides ────────────────────────────── */
/* When loaded alongside Bootstrap, ensure auth-card/form styles win */
.auth-card { border-radius: 0 !important; }
.auth-panel-brand { border-radius: 0 !important; }
.auth-input { border-radius: 0 !important; }
.auth-btn, .auth-btn-ghost { border-radius: 0 !important; }
.auth-alert { border-radius: 0 !important; }
.auth-status-icon { border-radius: 0 !important; }

/* Override Bootstrap body bg so auth-main uses our bg */
body {
  background-color: #f0f5fa !important;
}

/* Ensure auth-card sits properly inside Bootstrap container */
.auth-card {
  box-shadow: 0 8px 32px rgba(10,30,60,0.12) !important;
}

/* Bootstrap .container spacing below navbar */
.container.py-5 {
  min-height: calc(100vh - 130px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
