/* login-v2.html only: the two-doors styles. Everything else
   on the page comes from the shared login.css. Colours follow
   the login theme tokens, with dark variants mirroring
   login.css's own dark palette. The QR panel stays white in
   both themes - a code needs full contrast to scan. */

.login-v2 .door-title {
    text-align: center;
    font-size: 17px;
    font-weight: 600;
    margin: 2px 0 12px;
}

/* The branded code panel (Realm's mock-up, 30 Nov 2026):
   the SocioEngage ring around the code - red arcs and dots
   on the left and top, blue on the right and bottom, in the
   logo's own colours - and the logo mark over the centre of
   the code. The code is generated at error-correction level
   H, which tolerates the centre being covered. The panel is
   decorative around a live code: the code itself, its
   rotation and the tap behaviour are unchanged. */
.login-v2 .door-qr {
    position: relative;
    width: 254px;
    height: 254px;
    margin: 0 auto;
    background: #ffffff;
    border: none;
    border-radius: 20px;
    display: grid;
    place-items: center;
}

.login-v2 .qr-ring {
    grid-area: 1 / 1;
    z-index: 1;
    width: 222px;
    height: 222px;
    pointer-events: none;
    /* The four dots sit on the ring at the cardinal points
       and reach just past the viewBox edge; let them paint
       complete instead of being clipped flat by the svg
       viewport (Realm, 30 Nov 2026: the red side looked cut
       off). The ring geometry itself is unchanged - moving
       it in toward the code breaks scanning. The panel is
       10px wider than the ring's own box, so the whole
       circle, dots included, sits inside the border with
       about 2px to spare (Realm, 30 Nov 2026). */
    overflow: visible;
}

.login-v2 .qr-code {
    grid-area: 1 / 1;
    display: grid;
    place-items: center;
}

.login-v2 .qr-code svg {
    max-width: 152px;
    max-height: 152px;
}

.login-v2 .qr-mark {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: #ffffff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.login-v2 .qr-mark img {
    width: 34px;
    height: 34px;
    display: block;
}

.login-v2 .door-line {
    text-align: center;
    font-size: 14.5px;
    line-height: 1.5;
    color: #475569;
    margin: 14px 0 0;
}

.login-v2 .door-remember {
    justify-content: center;
    margin: 14px 0 0;
}

.login-v2 .door-or {
    display: flex;
    align-items: center;
    gap: 14px;
    color: #94a3b8;
    font-size: 13px;
    margin: 20px 0 14px;
}

.login-v2 .door-or::before,
.login-v2 .door-or::after {
    content: "";
    height: 1px;
    flex: 1;
    background: #dbe3ef;
}

/* A plain text button: login.css gives every button a fixed
   height and full width, so pin everything this one needs. */
.login-v2 .door-back {
    height: auto;
    min-height: 0;
    width: auto;
    background: none;
    border: none;
    padding: 0;
    margin: 0 0 10px;
    color: var(--pap-blue);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

/* The tap line and the tap cursor exist only where tapping
   is the flow: a touch device signing in on itself (Realm,
   30 Nov 2026 - on desktop the code is scanned, never
   clicked). Same coarse-pointer gate as the install rule. */
.login-v2 .qr-tap-line {
    display: none;
}

@media (pointer: coarse) {
    .login-v2 .qr-tap-line {
        display: inline;
    }

    .login-v2 .door-qr {
        cursor: pointer;
    }
}

/* "SocioSecure not detected" toast: a plain dark pill at
   the bottom of the screen, in the install toast's shape
   and motion (its keyframes live in login.css). */
.app-toast {
    position: fixed;
    left: 16px;
    right: 16px;
    bottom: 16px;
    z-index: 60;
    max-width: 430px;
    margin: 0 auto;
    padding: 14px 16px;
    background: #0f172a;
    color: #ffffff;
    text-align: center;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: 12px;
    box-shadow: 0 18px 44px rgba(15, 23, 42, 0.25);
    animation: install-toast-in 0.25s ease-out;
}

html[data-theme="dark"] .login-v2 .door-line {
    color: #cbd5e1;
}

html[data-theme="dark"] .login-v2 .door-or::before,
html[data-theme="dark"] .login-v2 .door-or::after {
    background: #334155;
}

/* One-screen fit (Realm, 30 Nov 2026): the doors card is
   taller than the phone-number card it replaces, and on a
   laptop window it pushed the help line and the footer
   below the fold. Same design, tighter vertical rhythm:
   desktop trims its padding and gaps, shorter windows trim
   further and step the panel and the divider disc down
   (the disc step is the platform's existing short-screen
   precedent). Portrait phones are already compacted by
   login.css's one-screen block; the door rhythm and panel
   trim to match it there. The branded panel is bigger than
   the plain code box it replaced, so the tiers below carry
   matching extra trims to hold the fit. Fit verified by
   measurement at 1440x900, 1280x800, 1280x740, 1100x700,
   390x844 and 390x740. */
@media (min-width: 901px) {
    .login-page.login-v2 {
        padding: 24px 56px;
    }

    .login-v2 .login-card {
        padding: 36px 48px;
    }

    .login-v2 .subtitle {
        margin-bottom: 20px;
    }

    .login-v2 .divider {
        margin-bottom: 20px;
    }

    .login-v2 .help {
        margin-top: 20px;
    }
}

@media (min-width: 901px) and (max-height: 940px) {
    .login-page.login-v2 {
        padding: 16px 56px;
    }

    .login-v2 .login-card {
        padding: 22px 48px;
    }

    .login-v2 .login-card h1 {
        font-size: 28px;
        margin-bottom: 8px;
    }

    .login-v2 .subtitle {
        margin-bottom: 12px;
    }

    .login-v2 .divider {
        margin-bottom: 10px;
    }

    .login-v2 .door-title {
        margin-bottom: 6px;
    }

    .login-v2 .door-qr {
        width: 222px;
        height: 222px;
    }

    .login-v2 .qr-ring {
        width: 190px;
        height: 190px;
    }

    .login-v2 .qr-code svg {
        max-width: 132px;
        max-height: 132px;
    }

    .login-v2 .qr-mark {
        width: 36px;
        height: 36px;
    }

    .login-v2 .qr-mark img {
        width: 30px;
        height: 30px;
    }

    .login-v2 .door-line {
        margin-top: 8px;
    }

        .login-v2 .door-remember {
        margin-top: 10px;
    }

    .login-v2 .door-or {
        margin: 10px 0 8px;
    }

    .login-v2 .help {
        margin-top: 14px;
    }

    .login-v2 .message {
        min-height: 0;
        margin-top: 10px;
    }

    .login-v2 .message:empty {
        margin-top: 0;
    }
}

@media (min-width: 901px) and (max-height: 780px) {
    .login-page.login-v2 {
        padding: 12px 56px;
    }

    .login-v2 .login-card {
        padding: 4px 48px;
    }

    .login-v2 .login-card h1 {
        font-size: 26px;
    }

    .login-v2 .subtitle {
        margin-bottom: 5px;
    }

    .login-v2 .divider {
        margin-bottom: 5px;
    }

    .login-v2 .divider span {
        width: 30px;
        height: 30px;
    }

    .login-v2 .door-title {
        margin-bottom: 2px;
    }

    .login-v2 .door-qr {
        width: 186px;
        height: 186px;
    }

    .login-v2 .qr-ring {
        width: 154px;
        height: 154px;
    }

    .login-v2 .qr-code svg {
        max-width: 108px;
        max-height: 108px;
    }

    .login-v2 .qr-mark {
        width: 30px;
        height: 30px;
    }

    .login-v2 .qr-mark img {
        width: 26px;
        height: 26px;
    }

    .login-v2 .door-line {
        margin-top: 4px;
    }

        .login-v2 .door-remember {
        margin-top: 3px;
    }

    .login-v2 .door-or {
        margin: 3px 0 2px;
    }

    .login-v2 .help {
        margin-top: 5px;
    }
}

@media (max-width: 900px) and (orientation: portrait) {
    .login-v2 .login-card {
        padding: 12px 22px 10px;
    }

    .login-v2 .login-card h1 {
        font-size: 24px;
    }

    .login-v2 .subtitle {
        margin-bottom: 6px;
    }

    .login-v2 .divider {
        margin-bottom: 6px;
    }

    .login-v2 .door-title {
        margin-bottom: 4px;
    }

    .login-v2 .door-qr {
        width: 214px;
        height: 214px;
    }

    .login-v2 .qr-ring {
        width: 182px;
        height: 182px;
    }

    .login-v2 .qr-code svg {
        max-width: 124px;
        max-height: 124px;
    }

    .login-v2 .qr-mark {
        width: 34px;
        height: 34px;
    }

    .login-v2 .qr-mark img {
        width: 28px;
        height: 28px;
    }

    .login-v2 .door-line {
        margin-top: 6px;
    }

        .login-v2 .door-remember {
        margin-top: 6px;
    }

    .login-v2 .door-or {
        margin: 8px 0 6px;
    }

    .login-v2 .help {
        margin-top: 10px;
    }
}
