/* Explicit local faces keep the auth pages on the same font as the app. */
@font-face {
    font-family: "HarmonyOS Sans SC";
    src: url("../fonts/harmonyos-sans-sc/HarmonyOS-Sans-SC-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "HarmonyOS Sans SC";
    src: url("../fonts/harmonyos-sans-sc/HarmonyOS-Sans-SC-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}
@font-face {
    font-family: "HarmonyOS Sans SC";
    src: url("../fonts/harmonyos-sans-sc/HarmonyOS-Sans-SC-Medium.woff2") format("woff2");
    font-style: normal;
    font-weight: 600;
    font-display: swap;
}
@font-face {
    font-family: "HarmonyOS Sans SC";
    src: url("../fonts/harmonyos-sans-sc/HarmonyOS-Sans-SC-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

* { box-sizing: border-box; }

body.auth-portal-body {
    margin: 0;
    height: 100vh;
    min-height: 36rem;
    overflow: hidden;
    color: #111;
    background: #f5f5f3;
    font-family: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", sans-serif;
}

.auth-portal-body :is(input, select, button) {
    font-family: "HarmonyOS Sans SC", "PingFang SC", "Noto Sans SC", sans-serif;
}

.auth-portal-body .auth-background-glow { display: none; }

.auth-portal-body .guest-shell.auth-shell-ios {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.auth-demo-hero {
    position: absolute;
    top: 0;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background: #050505;
}

.auth-demo-hero::after {
    content: "";
    position: absolute;
    right: -45%;
    bottom: -220px;
    width: 130%;
    height: 300px;
    border-radius: 50%;
    background: #f5f5f3;
}

.auth-demo-brand {
    position: absolute;
    top: 50px;
    left: 50%;
    z-index: 2;
    width: min(420px, calc(100% - 40px));
    color: #fff;
    transform: translateX(-50%);
}

.auth-demo-brand h2 { margin: 0; color: #fff; font-size: 22px; }
.auth-demo-brand p { margin: 1em 0; color: #e4e4e4; font-size: 14px; }

.auth-demo-container {
    position: relative;
    z-index: 3;
    width: min(420px, calc(100% - 40px));
    margin: 260px auto 0;
    transition: opacity .22s ease, transform .22s ease;
}
.auth-demo-container.is-leaving { opacity: 0; transform: translateY(8px); }

.auth-demo-page { display: none; opacity: 0; transform: translateY(8px); }
.auth-demo-page.active { display: block; animation: authPageIn .32s ease forwards; }
@keyframes authPageIn { to { opacity: 1; transform: translateY(0); } }

.auth-demo-page h1 { margin: 0 0 28px; font-size: 28px; }
.auth-demo-page label {
    display: flex;
    justify-content: space-between;
    margin: 15px 0 8px;
    font-size: 14px;
    font-weight: 600;
}

.auth-demo-page label a,
.auth-demo-bottom a {
    padding: 0;
    color: #111;
    background: none;
    border: 0;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
}

.auth-demo-page input {
    width: 100%;
    height: 50px;
    padding: 0 16px;
    color: #111;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    outline: none;
    font: inherit;
    font-size: 14px;
    transition: border-color .2s ease, box-shadow .2s ease;
}

.auth-demo-page input:focus {
    border-color: #aaa;
    box-shadow: 0 0 0 3px rgba(0,0,0,.06);
}

.auth-demo-main {
    position: relative;
    display: block;
    width: 100%;
    height: 48px;
    margin-top: 22px;
    color: #fff;
    background: #080808;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 700;
    transition: width .4s ease, opacity .2s ease;
}

.auth-demo-main:disabled { cursor: wait; }
.auth-demo-main.loading {
    width: 140px;
    margin-right: auto;
    margin-left: auto;
    color: transparent;
}

.auth-demo-main.loading::before,
.auth-demo-main.loading::after {
    content: "";
    position: absolute;
    top: 18px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}

.auth-demo-main.loading::before { left: 55px; animation: authDotA 1s infinite; }
.auth-demo-main.loading::after { right: 55px; animation: authDotB 1s infinite; }
@keyframes authDotA { 50% { transform: translateX(18px) scale(.7); } }
@keyframes authDotB { 50% { transform: translateX(-18px) scale(.7); } }

.auth-demo-bottom {
    display: block !important;
    margin-top: 38px;
    color: #777;
    text-align: center;
    font-size: 14px;
}

.auth-demo-message {
    margin: -12px 0 18px;
    padding: 10px 14px;
    color: #303030;
    background: #ececea;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
}

.auth-demo-message.is-error { color: #9c2e2e; background: #f4e8e8; }
.auth-demo-message.is-success { color: #28623f; background: #e7f0ea; }

/* Registration and password recovery share the login portal's monochrome shell. */
body.auth-portal-body.auth-portal-register,
body.auth-portal-body.auth-portal-forgot-password {
    height: auto;
    min-height: 100vh;
    overflow-x: hidden;
    overflow-y: auto;
}

.auth-demo-container-register { margin-top: 256px; padding-bottom: 40px; }
.auth-demo-container-forgot { margin-top: 260px; padding-bottom: 40px; }
.auth-demo-container-register .auth-demo-page h1,
.auth-demo-container-forgot .auth-demo-page h1 { margin-bottom: 16px; }
.auth-demo-form { width: 100%; }
.auth-demo-intro { margin: 0 0 24px; color: #6b6b6b; font-size: 14px; }
.auth-demo-notice {
    margin: 0 0 18px;
    padding: 12px 14px;
    color: #484848;
    background: #eaeae8;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.6;
}
.auth-demo-page .auth-demo-email-field { display: grid; grid-template-columns: minmax(0, 1fr) 108px; gap: 8px; }
.auth-demo-page .auth-demo-email-field input { min-width: 0; }
.auth-demo-page .auth-demo-email-field select {
    width: 100%;
    height: 50px;
    padding: 0 8px;
    color: #111;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 14px;
    outline: none;
    font: inherit;
    font-size: 13px;
}
.auth-demo-page .auth-demo-email-field select:focus { border-color: #aaa; box-shadow: 0 0 0 3px rgba(0,0,0,.06); }
.auth-demo-page .auth-demo-password { position: relative; display: block; }
.auth-demo-page .auth-demo-password input { padding-right: 62px; }
.auth-demo-page .auth-demo-password button {
    position: absolute;
    top: 50%;
    right: 8px;
    padding: 8px;
    color: #555;
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    transform: translateY(-50%);
}
.auth-demo-page .auth-demo-slider {
    margin-top: 22px;
    background: #fff;
    border-color: #dedede;
}
.auth-demo-page .auth-demo-slider > strong { color: #666; font-size: 12px; }
.auth-demo-page .auth-demo-slider > i { background: #d7d7d7; }
.auth-demo-page .auth-demo-slider .credential-slider-thumb { background: #111; box-shadow: 0 2px 7px rgba(0,0,0,.16); }
.auth-demo-page .auth-demo-slider.is-complete { background: #e9e9e7; border-color: #c7c7c7; }
.auth-demo-page .auth-demo-slider.is-complete > i { background: #c5c5c5; }
.auth-demo-page .auth-demo-slider.is-complete > strong { color: #333; }
.auth-demo-page .auth-demo-slider.is-complete .credential-slider-thumb { background: #111; }
.auth-demo-page .auth-demo-slider[data-disabled="1"] { opacity: .5; }
.auth-demo-page .auth-demo-main:disabled:not(.loading) { opacity: .48; cursor: not-allowed; }

@media (max-width: 480px) {
    .auth-demo-brand { top: calc(36px + env(safe-area-inset-top)); }
    .auth-demo-container-register { margin-top: 256px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
    .auth-demo-container-forgot { margin-top: 256px; padding-bottom: calc(30px + env(safe-area-inset-bottom)); }
    .auth-demo-page .auth-demo-email-field { grid-template-columns: minmax(0, 1fr) 98px; }
}

@media (max-height: 720px) {
    body.auth-portal-body { min-height: 32rem; overflow-y: auto; }
    .auth-demo-container { padding-bottom: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-demo-page.active { animation-duration: .01ms; }
}
