/*
 * Scoped EMIS login page styles.
 * Branding colors and the optional login background image are injected by Login.cshtml.
 */

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/fraunces-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Fraunces';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('../fonts/fraunces-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/outfit-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Outfit';
    font-style: normal;
    font-weight: 300 700;
    font-display: swap;
    src: url('../fonts/outfit-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    --lp-primary: #0b62d8;
    --lp-primary-dark: #06275f;
    --lp-primary-soft: #e9f4ff;
    --lp-ocean: #0b62d8;
    --lp-accent: #ffc72c;
    --lp-ink: #092152;
    --lp-slate: #63718c;
    --lp-muted: #8390a8;
    --lp-line: #d8e3f2;
    --lp-card: rgba(255, 255, 255, 0.94);
    --lp-card-solid: #ffffff;
    --lp-bg-image: none;
}

body.login-img,
body.login-img .page,
body.login-img .main-content,
body.login-img .side-app,
body.login-img .main-container {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background: #edf7ff !important;
}

.main-container {
    text-align: unset !important;
}

.lp-root,
.lp-root * {
    box-sizing: border-box;
}

.lp-root {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow: hidden;
    padding: clamp(24px, 4vw, 60px) 24px 22px;
    color: var(--lp-ink);
    font-family: 'Outfit', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 18% 12%, rgba(255, 255, 255, 0.95), transparent 36%),
        linear-gradient(135deg, #f8fcff 0%, #eaf6ff 46%, #d8eeff 100%);
}

.lp-root::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -4;
    background-image:
        linear-gradient(120deg, rgba(255, 255, 255, 0.72), rgba(235, 247, 255, 0.58)),
        var(--lp-bg-image);
    background-position: center, center;
    background-size: cover, 100% 100%;
    background-repeat: no-repeat;
}

.lp-root::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -3;
    pointer-events: none;
    background-image:
        radial-gradient(circle, rgba(11, 98, 216, 0.12) 1.4px, transparent 1.6px),
        radial-gradient(circle, rgba(11, 98, 216, 0.08) 1.2px, transparent 1.5px);
    background-position: right 64px top 42px, left 54px bottom 58px;
    background-size: 18px 18px, 20px 20px;
    background-repeat: repeat;
    opacity: 0.52;
    -webkit-mask-image:
        radial-gradient(circle at 82% 18%, #000 0 24%, transparent 48%),
        radial-gradient(circle at 12% 82%, #000 0 22%, transparent 46%);
    mask-image:
        radial-gradient(circle at 82% 18%, #000 0 24%, transparent 48%),
        radial-gradient(circle at 12% 82%, #000 0 22%, transparent 46%);
}

.lp-pattern,
.lp-rings {
    position: absolute;
    z-index: -2;
    pointer-events: none;
}

.lp-pattern--dots-top {
    right: -92px;
    top: -70px;
    width: 520px;
    height: 330px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(12, 92, 190, 0.08), transparent 68%);
}

.lp-pattern--dots-bottom {
    left: -120px;
    bottom: -112px;
    width: 560px;
    height: 360px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(16, 174, 219, 0.09), transparent 68%);
}

.lp-rings {
    width: 620px;
    height: 620px;
    border-radius: 50%;
    background: repeating-radial-gradient(circle, rgba(8, 80, 174, 0.08) 0 1px, transparent 1px 18px);
    opacity: 0.45;
}

.lp-rings--top {
    left: -260px;
    top: -250px;
}

.lp-rings--bottom {
    right: -260px;
    bottom: -300px;
}

.lp-auth-shell {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1 0 auto;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 20px 0;
}

.lp-auth-card {
    width: min(100%, 800px);
    padding: 44px 64px 34px;
    border: 1px solid rgba(214, 226, 241, 0.92);
    border-radius: 30px;
    color: var(--lp-ink);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 255, 255, 0.92)),
        radial-gradient(circle at 50% 0, rgba(198, 232, 255, 0.38), transparent 42%);
    box-shadow:
        0 26px 78px rgba(35, 92, 150, 0.18),
        0 10px 34px rgba(8, 31, 74, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.lp-brand-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: min(100%, 640px);
    margin: 0 auto 27px;
    padding-bottom: 26px;
    border-bottom: 1px solid var(--lp-line);
    text-align: center;
}

.lp-brand-logo {
    display: block;
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 20px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: 0 8px 22px rgba(12, 48, 100, 0.14);
}

.lp-country {
    max-width: 100%;
    margin: 0 0 8px;
    color: #0759f2;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.22em;
    line-height: 1.2;
    text-transform: uppercase;
    overflow-wrap: anywhere;
}

.lp-ministry {
    max-width: 100%;
    margin: 0 0 18px;
    color: var(--lp-ink);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.lp-title {
    max-width: 100%;
    margin: 0;
    color: var(--lp-ink);
    font-family: 'Fraunces', Georgia, serif;
    font-size: 54px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1.03;
    overflow-wrap: anywhere;
}

.lp-subtitle {
    max-width: 100%;
    margin: 17px 0 0;
    color: #0870d8;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.lp-hero-copy {
    width: min(100%, 56ch);
    margin: 20px auto 0;
    color: var(--lp-slate);
    font-size: 17px;
    font-weight: 500;
    line-height: 1.62;
}

.lp-env-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin-top: 18px;
    min-height: 34px;
    padding: 8px 18px;
    border: 1px solid rgba(255, 199, 44, 0.5);
    border-radius: 999px;
    color: #463100;
    background: #fff4c9;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    line-height: 1;
    text-transform: uppercase;
}

#lp-form {
    width: min(100%, 640px);
    margin: 0 auto;
}

.lp-summary {
    margin: 0 0 18px;
    color: #8a1f2b;
    font-size: 14px;
    font-weight: 600;
}

.lp-summary.validation-summary-valid {
    display: none;
}

.lp-summary ul {
    margin: 0;
    padding: 12px 14px 12px 32px;
    border: 1px solid #fac1c8;
    border-radius: 10px;
    background: #fff0f2;
}

.lp-field {
    margin-bottom: 18px;
}

.lp-label {
    display: block;
    margin-bottom: 9px;
    color: var(--lp-ink);
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
}

.lp-input-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
    min-height: 62px;
    padding: 0 17px;
    border: 1.5px solid var(--lp-line);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow:
        0 8px 22px rgba(31, 72, 124, 0.06),
        inset 0 1px 0 rgba(255, 255, 255, 0.88);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.lp-input-wrap:focus-within {
    border-color: var(--lp-ocean);
    background: #ffffff;
    box-shadow:
        0 0 0 4px color-mix(in srgb, var(--lp-ocean) 15%, transparent),
        0 10px 24px rgba(31, 72, 124, 0.08);
}

.lp-input-wrap.is-invalid {
    border-color: #dc3545;
    background: #fff9f9;
}

.lp-input-icon {
    flex: 0 0 auto;
    width: 23px;
    height: 23px;
    color: #25416f;
    pointer-events: none;
}

.lp-input {
    display: block;
    width: 100%;
    min-width: 0;
    padding: 17px 0;
    border: 0;
    outline: 0;
    color: var(--lp-ink);
    background: transparent;
    font: inherit;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0;
}

.lp-input::placeholder {
    color: #8a96ad;
    opacity: 1;
}

.lp-pw-btn {
    display: inline-flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    margin-right: -6px;
    border: 0;
    border-radius: 50%;
    color: #25416f;
    background: transparent;
    cursor: pointer;
    transition: color 0.18s ease, background-color 0.18s ease;
}

.lp-pw-btn:hover {
    color: var(--lp-ocean);
    background: #edf5ff;
}

.lp-eye-hidden {
    display: none;
}

.lp-pw-btn:focus-visible,
.lp-btn:focus-visible,
.lp-check-label input:focus-visible,
.lp-forgot:focus-visible,
.lp-activation-link:focus-visible {
    outline: 3px solid var(--lp-accent);
    outline-offset: 3px;
}

.lp-err {
    display: block;
    min-height: 18px;
    margin-top: 6px;
    color: #dc3545;
    font-size: 12px;
    font-weight: 700;
}

.lp-err:empty {
    display: none;
}

.lp-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin: 0 0 20px;
}

.lp-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    color: var(--lp-slate);
    font-size: 16px;
    font-weight: 500;
    user-select: none;
    cursor: pointer;
}

.lp-check-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--lp-ocean);
    cursor: pointer;
}

.lp-forgot {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: #0759f2;
    font-size: 15px;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.lp-forgot:hover {
    color: var(--lp-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lp-activation-notice {
    display: flex;
    gap: 10px;
    margin: 0 0 18px;
    padding: 13px 14px;
    border: 1px solid #f9d368;
    border-left: 4px solid #d59200;
    border-radius: 10px;
    color: #643c00;
    background: #fff8de;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
}

.lp-activation-icon {
    flex: 0 0 auto;
    margin-top: 2px;
    color: #bd7900;
}

.lp-activation-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.lp-activation-link {
    color: #0759f2;
    font-weight: 800;
    text-decoration: none;
}

.lp-activation-link:hover {
    color: var(--lp-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lp-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 13px;
    width: 100%;
    min-height: 62px;
    padding: 16px 24px;
    border: 0;
    border-radius: 10px;
    color: #ffffff;
    background: linear-gradient(180deg, #126bff, #004de0);
    box-shadow:
        0 18px 34px rgba(0, 74, 217, 0.24),
        inset 0 1px 0 rgba(255, 255, 255, 0.32);
    cursor: pointer;
    font: inherit;
    font-size: 21px;
    font-weight: 800;
    letter-spacing: 0;
    line-height: 1;
    overflow: hidden;
    transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.lp-btn::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
    transform: translateX(-110%);
    transition: transform 0.42s ease;
}

.lp-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(180deg, #2178ff, #0052ed);
    box-shadow:
        0 22px 42px rgba(0, 74, 217, 0.32),
        inset 0 1px 0 rgba(255, 255, 255, 0.34);
}

.lp-btn:hover::after {
    transform: translateX(110%);
}

.lp-btn:active {
    transform: translateY(0);
}

.lp-btn:disabled {
    opacity: 0.58;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.lp-btn-arrow {
    flex: 0 0 auto;
    transition: transform 0.18s ease;
}

.lp-btn:hover .lp-btn-arrow {
    transform: translateX(4px);
}

.lp-spinner {
    display: none;
    width: 19px;
    height: 19px;
    border: 2.5px solid rgba(255, 255, 255, 0.32);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: lp-spin 0.7s linear infinite;
}

@keyframes lp-spin {
    to {
        transform: rotate(360deg);
    }
}

.lp-btn.is-loading .lp-spinner {
    display: block;
}

.lp-btn.is-loading .lp-btn-arrow {
    display: none;
}

.lp-btn.is-loading .lp-btn-text {
    opacity: 0.7;
}

.lp-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    margin: 14px 0 0;
    color: var(--lp-slate);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.4;
    text-align: center;
}

.lp-consent svg {
    flex: 0 0 auto;
    color: #2a76d8;
}

.lp-back-public {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: fit-content;
    min-height: 40px;
    margin: 18px auto 0;
    color: #0759f2;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.2;
    text-decoration: none;
}

.lp-back-public:hover {
    color: var(--lp-primary-dark);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.lp-back-public:focus-visible {
    outline: 3px solid var(--lp-accent);
    outline-offset: 3px;
    border-radius: 8px;
}

.lp-back-public svg {
    flex: 0 0 auto;
}

.lp-card-foot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 13px;
    width: min(100%, 640px);
    margin: 27px auto 0;
    padding-top: 22px;
    border-top: 1px solid var(--lp-line);
}

.lp-card-foot-label {
    margin: 0;
    color: #8d98ae;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.24em;
    line-height: 1;
    text-transform: uppercase;
}

.lp-card-foot-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 26px;
}

.lp-card-foot img {
    display: block;
    max-width: 160px;
    max-height: 44px;
    object-fit: contain;
}

.lp-card-foot-sep {
    width: 1px;
    height: 38px;
    background: #cfd8e6;
}

.lp-footer {
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
    padding: 8px 96px 0;
    color: #6f7d95;
    font-size: 15px;
    line-height: 1.35;
    text-align: center;
}

.lp-skip {
    position: absolute;
    top: -999px;
    left: 1rem;
    z-index: 12000;
    padding: 0.65rem 1rem;
    border-radius: 0 0 8px 8px;
    color: #06123c;
    background: var(--lp-accent);
    font-family: 'Outfit', system-ui, sans-serif;
    font-size: 14px;
    font-weight: 800;
    text-decoration: none;
}

.lp-skip:focus {
    top: 0;
}

html[data-a11y-visual-noise="reduced"] .lp-pattern,
html[data-a11y-visual-noise="reduced"] .lp-rings,
html[data-a11y-visual-noise="reduced"] .lp-root::after {
    display: none;
}

@media (prefers-reduced-motion: reduce) {
    .lp-btn,
    .lp-btn::after,
    .lp-btn-arrow,
    .lp-input-wrap,
    .lp-pw-btn,
    .lp-spinner {
        animation: none !important;
        transition: none !important;
    }
}

html[data-a11y-reduced-motion="true"] .lp-btn,
html[data-a11y-reduced-motion="true"] .lp-btn::after,
html[data-a11y-reduced-motion="true"] .lp-btn-arrow,
html[data-a11y-reduced-motion="true"] .lp-input-wrap,
html[data-a11y-reduced-motion="true"] .lp-pw-btn,
html[data-a11y-reduced-motion="true"] .lp-spinner {
    animation: none !important;
    transition: none !important;
}

@media (max-width: 1024px) {
    .lp-root {
        overflow-y: auto;
        padding: 24px 20px 20px;
    }

    .lp-auth-card {
        width: min(100%, 720px);
        padding: 38px 42px 32px;
    }

    .lp-title {
        font-size: 46px;
    }

    .lp-subtitle {
        font-size: 20px;
    }
}

@media (max-width: 680px) {
    .lp-root {
        padding: 18px 14px 18px;
    }

    .lp-auth-shell {
        align-items: flex-start;
        padding: 8px 0 14px;
    }

    .lp-auth-card {
        padding: 28px 20px 26px;
        border-radius: 22px;
    }

    .lp-brand-header {
        margin-bottom: 22px;
        padding-bottom: 22px;
    }

    .lp-brand-logo {
        width: 58px;
        height: 58px;
        margin-bottom: 16px;
    }

    .lp-country {
        font-size: 12px;
        letter-spacing: 0.16em;
    }

    .lp-ministry {
        margin-bottom: 14px;
        font-size: 16px;
    }

    .lp-title {
        font-size: 36px;
    }

    .lp-subtitle {
        margin-top: 13px;
        font-size: 18px;
    }

    .lp-hero-copy {
        margin-top: 15px;
        font-size: 15px;
        line-height: 1.55;
    }

    .lp-input-wrap {
        min-height: 56px;
    }

    .lp-input {
        padding: 14px 0;
        font-size: 15px;
    }

    .lp-meta {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .lp-check-label,
    .lp-forgot {
        font-size: 15px;
    }

    .lp-btn {
        min-height: 58px;
        font-size: 18px;
    }

    .lp-consent {
        align-items: flex-start;
        font-size: 13px;
    }

    .lp-card-foot-logos {
        gap: 16px;
    }

    .lp-card-foot img {
        max-width: 126px;
        max-height: 42px;
    }

    .lp-footer {
        padding: 8px 70px 0 14px;
        font-size: 13px;
    }
}

@media (max-width: 420px) {
    .lp-auth-card {
        padding-inline: 16px;
    }

    .lp-title {
        font-size: 31px;
    }

    .lp-subtitle {
        font-size: 16px;
    }

    .lp-card-foot-logos {
        flex-wrap: wrap;
    }

    .lp-card-foot-sep {
        display: none;
    }
}
