:root {
    --patient-v3-primary: #0f76d8;
    --patient-v3-primary-dark: #0755a8;
    --patient-v3-cyan: #24a8b7;
    --patient-v3-navy: #082b51;
    --patient-v3-navy-soft: #0b4877;
    --patient-v3-bg: #edf5fb;
    --patient-v3-card: #ffffff;
    --patient-v3-text: #14253b;
    --patient-v3-muted: #66788d;
    --patient-v3-border: #d7e3ee;
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body.patient-v3-page {
    min-height: 100vh;
    margin: 0;
    color: var(--patient-v3-text);
    background:
        radial-gradient(
            circle at 10% 12%,
            rgba(36, 168, 183, .13),
            transparent 27rem
        ),
        radial-gradient(
            circle at 90% 88%,
            rgba(15, 118, 216, .11),
            transparent 30rem
        ),
        linear-gradient(135deg, #f8fbfe 0%, var(--patient-v3-bg) 100%);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    -webkit-font-smoothing: antialiased;
}

.patient-v3-shell {
    width: min(1120px, calc(100% - 40px));
    min-height: 680px;
    margin: 34px auto;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr);
    overflow: hidden;
    border: 1px solid rgba(215, 227, 238, .9);
    border-radius: 30px;
    background: var(--patient-v3-card);
    box-shadow:
        0 34px 90px rgba(18, 50, 82, .14),
        0 8px 26px rgba(18, 50, 82, .07);
}

.patient-v3-visual {
    position: relative;
    display: flex;
    min-width: 0;
    min-height: 680px;
    flex-direction: column;
    overflow: hidden;
    padding: 42px 48px;
    color: #fff;
    background:
        radial-gradient(
            circle at 88% 12%,
            rgba(51, 199, 211, .45),
            transparent 20rem
        ),
        linear-gradient(
            145deg,
            var(--patient-v3-navy) 0%,
            var(--patient-v3-navy-soft) 52%,
            #0c75a9 100%
        );
}

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

.patient-v3-visual::before {
    width: 390px;
    height: 390px;
    top: 130px;
    right: -205px;
}

.patient-v3-visual::after {
    width: 250px;
    height: 250px;
    top: 200px;
    right: -90px;
}

.patient-v3-brand {
    position: relative;
    z-index: 2;
    display: inline-flex;
    width: fit-content;
    max-width: 230px;
    height: 52px;
    align-items: center;
    padding: 7px 11px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 13px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 12px 26px rgba(2, 22, 45, .18);
}

.patient-v3-brand img {
    display: block;
    width: auto;
    max-width: 205px;
    height: 36px;
    object-fit: contain;
    object-position: left center;
}

.patient-v3-visual-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    margin: auto 0;
    padding: 54px 0;
}

.patient-v3-eyebrow,
.patient-v3-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: .75rem;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.patient-v3-eyebrow {
    margin-bottom: 19px;
    color: #bceef3;
}

.patient-v3-visual h1 {
    max-width: 500px;
    margin: 0;
    font-size: clamp(2.45rem, 4vw, 3.8rem);
    font-weight: 820;
    line-height: 1.05;
    letter-spacing: -.047em;
}

.patient-v3-visual-content > p {
    max-width: 480px;
    margin: 24px 0 34px;
    color: rgba(255, 255, 255, .78);
    font-size: 1.03rem;
    line-height: 1.72;
}

.patient-v3-benefits {
    display: grid;
    gap: 15px;
}

.patient-v3-benefits > div {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
}

.patient-v3-benefits > div > span {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 14px;
    color: #ccf5f6;
    background: rgba(255, 255, 255, .10);
}

.patient-v3-benefits strong,
.patient-v3-benefits small {
    display: block;
}

.patient-v3-benefits strong {
    margin-bottom: 3px;
    font-size: .95rem;
}

.patient-v3-benefits small {
    color: rgba(255, 255, 255, .66);
    line-height: 1.45;
}

.patient-v3-visual-icon {
    position: absolute;
    z-index: 1;
    right: 28px;
    bottom: 6px;
    color: rgba(255, 255, 255, .065);
    font-size: 10.5rem;
    transform: rotate(-7deg);
}

.patient-v3-form-side {
    display: grid;
    min-width: 0;
    min-height: 680px;
    place-items: center;
    padding: 50px 52px;
    background:
        linear-gradient(
            180deg,
            rgba(248, 252, 255, .55),
            #fff
        );
}

.patient-v3-card {
    width: 100%;
    max-width: 445px;
}

.patient-v3-mobile-brand {
    display: none;
}

.patient-v3-heading {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 30px;
}

.patient-v3-heading-icon {
    display: grid;
    width: 62px;
    height: 62px;
    place-items: center;
    border-radius: 20px;
    color: #fff;
    background:
        linear-gradient(
            145deg,
            var(--patient-v3-primary),
            var(--patient-v3-cyan)
        );
    box-shadow: 0 15px 30px rgba(15, 118, 216, .24);
    font-size: 1.35rem;
}

.patient-v3-kicker {
    margin-bottom: 6px;
    color: var(--patient-v3-primary);
    font-size: .69rem;
}

.patient-v3-heading h2 {
    margin: 0;
    color: #0b2038;
    font-size: clamp(2rem, 3vw, 2.55rem);
    font-weight: 820;
    line-height: 1.08;
    letter-spacing: -.037em;
}

.patient-v3-heading p {
    margin: 10px 0 0;
    color: var(--patient-v3-muted);
    line-height: 1.6;
}

.patient-v3-alert {
    display: grid;
    grid-template-columns: 22px minmax(0, 1fr);
    gap: 12px;
    margin-bottom: 20px;
    padding: 14px 16px;
    border: 1px solid transparent;
    border-radius: 14px;
    font-size: .89rem;
}

.patient-v3-alert i {
    margin-top: 3px;
}

.patient-v3-alert strong,
.patient-v3-alert span {
    display: block;
}

.patient-v3-alert strong {
    margin-bottom: 2px;
}

.patient-v3-alert span {
    line-height: 1.5;
}

.patient-v3-alert.is-danger {
    border-color: #ffcaca;
    color: #ba3030;
    background: #fff2f2;
}

.patient-v3-alert.is-warning {
    border-color: #f7d99b;
    color: #8a5b08;
    background: #fff8e8;
}

.patient-v3-alert.is-info {
    border-color: #b9ddf6;
    color: #17618f;
    background: #edf8ff;
}

.patient-v3-form {
    display: grid;
    gap: 20px;
}

.patient-v3-field label {
    display: block;
    margin: 0;
    color: #19304b;
    font-size: .91rem;
    font-weight: 720;
}

.patient-v3-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
}

.patient-v3-label-row > a {
    color: var(--patient-v3-primary);
    font-size: .82rem;
    font-weight: 700;
    text-decoration: none;
}

.patient-v3-label-row > a:hover {
    text-decoration: underline;
}

.patient-v3-field > label {
    margin-bottom: 9px;
}

.patient-v3-input {
    position: relative;
}

.patient-v3-input > i {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 17px;
    color: #71869d;
    transform: translateY(-50%);
    pointer-events: none;
}

.patient-v3-input input {
    display: block;
    width: 100%;
    height: 54px;
    padding: 0 50px 0 48px;
    border: 1px solid var(--patient-v3-border);
    border-radius: 13px;
    outline: none;
    color: #172b44;
    background: #fff;
    font: inherit;
    transition:
        border-color .18s ease,
        box-shadow .18s ease,
        background .18s ease;
}

.patient-v3-input input::placeholder {
    color: #9aaabd;
}

.patient-v3-input input:hover {
    border-color: #afc5d8;
}

.patient-v3-input input:focus {
    border-color: #52a1de;
    background: #fbfdff;
    box-shadow: 0 0 0 4px rgba(15, 118, 216, .11);
}

.patient-v3-field small {
    display: block;
    margin-top: 8px;
    color: #7d8fa3;
    font-size: .78rem;
    line-height: 1.45;
}

.patient-v3-password-toggle {
    position: absolute;
    z-index: 3;
    top: 50%;
    right: 8px;
    display: grid;
    width: 38px;
    height: 38px;
    padding: 0;
    place-items: center;
    border: 0;
    border-radius: 9px;
    color: #6f8297;
    background: transparent;
    transform: translateY(-50%);
    cursor: pointer;
}

.patient-v3-password-toggle:hover {
    color: var(--patient-v3-primary);
    background: #edf6fd;
}

.patient-v3-submit,
.patient-v3-secondary,
.patient-v3-back {
    display: inline-flex;
    width: 100%;
    min-height: 53px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border-radius: 13px;
    font: inherit;
    font-weight: 760;
    text-decoration: none;
    transition:
        transform .18s ease,
        box-shadow .18s ease,
        border-color .18s ease,
        background .18s ease;
}

.patient-v3-submit {
    border: 0;
    color: #fff;
    background:
        linear-gradient(
            135deg,
            var(--patient-v3-primary),
            var(--patient-v3-cyan)
        );
    box-shadow: 0 14px 28px rgba(15, 118, 216, .22);
    cursor: pointer;
}

.patient-v3-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 33px rgba(15, 118, 216, .28);
}

.patient-v3-secondary {
    margin-top: 14px;
    border: 1px solid #9ec8e9;
    color: #0d649f;
    background: #eff9ff;
}

.patient-v3-secondary:hover {
    border-color: #6aaee0;
    background: #e4f5ff;
    transform: translateY(-1px);
}

.patient-v3-back {
    border: 1px solid #cddbe8;
    color: #1d5f91;
    background: #f8fbfe;
}

.patient-v3-back:hover {
    border-color: #8ab9dc;
    background: #eef7fd;
}

.patient-v3-help {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    gap: 9px;
    margin-top: 22px;
    padding: 13px 14px;
    border-radius: 12px;
    color: #62758a;
    background: #f4f8fb;
    font-size: .81rem;
    line-height: 1.5;
}

.patient-v3-help i {
    margin-top: 3px;
    color: #3690c9;
}

.patient-v3-security {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 18px 0 0;
    color: #8494a7;
    font-size: .76rem;
    text-align: center;
}

.patient-v3-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 27px 0 17px;
    color: #8a9aab;
    font-size: .78rem;
    white-space: nowrap;
}

.patient-v3-divider::before,
.patient-v3-divider::after {
    height: 1px;
    flex: 1;
    content: "";
    background: #e1eaf2;
}

.patient-v3-submit:focus-visible,
.patient-v3-secondary:focus-visible,
.patient-v3-back:focus-visible,
.patient-v3-password-toggle:focus-visible,
.patient-v3-brand:focus-visible {
    outline: 3px solid rgba(15, 118, 216, .22);
    outline-offset: 3px;
}

@media (max-width: 920px) {
    .patient-v3-shell {
        width: min(640px, calc(100% - 28px));
        min-height: auto;
        margin: 22px auto;
        grid-template-columns: 1fr;
        border-radius: 25px;
    }

    .patient-v3-visual {
        min-height: auto;
        padding: 28px 30px 34px;
    }

    .patient-v3-visual-content {
        margin: 0;
        padding: 34px 0 3px;
    }

    .patient-v3-visual h1 {
        font-size: clamp(2rem, 8vw, 2.85rem);
    }

    .patient-v3-benefits {
        display: none;
    }

    .patient-v3-form-side {
        min-height: auto;
        padding: 38px 32px 42px;
    }
}

@media (max-width: 560px) {
    body.patient-v3-page {
        background: #f3f8fc;
    }

    .patient-v3-shell {
        width: 100%;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

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

    .patient-v3-form-side {
        min-height: 100vh;
        align-items: start;
        padding: 26px 20px 38px;
        background:
            linear-gradient(
                180deg,
                #e9f6fb 0,
                #f8fbfd 210px,
                #fff 100%
            );
    }

    .patient-v3-card {
        max-width: none;
    }

    .patient-v3-mobile-brand {
        display: flex;
        min-height: 61px;
        align-items: center;
        justify-content: center;
        margin-bottom: 28px;
    }

    .patient-v3-mobile-brand a {
        display: inline-flex;
        max-width: 210px;
        height: 52px;
        align-items: center;
        padding: 7px 11px;
        border: 1px solid #d5e5ee;
        border-radius: 13px;
        background: #fff;
        box-shadow: 0 10px 24px rgba(21, 64, 92, .10);
    }

    .patient-v3-mobile-brand img {
        display: block;
        width: auto;
        max-width: 186px;
        height: 36px;
        object-fit: contain;
    }

    .patient-v3-heading {
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 14px;
        margin-bottom: 25px;
    }

    .patient-v3-heading-icon {
        width: 52px;
        height: 52px;
        border-radius: 16px;
        font-size: 1.12rem;
    }

    .patient-v3-heading h2 {
        font-size: 1.9rem;
    }

    .patient-v3-heading p {
        font-size: .9rem;
    }
}

@media (max-width: 380px) {
    .patient-v3-form-side {
        padding-right: 16px;
        padding-left: 16px;
    }

    .patient-v3-heading {
        grid-template-columns: 1fr;
    }

    .patient-v3-divider span {
        white-space: normal;
        text-align: center;
    }
}

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


/* =========================================================
   Patient Login Compact Premium Polish - 2026-08-15
   Visual-only refinement. Authentication behavior unchanged.
   ========================================================= */

/* More compact overall shell */
.patient-v3-shell {
    width: min(1030px, calc(100% - 44px));
    min-height: 610px;
    margin: 30px auto;
    grid-template-columns: minmax(0, 1.02fr) minmax(410px, .98fr);
    border-radius: 26px;
    box-shadow:
        0 28px 72px rgba(18, 50, 82, .13),
        0 7px 22px rgba(18, 50, 82, .06);
}

/* Left portal panel */
.patient-v3-visual {
    min-height: 610px;
    padding: 34px 40px;
}

/* Larger, clearer website branding */
.patient-v3-brand {
    max-width: 300px;
    height: 72px;
    padding: 9px 16px;
    border-radius: 16px;
    box-shadow: 0 14px 30px rgba(2, 22, 45, .20);
}

.patient-v3-brand img {
    max-width: 268px;
    height: 50px;
    object-fit: contain;
    object-position: left center;
}

.patient-v3-brand:hover {
    transform: translateY(-1px);
    box-shadow: 0 17px 34px rgba(2, 22, 45, .24);
}

/* Bring the content upward and reduce unused vertical space */
.patient-v3-visual-content {
    max-width: 455px;
    margin: 0;
    padding: 50px 0 18px;
}

.patient-v3-eyebrow {
    margin-bottom: 16px;
}

.patient-v3-visual h1 {
    max-width: 455px;
    font-size: clamp(2.45rem, 3.7vw, 3.45rem);
    line-height: 1.02;
}

.patient-v3-visual-content > p {
    max-width: 440px;
    margin: 20px 0 27px;
    font-size: .98rem;
    line-height: 1.62;
}

.patient-v3-benefits {
    gap: 12px;
}

.patient-v3-benefits > div {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
}

.patient-v3-benefits > div > span {
    width: 42px;
    height: 42px;
    border-radius: 12px;
}

.patient-v3-benefits strong {
    font-size: .91rem;
}

.patient-v3-benefits small {
    font-size: .81rem;
}

.patient-v3-visual-icon {
    right: 18px;
    bottom: -4px;
    font-size: 9rem;
}

/* Right login panel: tighter and better balanced */
.patient-v3-form-side {
    min-height: 610px;
    padding: 42px 46px;
}

.patient-v3-card {
    max-width: 405px;
}

.patient-v3-heading {
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 15px;
    margin-bottom: 25px;
}

.patient-v3-heading-icon {
    width: 56px;
    height: 56px;
    border-radius: 17px;
    font-size: 1.2rem;
}

.patient-v3-kicker {
    margin-bottom: 4px;
}

.patient-v3-heading h2 {
    font-size: clamp(2rem, 2.7vw, 2.35rem);
}

.patient-v3-heading p {
    margin-top: 7px;
    font-size: .92rem;
}

.patient-v3-form {
    gap: 17px;
}

.patient-v3-label-row {
    margin-bottom: 7px;
}

.patient-v3-field > label {
    margin-bottom: 7px;
}

.patient-v3-input input {
    height: 51px;
    border-radius: 12px;
    background: #fbfdff;
}

.patient-v3-submit {
    min-height: 51px;
    border-radius: 12px;
}

.patient-v3-help {
    margin-top: 18px;
    padding: 12px 13px;
}

.patient-v3-security {
    margin-top: 15px;
}

/* Tablet */
@media (max-width: 920px) {
    .patient-v3-shell {
        width: min(620px, calc(100% - 28px));
        min-height: auto;
        margin: 20px auto;
        border-radius: 24px;
    }

    .patient-v3-visual {
        min-height: auto;
        padding: 25px 28px 30px;
    }

    .patient-v3-brand {
        max-width: 280px;
        height: 68px;
    }

    .patient-v3-brand img {
        max-width: 248px;
        height: 47px;
    }

    .patient-v3-visual-content {
        padding: 30px 0 2px;
    }

    .patient-v3-form-side {
        min-height: auto;
        padding: 34px 30px 38px;
    }

    .patient-v3-card {
        max-width: 420px;
    }
}

/* Mobile: make branding prominent instead of tiny */
@media (max-width: 560px) {
    .patient-v3-form-side {
        padding: 22px 18px 32px;
    }

    .patient-v3-mobile-brand {
        min-height: 72px;
        margin-bottom: 22px;
    }

    .patient-v3-mobile-brand a {
        max-width: 255px;
        height: 64px;
        padding: 8px 14px;
        border-radius: 15px;
        box-shadow: 0 11px 26px rgba(21, 64, 92, .12);
    }

    .patient-v3-mobile-brand img {
        max-width: 225px;
        height: 46px;
    }

    .patient-v3-heading {
        grid-template-columns: 50px minmax(0, 1fr);
        gap: 13px;
        margin-bottom: 22px;
    }

    .patient-v3-heading-icon {
        width: 50px;
        height: 50px;
        border-radius: 15px;
    }

    .patient-v3-heading h2 {
        font-size: 1.82rem;
    }

    .patient-v3-form {
        gap: 16px;
    }
}

@media (max-width: 380px) {
    .patient-v3-mobile-brand a {
        max-width: 232px;
        height: 60px;
    }

    .patient-v3-mobile-brand img {
        max-width: 204px;
        height: 42px;
    }
}
