/* =============================================================================
   BookOn authentication pages - login, forgot password, reset password, account blocked.

   Shell (every auth page):
     <body class="bo-auth-page">                         (class optional - only tints the body)
       <main class="bo-auth">
         <div class="bo-auth-art" aria-hidden="true"></div>   (CSS paints the illustration)
         <div class="bo-auth-panel">
           <div class="bo-auth-card">
             <div class="bo-auth-head"><img ...newlogo1.png alt="BookOn"><h1>Title</h1></div>
             <div class="bo-auth-body">
               .bo-alert(.bo-alert-error | -success | -info)
               .bo-field > label + .bo-input > .bo-input-icon + input.form-control (+ .bo-input-action)
               .bo-field > .bo-label-row > label + a.bo-link
               .bo-login-grid > ... .bo-field-password ... a.bo-link.bo-forgot-link (login: the
                 link is last in the markup, drawn beside the Password label - see below)
               .bo-check > input[type=checkbox] + label
               button.bo-btn (+ .bo-btn-ghost, .bo-btn-row)
               .bo-auth-foot
   Outline icons: <i class="bo-ico bo-ico-user|lock|eye|eye-slash|arrow|mail" aria-hidden="true">
   (drawn by this file, in the element's text colour). Load after app.min.css / style.css /
   components.css so these rules win.

   THE APPROVED DESIGN. The owner's mockup (8 Oct 2026, 1600 x 883 px) is reproduced to scale:
   at a 1600 x 883 window this page lays out at the mockup's own pixel measurements, and other
   windows scale them. Every size below is written in MOCKUP PIXELS times a unit:
     --bo-u   the card's unit   (CSS px per mockup px; 0.72 .. 1.25)
     --bo-a   the illustration's unit
     --bo-a0  the illustration's unit when it fills the window height (883 mockup px)
     --bo-d   the background curves' unit
   Desktop (>= 992 px): the illustration is the left 680 x 883 px of the mockup itself
   (img/auth/bookon-login-art.jpg, cut pixel-for-pixel, no redrawing), pinned to the window's
   bottom-left and as tall as the window; the card takes the rest of the width at the mockup's
   proportions (665 px card, 29 px either side of it, 197 px right margin). When the window is
   too narrow for both at full height (e.g. 1024 px), the card keeps a readable minimum size and
   the illustration shrinks, still anchored bottom-left, its top fading into the background.
   Tablet and phone (< 992 px): the card is centred at the top, the illustration fills the
   space under it (bottom-left), and it is hidden when the screen is too short to show it.
   ============================================================================= */

.bo-auth {
    --bo-blue: #0050c2;
    --bo-blue-hover: #0047ad;
    --bo-blue-active: #003d96;
    --bo-link: #1660d8;
    --bo-navy: #0b1b3c;
    --bo-text: #2c3a55;
    --bo-muted: #66758e;
    --bo-icon: #0d1c3a;
    --bo-icon-muted: #75819b;
    --bo-placeholder: #818ea3;
    --bo-border: #d0dae6;
    --bo-border-hover: #b3c3d8;
    --bo-focus-border: #5c8fd6;
    --bo-focus: rgba(79, 134, 212, 0.12);
    --bo-card-border: #1d58bb;
    --bo-divider: #e7eaf1;
    /* fixed fallbacks; the fluid values are set in the media queries below */
    --bo-u: 0.8px;
    --bo-a0: 0.8px;
    --bo-a: 0.8px;
    --bo-d: 0.8px;
    position: relative;
    display: flex;
    align-items: stretch;
    min-height: 100vh;
    overflow: hidden;
    isolation: isolate;
    /* The mockup's background, centres and radii in mockup px: two soft curves in the
       bottom-right corner on a very pale blue. The curves in the top-left corner and the haze
       behind the illustration belong to the illustration (.bo-auth-art::after). */
    background:
        radial-gradient(circle calc(422 * var(--bo-d)) at calc(100% + 228 * var(--bo-d)) calc(100% + 171 * var(--bo-d)),
            #d0e8fd 99%, rgba(208, 232, 253, 0) 100%),
        radial-gradient(circle calc(736 * var(--bo-d)) at calc(100% + 410 * var(--bo-d)) calc(100% + 235 * var(--bo-d)),
            #e6f2fd 98%, rgba(230, 242, 253, 0) 100%),
        linear-gradient(90deg, #f0f7fd 0%, #f1f8fe 45%, #f5fafe 85%);
    font-family: "Nunito", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--bo-text);
}

body.bo-auth-page {
    margin: 0;
    background: #f2f8fe;
}

/* ---- the fluid units -------------------------------------------------------- */
@supports (width: min(1px, 2px)) {
    @media (min-width: 992px) {
        .bo-auth {
            /* The illustration as tall as the window (883 mockup px). */
            --bo-a0: calc(100vh / 883);
            /* The card at the same scale, unless the width left beside the full-height
               illustration (920 mockup px: 29 + 665 card + 29 + 197) is narrower; never below
               0.72 (labels 15 px) nor above 1.25 (the mockup filling a 2000 px screen). */
            --bo-u: clamp(0.72px, min(var(--bo-a0), calc((100vw - 680 * var(--bo-a0)) / 920)), 1.25px);
            /* The illustration shrinks only when the card at its minimum would not fit beside it. */
            --bo-a: min(var(--bo-a0), calc((100vw - 920 * var(--bo-u)) / 680));
            --bo-d: var(--bo-a0);
        }
    }

    @media (max-width: 991.98px) {
        .bo-auth {
            --bo-d: calc(100vw / 1100);
        }
    }
}

@media (max-width: 991.98px) {
    .bo-auth {
        --bo-u: 0.75px;
    }
}

@media (max-width: 359.98px) {
    .bo-auth {
        --bo-u: 0.7px;
    }
}

/* ---- the illustration -------------------------------------------------------- */
.bo-auth-art {
    position: relative;
    flex: 0 0 auto;
    width: calc(680 * var(--bo-a));
    min-width: 0;
}

/* The illustration is painted by CSS, so an empty column is enough; anything put inside it is not shown. */
.bo-auth-art > * {
    display: none !important;
}

.bo-auth-art::before {
    content: "";
    position: fixed;
    left: 0;
    bottom: 0;
    width: calc(680 * var(--bo-a));
    height: calc(883 * var(--bo-a));
    background: url("../img/auth/bookon-login-art.jpg") 0 0 / 100% 100% no-repeat;
    pointer-events: none;
    /* Fades, intersected:
         right edge - the last 25 mockup px melt into the background (the cut is 680 px wide, the
                      laptop ends at 652);
         top edge   - only when the illustration is shorter than the window: its top 30 px blend
                      into the corner curves that ::after continues above it. At full height the
                      fade is 0 and the top is untouched. */
    --bo-top-fade: min(calc(30 * var(--bo-a)), calc((var(--bo-a0) - var(--bo-a)) * 100000));
    -webkit-mask-image:
        linear-gradient(to right, #000 calc(100% - 25 * var(--bo-a)), transparent),
        linear-gradient(to bottom, transparent 0, #000 var(--bo-top-fade));
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(to right, #000 calc(100% - 25 * var(--bo-a)), transparent),
        linear-gradient(to bottom, transparent 0, #000 var(--bo-top-fade));
    mask-composite: intersect;
}

/* Under the illustration, at its scale and anchored to it: the two curves of the mockup's
   top-left corner (the same circles the picture carries, continued above it when it is shorter
   than the window), the soft blue haze it sits in, and a tint along the bottom. At full height
   this is exactly the mockup's corner; the picture covers most of it. */
.bo-auth-art::after {
    content: "";
    position: fixed;
    z-index: -1;
    top: 0;
    bottom: 0;
    left: 0;
    width: calc(1200 * var(--bo-a));
    pointer-events: none;
    background:
        radial-gradient(circle calc(530 * var(--bo-a)) at calc(-119 * var(--bo-a)) calc(100% - 1200 * var(--bo-a)),
            #cbe5fc 64%, #bcdcfc 85%, #abd1f7 99.6%, rgba(171, 209, 247, 0) 100%),
        radial-gradient(circle calc(681 * var(--bo-a)) at calc(-80 * var(--bo-a)) calc(100% - 1323 * var(--bo-a)),
            #dcedfd 80%, #e2f0fd 99.6%, rgba(226, 240, 253, 0) 100%),
        radial-gradient(ellipse calc(520 * var(--bo-a)) calc(330 * var(--bo-a)) at calc(620 * var(--bo-a)) calc(100% - 424 * var(--bo-a)),
            rgba(213, 231, 251, 0.9), rgba(213, 231, 251, 0) 100%),
        radial-gradient(ellipse calc(520 * var(--bo-a)) calc(260 * var(--bo-a)) at calc(640 * var(--bo-a)) 100%,
            rgba(226, 236, 252, 0.95), rgba(226, 236, 252, 0) 100%);
}

/* ---- right: the card ------------------------------------------------------- */
.bo-auth-panel {
    position: relative;
    display: flex;
    flex: 1 1 auto;
    align-items: center;
    justify-content: center;
    min-width: 0;
    /* The mockup's card sits 197 px from the right edge and 13 px above the middle. */
    padding: 24px calc(197 * var(--bo-u)) calc(24px + 27 * var(--bo-u)) 0;
}

/* A page without the illustration (e.g. a message-only page): centre the card. */
.bo-auth-panel:only-child {
    padding-right: 24px;
    padding-left: 24px;
}

.bo-auth-card {
    box-sizing: border-box;
    width: calc(665 * var(--bo-u));
    max-width: 100%;
    background: #ffffff;
    border: 2px solid var(--bo-card-border);
    border-width: max(1.5px, calc(2.5 * var(--bo-u)));
    border-radius: calc(19 * var(--bo-u));
    box-shadow: 0 calc(3 * var(--bo-u)) calc(16 * var(--bo-u)) calc(2 * var(--bo-u)) rgba(33, 98, 196, 0.16),
        0 calc(12 * var(--bo-u)) calc(52 * var(--bo-u)) calc(8 * var(--bo-u)) rgba(33, 98, 196, 0.15);
}

.bo-auth-head {
    display: flex;
    align-items: center;
    gap: calc(29 * var(--bo-u));
    padding: calc(25 * var(--bo-u)) calc(36 * var(--bo-u)) calc(12 * var(--bo-u));
    border-bottom: max(1px, calc(2 * var(--bo-u))) solid var(--bo-divider);
}

.bo-auth-head img {
    display: block;
    flex: 0 0 auto;
    width: calc(65 * var(--bo-u));
    height: calc(65 * var(--bo-u));
}

.bo-auth .bo-auth-head h1 {
    margin: 0;
    font-family: inherit;
    font-size: calc(47 * var(--bo-u));
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: 0.02em;
    color: var(--bo-navy);
}

.bo-auth-body {
    padding: calc(31.5 * var(--bo-u)) calc(36 * var(--bo-u)) calc(43 * var(--bo-u));
}

.bo-auth .bo-auth-body p {
    margin: 0 0 calc(22 * var(--bo-u));
    font-size: max(13px, calc(18 * var(--bo-u)));
    line-height: 1.5;
    color: var(--bo-text);
}

/* ---- fields ---------------------------------------------------------------- */
.bo-field {
    margin-bottom: calc(40.5 * var(--bo-u));
}

.bo-auth .bo-field label {
    display: block;
    margin: 0 0 calc(11.5 * var(--bo-u));
    font-size: calc(21 * var(--bo-u));
    font-weight: 800;
    line-height: calc(25 * var(--bo-u));
    letter-spacing: 0.035em;
    color: var(--bo-navy);
}

.bo-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 4px 12px;
    margin-bottom: calc(13 * var(--bo-u));
}

.bo-auth .bo-label-row label {
    margin-bottom: 0;
}

/* Login: "Forgot Password?" is the LAST element of .bo-login-grid in the markup, so keyboard
   users reach it after the Login button (User Name -> Password -> show/hide -> Remember Me ->
   Login -> Forgot Password?). Grid placement draws it at the right of the Password label -
   it moves where the link is painted, never the tab order. Without grid support it simply
   sits under the Login button, right-aligned. */
.bo-auth .bo-login-grid > .bo-forgot-link {
    display: block;
    margin-top: 14px;
    text-align: right;
}

@supports (display: grid) {
    .bo-auth .bo-login-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .bo-auth .bo-login-grid > * {
        grid-column: 1 / -1;
    }

    /* Row 1 is User Name; the Password field and the link share row 2. */
    .bo-auth .bo-login-grid > .bo-field-password {
        grid-row: 2;
    }

    .bo-auth .bo-login-grid > .bo-forgot-link {
        position: relative;
        z-index: 1;
        grid-column: 2;
        grid-row: 2;
        align-self: start;
        justify-self: end;
        margin-top: 0;
        line-height: calc(25 * var(--bo-u));
        text-align: right;
    }
}

.bo-input {
    position: relative;
}

.bo-input-icon {
    position: absolute;
    top: 50%;
    left: calc(22 * var(--bo-u));
    width: calc(28 * var(--bo-u));
    transform: translateY(-50%);
    font-size: calc(22 * var(--bo-u));
    line-height: 1;
    text-align: center;
    color: var(--bo-icon);
    pointer-events: none;
    transition: color 0.15s ease;
}

.bo-auth .bo-input input.form-control,
.bo-auth .bo-input select.form-control {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: calc(66 * var(--bo-u));
    padding: calc(4 * var(--bo-u)) calc(20 * var(--bo-u)) 0 calc(76 * var(--bo-u));
    border: 1px solid var(--bo-border);
    border-width: max(1px, calc(1.5 * var(--bo-u)));
    border-radius: calc(9 * var(--bo-u));
    background-color: #ffffff;
    background-image: none;
    font-family: inherit;
    font-size: calc(19.3 * var(--bo-u));
    font-weight: 600;
    letter-spacing: 0.012em;
    color: var(--bo-navy);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

/* Room for the button on the right (show/hide password) when there is one. */
.bo-auth .bo-input input.form-control:not(:last-child) {
    padding-right: calc(70 * var(--bo-u));
}

.bo-auth .bo-input input.form-control::placeholder {
    color: var(--bo-placeholder);
    font-weight: 500;
    opacity: 1;
}

.bo-auth .bo-input input.form-control:hover {
    border-color: var(--bo-border-hover);
}

/* style.css removes focus styles with !important; put a visible one back (the mockup shows the
   focused User Name box with a blue border; a soft ring keeps it obvious for keyboard users). */
.bo-auth .bo-input input.form-control:focus,
.bo-auth .bo-input select.form-control:focus {
    border-color: var(--bo-focus-border);
    border-width: max(1.5px, calc(2 * var(--bo-u)));
    background-color: #ffffff;
    box-shadow: 0 0 0 max(3px, calc(4 * var(--bo-u))) var(--bo-focus) !important;
    outline: none;
}

.bo-auth .bo-input input.form-control[aria-invalid="true"] {
    border-color: #d14343;
}

.bo-auth .bo-input input.form-control[aria-invalid="true"]:focus {
    box-shadow: 0 0 0 max(3px, calc(4 * var(--bo-u))) rgba(209, 67, 67, 0.2) !important;
}

.bo-input-action {
    position: absolute;
    top: 50%;
    right: calc(8 * var(--bo-u));
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(52 * var(--bo-u));
    height: calc(50 * var(--bo-u));
    padding: 0;
    transform: translateY(-50%);
    border: 0;
    border-radius: calc(8 * var(--bo-u));
    background: transparent;
    font-size: calc(22 * var(--bo-u));
    color: var(--bo-icon-muted);
    cursor: pointer;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.bo-input-action:hover {
    background: #eef3fa;
    color: var(--bo-navy);
}

.bo-input-action:focus {
    outline: none;
}

.bo-input-action:focus-visible {
    outline: 2px solid var(--bo-blue);
    outline-offset: 0;
    color: var(--bo-navy);
}

/* ---- outline icons (the mockup's): drawn as a mask in the element's text colour ---- */
.bo-ico {
    display: inline-block;
    flex: 0 0 auto;
    width: 1em;
    height: 1em;
    vertical-align: middle;
    background-color: currentColor;
    -webkit-mask: var(--bo-ico) center / contain no-repeat;
    mask: var(--bo-ico) center / contain no-repeat;
}

.bo-ico-user {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='6.7' r='5.6'/%3E%3Cpath d='M1 23v-1.6C1 17 6 14.6 12 14.6S23 17 23 21.4V23z'/%3E%3C/svg%3E");
}

.bo-ico-lock {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 10.3V7a5 5 0 0 1 10 0v3.3'/%3E%3Crect x='3.2' y='10.3' width='17.6' height='12.6' rx='2.4'/%3E%3Ccircle cx='12' cy='15.6' r='1.2' fill='%23000'/%3E%3Cpath d='M12 16.4v2.4'/%3E%3C/svg%3E");
}

.bo-ico-eye {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.2 12C3.6 7.8 7.4 5.6 12 5.6s8.4 2.2 10.8 6.4c-2.4 4.2-6.2 6.4-10.8 6.4S3.6 16.2 1.2 12z'/%3E%3Ccircle cx='12' cy='12' r='3.4'/%3E%3C/svg%3E");
}

.bo-ico-eye-slash {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.2 12C3.6 7.8 7.4 5.6 12 5.6s8.4 2.2 10.8 6.4c-2.4 4.2-6.2 6.4-10.8 6.4S3.6 16.2 1.2 12z'/%3E%3Ccircle cx='12' cy='12' r='3.4'/%3E%3Cpath d='M3.6 2.6l17.2 19'/%3E%3C/svg%3E");
}

.bo-ico-arrow {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 18' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1.3 9h21.2M14.4 1.3L22.5 9l-8.1 7.7'/%3E%3C/svg%3E");
    width: 1.33em;
}

.bo-ico-mail {
    --bo-ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='1.6' y='4.2' width='20.8' height='15.6' rx='2.4'/%3E%3Cpath d='M2.4 5.6l9.6 7.3 9.6-7.3'/%3E%3C/svg%3E");
}

.bo-input-icon.bo-ico {
    width: calc(28 * var(--bo-u));
    height: calc(28 * var(--bo-u));
}

.bo-input-action .bo-ico {
    width: calc(28 * var(--bo-u));
    height: calc(28 * var(--bo-u));
}

@media (forced-colors: active) {
    .bo-ico {
        background-color: CanvasText;
        forced-color-adjust: none;
    }
}

/* ---- checkbox -------------------------------------------------------------- */
.bo-check {
    display: flex;
    align-items: center;
    gap: calc(16 * var(--bo-u));
    margin: calc(-8.5 * var(--bo-u)) 0 calc(29.5 * var(--bo-u));
    padding-left: calc(1.5 * var(--bo-u));
}

.bo-auth .bo-check input[type="checkbox"] {
    -webkit-appearance: none;
    appearance: none;
    flex: 0 0 auto;
    box-sizing: border-box;
    width: max(18px, calc(27 * var(--bo-u)));
    height: max(18px, calc(27 * var(--bo-u)));
    margin: 0;
    border: 2px solid #8693a8;
    border-width: max(1.5px, calc(2 * var(--bo-u)));
    border-radius: calc(5 * var(--bo-u));
    background: #ffffff center / 72% no-repeat;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.bo-auth .bo-check input[type="checkbox"]:hover {
    border-color: var(--bo-blue);
}

.bo-auth .bo-check input[type="checkbox"]:checked {
    border-color: var(--bo-blue);
    background-color: var(--bo-blue);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 12.5l5 5 10-11'/%3E%3C/svg%3E");
}

.bo-auth .bo-check input[type="checkbox"]:focus {
    outline: none;
}

.bo-auth .bo-check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--bo-blue);
    outline-offset: 2px;
}

.bo-auth .bo-check label {
    margin: 0;
    font-size: calc(20 * var(--bo-u));
    font-weight: 600;
    color: var(--bo-navy);
    cursor: pointer;
    user-select: none;
}

/* ---- buttons and links ----------------------------------------------------- */
.bo-auth .bo-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: calc(26 * var(--bo-u));
    box-sizing: border-box;
    width: 100%;
    min-height: calc(71 * var(--bo-u));
    padding: calc(10 * var(--bo-u)) calc(20 * var(--bo-u));
    border: 1px solid transparent;
    border-radius: calc(8 * var(--bo-u));
    background: var(--bo-blue);
    font-family: inherit;
    font-size: calc(25 * var(--bo-u));
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.005em;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 calc(2 * var(--bo-u)) calc(9 * var(--bo-u)) 0 rgba(0, 96, 240, 0.3);
    cursor: pointer;
    transition: background-color 0.15s ease, box-shadow 0.15s ease, transform 0.05s ease;
}

.bo-auth .bo-btn:hover {
    background: var(--bo-blue-hover);
    color: #ffffff;
    text-decoration: none;
}

.bo-auth .bo-btn:active {
    background: var(--bo-blue-active);
    transform: translateY(1px);
}

.bo-auth .bo-btn:focus {
    outline: none;
}

.bo-auth .bo-btn:focus-visible {
    outline: 3px solid rgba(0, 80, 194, 0.4);
    outline-offset: 2px;
}

.bo-auth .bo-btn[disabled],
.bo-auth .bo-btn[aria-disabled="true"] {
    opacity: 0.7;
    cursor: progress;
    transform: none;
}

.bo-auth .bo-btn .bo-ico-arrow,
.bo-auth .bo-btn .fa-arrow-right {
    font-size: calc(19 * var(--bo-u));
    transition: transform 0.15s ease;
}

.bo-auth .bo-btn:hover .bo-ico-arrow,
.bo-auth .bo-btn:hover .fa-arrow-right {
    transform: translateX(3px);
}

/* Secondary (outline) button, e.g. "Back". */
.bo-auth .bo-btn.bo-btn-ghost {
    background: #ffffff;
    border-color: #c4d5ee;
    color: var(--bo-blue);
    box-shadow: none;
}

.bo-auth .bo-btn.bo-btn-ghost:hover {
    background: #f1f6fe;
    color: var(--bo-blue-hover);
}

/* Two buttons side by side. */
.bo-btn-row {
    display: flex;
    gap: calc(16 * var(--bo-u));
}

.bo-btn-row > .bo-btn {
    flex: 1 1 0;
}

.bo-auth .bo-link {
    border-radius: 3px;
    font-size: max(13px, calc(18 * var(--bo-u)));
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--bo-link);
    text-decoration: none;
}

.bo-auth .bo-link:hover {
    color: var(--bo-blue-hover);
    text-decoration: underline;
}

.bo-auth .bo-link:focus {
    outline: none;
}

.bo-auth .bo-link:focus-visible {
    outline: 2px solid var(--bo-blue);
    outline-offset: 2px;
}

/* ---- messages -------------------------------------------------------------- */
.bo-alert {
    display: flex;
    align-items: flex-start;
    gap: calc(12 * var(--bo-u));
    margin-bottom: calc(26 * var(--bo-u));
    padding: calc(14 * var(--bo-u)) calc(16 * var(--bo-u));
    border: 1px solid transparent;
    border-radius: calc(9 * var(--bo-u));
    font-size: max(13px, calc(17 * var(--bo-u)));
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

.bo-alert > .fas,
.bo-alert > .far,
.bo-alert > .bo-ico {
    flex: 0 0 auto;
    margin-top: 0.2em;
}

.bo-alert-error {
    background: #fdefef;
    border-color: #f2c6c6;
    color: #9f2626;
}

.bo-alert-success {
    background: #eaf8f0;
    border-color: #bfe5cd;
    color: #1b6a3d;
}

.bo-alert-info {
    background: #eaf2ff;
    border-color: #c3d8fa;
    color: #0c4596;
}

.bo-alert-close {
    flex: 0 0 auto;
    margin: -2px -4px -2px auto;
    padding: 0 6px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    font-size: 1.4em;
    line-height: 1;
    color: inherit;
    opacity: 0.7;
    cursor: pointer;
}

.bo-alert-close:hover {
    opacity: 1;
}

.bo-alert-close:focus {
    outline: none;
}

.bo-alert-close:focus-visible {
    outline: 2px solid currentColor;
    opacity: 1;
}

.bo-auth .bo-auth-foot {
    margin: calc(26 * var(--bo-u)) 0 0;
    font-size: max(13px, calc(17 * var(--bo-u)));
    color: var(--bo-muted);
    text-align: center;
}

/* A short hint under a form (e.g. "check your junk folder"). */
.bo-auth .bo-auth-note,
.bo-auth .bo-auth-body p.bo-auth-note {
    margin: calc(20 * var(--bo-u)) 0 0;
    font-size: max(13px, calc(16 * var(--bo-u)));
    line-height: 1.5;
    color: var(--bo-muted);
}

/* Full-page "working" overlay (login page). */
.bo-auth-loading {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(228, 239, 254, 0.55);
}

.bo-auth-loading img {
    width: 120px;
    height: 120px;
    object-fit: contain;
}

/* ---- tablet and phone (< 992 px) -------------------------------------------- */
@media (max-width: 991.98px) {
    .bo-auth {
        flex-direction: column;
        min-height: 100vh;
        min-height: 100dvh;
        /* The mockup's top-left curves go back in the window's corner (behind the card); the
           illustration below carries its own haze (::after). */
        background:
            radial-gradient(circle calc(530 * var(--bo-d)) at calc(-119 * var(--bo-d)) calc(-317 * var(--bo-d)),
                #cbe5fc 64%, #bcdcfc 85%, #abd1f7 99.6%, rgba(171, 209, 247, 0) 100%),
            radial-gradient(circle calc(681 * var(--bo-d)) at calc(-80 * var(--bo-d)) calc(-440 * var(--bo-d)),
                #dcedfd 80%, #e2f0fd 99.6%, rgba(226, 240, 253, 0) 100%),
            radial-gradient(circle calc(422 * var(--bo-d)) at calc(100% + 228 * var(--bo-d)) calc(100% + 171 * var(--bo-d)),
                #d0e8fd 99%, rgba(208, 232, 253, 0) 100%),
            radial-gradient(circle calc(736 * var(--bo-d)) at calc(100% + 410 * var(--bo-d)) calc(100% + 235 * var(--bo-d)),
                #e6f2fd 98%, rgba(230, 242, 253, 0) 100%),
            linear-gradient(90deg, #f0f7fd 0%, #f1f8fe 45%, #f5fafe 85%);
    }

    /* The card first (on top); the illustration fills whatever height is left under it.
       Visual order only - the illustration has nothing to focus. */
    .bo-auth-panel,
    .bo-auth-panel:only-child {
        order: -1;
        flex: 0 0 auto;
        padding: 24px 16px 12px;
    }

    .bo-auth-card {
        width: 100%;
        max-width: calc(665 * var(--bo-u));
    }

    .bo-auth-art {
        flex: 1 1 auto;
        width: auto;
        min-height: 0;
    }

    /* The picture as tall as the space (its proportions kept), bottom-left; its top - with the
       mockup's corner curves, which here would sit mid-screen - and its right edge fade out. */
    .bo-auth-art::before,
    .bo-auth-art::after {
        position: absolute;
        top: 0;
        bottom: 0;
        width: auto;
        height: auto;
        max-width: 100%;
    }

    .bo-auth-art::before {
        aspect-ratio: 680 / 883;
        background-size: contain;
        background-position: left bottom;
        -webkit-mask-image:
            linear-gradient(to right, #000 80%, transparent),
            linear-gradient(to bottom, transparent 12%, #000 26%);
        mask-image:
            linear-gradient(to right, #000 80%, transparent),
            linear-gradient(to bottom, transparent 12%, #000 26%);
    }

    /* Its haze only (the same ellipse as on desktop, in proportion to the picture). */
    .bo-auth-art::after {
        aspect-ratio: 1200 / 883;
        background:
            radial-gradient(ellipse 43.3% 37.4% at 51.7% 52%, rgba(213, 231, 251, 0.9), rgba(213, 231, 251, 0) 100%),
            radial-gradient(ellipse 43.3% 29.4% at 53.3% 100%, rgba(226, 236, 252, 0.95), rgba(226, 236, 252, 0) 100%);
    }
}

/* Too short to show the illustration under the card (a phone on its side). */
@media (max-width: 991.98px) and (max-height: 560px) {
    .bo-auth-art {
        display: none;
    }
}

@media (max-width: 575.98px) {
    .bo-auth-head {
        padding-right: 22px;
        padding-left: 22px;
    }

    .bo-auth-body {
        padding-right: 22px;
        padding-left: 22px;
    }

    /* Longer titles ("Forgot Password") stay on one line on a phone. */
    .bo-auth .bo-auth-head h1 {
        font-size: min(calc(47 * var(--bo-u)), 7.2vw);
    }

    /* 16px stops iOS zooming into the field on focus. */
    .bo-auth .bo-input input.form-control,
    .bo-auth .bo-input select.form-control {
        font-size: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .bo-auth *,
    .bo-auth *::before,
    .bo-auth *::after {
        transition: none !important;
    }
}
