/* CRM-style glassmorphism auth — animated professional experience */

.auth-glass-page {
    min-height: 100vh;
    margin: 0;
    position: relative;
    overflow-x: hidden;
    font-family: "Noto Sans", system-ui, sans-serif;
}

/* CRM workspace image — static fallback behind the video */
.auth-glass-page::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    background-image: url("../images/auth/login-bg-crm.png");
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

/* Background video layer — above fallback image, below color wash */
.auth-bg-video {
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
    pointer-events: none;
    display: block;
    opacity: 0;
    background: transparent;
    transition: opacity 0.45s ease;
}

body.auth-video-ready .auth-bg-video {
    opacity: 1;
}

/* Once video is playing, ease off heavy CSS motion (helps server/client lag) */
body.auth-video-ready .auth-glass-page::after {
    animation: none;
    background-position: center, 50% 50%, center, center, center;
}

body.auth-video-ready .auth-orb,
body.auth-video-ready .auth-particles {
    display: none;
}

@media (max-width: 991.98px) {
    .auth-bg-video {
        display: none !important;
    }
}

/* Light blue + warm orange wash (reference palette) */
.auth-glass-page::after {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        radial-gradient(ellipse at center, transparent 50%, rgba(20, 50, 110, 0.28) 100%),
        linear-gradient(
            125deg,
            rgba(40, 110, 200, 0.28) 0%,
            rgba(60, 140, 220, 0.22) 25%,
            rgba(90, 160, 230, 0.18) 45%,
            rgba(50, 130, 210, 0.24) 65%,
            rgba(40, 100, 190, 0.28) 100%
        ),
        radial-gradient(ellipse at 82% 12%, rgba(255, 140, 70, 0.38), transparent 42%),
        radial-gradient(ellipse at 18% 78%, rgba(80, 190, 255, 0.28), transparent 48%),
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.12) 0%,
            transparent 28%,
            transparent 72%,
            rgba(255, 255, 255, 0.08) 100%
        );
    background-size: 100% 100%, 300% 300%, 100% 100%, 100% 100%, 100% 100%;
    background-position: center, 0% 50%, center, center, center;
    animation: authGradientFlow 18s ease infinite;
    will-change: background-position;
}

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

/* Floating orbs — soft cyan / warm amber bokeh */
.auth-orb {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    filter: blur(60px);
    opacity: 0.55;
    will-change: transform;
}

.auth-orb-1 {
    width: 420px;
    height: 420px;
    top: 4%;
    left: 2%;
    background: radial-gradient(circle, rgba(90, 190, 255, 0.55), transparent 70%);
    animation: authOrbFloat1 16s ease-in-out infinite alternate;
}

.auth-orb-2 {
    width: 360px;
    height: 360px;
    bottom: 6%;
    right: 3%;
    background: radial-gradient(circle, rgba(255, 150, 80, 0.42), transparent 70%);
    animation: authOrbFloat2 20s ease-in-out infinite alternate;
}

/* Floating particles — white-cyan bokeh */
.auth-particles {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;
}

.auth-particle {
    position: absolute;
    bottom: -12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 10px 3px rgba(140, 210, 255, 0.5);
    opacity: 0;
    animation: authParticleRise linear infinite;
    will-change: transform, opacity;
}

@keyframes authParticleRise {
    0% {
        opacity: 0;
        transform: translateY(0) translateX(0) scale(0.6);
    }
    12% {
        opacity: 0.9;
    }
    80% {
        opacity: 0.55;
    }
    100% {
        opacity: 0;
        transform: translateY(-110vh) translateX(var(--drift, 20px)) scale(1);
    }
}

@keyframes authOrbFloat1 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(40px, 50px) scale(1.12); }
}

@keyframes authOrbFloat2 {
    from { transform: translate(0, 0) scale(1); }
    to   { transform: translate(-50px, -30px) scale(1.15); }
}

.auth-glass-wrapper {
    position: relative;
    z-index: 3;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
}

/* Card stage — holds card + CRM icon ring */
.auth-card-stage {
    position: relative;
    z-index: 1;
}

/* Animated CRM icon badge ring around the card */
.auth-crm-ring {
    position: absolute;
    inset: -4.5rem -5.5rem;
    pointer-events: none;
    z-index: 0;
}

.auth-crm-badge {
    position: absolute;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    background: linear-gradient(
        145deg,
        rgba(255, 255, 255, 0.28),
        rgba(120, 180, 255, 0.22)
    );
    backdrop-filter: blur(12px) saturate(1.3);
    -webkit-backdrop-filter: blur(12px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow:
        0 8px 24px rgba(20, 60, 140, 0.25),
        0 0 18px rgba(80, 180, 255, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.5);
    animation: authBadgeFloat 5.5s ease-in-out infinite alternate;
    will-change: transform;
}

.auth-crm-badge i {
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.6));
}

.auth-crm-badge-1 { top: 2%; left: 50%; margin-left: -1.625rem; animation-delay: 0s; }
.auth-crm-badge-2 { top: 14%; right: 0; animation-delay: 0.4s; }
.auth-crm-badge-3 { top: 50%; right: -0.4rem; margin-top: -1.625rem; animation-delay: 0.8s; }
.auth-crm-badge-4 { bottom: 14%; right: 0; animation-delay: 1.2s; }
.auth-crm-badge-5 { bottom: 2%; left: 50%; margin-left: -1.625rem; animation-delay: 1.6s; }
.auth-crm-badge-6 { bottom: 14%; left: 0; animation-delay: 2s; }
.auth-crm-badge-7 { top: 50%; left: -0.4rem; margin-top: -1.625rem; animation-delay: 2.4s; }
.auth-crm-badge-8 { top: 14%; left: 0; animation-delay: 2.8s; }

@keyframes authBadgeFloat {
    from { transform: translateY(0); }
    to   { transform: translateY(-10px); }
}

.auth-card-stage > .auth-glass-card {
    position: relative;
    z-index: 1;
}

@media (max-width: 991.98px) {
    .auth-crm-ring {
        display: none;
    }
}

/* Card with border glow — lighter glass */
.card.auth-glass-card,
.auth-glass-card {
    position: relative;
    background: linear-gradient(
        160deg,
        rgba(24, 36, 70, 0.62) 0%,
        rgba(18, 29, 60, 0.58) 55%,
        rgba(15, 26, 52, 0.62) 100%
    ) !important;
    backdrop-filter: blur(18px) saturate(1.3);
    -webkit-backdrop-filter: blur(18px) saturate(1.3);
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    border-radius: 1.25rem;
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.22);
    color: #fff;
    animation: authCardIn 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
    isolation: isolate;
    width: 100%;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .card.auth-glass-card,
    .auth-glass-card {
        background: rgba(20, 32, 64, 0.9) !important;
    }
}


/* Neon running border — sharp streak */
.auth-glass-card::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 2px;
    background: conic-gradient(
        from var(--auth-glow-angle, 0deg),
        transparent 30%,
        rgba(0, 229, 255, 0.95) 42%,
        rgba(91, 157, 255, 1) 50%,
        rgba(255, 60, 230, 0.9) 58%,
        transparent 70%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    z-index: 0;
    animation: authBorderGlow 4s linear infinite;
    opacity: 1;
}

/* Neon halo — blurred copy of the streak for the glow */
.auth-glass-card::after {
    content: "";
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    padding: 4px;
    background: conic-gradient(
        from var(--auth-glow-angle, 0deg),
        transparent 30%,
        rgba(0, 229, 255, 0.8) 42%,
        rgba(91, 157, 255, 0.85) 50%,
        rgba(255, 60, 230, 0.75) 58%,
        transparent 70%
    );
    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    filter: blur(7px);
    pointer-events: none;
    z-index: 0;
    animation: authBorderGlow 4s linear infinite;
    opacity: 0.85;
}

@property --auth-glow-angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

@keyframes authBorderGlow {
    to { --auth-glow-angle: 360deg; }
}

@keyframes authCardIn {
    from {
        opacity: 0;
        transform: translateY(22px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.auth-glass-card > .card-body {
    position: relative;
    z-index: 1;
    color: #fff;
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .auth-glass-card {
        background: rgba(70, 95, 170, 0.92);
    }
}

/* Staggered entrance */
.auth-stagger {
    opacity: 0;
    animation: authStaggerIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.auth-stagger-1 { animation-delay: 0.08s; }
.auth-stagger-2 { animation-delay: 0.16s; }
.auth-stagger-3 { animation-delay: 0.24s; }
.auth-stagger-4 { animation-delay: 0.32s; }
.auth-stagger-5 { animation-delay: 0.40s; }
.auth-stagger-6 { animation-delay: 0.48s; }
.auth-stagger-7 { animation-delay: 0.56s; }
.auth-stagger-8 { animation-delay: 0.64s; }

@keyframes authStaggerIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-glass-header {
    text-align: center;
    margin-bottom: 0.25rem;
}

.auth-glass-header .auth-logo {
    display: inline-block;
    margin-bottom: 1.25rem;
}

.auth-glass-card h4.auth-title {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.35rem;
}

.auth-glass-card .auth-subtitle {
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.auth-glass-card .form-label {
    color: rgba(255, 255, 255, 0.78) !important;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.45rem;
    transition: color 0.2s ease;
}

.auth-glass-card .col-12:focus-within > .form-label {
    color: #a8d4ff !important;
}

.auth-glass-card p,
.auth-glass-card .form-check-label,
.auth-glass-card small,
.auth-glass-card .text-muted {
    color: rgba(255, 255, 255, 0.72) !important;
}

.auth-glass-card .text-primary {
    color: #8ec5ff !important;
}

.auth-glass-card a,
.auth-glass-card .btn-link {
    color: #a8d4ff !important;
    text-decoration: none;
}

.auth-glass-card a:hover,
.auth-glass-card .btn-link:hover {
    color: #fff !important;
}

/* Segmented tabs with sliding pill */
.auth-glass-card .auth-tabs {
    position: relative;
    border: none;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 0.25rem;
    padding: 0.3rem;
    background: rgba(8, 14, 36, 0.45);
    border-radius: 999px;
}

.auth-glass-card .auth-tab-indicator {
    position: absolute;
    top: 0.3rem;
    bottom: 0.3rem;
    left: 0.3rem;
    width: calc(50% - 0.3rem);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.28);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    transition: transform 0.32s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 0;
    pointer-events: none;
}

.auth-glass-card .auth-tab-indicator.at-otp {
    transform: translateX(100%);
}

.auth-glass-card .auth-tabs .nav-item {
    flex: 1;
    position: relative;
    z-index: 1;
}

.auth-glass-card .auth-tabs .nav-link {
    border: none;
    border-radius: 999px;
    color: rgba(255, 255, 255, 0.6);
    font-weight: 500;
    font-size: 0.9rem;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0.55rem 0.75rem;
    transition: color 0.25s ease;
}

.auth-glass-card .auth-tabs .nav-link:hover {
    color: #fff;
    background: transparent !important;
}

.auth-glass-card .auth-tabs .nav-link.active {
    color: #fff;
    background: transparent !important;
    box-shadow: none !important;
}

/* Inputs — tuned for lighter card */
.auth-glass-card .form-control {
    background: rgba(8, 14, 36, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.22);
    color: #fff;
    border-radius: 10px;
    height: 48px;
    padding: 0.6rem 0.9rem;
    transition:
        border-color 0.22s ease,
        box-shadow 0.22s ease,
        background 0.22s ease,
        transform 0.22s ease;
}

.auth-glass-card .form-control::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.auth-glass-card .form-control:focus {
    background: rgba(8, 14, 36, 0.72);
    border-color: rgba(91, 157, 255, 0.85);
    color: #fff;
    box-shadow: 0 0 0 3px rgba(91, 157, 255, 0.22);
    transform: translateY(-1px);
}

.auth-glass-card .form-control.is-invalid {
    border-color: #ff6b7a;
}

/* Chrome autofill fix — match lighter input tone */
.auth-glass-card .form-control:-webkit-autofill,
.auth-glass-card .form-control:-webkit-autofill:hover,
.auth-glass-card .form-control:-webkit-autofill:focus,
.auth-glass-card .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #121a36 inset !important;
    box-shadow: 0 0 0 1000px #121a36 inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff;
    border-color: rgba(255, 255, 255, 0.28) !important;
    transition: background-color 9999s ease-in-out 0s;
}

.auth-glass-card .auth-input-group {
    position: relative;
}

.auth-glass-card .auth-input-group > .auth-input-icon {
    position: absolute;
    left: 0.9rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.9rem;
    z-index: 3;
    pointer-events: none;
    transition: color 0.22s ease, transform 0.22s ease;
}

.auth-glass-card .auth-input-group > .form-control {
    padding-left: 2.55rem;
}

.auth-glass-card .auth-input-group.auth-input-group-toggle > .form-control {
    padding-right: 2.75rem;
    border-radius: 10px;
}

.auth-glass-card .auth-input-toggle {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    color: rgba(255, 255, 255, 0.55);
    padding: 0.35rem 0.4rem;
    line-height: 1;
    text-decoration: none;
    border: none;
    background: transparent;
    transition: color 0.2s ease;
}

.auth-glass-card .auth-input-toggle:hover {
    color: #fff;
}

.auth-glass-card .auth-input-group:focus-within > .auth-input-icon {
    color: rgba(142, 197, 255, 0.95);
    transform: translateY(-50%) scale(1.08);
}

.auth-glass-card .form-check-input {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.35);
}

.auth-glass-card .form-check-input:checked {
    background-color: #5b9dff;
    border-color: #5b9dff;
}

/* Primary CTA + sheen */
.auth-glass-card .btn-auth-primary,
.auth-glass-card .btn.btn-auth-primary {
    position: relative;
    overflow: hidden;
    height: 48px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: #fff !important;
    background-image: linear-gradient(135deg, #3d7eff 0%, #6b5cff 55%, #8a4dff 100%) !important;
    background-color: #3d7eff !important;
    box-shadow: 0 8px 22px rgba(61, 126, 255, 0.35);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.auth-glass-card .btn-auth-primary::after,
.auth-glass-card .btn.btn-auth-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -60%;
    width: 45%;
    height: 100%;
    background: linear-gradient(
        100deg,
        transparent,
        rgba(255, 255, 255, 0.28),
        transparent
    );
    transform: skewX(-18deg);
    pointer-events: none;
    transition: none;
}

.auth-glass-card .btn-auth-primary:hover::after,
.auth-glass-card .btn.btn-auth-primary:hover::after {
    animation: authBtnSheen 0.7s ease forwards;
}

@keyframes authBtnSheen {
    from { left: -60%; }
    to   { left: 130%; }
}

.auth-glass-card .btn-auth-primary:hover,
.auth-glass-card .btn.btn-auth-primary:hover {
    color: #fff !important;
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(61, 126, 255, 0.5);
}

.auth-glass-card .btn-auth-primary:active,
.auth-glass-card .btn.btn-auth-primary:active {
    transform: translateY(0) scale(0.98);
    box-shadow: 0 4px 14px rgba(61, 126, 255, 0.3);
}

.auth-glass-card .btn-auth-primary:disabled,
.auth-glass-card .btn.btn-auth-primary:disabled {
    opacity: 0.55;
    transform: none;
    filter: none;
    box-shadow: none;
}

.auth-glass-card .btn-auth-primary:disabled::after,
.auth-glass-card .btn.btn-auth-primary:disabled::after {
    display: none;
}

.auth-glass-card .btn-auth-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.85rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.auth-glass-card .btn-auth-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.35);
    color: #fff !important;
    transform: translateY(-1px);
}

.auth-glass-card .btn-auth-secondary:disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* Compact OTP hint list */
.auth-otp-hints {
    list-style: none;
    padding: 0;
    margin: 0 0 1rem;
}

.auth-otp-hints li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 0.4rem;
}

.auth-otp-hints li i {
    color: #6dffb0;
    margin-top: 0.15rem;
    font-size: 0.7rem;
}

/* Alerts on glass */
.auth-glass-card .alert {
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 10px;
}

.auth-glass-card .alert-success {
    background: rgba(25, 135, 84, 0.35);
    color: #d8f5e5;
}

.auth-glass-card .alert-danger {
    background: rgba(180, 40, 50, 0.4);
    color: #ffd6db;
}

.auth-glass-card .alert-info {
    background: rgba(40, 100, 180, 0.4);
    color: #d6e9ff;
}

.auth-glass-card .alert-warning {
    background: rgba(180, 120, 20, 0.4);
    color: #ffe9b8;
}

.auth-glass-card .alert .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

.auth-glass-card .invalid-feedback,
.auth-glass-card .text-danger {
    color: #ff9aa5 !important;
}

/* Footer */
.auth-glass-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 1rem;
    margin-top: 0.5rem;
    color: rgba(255, 255, 255, 0.65);
}

.auth-glass-footer .lock-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.35rem;
    height: 1.35rem;
    border-radius: 50%;
    background: rgba(109, 255, 176, 0.15);
    color: #6dffb0;
    font-size: 0.65rem;
    margin-right: 0.4rem;
    vertical-align: middle;
}

/* OTP digit boxes */
.otp-digits {
    display: flex;
    justify-content: space-between;
    gap: 0.45rem;
    margin-bottom: 0.5rem;
}

.otp-digits .otp-digit {
    flex: 1;
    max-width: 3.1rem;
    height: 52px;
    text-align: center;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: 0;
    padding: 0;
    background: rgba(10, 16, 40, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 10px;
    color: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.otp-digits .otp-digit:focus {
    outline: none;
    border-color: rgba(91, 157, 255, 0.85);
    box-shadow: 0 0 0 3px rgba(91, 157, 255, 0.22);
    background: rgba(10, 16, 40, 0.48);
}

.otp-digits .otp-digit.otp-pop {
    animation: authOtpPop 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes authOtpPop {
    0%   { transform: scale(1); }
    45%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}

.otp-digits.otp-shake {
    animation: authOtpShake 0.4s ease;
}

@keyframes authOtpShake {
    0%, 100% { transform: translateX(0); }
    20%      { transform: translateX(-6px); }
    40%      { transform: translateX(6px); }
    60%      { transform: translateX(-4px); }
    80%      { transform: translateX(4px); }
}

/* Timer progress */
.auth-otp-timer {
    margin-bottom: 1rem;
}

.auth-otp-timer .timer-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.4rem;
}

.auth-otp-timer .timer-meta.urgent {
    color: #ff9aa5;
}

.auth-otp-timer .timer-meta.expired {
    color: #ff9aa5;
    font-weight: 600;
}

.auth-otp-timer .progress {
    height: 5px;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 999px;
    overflow: hidden;
}

.auth-otp-timer .progress-bar {
    background: linear-gradient(90deg, #3d7eff, #8a4dff);
    transition: width 1s linear;
}

.auth-otp-timer .progress-bar.urgent {
    background: linear-gradient(90deg, #ff6b7a, #ff9a4d);
    animation: authTimerPulse 1s ease-in-out infinite;
}

@keyframes authTimerPulse {
    0%, 100% { opacity: 1; filter: brightness(1); }
    50%      { opacity: 0.75; filter: brightness(1.25); }
}

.auth-otp-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 1.25rem;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .auth-glass-page::before,
    .auth-glass-page::after,
    .auth-orb,
    .auth-particle,
    .auth-crm-badge,
    .auth-glass-card,
    .auth-glass-card::before,
    .auth-glass-card::after,
    .auth-stagger,
    .otp-digits .otp-digit.otp-pop,
    .otp-digits.otp-shake,
    .auth-otp-timer .progress-bar.urgent,
    .auth-glass-card .btn-auth-primary:hover::after {
        animation: none !important;
    }

    .auth-glass-page::before {
        transform: scale(1);
    }

    .auth-glass-page::after {
        background-position: center, 50% 50%, center, center, center;
    }

    .auth-particles {
        display: none;
    }

    /* Keep background video visible even when OS "reduce motion" is on */

    .auth-stagger {
        opacity: 1;
        transform: none;
    }

    .auth-glass-card .auth-tab-indicator,
    .auth-glass-card .form-control,
    .auth-glass-card .btn-auth-primary,
    .auth-glass-card .btn.btn-auth-primary {
        transition: none;
    }
}

@media (max-width: 576px) {
    .auth-glass-wrapper {
        padding: 1.25rem 0.75rem;
    }

    .auth-glass-card .card-body {
        padding: 1.5rem !important;
    }

    .otp-digits .otp-digit {
        max-width: 2.6rem;
        height: 46px;
        font-size: 1.15rem;
    }

    .auth-orb-1,
    .auth-orb-2 {
        width: 200px;
        height: 200px;
        opacity: 0.3;
    }
}
