@font-face {
    font-family: "Be Vietnam Pro";
    src: url("/assets/portal-v2/fonts/be-vietnam-pro-vietnamese-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Be Vietnam Pro";
    src: url("/assets/portal-v2/fonts/be-vietnam-pro-vietnamese-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Be Vietnam Pro";
    src: url("/assets/portal-v2/fonts/be-vietnam-pro-vietnamese-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --sl-navy: #073f70;
    --sl-navy-dark: #032f58;
    --sl-teal: #008d91;
    --sl-coral: #f0583e;
    --sl-ink: #0c3150;
    --sl-copy: #657486;
    --sl-line: #9eb2c4;
    --sl-surface: #fbfaf7;
    --sl-focus: rgba(0, 141, 145, .22);
}

* { box-sizing: border-box; }

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

body.smartlearning-auth {
    margin: 0 !important;
    background: var(--sl-surface);
    color: var(--sl-ink);
    font-family: "Be Vietnam Pro", Arial, sans-serif;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

.sl-skip {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 20;
    padding: 10px 14px;
    border-radius: 6px;
    background: #fff;
    color: var(--sl-navy);
    font-weight: 600;
    text-decoration: none;
    transform: translateY(-140%);
    transition: transform .18s ease;
}

.sl-skip:focus { transform: translateY(0); }

.sl-page {
    display: grid;
    min-height: 100svh;
    grid-template-columns: minmax(0, 58%) minmax(470px, 42%);
}

.sl-visual {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    margin: 0 !important;
    background: #dff1ee;
    isolation: isolate;
}

.sl-hero {
    position: absolute;
    inset: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: 52% 50%;
}

.sl-brand {
    position: absolute;
    top: clamp(28px, 4.4vh, 48px);
    left: clamp(34px, 5vw, 76px);
    display: block;
    width: min(37vw, 460px);
    max-width: calc(100% - 72px);
}

.sl-brand img {
    display: block;
    width: 100%;
    height: auto;
}

.sl-visual h2 {
    position: absolute;
    bottom: clamp(54px, 8vh, 88px);
    left: clamp(44px, 5vw, 76px);
    max-width: 620px;
    margin: 0;
    color: var(--sl-navy-dark);
    font-size: clamp(36px, 4.1vw, 62px);
    font-weight: 700;
    line-height: 1.14;
    letter-spacing: 0;
}

.sl-access {
    position: relative;
    display: grid;
    min-height: 100svh;
    grid-template-rows: auto 1fr auto;
    background: var(--sl-surface);
    padding: 38px clamp(42px, 5.2vw, 78px) 46px;
}

.sl-language {
    display: flex;
    justify-self: end;
    overflow: hidden;
    border: 1px solid #ccd6df;
    border-radius: 8px;
    background: #fff;
}

.sl-language a {
    display: grid;
    min-width: 70px;
    min-height: 48px;
    place-items: center;
    color: var(--sl-navy);
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
}

.sl-language a[aria-current="true"] {
    background: var(--sl-navy);
    color: #fff;
}

.sl-form-wrap {
    width: min(100%, 540px);
    margin: auto;
    padding: 38px 0 32px;
}

.sl-heading { margin-bottom: 36px; }

.sl-heading h1 {
    margin: 0 0 12px;
    color: var(--sl-navy-dark);
    font-size: clamp(32px, 3vw, 48px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0;
}

.sl-heading p {
    margin: 0;
    color: var(--sl-copy);
    font-size: 17px;
    line-height: 1.6;
}

.sl-status,
.sl-errors {
    margin: -16px 0 24px;
    border: 1px solid #f2b8ae;
    border-radius: 8px;
    background: #fff4f1;
    padding: 12px 14px;
    color: #a72e20;
    font-size: 14px;
    line-height: 1.5;
}

.sl-status {
    border-color: #9ccfca;
    background: #effaf8;
    color: #126c6b;
}

.sl-errors p { margin: 0; }
.sl-errors p + p { margin-top: 5px; }

.sl-form { display: grid; gap: 20px; }

.sl-field { min-width: 0; }

.sl-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.sl-input-wrap { position: relative; }

.sl-input-wrap > [class^="icon-"] {
    position: absolute;
    top: 50%;
    left: 18px;
    color: #6d7e8e;
    font-size: 21px;
    transform: translateY(-50%);
    pointer-events: none;
}

.sl-input-wrap input {
    display: block;
    width: 100%;
    height: 66px;
    border: 1.5px solid var(--sl-line);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, .72);
    padding: 0 58px 0 54px;
    color: var(--sl-ink);
    font-size: 16px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.sl-input-wrap input::placeholder { color: #6e7c89; opacity: 1; }

.sl-input-wrap input:focus {
    border-color: var(--sl-teal);
    background: #fff;
    box-shadow: 0 0 0 4px var(--sl-focus);
}

.sl-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--sl-navy);
    cursor: pointer;
    transform: translateY(-50%);
}

.sl-password-toggle:hover,
.sl-password-toggle:focus-visible { background: #e9f4f3; outline: none; }

.sl-password-toggle span { font-size: 24px; }

.sl-options {
    display: flex;
    min-height: 34px;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.sl-remember {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--sl-ink);
    cursor: pointer;
}

.sl-remember input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--sl-teal);
}

.sl-options a {
    color: var(--sl-coral);
    font-weight: 600;
    text-decoration: none;
}

.sl-options a:hover { text-decoration: underline; text-underline-offset: 4px; }

.sl-submit,
.sl-google {
    display: inline-flex;
    width: 100%;
    min-height: 66px;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-weight: 600;
}

.sl-submit {
    border: 0;
    background: var(--sl-navy);
    color: #fff;
    cursor: pointer;
    font-size: 18px;
    transition: background .18s ease, box-shadow .18s ease, transform .18s ease;
}

.sl-submit:hover { background: var(--sl-navy-dark); box-shadow: 0 9px 24px rgba(3, 47, 88, .18); }
.sl-submit:active { transform: translateY(1px); }
.sl-submit:focus-visible { outline: 4px solid var(--sl-focus); outline-offset: 3px; }
.sl-submit[disabled] { cursor: wait; opacity: .78; }

.sl-divider {
    display: flex;
    margin: 26px 0 20px;
    align-items: center;
    gap: 16px;
    color: #7b8792;
    font-size: 14px;
}

.sl-divider::before,
.sl-divider::after {
    height: 1px;
    flex: 1;
    background: #d8dfe5;
    content: "";
}

.sl-google {
    gap: 14px;
    border: 0;
    background: #edf5f3;
    color: var(--sl-ink);
    font-size: 16px;
}

.sl-google:disabled { cursor: not-allowed; opacity: 1; }
.sl-google img { width: 24px; height: 24px; }

.sl-footer {
    color: #52687a;
    font-size: 14px;
    text-align: center;
}

@media (max-width: 1100px) {
    .sl-page { grid-template-columns: minmax(0, 52%) minmax(460px, 48%); }
    .sl-brand { width: min(39vw, 390px); left: 38px; }
    .sl-visual h2 { left: 42px; font-size: 42px; }
    .sl-access { padding-right: 42px; padding-left: 42px; }
}

@media (max-width: 820px) {
    .sl-page { display: block; }

    .sl-visual {
        min-height: 300px;
        height: 36svh;
        max-height: 390px;
    }

    .sl-hero { object-position: 50% 49%; }

    .sl-brand {
        top: 18px;
        left: 22px;
        width: min(52vw, 350px);
        max-width: calc(100% - 44px);
    }

    .sl-visual h2 { display: none; }

    .sl-access {
        min-height: auto;
        padding: 20px 24px 30px;
    }

    .sl-language { position: absolute; top: 18px; right: 22px; z-index: 2; }
    .sl-language a { min-width: 56px; min-height: 42px; }
    .sl-form-wrap { width: min(100%, 560px); padding: 58px 0 28px; }
    .sl-footer { padding-top: 8px; }
}

@media (max-width: 560px) {
    .sl-visual { height: 28svh; min-height: 232px; max-height: 250px; }
    .sl-hero { object-position: 51% 48%; }
    .sl-brand { top: 14px; left: 16px; width: 226px; }
    .sl-access { padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); }
    .sl-language { top: 14px; right: 16px; }
    .sl-language a { min-width: 48px; min-height: 40px; font-size: 13px; }
    .sl-form-wrap { padding-top: 54px; }
    .sl-heading { margin-bottom: 26px; }
    .sl-heading h1 { margin-bottom: 9px; font-size: 28px; }
    .sl-heading p { font-size: 14px; }
    .sl-form { gap: 16px; }
    .sl-input-wrap input { height: 58px; font-size: 15px; }
    .sl-options { gap: 14px; font-size: 14px; }
    .sl-submit, .sl-google { min-height: 58px; }
    .sl-divider { margin: 22px 0 17px; }
    .sl-footer { font-size: 12px; }
}

@media (max-width: 390px) {
    .sl-brand { width: 205px; }
    .sl-access { padding-right: 16px; padding-left: 16px; }
    .sl-language a { min-width: 44px; }
    .sl-options { align-items: flex-start; }
}

@media (min-width: 821px) and (max-height: 820px) {
    .sl-access {
        padding-top: 24px;
        padding-bottom: 22px;
    }

    .sl-language a { min-height: 42px; }

    .sl-form-wrap {
        padding-top: 16px;
        padding-bottom: 14px;
    }

    .sl-heading { margin-bottom: 20px; }

    .sl-heading h1 {
        margin-bottom: 8px;
        font-size: 34px;
    }

    .sl-heading p { font-size: 15px; }
    .sl-form { gap: 12px; }
    .sl-input-wrap input { height: 54px; }

    .sl-options {
        min-height: 28px;
        font-size: 14px;
    }

    .sl-submit,
    .sl-google { min-height: 54px; }

    .sl-divider { margin: 16px 0 12px; }

    .sl-visual h2 {
        bottom: 30px;
        font-size: clamp(34px, 3.4vw, 46px);
    }

    .sl-footer { line-height: 18px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
