/* Storefront customer auth (pages + modal). Everything is scoped under .sf-auth. */
.sf-auth {
    --sf-accent: var(--bs-primary, #1f2937);
    --sf-ink: #111827;
    --sf-muted: #6b7280;
    --sf-line: #e5e7eb;
    --sf-bg: #ffffff;
    --sf-soft: #f9fafb;
    --sf-danger: #b42318;
    --sf-ok: #067647;
    --sf-radius: 14px;
    color: var(--sf-ink);
}
.sf-auth-page { padding: 32px 0 56px; background: var(--sf-soft); }
.sf-auth-card {
    display: flex; max-width: 960px; margin: 0 auto; background: var(--sf-bg);
    border: 1px solid var(--sf-line); border-radius: var(--sf-radius); overflow: hidden;
    box-shadow: 0 12px 40px rgba(17, 24, 39, .06);
}
.sf-auth-brand {
    flex: 0 0 40%; flex-direction: column; justify-content: center; gap: 18px; padding: 48px 40px;
    background: var(--sf-accent); color: #fff;
}
.sf-auth-brand h2 { font-size: 1.6rem; line-height: 1.25; margin: 0; color: #fff; }
.sf-auth-brand ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.sf-auth-brand li { display: flex; align-items: center; gap: 10px; opacity: .92; }
.sf-auth-brand-logo { width: 64px; height: 64px; border-radius: 16px; object-fit: cover; background: #fff; }
.sf-auth-main { flex: 1; padding: 40px 48px; max-width: 520px; margin: 0 auto; width: 100%; }
.sf-auth-mobile-brand { text-align: center; margin-bottom: 16px; }
.sf-auth-tabs { display: flex; gap: 4px; padding: 4px; background: var(--sf-soft); border: 1px solid var(--sf-line); border-radius: 999px; margin-bottom: 24px; }
.sf-auth-tabs a, .sf-auth-tabs button {
    flex: 1; text-align: center; padding: 9px 12px; border-radius: 999px; border: 0; background: none;
    color: var(--sf-muted); font-weight: 600; text-decoration: none;
}
.sf-auth-tabs .active { background: var(--sf-bg); color: var(--sf-ink); box-shadow: 0 1px 3px rgba(17, 24, 39, .12); }
.sf-auth-title { font-size: 1.5rem; font-weight: 700; margin: 0 0 6px; }
.sf-auth-subtitle { color: var(--sf-muted); margin: 0 0 24px; }
.sf-auth-field { margin-bottom: 16px; }
.sf-auth .form-label { font-weight: 600; font-size: .9rem; margin-bottom: 6px; }
.sf-auth .form-control { min-height: 48px; border-radius: 10px; border-color: var(--sf-line); }
.sf-auth .input-group-text { border-radius: 10px 0 0 10px; background: var(--sf-soft); border-color: var(--sf-line); }
.sf-auth .sf-auth-mobile .form-control { border-radius: 0 10px 10px 0; }
.sf-auth .form-control:focus { border-color: var(--sf-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--sf-accent) 22%, transparent); }
.sf-auth .form-control.is-invalid { border-color: var(--sf-danger); }
.sf-auth-error { color: var(--sf-danger); font-size: .85rem; margin-top: 6px; display: flex; gap: 6px; align-items: baseline; }
.sf-auth-password { position: relative; }
.sf-auth-password .form-control { padding-right: 48px; }
/* Bootstrap's invalid icon would sit under the show/hide button. */
.sf-auth-password .form-control.is-invalid { background-image: none; padding-right: 48px; }
.sf-auth-eye { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 40px; height: 40px; border: 0; background: none; color: var(--sf-muted); border-radius: 8px; }
.sf-auth-eye:focus-visible, .sf-auth-link:focus-visible, .sf-auth-submit:focus-visible, .sf-auth-tabs a:focus-visible, .sf-auth-tabs button:focus-visible, .sf-auth-social-btn:focus-visible {
    outline: 2px solid var(--sf-accent); outline-offset: 2px;
}
.sf-auth-meter { margin-top: 8px; }
.sf-auth-meter-bar { height: 4px; background: var(--sf-line); border-radius: 4px; overflow: hidden; }
.sf-auth-meter-bar span { display: block; height: 100%; width: 0; background: var(--sf-danger); transition: width .2s, background .2s; }
.sf-auth-meter[data-score="2"] .sf-auth-meter-bar span { background: #b54708; }
.sf-auth-meter[data-score="3"] .sf-auth-meter-bar span { background: var(--sf-ok); }
.sf-auth-rules { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .8rem; color: var(--sf-muted); }
.sf-auth-rules li::before { content: "\25CB"; margin-right: 6px; }
.sf-auth-rules li.ok { color: var(--sf-ok); }
.sf-auth-rules li.ok::before { content: "\2713"; }
/* Theme styles enlarge .form-check-input; keep auth checkboxes compact and aligned. */
.sf-auth .form-check { display: flex; align-items: center; gap: 8px; padding-left: 0; margin: 0; min-height: 0; }
.sf-auth .form-check-input { float: none; flex: 0 0 auto; width: 18px; height: 18px; margin: 0; padding: 0; border-radius: 4px; }
.sf-auth .form-check-input:checked { background-color: var(--sf-accent); border-color: var(--sf-accent); }
.sf-auth .form-check-label { margin: 0; }
.sf-auth-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 20px; flex-wrap: wrap; }
.sf-auth-link { color: var(--sf-accent); font-weight: 600; text-decoration: none; }
.sf-auth-link:hover { text-decoration: underline; }
.sf-auth-submit {
    width: 100%; min-height: 48px; border-radius: 10px; background: var(--sf-accent); color: #fff;
    font-weight: 600; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.sf-auth-submit:hover { color: #fff; filter: brightness(.94); }
.sf-auth-submit[disabled] { opacity: .75; }
.sf-auth-spinner { width: 16px; height: 16px; border: 2px solid rgba(255, 255, 255, .5); border-top-color: #fff; border-radius: 50%; animation: sf-spin .7s linear infinite; }
@keyframes sf-spin { to { transform: rotate(360deg); } }
.sf-auth-terms { margin: 4px 0 20px; font-size: .9rem; }
.sf-auth-divider { display: flex; align-items: center; gap: 12px; color: var(--sf-muted); margin: 22px 0 16px; font-size: .85rem; }
.sf-auth-divider::before, .sf-auth-divider::after { content: ""; flex: 1; height: 1px; background: var(--sf-line); }
.sf-auth-social { display: grid; gap: 10px; }
.sf-auth-social-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 46px;
    border: 1px solid var(--sf-line); border-radius: 10px; color: var(--sf-ink); font-weight: 600; text-decoration: none; background: var(--sf-bg);
}
.sf-auth-social-btn:hover { background: var(--sf-soft); color: var(--sf-ink); }
.sf-auth-foot { text-align: center; color: var(--sf-muted); margin: 22px 0 0; }
.sf-auth-steps { display: flex; gap: 6px; margin-bottom: 10px; }
.sf-auth-steps span { flex: 1; height: 4px; border-radius: 4px; background: var(--sf-line); }
.sf-auth-steps span.active { background: var(--sf-accent); }
.sf-auth-step { font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--sf-muted); margin: 0 0 6px; }
.sf-auth-done { text-align: center; padding: 24px 0; }
.sf-auth-done-icon { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; background: color-mix(in srgb, var(--sf-ok) 14%, #fff); color: var(--sf-ok); font-size: 1.6rem; }
/* Modal */
.sf-auth-modal .modal-content { border-radius: var(--sf-radius); border: 0; }
.sf-auth-modal .modal-body { padding: 8px 28px 28px; }
.sf-auth-modal .modal-header { border: 0; padding: 20px 28px 8px; }
@media (max-width: 991.98px) {
    .sf-auth-page { padding: 16px 0 40px; background: var(--sf-bg); }
    .sf-auth-card { border: 0; box-shadow: none; }
    .sf-auth-main { padding: 8px 0; }
}
@media (prefers-reduced-motion: reduce) {
    .sf-auth-spinner { animation: none; }
    .sf-auth-meter-bar span { transition: none; }
}
