/* === AUTH MODERN LOOK (scoped to #authModal) === */
#authModal .auth-zoom .modal-content {
    animation: authPop .4s cubic-bezier(.2, .8, .2, 1) both;
}

@keyframes authPop {
    from {
        transform: translateY(6px) scale(.98);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

#authModal .modal-dialog {
    max-width: 460px;
}

#authModal .auth-glass {
    background: color-mix(in oklab, #0b0c10 85%, #ffffff 15%)
        /* fallback */
    ;
    background: linear-gradient(180deg, rgba(16, 16, 19, .65), rgba(16, 16, 19, .55)) padding-box;
    backdrop-filter: blur(10px) saturate(120%);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 20px 60px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .04);
    position: relative;
    isolation: isolate;
    color: #e7e9ee;
}

#authModal .auth-border {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    z-index: -1;
    padding: 1px;
    pointer-events: none;
    background: conic-gradient(from 180deg at 50% 50%, #8a63ff, #ff4ecd, #3dd9eb, #8a63ff);
    /* keep only the 1px ring visible */
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    /* NEW: standard */
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    /* existing */
    mask-composite: exclude;
    /* standard */
    -webkit-mask-composite: xor;
    /* WebKit equivalent of ‘exclude’ */
}

#authModal .grad-text {
    background: linear-gradient(90deg, #f6d365, #fda085 40%, #a1c4fd 80%, #c2e9fb);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

/* Tabs */
#authModal .auth-tabs {
    --underline-x: 0px;
    --underline-w: 0px;
    position: relative;
    border: 0;
    gap: .5rem;
}

#authModal .auth-tabs .nav-link {
    border: 0;
    border-radius: 999px;
    color: #cdd3df;
    padding: .5rem .9rem;
    position: relative;
    background: rgba(255, 255, 255, .04);
    transition: transform .2s ease, background .2s ease, color .2s ease;
}

#authModal .auth-tabs .nav-link.active {
    background: rgba(255, 255, 255, .12);
    color: #fff;
}

#authModal .auth-tabs .nav-link:hover {
    transform: translateY(-1px);
}

#authModal .auth-tabs .tabs-underline {
    position: absolute;
    bottom: -2px;
    height: 2px;
    border-radius: 2px;
    left: var(--underline-x);
    width: var(--underline-w);
    background: linear-gradient(90deg, #8a63ff, #3dd9eb);
    transition: left .25s ease, width .25s ease;
}

/* Inputs */
#authModal .input-wrap {
    position: relative;
}

#authModal .input-wrap .i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    opacity: .7;
}

#authModal .modern-control {
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .14);
    color: #fff;
    border-radius: 12px;
    padding-block: .7rem;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

#authModal .modern-control::placeholder {
    color: rgba(255, 255, 255, .55);
}

#authModal .input-wrap:focus-within .modern-control {
    border-color: #8a63ff;
    box-shadow: 0 0 0 4px color-mix(in oklab, #8a63ff 25%, transparent);
    background: rgba(255, 255, 255, .08);
}

/* Toggle password button */
#authModal .toggle-pass {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: 0;
    padding: 8px;
    border-radius: 8px;
    color: #cfd5e3;
}

#authModal .toggle-pass:hover {
    background: rgba(255, 255, 255, .08);
    color: #fff;
}

#authModal .toggle-pass .eye {
    width: 18px;
    height: 18px;
    display: none;
}

#authModal .toggle-pass .eye.on {
    display: block;
}

#authModal .toggle-pass.showing .eye.on {
    display: none;
}

#authModal .toggle-pass.showing .eye.off {
    display: block;
}

/* Buttons */
#authModal .btn-elev {
    box-shadow: 0 10px 18px rgba(138, 99, 255, .25);
}

#authModal .btn-dark {
    background: linear-gradient(180deg, #2b2d3a, #1d1f2b);
    border: 1px solid rgba(255, 255, 255, .14);
}

#authModal .btn-dark:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

#authModal .btn-outline-dark {
    background: rgba(255, 255, 255, .02);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #e7e9ee;
}

#authModal .btn-outline-dark:hover {
    background: rgba(255, 255, 255, .08);
}

/* Ripple */
#authModal .btn-ripple {
    position: relative;
    overflow: hidden;
}

#authModal .btn-ripple .r {
    position: absolute;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    animation: rip .7s ease-out forwards;
    background: currentColor;
    opacity: .18;
}

@keyframes rip {
    from {
        width: 0;
        height: 0;
        opacity: .25
    }

    to {
        width: 260px;
        height: 260px;
        opacity: 0
    }
}

/* Divider */
#authModal .divider {
    position: relative;
    text-align: center;
}

#authModal .divider::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .25), transparent);
}

#authModal .divider>span {
    position: relative;
    display: inline-block;
    padding: .2rem .7rem;
    font-size: .85rem;
    color: #cfd5e3;
    background: rgba(16, 16, 19, .9);
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .14);
}

/* Google button "G" */
#authModal .btn-google .glogo {
    inline-size: 18px;
    block-size: 18px;
    display: inline-block;
    margin-right: .5rem;
    vertical-align: -3px;
    background: conic-gradient(from 0deg, #ea4335 0 25%, #fbbc05 0 50%, #34a853 0 75%, #4285f4 0 100%);
    -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=0 0 48 48><path d="M24 9.5c3.18 0 5.41 1.37 6.66 2.51l4.53-4.53C31.98 4.2 28.27 3 24 3 14.82 3 7.14 8.8 4.39 16.87l6.65 5.16C12.8 16.63 17.89 9.5 24 9.5z"/></svg>') center / contain no-repeat;
    mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox=0 0 48 48><path d="M24 9.5c3.18 0 5.41 1.37 6.66 2.51l4.53-4.53C31.98 4.2 28.27 3 24 3 14.82 3 7.14 8.8 4.39 16.87l6.65 5.16C12.8 16.63 17.89 9.5 24 9.5z"/></svg>') center / contain no-repeat;
}

/* OTP reveal animation */
#authModal .revealable {
    animation: none;
}

#authModal .reveal {
    animation: dropIn .4s ease-out both;
}

@keyframes dropIn {
    from {
        transform: translateY(-6px);
        opacity: 0
    }

    to {
        transform: none;
        opacity: 1
    }
}

/* Pass strength */
#authModal .pass-meter {
    display: flex;
    align-items: center;
    gap: .6rem;
    font-size: .82rem;
    color: #cfd5e3;
    padding-left: .1rem;
}

#authModal .pass-meter .bar {
    flex: 1 1 auto;
    height: 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    position: relative;
    overflow: hidden;
}

#authModal .pass-meter .bar::after {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0%;
    background: linear-gradient(90deg, #ff6b6b, #ffd166, #06d6a0, #4cc9f0);
    transition: width .25s ease;
    border-radius: inherit;
}

/* Pane transitions */
#authModal .fade-slide .tab-pane {
    transition: transform .25s ease, opacity .25s ease;
}

#authModal .tab-pane.active.show {
    transform: none;
    opacity: 1;
}

#authModal .tab-pane:not(.active) {
    transform: translateY(6px);
    opacity: 0;
}

/* Little shake for invalid */
#authModal .shake {
    animation: shake .35s linear;
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0)
    }

    20% {
        transform: translateX(-6px)
    }

    40% {
        transform: translateX(6px)
    }

    60% {
        transform: translateX(-4px)
    }

    80% {
        transform: translateX(4px)
    }
}

/* ===== AUTH: switch to LIGHT / WHITE glass card ===== */
#authModal .auth-glass {
    /* soft white glass */
    background: linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(255, 255, 255, .90)) padding-box !important;
    color: #111 !important;
    border: 1px solid rgba(0, 0, 0, .06) !important;
    box-shadow: 0 24px 80px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06),
        inset 0 1px 0 rgba(255, 255, 255, .65) !important;
    backdrop-filter: blur(12px) saturate(130%);
}

/* tabs on light surface */
#authModal .auth-tabs .nav-link {
    background: #f3f4f6;
    color: #475569;
}

#authModal .auth-tabs .nav-link.active {
    background: #fff;
    color: #111;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, .06);
}

/* inputs: light mode */
#authModal .input-wrap .i {
    color: #6b7280;
    opacity: .9;
}

#authModal .modern-control {
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .14);
    color: #111;
}

#authModal .modern-control::placeholder {
    color: #9aa0a6;
}

#authModal .input-wrap:focus-within .modern-control {
    background: #fff;
    border-color: #8a63ff;
    box-shadow: 0 0 0 4px color-mix(in oklab, #8a63ff 20%, transparent);
}

/* divider chip on white */
#authModal .divider::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .16), transparent);
}

#authModal .divider>span {
    background: #fff;
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, .08);
}

/* buttons tuned for light surface */
#authModal .btn-outline-dark {
    background: #fff;
    color: #111;
    border: 1px solid rgba(0, 0, 0, .14);
}

#authModal .btn-outline-dark:hover {
    background: #f8fafc;
}

#authModal .btn-dark {
    background: linear-gradient(180deg, #212529, #16181d);
    border: 1px solid rgba(0, 0, 0, .25);
}

/* password meter on light */
#authModal .pass-meter {
    color: #6b7280;
}

#authModal .pass-meter .bar {
    background: rgba(0, 0, 0, .08);
}

/* optional: slightly brighter rainbow edge on white */
#authModal .auth-border {
    opacity: .95;
}

/* === AUTH: Frosted WHITE GLASS (translucent, not pure white) === */
#authModal .auth-glass {
    /* slightly see-through white */
    background: linear-gradient(180deg, rgba(255, 255, 255, .74), rgba(255, 255, 255, .58)) padding-box !important;
    color: #15171a !important;
    border: 1px solid rgba(255, 255, 255, .55) !important;
    box-shadow:
        0 24px 80px rgba(16, 24, 40, .22),
        0 4px 16px rgba(16, 24, 40, .08),
        inset 0 1px 0 rgba(255, 255, 255, .85) !important;
    backdrop-filter: blur(14px) saturate(135%) !important;
}

/* light catch + vignette for real glass feel */
#authModal .auth-glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        radial-gradient(110% 60% at 50% -15%, rgba(255, 255, 255, .38), transparent 60%),
        linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 35%),
        linear-gradient(0deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, 0) 55%);
    mix-blend-mode: normal;
}

/* very subtle “grain” so the blur looks organic (no heavy image) */
#authModal .auth-glass::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background:
        repeating-linear-gradient(45deg, rgba(0, 0, 0, .02) 0 2px, transparent 2px 4px),
        repeating-linear-gradient(-45deg, rgba(0, 0, 0, .02) 0 2px, transparent 2px 4px);
    opacity: .06;
}

/* keep the rainbow edge but make it sit nicely on white */
#authModal .auth-border {
    opacity: .85;
}

/* blur + dim the page behind so the glass reads properly */
.modal-backdrop.show {
    background: rgba(9, 12, 18, .35);
    backdrop-filter: blur(6px) saturate(120%);
}

/* Inputs look glassy (not solid) */
#authModal .modern-control {
    background: rgba(255, 255, 255, .72) !important;
    border: 1px solid rgba(0, 0, 0, .12) !important;
    color: #111 !important;
}

#authModal .modern-control::placeholder {
    color: #8e95a2;
}

#authModal .input-wrap:focus-within .modern-control {
    background: rgba(255, 255, 255, .88) !important;
    border-color: #8a63ff !important;
    box-shadow: 0 0 0 6px color-mix(in oklab, #8a63ff 16%, transparent);
}

/* Tabs on light glass */
#authModal .auth-tabs .nav-link {
    background: rgba(255, 255, 255, .7);
    color: #475569;
}

#authModal .auth-tabs .nav-link.active {
    background: #fff;
    color: #111;
    box-shadow: inset 0 1px 0 rgba(0, 0, 0, .06);
}

/* Divider chip = translucent, not opaque */
#authModal .divider::before {
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, .12), transparent);
}

#authModal .divider>span {
    background: rgba(255, 255, 255, .82);
    color: #6b7280;
    border: 1px solid rgba(0, 0, 0, .08);
}

/* Outline buttons = glassy on white */
#authModal .btn-outline-dark {
    background: rgba(255, 255, 255, .78);
    border: 1px solid rgba(0, 0, 0, .14);
    color: #111;
}

#authModal .btn-outline-dark:hover {
    background: rgba(255, 255, 255, .92);
}

/* Primary stays dark for contrast */
#authModal .btn-dark {
    background: linear-gradient(180deg, #222428, #16181d);
    border: 1px solid rgba(0, 0, 0, .25);
}

/* === ICONS: unified stroke look + micro-animations === */
#authModal .icon {
    width: 20px;
    height: 20px;
    color: #6b7280;
    opacity: .9;
    transition: transform .18s ease, color .18s ease, opacity .18s ease, filter .18s ease;
}

#authModal .nav-link .icon {
    width: 18px;
    height: 18px;
    margin-right: .35rem;
    vertical-align: -2px;
    opacity: .95;
}

#authModal .nav-link:hover .icon {
    transform: translateY(-1px) scale(1.06);
}

#authModal .nav-link.active .icon {
    color: #fff;
    filter: drop-shadow(0 2px 8px rgba(61, 217, 235, .35));
}

#authModal .input-wrap .icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
}

#authModal .input-wrap:focus-within .icon {
    color: #7c5cff;
    opacity: 1;
    transform: translateY(-50%) scale(1.07);
    filter: drop-shadow(0 2px 6px rgba(124, 92, 255, .35));
}

#authModal .toggle-pass .icon {
    width: 18px;
    height: 18px;
}

#authModal .toggle-pass:hover .icon {
    transform: scale(1.06);
}

/* === FIX: keep eye icon inside the input === */
#authModal .input-wrap.has-toggle .modern-control {
    /* reserve space on the right for the eye button */
    padding-right: 48px;
    /* adjust to 44–52px if you change the button size */
}

/* Proper Google “G” */
#authModal .btn-google .gmark {
    width: 18px;
    height: 18px;
    margin-right: .5rem;
    vertical-align: -3px;
    transition: transform .18s ease, filter .18s ease;
}

#authModal .btn-google:hover .gmark {
    transform: translateY(-1px) scale(1.06);
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .12));
}

/* === AUTH: keep eye button INSIDE the password field === */
#authModal .input-wrap.has-toggle {
    position: relative;
}

#authModal .input-wrap.has-toggle .modern-control {
    padding-right: 46px;
    /* reserve space for the button */
}

#authModal .input-wrap.has-toggle .toggle-pass {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    /* fixed tap target */
    height: 32px;
    padding: 0;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    border-radius: 8px;
    z-index: 3;
    /* ensure it sits above the input */
}

#authModal .input-wrap.has-toggle .toggle-pass .icon {
    width: 18px;
    height: 18px;
}

/* === AUTH TABS: bigger, darker icons === */
/* REPLACE the existing #authModal .nav-link .icon rule with this */
#authModal .nav-link .icon {
    width: 22px;
    /* was 18px */
    height: 22px;
    /* was 18px */
    margin-right: .35rem;
    vertical-align: -2px;
    color: #0b0b0b;
    /* solid dark */
    opacity: 1;
    /* ensure full black */
    transition: transform .18s ease, color .18s ease, opacity .18s ease, filter .18s ease;
}

/* REPLACE the existing active-icon color so it stays black when active */
#authModal .nav-link.active .icon {
    color: #0b0b0b;
    filter: drop-shadow(0 2px 8px rgba(61, 217, 235, .28));
}

/* === AUTH: remove gradient ring + use solid black border === */
#authModal .auth-border {
    display: none !important;
    /* hide the conic-gradient layer */
}

#authModal .auth-glass {
    border: 1px solid #000 !important;
    /* solid black outline */
    box-shadow:
        0 24px 80px rgba(16, 24, 40, .18),
        0 2px 6px rgba(16, 24, 40, .06),
        inset 0 1px 0 rgba(255, 255, 255, .65) !important;
    /* keep soft depth */
}

/* === AUTH TABS: remove rainbow line + black active pill === */

/* 1) Hide the rainbow underline element */
#authModal .auth-tabs .tabs-underline {
    display: none !important;
}

/* 2) Base (unselected) tab buttons – subtle, glass-friendly */
#authModal .auth-tabs .nav-link {
    background: rgba(0, 0, 0, .06) !important;
    color: #1f2937 !important;
    /* slate-ish text */
    border: 1px solid rgba(0, 0, 0, .08) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6);
}

/* Hover nudge */
#authModal .auth-tabs .nav-link:hover {
    transform: translateY(-1px);
    background: rgba(0, 0, 0, .10) !important;
}

/* 3) Active tab = solid black pill, white text */
#authModal .auth-tabs .nav-link.active {
    background: #000 !important;
    color: #fff !important;
    border-color: #000 !important;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, .08),
        0 2px 8px rgba(0, 0, 0, .18) !important;
}

/* 4) Make the tab icons a bit bigger and ensure contrast */
#authModal .nav-link .icon {
    width: 22px;
    /* bigger than default */
    height: 22px;
    margin-right: .35rem;
    vertical-align: -2px;
    color: #0b0b0b;
    /* dark on idle */
    opacity: 1;
}

/* Active = white icon on black pill */
#authModal .nav-link.active .icon {
    color: #fff !important;
    filter: none !important;
    /* remove colored glow */
}

/* === AUTH: focus ring → pure black (same transparency) === */

/* Keep the same ring opacity/size you already use (6px, 16%) */
#authModal .modern-control:focus,
#authModal .input-wrap:focus-within .modern-control {
    border-color: #000 !important;
    box-shadow: 0 0 0 6px color-mix(in oklab, #000 16%, transparent) !important;
    outline: none !important;
}

/* If Bootstrap’s default blue focus sneaks in, neutralize it (scoped to modal) */
#authModal .form-control:focus {
    box-shadow: none !important;
    /* we supply our own ring above */
}

/* Optional: if you ever switch to the earlier 4px/25% variant (dark theme),
  keep the *same* transparency but black color too */
html.dark #authModal .modern-control:focus,
html.dark #authModal .input-wrap:focus-within .modern-control {
    border-color: #000 !important;
    box-shadow: 0 0 0 4px color-mix(in oklab, #000 25%, transparent) !important;
}

/* === AUTH: input field icons → black on focus === */
#authModal .input-wrap:focus-within .icon,
#authModal .input-wrap:focus-within .i,
#authModal .input-wrap.has-toggle:focus-within .toggle-pass .icon {
    color: #000 !important;
    /* switch from violet to black */
    opacity: 1 !important;
    /* keep them fully visible */
    filter: none !important;
    /* remove the violet glow */
}

/* keep the tiny “pop” animation you already have */
#authModal .input-wrap:focus-within .icon {
    transform: translateY(-50%) scale(1.07);
}

/* === PATCH: Password strength bar — fixed stops & solid colors === */
#authModal .pass-meter .bar::after {
    /* drive width & color via CSS vars */
    width: var(--w, 0%) !important;
    background: var(--meter-color, #ef4444) !important;
    /* default red */
    transition: width .25s ease, background-color .2s ease;
}