:root {
    --login-primary: #0f766e;
    --login-primary-dark: #095f59;
    --login-primary-soft: #e8f8f5;
    --login-text: #102321;
    --login-muted: #667775;
    --login-line: #dce8e5;
    --login-danger: #b42318;
    --login-success: #087443;
}

body.patient-login-modern-page {
    min-height: 100vh;
    min-height: 100dvh;
    margin: 0;
    overflow-x: hidden;
    background:
        radial-gradient(
            circle at 5% 5%,
            rgba(20, 184, 166, 0.16),
            transparent 32%
        ),
        radial-gradient(
            circle at 96% 4%,
            rgba(59, 130, 246, 0.12),
            transparent 31%
        ),
        linear-gradient(145deg, #f5fbfa, #f8fafc);
    color: var(--login-text);
}

.patient-login-background {
    position: fixed;
    inset: 0;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.patient-login-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(2px);
    opacity: 0.52;
    animation: patientLoginFloat 10s ease-in-out infinite;
}

.patient-login-orb.one {
    width: 270px;
    height: 270px;
    top: -100px;
    left: -80px;
    background: rgba(45, 212, 191, 0.22);
}

.patient-login-orb.two {
    width: 330px;
    height: 330px;
    right: -160px;
    bottom: -150px;
    background: rgba(96, 165, 250, 0.17);
    animation-delay: -4s;
}

.patient-login-shell {
    width: min(1160px, calc(100% - 32px));
    min-height: calc(100dvh - 40px);
    margin: 20px auto;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    overflow: hidden;
    border: 1px solid rgba(15, 118, 110, 0.12);
    border-radius: 34px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow:
        0 28px 90px rgba(15, 31, 30, 0.12),
        0 2px 10px rgba(15, 31, 30, 0.04);
    backdrop-filter: blur(18px);
    opacity: 0;
    transform: translateY(18px);
    transition:
        opacity 0.55s ease,
        transform 0.55s ease;
}

body.patient-login-ready .patient-login-shell {
    opacity: 1;
    transform: translateY(0);
}

.patient-login-visual {
    position: relative;
    overflow: hidden;
    min-height: 680px;
    padding: clamp(38px, 6vw, 72px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background:
        radial-gradient(
            circle at 82% 16%,
            rgba(255, 255, 255, 0.17),
            transparent 28%
        ),
        linear-gradient(145deg, #075e58, #0f766e 52%, #13938a);
    color: #ffffff;
}

.patient-login-visual::before,
.patient-login-visual::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.16);
}

.patient-login-visual::before {
    width: 380px;
    height: 380px;
    right: -190px;
    top: -145px;
}

.patient-login-visual::after {
    width: 260px;
    height: 260px;
    left: -140px;
    bottom: -120px;
}

.patient-login-brand {
    position: relative;
    z-index: 2;
}

.patient-login-brand img {
    display: block;
    width: min(330px, 90%);
    max-height: 150px;
    object-fit: contain;
    object-position: left center;
    filter:
        drop-shadow(0 10px 22px rgba(0, 0, 0, 0.12));
}

.patient-login-welcome {
    position: relative;
    z-index: 2;
    max-width: 590px;
    margin-top: 45px;
}

.patient-login-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, 0.23);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.11);
    font-size: 12px;
    font-weight: 800;
}

.patient-login-welcome h2 {
    max-width: 590px;
    margin: 20px 0 14px;
    color: #ffffff;
    font-size: clamp(37px, 5vw, 63px);
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.patient-login-welcome > p {
    max-width: 540px;
    margin: 0;
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(16px, 2vw, 19px);
    line-height: 1.65;
}

.patient-login-features {
    position: relative;
    z-index: 2;
    display: grid;
    gap: 12px;
    margin-top: 32px;
}

.patient-login-feature {
    display: grid;
    grid-template-columns: 42px 1fr;
    align-items: center;
    gap: 13px;
    max-width: 500px;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.13);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
}

.patient-login-feature-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    background: rgba(255, 255, 255, 0.15);
    font-size: 19px;
}

.patient-login-feature b,
.patient-login-feature span {
    display: block;
}

.patient-login-feature b {
    color: #ffffff;
    font-size: 14px;
}

.patient-login-feature span {
    margin-top: 3px;
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    line-height: 1.4;
}

.patient-login-message-preview {
    position: relative;
    z-index: 2;
    width: min(410px, 94%);
    margin: 38px 0 0 auto;
    padding: 17px;
    border: 1px solid rgba(255, 255, 255, 0.19);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 45px rgba(3, 40, 37, 0.18);
    backdrop-filter: blur(12px);
    animation: patientMessageFloat 4s ease-in-out infinite;
}

.patient-login-message-preview small {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.67);
    font-size: 11px;
    font-weight: 700;
}

.patient-login-message-preview p {
    margin: 0;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.5;
}

.patient-login-panel {
    position: relative;
    min-width: 0;
    padding: clamp(30px, 5vw, 64px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: rgba(255, 255, 255, 0.94);
}

.patient-login-mobile-logo {
    display: none;
}

.patient-login-panel-top {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 32px;
}

.patient-login-install-link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 12px;
    border: 1px solid var(--login-line);
    border-radius: 999px;
    background: #ffffff;
    color: var(--login-primary);
    box-shadow: 0 5px 16px rgba(15, 31, 30, 0.05);
    font-size: 12px;
    font-weight: 800;
    text-decoration: none;
}

.patient-login-install-link:hover,
.patient-login-install-link:focus-visible {
    border-color: rgba(15, 118, 110, 0.45);
    background: var(--login-primary-soft);
}

.patient-login-form-head {
    margin-bottom: 25px;
}

.patient-login-secure-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 12px;
    color: var(--login-primary);
    font-size: 12px;
    font-weight: 850;
}

.patient-login-form-head h1 {
    margin: 0;
    color: var(--login-text);
    font-size: clamp(31px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.patient-login-form-head p {
    margin: 11px 0 0;
    color: var(--login-muted);
    font-size: 14px;
    line-height: 1.55;
}

.patient-login-alert {
    margin: 0 0 17px;
    padding: 12px 14px;
    border: 1px solid var(--login-line);
    border-radius: 14px;
    font-size: 13px;
    font-weight: 650;
    line-height: 1.45;
}

.patient-login-alert.danger {
    border-color: #ffd3ce;
    background: #fff1f0;
    color: var(--login-danger);
}

.patient-login-alert.success {
    border-color: #b9ead3;
    background: #edfdf5;
    color: var(--login-success);
}

.patient-login-alert.neutral {
    background: #f2f8f7;
    color: #365c58;
}

.patient-login-form {
    width: 100%;
}

.patient-login-field-row {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 12px;
}

.patient-login-field {
    display: block;
    margin: 0 0 17px;
}

.patient-login-field-label {
    display: block;
    margin-bottom: 7px;
    color: #284744;
    font-size: 13px;
    font-weight: 800;
}

.patient-login-field-control {
    position: relative;
}

.patient-login-field input,
.patient-login-field select {
    width: 100%;
    height: 54px;
    margin: 0;
    padding: 0 15px;
    border: 1px solid var(--login-line);
    border-radius: 14px;
    outline: none;
    background: #ffffff;
    color: var(--login-text);
    box-shadow: 0 2px 7px rgba(15, 31, 30, 0.025);
    font: inherit;
    font-size: 16px;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease,
        transform 0.2s ease;
}

.patient-login-field select {
    cursor: pointer;
}

.patient-login-field input:focus,
.patient-login-field select:focus {
    border-color: var(--login-primary);
    box-shadow:
        0 0 0 4px rgba(15, 118, 110, 0.11),
        0 7px 18px rgba(15, 31, 30, 0.05);
}

.patient-login-pin-input {
    padding-right: 60px !important;
    letter-spacing: 0.18em;
}

.patient-login-pin-toggle {
    position: absolute;
    top: 50%;
    right: 8px;
    min-width: 43px;
    min-height: 38px;
    margin: 0;
    padding: 5px 8px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--login-primary);
    transform: translateY(-50%);
    font-size: 11px;
    font-weight: 850;
}

.patient-login-pin-toggle:hover,
.patient-login-pin-toggle:focus-visible {
    background: var(--login-primary-soft);
}

.patient-login-help {
    margin: -9px 0 18px;
    color: var(--login-muted);
    font-size: 12px;
    line-height: 1.5;
}

.patient-login-primary-button {
    width: 100%;
    min-height: 56px;
    margin: 3px 0 0;
    border: 0;
    border-radius: 15px;
    background:
        linear-gradient(
            135deg,
            var(--login-primary),
            #11968c
        );
    color: #ffffff;
    box-shadow:
        0 12px 28px rgba(15, 118, 110, 0.24);
    font-size: 15px;
    font-weight: 900;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.patient-login-primary-button:hover,
.patient-login-primary-button:focus-visible {
    transform: translateY(-1px);
    box-shadow:
        0 16px 34px rgba(15, 118, 110, 0.3);
}

.patient-login-secondary-action {
    width: 100%;
    min-height: 48px;
    margin-top: 10px;
    border: 1px solid var(--login-line);
    border-radius: 14px;
    background: transparent;
    color: #365c58;
    font-size: 13px;
    font-weight: 800;
    text-decoration: none;
}

a.patient-login-secondary-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.patient-login-secondary-action:hover,
.patient-login-secondary-action:focus-visible {
    border-color: rgba(15, 118, 110, 0.38);
    background: var(--login-primary-soft);
    color: var(--login-primary);
}

.patient-login-divider {
    display: flex;
    align-items: center;
    gap: 11px;
    margin: 24px 0 16px;
    color: #8a9997;
    font-size: 11px;
    font-weight: 750;
}

.patient-login-divider::before,
.patient-login-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--login-line);
}

.patient-login-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    color: var(--login-muted);
    font-size: 11px;
    text-align: center;
}

.patient-login-hidden-options {
    position: fixed;
    right: 6px;
    bottom: max(6px, env(safe-area-inset-bottom));
    z-index: 100;
    width: 25px;
    height: 25px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: transparent;
    color: #475569;
    font-size: 18px;
    line-height: 1;
    text-decoration: none;
    opacity: 0.16;
}

.patient-login-hidden-options:hover,
.patient-login-hidden-options:focus-visible {
    background: rgba(255, 255, 255, 0.92);
    opacity: 0.9;
}

@keyframes patientLoginFloat {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }
    50% {
        transform: translate3d(20px, -18px, 0) scale(1.05);
    }
}

@keyframes patientMessageFloat {
    0%, 100% {
        transform: translateY(0) rotate(-0.3deg);
    }
    50% {
        transform: translateY(-10px) rotate(0.4deg);
    }
}

@media (max-width: 900px) {
    .patient-login-shell {
        grid-template-columns: 1fr;
        width: min(620px, calc(100% - 24px));
        min-height: auto;
        margin: 12px auto;
        border-radius: 27px;
    }

    .patient-login-visual {
        min-height: auto;
        padding: 30px;
    }

    .patient-login-welcome {
        margin-top: 22px;
    }

    .patient-login-welcome h2 {
        max-width: 530px;
        font-size: clamp(32px, 8vw, 48px);
    }

    .patient-login-features,
    .patient-login-message-preview {
        display: none;
    }

    .patient-login-panel {
        padding: 34px 30px 40px;
    }
}

@media (max-width: 600px) {
    body.patient-login-modern-page {
        background: #f4faf8;
    }

    .patient-login-shell {
        width: 100%;
        min-height: 100dvh;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        background: #ffffff;
    }

    .patient-login-visual {
        display: none;
    }

    .patient-login-panel {
        min-height: 100dvh;
        padding:
            max(18px, env(safe-area-inset-top))
            18px
            max(28px, env(safe-area-inset-bottom));
        justify-content: flex-start;
    }

    .patient-login-mobile-logo {
        display: flex;
        justify-content: center;
        margin: 4px 0 20px;
    }

    .patient-login-mobile-logo img {
        display: block;
        width: min(235px, 74vw);
        max-height: 118px;
        object-fit: contain;
    }

    .patient-login-panel-top {
        justify-content: center;
        margin-bottom: 22px;
    }

    .patient-login-install-link {
        min-height: 35px;
        font-size: 11px;
    }

    .patient-login-form-head {
        margin-bottom: 22px;
        text-align: center;
    }

    .patient-login-form-head h1 {
        font-size: 32px;
    }

    .patient-login-form-head p {
        max-width: 380px;
        margin-left: auto;
        margin-right: auto;
    }

    .patient-login-field-row {
        grid-template-columns: 122px minmax(0, 1fr);
        gap: 9px;
    }

    .patient-login-field input,
    .patient-login-field select {
        height: 52px;
        padding-left: 12px;
        padding-right: 12px;
    }

    .patient-login-primary-button {
        min-height: 54px;
    }
}

@media (max-width: 390px) {
    .patient-login-panel {
        padding-left: 14px;
        padding-right: 14px;
    }

    .patient-login-field-row {
        grid-template-columns: 110px minmax(0, 1fr);
    }
}

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

    .patient-login-shell {
        opacity: 1;
        transform: none;
    }
}

/* NLH PATIENT LOGIN COMPACT V10 START */

/*
 * Make the installation control clearly visible on every
 * screen size instead of presenting it like a minor link.
 */
.patient-login-install-link {
    min-height: 46px;
    padding: 10px 18px;
    border: 1px solid #0f766e;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            #0f766e,
            #11968c
        );
    color: #ffffff;
    box-shadow:
        0 10px 24px rgba(15, 118, 110, 0.22);
    font-size: 13px;
    font-weight: 900;
    white-space: normal;
    line-height: 1.3;
    text-align: center;
}

.patient-login-install-link:hover,
.patient-login-install-link:focus-visible {
    border-color: #095f59;
    background:
        linear-gradient(
            135deg,
            #095f59,
            #0f887f
        );
    color: #ffffff;
    box-shadow:
        0 14px 30px rgba(15, 118, 110, 0.3);
    transform: translateY(-1px);
}

/*
 * Tablet and narrow-desktop one-column layout.
 * Retain the premium introduction but prevent it from
 * occupying most of the first visible screen.
 */
@media (max-width: 900px) and (min-width: 601px) {
    .patient-login-shell {
        width: min(760px, calc(100% - 20px));
        margin: 10px auto;
        border-radius: 26px;
    }

    .patient-login-visual {
        min-height: 0;
        padding: 21px 30px 24px;
    }

    .patient-login-brand img {
        width: min(215px, 62%);
        max-height: 84px;
    }

    .patient-login-welcome {
        margin-top: 8px;
    }

    .patient-login-eyebrow {
        padding: 5px 9px;
        font-size: 11px;
    }

    .patient-login-welcome h2 {
        max-width: 690px;
        margin: 12px 0 8px;
        font-size: clamp(30px, 5vw, 40px);
        line-height: 1.07;
    }

    .patient-login-welcome > p {
        max-width: 700px;
        font-size: 14px;
        line-height: 1.45;
    }

    .patient-login-panel {
        padding: 25px 32px 34px;
    }

    .patient-login-panel-top {
        justify-content: center;
        margin-bottom: 19px;
    }

    .patient-login-install-link {
        width: min(100%, 360px);
        min-height: 48px;
    }

    .patient-login-form-head {
        margin-bottom: 20px;
    }
}

/*
 * Phones already hide the large teal introduction.
 * Reduce the remaining logo/header area so the actual login
 * controls appear higher on the screen.
 */
@media (max-width: 600px) {
    .patient-login-panel {
        padding-top:
            max(10px, env(safe-area-inset-top));
    }

    .patient-login-mobile-logo {
        margin: 0 0 11px;
    }

    .patient-login-mobile-logo img {
        width: min(198px, 64vw);
        max-height: 90px;
    }

    .patient-login-panel-top {
        justify-content: center;
        margin-bottom: 16px;
    }

    .patient-login-install-link {
        width: min(100%, 370px);
        min-height: 48px;
        padding: 10px 14px;
        font-size: 13px;
    }

    .patient-login-form-head {
        margin-bottom: 18px;
    }

    .patient-login-form-head h1 {
        font-size: 30px;
    }

    .patient-login-form-head p {
        margin-top: 8px;
        line-height: 1.45;
    }

    .patient-login-secure-label {
        margin-bottom: 8px;
    }
}

/* NLH PATIENT LOGIN COMPACT V10 END */

/* NLH PATIENT LOGIN COMPACT ANIMATED V11 START */

/*
 * Animated premium installation button.
 */
.patient-login-install-link {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 50px;
    padding: 11px 20px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 15px;
    background:
        linear-gradient(
            115deg,
            #075e58,
            #0f9488,
            #1685c4,
            #0f766e
        );
    background-size: 260% 260%;
    color: #ffffff;
    box-shadow:
        0 12px 28px rgba(15, 118, 110, 0.28);
    font-size: 13px;
    font-weight: 900;
    line-height: 1.3;
    letter-spacing: 0.01em;
    text-align: center;
    text-decoration: none;
    animation:
        patientInstallGradient 5s ease infinite,
        patientInstallGlow 2.2s ease-in-out infinite;
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.patient-login-install-link::before {
    content: "";
    position: absolute;
    z-index: -1;
    top: -80%;
    left: -34%;
    width: 24%;
    height: 260%;
    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(255, 255, 255, 0.55),
            transparent
        );
    transform: rotate(22deg);
    animation: patientInstallShine 3.4s ease-in-out infinite;
}

.patient-login-install-link span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    font-size: 16px;
    animation: patientInstallArrow 1.55s ease-in-out infinite;
}

.patient-login-install-link:hover,
.patient-login-install-link:focus-visible {
    border-color: rgba(255, 255, 255, 0.55);
    color: #ffffff;
    transform: translateY(-2px) scale(1.015);
    box-shadow:
        0 17px 36px rgba(15, 118, 110, 0.38);
}

/*
 * Compact stacked layout for tablet and smaller desktop
 * windows. Keep the premium teal introduction, but make it
 * a short header so the login fields appear immediately.
 */
@media (max-width: 900px) and (min-width: 601px) {
    .patient-login-shell {
        width: min(760px, calc(100% - 18px));
        margin: 9px auto;
        border-radius: 25px;
    }

    .patient-login-visual {
        min-height: 0;
        padding: 13px 24px 15px;
    }

    .patient-login-brand img {
        width: min(168px, 46%);
        max-height: 61px;
    }

    .patient-login-welcome {
        margin-top: 1px;
    }

    .patient-login-eyebrow {
        margin-top: 2px;
        padding: 4px 8px;
        font-size: 10px;
    }

    .patient-login-welcome h2 {
        max-width: 700px;
        margin: 7px 0 0;
        font-size: clamp(25px, 4.2vw, 34px);
        line-height: 1.05;
        letter-spacing: -0.035em;
    }

    .patient-login-welcome > p {
        display: none;
    }

    .patient-login-features,
    .patient-login-message-preview {
        display: none;
    }

    .patient-login-panel {
        padding: 20px 30px 31px;
    }

    .patient-login-panel-top {
        justify-content: center;
        margin-bottom: 15px;
    }

    .patient-login-install-link {
        width: min(100%, 390px);
    }

    .patient-login-form-head {
        margin-bottom: 18px;
    }

    .patient-login-form-head h1 {
        font-size: 34px;
    }

    .patient-login-form-head p {
        margin-top: 7px;
    }
}

/*
 * Extra compact phone header. The large teal section is
 * already hidden; reduce the logo and spacing further.
 */
@media (max-width: 600px) {
    .patient-login-panel {
        padding-top:
            max(6px, env(safe-area-inset-top));
    }

    .patient-login-mobile-logo {
        margin: 0 0 5px;
    }

    .patient-login-mobile-logo img {
        width: min(165px, 54vw);
        max-height: 70px;
    }

    .patient-login-panel-top {
        margin-bottom: 12px;
    }

    .patient-login-install-link {
        width: 100%;
        min-height: 51px;
        padding: 11px 13px;
        border-radius: 14px;
        font-size: 13px;
    }

    .patient-login-form-head {
        margin-bottom: 15px;
    }

    .patient-login-secure-label {
        margin-bottom: 6px;
    }

    .patient-login-form-head h1 {
        font-size: 28px;
    }

    .patient-login-form-head p {
        margin-top: 6px;
        font-size: 13px;
        line-height: 1.4;
    }
}

@keyframes patientInstallGradient {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes patientInstallGlow {
    0%,
    100% {
        box-shadow:
            0 11px 25px rgba(15, 118, 110, 0.25);
    }

    50% {
        box-shadow:
            0 15px 34px rgba(22, 133, 196, 0.42),
            0 0 0 5px rgba(20, 184, 166, 0.08);
    }
}

@keyframes patientInstallShine {
    0%,
    48% {
        left: -34%;
    }

    72%,
    100% {
        left: 130%;
    }
}

@keyframes patientInstallArrow {
    0%,
    100% {
        transform: translateY(-1px);
    }

    50% {
        transform: translateY(4px);
    }
}

/* NLH PATIENT LOGIN COMPACT ANIMATED V11 END */

