/*
 * The sign-in family (login, register, forgot/reset password, resend verification, 2FA challenge, magic link): one clean card.
 * DECISIONS P22 (owner: "the laravel login page is ugly, u can change it"). Loaded only by templates/mp/blank.html.twig, after Bootstrap 5,
 * app.css and shell.css, and scoped to `body.blank` so no map-app screen is touched. Plain CSS, the app's own fonts and colours:
 * Nunito, the Quick Links blue (#4263eb) and the Laravel text greys.
 *
 * Contrast: body text #212529 on white (16:1), muted text #5b6470 on white (5.9:1), links/buttons #3451d1 on white (6.3:1),
 * errors #b42318 on #fef3f2 (6.1:1). Focus is a 3px ring plus the border colour, never colour alone.
 */
body.blank {
    background: #f4f6fb;
    border-top: 0;
    color: #212529;
    font-family: Nunito, -apple-system, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}
body.blank .mp-version { color: #5b6470; }
body.blank .mp-content { padding: 0; }

body.blank .all-center {
    justify-content: center;
    min-height: 100vh;
    padding: 32px 16px;
}

/* Brand line above the card. */
body.blank .auth-brand {
    align-items: center;
    color: #212529;
    display: flex;
    font-size: 20px;
    font-weight: 800;
    gap: 10px;
    letter-spacing: -.01em;
    margin-bottom: 20px;
}
body.blank .auth-brand .auth-mark {
    background: #3451d1;
    border-radius: 9px;
    display: inline-block;
    height: 32px;
    position: relative;
    width: 32px;
}
body.blank .auth-brand .auth-mark::after {
    background: #fff;
    border-radius: 50% 50% 50% 0;
    content: "";
    height: 12px;
    left: 10px;
    position: absolute;
    top: 7px;
    transform: rotate(-45deg);
    width: 12px;
}

/* The card. Fluid: no fixed minimum, so it fits a 360px phone with a 16px gutter. */
body.blank .bold-box,
body.blank .bold-box.account-form {
    background: #fff;
    border: 1px solid #e3e7ef;
    border-radius: 14px;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 12px 32px rgba(16, 24, 40, .08);
    box-sizing: border-box;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 auto;
    max-width: 440px;
    min-width: 0;
    padding: 36px 32px 32px;
    text-align: left;
    width: 100%;
}
body.blank .bold-box.mp-card-wide { max-width: 560px; }

body.blank .bold-box h1,
body.blank .bold-box h2:first-child {
    color: #111827;
    font-size: 26px;
    font-weight: 800;
    letter-spacing: -.015em;
    line-height: 1.2;
    margin: 0 0 8px;
    text-align: left;
}
body.blank .bold-box p {
    color: #5b6470;
    font-size: 15px;
    margin: 0 0 20px;
    text-align: left;
}

/* Fields: works for the Bootstrap-classed pages and for the bare label/input markup alike. */
body.blank .bold-box form > div,
body.blank .bold-box .mb-3,
body.blank .bold-box .form-field {
    margin: 0 0 18px;
}
body.blank .bold-box label,
body.blank .bold-box .col-form-label {
    color: #1f2937;
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    margin: 0 0 6px;
    padding: 0;
    text-align: left;
}
body.blank .bold-box input[type=email],
body.blank .bold-box input[type=text],
body.blank .bold-box input[type=password],
body.blank .bold-box input[type=number],
body.blank .bold-box .form-control {
    appearance: none;
    background: #fff;
    border: 1px solid #aeb6c4;
    border-radius: 10px;
    box-sizing: border-box;
    color: #111827;
    font: inherit;
    font-size: 16px;
    height: 46px;
    line-height: 1.4;
    padding: 0 14px;
    transition: border-color .12s, box-shadow .12s;
    width: 100%;
}
body.blank .bold-box input::placeholder { color: #7a8394; }
body.blank .bold-box input:hover { border-color: #7a8394; }
body.blank .bold-box input:focus,
body.blank .bold-box .form-control:focus {
    border-color: #3451d1;
    box-shadow: 0 0 0 3px rgba(52, 81, 209, .28);
    outline: 0;
}
body.blank .bold-box input[aria-invalid=true],
body.blank .bold-box .form-control.is-invalid {
    background-image: none;
    border-color: #b42318;
    padding-right: 14px;
}
body.blank .bold-box input[aria-invalid=true]:focus { box-shadow: 0 0 0 3px rgba(180, 35, 24, .22); }

/* Checkbox rows ("Remember me", "Trust this device"). */
body.blank .bold-box .form-check,
body.blank .bold-box label:has(> input[type=checkbox]) {
    align-items: center;
    display: flex;
    font-weight: 400;
    gap: 10px;
    line-height: 1.3;
    margin: 0;
    padding: 0;
}
body.blank .bold-box .form-check-input {
    margin: 0;
    position: static;
}
body.blank .bold-box input[type=checkbox] {
    accent-color: #3451d1;
    flex: none;
    height: 20px;
    margin: 0;
    width: 20px;
}
body.blank .bold-box input[type=checkbox]:focus-visible { outline: 3px solid rgba(52, 81, 209, .45); outline-offset: 2px; }
body.blank .bold-box .form-check .checkbox-row,
body.blank .bold-box .form-check label { font-size: 15px; font-weight: 400; margin: 0; }

/* The one-time code field of the 2FA challenge reads like a code. */
body.blank .bold-box input[autocomplete=one-time-code] {
    font-size: 24px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .35em;
    text-align: center;
}

/* Buttons. The submit is the one primary action of the card. */
body.blank main.mp-content .bold-box button,
body.blank main.mp-content .bold-box button[type=submit]:not(.btn),
body.blank .bold-box .btn-success,
body.blank .bold-box .btn-primary {
    background: #3451d1;
    border: 1px solid #3451d1;
    border-radius: 10px;
    box-shadow: none;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 16px;
    font-weight: 800;
    height: 48px;
    line-height: 1;
    padding: 0 18px;
    transition: background .12s, box-shadow .12s;
    width: 100%;
}
body.blank main.mp-content .bold-box button:hover,
body.blank main.mp-content .bold-box button[type=submit]:not(.btn):hover,
body.blank .bold-box .btn-success:hover { background: #2a42b3; border-color: #2a42b3; filter: none; }
body.blank .bold-box button:focus-visible,
body.blank .bold-box .btn-success:focus-visible {
    box-shadow: 0 0 0 3px #fff, 0 0 0 6px #3451d1;
    outline: 0;
}
body.blank .bold-box button:active { background: #223a9c; }

/* Links. */
body.blank .bold-box a { color: #3451d1; font-weight: 600; text-decoration: none; }
body.blank .bold-box a:hover { text-decoration: underline; }
body.blank .bold-box a:focus-visible { border-radius: 4px; outline: 3px solid rgba(52, 81, 209, .45); outline-offset: 2px; }
body.blank .bold-box .btn-link {
    background: none;
    border: 0;
    display: block;
    font-size: 14px;
    font-weight: 600;
    height: auto;
    margin: 14px 0 0;
    padding: 0;
    text-align: center;
    width: 100%;
}
body.blank .bold-box form + p,
body.blank .bold-box > p:last-child {
    border-top: 1px solid #eceff5;
    font-size: 14px;
    margin: 22px 0 0;
    padding-top: 18px;
    text-align: center;
}
body.blank .bold-box form + p + p { border-top: 0; margin-top: 10px; padding-top: 0; }

/* Messages: the error sits above the form (credential errors never say which field is wrong); field errors sit under their field. */
body.blank .bold-box .alert,
body.blank .bold-box .error,
body.blank .bold-box .flash-success {
    border: 1px solid;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
    margin: 0 0 20px;
    padding: 12px 14px;
    text-align: left;
}
body.blank .bold-box .alert p,
body.blank .bold-box .error p { color: inherit; font-size: inherit; margin: 0; text-align: left; }
body.blank .bold-box .alert p + p { margin-top: 4px; }
body.blank .bold-box .alert-danger,
body.blank .bold-box .error { background: #fef3f2; border-color: #f4b9b3; color: #b42318; }
body.blank .bold-box .alert-success,
body.blank .bold-box .flash-success,
body.blank .bold-box .success { background: #ecfdf3; border-color: #a6e4c1; color: #05603a; }
body.blank .bold-box .field-error {
    color: #b42318;
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-top: 6px;
}

@media (max-width: 420px) {
    body.blank .all-center { justify-content: flex-start; padding-top: 28px; }
    body.blank .bold-box,
    body.blank .bold-box.account-form { padding: 28px 20px 24px; }
    body.blank .bold-box h1,
    body.blank .bold-box h2:first-child { font-size: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    body.blank .bold-box * { transition: none !important; }
}

/* A heading straight above a form (pages without an intro line) still gets room. */
body.blank .bold-box h1 + form,
body.blank .bold-box h1 + .alert { margin-top: 18px; }

/* A field error also carries .error (the pages shared hook); it is an inline message, not the boxed alert. */
body.blank .bold-box .field-error.error { background: none; border: 0; border-radius: 0; color: #b42318; font-size: 13px; font-weight: 600; margin: 6px 0 0; padding: 0; }
