/* Hospital HIS login — professional enterprise theme */

@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Source+Serif+4:opsz,wght@8..60,600;8..60,700&display=swap');

body.login.hospital-erp-login {
    --erp-brand: #1a5f8a;
    --erp-navy: #0f3d5c;
    --erp-blue: #1f6b9a;
    --erp-sky: #3d8bb8;
    --erp-ice: #e8f1f7;
    --erp-mist: #f5f8fb;
    --erp-text: #163a52;
    --erp-muted: #5a7388;
    --erp-line: #c8d8e6;
    --login-card-w: min(960px, 92vw);
    --login-card-h: min(620px, calc(100vh - 56px));
    --login-card-h: min(620px, calc(100dvh - 56px));
    --login-hero-title: clamp(26px, 2.4vw + 14px, 40px);
    --login-form-title: clamp(22px, 1.4vw + 14px, 28px);
    font-family: 'Manrope', 'Segoe UI', sans-serif;
    background: #d9e6f0 !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden;
    overflow-y: hidden;
    height: 100vh;
    height: 100dvh;
    box-sizing: border-box;
    color: var(--erp-text);
}

body.login.hospital-erp-login *,
body.login.hospital-erp-login *::before,
body.login.hospital-erp-login *::after {
    box-sizing: border-box;
}

body.login.hospital-erp-login .login_main_container {
    background: transparent;
    padding: clamp(8px, 1.5vh, 16px) clamp(10px, 2vw, 20px) 8px;
    float: none;
    width: 100%;
    max-width: 100%;
    height: 100vh !important;
    height: 100dvh !important;
    min-height: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
    z-index: 1;
}

body.login.hospital-erp-login .login_main_container::before,
body.login.hospital-erp-login .login_main_container::after,
body.login.hospital-erp-login .login_left_box::after,
body.login.hospital-erp-login .login_right_box::before {
    display: none;
}

/* —— Background —— */
.hospital-login-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    background:
        radial-gradient(ellipse at 12% 8%, rgba(26, 95, 138, 0.18) 0%, transparent 48%),
        radial-gradient(ellipse at 92% 92%, rgba(15, 61, 92, 0.14) 0%, transparent 52%),
        linear-gradient(160deg, #c5d9e8 0%, #eaf2f8 48%, #d0e0ec 100%);
}

.hospital-login-bg::before {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.07;
    background-image:
        linear-gradient(rgba(15, 61, 92, 0.55) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 61, 92, 0.55) 1px, transparent 1px);
    background-size: 64px 64px;
}

.hospital-bg-wash {
    position: absolute;
    width: 52%;
    height: 52%;
    left: -10%;
    top: -14%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(26, 95, 138, 0.16) 0%, transparent 70%);
    animation: hospital-bg-wash 16s ease-in-out infinite;
}

.hospital-bg-wash-b {
    left: auto;
    right: -14%;
    top: auto;
    bottom: -20%;
    width: 46%;
    height: 46%;
    background: radial-gradient(circle, rgba(15, 61, 92, 0.18) 0%, transparent 70%);
    animation: hospital-bg-wash 20s ease-in-out infinite reverse;
}

.hospital-bg-ecg {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 16%;
    width: 100%;
    height: 64px;
    opacity: 0.22;
}

.hospital-bg-ecg-line {
    fill: none;
    stroke: #1a5f8a;
    stroke-width: 2;
    stroke-linejoin: round;
    stroke-linecap: round;
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: hospital-bg-ecg-run 5s linear infinite;
}

body.hospital-ecg-js .hospital-bg-ecg-line,
body.hospital-ecg-js .hospital-ecg-line {
    animation: none;
}

@keyframes hospital-bg-wash {
    0%, 100% { transform: translate3d(0, 0, 0); opacity: 0.85; }
    50% { transform: translate3d(10%, 6%, 0); opacity: 1; }
}

@keyframes hospital-bg-ecg-run {
    0% { stroke-dashoffset: 1400; }
    70% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -1400; }
}

/* —— Alerts —— */
body.login.hospital-erp-login .hospital-login-alerts {
    position: fixed;
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: 92%;
    max-width: 520px;
    z-index: 50;
    margin: 0;
    pointer-events: none;
}

body.login.hospital-erp-login .hospital-login-alerts .message {
    pointer-events: auto;
    border-radius: 10px;
    margin: 0 0 8px;
    border: 0;
    padding: 12px 16px;
    width: 100%;
    box-shadow: 0 12px 28px rgba(15, 61, 92, 0.16);
}

.hospital-alert-strong {
    font-weight: 600;
}

/* —— Card shell —— */
body.login.hospital-erp-login .codfox_login_wrapper {
    width: var(--login-card-w);
    max-width: var(--login-card-w);
    height: var(--login-card-h);
    max-height: var(--login-card-h);
    aspect-ratio: 1.58 / 1;
    position: relative;
    z-index: 10;
    overflow: hidden;
    border-radius: 18px;
    box-shadow:
        0 0 0 1px rgba(255, 255, 255, 0.65),
        0 24px 64px rgba(15, 61, 92, 0.2);
    background: #fff;
    display: flex;
    flex-wrap: nowrap;
    align-items: stretch;
    float: none;
    animation: hospital-card-in 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}

/* CSS fallback before JS: stack on narrow screens */
@media (max-width: 767px) {
    body.login.hospital-erp-login .codfox_login_wrapper {
        flex-direction: column;
        width: min(400px, calc(100vw - 16px)) !important;
        max-width: min(400px, calc(100vw - 16px)) !important;
        height: auto !important;
        max-height: calc(100dvh - 16px) !important;
        aspect-ratio: auto;
        overflow: hidden !important;
    }

    body.login.hospital-erp-login .codfox_login_wrapper > .col-md-7 {
        width: 100%;
        max-width: 100%;
        flex: 0 1 auto;
        max-height: 32%;
        height: auto;
    }

    body.login.hospital-erp-login .codfox_login_wrapper > form {
        width: 100%;
        max-width: 100%;
        flex: 1 0 auto;
        height: auto;
    }

    body.login.hospital-erp-login .login_img,
    body.login.hospital-erp-login .hospital-login-ecg,
    body.login.hospital-erp-login .hospital-orb {
        display: none !important;
    }

    body.login.hospital-erp-login .login_left_box {
        height: auto;
        justify-content: center;
        padding: 16px 20px 14px;
    }

    body.login.hospital-erp-login .login_right_box {
        height: auto;
        overflow: hidden;
        justify-content: flex-start;
    }

    body.login.hospital-erp-login .login_form_box {
        padding: 18px 20px 20px;
        max-width: none;
    }
}

@keyframes hospital-card-in {
    from {
        opacity: 0;
        transform: translate3d(0, 18px, 0) scale(0.985);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0) scale(1);
    }
}

body.login.hospital-erp-login .codfox_login_wrapper > .col-md-7,
body.login.hospital-erp-login .codfox_login_wrapper > form,
body.login.hospital-erp-login .codfox_login_wrapper > form > .col-md-5 {
    float: none;
}

body.login.hospital-erp-login .codfox_login_wrapper > .col-md-7 {
    width: 52%;
    flex: 1 1 52%;
    max-width: 52%;
    padding: 0 !important;
    height: 100%;
    min-height: 0;
    display: flex;
}

body.login.hospital-erp-login .codfox_login_wrapper > form {
    width: 48%;
    flex: 1 1 48%;
    max-width: 48%;
    margin: 0;
    display: flex;
    height: 100%;
    min-height: 0;
}

body.login.hospital-erp-login .codfox_login_wrapper > form > .col-md-5 {
    width: 100%;
    max-width: 100%;
    flex: 1;
    padding: 0 !important;
    display: flex;
    height: 100%;
    min-height: 0;
}

/* —— Hero panel —— */
body.login.hospital-erp-login .login_left_box {
    min-height: 0;
    height: 100%;
    width: 100%;
    background:
        radial-gradient(circle at 85% 10%, rgba(255, 255, 255, 0.14) 0%, transparent 34%),
        linear-gradient(155deg, #0f3d5c 0%, #1a5f8a 48%, #164f72 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(24px, 3.2vh, 40px) clamp(22px, 2.6vw, 36px) clamp(18px, 2.4vh, 28px);
    color: #fff;
    position: relative;
    overflow: hidden;
}

body.login.hospital-erp-login .login_left_box::before {
    content: '';
    position: absolute;
    left: -36%;
    top: -18%;
    width: 78%;
    height: 68%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 68%);
    pointer-events: none;
}

.hospital-orb {
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hospital-orb-a {
    width: 180px;
    height: 180px;
    right: -50px;
    top: 24%;
    background: rgba(255, 255, 255, 0.07);
    animation: hospital-orb-float 10s ease-in-out infinite;
}

.hospital-orb-b {
    width: 100px;
    height: 100px;
    left: -28px;
    bottom: 16%;
    background: rgba(255, 255, 255, 0.06);
    animation: hospital-orb-float 8s ease-in-out infinite reverse;
}

@keyframes hospital-orb-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -12px, 0); }
}

.hospital-login-kicker {
    display: inline-block;
    margin: 0 0 14px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.78);
}

.hospital-login-hero-copy {
    position: relative;
    z-index: 2;
}

.hospital-login-hero-copy h1 {
    margin: 0 0 14px;
    font-family: 'Source Serif 4', Georgia, serif;
    font-size: var(--login-hero-title);
    font-weight: 700;
    line-height: 1.18;
    color: #fff;
    letter-spacing: -0.02em;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

body.hospital-anim-on .hospital-login-hero-copy h1 {
    animation: hospital-title-in 0.7s ease;
}

@keyframes hospital-title-in {
    from { opacity: 0; transform: translate3d(0, 10px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}

.hospital-login-hero-copy p:not(.hospital-login-kicker) {
    margin: 0;
    font-size: 15px;
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.82);
    max-width: 360px;
    font-weight: 400;
}

body.login.hospital-erp-login .login_img {
    float: none;
    flex: 1 1 auto;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px 0;
    position: relative;
    z-index: 2;
}

.hospital-scene {
    position: relative;
    width: 100%;
    max-width: min(300px, 88%);
    min-width: 120px;
    z-index: 2;
    animation: hospital-scene-float 7s ease-in-out infinite;
}

@keyframes hospital-scene-float {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(0, -6px, 0); }
}

.hospital-scene-svg {
    width: 100%;
    height: auto;
    min-height: 120px;
    max-height: 34vh;
    display: block;
    opacity: 0.95;
}

.hospital-win {
    animation: hospital-win 3s ease-in-out infinite;
}

.hospital-win.w2 { animation-delay: 0.35s; }
.hospital-win.w3 { animation-delay: 0.7s; }
.hospital-win.w4 { animation-delay: 0.15s; }
.hospital-win.w5 { animation-delay: 1s; }
.hospital-win.w6 { animation-delay: 0.5s; }
.hospital-win.w7 { animation-delay: 0.85s; }

@keyframes hospital-win {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.hospital-login-ecg {
    height: 36px;
    width: 100%;
    opacity: 0.75;
    position: relative;
    z-index: 2;
}

.hospital-ecg-line {
    stroke-dasharray: 520;
    stroke-dashoffset: 520;
    animation: hospital-ecg-run 3.4s ease-in-out infinite;
}

@keyframes hospital-ecg-run {
    0% { stroke-dashoffset: 520; opacity: 0.25; }
    35% { stroke-dashoffset: 0; opacity: 1; }
    70% { stroke-dashoffset: -520; opacity: 0.25; }
    100% { stroke-dashoffset: -520; opacity: 0.2; }
}

/* —— Form panel —— */
body.login.hospital-erp-login .login_right_box {
    position: relative;
    min-height: 0;
    height: 100%;
    width: 100%;
    background: #fff;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    flex: 1;
    overflow: hidden;
}

body.login.hospital-erp-login .login_form_box {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding: clamp(24px, 3.5vh, 40px) clamp(24px, 3vw, 40px);
    float: none;
    position: relative;
    z-index: 1;
}

body.login.hospital-erp-login .codfox_login_logo {
    text-align: center;
    margin: 0 0 18px;
    float: none;
}

body.login.hospital-erp-login .codfox_login_logo img,
.hospital-login-logo-img {
    max-width: 160px !important;
    max-height: 64px !important;
    width: auto !important;
    height: auto !important;
    display: inline-block;
    object-fit: contain;
}

.hospital-login-form-title {
    text-align: left;
    margin: 0 0 22px;
}

.hospital-login-form-title h2 {
    margin: 0 0 6px;
    font-size: var(--login-form-title);
    font-weight: 700;
    color: var(--erp-navy);
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.hospital-login-form-title p {
    margin: 0;
    font-size: 13.5px;
    color: var(--erp-muted);
    font-weight: 500;
}

body.login.hospital-erp-login .form-group {
    margin-bottom: 16px;
    float: none;
}

body.login.hospital-erp-login .form-group.no-margin {
    margin-bottom: 0;
}

body.login.hospital-erp-login label.blue {
    display: block;
    float: none;
    margin: 0 0 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--erp-navy);
}

body.login.hospital-erp-login .error_red {
    display: block;
    color: #c0392b;
    font-size: 12px;
    margin: 0 0 8px;
}

.hospital-input-wrap {
    position: relative;
}

.hospital-input-wrap .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--erp-muted);
    font-size: 14px;
    pointer-events: none;
    z-index: 2;
}

body.login.hospital-erp-login .login_form_box {
    margin-top: 0;
}

body.login.hospital-erp-login .hospital-input-wrap .form-control {
    height: 46px !important;
    padding: 10px 44px 10px 40px;
    border: 1px solid var(--erp-line);
    border-radius: 10px;
    background: var(--erp-mist);
    box-shadow: none;
    font-size: 14.5px;
    color: var(--erp-text);
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

body.login.hospital-erp-login .hospital-input-wrap .form-control:focus {
    border-color: var(--erp-brand);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(26, 95, 138, 0.14);
    outline: 0;
}

body.login.hospital-erp-login .hospital-input-wrap .form-control::placeholder {
    color: #8aa0b3;
}

.hospital-toggle-pass {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    color: var(--erp-muted);
    border-radius: 8px;
    cursor: pointer;
    z-index: 2;
}

.hospital-toggle-pass:hover,
.hospital-toggle-pass:focus {
    color: var(--erp-brand);
    outline: 0;
}

.hospital-login-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 20px;
    flex-wrap: wrap;
}

.hospital-login-meta .padding_sm {
    padding: 0;
    float: none;
    margin: 0;
}

.hospital-login-meta label {
    font-size: 13px;
    font-weight: 500;
    color: var(--erp-muted);
    margin: 0 0 0 4px;
    cursor: pointer;
}

.hospital-login-meta a {
    font-size: 13px;
    font-weight: 600;
    color: var(--erp-brand);
    text-decoration: none;
}

.hospital-login-meta a:hover {
    color: var(--erp-navy);
    text-decoration: underline;
}

body.login.hospital-erp-login .signin_btn {
    height: 48px !important;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(180deg, #2174a3 0%, #1a5f8a 100%);
    color: #fff !important;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 10px 22px rgba(26, 95, 138, 0.28);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 0 16px;
    transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

body.login.hospital-erp-login .signin_btn:hover,
body.login.hospital-erp-login .signin_btn:focus {
    filter: brightness(1.05);
    box-shadow: 0 12px 26px rgba(26, 95, 138, 0.34);
    color: #fff !important;
    outline: 0;
}

body.login.hospital-erp-login .signin_btn:active {
    transform: translateY(1px);
}

body.login.hospital-erp-login .signin_btn i {
    font-size: 13px;
    transition: transform 0.2s ease;
}

body.login.hospital-erp-login .signin_btn:hover i {
    transform: translateX(3px);
}

.hospital-login-secure {
    margin: 18px 0 0;
    text-align: center;
    font-size: 12px;
    color: var(--erp-muted);
    font-weight: 500;
}

.hospital-login-secure i {
    margin-right: 6px;
    color: var(--erp-brand);
}

/* —— Footer —— */
.hospital-login-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 12px;
    color: var(--erp-muted);
    font-weight: 500;
    text-align: center;
    min-height: 18px;
    flex-shrink: 0;
}

.hospital-login-footer b,
.hospital-login-footer span {
    font-weight: 500;
}

.hospital-login-version {
    opacity: 0.75;
}

.hospital-login-version::before {
    content: '·';
    margin-right: 12px;
    opacity: 0.5;
}

/* —— Stacked: form first priority, no card scroll —— */
body.login.hospital-erp-login .codfox_login_wrapper.is-stacked {
    display: flex !important;
    flex-direction: column;
    flex-wrap: nowrap;
    width: 100% !important;
    max-width: min(400px, calc(100vw - 16px)) !important;
    height: auto !important;
    max-height: calc(100vh - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    aspect-ratio: auto;
    overflow: hidden !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked > .col-md-7 {
    width: 100%;
    max-width: 100%;
    flex: 0 1 auto;
    min-height: 0;
    height: auto;
    max-height: 32%;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked > form {
    width: 100%;
    max-width: 100%;
    flex: 1 0 auto;
    min-height: 0;
    height: auto;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked > form > .col-md-5 {
    height: auto;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .login_left_box {
    min-height: 0;
    height: auto;
    justify-content: center;
    padding: 16px 20px 14px;
    gap: 0;
}

/* Hide heavy hero chrome so Sign in always fits */
body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .login_img,
body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-ecg,
body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-orb {
    display: none !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-kicker {
    margin: 0 0 6px;
    font-size: 10px;
    letter-spacing: 0.12em;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-hero-copy h1 {
    margin: 0 0 6px;
    font-size: clamp(22px, 6vw, 28px);
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-hero-copy p:not(.hospital-login-kicker) {
    font-size: 12.5px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .login_right_box {
    height: auto;
    overflow: hidden;
    justify-content: flex-start;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .login_form_box {
    padding: 18px 20px 20px;
    max-width: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .codfox_login_logo {
    margin: 0 0 10px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .codfox_login_logo img,
body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-logo-img {
    max-height: 48px !important;
    max-width: 120px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-form-title {
    margin: 0 0 14px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-form-title h2 {
    font-size: 22px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .form-group {
    margin-bottom: 12px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-input-wrap .form-control {
    height: 44px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-meta {
    margin: 2px 0 14px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .signin_btn {
    height: 46px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-secure {
    margin: 12px 0 0;
}

/* Compact: short viewports */
body.login.hospital-erp-login .codfox_login_wrapper.is-compact.is-stacked > .col-md-7 {
    max-height: 24%;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact.is-stacked .hospital-login-hero-copy p:not(.hospital-login-kicker) {
    display: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .login_form_box {
    padding: 14px 18px 16px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-login-form-title {
    margin: 0 0 10px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-login-form-title p {
    display: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .codfox_login_logo {
    margin: 0 0 8px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .codfox_login_logo img,
body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-login-logo-img {
    max-height: 40px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .form-group {
    margin-bottom: 10px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-input-wrap .form-control {
    height: 40px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-login-meta {
    margin: 0 0 12px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .signin_btn {
    height: 42px !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact .hospital-login-secure {
    display: none;
}

/* Dense: very short phones */
body.login.hospital-erp-login .codfox_login_wrapper.is-dense.is-stacked > .col-md-7 {
    max-height: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense.is-stacked .login_left_box {
    padding: 12px 16px 10px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense.is-stacked .hospital-login-kicker {
    display: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense.is-stacked .hospital-login-hero-copy h1 {
    margin: 0;
    font-size: 20px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense .codfox_login_logo {
    display: none;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense .login_form_box {
    padding: 12px 16px 14px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-dense .hospital-login-form-title h2 {
    font-size: 18px;
}

/* Side-by-side short height */
body.login.hospital-erp-login .codfox_login_wrapper.is-short .login_img,
body.login.hospital-erp-login .codfox_login_wrapper.is-short .hospital-login-ecg {
    display: none !important;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-short .login_left_box {
    justify-content: center;
    padding: clamp(16px, 2.5vh, 28px) clamp(18px, 2vw, 28px);
}

body.login.hospital-erp-login .codfox_login_wrapper.is-short .login_form_box {
    padding: clamp(16px, 2.5vh, 28px) clamp(18px, 2.5vw, 32px);
}

body.login.hospital-erp-login .codfox_login_wrapper.is-short .hospital-login-secure {
    margin-top: 10px;
}

body.login.hospital-erp-login .codfox_login_wrapper.is-compact:not(.is-stacked) .codfox_login_logo img,
body.login.hospital-erp-login .codfox_login_wrapper.is-compact:not(.is-stacked) .hospital-login-logo-img {
    max-height: 44px !important;
}

/* Page shell — always fit viewport */
@media (max-width: 767px) {
    body.login.hospital-erp-login {
        overflow: hidden;
        height: 100vh;
        height: 100dvh;
    }

    body.login.hospital-erp-login .login_main_container {
        height: 100vh !important;
        height: 100dvh !important;
        min-height: 0;
        overflow: hidden;
        padding: 8px;
        gap: 6px;
        justify-content: center;
    }

    body.login.hospital-erp-login .hospital-login-footer {
        font-size: 11px;
        min-height: 0;
    }

    body.login.hospital-erp-login .hospital-login-alerts {
        top: 8px;
        max-width: calc(100vw - 16px);
    }
}

@media (max-height: 560px) {
    body.login.hospital-erp-login .login_main_container {
        padding: 6px;
        gap: 4px;
    }

    body.login.hospital-erp-login .hospital-login-footer {
        display: none;
    }
}

@media (max-width: 480px) {
    body.login.hospital-erp-login .codfox_login_wrapper.is-stacked .hospital-login-meta {
        flex-direction: row;
        align-items: center;
        gap: 8px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body.login.hospital-erp-login *,
    body.login.hospital-erp-login *::before,
    body.login.hospital-erp-login *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
