/* V37 UI overlay — login, home, new patient session */

/* ── Auth (V37 Login.html) ── */
#auth-screen {
    flex-direction: row;
    justify-content: flex-start;
    align-items: stretch;
    padding: 0;
    min-height: 100vh;
    background: #eef3f8;
}

#auth-screen::before {
    display: none;
}

#hamd-login-hero {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("/assets/images/login/hero-bg.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

#hamd-login-hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, rgba(238, 243, 248, .96) 0%, rgba(238, 243, 248, .88) 28%, rgba(238, 243, 248, .45) 46%, rgba(238, 243, 248, .12) 62%, rgba(238, 243, 248, 0) 100%);
}

.v37-auth-shell.shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: stretch;
}

.v37-auth-shell .brandpane {
    display: none;
}

.v37-auth-shell .authpane {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 48px 40px 48px 72px;
    flex: 0 0 auto;
    min-width: 520px;
}

.v37-auth-shell .card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, .94);
    border-radius: 26px;
    padding: 44px 42px;
    box-shadow: 0 24px 60px rgba(15, 42, 82, .16), 0 2px 10px rgba(15, 42, 82, .06);
    backdrop-filter: blur(3px);
    border: 1px solid rgba(255, 255, 255, .7);
}

.v37-auth-shell .brand-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 18px;
}

.v37-auth-shell .brand-logo img {
    height: 84px;
    width: auto;
    object-fit: contain;
}

.v37-auth-shell .card-head {
    margin-bottom: 26px;
    text-align: center;
}

.v37-auth-shell .eyebrow {
    font-size: 11px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: #1b6fe2;
    font-weight: 600;
}

.v37-auth-shell .title {
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -.025em;
    margin-top: 9px;
    color: #0f2a52;
}

.v37-auth-shell .subtitle,
.v37-auth-shell .form-subtitle {
    color: #5b7397;
    font-size: 14px;
    margin-top: 8px;
    line-height: 1.55;
    font-weight: 400;
}

.v37-auth-shell .auth-form {
    display: none;
    animation: v37fade .35s ease;
}

.v37-auth-shell .auth-form.active {
    display: block;
}

.v37-auth-shell .field,
.v37-auth-shell .form-group {
    margin-bottom: 15px;
}

.v37-auth-shell .field label,
.v37-auth-shell .form-group label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: #0f2a52;
    margin-bottom: 7px;
}

.v37-auth-shell .inwrap,
.v37-auth-shell .input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.v37-auth-shell .inwrap > i,
.v37-auth-shell .input-wrapper > i {
    position: absolute;
    left: 14px;
    font-size: 18px;
    color: #5b7397;
    pointer-events: none;
}

.v37-auth-shell .field input,
.v37-auth-shell .form-group input,
.v37-auth-shell .form-group select {
    width: 100%;
    padding: 13px 14px 13px 42px;
    font-size: 14.5px;
    color: #0f2a52;
    background: #f7fafe;
    border: 1.5px solid #dbe6f7;
    border-radius: 12px;
    outline: none;
    transition: .18s;
}

.v37-auth-shell .form-group input[type="password"],
.v37-auth-shell .form-group input[type="text"] {
    padding-right: 42px;
}

.v37-auth-shell .field input:focus,
.v37-auth-shell .form-group input:focus,
.v37-auth-shell .form-group select:focus {
    background: #fff;
    border-color: #1b6fe2;
    box-shadow: 0 0 0 4px rgba(27, 111, 226, .12);
}

.v37-auth-shell .peek,
.v37-auth-shell .toggle-password {
    position: absolute;
    right: 8px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: #5b7397;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    display: grid;
    place-items: center;
    font-size: 18px;
}

.v37-auth-shell .btn.btn-primary.btn-full,
.v37-auth-shell .auth-form .btn-primary {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, #1b6fe2, #2f8ef0);
    box-shadow: 0 10px 26px rgba(27, 111, 226, .30);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 4px;
}

.v37-auth-shell .auth-switch,
.v37-auth-shell .foot {
    margin-top: 24px;
    text-align: center;
    font-size: 13.5px;
    color: #5b7397;
}

.v37-auth-shell .auth-switch a,
.v37-auth-shell .foot a {
    color: #1b6fe2;
    font-weight: 600;
    text-decoration: none;
}

.v37-auth-shell .auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0;
    color: #5b7397;
    font-size: 12px;
}

.v37-auth-shell .auth-divider::before,
.v37-auth-shell .auth-divider::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #dbe6f7;
}

.v37-auth-shell .legal {
    margin-top: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    font-size: 11.5px;
    color: #9fb0c9;
}

.v37-auth-shell .legal i {
    color: #10b981;
}

.v37-auth-foot {
    position: fixed;
    bottom: 12px;
    right: 20px;        /* was left:72px — moved off the bottom-left Feedback button so nothing overlaps it */
    left: auto;
    z-index: 2;
    font-size: 11px;
    color: #9fb0c9;
    text-align: right;
}

/* Translucent rounded pill around the copyright / HIPAA line on the login page. */
.v37-auth-foot .v37-auth-copyright {
    display: inline-block;
    margin: 0;
    padding: 6px 16px;
    border-radius: 14px;
    background: rgba(255, 255, 255, .42);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .6);
    box-shadow: 0 6px 20px rgba(8, 22, 48, .12);
    color: #5b6b86;
    font-weight: 600;
    letter-spacing: .01em;
}

.v37-auth-shell .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.v37-auth-shell .form-checkbox {
    margin: 12px 0 18px;
    font-size: 13px;
    color: #5b7397;
}

.v37-auth-shell .otp-inputs {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 18px 0 22px;
}

.v37-auth-shell .otp-input {
    width: 46px;
    height: 52px;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    border: 1.5px solid #dbe6f7;
    border-radius: 12px;
    background: #f7fafe;
}

@keyframes v37fade {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}

@media (max-width: 760px) {
    .v37-auth-shell .authpane {
        min-width: 0;
        flex: 1;
        padding: 34px 22px;
        justify-content: center;
    }

    .v37-auth-foot {
        left: 50%;
        right: auto;
        transform: translateX(-50%);
        bottom: 74px;   /* lift above the bottom-left Feedback button on narrow screens */
        text-align: center;
    }
}

/* ── Hide app header on V37 full-screen views ── */
#app-screen:has(#user-home-view.active) .app-header,
#app-screen:has(#new-patient-session-view.active) .app-header {
    display: none !important;
}

/* ── Home (V37 Home.html) ── */
#user-home-view {
    position: fixed;
    inset: 0;
    z-index: 120;
    max-width: none;
    padding: 0;
    margin: 0;
    display: none;
    flex-direction: column;
    overflow: hidden;
    font-family: 'Outfit', system-ui, sans-serif;
}

#user-home-view.active {
    display: flex;
}

#user-home-view .home-container {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
    border-radius: 0;
    min-height: 0;
}

#user-home-view .home-bg-scene,
#user-home-view .home-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    transition: opacity 1.2s ease;
    z-index: 0;
}

#user-home-view .home-bg-tint {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(240, 248, 255, .55), rgba(219, 234, 254, .45));
}

#user-home-view #home-bubbles {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
}

#user-home-view.bg-plain .home-bg-scene {
    background: linear-gradient(150deg, #ffffff 0%, #eff6ff 55%, #dbeafe 100%);
}

#user-home-view.bg-plain .home-bg-tint {
    background: none;
}

#user-home-view.bg-hospital .home-bg-scene {
    background: linear-gradient(150deg, #ffffff, #eaf3ff 60%, #dbeafe);
}

#user-home-view.bg-hospital .home-bg-tint {
    background-image: url("/assets/images/home/hospital-watermark.jpg");
    background-repeat: no-repeat;
    background-position: right bottom;
    background-size: auto 92%;
    opacity: .5;
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 60%, rgba(0, 0, 0, 0) 100%);
}

#user-home-view .home-top {
    position: relative;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 22px 34px;
}

#user-home-view .home-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}

#user-home-view .home-logo {
    height: 66px;
    width: auto;
    border-radius: 14px;
    background: rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .62);
    box-shadow: 0 8px 26px rgba(8, 22, 48, .12);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 9px 16px;
}

#user-home-view .home-logo img {
    height: 100%;
    width: auto;
    object-fit: contain;
    display: block;
}

#user-home-view .home-bname {
    font-weight: 800;
    font-size: 21px;
    color: #041e4f;
    letter-spacing: -.01em;
    line-height: 1;
}

#user-home-view .home-bname span {
    color: #1b55e2;
}

#user-home-view .home-btag {
    font-size: 15px;
    font-weight: 400;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #5b6b86;
    margin-top: 0;
}


#user-home-view .home-top-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

#user-home-view .home-aitools {
    position: relative;
}

#user-home-view .home-aibtn {
    background: linear-gradient(135deg, #1b55e2, #4f82f0) !important;
    color: #fff !important;
    border: none !important;
    box-shadow: 0 6px 18px rgba(27, 85, 226, .32) !important;
}

#user-home-view .home-aibtn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(27, 85, 226, .42) !important;
    background: linear-gradient(135deg, #1746c0, #3b7df0) !important;
}

#user-home-view .home-aimenu {
    position: absolute;
    top: 52px;
    right: 0;
    width: 340px;
    background: #fff;
    border-radius: 18px;
    padding: 10px;
    box-shadow: 0 24px 60px rgba(4, 30, 79, .26);
    border: 1px solid #e8edf5;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: .2s;
    z-index: 70;
}

#user-home-view .home-aimenu.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

#user-home-view .home-aiopt {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    border-radius: 14px;
    cursor: pointer;
    transition: .16s;
}

#user-home-view .home-aiopt:hover {
    background: #f1f6fe;
}

#user-home-view .home-aiopt .ai-ic {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    color: #fff;
    background: linear-gradient(135deg, var(--g1), var(--g2));
    box-shadow: 0 6px 16px color-mix(in srgb, var(--g1) 40%, transparent);
}

#user-home-view .home-aiopt .ai-tx {
    flex: 1;
}

#user-home-view .home-aiopt .ai-tx b {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
    font-size: 14.5px;
    font-weight: 800;
    color: #041e4f;
    letter-spacing: -.01em;
    line-height: 1.5;
}

#user-home-view .home-aiopt .ai-tx span {
    display: block;
    font-size: 11.5px;
    color: #5b6b86;
    margin-top: 3px;
    line-height: 1.4;
}

#user-home-view .home-aiopt .ai-go {
    font-size: 18px;
    color: #cbd5e1;
    transition: .2s;
}

#user-home-view .home-aiopt:hover .ai-go {
    color: #1b55e2;
    transform: translateX(3px);
}

#user-home-view .home-aiopt-feat {
    background: linear-gradient(135deg, rgba(124, 58, 237, .06), rgba(37, 99, 235, .05));
    border: 1px solid rgba(124, 58, 237, .14);
    margin-bottom: 4px;
}

#user-home-view .home-aiopt-feat:hover {
    background: linear-gradient(135deg, rgba(124, 58, 237, .12), rgba(37, 99, 235, .09));
}

#user-home-view .ai-badge {
    display: inline-flex;
    align-items: center;
    font-size: 9px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .08em;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #2563eb);
    padding: 3px 7px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(124, 58, 237, .35);
}

#user-home-view .home-bgsel {
    margin: 0;
    width: auto;
}

#user-home-view .home-bgsel,
#user-home-view .home-bgbtn,
#user-home-view .home-btn,
#user-home-view .home-icon,
#user-home-view .home-profile-avatar {
    align-self: center;
}

#user-home-view .home-profile-avatar {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(27, 85, 226, .16);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(4, 30, 79, .07);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 800;
    color: #1b55e2;
}

#user-home-view .home-profile-avatar span {
    color: #0f3f9f;
    font-size: 14px;
    font-weight: 900;
    letter-spacing: .03em;
    text-shadow: 0 1px 0 rgba(255, 255, 255, .75);
}

#user-home-view .home-icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid rgba(27, 85, 226, .16);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(8px);
    color: #1b55e2;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(4, 30, 79, .07);
}

#user-home-view .home-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border-radius: 12px;
    border: 1px solid rgba(27, 85, 226, .16);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(8px);
    color: #1b55e2;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(4, 30, 79, .07);
    font-family: inherit;
}

#user-home-view .home-spec-btn {
    background: linear-gradient(135deg, #1b55e2, #4f82f0);
    color: #fff;
    border: none;
    box-shadow: 0 6px 18px rgba(27, 85, 226, .32);
}

#user-home-view .home-bgsel {
    position: relative;
    margin: 0;
    width: auto;
}

#user-home-view .home-bgbtn {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 42px;
    padding: 0 15px;
    border-radius: 12px;
    border: 1px solid rgba(27, 85, 226, .16);
    background: rgba(255, 255, 255, .78);
    backdrop-filter: blur(8px);
    color: #1b55e2;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(4, 30, 79, .07);
    font-family: inherit;
}

#user-home-view .home-bgmenu {
    position: absolute;
    top: 50px;
    right: 0;
    width: 290px;
    background: #fff;
    border-radius: 16px;
    padding: 8px;
    box-shadow: 0 20px 50px rgba(4, 30, 79, .22);
    border: 1px solid #e2e8f0;
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
    transition: .2s;
    z-index: 60;
}

#user-home-view .home-bgmenu.open {
    opacity: 1;
    transform: none;
    pointer-events: auto;
}

#user-home-view .home-bgopt {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 13px;
    border-radius: 11px;
    cursor: pointer;
}

#user-home-view .home-bgopt:hover {
    background: #f1f6ff;
}

#user-home-view .home-bgopt i {
    font-size: 20px;
    color: #1b55e2;
    margin-top: 2px;
}

#user-home-view .home-bgopt b {
    display: block;
    font-size: 13.5px;
    color: #041e4f;
}

#user-home-view .home-bgopt span {
    font-size: 11.5px;
    color: #64748b;
    line-height: 1.4;
}

#user-home-view .home-quote {
    position: relative;
    z-index: 5;
    text-align: center;
    padding: 6px 30px 0;
    min-height: 30px;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 19px;
    font-style: italic;
    color: #0f2a5e;
    opacity: 0;
    transition: opacity .8s;
}

#user-home-view .home-quote.show {
    opacity: 1;
}

#user-home-view.bg-plain .home-quote,
#user-home-view.bg-hospital .home-quote {
    display: none;
}

#user-home-view .home-main {
    position: relative;
    z-index: 5;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    padding: 20px;
}

#user-home-view .home-welcome {
    text-align: center;
}

#user-home-view .home-welcome h1 {
    font-family: 'Fraunces', Georgia, serif;
    font-weight: 500;
    font-size: clamp(30px, 4vw, 46px);
    color: #041e4f;
    letter-spacing: -.01em;
}

#user-home-view .home-welcome h1 span {
    color: #1b55e2;
    font-style: italic;
}

#user-home-view .home-welcome p {
    margin-top: 8px;
    font-size: 15px;
    color: #3b5575;
}

#user-home-view .home-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(300px, 400px));
    gap: 26px;
}

#user-home-view .home-cards-single {
    grid-template-columns: minmax(300px, 820px);
    width: 100%;
    justify-content: center;
}

#user-home-view .home-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    text-align: left;
    padding: 36px 32px;
    border-radius: 28px;
    cursor: pointer;
    overflow: hidden;
    min-height: 140px;
    border: 1px solid rgba(255, 255, 255, .9);
    background: linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(247, 250, 255, .90));
    backdrop-filter: blur(18px);
    box-shadow: 0 18px 50px rgba(4, 30, 79, .16);
    transition: box-shadow .25s ease, border-color .25s ease;
    font-family: inherit;
    color: inherit;
}

#user-home-view .home-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(180deg, var(--g1, #2563eb), var(--g2, #06b6d4));
    opacity: .85;
}

#user-home-view .home-card:hover {
    box-shadow: 0 24px 56px rgba(4, 30, 79, .22);
    border-color: rgba(27, 85, 226, .18);
}

#user-home-view .hc-ic {
    width: 74px;
    height: 74px;
    border-radius: 22px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 36px;
    color: #fff;
    background: linear-gradient(140deg, var(--g1, #2563eb), var(--g2, #06b6d4));
    box-shadow: 0 12px 28px rgba(37, 99, 235, .35);
}

#user-home-view .hc-tx b {
    display: block;
    font-size: 21px;
    font-weight: 800;
    color: #06163a;
}

#user-home-view .hc-tx span {
    display: block;
    font-size: 13.5px;
    color: #5b6b86;
    margin-top: 6px;
    line-height: 1.5;
}

#user-home-view .hc-go {
    font-size: 20px;
    color: #64748b;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(37, 99, 235, .07);
    flex-shrink: 0;
}

#user-home-view .home-foot {
    position: relative;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 14px 26px 18px;
    font-size: 12px;
    color: #5b6b86;
}

/* Brand pill is centered at the bottom (clear of the bottom-left Feedback
   button); the day/date pill is pinned to the right. */
#user-home-view .home-foot-brand-box {
    margin: 0 auto;
}

#user-home-view .home-foot-date-box {
    position: absolute;
    right: 26px;
    top: 50%;
    transform: translateY(-50%);
}

@media (max-width: 760px) {
    #user-home-view .home-foot {
        flex-direction: column;
        gap: 8px;
    }
    #user-home-view .home-foot-date-box {
        position: static;
        transform: none;
        right: auto;
    }
}

/* Translucent "glass" pill around the brand + date so they stay readable over the animated
   background while still hinting at what's behind. */
#user-home-view .home-foot-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px 18px;
    padding: 9px 22px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .5);
    -webkit-backdrop-filter: blur(12px) saturate(1.2);
    backdrop-filter: blur(12px) saturate(1.2);
    border: 1px solid rgba(255, 255, 255, .62);
    box-shadow: 0 8px 26px rgba(8, 22, 48, .12);
}

#user-home-view .home-foot-brand {
    justify-self: center;
    font-weight: 700;
    letter-spacing: .02em;
    color: #1e3a5f;
}

#user-home-view .home-foot-date {
    justify-self: end;
    font-size: 14px;
    font-weight: 800;
    color: #0f3f9f;
    letter-spacing: .02em;
    text-shadow: 0 1px 10px rgba(255, 255, 255, .65);
}

#user-home-view .home-greeting,
#user-home-view .session-option-cards,
#user-home-view .quick-stats {
    display: none !important;
}

@media (max-width: 760px) {
    #user-home-view .home-cards {
        grid-template-columns: 1fr;
    }

    #user-home-view .home-top {
        padding: 16px;
    }

    #user-home-view .home-btag {
        display: none;
    }

    #user-home-view .home-foot {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 4px;
    }

    #user-home-view .home-foot-brand,
    #user-home-view .home-foot-date {
        justify-self: center;
    }
}


/* ── New Patient wizard shell ── */
#new-patient-session-view {
    max-width: none;
    padding: 0;
    margin: 0;
}

#new-patient-session-view.active {
    display: block;
}

.wizard-bridge {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
}

#emr-bodymap-view {
    position: fixed;
    inset: 0;
    z-index: 130;
    max-width: none;
    padding: 0;
    background: #f8fafc;
}

#emr-bodymap-view.active {
    display: flex;
    flex-direction: column;
}

#emr-bodymap-view .speciality-result-container {
    height: 100%;
    display: flex;
    flex-direction: column;
}

#emr-bodymap-view .speciality-result-body-shell {
    flex: 1;
    min-height: 0;
    padding: 0 12px 12px;
}

#emr-bodymap-view .result-view-shell {
    padding: 8px 12px;
}

#emr-bodymap-view .analysis-view-header h2 {
    margin: 0;
    font-size: 20px;
}

#emr-bodymap-view .analysis-view-header p {
    margin-top: 2px;
    font-size: 12px;
    line-height: 1.3;
}

#emr-bodymap-iframe {
    width: 100%;
    height: calc(100vh - 58px);
    min-height: 640px;
    border: 0;
    border-radius: 12px;
    background: #fff;
}

.clinical-output-card .co-icon {
    width: 42px;
    height: 42px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 20px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--co-color, #1b55e2), color-mix(in srgb, var(--co-color, #1b55e2) 70%, #ffffff));
    box-shadow: 0 8px 18px color-mix(in srgb, var(--co-color, #1b55e2) 35%, transparent);
}

/* V37 speciality tool ocean surfaces */
.speciality-ocean-view {
    position: relative;
    overflow: auto;
    background: linear-gradient(180deg, #1a6aa6 0%, #0a2c54 68%, #081d38 100%);
}

.speciality-ocean-view .medicine-analysis-container,
.speciality-ocean-view .radiology-analysis-container,
.speciality-ocean-view .prescription-analysis-container {
    position: relative;
    z-index: 2;
    margin: 18px auto 26px;
    max-width: 1120px;
    background: rgba(6, 27, 58, 0.42);
    border: 1px solid rgba(135, 198, 255, 0.28);
    box-shadow: 0 24px 60px rgba(2, 10, 28, 0.35);
    border-radius: 18px;
    backdrop-filter: blur(14px);
}

.speciality-ocean-view .analysis-view-header {
    color: #ecf6ff;
}

.speciality-ocean-view .analysis-view-header h2 {
    color: #f4faff;
}

.speciality-ocean-view .analysis-view-header p {
    color: #cfe4f8;
}

.speciality-ocean-view .medicine-input-section,
.speciality-ocean-view .radiology-upload-section,
.speciality-ocean-view .previous-records-section {
    background: rgba(255, 255, 255, 0.94);
    border-radius: 14px;
}

.speciality-ocean-view .speciality-bubbles {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
    z-index: 1;
}

.speciality-ocean-view .speciality-bubbles span {
    position: absolute;
    bottom: -40px;
    border-radius: 50%;
    background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0.22) 44%, rgba(255, 255, 255, 0.04) 72%);
    border: 1px solid rgba(255, 255, 255, 0.42);
    opacity: 0;
    animation: v37specialitybubble linear infinite;
}

@keyframes v37specialitybubble {
    0% { transform: translateY(0) translateX(0); opacity: 0; }
    12% { opacity: 0.68; }
    55% { opacity: 0.52; }
    100% { transform: translateY(-105vh) translateX(24px); opacity: 0; }
}


/* Settings — super/supreme EMR System setter (consistent with modal styling). */
.emr-role-badge {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 8px;
    background: rgba(27, 85, 226, .12);
    color: #1b55e2;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    vertical-align: middle;
}
#emr-system-config-row .emr-select {
    width: 100%;
}
#emr-system-config-row .emr-system-actions {
    margin-top: 12px;
}
