/* ==========================================================================
   Login screen — staff (School), Student and Parent share it
   (views/auth/_login-screen.php). Built to the approved mockup: a glass slab
   standing on the podium of the background photo, a tilted EduSuite panel on
   the left and tilted glass module tiles arcing around the card.

   Every size in the scene is in em, and the scene's font-size follows the
   viewport height — so the card, tiles and panel keep the mockup's
   proportions to the podium on any monitor.
   ========================================================================== */
:root {
    --ls-violet: #6d28d9;
    --ls-violet-2: #7c3aed;
    --ls-violet-3: #8b5cf6;
    --ls-lilac: #c4b5fd;
    --ls-ink: #1c1838;
    --ls-muted: #57536f;
    --ls-ring: rgba(124, 58, 237, .2);
}

/* Reset the shared auth layout (centered 450px column, gradient body) */
body { display: block !important; padding: 0 !important; background: #ebe6fb !important; }
.auth-container { max-width: none !important; width: 100% !important; }

.ls-screen {
    position: relative;
    min-height: 100vh;
    font-family: 'Poppins', 'Inter', system-ui, sans-serif;
    font-size: 15px;
    color: var(--ls-ink);
    background: #ebe6fb url('../images/login-bg.jpg') center bottom / cover no-repeat;
    overflow: hidden;
}
.ls-ico { width: 1em; height: 1em; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Product mark (purple hexagon + cap) ---------------------------------- */
.ls-brand { display: flex; align-items: center; gap: .8em; }
.ls-hex { position: relative; width: 3.4em; height: 3.4em; flex-shrink: 0; }
.ls-hex > svg { width: 100%; height: 100%; display: block; filter: drop-shadow(0 .45em .7em rgba(109, 40, 217, .35)); }
.ls-hex .ls-ico { position: absolute; left: 50%; top: 50%; width: 1.55em; height: 1.55em; transform: translate(-50%, -50%); color: #fff; stroke-width: 2; }
.ls-brand-name { font-size: 1.6em; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; color: var(--ls-ink); white-space: nowrap; }
.ls-brand-name sup { font-size: .38em; font-weight: 600; top: -1.4em; margin-left: .1em; }
.ls-brand-sub { font-size: 1.05em; font-weight: 500; color: var(--ls-ink); opacity: .85; margin-top: .1em; white-space: nowrap; }

/* ---- Shared glass surface -------------------------------------------------- */
.ls-glass {
    background: linear-gradient(160deg, rgba(255, 255, 255, .72) 0%, rgba(255, 255, 255, .46) 100%);
    border: 2px solid rgba(255, 255, 255, .92);
    -webkit-backdrop-filter: blur(16px) saturate(150%);
    backdrop-filter: blur(16px) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ls-glass { background: rgba(255, 255, 255, .9); }
}

/* ---- Left intro panel (tilted, right edge receding) ------------------------ */
.ls-intro {
    width: 26em; padding: 3em 3em 3.2em; border-radius: 2em;
    box-shadow: -.55em .6em 0 -.1em rgba(255, 255, 255, .45), 0 2.4em 4.5em rgba(70, 40, 160, .2), inset 0 0 1.6em rgba(255, 255, 255, .45);
}
.ls-dash { width: 2.9em; height: .32em; border-radius: 1em; background: var(--ls-violet-2); margin: 1.7em 0 1.5em; }
.ls-headline { font-size: 2.6em; font-weight: 700; line-height: 1.12; letter-spacing: -.03em; color: var(--ls-ink); margin: 0 0 .5em; }
.ls-headline span { display: block; color: var(--ls-violet-2); }
.ls-intro p { font-size: 1.2em; line-height: 1.5; color: var(--ls-ink); opacity: .82; margin: 0; }

/* ---- Floating module tiles (tilted glass blocks with a visible edge) ------- */
.ls-tile {
    width: 9.6em; height: 8.6em; border-radius: 1.6em;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .55em;
    text-align: center; padding: .4em .3em;
    animation: ls-float 7s ease-in-out infinite;
}
.ls-tile .ls-ico { width: 2.6em; height: 2.6em; color: var(--ls-violet-2); stroke-width: 1.7; }
.ls-tile span { font-size: 1.04em; font-weight: 600; color: var(--ls-ink); line-height: 1.2; white-space: nowrap; letter-spacing: -.01em; }
.ls-tiles-left .ls-tile {
    transform: perspective(56em) rotateY(-24deg) rotateZ(-3deg);
    box-shadow: -.45em .5em 0 -.05em rgba(255, 255, 255, .55), 0 1.6em 3em rgba(70, 40, 160, .22), inset 0 0 1.2em rgba(255, 255, 255, .5);
}
.ls-tiles-right .ls-tile {
    transform: perspective(56em) rotateY(24deg) rotateZ(3deg);
    box-shadow: .45em .5em 0 -.05em rgba(255, 255, 255, .55), 0 1.6em 3em rgba(70, 40, 160, .22), inset 0 0 1.2em rgba(255, 255, 255, .5);
}
.ls-tile:nth-child(2) { animation-delay: -2.3s; }
.ls-tile:nth-child(3) { animation-delay: -4.6s; }
.ls-tiles-left .ls-tile:nth-child(2) { margin-right: 2em; }      /* the arc: middle tiles sit further out */
.ls-tiles-right .ls-tile:nth-child(2) { margin-left: 2.4em; }
@keyframes ls-float { 0%, 100% { translate: 0 0; } 50% { translate: 0 -.45em; } }

/* ---- The card: a glass slab with a bright rim ------------------------------ */
.ls-card {
    position: relative;
    padding: 2.6em 3.6em 2.6em;
    border-radius: 2.6em;
    background: linear-gradient(180deg, rgba(255, 255, 255, .62) 0%, rgba(255, 255, 255, .48) 100%);
    border: 2.5px solid rgba(255, 255, 255, .95);
    box-shadow:
        inset 0 0 0 .45em rgba(255, 255, 255, .2),
        inset 0 1px 0 .5em rgba(255, 255, 255, .12),
        inset 0 0 2.2em rgba(255, 255, 255, .5),
        0 0 2.6em rgba(255, 255, 255, .5),
        0 2.6em 5em rgba(70, 40, 160, .22);
    -webkit-backdrop-filter: blur(14px) saturate(150%);
    backdrop-filter: blur(14px) saturate(150%);
}
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .ls-card { background: rgba(255, 255, 255, .92); }
}

.ls-school { display: flex; align-items: center; justify-content: center; gap: 1.5em; margin-bottom: 1.7em; }
.ls-school-logo { width: 6.2em; height: 6.2em; flex-shrink: 0; display: flex; align-items: center; justify-content: center; }
.ls-school-logo img { max-width: 100%; max-height: 100%; object-fit: contain; filter: drop-shadow(0 .3em .5em rgba(30, 20, 70, .12)); }
.ls-school-rule { width: 2px; align-self: stretch; margin: .9em 0; border-radius: 2px; background: rgba(28, 24, 56, .22); }
.ls-school-name { font-size: 2.3em; font-weight: 700; line-height: 1.08; letter-spacing: -.02em; color: var(--ls-school, var(--ls-ink)); max-width: 11em; }
.ls-school-city { font-size: 1.05em; font-weight: 500; letter-spacing: .38em; text-transform: uppercase; color: var(--ls-ink); margin-top: .55em; }

.ls-title { text-align: center; font-size: 1.62em; font-weight: 600; letter-spacing: -.01em; margin: 0 0 1.15em; color: var(--ls-ink); }

/* Tabs: glowing gradient pill for the active one, a divider between the others */
.ls-tabs {
    display: grid; grid-template-columns: repeat(3, 1fr);
    padding: .3em; border-radius: 1.25em; margin-bottom: 1.7em;
    background: rgba(255, 255, 255, .78); border: 1px solid rgba(255, 255, 255, .95);
    box-shadow: 0 .5em 1.4em rgba(76, 52, 160, .1);
}
.ls-tab {
    position: relative;
    display: flex; align-items: center; justify-content: center; gap: .6em;
    height: 3.4em; border-radius: 1em;
    font-size: 1.12em; font-weight: 500; color: var(--ls-ink); text-decoration: none;
    transition: color .15s, background-color .15s;
}
.ls-tab .ls-ico { width: 1.45em; height: 1.45em; }
.ls-tab:hover { color: var(--ls-violet); }
.ls-tab:not(.is-active) + .ls-tab:not(.is-active)::before {
    content: ''; position: absolute; left: 0; top: 28%; bottom: 28%; width: 1px; background: rgba(28, 24, 56, .16);
}
.ls-tab.is-active {
    color: #fff;
    background: linear-gradient(90deg, #6d28d9 0%, #8b5cf6 100%);
    box-shadow: 0 .5em 1.2em rgba(109, 40, 217, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.ls-tab:focus-visible { outline: 3px solid var(--ls-ring); outline-offset: 2px; }

.ls-alert { display: flex; gap: .7em; align-items: flex-start; padding: .8em 1em; border-radius: 1em; font-size: .95em; margin: -.8em 0 1.2em; }
.ls-alert.is-error { background: rgba(220, 38, 38, .1); color: #b91c1c; }
.ls-alert.is-ok { background: rgba(22, 163, 74, .12); color: #15803d; }
.ls-alert .ls-ico { margin-top: .2em; }

/* Inputs: near-white, soft border, outline icon */
.ls-field { margin-bottom: 1.25em; }
.ls-field label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.ls-input {
    display: flex; align-items: center;
    height: 3.6em; border-radius: .95em;
    background: rgba(255, 255, 255, .86); border: 1px solid rgba(124, 58, 237, .22);
    box-shadow: 0 .25em .8em rgba(76, 52, 160, .08);
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.ls-input:focus-within { background: #fff; border-color: var(--ls-violet-3); box-shadow: 0 0 0 .25em var(--ls-ring); }
.ls-input.has-error { border-color: #dc2626; }
.ls-input > .ls-ico { width: 1.45em; height: 1.45em; margin: 0 .95em 0 1.25em; color: var(--ls-ink); }
.ls-input input {
    flex: 1; min-width: 0; height: 100%; border: 0; background: transparent; outline: none;
    font: inherit; font-size: max(14px, 1.05em); color: var(--ls-ink); padding: 0 .8em 0 0;
}
.ls-input input::placeholder { color: var(--ls-muted); opacity: .9; }
/* Chrome's saved-password fill would paint the field blue: keep it white */
.ls-input:has(input:-webkit-autofill) { background: #fff; }
.ls-input input:-webkit-autofill,
.ls-input input:-webkit-autofill:hover,
.ls-input input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 40em #fff inset;
    -webkit-text-fill-color: var(--ls-ink);
    caret-color: var(--ls-ink);
    transition: background-color 9999s;
}
.ls-eye { background: none; border: 0; padding: 0 1.15em; height: 100%; color: var(--ls-ink); cursor: pointer; display: flex; align-items: center; }
.ls-eye .ls-ico { width: 1.45em; height: 1.45em; }
.ls-eye:focus-visible { outline: 3px solid var(--ls-ring); border-radius: .6em; }
.ls-err { color: #dc2626; font-size: .9em; margin: .4em .3em 0; }

.ls-row { display: flex; align-items: center; justify-content: space-between; gap: 1em; margin: .3em .1em 1.5em; font-size: 1.05em; }
.ls-check { display: flex; align-items: center; gap: .65em; cursor: pointer; font-weight: 500; color: var(--ls-ink); user-select: none; margin: 0; }
.ls-check input {
    appearance: none; -webkit-appearance: none; margin: 0;
    width: 1.3em; height: 1.3em; border-radius: .35em; flex-shrink: 0; cursor: pointer;
    border: 1.5px solid rgba(124, 58, 237, .45); background: rgba(255, 255, 255, .9);
    display: grid; place-content: center;
}
.ls-check input::after { content: ''; width: .62em; height: .36em; border: 2.5px solid #fff; border-top: 0; border-right: 0; transform: translateY(-.08em) rotate(-45deg); opacity: 0; }
.ls-check input:checked { background: var(--ls-violet-2); border-color: var(--ls-violet-2); }
.ls-check input:checked::after { opacity: 1; }
.ls-check input:focus-visible { outline: 3px solid var(--ls-ring); outline-offset: 2px; }
.ls-link { color: var(--ls-violet-2); font-weight: 500; text-decoration: none; }
.ls-link:hover { text-decoration: underline; }
.ls-hint { font-size: .95em; color: var(--ls-muted); margin: .2em .2em 1.5em; text-align: center; }

.ls-submit {
    width: 100%; height: 3.75em; border: 0; border-radius: 1.25em; cursor: pointer;
    background: linear-gradient(90deg, #6d28d9 0%, #7c3aed 50%, #9061f9 100%);
    color: #fff; font: inherit; font-size: 1.55em; font-weight: 600;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 .5em 1.3em rgba(109, 40, 217, .4), 0 0 1.4em rgba(167, 139, 250, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
    transition: transform .15s, box-shadow .2s;
}
.ls-submit .btn-text { display: inline-flex; align-items: center; gap: .45em; }
.ls-submit .ls-ico { width: 1em; height: 1em; stroke-width: 2.2; }
.ls-submit:hover { transform: translateY(-1px); box-shadow: 0 .6em 1.6em rgba(109, 40, 217, .48), 0 0 1.8em rgba(167, 139, 250, .55); }
.ls-submit:focus-visible { outline: 3px solid var(--ls-ring); outline-offset: 3px; }
.ls-submit:disabled { opacity: .85; cursor: default; transform: none; }

/* "Powered by Priodemy" pill with a glowing gradient border, rules either side */
.ls-powered { display: flex; align-items: center; gap: 1.2em; margin-top: 2em; }
.ls-powered::before, .ls-powered::after { content: ''; flex: 1; height: 2px; border-radius: 2px; background: rgba(124, 58, 237, .28); }
.ls-powered a {
    display: inline-flex; align-items: center; gap: .5em; white-space: nowrap;
    padding: .6em 1.4em; border-radius: 99em; font-size: 1.3em; font-weight: 500; color: var(--ls-ink); text-decoration: none;
    border: 2px solid transparent;
    background: linear-gradient(#fbfaff, #fbfaff) padding-box, linear-gradient(90deg, #a78bfa, #7c3aed, #c4b5fd) border-box;
    box-shadow: 0 0 1.1em rgba(167, 139, 250, .5);
}
.ls-powered a .ls-ico { width: 1.05em; height: 1.05em; fill: var(--ls-violet-2); stroke: none; }
.ls-powered a b { color: var(--ls-violet-2); font-weight: 700; }
.ls-alt { text-align: center; font-size: .9em; color: var(--ls-muted); margin: 1em 0 -1em; }
.ls-alt button { background: none; border: 0; padding: 0; color: var(--ls-violet-2); font-weight: 600; cursor: pointer; font: inherit; }
.ls-alt button:hover { text-decoration: underline; }

/* ==========================================================================
   Layouts
   ========================================================================== */
.ls-intro-wrap, .ls-tiles-left, .ls-tiles-right { display: none; }

/* Wide screens: the staged scene. 1em = 1.7vh (16px at the mockup's 941px),
   so the card is ~80% of the screen height and stands on the podium. */
@media (min-width: 1200px) and (min-height: 600px) {
    .ls-screen { height: 100vh; font-size: clamp(12px, 1.7vh, 18.5px); }
    .ls-mobile-brand { display: none; }

    .ls-card-wrap {
        position: absolute; left: 63.5vw; bottom: clamp(1.5vh, calc(97vh - 49em), 14.5vh);
        transform: translateX(-50%);
        width: min(39.5em, 40vw);
    }
    .ls-intro-wrap {
        display: block; position: absolute; left: 7vw; top: 47%;
        transform: translateY(-50%) perspective(70em) rotateY(14deg);
        transform-origin: left center;
    }
    .ls-intro { width: min(26em, 24vw); }
    .ls-tiles-left, .ls-tiles-right {
        display: flex; flex-direction: column; justify-content: center; gap: 2.6em;
        position: absolute; bottom: clamp(1.5vh, calc(97vh - 49em), 14.5vh); height: 49em;
    }
    /* Tiles hug the card: card centre 63.5vw, half-width min(19.75em, 20vw) */
    .ls-tiles-left { right: calc(36.5vw + min(19.75em, 20vw) + 1.6em); align-items: flex-end; }
    .ls-tiles-right { left: calc(63.5vw + min(19.75em, 20vw) + 1.6em); align-items: flex-start; }
}
/* Narrow wide-screens: the panel's text shrinks to stay clear of the tiles */
@media (min-width: 1200px) and (max-width: 1439.98px) and (min-height: 600px) {
    .ls-intro { padding: 2.4em 2.2em 2.6em; }
    .ls-headline { font-size: 2.4em; }
    .ls-intro p { font-size: 1.1em; }
    .ls-brand-name { font-size: 1.35em; }
    .ls-brand-sub { font-size: .9em; }
    .ls-hex { width: 2.9em; height: 2.9em; }
}

/* Everything else: the card alone, centred, same look */
@media (max-width: 1199.98px), (max-height: 599.98px) {
    .ls-screen { display: flex; flex-direction: column; align-items: center; padding: 28px 16px 40px; background-position: 62% bottom; overflow: visible; }
    .ls-mobile-brand { margin-bottom: 22px; }
    .ls-card-wrap { width: 100%; max-width: 560px; }
}
@media (max-width: 767.98px) {
    .ls-screen { background-image: url('../images/login-bg-sm.jpg'); font-size: 14px; }
}
@media (max-width: 480px) {
    .ls-screen { font-size: 13px; padding: 22px 12px 32px; }
    .ls-card { padding: 2.2em 1.5em 2em; border-radius: 2em; }
    .ls-school { gap: 1em; margin-bottom: 1.6em; }
    .ls-school-logo { width: 5em; height: 5em; }
    .ls-school-name { font-size: 1.9em; }
    .ls-school-city { letter-spacing: .26em; }
    .ls-tab { gap: .4em; font-size: 1.05em; }
    .ls-tab .ls-ico { width: 1.25em; height: 1.25em; }
    .ls-powered a { padding: .55em 1.1em; font-size: 1.15em; }
}

@media (prefers-reduced-motion: reduce) {
    .ls-tile { animation: none; }
    .ls-submit, .ls-tab, .ls-input { transition: none; }
}
