/* =========================================================
   LOGIN - MOBILE RESPONSIVE PATCH
   Add after the existing AUTHENTICATION styles.
   ========================================================= */

@media (max-width: 600px) {
    .auth-page {
        min-height: 100dvh;
        overflow-x: hidden;
    }

    .auth-shell {
        min-height: 100dvh;
        display: flex;
        align-items: center;
        justify-content: center;
        box-sizing: border-box;
        padding: 20px 16px;
    }

    .auth-card {
        width: 100%;
        max-width: 420px;
        box-sizing: border-box;
        margin: 0;
        padding: 22px 18px;
        border-radius: 14px;
    }

    .auth-brand {
        display: flex;
        align-items: center;
        gap: 11px;
        padding-bottom: 17px;
    }

    .auth-brand .brand-icon {
        flex: 0 0 48px;
        width: 48px;
        height: 48px;
        display: grid;
        place-items: center;
        border-radius: 13px;
    }

    .auth-brand > div:last-child {
        min-width: 0;
        line-height: 1.2;
    }

    .auth-brand strong {
        display: block;
        font-size: 13px;
        line-height: 1.25;
        white-space: normal;
    }

    .auth-brand span {
        display: block;
        margin-top: 3px;
        font-size: 8px;
        line-height: 1.25;
        white-space: normal;
    }

    .auth-heading {
        padding: 22px 0 17px;
    }

    .auth-heading > span {
        display: block;
        margin-bottom: 5px;
    }

    .auth-heading h1 {
        margin: 0 0 7px;
        font-size: 27px;
        line-height: 1.1;
    }

    .auth-heading p {
        max-width: 100%;
        font-size: 12px;
        line-height: 1.55;
    }

    .auth-form {
        display: flex;
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }

    .auth-form label:not(.check-row) {
        display: flex;
        flex-direction: column;
        gap: 7px;
        width: 100%;
    }

    .auth-form input[type="email"],
    .auth-form input[type="password"] {
        display: block;
        width: 100%;
        min-width: 0;
        height: 46px;
        box-sizing: border-box;
        padding: 10px 12px;
        font-size: 16px; /* prevents mobile browser zoom on focus */
        border-radius: 9px;
    }

    .auth-form .check-row {
        display: flex !important;
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        width: 100%;
        gap: 9px !important;
        font-size: 11px;
    }

    .auth-form .check-row input[type="checkbox"] {
        flex: 0 0 auto;
        width: 18px !important;
        height: 18px;
        margin: 0;
    }

    .auth-form .primary-action {
        display: block;
        width: 100%;
        min-height: 46px;
        box-sizing: border-box;
        margin-top: 2px;
        border-radius: 9px;
        font-size: 10px;
    }

    .form-alert {
        width: 100%;
        box-sizing: border-box;
        line-height: 1.45;
    }
}

@media (max-width: 360px) {
    .auth-shell {
        padding: 14px 10px;
    }

    .auth-card {
        padding: 19px 15px;
    }

    .auth-brand .brand-icon {
        flex-basis: 44px;
        width: 44px;
        height: 44px;
    }

    .auth-heading h1 {
        font-size: 25px;
    }
}

@media (max-height: 600px) and (orientation: landscape) {
    .auth-shell {
        align-items: flex-start;
        padding-top: 14px;
        padding-bottom: 14px;
    }

    .auth-card {
        margin: auto;
    }
}
