/* ==========================================================================
   ChaiPoint — signup + login
   BMC split / centered layouts, cream + chai brown (not yellow).
   ========================================================================== */

:root {
  --color-error: #e11d48;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* ---------- Signup split ---------- */
.auth-split {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(280px, 38%) 1fr;
  background:
    radial-gradient(900px 520px at 12% -10%, rgba(232, 165, 75, 0.28), transparent 58%),
    var(--color-canvas-cream);
}

.auth-promo {
  display: flex;
  flex-direction: column;
  padding: 36px 40px 32px;
  min-height: 100dvh;
}

.auth-welcome {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--color-ink-charcoal);
}

.auth-welcome-icon {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  color: var(--color-ink-charcoal);
}

.auth-welcome-icon svg {
  width: 28px;
  height: 28px;
}

.promo-stage {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 0;
  padding: 28px 0 20px;
}

.promo-board {
  background: var(--color-pure-white);
  border-radius: 32px;
  padding: 28px 18px 22px;
  box-shadow: var(--shadow-float);
}

.promo-kicker {
  font-size: 28px;
  font-weight: 800;
  letter-spacing: -0.045em;
  text-align: center;
  color: var(--color-ink-charcoal);
  margin-bottom: 6px;
}

.promo-title {
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-slate-gray);
  text-align: center;
  margin: 0 auto 22px;
  max-width: 260px;
}

.promo-deck {
  position: relative;
  height: 360px;
  margin: 0 auto;
}

.promo-card {
  position: absolute;
  left: 50%;
  top: 18px;
  width: min(228px, 72%);
  margin-left: calc(min(228px, 72%) / -2);
  background: var(--color-pure-white);
  border-radius: 22px;
  box-shadow: 0 18px 40px -22px rgba(10, 10, 10, 0.35);
  padding: 0 0 16px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease, filter 0.45s ease;
}

.promo-card.is-left {
  transform: translateX(-46%) scale(0.84);
  opacity: 0.42;
  filter: saturate(0.55);
  z-index: 1;
  pointer-events: auto;
}

.promo-card.is-right {
  transform: translateX(46%) scale(0.84);
  opacity: 0.42;
  filter: saturate(0.55);
  z-index: 1;
}

.promo-card.is-on {
  transform: translateX(0) scale(1);
  opacity: 1;
  filter: none;
  z-index: 3;
  cursor: default;
}

.promo-card-art {
  height: 88px;
  display: grid;
  place-items: center;
}

.promo-card-art svg {
  width: 42px;
  height: 42px;
}

.promo-art-chai {
  background: #f4e4d2;
  color: var(--color-chai);
}

.promo-art-mpesa {
  background: #e5f3ea;
  color: #1f6b3a;
}

.promo-art-keep {
  background: #f8eee6;
}

.promo-art-keep .promo-keep-stat {
  font-size: 40px;
  margin: 0;
}

.promo-card-name {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: -0.03em;
  padding: 14px 16px 0;
}

.promo-card-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-gray);
  padding: 2px 16px 10px;
}

.promo-card-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 0 16px 12px;
}

.promo-card-item {
  position: relative;
  padding-left: 18px;
  font-size: 12.5px;
  font-weight: 500;
  line-height: 1.35;
  color: var(--color-ink-charcoal);
}

.promo-card-item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 8px;
  height: 5px;
  border-left: 1.8px solid var(--color-ink-charcoal);
  border-bottom: 1.8px solid var(--color-ink-charcoal);
  transform: rotate(-45deg);
}

.promo-card-cta {
  display: block;
  margin: 0 16px;
  text-align: center;
  padding: 10px 12px;
  border-radius: var(--radius-full);
  background: var(--color-chai);
  color: var(--color-pure-white);
  font-size: 13px;
  font-weight: 700;
}

.promo-float {
  position: absolute;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--color-pure-white);
  border-radius: 16px;
  padding: 8px 12px;
  box-shadow: 0 10px 28px -12px rgba(10, 10, 10, 0.28);
}

.promo-float-left {
  left: 2px;
  top: 8px;
}

.promo-float-right {
  right: 2px;
  bottom: 28px;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
}

.promo-avatars {
  display: flex;
}

.promo-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #fff;
  margin-left: -6px;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 800;
  color: #fff;
  background: var(--color-chai);
}

.promo-avatar:first-child {
  margin-left: 0;
  background: #8b5e3c;
}

.promo-avatar:nth-child(2) {
  background: #c45c26;
}

.promo-avatar:nth-child(3) {
  background: #e8a54b;
}

.promo-float-stat {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.promo-float-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-slate-gray);
}

.promo-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 18px;
}

.promo-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(10, 10, 10, 0.16);
  padding: 0;
}

.promo-dot.is-on {
  background: var(--color-ink-charcoal);
  width: 18px;
  border-radius: 99px;
}

.promo-keep-stat {
  font-size: 56px;
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 1;
  background: linear-gradient(118deg, var(--color-chai) 0%, var(--color-amber) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.promo-proof {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-gray);
}

/* ---------- Signup form panel ---------- */
.auth-panel {
  background: var(--color-pure-white);
  border-radius: 40px 0 0 40px;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 50px -24px rgba(10, 10, 10, 0.12);
}

.auth-panel-top {
  display: flex;
  justify-content: flex-end;
  padding: 28px 40px 0;
}

.auth-switch {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-slate-gray);
}

.auth-switch a {
  color: var(--color-ink-charcoal);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-switch a:hover {
  color: var(--color-electric-cobalt);
}

.auth-panel-mid {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px 12vw 32px;
  max-width: 920px;
  width: 100%;
}

.auth-title {
  font-size: clamp(36px, 4.6vw, 52px);
  font-weight: 800;
  letter-spacing: -0.045em;
  line-height: 1.05;
  margin-bottom: 10px;
}

.auth-lede {
  font-size: 18px;
  font-weight: 500;
  color: var(--color-slate-gray);
  margin-bottom: 28px;
}

.auth-form {
  max-width: 560px;
}

.auth-field {
  display: flex;
  align-items: center;
  gap: 2px;
  height: 56px;
  padding: 0 16px 0 20px;
  border-radius: var(--radius-full);
  background: #f3f1ee;
  border: 1.5px solid transparent;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.auth-field:focus-within {
  border-color: var(--color-electric-cobalt);
  background: var(--color-pure-white);
}

.auth-field.is-invalid {
  border-color: var(--color-error);
  background: #fff7f8;
}

.auth-prefix {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-steel-gray);
  flex: none;
}

.auth-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-charcoal);
  outline: none;
}

.auth-field-x {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--color-error);
  color: #fff;
  font-size: 16px;
  line-height: 20px;
  text-align: center;
  flex: none;
}

.auth-field.is-invalid .auth-field-x {
  display: block;
}

.auth-field-ok {
  display: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #1f6b3a;
  color: #fff;
  font-size: 12px;
  line-height: 22px;
  text-align: center;
  font-weight: 800;
  flex: none;
}

.auth-field.is-ok {
  border-color: #1f6b3a;
  background: #f3faf5;
}

.auth-field.is-ok .auth-field-ok {
  display: block;
}

.auth-avail {
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-slate-gray);
}

.auth-avail.is-ok {
  color: #1f6b3a;
}

.auth-avail.is-no {
  color: var(--color-error);
}

.bank-picker {
  position: relative;
}

.bank-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  height: 56px;
  padding: 0 18px 0 20px;
  border-radius: var(--radius-full);
  background: #f3f1ee;
  border: 1.5px solid transparent;
  font: inherit;
  text-align: left;
}

.bank-trigger:hover,
.bank-picker.is-open .bank-trigger {
  border-color: var(--color-electric-cobalt);
  background: var(--color-pure-white);
}

.bank-picker.is-invalid .bank-trigger {
  border-color: var(--color-error);
  background: #fff7f8;
}

.bank-label {
  flex: 1;
  min-width: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-charcoal);
}

.bank-mark {
  width: 28px;
  height: 28px;
  flex: none;
  object-fit: contain;
  background: #fff;
  border-radius: 7px;
  border: 1px solid rgba(26, 23, 20, 0.08);
}

.bank-mark.is-letter {
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: var(--color-chai);
  border-color: transparent;
}

.bank-label.is-placeholder {
  color: var(--color-steel-gray);
}

.bank-chevron {
  width: 18px;
  height: 18px;
  color: var(--color-slate-gray);
  flex: none;
}

.bank-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  z-index: 20;
  background: var(--color-pure-white);
  border: 1px solid var(--color-hairline);
  border-radius: 18px;
  box-shadow: var(--shadow-float);
  overflow: hidden;
}

.bank-search {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  border: 0;
  border-bottom: 1px solid var(--color-hairline);
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  outline: none;
}

.bank-list {
  max-height: 220px;
  overflow: auto;
}

.bank-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 16px;
  text-align: left;
  font-size: 14px;
  font-weight: 600;
}

.bank-opt:hover,
.bank-opt.is-on {
  background: #f6f1ea;
}

.auth-error {
  margin-top: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--color-error);
}

.auth-done {
  max-width: 560px;
}

.auth-done-url {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--color-electric-cobalt);
  margin-bottom: 10px;
}

.auth-done-lede {
  font-size: 17px;
  color: var(--color-slate-gray);
}

.auth-panel-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 20px 40px 28px;
  border-top: 1px solid var(--color-hairline);
}

.auth-legal {
  font-size: 13px;
  color: var(--color-steel-gray);
  max-width: 420px;
}

.auth-legal a {
  font-weight: 600;
  color: var(--color-slate-gray);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.auth-submit {
  flex: none;
  min-width: 132px;
}

.auth-progress {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-chai);
  margin-bottom: 10px;
}

.auth-step {
  display: none;
}

.auth-step.is-on {
  display: block;
}

.auth-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-field select {
  flex: 1;
  min-width: 0;
  border: 0;
  background: transparent;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-charcoal);
  outline: none;
  appearance: none;
}

.auth-hint {
  margin-top: 12px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.45;
  color: var(--color-steel-gray);
}

.pay-toggle {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 14px;
  padding: 4px;
  border-radius: var(--radius-full);
  background: #f3f1ee;
}

.pay-opt {
  height: 42px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 700;
  color: var(--color-slate-gray);
}

.pay-opt.is-on {
  background: var(--color-pure-white);
  color: var(--color-ink-charcoal);
  box-shadow: 0 1px 4px rgba(10, 10, 10, 0.08);
}

.pay-panel {
  display: none;
}

.pay-panel.is-on {
  display: block;
}

.auth-bot-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.auth-back {
  height: 48px;
  padding: 0 18px;
  border-radius: var(--radius-full);
  font-size: 15px;
  font-weight: 700;
  color: var(--color-slate-gray);
}

.auth-back:hover {
  color: var(--color-ink-charcoal);
}

.auth-done-list {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-done-item {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-slate-gray);
}

/* ---------- Login ---------- */
.auth-login {
  min-height: 100dvh;
  background: var(--color-pure-white);
  display: flex;
  flex-direction: column;
}

.login-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
}

.login-bar .brand-name {
  display: none;
}

.login-main {
  width: min(400px, calc(100% - 48px));
  margin: 8vh auto 0;
}

.login-title {
  font-size: 40px;
  font-weight: 800;
  letter-spacing: -0.045em;
  margin-bottom: 8px;
}

.auth-login .auth-lede {
  font-size: 16px;
  margin-bottom: 28px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.login-input {
  height: 52px;
  width: 100%;
  padding: 0 18px;
  border: 1.5px solid transparent;
  border-radius: 14px;
  background: #f3f1ee;
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-ink-charcoal);
  outline: none;
}

.login-input:focus {
  border-color: var(--color-electric-cobalt);
  background: var(--color-pure-white);
}

.login-input.is-invalid {
  border-color: var(--color-error);
  background: #fff7f8;
}

.login-sent {
  font-size: 16px;
  line-height: 1.5;
  color: var(--color-slate-gray);
  padding: 8px 0 12px;
}

.login-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
  color: var(--color-steel-gray);
  font-size: 13px;
  font-weight: 500;
}

.login-divider::before,
.login-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--color-hairline);
}

.login-social {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--color-hairline);
  background: var(--color-pure-white);
  font-size: 15px;
  font-weight: 600;
  color: var(--color-ink-charcoal);
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.social-btn:hover {
  border-color: var(--color-faint-gray);
  background: #faf9f7;
}

.social-btn svg {
  width: 18px;
  height: 18px;
}

.social-note {
  margin-top: 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-chai);
  text-align: center;
}

.login-foot {
  margin-top: auto;
  padding: 24px;
  text-align: center;
  font-size: 13px;
  color: var(--color-steel-gray);
}

/* ---------- Me (account) ---------- */
.me-wrap {
  width: min(560px, calc(100% - 48px));
  margin: 6vh auto 48px;
}

.me-kicker {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-chai);
  margin-bottom: 8px;
}

.me-card {
  margin-top: 28px;
  padding: 24px;
  border: 1px solid var(--color-hairline);
  border-radius: 24px;
  background: var(--color-pure-white);
}

.me-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--color-hairline);
}

.me-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.me-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-steel-gray);
}

.me-value {
  font-size: 14px;
  font-weight: 700;
  text-align: right;
}

.me-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .auth-split {
    grid-template-columns: 1fr;
  }

  .auth-promo {
    display: none;
  }

  .auth-panel {
    border-radius: 0;
    box-shadow: none;
    min-height: 100dvh;
  }

  .auth-panel-mid {
    padding: 32px 24px;
  }

  .auth-panel-top,
  .auth-panel-bot {
    padding-inline: 24px;
  }

  .auth-panel-bot {
    flex-direction: column-reverse;
    align-items: stretch;
  }

  .auth-submit {
    width: 100%;
  }

  .auth-bot-actions {
    width: 100%;
    flex-direction: column-reverse;
  }

  .auth-back {
    width: 100%;
  }

  .auth-legal {
    text-align: center;
    max-width: none;
  }
}

@media (max-width: 640px) {
  .login-bar {
    padding: 16px 20px;
  }

  .login-title {
    font-size: 32px;
  }

  .auth-title {
    font-size: 32px;
  }
}
