/* ═══════════════════════════════════════════
   Auth Pages — Dark Tech Theme with Floating Icons
   ═══════════════════════════════════════════ */

.guest-page--auth {
    background:
        radial-gradient(ellipse at 20% 15%, rgba(99, 102, 241, 0.22) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 85%, rgba(6, 182, 212, 0.18) 0%, transparent 45%),
        radial-gradient(ellipse at 60% 40%, rgba(139, 92, 246, 0.12) 0%, transparent 40%),
        linear-gradient(160deg, #0f172a 0%, #1e1b4b 42%, #0f172a 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.guest-page--auth::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.04) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* ── Floating Phone Icons ── */
.auth-floating-icons {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.auth-float-icon {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    opacity: 0;
    animation: authFloat linear infinite;
}

.auth-float-icon i {
    font-size: inherit;
}

@keyframes authFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) translateX(0) rotate(0deg) scale(0.6);
    }
    8% {
        opacity: 0.45;
    }
    25% {
        transform: translateY(70vh) translateX(calc(var(--drift, 0px) * 0.4)) rotate(90deg) scale(0.8);
    }
    50% {
        opacity: 0.25;
        transform: translateY(40vh) translateX(var(--drift, 0px)) rotate(180deg) scale(0.9);
    }
    75% {
        transform: translateY(15vh) translateX(calc(var(--drift, 0px) * 0.6)) rotate(270deg) scale(0.95);
    }
    92% {
        opacity: 0.4;
    }
    100% {
        opacity: 0;
        transform: translateY(-120px) translateX(calc(var(--drift, 0px) * 0.2)) rotate(360deg) scale(1);
    }
}

/* ── Auth Card ── */
.auth-card {
    position: relative;
    z-index: 1;
    width: 100%;
    overflow: hidden;
    border-radius: 1.25rem;
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 27, 75, 0.92) 50%, rgba(15, 23, 42, 0.95) 100%);
    border: 1px solid rgba(99, 102, 241, 0.3);
    box-shadow:
        0 24px 60px rgba(0, 0, 0, 0.45),
        0 0 0 1px rgba(99, 102, 241, 0.08) inset,
        0 0 80px rgba(99, 102, 241, 0.06);
    color: #e2e8f0;
}

.auth-card__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(99, 102, 241, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(99, 102, 241, 0.05) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
    opacity: 0.6;
}

.auth-card__scanline {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(99, 102, 241, 0.04) 50%, transparent 100%);
    background-size: 100% 4px;
    animation: authScanline 8s linear infinite;
    pointer-events: none;
    opacity: 0.4;
}

@keyframes authScanline {
    0% { background-position: 0 -100%; }
    100% { background-position: 0 100%; }
}

.auth-card__glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.25;
    pointer-events: none;
    animation: authGlow 6s ease-in-out infinite;
}

.auth-card__glow--1 {
    width: 200px; height: 200px;
    background: #6366f1;
    top: -60px; right: -40px;
}

.auth-card__glow--2 {
    width: 180px; height: 180px;
    background: #06b6d4;
    bottom: -50px; left: -30px;
    animation-delay: -3s;
}

@keyframes authGlow {
    0%, 100% { opacity: 0.2; transform: scale(1); }
    50% { opacity: 0.35; transform: scale(1.08); }
}

.auth-card__inner {
    position: relative;
    z-index: 1;
    padding: 2.25rem 2rem 2rem;
}

/* ── Brand Header ── */
.auth-brand-icon {
    position: relative;
    width: 64px;
    height: 64px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: #a5b4fc;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(6, 182, 212, 0.15));
    border-radius: 1.15rem;
    border: 1px solid rgba(129, 140, 248, 0.35);
    margin: 0 auto 0.75rem;
}

.auth-brand-icon__ring {
    position: absolute;
    inset: -7px;
    border-radius: 1.35rem;
    border: 1px solid rgba(129, 140, 248, 0.2);
    animation: authRing 2.5s ease-out infinite;
}

@keyframes authRing {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(1.2); opacity: 0; }
}

.auth-title {
    font-size: 1.35rem;
    font-weight: 800;
    background: linear-gradient(90deg, #f8fafc, #c7d2fe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 0.25rem;
}

.auth-subtitle {
    font-size: 0.85rem;
    color: #94a3b8;
}

/* ── Tabs ── */
.auth-tabs {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.auth-tab {
    padding: 0.4rem 1.25rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
    border: 1px solid rgba(129, 140, 248, 0.2);
    color: #94a3b8;
    background: rgba(99, 102, 241, 0.06);
}

.auth-tab:hover {
    color: #c7d2fe;
    border-color: rgba(129, 140, 248, 0.4);
    background: rgba(99, 102, 241, 0.12);
}

.auth-tab--active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(6, 182, 212, 0.15));
    border-color: rgba(129, 140, 248, 0.5);
    color: #e0e7ff;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.15);
}

/* ── Form ── */
.auth-card .form-label {
    color: #94a3b8;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.35rem;
}

.auth-card .form-control {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(129, 140, 248, 0.2);
    color: #f1f5f9;
    border-radius: 0.65rem;
    padding: 0.6rem 0.85rem;
    font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.auth-card .form-control:focus {
    background: rgba(15, 23, 42, 0.85);
    border-color: #818cf8;
    color: #fff;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.auth-card .form-control::placeholder {
    color: #475569;
}

.auth-card .form-check-input {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(129, 140, 248, 0.3);
}

.auth-card .form-check-input:checked {
    background-color: #6366f1;
    border-color: #6366f1;
}

.auth-card .form-check-label {
    color: #94a3b8;
}

.auth-card .form-select {
    background-color: rgba(15, 23, 42, 0.6);
    border-color: rgba(129, 140, 248, 0.2);
    color: #f1f5f9;
    border-radius: 0.65rem;
}

.auth-card .form-select:focus {
    background-color: rgba(15, 23, 42, 0.85);
    border-color: #818cf8;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

/* ── Button ── */
.btn-auth-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 50%, #0891b2 100%);
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: 0.7rem;
    padding: 0.7rem 1rem;
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.35);
    transition: transform 0.15s, box-shadow 0.15s;
    position: relative;
    overflow: hidden;
}

.btn-auth-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.12), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}

.btn-auth-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 36px rgba(99, 102, 241, 0.5);
    color: #fff;
}

.btn-auth-primary:hover::before {
    transform: translateX(100%);
}

/* ── Links ── */
.auth-link {
    color: #a5b4fc;
    text-decoration: none;
    font-size: 0.84rem;
    transition: color 0.15s;
}

.auth-link:hover {
    color: #c7d2fe;
}

.auth-link--muted {
    color: #64748b;
}

.auth-link--muted:hover {
    color: #94a3b8;
}

/* ── SMS Note ── */
.auth-sms-note {
    margin-top: 0.75rem;
    padding: 0.55rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(99, 102, 241, 0.06);
    border: 1px solid rgba(129, 140, 248, 0.15);
    font-size: 0.75rem;
    color: #64748b;
    text-align: center;
    line-height: 1.5;
}

.auth-sms-note i {
    color: #818cf8;
    margin-right: 0.2rem;
}

/* ── Info Alert (register) ── */
.auth-info-box {
    padding: 0.65rem 0.85rem;
    border-radius: 0.65rem;
    background: rgba(6, 182, 212, 0.08);
    border: 1px solid rgba(34, 211, 238, 0.2);
    font-size: 0.8rem;
    color: #94a3b8;
    margin-bottom: 1.25rem;
}

.auth-info-box i {
    color: #22d3ee;
    margin-right: 0.25rem;
}

.auth-info-box strong {
    color: #e0e7ff;
}

/* ── Small text ── */
.auth-card small.text-muted,
.auth-card .text-muted {
    color: #64748b !important;
}

/* ── Alerts ── */
.guest-page--auth .alert {
    border: none;
    border-radius: 0.75rem;
    backdrop-filter: blur(8px);
}

.guest-page--auth .alert-success {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(52, 211, 153, 0.3);
}

.guest-page--auth .alert-danger,
.guest-page--auth .alert-error {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.3);
}

.guest-page--auth .alert-warning {
    background: rgba(245, 158, 11, 0.12);
    color: #fcd34d;
    border: 1px solid rgba(251, 191, 36, 0.3);
}

.guest-page--auth .alert-info {
    background: rgba(6, 182, 212, 0.1);
    color: #67e8f9;
    border: 1px solid rgba(34, 211, 238, 0.25);
}

.guest-page--auth .btn-close {
    filter: invert(1) opacity(0.5);
}

/* ── Wide variant (register) ── */
.guest-page--auth .guest-container--wide {
    max-width: 560px;
}

/* ── Responsive ── */
@media (max-width: 576px) {
    .auth-card__inner {
        padding: 1.5rem 1.25rem 1.25rem;
    }
    .auth-title {
        font-size: 1.15rem;
    }
    .auth-brand-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
    }
}
