/* Labo-Admin login — adapted from D:\\drug CAMHIS auth login template */
.auth-page { display: grid; grid-template-columns: minmax(25rem, 1.05fr) minmax(32rem, .95fr); min-height: 100vh; min-height: 100dvh; background: #fff; }
.auth-brand-panel { position: relative; display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; padding: clamp(2rem, 5vw, 4.5rem); color: #fff; background: linear-gradient(145deg, #04372c 0%, #075f4b 58%, #08755b 100%); isolation: isolate; }
.auth-brand-panel::before { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(circle at 85% 15%, rgba(255,255,255,.13), transparent 27%), radial-gradient(circle at 5% 95%, rgba(217,167,74,.2), transparent 34%); }
.auth-brand-panel::after { content: ""; position: absolute; z-index: -1; width: 34rem; height: 34rem; right: -17rem; bottom: -17rem; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; box-shadow: 0 0 0 5rem rgba(255,255,255,.025), 0 0 0 10rem rgba(255,255,255,.018); }
.auth-brand-content { display: flex; flex: 1; flex-direction: column; }
.auth-logo { display: inline-flex; flex-direction: column; align-items: flex-start; gap: .55rem; width: fit-content; max-width: min(100%, 22rem); color: #fff; text-decoration: none; }
.auth-logo:hover { color: #fff; }
/* PNG logo: C-frame line light + TV live air + Cam-HIS letter-body color transform. */
.auth-logo-shine {
    position: relative;
    display: inline-block;
    width: fit-content;
    max-width: 100%;
    overflow: visible;
    border-radius: 0;
    line-height: 0;
    background: transparent;
    isolation: isolate;
}
.auth-logo-img {
    display: block;
    width: min(100%, 18.5rem);
    height: auto;
    object-fit: contain;
    background: transparent;
    filter: drop-shadow(0 .45rem 1.1rem rgba(0,0,0,.28));
    transition: filter .35s ease;
}

/* Custom CamHIS System upload — adapt frame/shine to any logo aspect ratio */
.auth-logo-shine--custom {
    min-width: 4.5rem;
    width: min(100%, 18.5rem);
    max-width: 100%;
    display: inline-block;
    line-height: 0;
}
.auth-logo-shine--custom .auth-logo-img {
    width: 100%;
    height: 100%;
    max-height: none;
    object-fit: contain;
}
.auth-logo-shine--custom .auth-logo-img-mobile {
    width: 100%;
    height: 100%;
}
.auth-logo-shine--custom .auth-logo-frame-light,
.auth-logo-shine--custom .auth-logo-facet-glow {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
}
.auth-logo-shine--custom .auth-logo-facet-glow {
    clip-path: none;
    -webkit-clip-path: none;
    border-radius: 1rem;
    background: radial-gradient(ellipse at 42% 38%, rgba(126, 200, 255, .32) 0%, transparent 58%),
                radial-gradient(ellipse at 58% 68%, rgba(36, 131, 197, .24) 0%, transparent 55%);
}
.auth-logo-shine--custom .auth-logo-text-transcript {
    display: none !important;
}
.auth-logo-shine--custom .auth-logo-sea {
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    border-radius: 1rem;
    clip-path: none;
    -webkit-clip-path: none;
}

/* Hex C-frame light — aligned to emblem bounds in cam-his-full.png */
.auth-logo-frame-light {
    position: absolute;
    left: 2.6%;
    top: 2.8%;
    width: 39.4%;
    height: 94.4%;
    pointer-events: none;
    overflow: visible;
    z-index: 3;
}
.auth-logo-frame-path {
    fill: none;
    stroke: url(#authFrameStroke);
    stroke-width: 2.6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 12 88;
    stroke-dashoffset: 100;
    opacity: 0;
}
.auth-mobile-brand .auth-logo-frame-path {
    stroke: url(#authFrameStrokeMobile);
}
.auth-logo-frame-path--glow {
    stroke-width: 5.2;
    stroke-dasharray: 18 82;
    opacity: 0;
}
.auth-logo-frame-path--inner {
    stroke-width: 2;
    stroke-dasharray: 10 90;
}
.auth-logo-frame-spark {
    fill: #fff;
    opacity: 0;
    filter: drop-shadow(0 0 4px rgba(180, 230, 255, 1));
    pointer-events: none;
}
.auth-logo-shine.is-frame-run .auth-logo-frame-path--glow,
.auth-logo-shine.is-frame-run-rev .auth-logo-frame-path--glow {
    animation: authFrameLineRun 3.4s cubic-bezier(.22,.55,.2,1);
}
.auth-logo-shine.is-frame-run .auth-logo-frame-path--outer {
    animation: authFrameLineRun 3.4s cubic-bezier(.22,.55,.2,1) .05s;
}
.auth-logo-shine.is-frame-run .auth-logo-frame-path--inner {
    animation: authFrameLineRun 3.4s cubic-bezier(.22,.55,.2,1) .28s;
}
.auth-logo-shine.is-frame-run-rev .auth-logo-frame-path--outer {
    animation: authFrameLineRunRev 3.4s cubic-bezier(.22,.55,.2,1) .05s;
}
.auth-logo-shine.is-frame-run-rev .auth-logo-frame-path--inner {
    animation: authFrameLineRunRev 3.4s cubic-bezier(.22,.55,.2,1) .28s;
}
.auth-logo-shine.is-frame-run .auth-logo-frame-spark,
.auth-logo-shine.is-frame-run-rev .auth-logo-frame-spark {
    opacity: 1;
}
@keyframes authFrameLineRun {
    0% { stroke-dashoffset: 100; opacity: 0; }
    5% { opacity: 1; }
    76% { opacity: .95; }
    100% { stroke-dashoffset: 0; opacity: 0; }
}
@keyframes authFrameLineRunRev {
    0% { stroke-dashoffset: 0; opacity: 0; }
    5% { opacity: 1; }
    76% { opacity: .95; }
    100% { stroke-dashoffset: 100; opacity: 0; }
}

/* Ambient facet breath + body sync with Cam-HIS text colors */
.auth-logo-facet-glow {
    position: absolute;
    left: 2.6%;
    top: 2.8%;
    width: 39.4%;
    height: 94.4%;
    pointer-events: none;
    z-index: 1;
    opacity: 0;
    background: radial-gradient(ellipse at 42% 38%, rgba(126, 200, 255, .28) 0%, transparent 58%),
                radial-gradient(ellipse at 58% 68%, rgba(36, 131, 197, .22) 0%, transparent 55%);
    mix-blend-mode: screen;
    clip-path: polygon(50% 1%, 90% 24%, 90% 34%, 72% 42%, 72% 58%, 90% 66%, 90% 76%, 50% 99%, 8% 76%, 8% 24%);
    -webkit-clip-path: polygon(50% 1%, 90% 24%, 90% 34%, 72% 42%, 72% 58%, 90% 66%, 90% 76%, 50% 99%, 8% 76%, 8% 24%);
    animation: authLogoFacetBreath 7.5s ease-in-out infinite;
}
.auth-logo-shine.is-body-sync .auth-logo-facet-glow {
    animation: authLogoBodySync 15.5s cubic-bezier(.2,.08,.16,1) forwards;
}
@keyframes authLogoFacetBreath {
    0%,100% { opacity: .12; transform: scale(1); }
    50% { opacity: .28; transform: scale(1.015); }
}
@keyframes authLogoBodySync {
    0% { opacity: .15; filter: hue-rotate(0deg) brightness(1); }
    18% { opacity: .5; filter: hue-rotate(-10deg) brightness(1.08); }
    48% { opacity: .62; filter: hue-rotate(16deg) brightness(1.14); }
    76% { opacity: .32; filter: hue-rotate(4deg) brightness(1.04); }
    100% { opacity: .12; filter: hue-rotate(0deg) brightness(1); }
}

/* Sea / TV-air shimmer clipped to C-frame body */
.auth-logo-sea {
    position: absolute;
    left: 2.6%;
    top: 2.8%;
    width: 39.4%;
    height: 94.4%;
    overflow: hidden;
    pointer-events: none;
    z-index: 2;
    /* C-like hex with right opening */
    clip-path: polygon(50% 1%, 90% 24%, 90% 34%, 72% 42%, 72% 58%, 90% 66%, 90% 76%, 50% 99%, 8% 76%, 8% 24%);
    -webkit-clip-path: polygon(50% 1%, 90% 24%, 90% 34%, 72% 42%, 72% 58%, 90% 66%, 90% 76%, 50% 99%, 8% 76%, 8% 24%);
}
.auth-logo-shine-beam {
    --shine-x: -20%;
    --shine-y: -30%;
    --wave-delay: 0s;
    position: absolute;
    left: var(--shine-x);
    top: var(--shine-y);
    width: 55%;
    height: 45%;
    pointer-events: none;
    background: linear-gradient(
        150deg,
        transparent 0%,
        rgba(36, 131, 197, .18) 32%,
        rgba(170, 220, 255, .58) 46%,
        rgba(255, 255, 255, .92) 52%,
        rgba(80, 160, 240, .32) 62%,
        transparent 78%
    );
    opacity: 0;
    mix-blend-mode: screen;
    filter: blur(0.45px);
    will-change: transform, opacity;
    animation-delay: var(--wave-delay);
    animation-fill-mode: both;
}
.auth-logo-shine-beam--b { width: 40%; height: 36%; filter: blur(1px); }
.auth-logo-shine-beam--c { width: 30%; height: 52%; filter: blur(1.5px); }

.auth-logo-tv-scan {
    position: absolute;
    inset: -8% 0;
    background: repeating-linear-gradient(
        180deg,
        rgba(255, 255, 255, 0) 0 2px,
        rgba(180, 230, 255, .14) 2px 3px
    );
    opacity: 0;
    mix-blend-mode: soft-light;
    transform: translateY(-30%);
    pointer-events: none;
}
.auth-logo-tv-bloom {
    position: absolute;
    inset: 8% 12%;
    border-radius: 42%;
    background: radial-gradient(circle, rgba(200, 240, 255, .45) 0%, rgba(90, 180, 255, .12) 42%, transparent 70%);
    opacity: 0;
    mix-blend-mode: screen;
    pointer-events: none;
}

.auth-logo-shine.is-wave-tb .auth-logo-shine-beam { animation-name: authLogoWaveTB; animation-duration: 2.9s; animation-timing-function: cubic-bezier(.22,.65,.2,1); }
.auth-logo-shine.is-wave-diag .auth-logo-shine-beam { animation-name: authLogoWaveDiag; animation-duration: 3.2s; animation-timing-function: cubic-bezier(.22,.65,.2,1); }
.auth-logo-shine.is-wave-sea .auth-logo-shine-beam { animation-name: authLogoWaveSea; animation-duration: 3.8s; animation-timing-function: cubic-bezier(.18,.7,.25,1); }
.auth-logo-shine.is-wave-lr .auth-logo-shine-beam { animation-name: authLogoWaveLR; animation-duration: 3.1s; animation-timing-function: cubic-bezier(.22,.65,.2,1); }
.auth-logo-shine.is-tv-air .auth-logo-img {
    animation: authLogoTvAir 2.8s ease-out;
}
.auth-logo-shine.is-tv-air .auth-logo-sea {
    animation: authLogoTvAirGlow 2.8s ease-out;
}
.auth-logo-shine.is-tv-air .auth-logo-tv-scan {
    animation: authLogoTvScan 2.8s ease-out;
}
.auth-logo-shine.is-tv-air .auth-logo-tv-bloom {
    animation: authLogoTvBloom 2.8s ease-out;
}

@keyframes authLogoWaveTB {
    0% { transform: translate3d(0, -10%, 0); opacity: 0; }
    12% { opacity: .85; }
    100% { transform: translate3d(6%, 160%, 0); opacity: 0; }
}
@keyframes authLogoWaveDiag {
    0% { transform: translate3d(0, 0, 0); opacity: 0; }
    14% { opacity: .95; }
    100% { transform: translate3d(150%, 150%, 0); opacity: 0; }
}
@keyframes authLogoWaveSea {
    0% { transform: translate3d(0, 0, 0) rotate(-4deg); opacity: 0; }
    10% { opacity: .78; }
    28% { transform: translate3d(35%, 18%, 0) rotate(2deg); opacity: .92; }
    48% { transform: translate3d(70%, -12%, 0) rotate(-3deg); opacity: .95; }
    68% { transform: translate3d(110%, 22%, 0) rotate(3deg); opacity: .72; }
    100% { transform: translate3d(160%, 40%, 0) rotate(-2deg); opacity: 0; }
}
@keyframes authLogoWaveLR {
    0% { transform: translate3d(-20%, 10%, 0); opacity: 0; }
    12% { opacity: .88; }
    100% { transform: translate3d(160%, -8%, 0); opacity: 0; }
}
@keyframes authLogoTvAir {
    0%,100% { filter: drop-shadow(0 .45rem 1.1rem rgba(0,0,0,.28)) brightness(1) saturate(1); }
    22% { filter: drop-shadow(0 0 1.5rem rgba(120, 205, 255, .58)) brightness(1.18) saturate(1.16); }
    48% { filter: drop-shadow(0 .5rem 1rem rgba(36, 131, 197, .34)) brightness(1.08) saturate(1.07); }
    72% { filter: drop-shadow(0 0 1.1rem rgba(180, 230, 255, .28)) brightness(1.04) saturate(1.03); }
}
@keyframes authLogoTvAirGlow {
    0%,100% { opacity: 0; }
    22% { opacity: 1; }
    60% { opacity: .5; }
}
@keyframes authLogoTvScan {
    0% { opacity: 0; transform: translateY(-45%); }
    15% { opacity: .9; }
    100% { opacity: 0; transform: translateY(75%); }
}
@keyframes authLogoTvBloom {
    0%,100% { opacity: 0; transform: scale(.85); }
    30% { opacity: .85; transform: scale(1.05); }
    65% { opacity: .35; transform: scale(1.12); }
}

/* Cam-HIS letter body only — frame + glyph mask from measured PNG */
.auth-logo-text-transcript {
    /* Measured solid letter bounds in cam-his-full.png */
    --text-frame-l: 42.2%;
    --text-frame-t: 37.4%;
    --text-frame-w: 53.8%;
    --text-frame-h: 25.2%;
    position: absolute;
    left: var(--text-frame-l);
    top: var(--text-frame-t);
    width: var(--text-frame-w);
    height: var(--text-frame-h);
    overflow: hidden;
    pointer-events: none;
    opacity: 0;
    z-index: 4;
    -webkit-mask-image: url("/assets/img/cam-his-text-mask.png");
    mask-image: url("/assets/img/cam-his-text-mask.png");
    -webkit-mask-mode: alpha;
    mask-mode: alpha;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-size: calc(100% * 100 / 53.8) calc(100% * 100 / 25.2);
    mask-size: calc(100% * 100 / 53.8) calc(100% * 100 / 25.2);
    -webkit-mask-position: calc(-100% * 42.2 / 53.8) calc(-100% * 37.4 / 25.2);
    mask-position: calc(-100% * 42.2 / 53.8) calc(-100% * 37.4 / 25.2);
}
.auth-logo-text-transcript-fill {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        #0b274f 0%,
        #163a78 10%,
        #1a5fa8 22%,
        #2483c5 38%,
        #3ea0e0 52%,
        #7ec8ff 68%,
        #d7f1ff 82%,
        #ffffff 92%,
        #5eb0ff 100%
    );
    background-size: 260% 100%;
    background-position: 0% 50%;
    mix-blend-mode: color;
}
.auth-logo-text-transcript-glow {
    position: absolute;
    inset: 0 auto 0 0;
    width: 0%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(126, 200, 255, .15) 40%,
        rgba(255, 255, 255, .55) 52%,
        rgba(36, 131, 197, .2) 70%,
        transparent 100%
    );
    mix-blend-mode: screen;
    opacity: 0;
}
.auth-logo-text-transcript-head {
    position: absolute;
    top: 4%;
    bottom: 4%;
    left: 0;
    width: 2px;
    border-radius: 2px;
    background: linear-gradient(180deg, transparent, #fff, #7ec8ff, transparent);
    opacity: 0;
    box-shadow: 0 0 10px rgba(180, 230, 255, .95);
    mix-blend-mode: screen;
}
.auth-logo-shine.is-transcript .auth-logo-text-transcript {
    opacity: 1;
}
.auth-logo-shine.is-transcript .auth-logo-text-transcript-fill {
    animation: authLogoTextColorBody 15.5s cubic-bezier(.2,.08,.16,1) forwards;
}
.auth-logo-shine.is-transcript .auth-logo-text-transcript-glow {
    animation: authLogoTextColorGlow 15.5s cubic-bezier(.2,.08,.16,1) forwards;
}
.auth-logo-shine.is-transcript .auth-logo-text-transcript-head {
    animation: authLogoTextScanHead 15.5s cubic-bezier(.2,.08,.16,1) forwards;
}
@keyframes authLogoTextColorBody {
    0% { width: 0%; background-position: 0% 50%; opacity: 0; }
    3% { opacity: 1; }
    68% { width: 100%; background-position: 48% 50%; opacity: 1; }
    84% { width: 100%; background-position: 100% 50%; opacity: .7; }
    100% { width: 100%; background-position: 100% 50%; opacity: 0; }
}
@keyframes authLogoTextColorGlow {
    0% { width: 0%; opacity: 0; }
    3% { opacity: .9; }
    68% { width: 100%; opacity: .75; }
    84% { width: 100%; opacity: .35; }
    100% { width: 100%; opacity: 0; }
}
@keyframes authLogoTextScanHead {
    0% { left: 0; opacity: 0; }
    3% { opacity: 1; }
    68% { left: calc(100% - 2px); opacity: 1; }
    84% { opacity: .28; }
    100% { left: calc(100% - 2px); opacity: 0; }
}

.auth-logo-caption { display: block; margin-top: .55rem; color: rgba(255,255,255,.72); font-size: 0.95rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.auth-logo-mark { display: inline-grid; place-items: center; width: 3rem; height: 3rem; flex: 0 0 3rem; color: #075f4b; background: #fff; border-radius: .85rem; box-shadow: 0 .75rem 1.75rem rgba(0,0,0,.14); font-size: 1.25rem; }
.auth-logo strong, .auth-logo small { display: block; }
.auth-logo strong { font-size: 1.2rem; letter-spacing: .025em; }
.auth-logo small { margin-top: .1rem; color: rgba(255,255,255,.68); font-size: .7rem; }
.auth-brand-message { max-width: 39rem; margin: auto 0; padding: 5rem 0; }
.auth-kicker { display: inline-flex; align-items: center; gap: .45rem; margin-bottom: 1.35rem; color: #fbb607; font-size: 0.95rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.auth-brand-message h2 { max-width: 35rem; margin: 0; color: #fff; font-size: clamp(2.5rem, 4.5vw, 4.35rem); font-weight: 760; line-height: 1.05; letter-spacing: -.045em; }
.auth-brand-message p { max-width: 35rem; margin: 1.5rem 0 0; color: rgba(255,255,255,.74); font-size: clamp(.95rem, 1.4vw, 1.08rem); line-height: 1.7; }
.auth-brand-assurance { display: grid; grid-template-columns: repeat(3,1fr); gap: .75rem; max-width: 38rem; }
.auth-brand-assurance > span { display: grid; grid-template-columns: 2rem 1fr; align-items: center; padding: .9rem; border: 1px solid rgba(255,255,255,.12); border-radius: .75rem; background: rgba(255,255,255,.055); backdrop-filter: blur(8px); }
.auth-brand-assurance i { grid-row: 1 / 3; color: #e5c471; font-size: 1.1rem; }
.auth-brand-assurance strong, .auth-brand-assurance small { display: block; }
.auth-brand-assurance strong { font-size: .78rem; }
.auth-brand-assurance small { color: rgba(255,255,255,.58); font-size: .65rem; }
.auth-brand-footer { margin: 2rem 0 0; color: rgba(255,255,255,.5); font-size: .68rem; letter-spacing: .05em; text-transform: uppercase; }
.auth-form-panel { display: grid; place-items: center; padding: clamp(2rem, 6vw, 6rem); background: #f8fafb; }
.auth-form-wrap { width: min(100%, 27.5rem); }
.auth-mobile-brand { display: none; }
.auth-security-label { display: inline-flex; align-items: center; gap: .42rem; margin-bottom: 1rem; color: #08755b; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.auth-heading h1 { margin: 0; color: #17212b; font-size: clamp(2rem, 3vw, 2.55rem); font-weight: 760; letter-spacing: -.035em; }
.auth-heading p { margin: .65rem 0 0; color: #687584; font-size: .93rem; }
.auth-form { display: grid; gap: 1.25rem; margin-top: 2rem; }
.auth-session-alert { display: flex; align-items: flex-start; gap: .8rem; padding: .9rem 1rem; color: #155e75; background: #ecfeff; border: 1px solid #bae6fd; border-radius: .7rem; }
.auth-session-alert > i { margin-top: .12rem; }
.auth-session-alert strong, .auth-session-alert span { display: block; }
.auth-session-alert strong { font-size: .82rem; }
.auth-session-alert span { margin-top: .15rem; font-size: .74rem; }
.auth-field label { display: block; margin-bottom: .48rem; color: #263441; font-size: .8rem; font-weight: 700; }
.auth-input-wrap { position: relative; display: flex; align-items: center; }
.auth-input-wrap > i { position: absolute; left: 1rem; z-index: 1; color: #7c8996; }
.auth-input-wrap input { width: 100%; height: 3.25rem; padding: 0 3rem; color: #17212b; background: #fff; border: 1px solid #ccd5dd; border-radius: .65rem; outline: 0; font-size: .9rem; transition: border-color .15s ease, box-shadow .15s ease; }
.auth-input-wrap input::placeholder { color: #9aa6b2; }
.auth-input-wrap input:hover { border-color: #98a7b4; }
.auth-input-wrap input:focus { border-color: #08755b; box-shadow: 0 0 0 .2rem rgba(4,120,87,.12); }
.auth-password-toggle { position: absolute; right: .45rem; display: grid; place-items: center; width: 2.35rem; height: 2.35rem; color: #71808e; background: transparent; border: 0; border-radius: .45rem; }
.auth-password-toggle:hover, .auth-password-toggle:focus-visible { color: #08755b; background: #ecfdf5; }
.auth-submit { display: flex; align-items: center; justify-content: center; gap: .65rem; width: 100%; min-height: 3.25rem; margin-top: .25rem; color: #fff; background: #08755b; border: 1px solid #08755b; border-radius: .65rem; box-shadow: 0 .6rem 1.2rem rgba(8,117,91,.17); font-size: .9rem; font-weight: 750; transition: background .15s ease, transform .15s ease, box-shadow .15s ease; }
.auth-submit:hover { background: #065f46; box-shadow: 0 .75rem 1.5rem rgba(8,117,91,.23); transform: translateY(-1px); }
.auth-submit i { transition: transform .15s ease; }
.auth-submit:hover i { transform: translateX(3px); }
.auth-support { display: flex; align-items: center; justify-content: center; gap: .55rem; margin-top: 2rem; padding-top: 1.5rem; color: #7a8793; border-top: 1px solid #dde3e8; font-size: .74rem; }
.auth-support strong { color: #53616e; font-weight: 700; }
.auth-lan-access--devices { margin-top: .75rem; }
.auth-lan-remote {
    margin-bottom: .85rem;
    padding: .55rem .65rem;
    border-radius: .45rem;
    border: 1px solid rgba(25, 135, 84, .35);
    background: rgba(25, 135, 84, .08);
}
.auth-lan-link--remote { font-weight: 700; word-break: break-all; }
.auth-lan-subhead { display: block; margin-top: .65rem; margin-bottom: .25rem; }
html[data-bs-theme="dark"] .auth-lan-remote {
    border-color: rgba(117, 183, 152, .45);
    background: rgba(25, 135, 84, .15);
}
.auth-lan-access {
    display: flex;
    align-items: flex-start;
    gap: .65rem;
    margin-top: 1.1rem;
    padding: .85rem .95rem;
    border: 1px dashed #c5d0da;
    border-radius: .75rem;
    background: #f7fafc;
    color: #53616e;
    font-size: .72rem;
    line-height: 1.45;
}
.auth-lan-access > i { margin-top: .12rem; color: #0d6efd; font-size: 1rem; }
.auth-lan-access strong { display: block; margin-bottom: .25rem; color: #334150; font-weight: 750; }
.auth-lan-link {
    display: block;
    color: #0b5ed7;
    font-weight: 700;
    text-decoration: none;
    word-break: break-all;
}
.auth-lan-link:hover { text-decoration: underline; }
.auth-lan-access small { display: block; margin-top: .35rem; color: #7a8793; }
html[data-bs-theme="dark"] .auth-lan-access {
    border-color: #3a4652;
    background: #1c242c;
    color: #9aa7b3;
}
html[data-bs-theme="dark"] .auth-lan-access strong { color: #d5dde4; }
html[data-bs-theme="dark"] .auth-lan-link { color: #6ea8fe; }
html[data-bs-theme="dark"] .auth-lan-access small { color: #8f9ba6; }
.auth-copyright { margin: 2rem 0 0; color: #9aa4ae; text-align: center; font-size: .68rem; }
.auth-toast { position: fixed; top: 1.25rem; right: 1.25rem; z-index: 1060; display: flex; align-items: center; gap: .75rem; width: min(calc(100vw - 2rem), 23rem); padding: .9rem; color: #263441; background: #fff; border: 1px solid #dce3e8; border-radius: .75rem; box-shadow: 0 1rem 2.5rem rgba(15,23,42,.15); cursor: pointer; }
.auth-toast-icon { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; flex: 0 0 2.35rem; border-radius: .6rem; }
.auth-toast-icon.is-error { background: #dc3545; }
.auth-toast-icon.is-success { background: #08755b; }
.auth-toast-copy { display: grid; gap: .1rem; min-width: 0; }
.auth-toast-copy small { display: flex; align-items: center; gap: .35rem; color: #08755b; font-size: .55rem; font-weight: 850; letter-spacing: .075em; text-transform: uppercase; }
.auth-toast-copy small > span { width: 5px; height: 5px; background: currentColor; border-radius: 50%; box-shadow: 0 0 7px currentColor; }
.auth-toast:has(.auth-toast-icon.is-error) .auth-toast-copy small { color: #c82f42; }
.auth-toast-copy strong { font-size: .82rem; }
.auth-toast-copy span { color: #6d7985; font-size: .74rem; }
.auth-toast-close { margin-left: auto; color: #86929d; background: transparent; border: 0; }
.auth-toast-progress { position: absolute; right: 0; bottom: 0; left: 0; height: 3px; transform-origin: left; animation: authToastProgress 5s linear forwards; }
.auth-toast-progress.is-success { background: linear-gradient(90deg, #08755b, #55ddb3); }
.auth-toast-progress.is-error { background: linear-gradient(90deg, #c82f42, #ff8793); }
@keyframes authToastProgress { to { transform: scaleX(0); } }

html[data-bs-theme="dark"] .auth-form-panel { background: #111820; }
html[data-bs-theme="dark"] .auth-heading h1, html[data-bs-theme="dark"] .auth-field label { color: #edf2f5; }
html[data-bs-theme="dark"] .auth-heading p, html[data-bs-theme="dark"] .auth-support { color: #9aa7b3; }
html[data-bs-theme="dark"] .auth-input-wrap input { color: #edf2f5; background: #18222c; border-color: #34414d; }
html[data-bs-theme="dark"] .auth-support { border-color: #2c3741; }
html[data-bs-theme="dark"] .auth-support strong { color: #c4cdd5; }

@media (max-width: 991.98px) { .auth-page { grid-template-columns: minmax(20rem,.8fr) minmax(28rem,1.2fr); } .auth-brand-panel { padding: 2.25rem; } .auth-brand-assurance { grid-template-columns: 1fr; max-width: 15rem; } .auth-brand-message h2 { font-size: 2.65rem; } }
@media (max-width: 767.98px) { .auth-page { display: block; background: #f8fafb; } .auth-brand-panel { display: none; } .auth-form-panel { min-height: 100vh; min-height: 100dvh; padding: 2rem 1.25rem; } .auth-mobile-brand { display: flex; align-items: center; margin-bottom: 2.5rem; } .auth-logo-img-mobile { width: min(100%, 13.5rem); filter: drop-shadow(0 .25rem .7rem rgba(0,0,0,.12)); } }
@media (prefers-reduced-motion: reduce) { .auth-submit, .auth-submit i { transition: none; } }

/* CAMHIS clinical data-network motion layer */
.auth-tech-scene { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.auth-tech-grid { position: absolute; inset: 0; opacity: .22; background-image: linear-gradient(rgba(164,235,213,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(164,235,213,.12) 1px, transparent 1px); background-size: 48px 48px; -webkit-mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); mask-image: linear-gradient(to bottom, transparent, #000 18%, #000 82%, transparent); animation: authGridDrift 24s linear infinite; }
.auth-tech-beam { position: absolute; width: 36rem; height: 36rem; border-radius: 50%; filter: blur(3px); opacity: .34; }
.auth-tech-beam::before, .auth-tech-beam::after { content: ""; position: absolute; inset: 0; border: 1px solid rgba(131,242,208,.14); border-radius: inherit; }
.auth-tech-beam::after { inset: 18%; border-color: rgba(229,196,113,.13); }
.auth-tech-beam-one { top: -20rem; right: -15rem; background: radial-gradient(circle, rgba(94,230,185,.18), transparent 62%); animation: authOrbitFloat 14s ease-in-out infinite alternate; }
.auth-tech-beam-two { bottom: -24rem; left: -16rem; background: radial-gradient(circle, rgba(119,237,202,.15), transparent 62%); animation: authOrbitFloat 18s ease-in-out -5s infinite alternate-reverse; }
.auth-network-node { position: absolute; display: grid; place-items: center; width: 2.7rem; height: 2.7rem; color: rgba(220,238,255,.8); background: rgba(11,47,99,.54); border: 1px solid rgba(131,242,208,.2); border-radius: .75rem; box-shadow: 0 0 0 6px rgba(131,242,208,.025), 0 0 1.5rem rgba(94,230,185,.12); backdrop-filter: blur(6px); animation: authNodeFloat 6s ease-in-out infinite; }
.auth-network-node::after { content: ""; position: absolute; inset: -5px; border: 1px solid rgba(131,242,208,.12); border-radius: .95rem; animation: authNodePulse 2.8s ease-out infinite; }
.auth-network-node i { font-size: 1rem; }
.node-one { top: 18%; right: 12%; }
.node-two { top: 57%; right: 7%; animation-delay: -2s; }
.node-three { bottom: 13%; left: 47%; animation-delay: -4s; }
.node-four { top: 39%; left: 6%; animation-delay: -1s; }
.auth-pulse-line { position: absolute; left: 0; bottom: 13%; width: 100%; height: 9rem; opacity: .34; filter: drop-shadow(0 0 6px rgba(135,246,211,.3)); }
.auth-pulse-line path { fill: none; vector-effect: non-scaling-stroke; }
.auth-pulse-line-base { stroke: rgba(166,230,211,.14); stroke-width: 1; }
.auth-pulse-line-live { stroke: rgba(149,248,218,.72); stroke-width: 1.5; stroke-linecap: round; stroke-dasharray: 90 810; animation: authPulseTravel 5.5s linear infinite; }
.auth-live-dot { position: relative; display: inline-block; width: .48rem; height: .48rem; flex: 0 0 .48rem; background: #5ee6b9; border-radius: 50%; box-shadow: 0 0 .8rem rgba(94,230,185,.75); }
.auth-live-dot::after { content: ""; position: absolute; inset: -.28rem; border: 1px solid rgba(94,230,185,.55); border-radius: 50%; animation: authLivePing 2s ease-out infinite; }
.auth-system-status { display: flex; align-items: center; gap: .5rem; width: fit-content; margin-top: 1rem; color: rgba(238,255,249,.82); font-size: .68rem; font-weight: 650; letter-spacing: .025em; }
.auth-system-status small { margin-left: .4rem; padding-left: .8rem; color: rgba(238,255,249,.48); border-left: 1px solid rgba(255,255,255,.16); font-size: .63rem; font-weight: 500; }
.auth-form-panel { position: relative; overflow: hidden; }
.auth-form-panel::before { content: ""; position: absolute; top: 0; left: -45%; width: 38%; height: 2px; background: linear-gradient(90deg, transparent, rgba(8,117,91,.55), transparent); box-shadow: 0 0 1rem rgba(8,117,91,.28); animation: authPanelScan 9s ease-in-out infinite; }
.auth-form-wrap { position: relative; z-index: 1; }
.auth-logo-mark { position: relative; overflow: hidden; }
/* Old white icon-box flash disabled — shine runs on PNG Frame Picture only. */
.auth-logo-mark::after { content: none; display: none; }

@keyframes authGridDrift { to { background-position: 48px 48px; } }
@keyframes authOrbitFloat { from { transform: translate3d(0,0,0) scale(.96); } to { transform: translate3d(-2rem,2rem,0) scale(1.06); } }
@keyframes authNodeFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes authNodePulse { 0% { transform: scale(.88); opacity: 0; } 35% { opacity: .7; } 100% { transform: scale(1.35); opacity: 0; } }
@keyframes authPulseTravel { from { stroke-dashoffset: 0; } to { stroke-dashoffset: -900; } }
@keyframes authLivePing { 0% { transform: scale(.65); opacity: .9; } 100% { transform: scale(1.65); opacity: 0; } }
@keyframes authPanelScan { 0%,12% { transform: translateX(0); opacity: 0; } 18% { opacity: 1; } 46%,100% { transform: translateX(390%); opacity: 0; } }
@keyframes authLogoFlash { 0%,72% { transform: translateX(0) skewX(-20deg); } 86%,100% { transform: translateX(430%) skewX(-20deg); } }

@media (max-width: 1199.98px) { .auth-network-node { opacity: .55; } .node-four { display: none; } }
@media (prefers-reduced-motion: reduce) { .auth-tech-grid, .auth-tech-beam, .auth-network-node, .auth-network-node::after, .auth-pulse-line-live, .auth-live-dot::after, .auth-form-panel::before, .auth-logo-mark::after, .auth-logo-shine-beam, .auth-logo-sea, .auth-logo-tv-scan, .auth-logo-tv-bloom, .auth-logo-facet-glow, .auth-logo-text-transcript, .auth-logo-frame-path, .auth-logo-frame-light, .auth-logo-frame-spark { animation: none !important; } .auth-logo-shine-beam, .auth-logo-sea, .auth-logo-tv-scan, .auth-logo-tv-bloom, .auth-logo-facet-glow, .auth-logo-text-transcript, .auth-logo-frame-light { display: none; } .auth-pulse-line-live { stroke-dasharray: none; opacity: .35; } }

/* Auth typography and live broadcast telemetry */
.auth-layout, .auth-page, .auth-page input, .auth-page button { font-family: "Segoe UI Variable", "Aptos", "Inter", "Siemreap", system-ui, sans-serif !important; }
.auth-page h1, .auth-page h2, .auth-logo strong { font-family: "Segoe UI Variable Display", "Aptos Display", "Segoe UI", "Siemreap", sans-serif !important; }
.auth-brand-message h2 span { color: #7dd3fc; text-shadow: 0 0 1.75rem rgba(125,211,252,.18); }
.auth-heading h1 { font-weight: 720; font-variation-settings: "wght" 720; }
.auth-heading p, .auth-field label, .auth-input-wrap input { letter-spacing: -.005em; }
.auth-submit { letter-spacing: .01em; }

.auth-signal-particle { position: absolute; width: 4px; height: 4px; background: #9fd4ff; border-radius: 50%; box-shadow: 0 0 5px #9fd4ff, 0 0 13px rgba(94,230,185,.8); opacity: 0; }
.signal-one { top: 14%; left: 22%; animation: authSignalPathOne 11s linear infinite; }
.signal-two { top: 74%; left: 16%; animation: authSignalPathTwo 14s linear -7s infinite; }
.signal-three { top: 43%; right: 21%; animation: authSignalPathThree 9s linear -3s infinite; }
.signal-four { top: 24%; left: 63%; animation: authSignalPathFour 16s linear -11s infinite; }
.signal-five { bottom: 12%; right: 29%; animation: authSignalPathFive 12.5s linear -5s infinite; }
.auth-telemetry { position: absolute; display: flex; align-items: center; gap: .45rem; padding: .45rem .65rem; color: rgba(226,240,255,.72); background: rgba(2,37,29,.44); border: 1px solid rgba(151,242,214,.12); border-radius: .45rem; box-shadow: 0 .6rem 1.5rem rgba(0,0,0,.08); backdrop-filter: blur(7px); font-size: .58rem; letter-spacing: .035em; opacity: .68; animation: authTelemetryFloat 7s ease-in-out infinite; }
.auth-telemetry strong { font-weight: 650; }
.auth-telemetry small { color: rgba(226,240,255,.4); font-size: .52rem; }
.auth-telemetry > span:first-child { padding: .15rem .3rem; color: #032b21; background: #70ebc3; border-radius: .2rem; font-size: .45rem; font-weight: 900; letter-spacing: .08em; box-shadow: 0 0 .75rem rgba(112,235,195,.32); }
.auth-telemetry > i { color: #70ebc3; }
.telemetry-one { top: 29%; right: 5%; animation-delay: -1.5s; }
.telemetry-two { bottom: 26%; left: 4%; animation-delay: -5s; }
.telemetry-three { top: 11%; left: 42%; animation-delay: -3.25s; }
.auth-telemetry-bars { display: flex; align-items: end; gap: 2px; height: .7rem; }
.auth-telemetry-bars i { display: block; width: 2px; background: #70ebc3; border-radius: 2px; animation: authSignalBars .9s ease-in-out infinite alternate; }
.auth-telemetry-bars i:nth-child(1) { height: 35%; }
.auth-telemetry-bars i:nth-child(2) { height: 100%; animation-delay: -.4s; }
.auth-telemetry-bars i:nth-child(3) { height: 65%; animation-delay: -.7s; }

@keyframes authSignalPathOne { 0% { opacity: 0; transform: translate(0,0); } 8% { opacity: .9; } 48% { transform: translate(13rem,5rem); } 76% { opacity: .7; transform: translate(19rem,-2rem); } 100% { opacity: 0; transform: translate(28rem,7rem); } }
@keyframes authSignalPathTwo { 0% { opacity: 0; transform: translate(0,0); } 15% { opacity: .7; } 52% { transform: translate(16rem,-6rem); } 100% { opacity: 0; transform: translate(31rem,-1rem); } }
@keyframes authSignalPathThree { 0% { opacity: 0; transform: translate(0,0); } 20% { opacity: .85; } 55% { transform: translate(-8rem,7rem); } 100% { opacity: 0; transform: translate(-22rem,-4rem); } }
@keyframes authSignalPathFour { 0% { opacity: 0; transform: translate(0,0); } 12% { opacity: .7; } 42% { transform: translate(-11rem,8rem); } 70% { transform: translate(-17rem,2rem); } 100% { opacity: 0; transform: translate(-28rem,13rem); } }
@keyframes authSignalPathFive { 0% { opacity: 0; transform: translate(0,0); } 14% { opacity: .75; } 60% { transform: translate(-12rem,-9rem); } 100% { opacity: 0; transform: translate(8rem,-17rem); } }
@keyframes authTelemetryFloat { 0%,100% { transform: translate3d(0,0,0); opacity: .5; } 45% { transform: translate3d(7px,-8px,0); opacity: .8; } 70% { transform: translate3d(-3px,-4px,0); opacity: .66; } }
@keyframes authSignalBars { from { transform: scaleY(.45); opacity: .55; } to { transform: scaleY(1); opacity: 1; } }

@media (max-width: 1199.98px) { .auth-telemetry { opacity: .42; } .telemetry-three { display: none; } }
@media (max-width: 991.98px) { .auth-signal-particle, .auth-telemetry { display: none; } }
@media (prefers-reduced-motion: reduce) { .auth-signal-particle { display: none; } .auth-telemetry, .auth-telemetry-bars i { animation: none !important; } }

/* Authentication utilities and interaction states */
.auth-page-tools { position: absolute; top: 1.5rem; right: 1.5rem; z-index: 3; display: flex; align-items: center; gap: .65rem; }
.auth-connection-state { display: inline-flex; align-items: center; gap: .42rem; padding: .42rem .65rem; color: #60707d; background: rgba(255,255,255,.76); border: 1px solid #dce3e8; border-radius: 999px; backdrop-filter: blur(10px); font-size: .65rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.auth-connection-state .auth-live-dot { width: .38rem; height: .38rem; flex-basis: .38rem; background: #0aa678; box-shadow: 0 0 .6rem rgba(10,166,120,.55); }
.auth-theme-toggle { display: grid; place-items: center; width: 2.35rem; height: 2.35rem; color: #53616e; background: rgba(255,255,255,.76); border: 1px solid #dce3e8; border-radius: 50%; backdrop-filter: blur(10px); transition: color .15s ease, border-color .15s ease, background .15s ease, transform .2s ease; }
.auth-theme-toggle:hover { color: #08755b; background: #fff; border-color: rgba(4,120,87,.35); transform: rotate(18deg); }
.auth-theme-toggle:focus-visible, .auth-password-toggle:focus-visible, .auth-submit:focus-visible { outline: 3px solid rgba(4,120,87,.22); outline-offset: 2px; }
.auth-submit-ready, .auth-submit-busy { align-items: center; justify-content: center; gap: .65rem; }
.auth-submit-ready { display: flex; }
.auth-submit-busy { display: none; }
.auth-submit.is-submitting { cursor: wait; transform: none; }
.auth-submit.is-submitting .auth-submit-ready { display: none; }
.auth-submit.is-submitting .auth-submit-busy { display: flex; }
.auth-submit-spinner { width: 1rem; height: 1rem; border: 2px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: authSpinner .7s linear infinite; }
.auth-input-wrap:focus-within > i { color: #08755b; transform: scale(1.06); }
.auth-input-wrap > i { transition: color .15s ease, transform .15s ease; }
.auth-field:focus-within label { color: #08755b; }
.auth-field label { transition: color .15s ease; }
html[data-bs-theme="dark"] .auth-connection-state, html[data-bs-theme="dark"] .auth-theme-toggle { color: #bdc7cf; background: rgba(24,34,44,.8); border-color: #34414d; }
html[data-bs-theme="dark"] .auth-theme-toggle:hover { color: #7dd3fc; background: #202c37; border-color: rgba(117,226,192,.35); }
html[data-bs-theme="dark"] .auth-field:focus-within label, html[data-bs-theme="dark"] .auth-input-wrap:focus-within > i { color: #7dd3fc; }
@keyframes authSpinner { to { transform: rotate(360deg); } }
@media (max-width: 767.98px) { .auth-page-tools { top: 1.25rem; right: 1.25rem; } .auth-connection-state { display: none; } }
@media (prefers-reduced-motion: reduce) { .auth-theme-toggle { transition: none; } .auth-submit-spinner { animation-duration: 1.4s; } }

/* Intelligent authentication feedback */
.auth-brand-panel { --auth-pointer-x: 50%; --auth-pointer-y: 50%; }
.auth-brand-panel .auth-tech-scene::after { content: ""; position: absolute; inset: 0; background: radial-gradient(24rem circle at var(--auth-pointer-x) var(--auth-pointer-y), rgba(113,240,201,.105), transparent 68%); opacity: .9; transition: opacity .25s ease; }
.auth-inline-error { display: flex; align-items: flex-start; gap: .75rem; margin-top: 1.5rem; padding: .85rem .95rem; color: #8e2430; background: #fff5f5; border: 1px solid #f1c7cb; border-left: 3px solid #dc3545; border-radius: .65rem; animation: authErrorEnter .32s cubic-bezier(.2,.8,.2,1); }
.auth-inline-error > i { margin-top: .1rem; color: #dc3545; }
.auth-inline-error strong, .auth-inline-error span { display: block; }
.auth-inline-error strong { font-size: .8rem; }
.auth-inline-error span { margin-top: .15rem; color: #82434a; font-size: .72rem; line-height: 1.45; }
.auth-inline-error + .auth-form { margin-top: 1.25rem; }
.auth-field-message { display: block; max-height: 0; margin-top: 0; overflow: hidden; color: #778491; font-size: .67rem; opacity: 0; transform: translateY(-3px); transition: max-height .18s ease, margin-top .18s ease, opacity .18s ease, transform .18s ease; }
.auth-field:focus-within .auth-field-message { max-height: 1.5rem; margin-top: .4rem; opacity: 1; transform: translateY(0); }
.auth-caps-warning { display: flex; align-items: center; gap: .35rem; max-height: 0; margin-top: 0; overflow: hidden; color: #a25c00; font-size: .68rem; font-weight: 700; opacity: 0; transition: max-height .18s ease, margin-top .18s ease, opacity .18s ease; }
.auth-caps-warning.is-visible { max-height: 1.5rem; margin-top: .45rem; opacity: 1; }
.auth-caps-warning i { color: #d88916; }
html[data-bs-theme="dark"] .auth-inline-error { color: #ffb5bc; background: rgba(115,30,40,.25); border-color: rgba(244,111,124,.35); border-left-color: #f46f7c; }
html[data-bs-theme="dark"] .auth-inline-error > i { color: #f46f7c; }
html[data-bs-theme="dark"] .auth-inline-error span { color: #dca0a6; }
html[data-bs-theme="dark"] .auth-field-message { color: #8f9ba6; }
html[data-bs-theme="dark"] .auth-caps-warning { color: #e8b66b; }
@keyframes authErrorEnter { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: translateY(0); } }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .auth-brand-panel .auth-tech-scene::after { display: none; } .auth-inline-error { animation: none; } }

/* Precision scanner cursor and connected CAMHIS module icons */
.auth-brand-panel .auth-tech-scene::after { width: 7rem; height: 7rem; inset: auto; left: var(--auth-pointer-x); top: var(--auth-pointer-y); border: 1px solid rgba(131,242,208,.09); border-radius: 50%; background: radial-gradient(circle, rgba(113,240,201,.11) 0%, rgba(94,230,185,.04) 27%, transparent 64%); box-shadow: inset 0 0 1.25rem rgba(94,230,185,.025), 0 0 1rem rgba(94,230,185,.02); opacity: .58; transform: translate(-50%,-50%); transition: width .2s ease, height .2s ease, opacity .2s ease; }
.auth-brand-panel .auth-tech-scene::before { content: ""; position: absolute; z-index: 2; left: var(--auth-pointer-x); top: var(--auth-pointer-y); width: 3px; height: 3px; border: 1px solid rgba(184,255,234,.62); border-radius: 50%; box-shadow: 0 0 6px rgba(94,230,185,.58), 0 0 0 3px rgba(94,230,185,.04); opacity: .68; transform: translate(-50%,-50%); }
.auth-network-node { width: auto; height: auto; min-width: 9rem; padding: .5rem .65rem .5rem .5rem; grid-template-columns: 2.15rem 1fr; gap: .55rem; color: rgba(226,240,255,.88); border-radius: .7rem; }
.auth-network-node::before { content: ""; position: absolute; left: -1px; top: 25%; bottom: 25%; width: 2px; background: linear-gradient(transparent, #7dd3fc, transparent); border-radius: 2px; box-shadow: 0 0 8px rgba(125,211,252,.55); }
.auth-node-icon { display: grid; place-items: center; width: 2.15rem; height: 2.15rem; color: #8ff1d2; background: linear-gradient(145deg, rgba(104,231,190,.14), rgba(104,231,190,.035)); border: 1px solid rgba(143,241,210,.18); border-radius: .55rem; box-shadow: inset 0 0 1rem rgba(104,231,190,.035); }
.auth-node-icon i { font-size: .92rem; animation: authIconBreathe 3.2s ease-in-out infinite; }
.auth-node-label { display: grid; align-content: center; gap: .05rem; text-align: left; line-height: 1.15; }
.auth-node-label strong { color: rgba(239,255,250,.88); font-size: .62rem; font-weight: 750; letter-spacing: .025em; }
.auth-node-label small { color: rgba(219,248,239,.43); font-size: .5rem; }
.node-one { top: 13%; right: 7%; animation: authNodeRandomOne 15.7s ease-in-out -2.1s infinite; }
.node-two { top: 56%; right: 4%; animation: authNodeRandomTwo 19.3s ease-in-out -11.4s infinite; }
.node-three { bottom: 9%; left: 45%; animation: authNodeRandomThree 17.1s ease-in-out -6.8s infinite; }
.node-four { top: 39%; left: 3%; animation: authNodeRandomFour 21.7s ease-in-out -15.2s infinite; }
.node-two .auth-node-icon, .node-four .auth-node-icon { color: #e4c16d; background: linear-gradient(145deg, rgba(228,193,109,.14), rgba(228,193,109,.035)); border-color: rgba(228,193,109,.18); }
.auth-network-links { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .22; }
.auth-network-links path { fill: none; stroke: rgba(133,235,204,.38); stroke-width: 1; stroke-dasharray: 3 8; vector-effect: non-scaling-stroke; animation: authNetworkFlow 14s linear infinite; }
.auth-network-links path:nth-child(2) { stroke: rgba(228,193,109,.3); animation-duration: 18s; animation-direction: reverse; }
.auth-network-links path:nth-child(3) { animation-duration: 11s; }
@keyframes authIconBreathe { 0%,100% { opacity: .72; transform: scale(.94); } 50% { opacity: 1; transform: scale(1.06); filter: drop-shadow(0 0 5px currentColor); } }
@keyframes authNodeRouteOne { 0%,100% { transform: translate3d(0,0,0); } 35% { transform: translate3d(-8px,5px,0); } 68% { transform: translate3d(4px,-7px,0); } }
@keyframes authNodeRouteTwo { 0%,100% { transform: translate3d(0,0,0); } 30% { transform: translate3d(-5px,-8px,0); } 65% { transform: translate3d(7px,3px,0); } }
@keyframes authNodeRouteThree { 0%,100% { transform: translate3d(0,0,0); } 38% { transform: translate3d(8px,-5px,0); } 73% { transform: translate3d(-6px,-8px,0); } }
@keyframes authNodeRouteFour { 0%,100% { transform: translate3d(0,0,0); } 32% { transform: translate3d(5px,8px,0); } 70% { transform: translate3d(-7px,-4px,0); } }
@keyframes authNodeRandomOne { 0%,7%,100% { opacity: 0; transform: translate3d(22px,-12px,0) scale(.82); } 13% { opacity: .78; transform: translate3d(0,0,0) scale(1); } 34% { opacity: .72; transform: translate3d(-9px,7px,0) scale(1); } 41%,82% { opacity: 0; transform: translate3d(-18px,13px,0) scale(.88); } 88% { opacity: .64; transform: translate3d(6px,-5px,0) scale(.97); } 95% { opacity: .55; } }
@keyframes authNodeRandomTwo { 0%,18%,100% { opacity: 0; transform: translate3d(18px,15px,0) scale(.84); } 24% { opacity: .7; transform: translate3d(0,0,0) scale(1); } 48% { opacity: .62; transform: translate3d(-8px,-9px,0) scale(1); } 55%,89% { opacity: 0; transform: translate3d(-14px,-16px,0) scale(.87); } 95% { opacity: .6; transform: translate3d(4px,2px,0) scale(.96); } }
@keyframes authNodeRandomThree { 0%,29%,100% { opacity: 0; transform: translate3d(-15px,18px,0) scale(.82); } 36% { opacity: .74; transform: translate3d(0,0,0) scale(1); } 63% { opacity: .68; transform: translate3d(10px,-7px,0) scale(1); } 71% { opacity: 0; transform: translate3d(18px,-15px,0) scale(.86); } }
@keyframes authNodeRandomFour { 0%,10%,100% { opacity: 0; transform: translate3d(-20px,-8px,0) scale(.83); } 17% { opacity: .66; transform: translate3d(0,0,0) scale(1); } 31% { opacity: .58; transform: translate3d(7px,8px,0) scale(1); } 38%,67% { opacity: 0; transform: translate3d(14px,14px,0) scale(.88); } 74% { opacity: .7; transform: translate3d(-3px,2px,0) scale(.98); } 91% { opacity: .62; transform: translate3d(-9px,-6px,0) scale(1); } 97% { opacity: 0; } }
@keyframes authNetworkFlow { to { stroke-dashoffset: -110; } }
@media (max-width: 1199.98px) { .auth-network-node { min-width: 0; padding: .42rem; grid-template-columns: 2rem; } .auth-node-label { display: none; } .auth-node-icon { width: 2rem; height: 2rem; } }
@media (pointer: coarse), (prefers-reduced-motion: reduce) { .auth-brand-panel .auth-tech-scene::before, .auth-brand-panel .auth-tech-scene::after { display: none; } .auth-network-node, .auth-node-icon i, .auth-network-links path { animation: none !important; } }

/* Calm login composition: icon-only delayed system signals */
.auth-brand-message { max-width: 35rem; padding: 4rem 0; }
.auth-brand-message h2 { max-width: 32rem; font-size: clamp(2.35rem, 4vw, 3.8rem); line-height: 1.08; }
.auth-brand-message p { max-width: 30rem; font-size: 1rem; line-height: 1.65; }
.auth-network-node { display: grid; width: 3.15rem; height: 3.15rem; min-width: 0; padding: .42rem; grid-template-columns: 1fr; place-items: center; gap: 0; opacity: 0; border-radius: 1rem; }
.auth-network-node::before { top: 28%; bottom: 28%; }
.auth-node-icon { width: 2.2rem; height: 2.2rem; border-radius: .7rem; }
.auth-node-label { display: none !important; }
.node-one { top: 17%; right: 11%; animation: authNodeRandomOne 18s ease-in-out 2.2s infinite; }
.node-two { top: 62%; right: 8%; animation: authNodeRandomTwo 21s ease-in-out 6.5s infinite; }
.node-three { bottom: 10%; left: 53%; animation: authNodeRandomThree 19.5s ease-in-out 10.8s infinite; }
.node-four { top: 47%; left: 8%; animation: authNodeRandomFour 23s ease-in-out 14.5s infinite; }
.auth-network-links { opacity: .1; }
.auth-pulse-line { opacity: .2; }
.auth-signal-particle { opacity: 0; }
@media (max-width: 1199.98px) { .auth-network-node { width: 2.85rem; height: 2.85rem; padding: .35rem; } .auth-node-icon { width: 2rem; height: 2rem; } }
@media (prefers-reduced-motion: reduce) { .auth-network-node { opacity: .45; } }

/* Standardized brand-panel rhythm and alignment */
.auth-brand-content { justify-content: flex-start; }
.auth-logo { gap: .55rem; }
.auth-logo-img { width: min(100%, 19.5rem); }
.auth-logo-mark { width: 3.1rem; height: 3.1rem; flex-basis: 3.1rem; border-radius: .82rem; }
.auth-logo strong { font-size: 1.16rem; line-height: 1.2; letter-spacing: .018em; }
.auth-logo small { margin-top: .22rem; font-size: .68rem; line-height: 1.25; letter-spacing: .005em; }
.auth-brand-message { width: 100%; max-width: 39rem; margin: clamp(5.5rem, 13vh, 8rem) 0 0; padding: 0; }
.auth-kicker { margin-bottom: 1.45rem; font-size: 0.9rem; letter-spacing: .09em; }
.auth-brand-message h2 { display: grid; gap: .08em; max-width: 39rem; font-size: clamp(2.65rem, 3.35vw, 3.4rem); line-height: 1.07; letter-spacing: -.042em; }
.auth-brand-message h2 .auth-headline-primary, .auth-brand-message h2 .auth-headline-accent { display: block; white-space: nowrap; }
.auth-brand-message h2 .auth-headline-primary { color: #fff; text-shadow: none; }
.auth-brand-message h2 .auth-headline-accent { color: #fbb607; }
.auth-brand-message p { max-width: 31rem; margin-top: 1.45rem; font-size: .94rem; line-height: 1.65; }
@media (max-height: 760px) and (min-width: 768px) { .auth-brand-message { margin-top: 4rem; } }
@media (max-width: 1199.98px) { .auth-brand-message { margin-top: 5rem; } .auth-brand-message h2 { font-size: clamp(2.3rem, 3.6vw, 3rem); } .auth-brand-message h2 .auth-headline-primary, .auth-brand-message h2 .auth-headline-accent { white-space: normal; } }

/* Quiet rotating CAMHIS transcript and occasional icon waves */
.auth-system-quotes { display: flex; align-items: center; gap: .7rem; width: min(100%, 34rem); min-height: 2.5rem; margin-top: 2.5rem; padding-top: 1rem; color: rgba(232,255,248,.85); border-top: 1px solid rgba(255,255,255,.1); }
.auth-system-quotes > i { color: #fbb607; font-size: 1.4rem; }
.auth-quote-track { display: grid; flex: 1; min-width: 0; }
.auth-quote-track span { grid-area: 1 / 1; font-size: 0.85rem; font-weight: 550; letter-spacing: .018em; line-height: 1.45; opacity: 0; transform: translateY(5px); animation: authQuoteCycle 18s ease-in-out infinite; }
.auth-quote-track span:nth-child(2) { animation-delay: 6s; }
.auth-quote-track span:nth-child(3) { animation-delay: 12s; }
.node-one::after { animation: authNodeWaveOne 18s ease-out 2.2s infinite; }
.node-two::after { animation: authNodeWaveTwo 21s ease-out 6.5s infinite; }
.node-three::after { animation: authNodeWaveThree 19.5s ease-out 10.8s infinite; }
.node-four::after { animation: authNodeWaveFour 23s ease-out 14.5s infinite; }
@keyframes authQuoteCycle { 0% { opacity: 0; transform: translateY(5px); } 5%,27% { opacity: .82; transform: translateY(0); } 32%,100% { opacity: 0; transform: translateY(-4px); } }
@keyframes authNodeWaveOne { 0%,10%,100% { opacity: 0; transform: scale(.8); } 13% { opacity: .5; } 21% { opacity: 0; transform: scale(1.65); } 87% { opacity: 0; transform: scale(.8); } 90% { opacity: .4; } 98% { opacity: 0; transform: scale(1.55); } }
@keyframes authNodeWaveTwo { 0%,21%,100% { opacity: 0; transform: scale(.8); } 24% { opacity: .45; } 32% { opacity: 0; transform: scale(1.6); } 92% { opacity: 0; transform: scale(.8); } 95% { opacity: .38; } 100% { opacity: 0; transform: scale(1.5); } }
@keyframes authNodeWaveThree { 0%,33%,100% { opacity: 0; transform: scale(.8); } 36% { opacity: .48; } 44% { opacity: 0; transform: scale(1.62); } }
@keyframes authNodeWaveFour { 0%,14%,100% { opacity: 0; transform: scale(.8); } 17% { opacity: .42; } 25% { opacity: 0; transform: scale(1.58); } 71% { opacity: 0; transform: scale(.8); } 74% { opacity: .45; } 82% { opacity: 0; transform: scale(1.62); } }
@media (max-height: 760px) and (min-width: 768px) { .auth-system-quotes { margin-top: 1.5rem; } }
@media (max-width: 991.98px) { .auth-system-quotes { font-size: .8rem; } }
@media (prefers-reduced-motion: reduce) { .auth-quote-track span { animation: none; } .auth-quote-track span:first-child { opacity: .72; transform: none; } .auth-network-node::after { animation: none !important; opacity: 0; } }

/* Delayed TV-live logo sweep — PNG Frame Picture only (not legacy mark box). */
.auth-logo-mark { animation: none !important; }
.auth-logo-mark::after { animation: none !important; content: none !important; }
.auth-logo strong { animation: none; }
.auth-quote-track { overflow: hidden; }
.auth-quote-track span { --quote-chars: 58; width: 0; max-width: max-content; overflow: hidden; white-space: nowrap; border-right: 1px solid transparent; opacity: 0; transform: none; animation: authQuoteTyping 18s steps(var(--quote-chars), end) 2s infinite; }
.auth-quote-track span:nth-child(2) { --quote-chars: 61; animation-delay: 8s; }
.auth-quote-track span:nth-child(3) { --quote-chars: 57; animation-delay: 14s; }
@keyframes authQuoteTyping { 0% { width: 0; opacity: .8; border-right-color: rgba(125,211,252,.8); } 18% { width: calc(var(--quote-chars) * 1ch); opacity: .82; border-right-color: rgba(125,211,252,.8); } 22% { width: calc(var(--quote-chars) * 1ch); opacity: .82; border-right-color: transparent; } 29% { width: calc(var(--quote-chars) * 1ch); opacity: 0; border-right-color: transparent; } 30%,100% { width: 0; opacity: 0; } }
@media (max-width: 1199.98px) { .auth-quote-track span { font-size: .63rem; } }
@media (prefers-reduced-motion: reduce) {
    .auth-logo-mark, .auth-logo-mark::after, .auth-logo strong { animation: none !important; }
    .auth-logo-shine-beam, .auth-logo-sea, .auth-logo-tv-scan, .auth-logo-tv-bloom, .auth-logo-facet-glow, .auth-logo-text-transcript, .auth-logo-frame-light { animation: none !important; display: none !important; }
    .auth-quote-track span { width: auto; max-width: 100%; white-space: normal; border: 0; animation: none !important; }
    .auth-quote-track span:not(:first-child) { display: none; }
}

/* Dark mode contrast improvements for authentication page elements */
.auth-copyright { margin-top: 2rem; color: #687584; font-size: .72rem; text-align: center; }
html[data-bs-theme="dark"] .auth-copyright { color: #8f9ba6; }
html[data-bs-theme="dark"] .auth-security-label { color: #7dd3fc; }

/* Custom contrast overrides for Physical Inventory creation modals with primary gradient headers */
#newPiTypeModal .modal-header .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}
#newPiTypeModal .modal-header .text-primary {
    color: #ffffff !important;
}
#normalInvConfirmModal .modal-header .text-primary,
#normalInvConfirmModal .modal-header .bi-question-circle-fill {
    color: #ffffff !important;
}

/* Commodity dispensing + institute report lists: high-contrast active record in dark mode. */
html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected,
html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected:hover,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected:hover,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected:hover {
    color: #ffffff !important;
    background-color: #063f3b !important;
    outline: 2px solid #f4c95d !important;
    outline-offset: -2px !important;
    box-shadow: inset 5px 0 0 #5eead4 !important;
    transition: none !important;
}

html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table.table-striped > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table.table-striped > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected.inst-ss-status-out > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected.inst-ss-status-over > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected.inst-ss-status-near > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected.inst-ss-status-ok > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected.inst-ss-status-noamc > td,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table.table-striped > tbody > tr.cd-row-selected > td {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
    background-color: #063f3b !important;
    border-color: rgba(193, 255, 242, 0.2) !important;
    font-weight: 650 !important;
    letter-spacing: .012em;
    text-shadow: 0 1px 1px rgba(0,0,0,.28) !important;
    -webkit-font-smoothing: antialiased;
    transition: none !important;
}

html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected:hover > td {
    color: #ffffff !important;
    background-color: #063f3b !important;
}

html[data-bs-theme="dark"] body .app-content .commodity-dispensing-page .cd-list-table > tbody > tr.cd-row-selected > td:nth-child(2),
html[data-bs-theme="dark"] body .app-content .inst-ss-page .inst-ss-list-table > tbody > tr.cd-row-selected > td:nth-child(2),
html[data-bs-theme="dark"] body .app-content .inst-cs-page .inst-cs-list-table > tbody > tr.cd-row-selected > td:nth-child(2) {
    font-weight: 800 !important;
    color: #ffffff !important;
}

/* Prevent global striped-table pe-row-selected from painting yellow cells in dark mode. */
html[data-bs-theme="dark"] .table.table-striped > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] .table.table-hover > tbody > tr.cd-row-selected:hover > td,
html[data-bs-theme="dark"] .pe-list-table.table-striped > tbody > tr.pe-row-selected > td,
html[data-bs-theme="dark"] .pe-list-table tbody tr.pe-row-selected td {
    --bs-table-bg-type: transparent;
    --bs-table-accent-bg: transparent;
}

/* Commodity dispensing detail: match the stable list selection language. */
html[data-bs-theme="dark"] body .app-content #cd-detail-keyboard-root .cd-detail-items-table > tbody > tr.cd-row-selected,
html[data-bs-theme="dark"] body .app-content #cd-detail-keyboard-root .cd-detail-items-table > tbody > tr.cd-row-selected:hover {
    color: #ffffff !important;
    background-color: #063f3b !important;
    outline: 2px solid #f4c95d !important;
    outline-offset: -2px !important;
    box-shadow: inset 5px 0 0 #5eead4 !important;
    transition: none !important;
}

html[data-bs-theme="dark"] body .app-content #cd-detail-keyboard-root .cd-detail-items-table > tbody > tr.cd-row-selected > td,
html[data-bs-theme="dark"] body .app-content #cd-detail-keyboard-root .cd-detail-items-table > tbody > tr.cd-row-selected:hover > td {
    color: #ffffff !important;
    background-color: #063f3b !important;
    border-color: rgba(193,255,242,.2) !important;
    font-weight: 650 !important;
    text-shadow: 0 1px 1px rgba(0,0,0,.28) !important;
    transition: none !important;
}

/* Stable application workspace: prevent hover/press effects from shifting
   content beneath the pointer. Rich motion remains scoped to authentication. */
.app-main .app-content .card,
.app-main .app-content .card:hover,
.app-main .app-content .card:focus-within,
.app-main .app-content .pe-dashboard-card,
.app-main .app-content .pe-dashboard-card:hover,
.app-main .app-content .pe-legacy-stock-panel,
.app-main .app-content .pe-quick-operations {
    transform: none !important;
    transition-property: box-shadow, border-color, background-color !important;
}

.app-main .app-content .btn,
.app-main .app-content .btn:hover,
.app-main .app-content .btn:active:not(:disabled),
.app-main .app-content .btn-primary:hover,
.app-main .app-content .pe-home-action,
.app-main .app-content .pe-home-action:hover,
.app-main .app-content .pe-module-launcher > a,
.app-main .app-content .pe-module-launcher > a:hover {
    transform: none !important;
}

.app-main .app-content .btn {
    transition-property: color, background-color, border-color, box-shadow !important;
}

.app-header.navbar::after {
    display: none !important;
    animation: none !important;
}

.app-main .app-content .pe-shimmer-text,
.app-main .app-content .pe-dashboard-welcome h1 {
    animation: none !important;
    background-position: 0 0 !important;
}

/* Authentication pages must remain vertically scrollable on short windows.
   The shared AdminLTE body retains layout-fixed classes even under AuthLayout. */
html:has(.auth-layout),
body:has(.auth-layout) {
    height: auto !important;
    min-height: 100% !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
}

.auth-layout,
.auth-page {
    height: auto !important;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: visible !important;
}

.auth-form-panel {
    min-height: 100vh;
    min-height: 100dvh;
    overflow-x: hidden !important;
    overflow-y: auto !important;


/* Labo-Admin login adaptations */
html, body.auth-layout {
  margin: 0;
  min-height: 100%;
  background: #fff;
}
body.auth-layout {
  min-height: 100vh;
  min-height: 100dvh;
}
.d-none { display: none !important; }
.auth-logo-shine {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.auth-logo-img {
  width: min(100%, 15.5rem);
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 0.4rem 1.1rem rgba(0, 0, 0, 0.22));
}
.auth-logo-img-mobile {
  width: min(100%, 12.5rem);
}
.auth-layout, .auth-page, .auth-page input, .auth-page button {
  font-family: "Open Sans", "Siemreap", "Segoe UI", system-ui, sans-serif !important;
}
.auth-page h1, .auth-page h2 {
  font-family: "Open Sans", "Siemreap", "Segoe UI", sans-serif !important;
}

html[data-bs-theme="dark"] .auth-session-alert {
  color: #bae6fd;
  background: rgba(8, 47, 73, 0.72);
  border-color: #164e63;
}
