/* Shared visual layer for the existing login/register flows. */
html,
body {
    min-height: 100%;
}

body.premium-auth-page {
    background: #f7fbff;
    overflow-x: hidden;
}

/* Shared premium footer. Namespaced separately so it can coexist with the auth header. */
.premium-footer {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    color: #32436a;
    border-top: 1px solid #e7ecf7;
    background: #fff;
    box-shadow: 0 -20px 60px rgba(34, 65, 145, .12);
}

.premium-footer::before {
    position: absolute;
    inset: 0;
    content: '';
    z-index: -2;
    opacity: .45;
    background-image: linear-gradient(rgba(133, 161, 255, .08) 1px, transparent 1px), linear-gradient(90deg, rgba(133, 161, 255, .08) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(90deg, transparent, #000 22%, #000 78%, transparent);
}

.premium-footer::after {
    position: absolute;
    inset: 0;
    z-index: -1;
    content: '';
    background: linear-gradient(90deg, transparent, rgba(78, 111, 255, .06), transparent);
    transform: translateX(-100%);
    animation: premium-footer-scan 8s ease-in-out infinite;
    pointer-events: none;
}

.premium-footer-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1.2fr 1.65fr 1fr;
    align-items: center;
    gap: 42px;
    width: min(1180px, calc(100% - 48px));
    min-height: 104px;
    margin: 0 auto;
    padding: 16px 0 15px;
}

.premium-footer-brand-block,
.premium-footer-links,
.premium-footer-meta { position: relative; z-index: 2; }
.premium-footer-brand { display: inline-flex; align-items: center; gap: 11px; color: #081b45 !important; text-decoration: none; font-size: 20px; font-weight: 800; letter-spacing: -.04em; transition: transform .25s ease; }
.premium-footer-brand:hover { color: #2457ff !important; transform: translateY(-2px); }
.premium-footer-brand img { width: 42px; height: 40px; object-fit: contain; filter: drop-shadow(0 8px 16px rgba(85, 117, 255, .22)); }
.premium-footer-brand-block p { margin: 5px 0 7px; color: #7381a0; font-size: 11px; }
.premium-footer-status { display: inline-flex; align-items: center; gap: 7px; color: #71809d; font-size: 10px; font-weight: 600; }
.premium-footer-status i { width: 7px; height: 7px; border-radius: 50%; background: #4ce0a2; box-shadow: 0 0 0 5px rgba(76, 224, 162, .12), 0 0 15px rgba(76, 224, 162, .85); animation: premium-footer-pulse 2.2s ease-in-out infinite; }
.premium-footer-links { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 20px; }
.premium-footer-links a { display: inline-flex; align-items: center; gap: 7px; color: #647396 !important; font-size: 12px; font-weight: 600; text-decoration: none; transition: color .22s ease, transform .22s ease; }
.premium-footer-links a span { color: #5578ff; font-size: 13px; opacity: .7; transition: transform .22s ease, opacity .22s ease; }
.premium-footer-links a:hover { color: #2457ff !important; transform: translateX(3px); }
.premium-footer-links a:hover span { opacity: 1; transform: translate(2px, -2px); }
.premium-footer-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; color: #71809d; font-size: 10px; text-align: right; }
.premium-footer-meta strong { color: #081b45; font-size: 12px; letter-spacing: .01em; white-space: nowrap; }
.premium-footer-meta small { max-width: 220px; color: #8793a9; font-size: 9px; line-height: 1.5; }
.premium-footer-glow { position: absolute; z-index: 0; width: 260px; height: 160px; border-radius: 50%; filter: blur(48px); opacity: .24; pointer-events: none; }
.premium-footer-glow-left { top: -70px; left: -70px; background: #2f7bff; }
.premium-footer-glow-right { right: -80px; bottom: -80px; background: #a14aff; }

@keyframes premium-footer-scan { 0%, 35% { transform: translateX(-100%); } 70%, 100% { transform: translateX(100%); } }
@keyframes premium-footer-pulse { 0%, 100% { opacity: .65; transform: scale(.85); } 50% { opacity: 1; transform: scale(1.15); } }

@media (max-width: 760px) {
    .premium-footer-inner { grid-template-columns: 1fr; gap: 20px; min-height: 0; padding: 28px 0 24px; }
    .premium-footer-links { max-width: 360px; }
    .premium-footer-meta { align-items: flex-start; text-align: left; }
    .premium-footer-meta strong { white-space: normal; }
    .premium-footer-meta small { max-width: 280px; }
}

@media (prefers-reduced-motion: reduce) {
    .premium-footer::after, .premium-footer-status i { animation: none; }
}

.premium-auth-nav {
    position: absolute;
    z-index: 20;
    top: 0;
    right: 0;
    left: 0;
    border-bottom: 1px solid rgba(230, 235, 245, .82);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 10px 32px rgba(51, 76, 146, .06);
    backdrop-filter: blur(18px);
}

.premium-auth-nav-inner {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 48px));
    min-height: 74px;
    margin: 0 auto;
    gap: 28px;
}

.premium-auth-nav-panel {
    display: contents;
}

.premium-auth-nav,
.premium-auth-nav * {
    font-family: 'Be Vietnam Pro', Arial, sans-serif !important;
}

.premium-auth-nav-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: #081b45 !important;
    font-size: 17px;
    font-weight: 800;
    letter-spacing: -.04em;
    white-space: nowrap;
    text-decoration: none;
}

.premium-auth-nav-brand img {
    width: 40px;
    height: 38px;
    flex: 0 0 40px;
    object-fit: contain;
}

.premium-auth-nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    margin-left: auto;
    color: #647396 !important;
    font-size: 12px;
    font-weight: 600;
}

.premium-auth-nav-links a {
    color: #647396 !important;
    text-decoration: none;
    transition: color .2s ease;
}

.premium-auth-nav-links a:hover,
.premium-auth-nav-links a[aria-current="page"] {
    color: #2457ff !important;
}

.premium-auth-nav-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

.premium-auth-nav-actions a {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 19px;
    border: 1px solid #c9d5f3;
    border-radius: 12px;
    color: #2457ff !important;
    background: #fff;
    font-size: 12px;
    font-weight: 700;
    transition: .2s ease;
    text-decoration: none;
}

.premium-auth-nav-actions a:first-child:hover {
    border-color: #2457ff;
    background: #f6f8ff;
}

.premium-auth-nav-actions a:last-child {
    border-color: transparent;
    color: #fff !important;
    background: linear-gradient(135deg, #1f5eff 0%, #3f5ff0 48%, #7146df 100%);
    background-size: 180% 180%;
    box-shadow: 0 13px 24px rgba(57, 77, 220, .24), inset 0 1px 0 rgba(255,255,255,.24);
}

.premium-auth-nav-actions a:last-child:hover {
    color: #fff !important;
    background-position: 100% 50%;
    box-shadow: 0 17px 30px rgba(57,77,220,.32), inset 0 1px 0 rgba(255,255,255,.3);
    transform: translateY(-2px);
}

.premium-auth-nav-menu {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid #aebeff;
    border-radius: 12px;
    color: #081b45;
    background: #fff;
    cursor: pointer;
    font-size: 18px;
}

.premium-auth-page .custom-login {
    min-height: 100svh;
    background: #f7fbff;
}

.premium-auth-page .custom-login .bg-login {
    z-index: 0;
    inset: 0;
    background: #f7fbff url('/assets/images/auth-premium-background.png') center / cover no-repeat !important;
}

.premium-auth-page .custom-login-inner {
    position: relative;
    z-index: 1;
    max-width: 1440px;
    min-height: 100svh;
    padding: 28px clamp(18px, 5vw, 78px);
}

.premium-auth-copy {
    position: absolute;
    z-index: 2;
    top: 43%;
    left: clamp(0px, 1vw, 14px);
    width: min(46vw, 580px);
    transform: translateY(-58%);
}

.premium-auth-brand {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    color: inherit;
    text-decoration: none;
}

.premium-auth-brand-link,
.premium-auth-brand-name {
    color: inherit;
    cursor: pointer;
    text-decoration: none;
}

.premium-auth-brand-link {
    display: inline-flex;
    line-height: 0;
}

.premium-auth-brand-mark {
    display: inline-block;
    width: 50px;
    height: 50px;
    flex: 0 0 50px;
    object-fit: contain;
}

.premium-auth-brand strong {
    color: #123472;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: -.04em;
}

.premium-auth-copy h1 {
    margin: 0;
    color: #0b173d;
    font-size: clamp(36px, 3.7vw, 56px);
    font-weight: 800;
    line-height: 1.03;
    letter-spacing: -.07em;
}

.premium-auth-copy h1 span {
    color: #2465f5;
}

.premium-auth-copy p {
    max-width: 540px;
    margin: 24px 0 28px;
    color: #687895;
    font-size: 15px;
    line-height: 1.65;
}

.premium-auth-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 28px;
}

.premium-auth-stats > div {
    display: flex;
    align-items: center;
    gap: 11px;
}

.premium-auth-stats > div > i {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, .8);
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(135deg, #2d74f4, #7550e6);
    box-shadow: 0 12px 24px rgba(63, 91, 219, .2);
    font-size: 24px;
}

.premium-auth-stats > div > span {
    display: grid;
    gap: 4px;
}

.premium-auth-stats b {
    color: #172449;
    font-size: 15px;
    font-weight: 800;
}

.premium-auth-stats small {
    color: #7d8ba4;
    font-size: 11px;
}

.premium-auth-page .custom-wrapper {
    max-width: none;
    padding: 0;
}

.premium-auth-page .custom-wrapper .custom-row {
    justify-content: center;
    align-items: center;
    min-height: calc(100svh - 56px);
    padding-left: clamp(170px, 18vw, 260px);
}

.premium-auth-page .custom-wrapper .custom-row > .card,
.premium-auth-page .custom-wrapper .custom-row > .card > .card {
    width: min(100%, 470px);
    margin: 0;
    background: transparent;
}

.premium-auth-page .custom-wrapper .custom-row > .card > .card > .card-body {
    max-width: none;
    margin: 0;
    padding: 34px 38px 28px;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 26px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 28px 80px rgba(39, 74, 164, .18), 0 4px 16px rgba(64, 96, 161, .08);
    backdrop-filter: blur(16px);
}

.premium-auth-page .custom-wrapper .card-body > .text-center img {
    width: 188px !important;
    height: auto;
    margin: 0 auto 15px;
}

.premium-auth-page .custom-wrapper .card-body h4 {
    margin-bottom: 25px !important;
    color: #0d1b46;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -.045em;
}

.premium-auth-page .form-label {
    margin-bottom: 7px;
    color: #28385e;
    font-size: 12px;
    font-weight: 700;
}

.premium-auth-page .form-control {
    min-height: 48px;
    border: 1px solid #d9e2f3;
    border-radius: 12px;
    color: #172449;
    background: rgba(255, 255, 255, .88);
    box-shadow: none;
}

.premium-auth-page .form-control::placeholder {
    color: #98a5bc;
}

.premium-auth-page .form-control:focus {
    border-color: #4770ff;
    box-shadow: 0 0 0 4px rgba(71, 112, 255, .13);
}

.premium-auth-page .form-check-label,
.premium-auth-page .custom-wrapper p {
    color: #7887a1;
    font-size: 11px;
}

.premium-auth-page .custom-wrapper a {
    color: #315bea;
    font-weight: 700;
}

.premium-auth-page .custom-wrapper a.text-primary,
.premium-auth-page .custom-wrapper a.text-primary:hover {
    color: #315bea !important;
}

.premium-auth-page .custom-wrapper p.my-3.text-center.mb-0 {
    color: #5f6f8b;
    font-size: 14px !important;
    line-height: 1.6;
}

.premium-auth-page .custom-wrapper p.my-3.text-center.mb-0 a {
    font-size: 14px !important;
    font-weight: 800;
}

.premium-auth-page .g-recaptcha {
    max-width: 100%;
    margin: 9px auto 2px;
    transform-origin: center;
}

.premium-auth-page .login-do-btn,
.premium-auth-page .login-do-btn:hover,
.premium-auth-page .login-do-btn:focus {
    min-height: 48px;
    border: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg, #2465f5 0%, #4864ed 48%, #7847df 100%);
    box-shadow: 0 14px 24px rgba(65, 88, 222, .24);
}

.premium-auth-page .login-deafult {
    min-height: 46px;
    border-radius: 12px;
    font-weight: 700;
}

.premium-auth-page .login-deafult.btn-danger {
    border: 1px solid #dfe6f3;
    color: #26365b;
    background: #fff;
}

.premium-auth-page #btn-passkey-login {
    border: 1px solid #d9e2f3;
    color: #29385d;
    background: #f7f9fd;
}

.premium-auth-page .loader-wrapper {
    z-index: 10;
    background: rgba(247, 251, 255, .72);
    backdrop-filter: blur(7px);
}

@media (max-width: 991px) {
    .premium-auth-page .custom-login .bg-login {
        background-position: 38% bottom;
    }

    .premium-auth-page .custom-wrapper .custom-row {
        justify-content: center;
    }

    .premium-auth-copy {
        position: relative;
        top: auto;
        left: auto;
        width: min(100%, 600px);
        margin: 12px auto 10px;
        transform: none;
        text-align: center;
    }

    .premium-auth-brand {
        margin-bottom: 20px;
    }

    .premium-auth-page .custom-wrapper .custom-row {
        padding-left: 0;
    }

    .premium-auth-copy h1 {
        font-size: clamp(32px, 7vw, 48px);
    }

    .premium-auth-copy p {
        margin: 15px auto 18px;
        font-size: 13px;
    }

    .premium-auth-stats {
        justify-content: center;
    }

    .premium-auth-page .custom-wrapper .custom-row > .card,
    .premium-auth-page .custom-wrapper .custom-row > .card > .card {
        width: min(100%, 470px);
    }
}

@media (max-width: 720px) {
    .premium-auth-nav-inner {
        width: min(calc(100% - 32px), 600px);
    }

    .premium-auth-nav-menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        flex: 0 0 42px;
    }

    .premium-auth-nav-panel {
        position: absolute;
        z-index: 30;
        top: calc(100% + 6px);
        right: 0;
        display: none;
        width: min(340px, calc(100vw - 32px));
        padding: 10px;
        flex-direction: column;
        gap: 10px;
        border: 1px solid rgba(211, 221, 244, .96);
        border-radius: 18px;
        background: rgba(255, 255, 255, .96);
        box-shadow: 0 22px 55px rgba(36, 62, 135, .18), 0 5px 16px rgba(36, 62, 135, .08);
        backdrop-filter: blur(18px);
        opacity: 0;
        transform: translateY(-8px) scale(.98);
        transform-origin: top right;
        pointer-events: none;
        transition: opacity .22s ease, transform .22s ease;
    }

    .premium-auth-nav.menu-open .premium-auth-nav-panel {
        display: flex;
        opacity: 1;
        transform: translateY(0) scale(1);
        pointer-events: auto;
    }

    .premium-auth-nav-panel .premium-auth-nav-links {
        display: flex;
        width: 100%;
        align-items: stretch;
        flex-direction: column;
        gap: 0;
        margin: 0;
        padding: 3px 0 8px;
        border-bottom: 1px solid #e6ebf5;
    }

    .premium-auth-nav-panel .premium-auth-nav-links a {
        padding: 12px 12px;
        border-radius: 10px;
        color: #4e6189 !important;
        font-size: 13px;
        transition: background .18s ease, color .18s ease, transform .18s ease;
    }

    .premium-auth-nav-panel .premium-auth-nav-links a:hover {
        color: #2457ff !important;
        background: #f1f5ff;
        transform: translateX(2px);
    }

    .premium-auth-nav-panel .premium-auth-nav-actions {
        display: flex;
        width: 100%;
        gap: 8px;
    }

    .premium-auth-nav-panel .premium-auth-nav-actions a {
        flex: 1 1 0;
        min-height: 42px;
        padding-inline: 10px;
    }

    .premium-auth-nav.menu-open .premium-auth-nav-menu {
        color: #2457ff;
        border-color: #aebeff;
        background: #f4f7ff;
    }
}

@media (max-width: 575px) {
    .premium-auth-page .custom-login-inner {
        min-height: 100svh;
        padding: 84px 16px 16px;
    }

    .premium-auth-page .custom-login .bg-login {
        background-position: 28% bottom;
        background-size: auto 100%;
    }

    .premium-auth-page .custom-wrapper .custom-row {
        min-height: 0;
    }

    .premium-auth-page .custom-wrapper {
        flex: none;
        min-height: 0;
    }

    .premium-auth-copy {
        margin-top: 7px;
    }

    .premium-auth-brand strong {
        font-size: 17px;
    }

    .premium-auth-copy h1 {
        font-size: 31px;
    }

    .premium-auth-copy p {
        margin: 12px auto 16px;
        font-size: 12px;
        line-height: 1.5;
    }

    .premium-auth-stats {
        gap: 16px;
    }

    .premium-auth-stats b {
        font-size: 12px;
    }

    .premium-auth-stats > div > i {
        width: 40px;
        height: 40px;
        border-radius: 12px;
        font-size: 19px;
    }

    .premium-auth-stats small {
        font-size: 10px;
    }

    .premium-auth-page .custom-wrapper .custom-row > .card > .card > .card-body {
        padding: 27px 19px 21px;
        border-radius: 22px;
    }

    .premium-auth-page .custom-wrapper .card-body > .text-center img {
        display: none !important;
        margin: 0 !important;
    }

    .premium-auth-page .custom-wrapper .card-body > .text-center {
        margin-bottom: 0;
    }

    .premium-auth-page .custom-wrapper .card-body h4 {
        font-size: 19px;
    }

    .premium-auth-page .g-recaptcha {
        transform: scale(.88);
    }
}
