/* Login refinements loaded independently of Vite so the deployed build stays usable. */
@media (min-width: 900px) {
    html:has(.auth-wrapper),
    body:has(.auth-wrapper) {
        height: 100%;
        overflow: hidden;
    }

    .auth-wrapper {
        height: 100svh;
        min-height: 0;
        padding: 1rem;
        overflow: hidden;
    }

    .auth-shell {
        height: min(720px, calc(100svh - 2rem));
        min-height: 0;
    }

    .auth-showcase {
        padding: clamp(1.5rem, 2.5vw, 2.5rem);
    }

    .auth-brand-lockup {
        max-width: 205px;
        padding: 0.4rem 0.65rem;
        border-radius: 13px;
    }

    .auth-showcase-content {
        padding-block: 1.5rem 1rem;
    }

    .auth-showcase h2 {
        margin-block: 0.8rem 0.65rem;
        font-size: clamp(2rem, 3.2vw, 3rem);
    }

    .auth-showcase-content > p {
        margin-bottom: 1.2rem;
        line-height: 1.55;
    }

    .auth-feature-grid {
        gap: 0.5rem;
    }

    .auth-feature > span {
        width: 38px;
        height: 38px;
        flex-basis: 38px;
        border-radius: 10px;
    }

    .auth-panel {
        padding: clamp(2rem, 4vw, 3.5rem);
    }

    .auth-heading-icon {
        width: 46px;
        height: 46px;
        margin-bottom: 0.85rem;
    }

    .auth-card h1 {
        margin-block: 0.3rem 0.4rem;
    }

    .auth-card .auth-subtitle {
        margin-bottom: 1.35rem;
    }

    .auth-footer {
        margin-top: 1.5rem;
    }
}

.auth-card .input-group {
    min-height: 56px;
    overflow: visible;
    border: 1px solid #caddec;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f5faff 100%);
    box-shadow:
        0 7px 18px rgba(17, 23, 79, 0.055),
        inset 0 1px 0 rgba(255, 255, 255, 0.95);
}

.auth-card .input-group:hover {
    border-color: #8abff2;
    box-shadow:
        0 9px 22px rgba(8, 120, 249, 0.09),
        inset 0 1px 0 #fff;
}

.auth-card .input-group-text {
    align-self: center;
    width: 40px;
    height: 40px;
    margin-left: 7px;
    padding: 0;
    justify-content: center;
    border-radius: 11px !important;
    background: linear-gradient(145deg, #ecf7ff, #dff2ff);
    color: #0878f9;
    font-size: 1rem;
}

.auth-card .form-control {
    min-height: 54px;
    padding-inline: 0.8rem;
    font-size: 0.95rem;
}

.auth-card .form-control::placeholder {
    color: #91a3b6;
    opacity: 1;
}

.auth-card .input-group:focus-within {
    border-color: #0878f9;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(8, 120, 249, 0.11),
        0 12px 28px rgba(8, 120, 249, 0.12);
}

.auth-card .input-group:focus-within .input-group-text {
    background: linear-gradient(145deg, #0878f9, #16b9eb);
    color: #fff;
    box-shadow: 0 5px 12px rgba(8, 120, 249, 0.22);
}

.auth-password-toggle {
    align-self: center;
    width: 42px;
    height: 42px;
    margin-right: 6px;
    padding: 0;
    border-radius: 11px !important;
}

.auth-options {
    margin-top: 0.15rem;
}

@media (max-height: 690px) and (min-width: 900px) {
    .auth-showcase-content > p,
    .auth-feature:nth-child(3),
    .auth-trust,
    .auth-footer {
        display: none;
    }

    .auth-showcase-content {
        padding-block: 0.75rem;
    }
}

@media (max-width: 899.98px) {
    .auth-mobile-logo {
        width: min(190px, 65%);
        margin-bottom: 1.5rem;
    }
}

/* Focused login: compact centered card with a clinical medicine backdrop. */
.auth-login-page .auth-wrapper {
    position: relative;
    isolation: isolate;
    background:
        radial-gradient(circle at 18% 22%, rgba(20, 191, 238, 0.3), transparent 24rem),
        radial-gradient(circle at 84% 78%, rgba(8, 120, 249, 0.34), transparent 28rem),
        linear-gradient(145deg, #051036 0%, #0c2461 48%, #0759a8 100%);
}

.auth-login-page .auth-wrapper::before {
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='220' viewBox='0 0 260 220'%3E%3Cg fill='none' stroke='%237bdcff' stroke-opacity='.12' stroke-width='2'%3E%3Cpath d='M34 42h24m-12-12v24'/%3E%3Crect x='168' y='28' width='54' height='24' rx='12' transform='rotate(-28 195 40)'/%3E%3Cpath d='M195 28v24' transform='rotate(-28 195 40)'/%3E%3Cpath d='M22 163h38l8-14 11 29 12-20h31'/%3E%3Ccircle cx='205' cy='165' r='24'/%3E%3Cpath d='M205 151v28m-14-14h28'/%3E%3C/g%3E%3C/svg%3E");
    background-position: center;
    content: '';
    opacity: 0.9;
    z-index: -2;
}

.auth-login-page .auth-wrapper::after {
    position: absolute;
    top: 50%;
    left: 50%;
    width: min(65vw, 760px);
    aspect-ratio: 1;
    border: 1px solid rgba(125, 225, 255, 0.12);
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 170, 240, 0.13), transparent 64%);
    box-shadow:
        0 0 0 70px rgba(15, 155, 230, 0.035),
        0 0 0 140px rgba(15, 155, 230, 0.025);
    content: '';
    transform: translate(-50%, -50%);
    z-index: -1;
}

.auth-login-page .auth-shell {
    display: block;
    width: min(510px, calc(100vw - 2rem));
    height: auto;
    min-height: 0;
    overflow: visible;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.auth-login-page .auth-showcase,
.auth-login-page .auth-mobile-logo {
    display: none;
}

.auth-login-page .auth-panel {
    width: 100%;
    min-height: 0;
    padding: clamp(1.6rem, 4vh, 2.4rem) clamp(1.5rem, 4vw, 2.6rem) 1.25rem;
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow:
        0 28px 75px rgba(2, 10, 38, 0.4),
        0 0 0 8px rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(22px);
}

.auth-login-page .auth-card {
    max-width: none;
}

.auth-login-page .auth-heading-icon {
    width: 44px;
    height: 44px;
    margin-bottom: 0.7rem;
    border-radius: 13px;
}

.auth-login-page .auth-card h1 {
    font-size: clamp(1.65rem, 4vw, 2rem);
}

.auth-login-page .auth-card .auth-subtitle {
    margin-bottom: 1.15rem;
    font-size: 0.9rem;
}

.auth-login-page .auth-card .input-group {
    min-height: 52px;
}

.auth-login-page .auth-card .form-control {
    min-height: 50px;
}

.auth-login-page .auth-card .input-group-text {
    width: 37px;
    height: 37px;
}

.auth-login-page .auth-submit {
    min-height: 50px;
}

.auth-login-page .auth-footer {
    margin-top: 1rem;
}

@media (max-width: 575.98px) {
    .auth-login-page .auth-wrapper {
        display: grid;
        min-height: 100svh;
        padding: 1rem;
    }

    .auth-login-page .auth-shell {
        min-height: 0;
    }

    .auth-login-page .auth-panel {
        min-height: 0;
        padding: 1.5rem 1.2rem 1rem;
        border-radius: 22px;
    }
}
