/* Login: one centred card; the page colours follow the chosen role. Phones get the compact version. */
.page-auth .topbar { display: none; }
.lgx { --a: #0f8a7a; --a2: #0a5f55; --soft: #e3f6f3; position: relative; isolation: isolate; display: grid; justify-items: center; align-content: center; gap: 22px; min-height: 100dvh; padding: 72px 16px 56px; background: var(--soft); transition: background .5s; overflow: clip; }
.lgx[data-role="doctor"] { --a: #1e6fd6; --a2: #0e3f86; --soft: #e6effc; }
.lgx[data-role="admin"] { --a: #c9822a; --a2: #6b3f0a; --soft: #fbf0e0; }
.lgx__bg { position: absolute; inset: 0; z-index: -1; background:
    none; transition: background .5s; }
.lgx__bg::after { content: ""; position: absolute; inset: 0; opacity: .5; background-image: none; background-size: 24px 24px; }
.lgx__orb { position: absolute; border-radius: 50%; background: color-mix(in srgb, var(--a) 20%, transparent); filter: blur(6px); }
.lgx__orb--1 { width: 320px; height: 320px; inset-block-start: 8%; inset-inline-start: 6%; }
.lgx__orb--2 { width: 220px; height: 220px; inset-block-end: 10%; inset-inline-end: 8%; background: color-mix(in srgb, var(--a2) 18%, transparent); }
.lgx__orb--3 { width: 120px; height: 120px; inset-block-start: 20%; inset-inline-end: 22%; }
.lgx__brand { position: absolute; inset-block-start: 22px; inset-inline-start: 28px; display: inline-flex; align-items: center; gap: 10px; color: var(--a2); text-decoration: none; font-weight: 800; font-size: 1.15rem; }
.lgx__card { width: min(100%, 440px); display: grid; gap: 16px; padding: 26px; border-radius: 12px; background: rgba(255, 255, 255, .94); box-shadow: 0 40px 70px -40px color-mix(in srgb, var(--a2) 70%, transparent), 0 0 0 1px rgba(255, 255, 255, .7); backdrop-filter: blur(10px); }
.lgx__head { display: grid; }
.lgx__pane { grid-area: 1 / 1; display: flex; align-items: center; gap: 14px; opacity: 0; transform: translateY(6px); pointer-events: none; transition: opacity .35s, transform .35s; }
.lgx__pane.is-on { opacity: 1; transform: none; pointer-events: auto; }
.lgx__photo { flex: none; width: 64px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--soft); box-shadow: 0 10px 20px -10px var(--a2), 0 0 0 3px #fff; }
.lgx__photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lgx__pane h1 { margin: 0 0 2px; font-size: 1.4rem; letter-spacing: -.01em; color: #0c2f3a; }
.lgx__pane p { margin: 0; font-size: .88rem; color: #5b7077; line-height: 1.7; }
.lgx__tabs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; padding: 5px; background: #eaeff1; border-radius: 12px; }
.lgx__tabs button { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 10px 6px; border: 0; border-radius: 12px; background: transparent; font: inherit; font-size: .86rem; font-weight: 700; color: #51606b; cursor: pointer; transition: background .2s, color .2s, transform .15s; }
.lgx__tabs button .ico { width: 18px; height: 18px; flex: none; }
.lgx__tabs button:hover { color: var(--a2); } .lgx__tabs button:active { transform: scale(.97); }
.lgx__tabs button.is-on { background: #fff; color: var(--a); box-shadow: 0 2px 8px -2px rgba(15, 23, 42, .22); }
.lgx .form { display: grid; gap: 14px; }
.lgx__sub { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lgx__sub[hidden] { display: none; }
.lgx__sub label { cursor: pointer; } .lgx__sub input { position: absolute; opacity: 0; }
.lgx__sub span { display: flex; align-items: center; justify-content: center; gap: 6px; padding: 9px; border-radius: 12px; background: #f1f4f6; color: #51606b; font-weight: 600; font-size: .88rem; box-shadow: inset 0 0 0 1px #e1e7ea; transition: background .2s, color .2s, box-shadow .2s; }
.lgx__sub span .ico { width: 17px; height: 17px; }
.lgx__sub input:checked + span { background: var(--soft); color: var(--a2); box-shadow: inset 0 0 0 1.5px var(--a); }
.lgx__sub input:focus-visible + span { outline: 2px solid var(--a); outline-offset: 2px; }
.lgx .input:focus { outline: 2px solid var(--a); outline-offset: 1px; border-color: var(--a); }
.lgx__go.btn--solid { background: var(--a); border-color: var(--a); width: 100%; justify-content: center; padding-block: 13px; transition: background .3s, transform .15s; box-shadow: 0 12px 22px -12px var(--a); }
.lgx__go.btn--solid:hover { background: var(--a2); } .lgx__go.btn--solid:active { transform: scale(.985); }
.lgx .auth__alt { margin: 0; text-align: center; } .lgx .auth__alt[hidden] { display: none; } .lgx .auth__alt a { color: var(--a); font-weight: 700; }
.lgx__demo { justify-self: center; border: 0; border-radius: 12px; padding: 5px 14px; background: var(--soft); color: var(--a2); font: inherit; font-size: .8rem; cursor: pointer; }
.page-auth .foot { position: fixed; inset-inline: 0; bottom: 0; z-index: 5; border: 0; padding: 8px 0; background: transparent; pointer-events: none; }
.page-auth .foot a { pointer-events: auto; }
.page-auth .foot__in { justify-content: center; }
.page-auth .foot__credit { padding: 3px 12px; border-radius: 12px; background: rgba(255, 255, 255, .85); }
@media (max-width: 700px) {
    /* phones: just the card, no decoration */
    .lgx { padding: 64px 14px 56px; align-content: start; background: #f5f8f9; }
    .lgx__bg { background: color-mix(in srgb, var(--a) 22%, transparent); } .lgx__bg::after, .lgx__orb { display: none; }
    .lgx__brand { inset-inline-start: 16px; inset-block-start: 18px; }
    .lgx__card { padding: 18px; box-shadow: 0 20px 40px -30px rgba(15, 23, 42, .4); }
    .lgx__photo { width: 52px; height: 52px; } .lgx__pane p { display: none; } .lgx__pane h1 { font-size: 1.2rem; }
    .lgx__tabs button { font-size: .8rem; } .lgx__tabs button .ico { display: none; }
}
@media (prefers-reduced-motion: reduce) { .lgx__pane, .lgx, .lgx__bg { transition: none; } }
.page-home .topbar { display: none; }
.lgx--embed { min-height: 0; padding: 0; background: transparent; overflow: visible; }
.hm2__card:has(.lgx--embed) { padding: 0; background: transparent; box-shadow: none; }
.lgx--embed .lgx__card { width: 100%; }
.page-home .hm2 { min-height: 100dvh; }

.otp__row { display: flex; gap: 8px; align-items: stretch; } .otp__row .input { flex: 1; min-width: 0; } .otp__row .btn { flex: none; white-space: nowrap; } .otp small { display: block; margin-top: 4px; min-height: 1.2em; }
.lgx__links { display: flex; justify-content: space-between; gap: 10px; margin: 0; font-size: .82rem; }
.lgx__link { border: 0; background: none; padding: 0; font: inherit; color: var(--a, #2563eb); cursor: pointer; text-decoration: none; font-weight: 600; } .lgx__link:hover { text-decoration: underline; }
