:root {
    --auth-text: #f4f9fd;
    --auth-muted: rgba(205, 222, 235, .72);
    --auth-line: rgba(151, 211, 250, .28);
    --auth-accent: #79ccff;
    --auth-accent-strong: #36b9ff;
    --auth-panel: rgba(4, 17, 29, .82);
}

* { box-sizing: border-box; }

body.amoy-auth-page {
    position: relative;
    isolation: isolate;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 26px;
    min-height: 100svh;
    height: auto;
    margin: 0;
    padding: clamp(28px, 5vh, 58px) 18px;
    overflow-x: hidden;
    color: var(--auth-text);
    background-color: #020914 !important;
    background-image: url("../public/brand/amoy-subpages-background.jpg") !important;
    background-repeat: no-repeat !important;
    background-position: 50% 50% !important;
    background-size: cover !important;
    background-attachment: fixed !important;
    font-family: "Segoe UI Variable Display", "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
}

body.amoy-auth-page::before {
    content: "";
    position: fixed;
    z-index: -2;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 50% 42%, rgba(61, 159, 229, .08), transparent 32%),
        linear-gradient(180deg, rgba(0, 5, 11, .26), rgba(0, 7, 15, .48));
}

body.amoy-auth-page::after {
    content: "";
    position: fixed;
    z-index: -1;
    left: 0;
    right: 0;
    top: 67%;
    height: 1px;
    pointer-events: none;
    background: linear-gradient(90deg, transparent, rgba(99, 190, 248, .36), transparent);
    box-shadow: 0 0 24px rgba(54, 149, 216, .22);
}

.amoy-auth-brand {
    width: min(520px, 100%);
    text-align: center;
}

.amoy-auth-brand__title {
    margin: 0;
    color: rgba(247, 252, 255, .96);
    font-size: clamp(25px, 4vw, 38px);
    font-weight: 300;
    line-height: 1;
    letter-spacing: .25em;
    padding-left: .25em;
    text-shadow: 0 0 24px rgba(87, 180, 239, .22);
}

.amoy-auth-brand__subtitle {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 14px auto 0;
    color: rgba(183, 216, 239, .78);
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.amoy-auth-brand__subtitle::before,
.amoy-auth-brand__subtitle::after {
    content: "";
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(141, 207, 249, .62));
}

.amoy-auth-brand__subtitle::after {
    background: linear-gradient(90deg, rgba(141, 207, 249, .62), transparent);
}

.amoy-auth-page .amoy-auth-card.card {
    position: relative;
    width: min(440px, 100%);
    margin: 0;
    padding: clamp(28px, 4vw, 42px);
    overflow: hidden;
    border: 1px solid rgba(151, 215, 255, .46);
    border-radius: 24px;
    color: var(--auth-text);
    background:
        linear-gradient(145deg, rgba(255, 255, 255, .07), transparent 42%),
        var(--auth-panel);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .14),
        0 22px 60px rgba(0, 5, 12, .42),
        0 0 32px rgba(48, 147, 212, .12);
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
}

.amoy-auth-page .amoy-auth-card.card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 16%;
    right: 16%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #d5f1ff, transparent);
    box-shadow: 0 0 14px rgba(107, 202, 255, .55);
}

.amoy-auth-kicker {
    margin: 0 0 10px;
    color: var(--auth-accent);
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .24em;
    text-align: center;
    text-transform: uppercase;
}

.amoy-auth-page .amoy-auth-card h2 {
    margin: 0 0 28px;
    color: #f7fbff;
    font-size: clamp(27px, 4vw, 34px);
    font-weight: 350;
    line-height: 1.15;
    letter-spacing: -.025em;
    text-align: center;
    text-shadow: 0 0 22px rgba(77, 173, 235, .2);
}

.amoy-auth-page .amoy-auth-card form {
    display: grid;
    gap: 14px;
}

.amoy-auth-page .amoy-auth-card input,
.amoy-auth-page .amoy-auth-card select {
    width: 100%;
    min-height: 50px;
    margin: 0;
    padding: 0 16px;
    border: 1px solid rgba(145, 205, 244, .27);
    border-radius: 14px;
    outline: none;
    color: rgba(244, 250, 255, .96);
    background: rgba(8, 27, 43, .74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .045);
    font: inherit;
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.amoy-auth-page .amoy-auth-card select {
    color-scheme: dark;
    cursor: pointer;
}

.amoy-auth-page .amoy-auth-card input::placeholder {
    color: rgba(190, 211, 226, .55);
}

.amoy-auth-page .amoy-auth-card input:focus,
.amoy-auth-page .amoy-auth-card select:focus {
    border-color: rgba(129, 210, 255, .84);
    background: rgba(11, 37, 57, .9);
    box-shadow: 0 0 0 3px rgba(67, 169, 232, .12), 0 0 18px rgba(66, 172, 238, .09);
}

.amoy-auth-page .amoy-auth-card button {
    width: 100%;
    min-height: 50px;
    margin: 4px 0 0;
    padding: 0 18px;
    border: 1px solid rgba(171, 225, 255, .7);
    border-radius: 999px;
    color: #ffffff;
    background:
        linear-gradient(110deg, rgba(255, 255, 255, .14), transparent 44%),
        rgba(31, 118, 174, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .18), 0 10px 26px rgba(0, 8, 17, .25);
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    letter-spacing: .02em;
    transition: border-color .22s ease, background .22s ease, box-shadow .22s ease, transform .22s ease;
}

.amoy-auth-page .amoy-auth-card button:hover,
.amoy-auth-page .amoy-auth-card button:focus-visible {
    border-color: rgba(222, 246, 255, .96);
    background:
        linear-gradient(110deg, rgba(255, 255, 255, .17), transparent 44%),
        rgba(38, 143, 204, .86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 22px rgba(70, 179, 240, .2);
    transform: translateY(-1px);
    outline: none;
}

.amoy-auth-page .amoy-auth-card .muted {
    margin: 0 0 18px;
    color: var(--auth-muted);
    font-size: 13px;
    line-height: 1.65;
    text-align: center;
}

.amoy-auth-page .amoy-auth-card form .muted {
    margin: 0;
}

.amoy-auth-page .amoy-auth-card .error,
.amoy-auth-page .amoy-auth-card .success {
    margin: 0 0 16px;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

.amoy-auth-page .amoy-auth-card .error {
    border: 1px solid rgba(255, 132, 143, .34);
    color: #ffd6da;
    background: rgba(111, 28, 38, .3);
}

.amoy-auth-page .amoy-auth-card .success {
    border: 1px solid rgba(100, 221, 179, .32);
    color: #d6ffef;
    background: rgba(24, 96, 73, .3);
}

.amoy-auth-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px 18px;
    margin-top: 20px;
    text-align: center;
}

.amoy-auth-links--stacked {
    flex-direction: column;
}

.amoy-auth-page .amoy-auth-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0 12px;
    border: 1px solid transparent;
    border-radius: 999px;
    color: rgba(180, 222, 248, .9);
    font-size: 12px;
    text-decoration: none;
}

.amoy-auth-page .amoy-auth-link:hover,
.amoy-auth-page .amoy-auth-link:focus-visible {
    border-color: rgba(137, 207, 249, .32);
    color: #ffffff;
    background: rgba(44, 113, 158, .12);
    outline: none;
}

.amoy-auth-page .amoy-auth-link--home {
    border-color: rgba(137, 207, 249, .28);
    background: rgba(15, 45, 68, .4);
}

.amoy-auth-footer {
    margin: 0;
    color: rgba(163, 204, 232, .68);
    font-size: 9px;
    font-weight: 500;
    letter-spacing: .22em;
    text-align: center;
    text-transform: uppercase;
}

[dir="rtl"] .amoy-auth-brand__title {
    padding-right: .25em;
    padding-left: 0;
}

@media (max-width: 620px) {
    body.amoy-auth-page {
        justify-content: flex-start;
        gap: 21px;
        padding: 32px 12px 24px;
        background-attachment: scroll !important;
    }

    .amoy-auth-brand__title { font-size: 27px; }
    .amoy-auth-brand__subtitle { gap: 10px; font-size: 8px; letter-spacing: .2em; }

    .amoy-auth-page .amoy-auth-card.card,
    .amoy-auth-page .login-box.card {
        width: min(100%, 430px) !important;
        padding: 26px 20px !important;
        border-radius: 20px;
    }

    .amoy-auth-page .amoy-auth-card h2 { margin-bottom: 23px; }
    .amoy-auth-page .amoy-auth-card input,
    .amoy-auth-page .amoy-auth-card select,
    .amoy-auth-page .amoy-auth-card button { min-height: 47px; }
}

@media (prefers-reduced-motion: reduce) {
    .amoy-auth-page *,
    .amoy-auth-page *::before,
    .amoy-auth-page *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
/* AMOY login layout aligned with public subpages */
body.amoy-login-page {
    display: block;
    min-height: 100vh;
    padding: clamp(18px, 3vw, 42px);
    overflow-y: auto;
}

body.amoy-login-page::before {
    background: linear-gradient(180deg, rgba(0, 5, 11, .12), rgba(0, 7, 15, .28));
}

body.amoy-login-page::after { display: none; }

.amoy-login-shell {
    width: min(1180px, 100%);
    min-height: calc(100vh - clamp(36px, 6vw, 84px));
    margin: 0 auto;
    background: transparent;
}

.amoy-login-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    min-height: 72px;
    padding: 0 clamp(20px, 3.2vw, 42px);
    border-bottom: 1px solid rgba(150, 207, 247, .24);
    background: rgba(3, 13, 23, .52);
}

.amoy-login-brand {
    color: rgba(238, 248, 255, .88);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: .28em;
    text-transform: uppercase;
}

.amoy-login-home {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 38px;
    padding: 0 15px;
    border: 1px solid rgba(142, 207, 250, .4);
    border-radius: 999px;
    color: rgba(234, 246, 255, .92);
    background: rgba(19, 44, 65, .58);
    text-decoration: none;
}

.amoy-login-home:hover,
.amoy-login-home:focus-visible {
    border-color: rgba(196, 234, 255, .9);
    background: rgba(28, 65, 94, .78);
    outline: none;
}

.amoy-login-main {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(340px, .8fr);
    align-items: center;
    gap: clamp(48px, 8vw, 112px);
    min-height: calc(100vh - 156px);
    padding: clamp(58px, 8vw, 104px) clamp(24px, 7vw, 92px);
    background: radial-gradient(ellipse at 45% 10%, rgba(54, 139, 203, .13), transparent 62%);
}

.amoy-login-intro { max-width: 620px; }

.amoy-login-page .amoy-login-intro .amoy-auth-kicker {
    margin-bottom: 20px;
    text-align: start;
}

.amoy-login-intro h1 {
    margin: 0;
    color: #f7fbff;
    font-size: clamp(54px, 7.2vw, 92px);
    font-weight: 300;
    line-height: .98;
    letter-spacing: -.045em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, .65), 0 0 28px rgba(80, 171, 235, .22);
}

.amoy-login-intro h1 span { color: #86ceff; }

.amoy-login-lead {
    max-width: 590px;
    margin: 28px 0 0;
    color: rgba(216, 231, 243, .78);
    font-size: clamp(16px, 1.55vw, 20px);
    font-weight: 300;
    line-height: 1.75;
}

.amoy-login-tagline {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 34px 0 0;
    color: rgba(166, 204, 231, .68);
    font-size: 10px;
    font-style: normal;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.amoy-login-tagline i {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: #86ceff;
    box-shadow: 0 0 8px rgba(134, 206, 255, .7);
}

.amoy-login-page .amoy-auth-card.card,
.amoy-login-page .login-box.card {
    width: 100% !important;
    margin: 0;
    padding: 20px 0 20px clamp(34px, 4vw, 54px) !important;
    overflow: visible;
    border: 0;
    border-left: 1px solid rgba(150, 207, 247, .28);
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.amoy-login-page .amoy-auth-card.card::before { display: none; }

.amoy-login-page .amoy-auth-card .amoy-auth-kicker {
    margin-bottom: 12px;
    text-align: start;
}

.amoy-login-page .amoy-auth-card h2 {
    margin-bottom: 30px;
    font-size: clamp(30px, 3.2vw, 44px);
    font-weight: 300;
    text-align: start;
}

.amoy-login-page .amoy-auth-card input,
.amoy-login-page .amoy-auth-card select {
    min-height: 52px;
    border-color: rgba(145, 205, 244, .32);
    border-radius: 12px;
    background: rgba(5, 20, 33, .72);
}

.amoy-login-page .amoy-auth-card button {
    min-height: 50px;
    border-radius: 999px;
    background: rgba(43, 125, 180, .64);
}

.amoy-login-page .amoy-auth-links {
    justify-content: flex-start;
    margin-top: 17px;
}

.amoy-login-page .amoy-auth-link { padding-left: 0; }

@media (max-width: 820px) {
    body.amoy-login-page { padding: 14px; }
    .amoy-login-shell { min-height: calc(100vh - 28px); }
    .amoy-login-main {
        grid-template-columns: 1fr;
        align-items: start;
        gap: 42px;
        min-height: auto;
        padding: 52px clamp(20px, 7vw, 58px) 58px;
    }
    .amoy-login-intro h1 { font-size: clamp(48px, 13vw, 72px); }
    .amoy-login-lead { max-width: 520px; }
    .amoy-login-page .amoy-auth-card.card,
    .amoy-login-page .login-box.card {
        max-width: 520px;
        padding: 38px 0 0 !important;
        border-top: 1px solid rgba(150, 207, 247, .28);
        border-left: 0;
    }
}

@media (max-width: 520px) {
    body.amoy-login-page { padding: 0; }
    .amoy-login-topbar { min-height: 66px; padding: 0 18px; }
    .amoy-login-main { gap: 34px; padding: 42px 18px 46px; }
    .amoy-login-lead { margin-top: 20px; }
    .amoy-login-tagline { margin-top: 26px; gap: 7px; letter-spacing: .08em; }
    .amoy-login-page .amoy-auth-card.card,
    .amoy-login-page .login-box.card { padding-top: 32px !important; }
}
