html,
body {
    min-height: 100%;
}

.web3-auth *,
.web3-auth *:before,
.web3-auth *:after {
    box-sizing: border-box;
}

body.web3-auth {
    margin: 0;
    color: #eef7ff;
    background: #071018;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    overflow-x: hidden;
}

.web3-auth-shell {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    background:
        radial-gradient(circle at 18% 18%, rgba(42, 229, 197, .28), transparent 28%),
        radial-gradient(circle at 82% 10%, rgba(111, 90, 255, .28), transparent 26%),
        linear-gradient(135deg, #071018 0%, #101827 48%, #071018 100%);
    isolation: isolate;
}

.web3-auth-grid {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, .055) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .055) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .9), rgba(0, 0, 0, .18));
    z-index: -2;
}

.web3-auth-shell:before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(115deg, transparent 18%, rgba(38, 231, 203, .12) 19%, transparent 20%),
        linear-gradient(65deg, transparent 68%, rgba(123, 92, 255, .13) 69%, transparent 70%);
    z-index: -1;
}

.web3-theme-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 20;
    min-width: 92px;
    height: 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 0 13px;
    color: #dcecff;
    border: 1px solid rgba(94, 255, 223, .24);
    border-radius: 999px;
    background: rgba(8, 20, 32, .62);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 36px rgba(0, 0, 0, .24);
    backdrop-filter: blur(16px);
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
    outline: none;
}

.web3-theme-toggle:hover,
.web3-theme-toggle:focus {
    color: #fff;
    border-color: rgba(94, 255, 223, .58);
    background: rgba(94, 255, 223, .12);
}

.web3-theme-toggle .fa {
    color: #5effdf;
    font-size: 14px;
}

.web3-auth-layout {
    width: min(1180px, calc(100% - 48px));
    margin: auto;
    display: grid;
    grid-template-columns: minmax(0, 1.12fr) minmax(360px, .88fr);
    gap: 46px;
    align-items: center;
    padding: 56px 0;
}

.web3-auth-hero {
    min-width: 0;
}

.web3-auth-kicker {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 32px;
    padding: 0 13px;
    border: 1px solid rgba(70, 240, 215, .3);
    border-radius: 999px;
    background: rgba(8, 20, 32, .52);
    color: #72ffe7;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.web3-auth-kicker:before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #3ff2d2;
    box-shadow: 0 0 18px rgba(63, 242, 210, .95);
}

.web3-auth-title {
    margin: 26px 0 18px;
    max-width: 640px;
    color: #fff;
    font-size: 58px;
    line-height: 1.02;
    font-weight: 800;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.web3-auth-copy {
    max-width: 570px;
    color: #aebbd0;
    font-size: 17px;
    line-height: 1.72;
}

.web3-auth-metrics {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 620px;
    margin-top: 34px;
}

.web3-auth-metric {
    min-height: 92px;
    padding: 18px;
    border: 1px solid rgba(255, 255, 255, .11);
    border-radius: 8px;
    background: rgba(255, 255, 255, .055);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08);
}

.web3-auth-metric strong {
    display: block;
    color: #f9fcff;
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
}

.web3-auth-metric span {
    display: block;
    margin-top: 11px;
    color: #8fa0b8;
    font-size: 12px;
    line-height: 1.35;
    text-transform: uppercase;
}

.login.web3-auth-card {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    width: 100%;
    max-width: 430px;
    margin: 0 0 0 auto;
    overflow: visible !important;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(13, 25, 39, .9), rgba(7, 16, 26, .82));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .38), 0 0 0 1px rgba(70, 240, 215, .06);
    backdrop-filter: blur(20px);
}

.login.web3-auth-card:before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: 8px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(64, 241, 213, .82), rgba(116, 98, 255, .48), rgba(255, 255, 255, .06));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.web3-auth-card .loginbg {
    display: none;
}

.web3-auth-card .head {
    min-height: 0;
    padding: 32px 34px 20px;
    background: transparent !important;
}

.web3-auth-brand {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.web3-auth-logo img {
    max-width: 190px;
    height: auto !important;
    max-height: 56px;
}

.web3-auth-logo {
    color: #fff;
    font-size: 26px;
    font-weight: 800;
}

.web3-auth-chip {
    flex: 0 0 auto;
    min-height: 30px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: rgba(58, 240, 211, .12);
    border: 1px solid rgba(58, 240, 211, .26);
    color: #7dffea;
    font-size: 11px;
    font-weight: 700;
}

.web3-auth-card .loginbox {
    padding: 0 34px 32px;
    background: transparent !important;
    color: #eef7ff;
}

.web3-auth-card,
.web3-auth-card .head,
.web3-auth-card .loginbox,
.web3-auth-card form {
    background-color: transparent !important;
}

.web3-auth-panel-title {
    margin: 0 0 22px;
}

.web3-auth-panel-title h2 {
    margin: 0;
    color: #fff;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: 0;
}

.web3-auth-panel-title p {
    margin: 8px 0 0;
    color: #8ea0b8;
    font-size: 14px;
}

.web3-field {
    position: relative;
    margin-bottom: 14px;
}

.web3-field .fa {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #59efd6;
    font-size: 15px;
    z-index: 1;
}

.web3-field input {
    width: 100%;
    height: 52px;
    padding: 0 16px 0 44px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    outline: none;
    background: rgba(255, 255, 255, .07);
    color: #f5fbff;
    font-size: 14px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05);
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.web3-password-field input {
    padding-right: 50px;
}

.web3-password-toggle {
    position: absolute;
    top: 50%;
    right: 10px;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: 0;
    border-radius: 6px;
    color: #91a3ba;
    background: transparent;
    transform: translateY(-50%);
    outline: none;
    z-index: 2;
}

.web3-password-toggle .fa {
    position: static;
    transform: none;
    color: inherit;
    font-size: 15px;
}

.web3-password-toggle:hover,
.web3-password-toggle:focus,
.web3-password-toggle.is-visible {
    color: #72ffe7;
    background: rgba(94, 255, 223, .1);
}

.web3-field input::placeholder {
    color: #7d8da5;
}

.web3-field input:focus {
    border-color: rgba(71, 241, 215, .78);
    background: rgba(255, 255, 255, .095);
    box-shadow: 0 0 0 3px rgba(71, 241, 215, .12), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.web3-verify-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.web3-verify-row .web3-field {
    flex: 1 1 auto;
    margin-bottom: 0;
}

.web3-verify-row img {
    flex: 0 0 auto;
    width: 96px !important;
    height: 36px !important;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, .14) !important;
    background: rgba(255, 255, 255, .08);
}

.verify {
    display: none;
}

.web3-auth-links {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 16px 0 20px;
    color: #91a3ba;
    font-size: 13px;
}

.web3-auth-links a {
    color: #75ffe8;
    text-decoration: none;
}

.web3-auth-links a:hover {
    color: #fff;
}

.web3-submit {
    width: 100%;
    height: 52px;
    border: 0;
    border-radius: 8px;
    color: #041118;
    font-size: 15px;
    font-weight: 800;
    background: linear-gradient(135deg, #5effdf, #8ea2ff);
    box-shadow: 0 16px 38px rgba(64, 241, 213, .28);
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
    white-space: normal;
}

.web3-submit:hover,
.web3-submit:focus {
    transform: translateY(-1px);
    box-shadow: 0 20px 46px rgba(64, 241, 213, .35);
    filter: saturate(1.08);
}

.web3-submit:disabled {
    cursor: wait;
    opacity: .72;
    transform: none;
}

.web3-error {
    min-height: 22px;
    margin-top: 14px;
    color: #ff8f9a !important;
    font-size: 13px;
}

.web3-language {
    display: flex;
    justify-content: flex-end;
    margin-top: 12px;
}

.web3-language .flagstrap,
.web3-language .btn-group {
    width: 100%;
}

.web3-language .btn,
.web3-language .btn-default,
.web3-language .dropdown-toggle {
    width: 100%;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 14px;
    color: #dcecff !important;
    border: 1px solid rgba(94, 255, 223, .22) !important;
    border-radius: 8px !important;
    background: rgba(255, 255, 255, .065) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06);
    text-shadow: none;
}

.web3-language .btn:hover,
.web3-language .btn:focus,
.web3-language .btn-group.open .dropdown-toggle {
    color: #fff !important;
    border-color: rgba(94, 255, 223, .62) !important;
    background: rgba(94, 255, 223, .1) !important;
    box-shadow: 0 0 0 3px rgba(94, 255, 223, .1), inset 0 1px 0 rgba(255, 255, 255, .08);
}

.web3-language .caret {
    margin-left: 10px;
    border-top-color: #5effdf;
}

.web3-language .dropdown-menu {
    width: 100%;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(94, 255, 223, .22);
    border-radius: 8px;
    background: rgba(9, 20, 33, .98);
    box-shadow: 0 18px 50px rgba(0, 0, 0, .42);
}

.web3-language .dropdown-menu > li > a {
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    color: #cbd9eb;
    border-radius: 6px;
}

.web3-language .dropdown-menu > li > a:hover,
.web3-language .dropdown-menu > li > a:focus {
    color: #fff;
    background: rgba(94, 255, 223, .12);
}

.web3-language .flagstrap-icon {
    flex: 0 0 auto;
}

.web3-auth-card .hr15,
.web3-auth-card .other,
.web3-auth-card .fr {
    float: none;
}

body.web3-auth .alert-modal {
    background: rgba(1, 8, 15, .72);
    opacity: 1;
    filter: none;
    backdrop-filter: blur(10px);
}

body.web3-auth .alert-container {
    overflow: hidden;
    border: 1px solid rgba(94, 255, 223, .28);
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(13, 25, 39, .96), rgba(6, 16, 27, .94));
    box-shadow: 0 28px 80px rgba(0, 0, 0, .48), 0 0 0 1px rgba(94, 255, 223, .08);
    backdrop-filter: blur(20px);
}

body.web3-auth .alert-title,
body.web3-auth .alert-btn-box {
    color: #eff8ff;
    background: rgba(7, 18, 30, .94);
    border-color: rgba(255, 255, 255, .1);
}

body.web3-auth .alert-content {
    color: #dcecff;
    background: transparent;
}

body.web3-auth .alert-btn-p {
    color: #061019;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #5effdf, #8ea2ff);
    font-weight: 800;
}

body.web3-auth .alert-btn-p:hover {
    color: #041118;
    background: linear-gradient(135deg, #85ffe9, #a7b5ff);
}

.web3-auth-alert .alert-content {
    padding: 24px 24px 72px;
}

.web3-auth-alert-body {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.web3-auth-alert-icon {
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(94, 255, 223, .36);
    border-radius: 50%;
    color: #72ffe7;
    background: rgba(94, 255, 223, .12);
    font-weight: 900;
    box-shadow: 0 0 24px rgba(94, 255, 223, .2);
}

.web3-auth-alert-body p {
    margin: 4px 0 0;
    color: #e8f4ff;
    font-size: 14px;
    line-height: 1.7;
}

.web3-auth-alert-form .alert-content {
    padding-bottom: 82px;
}

.web3-auth-alert-form label {
    color: #eef7ff;
    font-weight: 700;
}

.web3-auth-alert-form .form-control {
    height: 44px;
    color: #f5fbff;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 8px;
    background: rgba(255, 255, 255, .07);
}

.web3-auth-alert-form .form-control:focus {
    border-color: rgba(71, 241, 215, .78);
    box-shadow: 0 0 0 3px rgba(71, 241, 215, .12);
}

body.web3-auth.theme-light {
    color: #132235;
    background: #f5f8fb;
}

.theme-light .web3-auth-shell {
    background:
        radial-gradient(circle at 16% 16%, rgba(37, 217, 190, .24), transparent 27%),
        radial-gradient(circle at 84% 10%, rgba(110, 122, 255, .18), transparent 25%),
        linear-gradient(135deg, #f7fbff 0%, #eef4f8 48%, #f8fbff 100%);
}

.theme-light .web3-auth-grid {
    background-image:
        linear-gradient(rgba(25, 52, 78, .08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(25, 52, 78, .08) 1px, transparent 1px);
}

.theme-light .web3-auth-shell:before {
    background:
        linear-gradient(115deg, transparent 18%, rgba(38, 201, 183, .13) 19%, transparent 20%),
        linear-gradient(65deg, transparent 68%, rgba(123, 124, 255, .12) 69%, transparent 70%);
}

.theme-light .web3-theme-toggle {
    color: #203247;
    border-color: rgba(31, 158, 146, .24);
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .92), 0 14px 36px rgba(42, 75, 108, .14);
}

.theme-light .web3-theme-toggle:hover,
.theme-light .web3-theme-toggle:focus {
    color: #0b1726;
    border-color: rgba(31, 158, 146, .46);
    background: rgba(255, 255, 255, .92);
}

.theme-light .web3-auth-kicker {
    color: #08766b;
    border-color: rgba(18, 170, 152, .26);
    background: rgba(255, 255, 255, .64);
}

.theme-light .web3-auth-title,
.theme-light .web3-auth-panel-title h2,
.theme-light .web3-auth-logo {
    color: #102034;
}

.theme-light .web3-auth-copy,
.theme-light .web3-auth-panel-title p,
.theme-light .web3-auth-metric span {
    color: #5d6f84;
}

.theme-light .web3-auth-metric {
    border-color: rgba(28, 58, 88, .12);
    background: rgba(255, 255, 255, .58);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .86), 0 14px 34px rgba(42, 75, 108, .08);
}

.theme-light .web3-auth-metric strong {
    color: #12253b;
}

.theme-light .login.web3-auth-card {
    border-color: rgba(28, 58, 88, .12);
    background: linear-gradient(180deg, rgba(255, 255, 255, .86), rgba(245, 250, 255, .74));
    box-shadow: 0 28px 80px rgba(42, 75, 108, .16), 0 0 0 1px rgba(255, 255, 255, .72);
}

.theme-light .login.web3-auth-card:before {
    background: linear-gradient(135deg, rgba(30, 190, 172, .52), rgba(111, 122, 255, .28), rgba(255, 255, 255, .72));
}

.theme-light .web3-auth-card .loginbox {
    color: #15263a;
}

.theme-light .web3-auth-chip {
    color: #08766b;
    border-color: rgba(18, 170, 152, .22);
    background: rgba(18, 170, 152, .1);
}

.theme-light .web3-field .fa {
    color: #0aa895;
}

.theme-light .web3-field input {
    color: #14263b;
    border-color: rgba(28, 58, 88, .14);
    background: rgba(255, 255, 255, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94);
}

.theme-light .web3-password-toggle {
    color: #65768a;
}

.theme-light .web3-password-toggle:hover,
.theme-light .web3-password-toggle:focus,
.theme-light .web3-password-toggle.is-visible {
    color: #08766b;
    background: rgba(31, 158, 146, .1);
}

.theme-light .web3-field input::placeholder {
    color: #8090a3;
}

.theme-light .web3-field input:focus {
    border-color: rgba(13, 172, 153, .7);
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 0 0 3px rgba(13, 172, 153, .13), inset 0 1px 0 rgba(255, 255, 255, .98);
}

.theme-light .web3-verify-row img {
    border-color: rgba(28, 58, 88, .14) !important;
    background: rgba(255, 255, 255, .72);
}

.theme-light .web3-auth-links,
.theme-light .web3-error {
    color: #65768a !important;
}

.theme-light .web3-auth-links a {
    color: #087f74;
}

.theme-light .web3-auth-links a:hover {
    color: #102034;
}

.theme-light .web3-language .btn,
.theme-light .web3-language .btn-default,
.theme-light .web3-language .dropdown-toggle {
    color: #203247 !important;
    border-color: rgba(31, 158, 146, .2) !important;
    background: rgba(255, 255, 255, .72) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .94);
}

.theme-light .web3-language .btn:hover,
.theme-light .web3-language .btn:focus,
.theme-light .web3-language .btn-group.open .dropdown-toggle {
    color: #102034 !important;
    border-color: rgba(31, 158, 146, .48) !important;
    background: rgba(255, 255, 255, .94) !important;
    box-shadow: 0 0 0 3px rgba(31, 158, 146, .12), inset 0 1px 0 rgba(255, 255, 255, .98);
}

.theme-light .web3-language .dropdown-menu {
    border-color: rgba(31, 158, 146, .18);
    background: rgba(255, 255, 255, .98);
    box-shadow: 0 18px 50px rgba(42, 75, 108, .2);
}

.theme-light .web3-language .dropdown-menu > li > a {
    color: #33465d;
}

.theme-light .web3-language .dropdown-menu > li > a:hover,
.theme-light .web3-language .dropdown-menu > li > a:focus {
    color: #102034;
    background: rgba(31, 158, 146, .1);
}

body.web3-auth.theme-light .alert-modal {
    background: rgba(218, 229, 239, .66);
}

body.web3-auth.theme-light .alert-container {
    border-color: rgba(31, 158, 146, .22);
    background: linear-gradient(180deg, rgba(255, 255, 255, .97), rgba(243, 248, 252, .94));
    box-shadow: 0 28px 80px rgba(42, 75, 108, .22), 0 0 0 1px rgba(255, 255, 255, .72);
}

body.web3-auth.theme-light .alert-title,
body.web3-auth.theme-light .alert-btn-box {
    color: #102034;
    background: rgba(247, 251, 255, .96);
    border-color: rgba(28, 58, 88, .1);
}

body.web3-auth.theme-light .alert-content,
body.web3-auth.theme-light .web3-auth-alert-body p,
body.web3-auth.theme-light .web3-auth-alert-form label {
    color: #203247;
}

body.web3-auth.theme-light .web3-auth-alert-icon {
    color: #08766b;
    border-color: rgba(18, 170, 152, .25);
    background: rgba(18, 170, 152, .1);
    box-shadow: 0 0 24px rgba(18, 170, 152, .12);
}

body.web3-auth.theme-light .web3-auth-alert-form .form-control {
    color: #14263b;
    border-color: rgba(28, 58, 88, .14);
    background: rgba(255, 255, 255, .78);
}

@media (max-width: 900px) {
    .web3-auth-layout {
        grid-template-columns: 1fr;
        width: min(560px, calc(100% - 32px));
        gap: 30px;
        padding: 32px 0;
    }

    .web3-auth-title {
        font-size: 38px;
        line-height: 1.08;
    }

    .web3-auth-metrics {
        grid-template-columns: 1fr;
    }

    .login.web3-auth-card {
        margin: 0;
        max-width: none;
    }
}

@media (max-width: 520px) {
    .web3-auth-hero {
        display: none;
    }

    .web3-auth-layout {
        width: calc(100% - 24px);
        padding: 18px 0;
    }

    .login.web3-auth-card {
        width: 100%;
    }

    .web3-auth-card .head,
    .web3-auth-card .loginbox {
        padding-left: 22px;
        padding-right: 22px;
    }

    .web3-auth-brand {
        gap: 12px;
    }

    .web3-auth-logo img {
        max-width: 150px;
    }

    .web3-verify-row {
        align-items: stretch;
        flex-direction: column;
    }

    .web3-verify-row img {
        width: 100% !important;
        max-width: 140px;
        height: 40px !important;
    }

    .web3-auth-links {
        align-items: flex-start;
        flex-direction: column;
    }
}


/* Login v1.0.1: keep theme switch and language selector together at the top-right. */
.web3-auth-actions {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 30;
    display: inline-flex;
    align-items: flex-start;
    justify-content: flex-end;
    gap: 12px;
}

.web3-auth-actions .web3-theme-toggle {
    position: static !important;
    top: auto !important;
    right: auto !important;
    flex: 0 0 auto;
}

.web3-auth-actions .web3-language {
    width: 178px;
    margin-top: 0 !important;
    flex: 0 0 178px;
}

.web3-auth-actions .web3-language .btn,
.web3-auth-actions .web3-language .btn-default,
.web3-auth-actions .web3-language .dropdown-toggle {
    height: 38px;
    min-height: 38px;
    border-radius: 999px;
}

.web3-auth-actions .web3-language .dropdown-menu {
    right: 0;
    left: auto;
    min-width: 190px;
    border-radius: 16px;
}

@media (max-width: 640px) {
    .web3-auth-actions {
        top: 14px;
        right: 14px;
        gap: 8px;
    }

    .web3-auth-actions .web3-theme-toggle {
        min-width: 78px;
        height: 36px;
        padding: 0 10px;
    }

    .web3-auth-actions .web3-language {
        width: 46px;
        flex-basis: 46px;
    }

    .web3-auth-actions .web3-language .btn,
    .web3-auth-actions .web3-language .btn-default,
    .web3-auth-actions .web3-language .dropdown-toggle {
        width: 46px;
        min-width: 46px;
        height: 36px;
        justify-content: center;
        padding: 0 !important;
    }

    .web3-auth-actions .web3-language .btn .caret,
    .web3-auth-actions .web3-language .dropdown-toggle .caret,
    .web3-auth-actions .web3-language .btn span:not(.flagstrap-icon) {
        display: none !important;
    }

    .web3-auth-actions .web3-language .dropdown-menu {
        min-width: 190px;
    }
}

@media (max-width: 420px) {
    .web3-auth-actions .web3-theme-toggle span {
        display: none;
    }

    .web3-auth-actions .web3-theme-toggle {
        min-width: 38px;
        width: 38px;
        padding: 0;
    }
}

/* Login v1.1.2: keep the selected language flag visible on H5.
   flagStrap renders the flag inside the text span, so hiding that span also
   hides the icon. Collapse the text instead of hiding the wrapper. */
@media (max-width: 640px) {
    .web3-auth-actions .web3-language .btn.dropdown-toggle > span[class^="flagstrap-selected-"],
    .web3-auth-actions .web3-language .btn.dropdown-toggle > span[class*=" flagstrap-selected-"] {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        width: 18px;
        height: 14px;
        min-width: 18px;
        overflow: visible;
        font-size: 0;
        line-height: 0;
    }

    .web3-auth-actions .web3-language .btn.dropdown-toggle > span[class^="flagstrap-selected-"] .flagstrap-icon,
    .web3-auth-actions .web3-language .btn.dropdown-toggle > span[class*=" flagstrap-selected-"] .flagstrap-icon,
    .web3-auth-actions .web3-language .btn.dropdown-toggle > .flagstrap-icon {
        display: inline-block !important;
        width: 16px !important;
        height: 11px !important;
        min-width: 16px;
        margin: 0 !important;
        flex: 0 0 16px;
        background-image: url("../hplus/plugins/flagstrap/css/flags.png") !important;
        background-repeat: no-repeat !important;
    }
}

/* Login v1.1.0: institutional fintech SaaS visual system. */
:root {
    --fintech-cyan: #7ee7d8;
    --fintech-cyan-strong: #4dd7c7;
    --fintech-blue: #8fb3ff;
    --fintech-navy: #071321;
    --fintech-ink: #142033;
    --fintech-muted: rgba(226, 235, 246, .68);
    --fintech-card-light: rgba(255, 255, 255, .62);
    --fintech-border-light: rgba(255, 255, 255, .34);
    --fintech-shadow-light: 0 10px 40px rgba(8, 31, 56, .06), 0 24px 90px rgba(24, 57, 92, .10);
}

body.web3-auth {
    min-height: 100vh;
    color: #eef4fb;
    background: #071321 !important;
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: geometricPrecision;
}

.web3-auth-shell {
    min-height: 100vh;
    align-items: center;
    overflow: hidden;
    background:
        radial-gradient(circle at 18% 24%, rgba(126, 231, 216, .14), transparent 30%),
        radial-gradient(circle at 78% 18%, rgba(143, 179, 255, .12), transparent 28%),
        radial-gradient(circle at 64% 82%, rgba(255, 255, 255, .045), transparent 32%),
        linear-gradient(135deg, #071321 0%, #0d1a2a 50%, #07111d 100%) !important;
}

.web3-auth-shell:before {
    content: "";
    position: absolute;
    inset: -18% -14%;
    z-index: 0;
    pointer-events: none;
    background:
        radial-gradient(circle at 22% 30%, rgba(126,231,216,.18), transparent 26%),
        radial-gradient(circle at 74% 28%, rgba(143,179,255,.14), transparent 24%),
        radial-gradient(circle at 58% 72%, rgba(255,255,255,.055), transparent 26%);
    filter: blur(36px);
    opacity: .72;
    animation: fintechGlowDrift 22s ease-in-out infinite alternate;
}

.web3-auth-shell:after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 900' fill='none'%3E%3Cg opacity='.72'%3E%3Cpath d='M72 612 C184 542 266 578 366 496 S550 342 690 414 878 566 1020 452 1184 296 1364 354' stroke='%237EE7D8' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M88 698 C248 650 350 690 508 594 S746 450 918 520 1154 650 1372 528' stroke='%238FB3FF' stroke-width='1.7' stroke-linecap='round'/%3E%3Cpath d='M126 438 C246 418 318 470 430 414 S606 278 760 328 996 460 1144 374 1266 282 1386 314' stroke='%23FFFFFF' stroke-width='1.1' stroke-linecap='round'/%3E%3C/g%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    opacity: .055;
    animation: fintechMarketDrift 34s ease-in-out infinite alternate;
}

.web3-auth-grid {
    z-index: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px) !important;
    background-size: 56px 56px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.75), rgba(0,0,0,.18) 72%, transparent) !important;
    opacity: .85;
}

.web3-auth-layout {
    position: relative;
    z-index: 2;
    width: min(1240px, calc(100% - 72px));
    min-height: min(760px, calc(100vh - 96px));
    grid-template-columns: minmax(0, 1.1fr) minmax(390px, .9fr) !important;
    gap: clamp(44px, 6vw, 82px);
    padding: clamp(54px, 7vh, 84px) 0;
}

.web3-auth-actions {
    z-index: 10;
}

.web3-auth-hero {
    position: relative;
    min-height: 560px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-right: clamp(12px, 2vw, 28px);
}

.web3-auth-hero:before {
    content: "";
    position: absolute;
    left: -9%;
    top: 4%;
    width: min(680px, 110%);
    height: 460px;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 720 460' fill='none'%3E%3Cpath d='M28 312 C94 266 148 282 208 230 S322 138 408 184 520 288 674 142' stroke='%237EE7D8' stroke-width='2.2' stroke-linecap='round'/%3E%3Cpath d='M38 360 C122 326 194 342 272 286 S416 196 514 246 604 320 690 276' stroke='%238FB3FF' stroke-width='1.4' stroke-linecap='round'/%3E%3Cpath d='M50 174 C138 164 186 204 262 172 S388 92 480 126 602 198 686 158' stroke='%23FFFFFF' stroke-width='1' stroke-linecap='round'/%3E%3Ccircle cx='408' cy='184' r='4' fill='%237EE7D8'/%3E%3Ccircle cx='520' cy='288' r='3.4' fill='%237EE7D8'/%3E%3Ccircle cx='674' cy='142' r='4' fill='%238FB3FF'/%3E%3C/svg%3E");
    background-size: contain;
    background-repeat: no-repeat;
    opacity: .07;
    animation: fintechPulse 18s ease-in-out infinite alternate;
}

.web3-auth-kicker {
    width: fit-content;
    min-height: 34px;
    padding: 0 14px;
    color: rgba(210, 244, 240, .92);
    border-color: rgba(126, 231, 216, .20);
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06);
    letter-spacing: .12em;
}

.web3-auth-kicker:before {
    width: 7px;
    height: 7px;
    background: var(--fintech-cyan);
    box-shadow: 0 0 0 4px rgba(126,231,216,.08);
}

.web3-auth-trust-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    max-width: 640px;
    margin-top: 18px;
}

.web3-auth-trust-tags span {
    min-height: 30px;
    display: inline-flex;
    align-items: center;
    padding: 0 12px;
    color: rgba(226, 235, 246, .72);
    border: 1px solid rgba(255, 255, 255, .09);
    border-radius: 999px;
    background: rgba(255, 255, 255, .035);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .015em;
    backdrop-filter: blur(10px);
}

.web3-auth-title {
    max-width: 680px;
    margin: 30px 0 20px;
    font-size: clamp(44px, 5vw, 68px);
    line-height: .98;
    letter-spacing: -.03em;
    font-weight: 800;
}

.web3-auth-copy {
    max-width: 610px;
    color: rgba(226, 235, 246, .68);
    font-size: 16px;
    line-height: 1.78;
}

.web3-auth-metrics {
    max-width: 640px;
    gap: 12px;
    margin-top: 38px;
}

.web3-auth-metric {
    min-height: 104px;
    padding: 18px 18px 17px;
    border-color: rgba(255, 255, 255, .085);
    border-radius: 18px;
    background: rgba(255, 255, 255, .045);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.055), 0 18px 44px rgba(0,0,0,.10);
    backdrop-filter: blur(12px);
}

.web3-auth-metric strong {
    font-size: 23px;
    letter-spacing: -.015em;
}

.web3-auth-metric span {
    color: rgba(226, 235, 246, .58);
    letter-spacing: .055em;
}

.login.web3-auth-card {
    max-width: 460px;
    margin-left: auto;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, .16);
    background: rgba(12, 24, 38, .62) !important;
    box-shadow: 0 10px 40px rgba(0,0,0,.20), 0 34px 90px rgba(0,0,0,.22);
    backdrop-filter: blur(16px) saturate(1.08);
    transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.login.web3-auth-card:hover {
    transform: translateY(-2px);
    border-color: rgba(126, 231, 216, .22);
    box-shadow: 0 14px 46px rgba(0,0,0,.22), 0 40px 104px rgba(0,0,0,.24);
}

.login.web3-auth-card:before {
    display: none !important;
}

.web3-auth-card .head {
    padding: 34px 36px 18px;
}

.web3-auth-card .loginbox {
    padding: 0 36px 34px;
}

.web3-auth-logo img {
    max-width: 178px;
    max-height: 52px;
}

.web3-auth-chip {
    min-height: 28px;
    padding: 0 11px;
    color: rgba(213, 246, 241, .9);
    border-color: rgba(126, 231, 216, .22);
    background: rgba(126, 231, 216, .075);
    font-size: 10px;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.web3-auth-panel-title {
    margin-bottom: 24px;
}

.web3-auth-panel-title h2 {
    font-size: 30px;
    letter-spacing: -.03em;
}

.web3-auth-panel-title p {
    margin-top: 9px;
    color: rgba(226, 235, 246, .60);
    line-height: 1.65;
}

.web3-field {
    margin-bottom: 15px;
}

.web3-field .fa {
    left: 17px;
    color: rgba(126, 231, 216, .82);
    font-size: 14px;
    font-weight: 400;
    opacity: .82;
}

.web3-field input {
    height: 54px;
    padding-left: 46px;
    border-color: rgba(255,255,255,.13);
    border-radius: 14px;
    background: rgba(255,255,255,.065);
    color: #f7fbff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.045);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease, transform .2s ease;
}

.web3-field input:hover {
    border-color: rgba(255,255,255,.20);
    background: rgba(255,255,255,.08);
}

.web3-field input:focus {
    border-color: var(--fintech-cyan) !important;
    background: rgba(255,255,255,.09);
    box-shadow: 0 0 0 4px rgba(126,231,216,.12), inset 0 1px 0 rgba(255,255,255,.08) !important;
}

.web3-field input::placeholder {
    color: rgba(204, 216, 230, .54);
}

.web3-password-toggle {
    right: 11px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    transition: color .2s ease, background .2s ease, transform .2s ease;
}

.web3-password-toggle:hover,
.web3-password-toggle:focus,
.web3-password-toggle.is-visible {
    color: var(--fintech-cyan);
    background: rgba(126, 231, 216, .10);
    transform: translateY(-50%) scale(1.03);
}

.web3-auth-links {
    margin: 17px 0 22px;
    color: rgba(226,235,246,.58);
}

.web3-auth-links a {
    color: rgba(126, 231, 216, .92);
    transition: color .2s ease, opacity .2s ease;
}

.web3-auth-links a:hover {
    color: #ffffff;
}

.web3-submit {
    height: 54px;
    border-radius: 14px;
    color: #061625 !important;
    background: linear-gradient(135deg, #7ee7d8 0%, #8fb3ff 100%);
    background-size: 160% 160%;
    box-shadow: 0 14px 32px rgba(79, 181, 201, .20), inset 0 1px 0 rgba(255,255,255,.42);
    font-weight: 800;
    letter-spacing: .01em;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease, background-position .28s ease, opacity .18s ease;
}

.web3-submit:hover,
.web3-submit:focus {
    transform: translateY(-1px);
    background-position: 100% 50%;
    box-shadow: 0 18px 38px rgba(79, 181, 201, .26), inset 0 1px 0 rgba(255,255,255,.48);
    filter: none;
}

.web3-submit:active {
    transform: scale(.98);
}

.web3-submit:disabled,
.web3-submit.is-loading {
    cursor: wait;
    opacity: .74;
    transform: none !important;
    box-shadow: 0 10px 26px rgba(79, 181, 201, .16), inset 0 1px 0 rgba(255,255,255,.32);
}

.web3-submit.is-loading {
    animation: fintechButtonFlow 1.6s ease-in-out infinite;
}

.web3-verify-row img {
    height: 40px !important;
    border-radius: 11px;
}

.web3-language .btn,
.web3-language .btn-default,
.web3-language .dropdown-toggle,
.web3-theme-toggle {
    border-radius: 999px !important;
    backdrop-filter: blur(14px);
    transition: border-color .2s ease, background .2s ease, box-shadow .2s ease, transform .2s ease;
}

.web3-language .btn:hover,
.web3-language .btn:focus,
.web3-language .btn-group.open .dropdown-toggle,
.web3-theme-toggle:hover,
.web3-theme-toggle:focus {
    transform: translateY(-1px);
}

.web3-language .dropdown-menu {
    border-radius: 18px;
}

.theme-light.web3-auth {
    color: var(--fintech-ink);
    background: #f7fbff !important;
}

.theme-light .web3-auth-shell {
    background:
        radial-gradient(circle at 18% 24%, rgba(126, 231, 216, .18), transparent 30%),
        radial-gradient(circle at 78% 18%, rgba(143, 179, 255, .16), transparent 28%),
        radial-gradient(circle at 64% 82%, rgba(255, 255, 255, .72), transparent 32%),
        linear-gradient(135deg, #f8fcff 0%, #eef5fb 54%, #fbfdff 100%) !important;
}

.theme-light .web3-auth-shell:before {
    opacity: .58;
    filter: blur(42px);
}

.theme-light .web3-auth-shell:after {
    opacity: .05;
    filter: none;
}

.theme-light .web3-auth-grid {
    background-image:
        linear-gradient(rgba(21, 50, 78, .04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(21, 50, 78, .04) 1px, transparent 1px) !important;
}

.theme-light .web3-auth-kicker,
.theme-light .web3-auth-trust-tags span {
    color: rgba(20, 38, 59, .68);
    border-color: rgba(18, 118, 135, .12);
    background: rgba(255,255,255,.48);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

.theme-light .web3-auth-title,
.theme-light .web3-auth-panel-title h2,
.theme-light .web3-auth-logo {
    color: #102033;
}

.theme-light .web3-auth-copy,
.theme-light .web3-auth-panel-title p {
    color: rgba(20, 30, 50, .68);
}

.theme-light .web3-auth-metric {
    border-color: rgba(20, 45, 72, .10);
    background: rgba(255,255,255,.46);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.82), 0 16px 40px rgba(43, 78, 112, .07);
}

.theme-light .web3-auth-metric strong {
    color: #102033;
}

.theme-light .web3-auth-metric span {
    color: rgba(20, 30, 50, .52);
}

.theme-light .login.web3-auth-card {
    border: 1px solid rgba(255,255,255,.34);
    background: var(--fintech-card-light) !important;
    box-shadow: var(--fintech-shadow-light);
    backdrop-filter: blur(16px) saturate(1.08);
}

.theme-light .login.web3-auth-card:hover {
    border-color: rgba(126, 231, 216, .34);
    box-shadow: 0 14px 48px rgba(8, 31, 56, .08), 0 28px 100px rgba(24, 57, 92, .12);
}

.theme-light .web3-auth-card .loginbox {
    color: #15263a;
}

.theme-light .web3-auth-chip {
    color: #0a766d;
    border-color: rgba(14, 136, 126, .18);
    background: rgba(126, 231, 216, .12);
}

.theme-light .web3-field .fa {
    color: rgba(12, 128, 118, .78);
}

.theme-light .web3-field input {
    color: #14263b;
    border-color: rgba(23, 50, 78, .12);
    background: rgba(255,255,255,.68);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.92);
}

.theme-light .web3-field input:hover {
    border-color: rgba(23, 50, 78, .18);
    background: rgba(255,255,255,.82);
}

.theme-light .web3-field input:focus {
    border-color: var(--fintech-cyan) !important;
    background: rgba(255,255,255,.94);
    box-shadow: 0 0 0 4px rgba(126,231,216,.12), inset 0 1px 0 rgba(255,255,255,.98) !important;
}

.theme-light .web3-field input::placeholder {
    color: rgba(84, 102, 123, .62);
}

.theme-light .web3-password-toggle {
    color: rgba(70, 86, 106, .76);
}

.theme-light .web3-password-toggle:hover,
.theme-light .web3-password-toggle:focus,
.theme-light .web3-password-toggle.is-visible {
    color: #0a766d;
    background: rgba(126, 231, 216, .13);
}

.theme-light .web3-auth-links {
    color: rgba(20, 30, 50, .58);
}

.theme-light .web3-auth-links a {
    color: #087f74;
}

.theme-light .web3-auth-links a:hover {
    color: #102033;
}

.theme-light .web3-submit {
    color: #061625 !important;
    box-shadow: 0 14px 32px rgba(34, 143, 168, .16), inset 0 1px 0 rgba(255,255,255,.52);
}

@keyframes fintechGlowDrift {
    from { transform: translate3d(-1.5%, -1%, 0) scale(1); }
    to { transform: translate3d(1.5%, 1%, 0) scale(1.035); }
}

@keyframes fintechMarketDrift {
    from { transform: translate3d(-1%, 0, 0) scale(1.01); }
    to { transform: translate3d(1%, -1%, 0) scale(1.035); }
}

@keyframes fintechPulse {
    from { opacity: .045; transform: translate3d(0, 0, 0); }
    to { opacity: .08; transform: translate3d(10px, -6px, 0); }
}

@keyframes fintechButtonFlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

@media (max-width: 980px) {
    .web3-auth-layout {
        grid-template-columns: 1fr !important;
        width: min(620px, calc(100% - 36px));
        min-height: auto;
        gap: 28px;
        padding: 92px 0 34px;
    }

    .web3-auth-hero {
        min-height: auto;
        padding-right: 0;
    }

    .web3-auth-title {
        font-size: clamp(36px, 8vw, 48px);
    }

    .web3-auth-metrics {
        grid-template-columns: repeat(3, 1fr);
    }

    .login.web3-auth-card {
        max-width: none;
        margin: 0;
    }
}

@media (max-width: 640px) {
    .web3-auth-shell {
        background:
            radial-gradient(circle at 20% 12%, rgba(126,231,216,.12), transparent 34%),
            linear-gradient(135deg, #071321 0%, #0d1a2a 100%) !important;
    }

    .theme-light .web3-auth-shell {
        background:
            radial-gradient(circle at 20% 12%, rgba(126,231,216,.16), transparent 34%),
            linear-gradient(135deg, #f8fcff 0%, #eef5fb 100%) !important;
    }

    .web3-auth-shell:before,
    .web3-auth-shell:after {
        animation: none;
        opacity: .035;
    }

    .web3-auth-grid {
        opacity: .45;
    }

    .web3-auth-layout {
        width: calc(100% - 24px);
        padding-top: 82px;
    }

    .web3-auth-hero {
        display: block;
    }

    .web3-auth-copy,
    .web3-auth-metrics,
    .web3-auth-trust-tags,
    .web3-auth-hero:before {
        display: none !important;
    }

    .web3-auth-kicker {
        min-height: 28px;
        font-size: 10px;
    }

    .web3-auth-title {
        margin: 16px 0 0;
        font-size: 31px;
        line-height: 1.08;
    }

    .login.web3-auth-card {
        border-radius: 22px;
        backdrop-filter: none;
    }

    .theme-light .login.web3-auth-card {
        background: rgba(255,255,255,.84) !important;
        backdrop-filter: none;
    }

    .web3-auth-card .head {
        padding: 26px 22px 14px;
    }

    .web3-auth-card .loginbox {
        padding: 0 22px 26px;
    }

    .web3-auth-panel-title h2 {
        font-size: 26px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .web3-auth-shell:before,
    .web3-auth-shell:after,
    .web3-auth-hero:before,
    .web3-submit.is-loading {
        animation: none !important;
    }

    .login.web3-auth-card,
    .web3-submit,
    .web3-field input,
    .web3-password-toggle {
        transition: none !important;
    }
}

/* Login v1.1.1: lock fintech form control geometry over legacy login.css. */
body.web3-auth .login.web3-auth-card input.web3-submit,
body.web3-auth .login.web3-auth-card .web3-submit,
body.web3-auth input#loginbtn.web3-submit {
    height: 54px !important;
    border-radius: 14px !important;
    border: 0 !important;
    padding: 0 18px !important;
    color: #061625 !important;
    background: linear-gradient(135deg, #7ee7d8 0%, #8fb3ff 100%) !important;
    background-size: 160% 160% !important;
    box-shadow: 0 14px 32px rgba(79, 181, 201, .20), inset 0 1px 0 rgba(255,255,255,.42) !important;
    text-shadow: none !important;
    line-height: 54px !important;
}

body.web3-auth .login.web3-auth-card input.web3-submit:hover,
body.web3-auth .login.web3-auth-card input.web3-submit:focus,
body.web3-auth input#loginbtn.web3-submit:hover,
body.web3-auth input#loginbtn.web3-submit:focus {
    background-position: 100% 50% !important;
    box-shadow: 0 18px 38px rgba(79, 181, 201, .26), inset 0 1px 0 rgba(255,255,255,.48) !important;
}

body.web3-auth .login.web3-auth-card .web3-field input {
    border-radius: 14px !important;
}

body.web3-auth .login.web3-auth-card {
    background-color: rgba(12, 24, 38, .62) !important;
}

body.web3-auth.theme-light .login.web3-auth-card {
    background-color: rgba(255, 255, 255, .62) !important;
}
