/* Shared styling for BillFlow login & registration pages (Vanquis-inspired) */
:root {
  --indigo: #201f68;
  --indigo-dark: #16154d;
  --indigo-mid: #5b588f;
  --lilac: #f8f7fc;
  --lilac-deep: #ebe9f7;
  --pink: #e6007e;
  --pink-dark: #c2006a;
  --mint: #b8f2d8;
  --error: #d1264d;
  --success: #00b67a;
  --text: #1f1f3d;
  --muted: #5b588f;
  --white: #ffffff;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --shadow: 0 10px 30px rgba(32, 31, 104, 0.10);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--lilac);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { text-decoration: none; color: inherit; }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; color: var(--indigo); }
.container { width: min(1140px, 92%); margin: 0 auto; }

/* Header */
header {
  background: var(--white);
  box-shadow: 0 2px 12px rgba(32,31,104,0.06);
}
nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 78px;
}
.logo-img { height: 42px; width: auto; display: block; }
.nav-actions { display: flex; gap: 12px; align-items: center; }
.nav-actions span { color: var(--muted); font-size: 0.95rem; }

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  font-family: inherit;
}
.btn-pink { background: var(--pink); color: var(--white); }
.btn-pink:hover { background: var(--pink-dark); transform: translateY(-2px); }
.btn-indigo { background: var(--indigo); color: var(--white); }
.btn-indigo:hover { background: var(--indigo-dark); }
.btn-outline { border-color: var(--indigo); color: var(--indigo); background: transparent; }
.btn-outline:hover { background: var(--indigo); color: var(--white); }
.btn-block { width: 100%; text-align: center; }
.btn:disabled { opacity: .6; cursor: not-allowed; transform: none; }

/* Layout */
main { flex: 1; display: flex; align-items: center; padding: 60px 0; }
.auth-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 60px;
  align-items: center;
}

/* Left promo panel */
.promo {
  background: var(--indigo);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: 48px 44px;
  position: relative;
  overflow: hidden;
  min-height: 460px;
  display: flex; flex-direction: column; justify-content: center;
}
.promo::after {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: var(--pink); opacity: .9; right: -130px; bottom: -150px;
}
.promo::before {
  content: ""; position: absolute; width: 260px; height: 260px; border-radius: 50%;
  background: var(--indigo-mid); opacity: .4; left: -100px; top: -110px;
}
.promo > * { position: relative; z-index: 1; }
.promo .eyebrow {
  display: inline-block; align-self: flex-start;
  background: var(--mint); color: var(--indigo);
  font-weight: 700; font-size: 0.85rem;
  padding: 6px 14px; border-radius: var(--radius-pill);
  margin-bottom: 18px;
}
.promo h1 { color: var(--white); font-size: 2.5rem; line-height: 1.15; margin-bottom: 16px; }
.promo h1 em { font-style: normal; color: var(--pink); }
.promo p { color: #d9d8f0; font-size: 1.05rem; margin-bottom: 26px; max-width: 420px; }
.promo ul { list-style: none; }
.promo li { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; color: #eceafd; }
.check {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 50%;
  background: var(--mint); color: var(--indigo);
  display: grid; place-items: center; font-weight: 800; font-size: 0.8rem;
}

/* Card / form */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow);
}
.card h2 { font-size: 1.9rem; margin-bottom: 6px; }
.card .sub { color: var(--muted); margin-bottom: 26px; }
.card .sub a { color: var(--pink); font-weight: 700; }
.card .sub a:hover { text-decoration: underline; }

.row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--indigo); margin-bottom: 6px; font-weight: 700; }
.field input, .field select {
  width: 100%; padding: 13px 16px;
  border: 2px solid var(--lilac-deep); border-radius: 14px;
  font-size: 1rem; background: var(--lilac); color: var(--text);
  font-family: inherit;
}
.field input:focus, .field select:focus { outline: none; border-color: var(--indigo); background: var(--white); }
.field.invalid input, .field.invalid select { border-color: var(--error); background: #fff5f7; }
.field .hint { font-size: 0.78rem; color: var(--muted); margin-top: 5px; }
.field .error-msg { display: none; font-size: 0.8rem; color: var(--error); margin-top: 5px; font-weight: 600; }
.field.invalid .error-msg { display: block; }

.password-wrap { position: relative; }
.password-wrap input { padding-right: 70px; }
.toggle-pw {
  position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--indigo); font-weight: 700;
  font-size: 0.85rem; cursor: pointer; font-family: inherit;
}

.strength { height: 6px; border-radius: 3px; background: var(--lilac-deep); margin-top: 8px; overflow: hidden; }
.strength span { display: block; height: 100%; width: 0; background: var(--error); transition: width .3s, background .3s; }

.checkbox { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--muted); margin-bottom: 16px; }
.checkbox input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--pink); flex-shrink: 0; }
.checkbox a { color: var(--pink); font-weight: 700; }

.form-meta { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; font-size: 0.9rem; }
.form-meta a { color: var(--pink); font-weight: 700; }
.form-meta a:hover { text-decoration: underline; }

.divider { display: flex; align-items: center; gap: 12px; margin: 22px 0; color: var(--muted); font-size: 0.85rem; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--lilac-deep); }

.alert {
  display: none; padding: 14px 16px; border-radius: 14px; margin-bottom: 18px;
  font-size: 0.92rem; font-weight: 600;
}
.alert.show { display: block; }
.alert-error { background: #fff0f3; color: var(--error); border: 1px solid #ffd3dc; }
.alert-success { background: #e9fbf3; color: #067a52; border: 1px solid #b8f2d8; }

.secure-note { text-align: center; font-size: 0.8rem; color: var(--muted); margin-top: 16px; }

/* Steps indicator (register) */
.steps-bar { display: flex; gap: 8px; margin-bottom: 26px; }
.steps-bar div { flex: 1; height: 6px; border-radius: 3px; background: var(--lilac-deep); }
.steps-bar div.active { background: var(--pink); }
.step-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .06em; margin-bottom: 4px; }
.form-step { display: none; }
.form-step.active { display: block; }
.step-actions { display: flex; gap: 12px; margin-top: 8px; }
.step-actions .btn { flex: 1; text-align: center; }

/* Success state */
.success-box { text-align: center; padding: 20px 0; }
.success-box .tick {
  width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px;
  background: var(--mint); color: var(--indigo); font-size: 2rem; font-weight: 800;
  display: grid; place-items: center;
}
.success-box p { color: var(--muted); margin-bottom: 20px; }

/* Footer */
footer {
  padding: 26px 0;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: center;
  border-top: 1px solid var(--lilac-deep);
}
footer a:hover { color: var(--pink); }

@media (max-width: 900px) {
  .auth-grid { grid-template-columns: 1fr; }
  .promo { min-height: auto; padding: 36px 30px; }
  .promo h1 { font-size: 2rem; }
  .card { padding: 30px 24px; }
  .row { grid-template-columns: 1fr; }
  main { padding: 36px 0; }
}
