/* =========================================================
   Bizmantra - Sign in system styles   (assets/css/header-auth.css?v=1)
   A) header: Sign in button + signed-in user menu
   B) sign in / register page
        desktop : brand panel + form sitting directly on the page background (no floating card)
        mobile  : app style - soft header area + rounded bottom sheet with big touch targets
   Uses the colour tokens from header.css?v=1 (light + dark).
   ========================================================= */

/* =========================================================
   A) HEADER: Sign in button + user menu
   ========================================================= */
.bm-signin .bm-i { width: 16px; height: 16px; }
.bm-signin:hover .bm-i { transform: none; }

.bm-user { position: relative; }
.bm-user__btn { display: block; width: 40px; height: 40px; padding: 0; overflow: hidden; border: 2px solid var(--bm-green); border-radius: 50%; background: var(--bm-bg); transition: box-shadow .2s; }
.bm-user__btn:hover, .bm-user.is-open .bm-user__btn { box-shadow: 0 0 0 3px rgba(154,205,79,.35); }
.bm-av { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.bm-av--txt { display: grid; place-items: center; background: var(--bm-btn); color: #fff; font-size: 14px; font-weight: 700; letter-spacing: .02em; }

.bm-user__menu {
    position: absolute; right: 0; top: calc(100% + 14px); z-index: 1400;
    width: 276px; max-width: calc(100vw - 28px); padding: 8px;
    background: var(--bm-bg); color: var(--bm-text);
    border: 1px solid var(--bm-line); border-bottom: 3px solid var(--bm-green); border-radius: 10px;
    box-shadow: 0 24px 44px -18px rgba(31,53,115,.4);
    visibility: hidden; opacity: 0; transform: translateY(-6px);
    transition: opacity .18s, transform .18s, visibility .18s;
}
.bm-user.is-open .bm-user__menu { visibility: visible; opacity: 1; transform: none; }
.bm-user__head { display: flex; align-items: center; gap: 12px; padding: 10px 10px 14px; margin-bottom: 6px; border-bottom: 1px solid var(--bm-line); }
.bm-user__head .bm-av { flex: none; width: 46px; height: 46px; }
.bm-user__head > div { min-width: 0; }
.bm-user__name { font-size: 14.5px; font-weight: 700; line-height: 1.3; color: var(--bm-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-user__mail { margin-top: 1px; font-size: 12.5px; color: var(--bm-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bm-user__role { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 4px; background: var(--bm-mist); color: var(--bm-blue-d); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.bm-user__link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px; border-radius: 6px; font-size: 14px; font-weight: 500; color: var(--bm-text); text-align: left; transition: background .15s, color .15s; }
.bm-user__link .bm-i { color: var(--bm-blue-d); }
.bm-user__link:hover { background: var(--bm-mist); color: var(--bm-blue-d); }
.bm-user__out { margin: 6px 0 0; padding-top: 6px; border-top: 1px solid var(--bm-line); }

@media (max-width: 1023px) {
    .bm-signin { padding: 8px 14px; font-size: 13px; }
    .bm-user { position: static; }
    .bm-user__menu { right: 14px; top: calc(100% + 1px); }
}
@media (max-width: 599px) {
    .bm-signin { padding: 7px 12px; }
    .bm-signin .bm-i { display: none; }
    .bm-user__btn { width: 36px; height: 36px; }
    .bm-user__menu { right: 10px; }
}
@media (max-width: 359px) { .bm-signin { padding: 7px 10px; font-size: 12.5px; } }


/* =========================================================
   B) SIGN IN / REGISTER PAGE
   ========================================================= */

/* While the theme switches, every element changes colour at the same instant (no jerk) */
html.bm-notrans *, html.bm-notrans *::before, html.bm-notrans *::after { transition: none !important; }

.bm-auth {
    --au-r: 12px;            /* roundness of inputs / buttons */
    --au-hero-h: calc(100vh - var(--bm-top-h, 34px) - var(--bm-main-h, 64px));
    display: block; padding: 0; background: var(--bm-bg);
}
@supports (height: 100dvh) {
    .bm-auth { --au-hero-h: calc(100dvh - var(--bm-top-h, 34px) - var(--bm-main-h, 64px)); }
}
.bm-auth [hidden] { display: none !important; }

/* ---------- shell: 2 columns ---------- */
.bm-auth__shell {
    width: 100%; max-width: none; height: var(--au-hero-h); min-height: 0;
    display: grid; grid-template-columns: minmax(300px, 34%) minmax(0, 1fr);
    background: var(--bm-bg); color: var(--bm-text); font-family: var(--bm-font);
    border: 0; border-radius: 0; box-shadow: none; overflow: hidden;
}

/* ---------- brand side (desktop only) ---------- */
.bm-auth__aside {
    --as-bg: linear-gradient(155deg, #EEF3FD 0%, #DCE7FB 58%, #CBDDF8 100%);
    --as-fg: #1F3573; --as-fg2: #3A4A72; --as-tag: #5A8A12;
    --as-pill: rgba(31,53,115,.08); --as-line: rgba(31,53,115,.16);
    --as-c1: rgba(90,130,232,.16); --as-c2: rgba(154,205,79,.30); --as-help: #5A8A12;
    position: relative; display: flex; flex-direction: column; gap: 28px; padding: 48px 40px; overflow: hidden;
    color: var(--as-fg); background: var(--as-bg);
}
:root[data-theme="dark"] .bm-auth__aside {
    --as-bg: linear-gradient(155deg, #0A1126 0%, #16224A 58%, #1F3573 100%);
    --as-fg: #FFFFFF; --as-fg2: rgba(255,255,255,.88); --as-tag: #CFE9A2;
    --as-pill: rgba(255,255,255,.12); --as-line: rgba(255,255,255,.2);
    --as-c1: rgba(90,130,232,.18); --as-c2: rgba(154,205,79,.18); --as-help: #9ACD4F;
}
.bm-auth__aside::before, .bm-auth__aside::after { content: ""; position: absolute; border-radius: 50%; pointer-events: none; }
.bm-auth__aside::before { width: 300px; height: 300px; right: -120px; top: -100px; background: var(--as-c1); }
.bm-auth__aside::after  { width: 250px; height: 250px; left: -100px; bottom: -90px; background: var(--as-c2); }
.bm-auth__aside > * { position: relative; z-index: 1; }
.bm-auth__pill { align-self: flex-start; margin-bottom: auto; display: inline-flex; align-items: center; gap: 8px; padding: 8px 15px; border-radius: 999px; background: var(--as-pill); font-size: 12px; font-weight: 600; letter-spacing: .02em; }
.bm-auth__brand { margin: 0; font-family: var(--bm-brand-font); font-size: 34px; font-weight: 800; letter-spacing: -.02em; line-height: 1.1; color: var(--as-fg); }
.bm-auth__tagline { margin: 10px 0 0; font-size: 11.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--as-tag); }
.bm-auth__perks { display: grid; gap: 16px; margin: 0; padding: 0; list-style: none; }
.bm-auth__perks li { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.5; color: var(--as-fg2); }
.bm-auth__perks .bm-i { flex: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%; background: #9ACD4F; color: #1F3573; stroke-width: 3; }
.bm-auth__help { display: flex; align-items: center; gap: 8px; margin: auto 0 0; padding-top: 18px; border-top: 1px solid var(--as-line); font-size: 13px; color: var(--as-fg2); }
.bm-auth__help .bm-i { color: var(--as-help); }

/* ---------- form side ---------- */
.bm-auth__main { position: relative; min-width: 0; min-height: 0; overflow: hidden; background: var(--bm-bg); }

.bm-auth__scroll { position: absolute; inset: 0; z-index: 1; overflow-y: auto; display: flex; padding: 32px 40px; }
.bm-auth__mhero { display: none; }      /* mobile only */

/* ---------- DESKTOP background decoration: soft circles + dotted rings + a small dot grid (CSS only) ---------- */
@media (min-width: 861px) {
    .bm-auth__main {
        --dc-b: rgba(90,130,232,.07);  --dc-bl: rgba(90,130,232,.38);
        --dc-g: rgba(154,205,79,.13);  --dc-gl: rgba(134,184,63,.5);
        --dc-dot: rgba(31,53,115,.2);
    }
    :root[data-theme="dark"] .bm-auth__main {
        --dc-b: rgba(90,130,232,.12);  --dc-bl: rgba(143,176,255,.35);
        --dc-g: rgba(154,205,79,.09);  --dc-gl: rgba(154,205,79,.42);
        --dc-dot: rgba(169,189,245,.26);
    }
    /* top-right: soft blue circle with a dotted ring around it */
    .bm-auth__main::before {
        content: ""; position: absolute; z-index: 0; top: -170px; right: -190px; width: 400px; height: 400px;
        border-radius: 50%; background: var(--dc-b); outline: 2px dotted var(--dc-bl); outline-offset: 26px; pointer-events: none;
    }
    /* bottom-left: soft green circle with a dotted ring around it */
    .bm-auth__main::after {
        content: ""; position: absolute; z-index: 0; bottom: -190px; left: -190px; width: 380px; height: 380px;
        border-radius: 50%; background: var(--dc-g); outline: 2px dotted var(--dc-gl); outline-offset: 26px; pointer-events: none;
    }
    /* top-left: small dot grid */
    .bm-auth__scroll::before {
        content: ""; position: absolute; z-index: -1; top: 30px; left: 36px; width: 126px; height: 90px; pointer-events: none;
        background-image: radial-gradient(var(--dc-dot) 1.6px, transparent 1.9px); background-size: 18px 18px;
    }
}
@media (min-width: 861px) and (max-width: 1180px) {
    .bm-auth__main::before { width: 300px; height: 300px; top: -140px; right: -170px; }
    .bm-auth__main::after  { width: 280px; height: 280px; bottom: -150px; left: -170px; }
    .bm-auth__scroll::before { display: none; }
}

/* ---------- DESKTOP: the form sits straight on the background (no floating card) ---------- */
.bm-auth__view {
    position: relative; flex: none; width: 100%; max-width: 440px; margin: auto; padding: 8px 10px; overflow: hidden;
    background: transparent; border: 0; border-radius: 0; box-shadow: none;
    transition: height .45s cubic-bezier(.65, 0, .35, 1);
}
.bm-auth--init .bm-auth__view { transition: none; }

/* panels sit on top of each other; switching = smooth cross-fade */
.bm-auth__track { display: grid; width: 100%; height: 100%; }
.bm-auth__panel {
    grid-area: 1 / 1; min-width: 0; display: flex; flex-direction: column;
    opacity: 0; visibility: hidden; pointer-events: none; transform: translateY(14px) scale(.985);
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
}
.bm-auth__panel[aria-hidden="false"] {
    opacity: 1; visibility: visible; pointer-events: auto; transform: none;
    transition: opacity .42s cubic-bezier(.22, 1, .36, 1) .12s, transform .5s cubic-bezier(.22, 1, .36, 1) .12s, visibility 0s;
}
.bm-auth--init .bm-auth__panel, .bm-auth--init .bm-auth__panel[aria-hidden="false"] { transition: none; }

.bm-auth__head { margin-bottom: 22px; }
.bm-auth__head h1, .bm-auth__title { margin: 0 0 6px; font-family: var(--bm-brand-font); font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--bm-head); }
.bm-auth__head p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--bm-muted); }

/* ---------- tabs ---------- */
.bm-tabs { display: grid; grid-template-columns: 1fr 1fr; margin-bottom: 24px; border-bottom: 1px solid var(--bm-line); }
.bm-tabs button {
    margin-bottom: -1px; padding: 12px 0; border: 0; border-bottom: 2px solid transparent; background: none;
    color: var(--bm-muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: color .2s, border-color .2s, background-color .2s, box-shadow .2s;
}
.bm-tabs button:hover { color: var(--bm-head); }
.bm-tabs button.is-on { color: var(--bm-head); border-bottom-color: var(--bm-green); }
.bm-tabs button:focus-visible { outline: 2px solid var(--bm-green); outline-offset: -2px; }

/* ---------- CONTINUE WITH GOOGLE (our own button) ---------- */
.bm-gbtn {
    position: relative; display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; height: 52px; padding: 0 18px;
    border: 1.5px solid var(--bm-line); border-radius: var(--au-r); background: var(--bm-bg); color: var(--bm-head);
    font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: .005em; white-space: nowrap; cursor: pointer;
    box-shadow: 0 1px 2px rgba(31,53,115,.06);
    transition: border-color .2s, box-shadow .2s, transform .15s, opacity .2s;
}
.bm-gbtn svg { flex: none; width: 20px; height: 20px; }
.bm-gbtn:hover { border-color: var(--bm-blue); box-shadow: 0 12px 24px -14px rgba(31,53,115,.55); transform: translateY(-1px); }
.bm-gbtn:active { transform: none; box-shadow: 0 1px 2px rgba(31,53,115,.06); }
.bm-gbtn:focus-visible { outline: 2px solid var(--bm-green); outline-offset: 2px; }
.bm-gbtn.is-loading { pointer-events: none; opacity: .75; }
.bm-gbtn.is-loading svg { display: none; }
.bm-gbtn.is-loading::before {
    content: ""; flex: none; width: 18px; height: 18px; border: 2.5px solid var(--bm-line); border-top-color: var(--bm-blue-d);
    border-radius: 50%; animation: bm-au-spin .7s linear infinite;
}

.bm-auth__or { display: flex; align-items: center; gap: 12px; margin: 20px 0; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--bm-muted); }
.bm-auth__or::before, .bm-auth__or::after { content: ""; flex: 1; height: 1px; background: var(--bm-line); }

/* ---------- fields: label floats onto the border ---------- */
.bm-auth__form { display: grid; gap: 18px; margin-bottom: 20px; }
.bm-field { display: grid; gap: 8px; }
.bm-field__box {
    position: relative; display: flex; align-items: center;
    border: 1.5px solid var(--bm-line); border-radius: var(--au-r); background: var(--bm-bg);
    transition: border-color .2s, box-shadow .2s;
}
.bm-field__box:hover { border-color: var(--bm-muted); }
.bm-field__box:focus-within { border-color: var(--bm-blue-d); box-shadow: 0 0 0 4px rgba(90,130,232,.14); }
.bm-field__box > .bm-i { flex: none; width: 18px; height: 18px; margin-left: 14px; color: var(--bm-muted); transition: color .2s; }
.bm-field__box:focus-within > .bm-i { color: var(--bm-blue-d); }
.bm-field__box input {
    flex: 1; min-width: 0; padding: 17px 12px; border: 0; outline: 0; box-shadow: none; background: transparent;
    color: var(--bm-text); font: inherit; font-size: 16px;
}
.bm-field__box input::placeholder { color: var(--bm-muted); opacity: 0; transition: opacity .2s; }
.bm-field__box input:focus::placeholder { opacity: .55; }
.bm-field__box input:-webkit-autofill { -webkit-box-shadow: 0 0 0 100px var(--bm-bg) inset; -webkit-text-fill-color: var(--bm-text); }

.bm-field__lbl {
    position: absolute; left: 38px; top: 50%; transform: translateY(-50%);
    padding: 0 6px; background: transparent; color: var(--bm-muted);
    font-size: 15px; font-weight: 500; line-height: 1; white-space: nowrap; pointer-events: none;
    transition: top .18s ease, left .18s ease, font-size .18s ease, color .18s ease;
}
.bm-field__box:focus-within .bm-field__lbl,
.bm-field__box input:not(:placeholder-shown) ~ .bm-field__lbl,
.bm-field__box input:-webkit-autofill ~ .bm-field__lbl { top: 0; left: 12px; font-size: 12px; font-weight: 600; background: var(--bm-bg); }
.bm-field__box:focus-within .bm-field__lbl { color: var(--bm-blue-d); }

.bm-pw { display: grid; place-items: center; flex: none; width: 46px; height: 46px; border: 0; background: none; color: var(--bm-muted); cursor: pointer; }
.bm-pw:hover { color: var(--bm-blue-d); }
.bm-pw .bm-i { width: 18px; height: 18px; margin: 0; }
.bm-pw .bm-i + .bm-i { display: none; }
.bm-pw[aria-pressed="true"] .bm-i:first-child { display: none; }
.bm-pw[aria-pressed="true"] .bm-i + .bm-i { display: block; }

.bm-meter { display: grid; grid-template-columns: repeat(4, 1fr); gap: 5px; margin-top: 2px; }
.bm-meter i { height: 4px; border-radius: 4px; background: var(--bm-line); transition: background .25s; }
.bm-meter[data-score="1"] i:nth-child(-n+1) { background: #E5534B; }
.bm-meter[data-score="2"] i:nth-child(-n+2) { background: #E8A33D; }
.bm-meter[data-score="3"] i:nth-child(-n+3) { background: #9ACD4F; }
.bm-meter[data-score="4"] i:nth-child(-n+4) { background: #3FA34D; }
.bm-meter__txt { min-height: 1em; font-size: 12px; color: var(--bm-muted); }
.bm-meter__txt:empty { display: none; }

/* ---------- primary button ---------- */
.bm-auth__btn {
    position: relative; display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 11px 18px;
    border: 0; border-radius: var(--au-r); background: var(--bm-btn); color: #fff; font: inherit; font-size: 15.5px; font-weight: 700; letter-spacing: .01em; cursor: pointer;
    box-shadow: 0 16px 28px -16px rgba(31,53,115,.75);
    transition: background-color .2s, transform .15s, box-shadow .2s;
}
.bm-auth__btn:hover { background: var(--bm-btn-h); transform: translateY(-1px); box-shadow: 0 20px 32px -16px rgba(31,53,115,.8); }
.bm-auth__btn:active { transform: none; }
.bm-auth__btn:focus-visible, .bm-auth__link:focus-visible, .bm-pw:focus-visible { outline: 2px solid var(--bm-green); outline-offset: 2px; }
.bm-auth__btn:disabled { cursor: progress; }
.bm-auth__btn.is-loading { color: transparent; pointer-events: none; }
.bm-auth__btn.is-loading::after {
    content: ""; position: absolute; width: 20px; height: 20px; border: 2.5px solid rgba(255,255,255,.4); border-top-color: #fff;
    border-radius: 50%; animation: bm-au-spin .7s linear infinite;
}
@keyframes bm-au-spin { to { transform: rotate(360deg); } }

.bm-auth__row { display: flex; justify-content: flex-end; }
.bm-auth__row--split { justify-content: space-between; gap: 12px; }
.bm-auth__link { padding: 4px 0; border: 0; background: none; color: var(--bm-blue-d); font: inherit; font-size: 13.5px; font-weight: 600; text-align: center; cursor: pointer; }
.bm-auth__link:hover:not(:disabled) { text-decoration: underline; }
.bm-auth__link:disabled { color: var(--bm-muted); cursor: default; }
.bm-auth__step { display: grid; gap: 14px; }
.bm-auth__fields { display: grid; gap: 16px; }

/* ---------- messages ---------- */
.bm-auth__msg { margin: -6px 0 20px; padding: 11px 14px; border-radius: var(--au-r); border: 1px solid transparent; font-size: 13.5px; line-height: 1.45; }
.bm-auth__msg:empty { display: none; }
.bm-auth__msg.is-err { background: #FDECEA; border-color: #F5C2BD; color: #A6291C; }
.bm-auth__msg.is-ok  { background: #EAF6EC; border-color: #BFE3C6; color: #1F6B31; }
:root[data-theme="dark"] .bm-auth__msg.is-err { background: #3A1B19; border-color: #6B2D29; color: #FFB4AB; }
:root[data-theme="dark"] .bm-auth__msg.is-ok  { background: #1B3320; border-color: #2E5C38; color: #A9E3B4; }

/* ---------- "Back to sign in" row ---------- */
.bm-back { margin-bottom: 24px; border-bottom: 1px solid var(--bm-line); }
.bm-back button { display: inline-flex; align-items: center; gap: 8px; padding: 12px 0; border: 0; background: none; color: var(--bm-muted); font: inherit; font-size: 15px; font-weight: 700; cursor: pointer; transition: color .2s; }
.bm-back button:hover { color: var(--bm-head); }
.bm-back button:focus-visible { outline: 2px solid var(--bm-green); outline-offset: 2px; }

/* ---------- OTP screen (6 boxes) ---------- */
.bm-auth__sent { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; border-radius: var(--au-r); background: var(--bm-mist); border: 1px solid var(--bm-line); }
.bm-auth__sent .bm-i { flex: none; width: 22px; height: 22px; margin-top: 1px; color: var(--bm-blue-d); }
.bm-auth__sent p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--bm-text); overflow-wrap: anywhere; }
.bm-auth__sent strong { color: var(--bm-head); }
.bm-otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.bm-otp input {
    width: 100%; min-width: 0; height: 54px; padding: 0; text-align: center;
    border: 1.5px solid var(--bm-line); border-radius: var(--au-r); background: var(--bm-bg); color: var(--bm-head);
    font: inherit; font-size: 22px; font-weight: 800; caret-color: var(--bm-blue-d);
    transition: border-color .2s, box-shadow .2s;
}
.bm-otp input:hover { border-color: var(--bm-blue); }
.bm-otp input:focus { outline: none; border-color: var(--bm-blue-d); box-shadow: 0 0 0 4px rgba(90,130,232,.14); }

/* ---------- short laptop screens ---------- */
@media (min-width: 861px) and (max-height: 800px) {
    .bm-auth__aside { padding: 32px 36px; gap: 20px; }
    .bm-auth__brand { font-size: 28px; }
    .bm-auth__perks { gap: 12px; }
    .bm-auth__perks li { font-size: 13.5px; }
    .bm-auth__scroll { padding: 20px 32px; }
    .bm-tabs, .bm-back { margin-bottom: 14px; }
    .bm-tabs button, .bm-back button { padding: 9px 0; }
    .bm-auth__head { margin-bottom: 14px; }
    .bm-auth__head h1, .bm-auth__title { font-size: 24px; }
    .bm-gbtn { height: 46px; }
    .bm-auth__or { margin: 12px 0; }
    .bm-auth__form { gap: 14px; margin-bottom: 12px; }
    .bm-field__box input { padding: 13px 12px; }
    .bm-pw { height: 42px; }
    .bm-auth__btn { min-height: 46px; }
    .bm-otp input { height: 48px; }
}
@media (min-width: 861px) and (max-height: 640px) { .bm-auth__perks { display: none; } }

/* =========================================================
   TABLET + MOBILE: app style
   soft header area (badge) and a rounded bottom sheet that holds the form
   ========================================================= */
@media (max-width: 860px) {
    .bm-auth { --au-r: 14px; }
    .bm-auth__shell { display: block; height: auto; min-height: var(--au-hero-h); overflow: visible; background: transparent; }
    .bm-auth__aside { display: none; }                       /* no BIZMANTRA text above the form */

    .bm-auth__main {
        display: flex; flex-direction: column; min-height: var(--au-hero-h);
        background: linear-gradient(165deg, #EEF3FD 0%, #DCE7FB 58%, #CBDDF8 100%);
    }
    :root[data-theme="dark"] .bm-auth__main { background: linear-gradient(165deg, #0A1126 0%, #16224A 58%, #1F3573 100%); }

    .bm-auth__scroll { position: relative; inset: auto; flex: 1 1 auto; display: flex; flex-direction: column; overflow: visible; padding: 0; }

    /* header area: one simple illustration */
    .bm-auth__mhero {
        --mi-b: #5A82E8; --mi-g: #9ACD4F; --mi-soft: rgba(90,130,232,.14); --mi-card: #FFFFFF; --mi-line: #A9BDEB;
        display: flex; justify-content: center; padding: 16px 20px 40px;
    }
    :root[data-theme="dark"] .bm-auth__mhero { --mi-soft: rgba(90,130,232,.22); --mi-card: #17224B; --mi-line: #4A5E98; }
    .bm-mill { display: block; width: min(220px, 62vw); height: auto; }
    .mi-ring   { fill: none; stroke: var(--mi-line); stroke-width: 3; stroke-linecap: round; stroke-dasharray: .1 7.5; }
    .mi-soft   { fill: var(--mi-soft); }
    .mi-shield { fill: var(--mi-card); stroke: var(--mi-b); stroke-width: 3; stroke-linejoin: round; }
    .mi-check  { fill: none; stroke: var(--mi-g); stroke-width: 7; stroke-linecap: round; stroke-linejoin: round; }
    .mi-plus   { fill: none; stroke: var(--mi-b); stroke-width: 2.5; stroke-linecap: round; opacity: .75; }
    .mi-dot    { fill: var(--mi-b); opacity: .6; }
    .mi-dot--g { fill: var(--mi-g); opacity: .9; }

    /* the sheet */
    .bm-auth__view {
        flex: 1 1 auto; align-self: center; width: 100%; max-width: 560px; margin: -28px 0 0;
        padding: 22px 20px calc(28px + env(safe-area-inset-bottom, 0px));
        background: var(--bm-bg); border-radius: 28px 28px 0 0; box-shadow: none;
    }

    /* segmented control instead of underline tabs */
    .bm-tabs { gap: 4px; padding: 4px; margin-bottom: 22px; border: 0; border-radius: 14px; background: var(--bm-mist); }
    .bm-tabs button { margin: 0; padding: 12px 0; border: 0; border-radius: 11px; font-size: 15px; }
    .bm-tabs button.is-on { background: var(--bm-bg); color: var(--bm-head); box-shadow: 0 2px 8px -2px rgba(31,53,115,.3); }
    .bm-tabs button:focus-visible { outline-offset: 2px; }

    .bm-back { margin-bottom: 10px; border-bottom: 0; }
    .bm-back button { padding: 8px 0; }

    .bm-auth__head { margin-bottom: 20px; }
    .bm-auth__head h1, .bm-auth__title { font-size: 28px; }
    .bm-auth__head p { font-size: 14.5px; }

    /* big touch targets, flat (no shadows) */
    .bm-gbtn, .bm-auth__btn, .bm-gbtn:hover, .bm-auth__btn:hover { box-shadow: none; transform: none; }
    .bm-gbtn { height: 56px; }
    .bm-auth__or { margin: 18px 0; }
    .bm-auth__form { gap: 18px; margin-bottom: 16px; }
    .bm-field__box input { padding: 19px 12px; }
    .bm-pw { width: 52px; height: 56px; }
    .bm-auth__btn { width: 100%; min-height: 56px; font-size: 16px; }
    .bm-otp input { height: 58px; }
    .bm-auth__link { padding: 10px 0; font-size: 14px; }
}
@media (max-width: 479px) {
    .bm-auth__mhero { padding: 12px 16px 38px; }
    .bm-auth__view { padding: 20px 16px calc(26px + env(safe-area-inset-bottom, 0px)); }
    .bm-gbtn { font-size: 15px; }
}
@media (max-width: 379px) { .bm-otp { gap: 5px; } .bm-otp input { height: 50px; font-size: 20px; } }

@media (prefers-reduced-motion: reduce) {
    .bm-auth__view, .bm-auth__panel, .bm-auth__btn, .bm-field__box, .bm-gbtn, .bm-tabs button { transition-duration: .01ms !important; transition-delay: 0s !important; }
    .bm-auth__btn.is-loading::after, .bm-gbtn.is-loading::before { animation-duration: 2s; }
}