/* Fastdatafy — Premium auth experience (login + registration) */

/* ── Background extras ── */
.auth-orb--4 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 15%;
    background: rgba(251, 191, 36, 0.08);
    animation: authOrbFloat 12s ease-in-out infinite;
}

.auth-orb--1 { animation: authOrbFloat 14s ease-in-out infinite reverse; }
.auth-orb--2 { animation: authOrbFloat 16s ease-in-out infinite; }
.auth-orb--3 { animation: authOrbFloat 18s ease-in-out infinite reverse; }

@keyframes authOrbFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(12px, -18px) scale(1.04); }
    66% { transform: translate(-8px, 10px) scale(0.96); }
}

.auth-noise {
    position: absolute;
    inset: 0;
    opacity: 0.035;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    pointer-events: none;
}

/* ── Topbar CTA glow ── */
.auth-link-btn--glow {
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.35), rgba(124, 58, 237, 0.3));
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 4px 20px rgba(55, 138, 221, 0.25);
}

.auth-link-btn--glow:hover {
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.5), rgba(124, 58, 237, 0.45));
    box-shadow: 0 6px 28px rgba(55, 138, 221, 0.35);
}

/* ── Hero polish ── */
.auth-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.auth-hero-badge i {
    font-size: 13px;
    opacity: 0.9;
}

.auth-feature-check {
    width: 22px;
    height: 22px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(55, 138, 221, 0.9), rgba(24, 95, 165, 0.95));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(24, 95, 165, 0.35);
}

.auth-page--register .auth-feature-check {
    background: linear-gradient(135deg, #A78BFA, #7C3AED);
    box-shadow: 0 3px 10px rgba(124, 58, 237, 0.35);
}

.auth-trust-icon--blue { background: linear-gradient(135deg, #378ADD, #185FA5); }
.auth-trust-icon--green { background: linear-gradient(135deg, #22C55E, #16A34A); }
.auth-trust-icon--amber { background: linear-gradient(135deg, #FBBF24, #D97706); }
.auth-trust-icon--purple { background: linear-gradient(135deg, #A78BFA, #7C3AED); }

/* ── Mock previews (hero side) ── */
.auth-mock {
    margin-bottom: 24px;
    perspective: 800px;
}

.auth-mock--login .auth-mock__phone {
    max-width: 260px;
    background: linear-gradient(145deg, #1E293B, #0F172A);
    border-radius: 28px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.06);
    transform: rotateY(-6deg) rotateX(4deg);
    transition: transform 0.4s ease;
}

.auth-mock--login:hover .auth-mock__phone {
    transform: rotateY(-2deg) rotateX(2deg) translateY(-4px);
}

.auth-mock__status {
    width: 48px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    margin: 4px auto 10px;
}

.auth-mock__screen {
    background: #fff;
    border-radius: 20px;
    padding: 14px;
    overflow: hidden;
}

.auth-mock__header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    font-size: 11px;
    font-weight: 700;
    color: #64748B;
}

.auth-mock__wallet {
    background: linear-gradient(135deg, #185FA5, #0C447C);
    border-radius: 14px;
    padding: 14px;
    color: #fff;
    margin-bottom: 10px;
}

.auth-mock__wallet small {
    display: block;
    font-size: 9px;
    opacity: 0.75;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.auth-mock__wallet strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 800;
    margin: 4px 0 10px;
    letter-spacing: -0.02em;
}

.auth-mock__wallet-actions {
    display: flex;
    gap: 8px;
}

.auth-mock__wallet-actions span {
    flex: 1;
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    padding: 6px 8px;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.15);
}

.auth-mock__orders {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.auth-mock__orders div {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    padding: 8px 10px;
    background: #F8FAFC;
    border-radius: 10px;
}

.auth-mock__orders i { font-size: 14px; }
.auth-mock__orders .ti-circle-check { color: #16A34A; }
.auth-mock__orders .ti-clock { color: #D97706; }

/* Register mock */
.auth-mock--register .auth-mock__cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
}

.auth-mock__card {
    border-radius: 16px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(12px);
}

.auth-mock__card--wallet {
    background: linear-gradient(135deg, rgba(124, 58, 237, 0.35), rgba(26, 58, 255, 0.25));
    box-shadow: 0 12px 40px rgba(124, 58, 237, 0.2);
}

.auth-mock__card-top {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 10px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 8px;
}

.auth-mock__balance {
    margin: 0 0 10px;
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.03em;
}

.auth-mock__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.auth-mock__chips span {
    font-size: 9px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: #E2E8F0;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-mock__card--store {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.08);
}

.auth-mock__card--store > i {
    font-size: 28px;
    color: #A78BFA;
}

.auth-mock__card--store strong {
    display: block;
    font-size: 13px;
    color: #fff;
}

.auth-mock__card--store small {
    display: block;
    font-size: 10px;
    color: #94A3B8;
    margin-top: 2px;
}

/* ── Premium card ── */
.auth-card--premium {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 32px 90px rgba(0, 0, 0, 0.38),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    position: relative;
    overflow: hidden;
}

.auth-card-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 5px 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    color: #185FA5;
    border: 1px solid #BFDBFE;
}

.auth-page--register .auth-card-badge {
    background: linear-gradient(135deg, #FAF5FF, #EDE9FE);
    color: #7C3AED;
    border-color: #DDD6FE;
}

.auth-card-logo-ring {
    width: 64px;
    height: 64px;
    border-radius: 20px;
    margin: 0 auto 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(145deg, #F8FAFC, #fff);
    border: 1px solid #E2E8F0;
    box-shadow:
        0 8px 24px rgba(15, 23, 42, 0.08),
        0 0 0 4px rgba(24, 95, 165, 0.06);
}

.auth-page--register .auth-card-logo-ring {
    box-shadow:
        0 8px 24px rgba(124, 58, 237, 0.12),
        0 0 0 4px rgba(124, 58, 237, 0.08);
}

.auth-card-logo-ring .fd-logo__mark {
    border-radius: 14px;
}

/* ── Password toggle ── */
.auth-input-wrap--password .auth-input {
    padding-right: 48px;
}

.auth-password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #94A3B8;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    transition: color 0.2s, background 0.2s;
}

.auth-password-toggle:hover {
    color: #475569;
    background: #F1F5F9;
}

/* ── Custom checkbox ── */
.auth-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 14px 0 4px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    user-select: none;
}

.auth-checkbox input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.auth-checkbox__box {
    width: 20px;
    height: 20px;
    border-radius: 6px;
    border: 1.5px solid #CBD5E1;
    background: #fff;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.auth-checkbox__box::after {
    content: '';
    width: 6px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg) scale(0);
    margin-top: -2px;
    transition: transform 0.15s ease;
}

.auth-checkbox input:checked + .auth-checkbox__box {
    background: linear-gradient(135deg, #185FA5, #0C447C);
    border-color: transparent;
}

.auth-checkbox input:checked + .auth-checkbox__box::after {
    transform: rotate(45deg) scale(1);
}

.auth-checkbox input:focus-visible + .auth-checkbox__box {
    box-shadow: 0 0 0 3px rgba(24, 95, 165, 0.2);
}

/* ── Submit shine ── */
.auth-submit--shine {
    position: relative;
    overflow: hidden;
}

.auth-submit--shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
    animation: authShine 3s ease-in-out infinite;
}

@keyframes authShine {
    0%, 100% { left: -100%; }
    50% { left: 140%; }
}

.auth-submit.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.auth-submit.is-loading i:not(.auth-spinner) {
    display: none;
}

.auth-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* ── Divider + secondary CTA ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 22px 0 16px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #94A3B8;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, #E2E8F0, transparent);
}

.auth-secondary-cta {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1.5px solid #E2E8F0;
    background: linear-gradient(180deg, #FAFBFC, #fff);
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.auth-secondary-cta:hover {
    border-color: #BFDBFE;
    box-shadow: 0 6px 20px rgba(24, 95, 165, 0.1);
    transform: translateY(-1px);
}

.auth-secondary-cta > i:first-child {
    font-size: 22px;
    color: #185FA5;
}

.auth-secondary-cta > i:last-child {
    margin-left: auto;
    color: #94A3B8;
    font-size: 16px;
}

.auth-secondary-cta strong {
    display: block;
    font-size: 13.5px;
    font-weight: 800;
    color: #0F172A;
}

.auth-secondary-cta small {
    display: block;
    font-size: 11px;
    color: #64748B;
    margin-top: 2px;
}

/* ── Phone input polish ── */
.auth-phone-prefix {
    display: flex;
    align-items: center;
    gap: 6px;
}

.auth-phone-prefix img {
    border-radius: 4px;
}

/* ── OTP premium ── */
.auth-otp-grid {
    gap: 10px;
}

.auth-otp-cell {
    border-radius: 14px;
    font-size: 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.auth-otp-cell:not(:placeholder-shown),
.auth-otp-cell:focus {
    border-color: #7C3AED;
    background: #FAF5FF;
}

.auth-otp-timer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
    font-size: 12px;
    font-weight: 600;
    color: #64748B;
}

.auth-otp-timer i { color: #7C3AED; }

/* ── Verified stack premium ── */
.auth-verified-stack {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-verified-phone,
.auth-verified-name {
    border-radius: 14px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

/* ── Register perks (3 cols on wide) ── */
.auth-register-perks {
    grid-template-columns: repeat(3, 1fr);
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #F1F5F9;
}

.auth-register-perks div {
    justify-content: center;
    padding: 8px 6px;
    border-radius: 10px;
    background: #FAFBFC;
}

/* ── Focus ring polish ── */
.auth-input:hover:not(:focus) {
    border-color: #CBD5E1;
}

.auth-page--register .auth-input:focus {
    border-color: #7C3AED;
    box-shadow: 0 0 0 4px rgba(124, 58, 237, 0.1);
}

/* ── Responsive ── */
@media (max-width: 960px) {
    .auth-mock--login .auth-mock__phone,
    .auth-mock--register .auth-mock__cards {
        margin-left: auto;
        margin-right: auto;
    }

    .auth-mock--login .auth-mock__phone {
        transform: none;
    }
}

@media (max-width: 540px) {
    .auth-card-badge {
        top: 12px;
        right: 12px;
        font-size: 9px;
        padding: 4px 8px;
    }

    .auth-card-logo-ring {
        width: 56px;
        height: 56px;
        border-radius: 16px;
    }

    .auth-register-perks {
        grid-template-columns: 1fr;
    }

    .auth-otp-grid {
        gap: 6px;
    }

    .auth-secondary-cta {
        padding: 12px 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-orb--1,
    .auth-orb--2,
    .auth-orb--3,
    .auth-orb--4,
    .auth-submit--shine::after {
        animation: none;
    }
}
