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

html, body {
  height: 100%;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

.login-split {
  display: flex;
  min-height: 100vh;
}

/* ── Brand panel ── */
.brand-panel {
  flex: 1;
  background: linear-gradient(145deg, #0a0f1e 0%, #0f2744 60%, #0a1628 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 48px;
}

.brand-content { max-width: 420px; }

/* ── Tier-specific brand copy (swapped by the Personal/Business toggle) ── */
.brand-copy.brand-business { display: none; }
body.tier-business .brand-copy.brand-personal { display: none; }
body.tier-business .brand-copy.brand-business { display: block; }

/* Business gets a teal-shifted dark gradient so the two spaces feel distinct. */
body.tier-business .brand-panel {
  background: linear-gradient(145deg, #04140f 0%, #0a3d33 60%, #04120d 100%);
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 48px;
  color: #fff;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.3px;
}

.brand-headline {
  font-size: 40px;
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -1.5px;
  margin-bottom: 20px;
}

.brand-sub {
  font-size: 15px;
  color: #64748b;
  line-height: 1.65;
  margin-bottom: 40px;
}

.brand-features { display: flex; flex-direction: column; gap: 14px; }
.brand-feature {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #94a3b8;
  font-size: 13.5px;
  font-weight: 500;
}

/* ── Form panel ── */
.form-panel {
  width: 480px;
  flex-shrink: 0;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 32px;
}

/* Business sign-in section gets a distinct (teal-tinted) background so there's
   a clear visual difference from the Personal (slate) sign-in section. */
body.tier-business .form-panel { background: #e9f4f0; }

.form-card {
  width: 100%;
  max-width: 380px;
}

/* Note under the Create-account title explaining per-tier / account linking. */
.signup-tier-note {
  font-size: 12px;
  color: #64748b;
  line-height: 1.55;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  margin-bottom: 22px;
}
.signup-tier-note strong { color: #0f172a; }
body.tier-business .signup-tier-note { background: #dff0ea; border-color: #c4e3d9; }

.auth-view { display: none; }
.auth-view.active { display: block; }

.form-title {
  font-size: 24px;
  font-weight: 800;
  color: #0f172a;
  letter-spacing: -0.5px;
  margin-bottom: 4px;
}
.form-subtitle { font-size: 13px; color: #64748b; margin-bottom: 28px; }

/* ── Fields ── */
.field-group { margin-bottom: 18px; }
.field-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: #475569;
  margin-bottom: 6px;
}
.req { color: #ef4444; }
.field-group input {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #e2e8f0;
  border-radius: 9px;
  font-size: 14px;
  color: #0f172a;
  background: #fff;
  outline: none;
  transition: border 0.15s, box-shadow 0.15s;
  font-family: inherit;
}
.field-group input:focus { border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.field-group input::placeholder { color: #cbd5e1; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 44px; }
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: #94a3b8;
  opacity: 0.5;
  display: flex;
  padding: 4px;
  transition: opacity 0.15s;
}
.eye-btn:hover { opacity: 0.9; }

.strength-bar { height: 4px; background: #e2e8f0; border-radius: 99px; margin-top: 8px; overflow: hidden; }
.strength-fill { height: 100%; border-radius: 99px; transition: width 0.25s, background 0.25s; width: 0; }
.strength-label { font-size: 11px; font-weight: 600; margin-top: 4px; height: 14px; }

/* ── Sign-in tier choice (Personal / Business) ── */
.tier-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  border-radius: 9px;
  padding: 4px;
}
.tier-choice-btn {
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #475569;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
  transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}
.tier-choice-btn:hover { color: #0f172a; }
.tier-choice-btn.active {
  background: #fff;
  color: #2563eb;
  border-color: #dbe3ee;
  box-shadow: 0 1px 2px rgba(15,23,42,0.06);
}
/* Business accent = teal, matching the Business brand panel. */
body.tier-business .tier-choice-btn.active { color: #0d9488; border-color: #c4e3d9; }
body.tier-business .btn-submit { background: #0d9488; }
body.tier-business .btn-submit:hover { background: #0f766e; }
body.tier-business .btn-submit:disabled { background: #7fcabf; }
body.tier-business .field-group input:focus {
  border-color: #14b8a6;
  box-shadow: 0 0 0 3px rgba(20,184,166,0.14);
}
body.tier-business .auth-toggle a { color: #0d9488; }

/* ── Submit button ── */
.btn-submit {
  width: 100%;
  padding: 11px;
  background: #3b82f6;
  color: #fff;
  border: none;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
  margin-bottom: 20px;
  font-family: inherit;
}
.btn-submit:hover { background: #2563eb; }
.btn-submit:active { transform: scale(0.99); }
.btn-submit:disabled { background: #93c5fd; cursor: not-allowed; }

/* ── Divider ── */
.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #cbd5e1;
  font-size: 12px;
  margin-bottom: 16px;
}
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e2e8f0; }

/* ── Social buttons ── */
.btn-google, .btn-apple {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  margin-bottom: 10px;
  font-family: inherit;
}

.btn-google {
  background: #fff;
  border: 1px solid #e2e8f0;
  color: #0f172a;
}
.btn-google:hover { background: #f8fafc; border-color: #cbd5e1; }

.btn-apple {
  background: #000;
  border: 1px solid #000;
  color: #fff;
}
.btn-apple:hover { background: #1a1a1a; }

/* ── Toggle ── */
.auth-toggle {
  text-align: center;
  font-size: 13px;
  color: #64748b;
  margin-top: 20px;
}
.auth-toggle a { color: #3b82f6; font-weight: 600; text-decoration: none; }
.auth-toggle a:hover { text-decoration: underline; }

/* ── Error banner ── */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #dc2626;
  border-radius: 8px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 20px;
}
.error-banner.hidden { display: none; }

/* ── Apple modal ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  backdrop-filter: blur(2px);
}
.modal-overlay.hidden { display: none; }
.setup-modal {
  background: #fff;
  border-radius: 14px;
  padding: 28px 32px;
  max-width: 440px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}
.setup-modal h3 { font-size: 16px; font-weight: 700; margin-bottom: 10px; }
.setup-modal p { font-size: 13px; color: #475569; line-height: 1.6; margin-bottom: 14px; }
.setup-modal ol { padding-left: 18px; }
.setup-modal li { font-size: 13px; color: #475569; line-height: 1.7; margin-bottom: 6px; }
.setup-modal li strong { color: #0f172a; }
.setup-modal code { background: #f1f5f9; padding: 1px 5px; border-radius: 4px; font-size: 12px; font-family: monospace; }
.setup-modal .btn-submit { margin-top: 16px; margin-bottom: 0; }

/* ── Responsive ── */
@media (max-width: 900px) {
  .brand-panel { display: none; }
  .form-panel { width: 100%; padding: 40px 24px; }
}
