:where(.bfa-root, .bfa-root *, .bfa-root *::before, .bfa-root *::after) {
  box-sizing: border-box; margin: 0; padding: 0;
}

.bfa-root {
  /* warm pastel — blush page, white card, plum ink, lavender→pink action */
  --bfa-bg:      #fef8f5;
  --bfa-bg2:     #fbeee9;
  --bfa-surface: #ffffff;
  --bfa-border:  #f0dfd9;
  --bfa-text:    #3b2f3a;
  --bfa-muted:   #6c5c68;
  --bfa-accent:  #58439e;
  --bfa-danger:  #c24a66;
  --bfa-success: #22694a;
  --bfa-primary: #d9b5dc;
  --bfa-primary-fg: #33253a;

  font-family: 'Segoe UI', system-ui, -apple-system, 'Noto Sans', sans-serif;
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px;
  background:
    transparent;
  color: var(--bfa-text);
}

body.beez-fin-canvas { margin: 0; background: #fef8f5; }

.bfa-card-wrap { width: 100%; max-width: 420px; }

.bfa-logo {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-bottom: 24px; color: var(--bfa-text); font-weight: 700; font-size: 18px; text-decoration: none;
}
.bfa-logo-icon {
  width: 38px; height: 38px; border-radius: 12px; background: #fcd69c;
  box-shadow: 0 3px 10px rgba(226,160,90,.35);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
}

.bfa-card {
  background: var(--bfa-surface); border: 1px solid var(--bfa-border);
  border-radius: 18px; padding: 8px;
  box-shadow: 0 24px 60px rgba(205,140,140,.24);
}

/* ── Tabs ────────────────────────────────────────────────────── */
.bfa-tabs {
  position: relative; display: flex; gap: 4px;
  background: var(--bfa-bg2); border-radius: 12px; padding: 4px; margin-bottom: 24px;
}
.bfa-tab {
  flex: 1; z-index: 1; position: relative;
  background: transparent; border: 0; cursor: pointer;
  padding: 10px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: var(--bfa-muted);
  transition: color .2s;
}
.bfa-tab.is-active { color: var(--bfa-primary-fg); }
.bfa-tab-indicator {
  position: absolute; top: 4px; bottom: 4px; left: 4px;
  width: calc(50% - 6px); border-radius: 9px;
  background: var(--bfa-primary);
  box-shadow: 0 6px 18px rgba(201,184,236,.55);
  transition: transform .25s ease;
}
.bfa-tab-indicator[data-active="register"] { transform: translateX(calc(100% + 4px)); }

/* ── Alert ───────────────────────────────────────────────────── */
.bfa-alert {
  margin: 0 16px 16px; padding: 12px 14px; border-radius: 10px;
  font-size: 13px; line-height: 1.5;
}
.bfa-alert.bfa-alert-error   { background: #fdeaee; border: 1px solid #f3bcc8; color: #a63a54; }
.bfa-alert.bfa-alert-success { background: #e6f5ed; border: 1px solid #b5dfc8; color: #22694a; }

/* ── Forms ───────────────────────────────────────────────────── */
.bfa-form { display: none; flex-direction: column; gap: 16px; padding: 4px 16px 20px; }
.bfa-form.is-active { display: flex; }

.bfa-field { display: flex; flex-direction: column; gap: 6px; }
.bfa-field label { font-size: 13px; font-weight: 600; color: var(--bfa-muted); }
.bfa-field input[type="text"],
.bfa-field input[type="email"],
.bfa-field input[type="password"] {
  width: 100%; background: var(--bfa-bg2); border: 1px solid var(--bfa-border);
  border-radius: 10px; padding: 11px 14px; color: var(--bfa-text); font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.bfa-field input:focus {
  outline: none; border-color: #c9b8ec;
  box-shadow: 0 0 0 3px rgba(201,184,236,.4);
}
.bfa-field input.bfa-invalid { border-color: var(--bfa-danger); }
.bfa-hint { color: var(--bfa-muted); font-size: 12px; }

/* ── Account type selector ───────────────────────────────────── */
.bfa-type-select { display: flex; gap: 8px; }
.bfa-type-option {
  flex: 1; position: relative; display: flex; flex-direction: column; gap: 3px;
  background: var(--bfa-bg2); border: 1.5px solid var(--bfa-border); border-radius: 12px;
  padding: 12px; cursor: pointer; transition: border-color .15s, background .15s;
}
.bfa-type-option input { position: absolute; opacity: 0; }
.bfa-type-option.is-active {
  border-color: #c9b8ec; background: var(--bfa-surface);
  box-shadow: 0 0 0 3px rgba(201,184,236,.35);
}
.bfa-type-icon { font-size: 18px; }
.bfa-type-label { font-size: 13px; font-weight: 700; color: var(--bfa-text); }
.bfa-type-desc { font-size: 11px; color: var(--bfa-muted); line-height: 1.4; }

.bfa-pass-wrap { position: relative; }
.bfa-pass-wrap input { padding-right: 42px; }
.bfa-pass-toggle {
  position: absolute; right: 4px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; cursor: pointer; font-size: 15px;
  width: 34px; height: 34px; border-radius: 8px; color: var(--bfa-muted);
}
.bfa-pass-toggle:hover { background: rgba(59,47,58,.06); color: var(--bfa-text); }

.bfa-row-between { display: flex; align-items: center; justify-content: space-between; }

.bfa-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--bfa-muted); cursor: pointer; }
.bfa-check input { accent-color: var(--bfa-accent); width: 15px; height: 15px; }
.bfa-check-terms span { line-height: 1.4; }

.bfa-link-sm { font-size: 13px; color: var(--bfa-accent); text-decoration: none; }
.bfa-link-sm:hover { text-decoration: underline; }

.bfa-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ── Button ──────────────────────────────────────────────────── */
.bfa-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 13px 24px; border-radius: 10px; border: 1px solid transparent;
  font-size: 14px; font-weight: 700; cursor: pointer;
  transition: transform .15s, opacity .15s;
}
.bfa-btn:hover { transform: translateY(-1px); }
.bfa-btn:disabled { opacity: .7; cursor: default; transform: none; }
.bfa-btn-block { width: 100%; }
.bfa-btn-primary {
  background: var(--bfa-primary); color: var(--bfa-primary-fg);
  box-shadow: 0 8px 24px rgba(201,184,236,.55);
}
.bfa-spinner {
  width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(51,37,58,.25); border-top-color: #33253a;
  animation: bfa-spin .7s linear infinite;
}
@keyframes bfa-spin { to { transform: rotate(360deg); } }

.bfa-back { text-align: center; margin-top: 20px; }
.bfa-back a { color: var(--bfa-muted); font-size: 13px; text-decoration: none; }
.bfa-back a:hover { color: var(--bfa-text); }

@media (max-width: 480px) {
  .bfa-card { border-radius: 14px; }
}

/* ── Forgot / reset password (no tabs, single panel) ─────────── */
.bfa-single .bfa-tabs { display: none; }
.bfa-form-head { padding-top: 18px; }
.bfa-form-head h2 { margin: 0 0 6px; font-size: 18px; color: var(--bfa-text); }
.bfa-form-head p { margin: 0; font-size: 13px; line-height: 1.5; color: var(--bfa-muted); }
.bfa-back-in { margin: 0; }
