/* =========================================================
   MTailorVerse - Login Page
   Clean version
   ========================================================= */

:root {
    --green-dark: #3f8954;
    --green-main: #65b879;
    --green-light: #d9f0df;
    --green-pale: #edf8f0;
    --dark: #29383d;
    --text: #60747b;
    --border: #d8e9dd;
    --white: #ffffff;
    --error: #dc6b6b;
}

* {
    box-sizing: border-box;
}

html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Poppins", sans-serif;
    color: var(--dark);
    background:
        radial-gradient(ellipse 520px 360px at 7% 12%,
            transparent 0 63%,
            rgba(78, 157, 99, .14) 63.2% 63.7%,
            transparent 64% 68%,
            rgba(78, 157, 99, .08) 68.2% 68.7%,
            transparent 69%),
        radial-gradient(ellipse 600px 420px at 94% 84%,
            transparent 0 64%,
            rgba(78, 157, 99, .14) 64.2% 64.8%,
            transparent 65.1% 70%,
            rgba(78, 157, 99, .08) 70.2% 70.8%,
            transparent 71%),
        linear-gradient(135deg, #e7f6eb 0%, #f8fcf9 50%, #d9efdf 100%);
}

/* =========================================================
   PAGE
   ========================================================= */

.login-page {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    overflow: hidden;
}

.login-page::before,
.login-page::after {
    content: "";
    position: absolute;
    pointer-events: none;
    z-index: 0;
    border: 1px solid rgba(83, 170, 108, .15);
    border-radius: 50%;
}

.login-page::before {
    width: 780px;
    height: 540px;
    left: -480px;
    top: 38%;
    box-shadow:
        0 0 0 22px rgba(83, 170, 108, .04),
        0 0 0 44px rgba(83, 170, 108, .025),
        0 0 0 66px rgba(83, 170, 108, .018);
}

.login-page::after {
    width: 740px;
    height: 510px;
    right: -480px;
    top: 7%;
    box-shadow:
        0 0 0 22px rgba(83, 170, 108, .04),
        0 0 0 44px rgba(83, 170, 108, .025),
        0 0 0 66px rgba(83, 170, 108, .018);
}

/* =========================================================
   MAIN CARD
   ========================================================= */

.login-card {
    position: relative;
    z-index: 10;
    width: min(1320px, 100%);
    height: min(850px, calc(100vh - 44px));
    min-height: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
    border-radius: 30px;
    background: rgba(255, 255, 255, .98);
    border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 30px 80px rgba(39, 76, 49, .18);
}

/* =========================================================
   LEFT VISUAL PANEL
   ========================================================= */

.login-visual {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 35px 45px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 430px 320px at 15% 12%,
            rgba(255, 255, 255, .10) 0%,
            transparent 70%),
        radial-gradient(ellipse 520px 400px at 92% 88%,
            rgba(255, 255, 255, .11) 0%,
            transparent 70%),
        linear-gradient(145deg, #39864f 0%, #51a265 48%, #6abd7f 100%);
}

.login-visual::before,
.login-visual::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    pointer-events: none;
}

.login-visual::before {
    width: 690px;
    height: 690px;
    top: -405px;
    left: -355px;
    border: 1px solid rgba(255, 255, 255, .34);
    box-shadow:
        0 0 0 18px rgba(255, 255, 255, .055),
        0 0 0 36px rgba(255, 255, 255, .035),
        0 0 0 54px rgba(255, 255, 255, .02);
}

.login-visual::after {
    width: 650px;
    height: 650px;
    right: -370px;
    bottom: -370px;
    border: 1px solid rgba(255, 255, 255, .28);
    box-shadow:
        0 0 0 18px rgba(255, 255, 255, .05),
        0 0 0 36px rgba(255, 255, 255, .03),
        0 0 0 54px rgba(255, 255, 255, .018);
}

.visual-contour {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 50%;
    pointer-events: none;
    z-index: -1;
}

.visual-contour-one {
    width: 440px;
    height: 440px;
    right: -285px;
    top: 70px;
}

.visual-contour-two {
    width: 430px;
    height: 430px;
    left: -290px;
    bottom: -15px;
}

.decorative-dots {
    position: absolute;
    width: 58px;
    height: 58px;
    background-image:
        radial-gradient(rgba(255, 255, 255, .48) 1.3px, transparent 1.3px);
    background-size: 11px 11px;
    opacity: .42;
    pointer-events: none;
    z-index: 1;
}

.dots-top {
    top: 38px;
    left: 38px;
}

.dots-bottom {
    right: 38px;
    bottom: 38px;
    opacity: .30;
}

/* =========================================================
   LOGO
   ========================================================= */

.visual-logo {
    position: relative;
    z-index: 5;
    width: min(500px, 94%);
    aspect-ratio: 1 / 1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 34px;
    background: rgba(235, 247, 239, .76);
    border: 1px solid rgba(255, 255, 255, .92);
    box-shadow:
        0 30px 70px rgba(25, 72, 39, .30),
        0 0 0 1px rgba(255, 255, 255, .18) inset;
}

.visual-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transform: scale(1.035);
}

/* =========================================================
   MOTTO
   ========================================================= */

.visual-motto {
    position: relative;
    z-index: 5;
    width: 100%;
    max-width: 570px;
    margin-top: 25px;
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;

    /* Readable elegant italic - NOT the difficult script font */
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 33px;
    font-style: italic;
    font-weight: 600;
    line-height: 1.18;
    letter-spacing: 1.5px;
    color: rgba(255, 255, 255, .98);
    text-shadow: 0 2px 10px rgba(30, 74, 43, .18);
}

.visual-motto span {
    display: block;
    margin: 0;
}

.visual-motto::before {
    content: "";
    position: absolute;
    width: 145px;
    height: 1px;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 255, 255, .62);
}

.visual-motto::after {
    content: "✦";
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    padding: 0 11px;
    font-family: Georgia, serif;
    font-size: 10px;
    font-style: normal;
    color: #fff;
    background: #59a76b;
}

/* =========================================================
   RIGHT FORM PANEL
   ========================================================= */

.login-form-side {
    position: relative;
    min-width: 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 72px;
    background: rgba(255, 255, 255, .98);
}

.login-content {
    width: 100%;
    max-width: 510px;
}

/* =========================================================
   TITLE
   ========================================================= */

.login-title {
    margin: 0;
    text-align: center;
    font-family: "Great Vibes", cursive;
    font-size: 68px;
    font-weight: 400;
    line-height: 1.05;
    color: #303d42;
}

.title-line {
    width: 60px;
    height: 4px;
    margin: 17px auto 17px;
    border-radius: 20px;
    background: var(--green-main);
}

.login-subtitle {
    margin: 0 0 43px;
    text-align: center;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.7;
    color: #71858c;
}

/* =========================================================
   FORM
   ========================================================= */

.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 9px;
    font-size: 16px;
    font-weight: 600;
    color: #24373c;
}

.input-wrapper {
    position: relative;
    width: 100%;
    height: 60px;
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 15px;
    background: #fbfdfc;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.input-wrapper:focus-within {
    border-color: var(--green-main);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(101, 184, 121, .10);
}

.input-wrapper > i {
    width: 53px;
    flex-shrink: 0;
    text-align: center;
    font-size: 18px;
    color: #6fbb82;
}

.input-wrapper input {
    width: 100%;
    height: 100%;
    min-width: 0;
    border: 0;
    outline: 0;
    padding: 0 52px 0 0;
    font-family: "Poppins", sans-serif;
    font-size: 15px;
    color: #34464b;
    background: transparent;
}

.input-wrapper input::placeholder {
    color: #a7b5b9;
}

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
    display: none;
}

/* =========================================================
   PASSWORD TOGGLE - ONLY ONE EYE
   ========================================================= */

.password-toggle {
    position: absolute;
    top: 50%;
    right: 13px;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    outline: 0;
    background: transparent;
    color: #8da0a5;
    cursor: pointer;
    font-size: 14px;
}

.password-toggle:hover {
    color: var(--green-main);
}

/* =========================================================
   EMPTY FIELD ERROR
   ========================================================= */

.input-wrapper.input-error {
    border-color: var(--error) !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 4px rgba(220, 107, 107, .08);
}

.input-wrapper.input-error > i {
    color: var(--error);
}

.field-error {
    display: none;
    margin-top: 6px;
    padding-left: 3px;
    font-size: 11px;
    font-weight: 500;
    color: #d85e5e;
}

.field-error.show {
    display: block;
}

/* =========================================================
   FORGOT PASSWORD
   ========================================================= */

.forgot-password {
    display: flex;
    justify-content: flex-end;
    margin-top: -3px;
    margin-bottom: 18px;
}

.forgot-password a {
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    color: #4fa668;
}

.forgot-password a:hover {
    color: #367f49;
}

/* =========================================================
   LOGIN BUTTON
   ========================================================= */

.login-button {
    width: 100%;
    height: 60px;
    border: 0;
    border-radius: 15px;
    background: linear-gradient(135deg, #67bc7d, #58ad6d);
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 13px 28px rgba(78, 166, 103, .20);
    transition: transform .2s ease, box-shadow .2s ease;
}

.login-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 17px 32px rgba(78, 166, 103, .26);
}

.login-button:active {
    transform: translateY(0);
}

/* =========================================================
   REGISTER INFO
   ========================================================= */

.register-info {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
    padding: 13px 15px;
    border: 1px solid #dcebe0;
    border-radius: 14px;
    background: #f5faf6;
}

.register-info > i {
    flex-shrink: 0;
    margin-top: 2px;
    font-size: 15px;
    color: #61b676;
}

.register-info p {
    margin: 0;
    font-size: 12px;
    line-height: 1.6;
    color: #73858a;
}

.register-info strong {
    color: #4ba363;
    font-weight: 600;
}

/* =========================================================
   HOME LINK
   ========================================================= */

.home-link-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 24px;
}

.home-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    color: #668086;
    transition: color .2s ease;
}

.home-link i {
    font-size: 15px;
    color: #62b376;
}

.home-link:hover {
    color: #429258;
}

/* =========================================================
   ERROR POPUP
   ========================================================= */

.error-popup-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(35, 48, 42, .40);
    backdrop-filter: blur(6px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .25s ease, visibility .25s ease;
}

.error-popup-overlay.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.error-popup {
    position: relative;
    width: min(390px, 100%);
    padding: 34px 30px 28px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 22px;
    background: #fff;
    box-shadow: 0 25px 70px rgba(25, 47, 32, .24);
    transform: translateY(15px) scale(.96);
    transition: transform .25s ease;
}

.error-popup-overlay.show .error-popup {
    transform: translateY(0) scale(1);
}

.popup-close {
    position: absolute;
    top: 13px;
    right: 14px;
    width: 31px;
    height: 31px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f7f4;
    color: #789087;
    cursor: pointer;
}

.popup-close:hover {
    background: #e9f2ec;
}

.popup-icon {
    width: 60px;
    height: 60px;
    margin: 0 auto 17px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff0f0;
    color: #d96b6b;
    font-size: 24px;
}

.error-popup h3 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 700;
    color: #303f43;
}

.error-popup p {
    margin: 0 0 23px;
    font-size: 12.5px;
    line-height: 1.7;
    color: #718187;
}

.popup-button {
    width: 100%;
    height: 47px;
    border: 0;
    border-radius: 12px;
    background: #64b678;
    color: #fff;
    font-family: "Poppins", sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.popup-button:hover {
    background: #54a969;
}

body.popup-open {
    overflow: hidden;
}

/* =========================================================
   SHORT DESKTOP
   ========================================================= */

@media (max-height: 760px) and (min-width: 801px) {
    .login-page {
        padding: 15px;
    }

    .login-card {
        height: calc(100vh - 30px);
    }

    .login-visual {
        padding: 25px 35px;
    }

    .visual-logo {
        width: min(350px, 55vh);
    }

    .visual-motto {
        margin-top: 17px;
        padding-top: 16px;
        font-size: 27px;
    }

    .login-form-side {
        padding: 28px 55px;
    }

    .login-title {
        font-size: 56px;
    }

    .login-subtitle {
        margin-bottom: 27px;
    }

    .form-group {
        margin-bottom: 17px;
    }

    .input-wrapper,
    .login-button {
        height: 53px;
    }

    .register-info {
        margin-top: 13px;
        padding: 10px 13px;
    }

    .home-link-wrapper {
        margin-top: 16px;
    }
}

/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1050px) and (min-width: 801px) {
    .login-page {
        padding: 16px;
    }

    .login-card {
        height: calc(100vh - 32px);
    }

    .login-form-side {
        padding: 30px 38px;
    }

    .login-title {
        font-size: 56px;
    }

    .visual-logo {
        width: min(360px, 78%);
    }

    .visual-motto {
        font-size: 27px;
    }
}

/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 800px) {
    html,
    body {
        height: auto;
        min-height: 100%;
    }

    .login-page {
        height: auto;
        min-height: 100vh;
        padding: 15px;
        overflow: visible;
    }

    .login-card {
        width: 100%;
        height: auto;
        display: block;
        border-radius: 24px;
    }

    .login-visual {
        min-height: 500px;
        padding: 45px 25px;
    }

    .visual-logo {
        width: min(330px, 88%);
    }

    .visual-motto {
        max-width: 460px;
        font-size: 26px;
        letter-spacing: .8px;
    }

    .login-form-side {
        padding: 45px 25px;
    }

    .login-title {
        font-size: 50px;
    }

    .login-subtitle {
        margin-bottom: 35px;
    }

    .dots-top {
        top: 25px;
        left: 25px;
    }

    .dots-bottom {
        right: 25px;
        bottom: 25px;
    }
}

/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 480px) {
    .login-page {
        padding: 10px;
    }

    .login-card {
        border-radius: 20px;
    }

    .login-visual {
        min-height: 430px;
        padding: 35px 20px;
    }

    .visual-logo {
        width: 280px;
        border-radius: 24px;
    }

    .visual-motto {
        margin-top: 18px;
        padding-top: 16px;
        font-size: 22px;
        letter-spacing: .5px;
    }

    .login-form-side {
        padding: 35px 20px;
    }

    .login-title {
        font-size: 43px;
    }

    .login-subtitle {
        font-size: 12px;
        margin-bottom: 30px;
    }

    .input-wrapper {
        height: 54px;
    }

    .login-button {
        height: 54px;
    }
}

/* =========================================================
   REMEMBER ME + FORGOT PASSWORD
========================================================= */

.login-options {
    display: flex;

    align-items: center;
    justify-content: space-between;

    margin-top: 4px;
    margin-bottom: 22px;
}


.remember-me {
    display: flex;

    align-items: center;

    gap: 8px;

    margin: 0;

    color: #718087;

    font-size: 15px;

    font-weight: 600;

    cursor: pointer;

    user-select: none;
    
    color: #4fa668;
}


.remember-me input {
    width: 16px;
    height: 16px;

    margin: 0;

    accent-color: #69B578;

    cursor: pointer;
}


.remember-me span {
    cursor: pointer;
}


.login-options .forgot-password {
    margin: 0;
}


/* =========================================================
   FINAL RESPONSIVE OVERRIDE
   Desktop / laptop > 1100px: original styles unchanged.
   Tablet: Huawei MatePad PaperMatte 11.5"
   Phone: <= 576px
   ========================================================= */

/* ---------- TABLET LANDSCAPE ---------- */
@media (min-width: 901px) and (max-width: 1100px) {
    .login-page {
        min-height: 100vh;
        height: auto;
        padding: 16px;
        overflow-y: auto;
    }

    .login-card {
        width: 100%;
        max-width: 1050px;
        height: calc(100vh - 32px);
        min-height: 560px;
        max-height: 760px;
        border-radius: 24px;
    }

    .login-visual {
        padding: 25px 28px;
    }

    .visual-logo {
        width: min(320px, 82%);
    }

    .visual-motto {
        font-size: 24px;
        line-height: 1.25;
        margin-top: 18px;
    }

    .login-form-side {
        padding: 28px 34px;
    }

    .login-title {
        font-size: 50px;
        line-height: 1.05;
    }

    .login-subtitle {
        font-size: 15px;
        margin-bottom: 28px;
    }

    .input-wrapper,
    .login-button {
        height: 54px;
    }

    .login-button {
        font-size: 15px;
    }
}


/* ---------- TABLET PORTRAIT ---------- */
@media (min-width: 577px) and (max-width: 900px) {
    .login-page {
        min-height: 100vh;
        height: auto;
        padding: 18px;
        overflow-y: auto;
        align-items: flex-start;
    }

    .login-card {
        width: 100%;
        max-width: 720px;
        height: auto;
        min-height: 0;
        display: block;
        border-radius: 24px;
    }

    .login-visual {
        min-height: 410px;
        padding: 30px 28px;
    }

    .visual-logo {
        width: min(300px, 62%);
    }

    .visual-motto {
        font-size: 24px;
        line-height: 1.25;
        margin-top: 16px;
    }

    .login-form-side {
        padding: 38px 42px 42px;
    }

    .login-title {
        font-size: 48px;
        line-height: 1.08;
    }

    .login-subtitle {
        font-size: 15px;
        margin-bottom: 30px;
    }

    .input-wrapper,
    .login-button {
        height: 56px;
    }

    .login-button {
        font-size: 15px;
    }
}


/* ---------- TABLET PORTRAIT - NARROW ---------- */
@media (min-width: 577px) and (max-width: 700px) {
    .login-page {
        padding: 14px;
    }

    .login-card {
        border-radius: 20px;
    }

    .login-visual {
        min-height: 360px;
        padding: 26px 22px;
    }

    .visual-logo {
        width: min(260px, 58%);
    }

    .visual-motto {
        font-size: 21px;
    }

    .login-form-side {
        padding: 32px 28px 36px;
    }

    .login-title {
        font-size: 42px;
    }
}


/* ---------- PHONE ---------- */
@media (max-width: 576px) {
    .login-page {
        min-height: 100vh;
        height: auto;
        padding: 12px;
        overflow-y: auto;
        align-items: flex-start;
    }

    .login-card {
        width: 100%;
        height: auto;
        min-height: 0;
        display: block;
        border-radius: 20px;
    }

    .login-visual {
        min-height: 330px;
        padding: 25px 18px;
    }

    .visual-logo {
        width: min(230px, 65%);
    }

    .visual-motto {
        font-size: 20px;
        line-height: 1.25;
        margin-top: 14px;
    }

    .login-form-side {
        padding: 30px 20px 34px;
    }

    .login-title {
        font-size: 38px;
        line-height: 1.08;
    }

    .login-subtitle {
        font-size: 14px;
        margin-bottom: 25px;
    }

    .input-wrapper,
    .login-button {
        height: 54px;
    }

    .login-button {
        font-size: 14px;
    }
}


/* ---------- SMALL PHONE ---------- */
@media (max-width: 380px) {
    .login-page {
        padding: 8px;
    }

    .login-card {
        border-radius: 16px;
    }

    .login-visual {
        min-height: 290px;
        padding: 22px 15px;
    }

    .visual-logo {
        width: min(200px, 62%);
    }

    .visual-motto {
        font-size: 18px;
    }

    .login-form-side {
        padding: 26px 16px 30px;
    }

    .login-title {
        font-size: 34px;
    }

    .login-subtitle {
        font-size: 13px;
        margin-bottom: 22px;
    }

    .input-wrapper,
    .login-button {
        height: 52px;
    }
}


/* ---------- SAFETY: prevent horizontal overflow ---------- */
@media (max-width: 1100px) {
    .login-page,
    .login-card,
    .login-visual,
    .login-form-side {
        max-width: 100%;
        box-sizing: border-box;
    }

    .login-card *,
    .login-visual *,
    .login-form-side * {
        max-width: 100%;
    }
}


/* =========================================================
   TABLET POLISH V2
   Tuned from Huawei MatePad 11.5" screenshots
   ========================================================= */

/* Landscape: keep the 2-column design, but force the whole
   card to fit inside the viewport and give the form enough room. */
@media (min-width: 901px) and (max-width: 1100px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .login-page {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 14px;
        overflow-x: hidden;
    }

    .login-card {
        width: min(100%, 1000px);
        max-width: 1000px;
        min-width: 0;
        grid-template-columns: 46% 54%;
        height: calc(100vh - 28px);
        max-height: 680px;
    }

    .login-visual {
        min-width: 0;
        padding: 20px 18px;
    }

    .visual-logo {
        width: min(285px, 72%);
        border-radius: 26px;
    }

    .visual-motto {
        max-width: 360px;
        font-size: 22px;
        margin-top: 14px;
        padding-top: 14px;
    }

    .login-form-side {
        min-width: 0;
        padding: 24px 28px;
    }

    .login-content {
        width: 100%;
        max-width: 430px;
    }

    .login-title {
        font-size: 48px;
    }

    .login-subtitle {
        font-size: 14px;
        margin-bottom: 24px;
    }
}


/* Portrait: make the visual section shorter and cleaner.
   The screenshot looked top-heavy because the logo/panel
   occupied too much vertical space before the form. */
@media (min-width: 577px) and (max-width: 900px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .login-page {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        padding: 14px;
        overflow-x: hidden;
        align-items: flex-start;
    }

    .login-card {
        width: min(100%, 700px);
        max-width: 700px;
        min-width: 0;
        display: block;
        height: auto;
        border-radius: 22px;
    }

    .login-visual {
        min-height: 0;
        height: 360px;
        padding: 22px 20px;
        box-sizing: border-box;
    }

    .visual-logo {
        width: min(235px, 48%);
        border-radius: 24px;
    }

    .visual-motto {
        max-width: 400px;
        margin-top: 10px;
        padding-top: 12px;
        font-size: 21px;
        line-height: 1.18;
    }

    .login-form-side {
        padding: 34px 34px 38px;
    }

    .login-content {
        width: 100%;
        max-width: 540px;
        margin: 0 auto;
    }

    .login-title {
        font-size: 46px;
    }

    .login-subtitle {
        font-size: 15px;
        margin-bottom: 28px;
    }
}


/* Portrait MatePad: slightly more breathing room at the
   common ~640px CSS viewport width. */
@media (min-width: 577px) and (max-width: 700px) {
    .login-page {
        padding: 12px;
    }

    .login-card {
        width: 100%;
        border-radius: 20px;
    }

    .login-visual {
        height: 330px;
        padding: 18px 16px;
    }

    .visual-logo {
        width: 215px;
        max-width: 52%;
    }

    .visual-motto {
        font-size: 20px;
        margin-top: 8px;
        padding-top: 10px;
    }

    .login-form-side {
        padding: 30px 28px 34px;
    }

    .login-title {
        font-size: 43px;
    }
}
