/* =============================================================
   AUTH — split-screen chooser + shared auth styles
   ============================================================= */

.bk-auth-body { min-height: 100vh; }
.bk-auth { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }

/* ---- Left panel ---- */
.bk-auth__panel { position: relative; display: flex; flex-direction: column; padding: var(--bk-space-8); }
.bk-auth__back {
  position: absolute; top: var(--bk-space-6); inset-inline-start: var(--bk-space-8);
  width: 44px; height: 44px; border-radius: var(--bk-radius-circle);
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px var(--bk-border); color: var(--bk-text);
  transition: background var(--bk-dur-fast) var(--bk-ease), box-shadow var(--bk-dur-fast) var(--bk-ease);
}
.bk-auth__back:hover { background: var(--bk-hover); box-shadow: inset 0 0 0 1px var(--bk-ink); }

.bk-auth__content { margin: auto; width: 100%; max-width: 440px; }
.bk-auth__logo { display: inline-flex; align-items: center; margin-bottom: var(--bk-space-8); }
.bk-auth__logo img { max-height: 40px; width: auto; }
.bk-auth__title { font-size: var(--bk-fs-h1); font-weight: var(--bk-fw-extrabold); letter-spacing: -0.02em; }
.bk-auth__lead { color: var(--bk-text-muted); margin-top: var(--bk-space-2); margin-bottom: var(--bk-space-8); }

.bk-auth__cards { display: flex; flex-direction: column; gap: var(--bk-space-4); }
.bk-choice {
  display: flex; align-items: center; gap: var(--bk-space-4);
  padding: var(--bk-space-5); border-radius: var(--bk-radius-card);
  background: var(--bk-bg); box-shadow: inset 0 0 0 1px var(--bk-border);
  transition: box-shadow var(--bk-dur) var(--bk-ease), transform var(--bk-dur-fast) var(--bk-ease), background var(--bk-dur-fast) var(--bk-ease);
}
.bk-choice:hover { box-shadow: inset 0 0 0 1.5px var(--bk-primary), var(--bk-shadow-md); transform: translateY(-2px); }
.bk-choice__icon {
  flex: 0 0 auto; width: 52px; height: 52px; border-radius: var(--bk-radius-input);
  background: var(--bk-primary-tint); color: var(--bk-primary-600);
  display: inline-flex; align-items: center; justify-content: center; font-size: 20px;
}
.bk-choice__text { flex: 1; display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.bk-choice__title { font-weight: var(--bk-fw-bold); }
.bk-choice__sub { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); }
.bk-choice__arrow { flex: 0 0 auto; color: var(--bk-text-faint); transition: transform var(--bk-dur-fast) var(--bk-ease), color var(--bk-dur-fast) var(--bk-ease); }
.bk-choice:hover .bk-choice__arrow { color: var(--bk-primary); transform: translateX(-4px); }

.bk-auth__foot { display: flex; align-items: center; gap: var(--bk-space-6); margin-top: var(--bk-space-10); color: var(--bk-text-muted); font-size: var(--bk-fs-sm); }
.bk-auth__foot-item { display: inline-flex; align-items: center; gap: 6px; }
.bk-auth__foot-item:hover { color: var(--bk-primary); }

/* ---- Right visual ---- */
.bk-auth__visual { position: relative; background: var(--bk-gradient-brand); overflow: hidden; }
.bk-auth__visual::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(60% 50% at 80% 20%, rgba(255,255,255,0.25), transparent 60%),
    radial-gradient(50% 50% at 20% 80%, rgba(255,255,255,0.18), transparent 60%);
}
.bk-auth__visual-overlay { position: absolute; inset: 0; display: flex; align-items: flex-end; padding: var(--bk-space-12); }
.bk-auth__quote { position: relative; background: rgba(255,255,255,0.14); backdrop-filter: blur(12px); border: 1px solid rgba(255,255,255,0.25); border-radius: var(--bk-radius-lg); padding: var(--bk-space-6); color: #fff; max-width: 420px; }
.bk-auth__quote .bk-stars { color: #ffd66b; }
.bk-auth__quote-text { font-size: var(--bk-fs-lg); font-weight: var(--bk-fw-medium); line-height: var(--bk-lh-snug); margin-top: var(--bk-space-3); }
.bk-auth__quote-by { display: flex; align-items: center; gap: 10px; margin-top: var(--bk-space-5); }
.bk-auth__quote-avatar { width: 44px; height: 44px; border-radius: var(--bk-radius-circle); background: rgba(255,255,255,0.25); display: inline-flex; align-items: center; justify-content: center; font-weight: var(--bk-fw-bold); }
.bk-auth__quote-name { display: block; font-weight: var(--bk-fw-semibold); }
.bk-auth__quote-role { display: block; font-size: var(--bk-fs-sm); opacity: 0.85; }

@media (max-width: 900px) {
  .bk-auth { grid-template-columns: 1fr; }
  .bk-auth__visual { display: none; }
}
@media (max-width: 560px) {
  .bk-auth__panel { padding: var(--bk-space-6); }
  .bk-auth__back { inset-inline-start: var(--bk-space-5); top: var(--bk-space-5); }
  /* Logo must sit BESIDE the back button, not on top of it (item 1). Offset the
     logo past the 44px back button in the top corner and vertically centre it. */
  .bk-auth__content { padding-top: 4px; }
  .bk-auth__logo {
    margin-inline-start: 56px;
    min-height: 44px;
    align-items: center;
    margin-bottom: var(--bk-space-6);
  }
}

/* =============================================================
   Shared auth components (x-auth.phone-otp, x-auth.simple-captcha,
   password forms). These mp-* classes come from shared blade
   components reused across user/vendor/manager auth.
   ============================================================= */

.bk-auth-body .mp-btn,
.bk-auth .mp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: var(--bk-fw-semibold); font-size: var(--bk-fs-sm);
  padding: 12px 22px; min-height: 48px; width: auto;
  border-radius: var(--bk-radius-btn);
  transition: all var(--bk-dur-fast) var(--bk-ease);
}
.bk-auth-body .mp-btn--block { width: 100%; }
.bk-auth-body .mp-btn--primary { background: var(--bk-ink); color: var(--bk-on-ink); }
.bk-auth-body .mp-btn--primary:hover { background: var(--bk-ink-hover); }
.bk-auth-body .mp-btn--ghost { background: var(--bk-bg); color: var(--bk-text); box-shadow: inset 0 0 0 1px var(--bk-border-strong); }
.bk-auth-body .mp-btn--ghost:hover { box-shadow: inset 0 0 0 1px var(--bk-ink); background: var(--bk-hover); }
.bk-auth-body .mp-btn--link { background: none; color: var(--bk-primary); min-height: 36px; }
.bk-auth-body .mp-btn--link:hover { text-decoration: underline; }
.bk-auth-body .mp-btn[disabled] { opacity: 0.5; pointer-events: none; }

.mp-auth__form { display: flex; flex-direction: column; gap: var(--bk-space-4); }
.mp-auth__field { display: flex; flex-direction: column; gap: 6px; }
.mp-input__label { font-size: var(--bk-fs-sm); font-weight: var(--bk-fw-medium); color: var(--bk-text); }
.mp-input { display: flex; align-items: center; gap: 8px; background: var(--bk-bg); border-radius: var(--bk-radius-input); box-shadow: inset 0 0 0 1px var(--bk-border); transition: box-shadow var(--bk-dur-fast) var(--bk-ease); }
.mp-input:focus-within { box-shadow: inset 0 0 0 1.5px var(--bk-primary), var(--bk-ring); }
.mp-input input { flex: 1; min-width: 0; border: none; background: transparent; padding: 13px 14px; min-height: 48px; font-size: var(--bk-fs-body); color: var(--bk-text); }
.mp-input input:focus { outline: none; box-shadow: none; }
.mp-input input::placeholder { color: var(--bk-text-faint); }
.mp-input__addon { padding-inline-start: 14px; color: var(--bk-text-muted); font-size: var(--bk-fs-sm); font-family: 'Inter', var(--bk-font); }
.mp-input__toggle-pass { padding-inline-end: 12px; color: var(--bk-text-faint); }
.mp-input__toggle-pass:hover { color: var(--bk-text); }
.mp-auth__field.is-invalid .mp-input { box-shadow: inset 0 0 0 1.5px var(--bk-error); }
.mp-auth__field-error { color: var(--bk-error); font-size: var(--bk-fs-xs); }
.mp-auth__form-foot { display: flex; justify-content: flex-end; }
.mp-auth__forgot-link { color: var(--bk-primary); font-size: var(--bk-fs-sm); font-weight: var(--bk-fw-medium); }
.mp-auth__forgot-link:hover { text-decoration: underline; }
.mp-auth__note { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); }
.mp-auth__footnote { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); text-align: center; margin-top: var(--bk-space-4); }
.mp-auth__footnote a { color: var(--bk-primary); font-weight: var(--bk-fw-semibold); }
.mp-auth__resend { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); text-align: center; min-height: 20px; }
.mp-auth__resend a, .mp-auth__resend button { color: var(--bk-primary); font-weight: var(--bk-fw-semibold); }

.mp-auth__divider { display: flex; align-items: center; gap: var(--bk-space-3); color: var(--bk-text-faint); font-size: var(--bk-fs-sm); margin-block: var(--bk-space-5); }
.mp-auth__divider::before, .mp-auth__divider::after { content: ""; flex: 1; height: 1px; background: var(--bk-border); }

.mp-auth__msg { font-size: var(--bk-fs-sm); border-radius: var(--bk-radius-input); }
.mp-auth__msg:not(:empty) { padding: 12px 14px; margin-top: var(--bk-space-2); background: var(--bk-surface-2); }
.mp-auth__msg.is-success:not(:empty) { background: var(--bk-success-tint); color: var(--bk-success); }
.mp-auth__msg.is-error:not(:empty) { background: var(--bk-error-tint); color: var(--bk-error); }

/* OTP field — ONE real input, N painted cells.
   The input covers the whole row and carries the text; its own glyphs and caret
   are transparent so what you read is the cells underneath. It is deliberately
   a normal, full-size, visible field (never opacity:0 or display:none) because
   Chrome's autofill skips fields it considers invisible. */
.mp-otp { position: relative; direction: ltr; margin-block: var(--bk-space-4); }
.mp-otp__cells {
  display: flex; gap: 10px; justify-content: center; direction: ltr;
  pointer-events: none; /* taps fall through to the input above */
}
.mp-otp__cell {
  width: 52px; height: 60px; border-radius: var(--bk-radius-input);
  display: flex; align-items: center; justify-content: center;
  font-size: var(--bk-fs-h3); font-weight: var(--bk-fw-bold);
  color: var(--bk-text); background: var(--bk-bg);
  box-shadow: inset 0 0 0 1px var(--bk-border);
  transition: box-shadow var(--bk-dur-fast) var(--bk-ease);
  pointer-events: auto;
}
.mp-otp__cell.is-filled { box-shadow: inset 0 0 0 1.5px var(--bk-border-strong, var(--bk-border)); }
.mp-otp__cell.is-active { box-shadow: inset 0 0 0 1.5px var(--bk-primary), var(--bk-ring); }

.mp-otp__input {
  position: absolute; inset: 0; z-index: 1;
  width: 100%; height: 100%; margin: 0; padding: 0;
  border: 0; background: transparent; border-radius: var(--bk-radius-input);
  font-size: var(--bk-fs-h3); font-weight: var(--bk-fw-bold);
  text-align: center; letter-spacing: 2em; text-indent: 2em;
  color: transparent; caret-color: transparent; -webkit-text-fill-color: transparent;
}
/* base.css has a global «:focus-visible { box-shadow: var(--bk-ring-strong) }»
   which drew a purple rectangle around the whole row, because this input spans
   all the cells. outline:none alone did not remove it — the ring is a
   box-shadow. The focus indicator belongs on the active cell, not here. */
.mp-otp__input:focus,
.mp-otp__input:focus-visible { outline: none; box-shadow: none; }
/* The OS autofill/QuickType bar can tint the field; keep it invisible so it
   never double-prints over the cells. */
.mp-otp__input:-webkit-autofill,
.mp-otp__input:-webkit-autofill:focus {
  -webkit-text-fill-color: transparent;
  transition: background-color 9999s ease-out;
}

@media (max-width: 420px) {
  .mp-otp__cell { width: 44px; height: 52px; }
}

/* Simple captcha */

/* Flash messages on auth pages */
.bk-auth__flash { padding: 12px 16px; border-radius: var(--bk-radius-input); font-size: var(--bk-fs-sm); margin-bottom: var(--bk-space-4); }
.bk-auth__flash.is-success { background: var(--bk-success-tint); color: var(--bk-success); }
.bk-auth__flash.is-error { background: var(--bk-error-tint); color: var(--bk-error); }

/* Google button */
.mp-google-btn { background: var(--bk-bg); box-shadow: inset 0 0 0 1px var(--bk-border-strong); color: var(--bk-text); }
.mp-google-btn:hover { box-shadow: inset 0 0 0 1px var(--bk-ink); background: var(--bk-hover); }

/* ---- Centered card mode (forgot/verify/reset pages) ---- */
.bk-auth-card-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--bk-space-6); background: var(--bk-surface); }
.bk-auth-card { width: 100%; max-width: 440px; background: var(--bk-bg); border-radius: var(--bk-radius-lg); box-shadow: var(--bk-shadow-md); padding: var(--bk-space-8); }
.bk-auth-card .bk-auth__logo { margin-bottom: var(--bk-space-6); }
.bk-auth-card__title { font-size: var(--bk-fs-h2); font-weight: var(--bk-fw-extrabold); letter-spacing: -0.01em; }
.bk-auth-card__sub { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); margin-top: var(--bk-space-2); margin-bottom: var(--bk-space-6); line-height: var(--bk-lh-normal); }

.bk-auth-tabs { display: flex; gap: 6px; background: var(--bk-surface-2); border-radius: var(--bk-radius-pill); padding: 4px; margin-bottom: var(--bk-space-5); }
.bk-auth-tabs button { flex: 1; padding: 10px 12px; border-radius: var(--bk-radius-pill); font-size: var(--bk-fs-sm); font-weight: var(--bk-fw-semibold); color: var(--bk-text-muted); transition: all var(--bk-dur-fast) var(--bk-ease); }
.bk-auth-tabs button.is-active { background: var(--bk-bg); color: var(--bk-text); box-shadow: var(--bk-shadow-sm); }

.d-none { display: none !important; }

/* 6-digit email-code grid + single SMS code input (forgot flow) */
.mp-otp-grid--6 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-bottom: var(--bk-space-4); direction: ltr; }
.mp-otp-digit { width: 100%; aspect-ratio: 1; text-align: center; font-size: var(--bk-fs-lg); font-weight: var(--bk-fw-bold); border: none; box-shadow: inset 0 0 0 1px var(--bk-border); border-radius: var(--bk-radius-input); background: var(--bk-bg); padding: 0; }
.mp-otp-digit:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--bk-primary), var(--bk-ring); }
.mp-forgot-otp-single { width: 100%; text-align: center; font-size: var(--bk-fs-lg); font-weight: var(--bk-fw-bold); letter-spacing: 0.2em; }
.mp-forgot-resend { text-align: center; font-size: var(--bk-fs-sm); color: var(--bk-text-muted); margin-bottom: var(--bk-space-4); }

/* =============================================================
   .mp-auth card system — centered-card auth for panel roles
   (vendor / manager / specialist / user register, 2fa,
   complete-profile). Loaded via theme.layouts.auth.
   ============================================================= */
.mp-auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: var(--bk-space-6); }
.mp-auth__card {
  width: 100%; max-width: 440px; background: var(--bk-bg);
  border-radius: var(--bk-radius-lg); box-shadow: var(--bk-shadow-md);
  padding: var(--bk-space-8); text-align: start;
}
.mp-auth--wide .mp-auth__card { max-width: 540px; }
.mp-auth__logo { display: inline-flex; align-items: center; margin-bottom: var(--bk-space-6); }
.mp-auth__logo img { max-height: 40px; width: auto; }
.mp-auth__title { font-size: var(--bk-fs-h2); font-weight: var(--bk-fw-extrabold); letter-spacing: -0.01em; }
.mp-auth__subtitle { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); margin-top: var(--bk-space-2); margin-bottom: var(--bk-space-6); line-height: var(--bk-lh-normal); }
.mp-auth__hint { color: var(--bk-text-muted); font-size: var(--bk-fs-sm); }

/* Segmented phone/email tabs */
.mp-auth__tabs { display: flex; gap: 4px; background: var(--bk-surface-2); border-radius: var(--bk-radius-pill); padding: 4px; margin-bottom: var(--bk-space-5); }
.mp-auth__tab { flex: 1; padding: 10px 12px; border-radius: var(--bk-radius-pill); font-size: var(--bk-fs-sm); font-weight: var(--bk-fw-semibold); color: var(--bk-text-muted); transition: all var(--bk-dur-fast) var(--bk-ease); white-space: nowrap; }
.mp-auth__tab.is-active { background: var(--bk-bg); color: var(--bk-text); box-shadow: var(--bk-shadow-sm); }

/* Inline validation feedback (laravel @error blocks render .is-invalid + feedback) */
.mp-auth__field-feedback, .invalid-feedback { color: var(--bk-error); font-size: var(--bk-fs-xs); margin-top: 4px; }
.mp-auth__field.is-invalid .mp-input, .mp-input.is-invalid, input.is-invalid { box-shadow: inset 0 0 0 1.5px var(--bk-error); }
.mp-auth__footnote--vendor, .mp-auth__footnote--manager { color: var(--bk-text-muted); }

/* Vendor register: wider card + tidy multi-field grid */
.mp-vendor-register .mp-auth__card, .mp-auth--vendor.mp-vendor-register { max-width: 600px; }
.mp-vendor-register .row, .mp-auth__form .row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--bk-space-4); }
.mp-vendor-register .col-12, .mp-vendor-register .col-md-12, .mp-auth__form .col-12 { grid-column: 1 / -1; }
@media (max-width: 560px) { .mp-vendor-register .row, .mp-auth__form .row { grid-template-columns: 1fr; } }

/* form-group / form-label / form--control fallbacks (admin-style markup reused in some auth views) */
.mp-auth__card .form-group { margin-bottom: var(--bk-space-4); }
.mp-auth__card .form-label, .mp-auth__card label { display: block; font-size: var(--bk-fs-sm); font-weight: var(--bk-fw-medium); margin-bottom: 6px; }
.mp-auth__card .form--control {
  width: 100%; padding: 12px 14px; min-height: 48px;
  border: none; border-radius: var(--bk-radius-input);
  background: var(--bk-bg); box-shadow: inset 0 0 0 1px var(--bk-border);
  font-family: inherit; font-size: var(--bk-fs-body); color: var(--bk-text);
}
.mp-auth__card .form--control:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--bk-primary), var(--bk-ring); }
