:root {
    --login-text: #203044;
    --login-muted: #718096;
    --login-line: #DFE7F1;
}

.login-v2,
.login-v2 * {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body.login-v2 {
    min-width: 320px;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
    color: var(--login-text);
    background: var(--login-page-bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
}

body.login-v2[dir="rtl"] {
    font-family: Tahoma, Arial, "Segoe UI", sans-serif;
}

.login-v2 button,
.login-v2 input {
    font: inherit;
}

.login-v2 button {
    cursor: pointer;
}

.login-app {
    width: 100%;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    background:
        radial-gradient(circle at 12% 10%, rgba(var(--login-primary-rgb), .10), transparent 22%),
        radial-gradient(circle at 90% 88%, rgba(var(--login-accent-rgb), .10), transparent 26%),
        linear-gradient(135deg, rgba(248, 251, 255, .94), rgba(237, 244, 251, .94) 58%, rgba(247, 251, 248, .94));
}

.login-shell {
    width: 100%;
    height: 100%;
    min-height: 0;
    padding: 12px clamp(14px, 1.7vw, 26px);
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 8px;
}

.login-topbar {
    min-height: 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding-inline: 4px;
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.login-brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(145deg, var(--login-primary), var(--login-primary-dark));
    box-shadow: 0 12px 25px rgba(var(--login-primary-rgb), .22);
    overflow: hidden;
    flex: 0 0 auto;
}

.login-brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background: #fff;
}

.login-brand-mark svg {
    width: 28px;
    height: 28px;
}

.login-brand-name {
    color: var(--login-secondary);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -.025em;
    line-height: 1.05;
}

.login-brand-sub {
    margin-top: 4px;
    color: var(--login-muted);
    font-size: 10.5px;
    font-weight: 650;
}

.login-top-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-school-identity {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.login-school-logo {
    width: 38px;
    height: 38px;
    border: 1px solid var(--login-line);
    border-radius: 12px;
    background: #fff;
    display: grid;
    place-items: center;
    color: var(--login-primary);
    overflow: hidden;
    flex: 0 0 auto;
}

.login-school-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.login-school-logo svg {
    width: 22px;
    height: 22px;
}

.login-school-name {
    max-width: 260px;
    color: #49586d;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.25;
}

.login-language {
    display: flex;
    gap: 2px;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--login-line);
    border-radius: 12px;
    box-shadow: 0 5px 16px rgba(32, 48, 68, .05);
}

.login-language a {
    min-width: 43px;
    height: 31px;
    padding: 0 10px;
    border-radius: 8px;
    color: #7e8998;
    display: grid;
    place-items: center;
    text-decoration: none;
    font-size: 11px;
    font-weight: 850;
}

.login-language a.active {
    background: var(--login-secondary);
    color: #fff;
}

.login-stage {
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(0, 1.25fr) minmax(410px, .75fr);
    gap: clamp(18px, 2vw, 34px);
    align-items: stretch;
}

.login-reset-stage {
    grid-template-columns: minmax(320px, 450px);
    justify-content: center;
}

.login-reset-stage .login-column {
    width: 100%;
}

.login-world {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
    background:
        linear-gradient(135deg, rgba(var(--login-primary-rgb, 79, 120, 232), .97), rgba(var(--login-hero-middle-rgb, 49, 91, 175), .97) 56%, rgba(38, 115, 142, .96));
    box-shadow: 0 24px 65px rgba(44, 72, 115, .14);
    padding: clamp(26px, 3.2vw, 54px);
    color: #fff;
    display: grid;
    grid-template-rows: auto 1fr auto;
}

@media (max-height: 780px) and (min-width: 981px) {
    .login-shell {
        padding-bottom: 10px;
    }

    .login-world {
        padding: 24px 30px;
    }
}

.login-world::before {
    content: "";
    position: absolute;
    width: 420px;
    height: 420px;
    right: -170px;
    top: -160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
    box-shadow: 0 0 0 65px rgba(255, 255, 255, .025), 0 0 0 125px rgba(255, 255, 255, .018);
}

.login-world::after {
    content: "";
    position: absolute;
    width: 320px;
    height: 220px;
    left: -80px;
    bottom: -115px;
    background: rgba(255, 255, 255, .045);
    border-radius: 50%;
}

.world-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.world-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, .8);
    font-size: 11px;
    font-weight: 850;
    letter-spacing: .065em;
    text-transform: uppercase;
}

.world-kicker::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #77e1cf;
    box-shadow: 0 0 0 5px rgba(119, 225, 207, .14);
}

.school-pill {
    height: 34px;
    padding: 0 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    font-size: 10px;
    color: rgba(255, 255, 255, .8);
    font-weight: 750;
}

.school-pill svg {
    width: 14px;
    height: 14px;
}

.world-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: minmax(0, .95fr) minmax(330px, 1.05fr);
    gap: clamp(20px, 3vw, 48px);
    align-items: center;
    min-height: 0;
}

.login-world.no-scene .world-content {
    grid-template-columns: 1fr;
}

.login-world.no-scene .world-copy {
    max-width: 720px;
}

.world-copy {
    container-type: inline-size;
}

.world-copy h1 {
    margin: 0;
    max-width: 650px;
    font-size: clamp(34px, 3.8vw, 54px);
    line-height: .98;
    letter-spacing: -.055em;
    font-weight: 900;
}

.world-copy h1 span {
    display: block;
    color: #cfe0ff;
}

.world-copy p {
    max-width: 560px;
    margin: 18px 0 0;
    color: rgba(255, 255, 255, .76);
    line-height: 1.7;
    font-size: clamp(12px, 1vw, 15px);
}

@media (max-height: 780px) and (min-width: 981px) {
    .world-copy p {
        margin-top: 12px;
        line-height: 1.5;
    }
}

.audience-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 22px;
}

@media (max-height: 780px) and (min-width: 981px) {
    .audience-row {
        margin-top: 14px;
    }
}

.audience-tag {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 11px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .09);
    border: 1px solid rgba(255, 255, 255, .11);
    color: #fff;
    font-size: 10.5px;
    font-weight: 760;
}

.audience-tag svg {
    width: 14px;
    height: 14px;
    color: #bfede4;
}

.school-scene {
    position: relative;
    min-height: 410px;
    display: grid;
    place-items: center;
}

@media (max-height: 780px) and (min-width: 981px) {
    .school-scene {
        min-height: 310px;
    }
}

@media (max-height: 680px) and (min-width: 981px) {
    .school-scene {
        min-height: 280px;
    }
}

.scene-blob {
    position: absolute;
    width: min(30vw, 390px);
    height: min(30vw, 390px);
    border-radius: 42% 58% 58% 42% / 45% 42% 58% 55%;
    background: radial-gradient(circle at 35% 28%, rgba(255, 255, 255, .22), rgba(255, 255, 255, .05) 48%, rgba(255, 255, 255, .02));
    border: 1px solid rgba(255, 255, 255, .08);
}

.school-building {
    position: relative;
    width: min(31vw, 400px);
    height: auto;
    filter: drop-shadow(0 22px 32px rgba(21, 46, 78, .22));
}

.world-footer {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: rgba(255, 255, 255, .62);
    font-size: 10px;
}

.system-ok {
    display: flex;
    align-items: center;
    gap: 8px;
}

.system-ok-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #6fe0a9;
    box-shadow: 0 0 0 5px rgba(111, 224, 169, .10);
}

.login-column {
    min-width: 0;
    padding: 10px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 450px;
    padding: clamp(24px, 3vh, 34px);
    background: rgba(255, 255, 255, .97);
    border: 1px solid rgba(214, 224, 236, .95);
    border-radius: 26px;
    box-shadow: 0 28px 70px rgba(36, 55, 82, .14);
}

.login-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 19px;
}

.login-heading h2 {
    margin: 0;
    color: var(--login-secondary);
    font-size: clamp(28px, 2vw, 34px);
    line-height: 1.05;
    letter-spacing: -.04em;
}

.login-heading p {
    margin: 8px 0 0;
    color: var(--login-muted);
    font-size: 12px;
    line-height: 1.55;
}

.family-badge {
    width: 46px;
    height: 46px;
    flex: 0 0 auto;
    border-radius: 15px;
    display: grid;
    place-items: center;
    background: linear-gradient(145deg, #eaf9f5, #eff4ff);
    color: var(--login-primary);
    border: 1px solid #e2ebf5;
}

.family-badge svg {
    width: 24px;
    height: 24px;
}

.shared-login {
    margin: 0 0 17px;
    padding: 10px 11px;
    display: flex;
    align-items: flex-start;
    gap: 9px;
    border-radius: 12px;
    background: #f4f7fc;
    border: 1px solid #e6ecf4;
    color: #6b788b;
    font-size: 10.5px;
    line-height: 1.45;
}

.shared-login svg {
    width: 16px;
    height: 16px;
    flex: 0 0 auto;
    margin-top: 1px;
    color: var(--login-primary);
}

.login-trigger .alert {
    position: relative;
    margin: 0 0 12px;
    padding: 10px 34px 10px 11px;
    border-radius: 11px;
    background: #fff4f6;
    color: #a73b50;
    border: 1px solid #f2cdd5;
    font-size: 10.5px;
    line-height: 1.45;
}

[dir="rtl"] .login-trigger .alert {
    padding: 10px 11px 10px 34px;
}

.login-trigger .close {
    position: absolute;
    inset-inline-end: 9px;
    top: 3px;
    border: 0;
    background: transparent;
    color: inherit;
    font-size: 18px;
}

.login-trigger .clear10 {
    display: none;
}

.login-group {
    margin-bottom: 13px;
}

.login-form-row {
    margin: 1px 0 16px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

.login-remember {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #6c7888;
    font-size: 10.7px;
    white-space: nowrap;
}

.login-remember input {
    width: 15px;
    height: 15px;
    margin: 0;
    accent-color: var(--login-primary);
}

.login-link,
.login-back {
    color: var(--login-primary);
    font-size: 10.8px;
    font-weight: 850;
    text-decoration: none !important;
}

.login-link:hover,
.login-back:hover {
    text-decoration: underline;
}

.login-resend {
    color: var(--login-muted);
    font-size: 10.7px;
    text-align: end;
}

.login-back {
    width: fit-content;
    margin-bottom: 17px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.login-back svg {
    width: 15px;
    height: 15px;
}

[dir="rtl"] .login-back svg {
    transform: rotate(180deg);
}

.reset-icon {
    width: 52px;
    height: 52px;
    margin-bottom: 16px;
    border-radius: 15px;
    display: grid;
    place-items: center;
    color: var(--login-primary);
    background: #eef4ff;
}

.reset-icon svg {
    width: 25px;
    height: 25px;
}

.login-forget-heading {
    margin-bottom: 16px;
}

.success-state {
    padding: 16px 4px 8px;
    text-align: center;
}

.success-orb {
    width: 66px;
    height: 66px;
    margin: 0 auto 17px;
    border: 1px solid #c6e9db;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: #21906a;
    background: #ecf9f4;
}

.success-orb svg {
    width: 30px;
    height: 30px;
}

.login-heading-centered {
    display: block;
    text-align: center;
}

.login-button-link {
    display: grid;
    place-items: center;
    text-decoration: none;
}

.login-label {
    display: block;
    margin-bottom: 6px;
    color: #4b596c;
    font-size: 11px;
    font-weight: 820;
}

.login-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.login-input-icon {
    position: absolute;
    inset-inline-start: 14px;
    width: 17px;
    height: 17px;
    color: #9ba6b4;
    pointer-events: none;
}

.login-input {
    width: 100%;
    height: 47px;
    padding-inline: 42px;
    border: 1px solid #dde5ee;
    border-radius: 13px;
    background: #fafcfe;
    color: var(--login-text);
    outline: none;
    font-size: 12.5px;
    font-weight: 400;
    line-height: normal;
    transition: .17s;
}

.login-input::placeholder {
    color: #a6afbc;
    font-size: 12.5px;
    font-weight: 400;
    line-height: normal;
    opacity: 1;
}

.login-input:hover {
    border-color: #cad5e2;
}

.login-input:focus {
    background: #fff;
    border-color: var(--login-primary);
    box-shadow: 0 0 0 4px rgba(var(--login-primary-rgb), .09);
}

.login-input.invalid,
.login-input.invalid:focus {
    background: #fff;
    border-color: #d77586;
    border-color: color-mix(in srgb, #cf5367 65%, #ddd);
    box-shadow: 0 0 0 4px rgba(207, 83, 103, .07);
}

.login-field-error {
    display: block;
    min-height: 14px;
    margin: 4px 0 0;
    color: #cf5367;
    font-size: 11px;
    font-weight: 650;
    line-height: 1.35;
    text-align: start;
}

.password-toggle {
    position: absolute;
    inset-inline-end: 7px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #8b96a5;
    display: grid;
    place-items: center;
}

.password-toggle:hover {
    background: #eef3f8;
}

.password-toggle svg {
    width: 17px;
    height: 17px;
}

.login-button {
    width: 100%;
    min-height: 41px;
    margin-top: 3px;
    border: 0;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--login-primary), var(--login-primary-dark));
    color: var(--login-button-text);
    font-size: 12.5px;
    font-weight: 850;
    line-height: normal;
    text-align: center;
    box-shadow: 0 12px 24px rgba(var(--login-primary-rgb), .20);
    transition: .17s;
}

.login-button:hover:not(:disabled) {
    transform: translateY(-1px);
}

.login-button:disabled {
    cursor: not-allowed;
    opacity: .45;
    box-shadow: none;
}

.login-button-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: inherit;
    font-size: 12.5px;
    font-weight: 850;
    line-height: normal;
}

.login-button-inner svg {
    display: block;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
}

.captcha-wrap {
    display: flex;
    justify-content: center;
    margin: 0 0 13px;
    overflow: hidden;
}

.login-page-footer {
    min-height: 34px;
    padding: 0 5px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    color: #8793a2;
    font-size: 9.5px;
    font-weight: 400;
}

@media (max-height: 780px) and (min-width: 981px) {
    .login-page-footer {
        min-height: 28px;
    }
}

.login-page-footer-links {
    display: flex;
    align-items: center;
    gap: 12px;
}

.login-page-footer-dot {
    width: 3px;
    height: 3px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #b7c0cc;
}

[dir="rtl"] .world-copy h1,
[dir="rtl"] .login-heading h2 {
    letter-spacing: 0;
}

[dir="rtl"] .login-input {
    text-align: right;
}

[dir="rtl"] .login-button-inner svg {
    transform: rotate(180deg);
}

@media (min-width: 981px) and (max-width: 1599px) {
    body.login-v2 {
        overflow-x: hidden;
        overflow-y: auto;
    }

    .login-app {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: clip;
        overflow-y: visible;
    }

    .login-shell {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

}

@media (max-height: 780px) and (min-width: 981px) {
    .school-world {
        padding: 24px 30px;
    }

    .login-card {
        padding: 22px;
    }

    .login-heading {
        margin-bottom: 14px;
    }

    .shared-login {
        margin-bottom: 12px;
        padding: 8px 9px;
    }

    .login-group {
        margin-bottom: 23px;
    }

    .login-input {
        height: 41px;
    }

    .login-form-row {
        margin-bottom: 11px;
    }
}

@media (max-height: 680px) and (min-width: 981px) {
    .school-world {
        padding: 20px 28px;
    }
}

@media (max-height: 780px) and (min-width: 981px) {
    .world-content {
        gap: 22px;
    }
}

@media (max-width: 980px) {
    body.login-v2 {
        overflow: auto;
    }

    .login-app {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
        overflow-x: clip;
        overflow-y: visible;
    }

    .login-shell {
        height: auto;
        min-height: 100vh;
        min-height: 100dvh;
    }

    .login-stage {
        grid-template-columns: 1fr;
    }

    .login-world {
        display: none;
    }

    .login-column {
        min-height: calc(100vh - 110px);
        min-height: calc(100dvh - 110px);
        padding: 18px;
        border-radius: 28px;
        background: radial-gradient(circle at 12% 12%, rgba(var(--login-primary-rgb), .08), transparent 20%), radial-gradient(circle at 90% 80%, rgba(var(--login-accent-rgb), .08), transparent 22%);
    }

    .login-card {
        width: min(470px, 100%);
    }
}

@media (max-width: 620px) {
    .login-shell {
        padding: 12px;
    }

    .login-school-identity {
        display: none;
    }

    .login-brand-sub {
        display: none;
    }

    .login-brand-name {
        font-size: 15px;
    }

    .login-brand-mark {
        width: 42px;
        height: 42px;
        border-radius: 13px;
    }

    .login-card {
        padding: 20px;
        border-radius: 21px;
    }

    .family-badge {
        display: none;
    }

    .login-column {
        padding: 10px 0;
    }

    .login-page-footer {
        flex-wrap: wrap;
        justify-content: center;
    }
}
