/* ============================================================
   Growth Vault — Login Page Styles
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html.login-page { height: 100%; }
body { min-height: 100vh; background: #06050f; color: #f1f0f5; font-family: 'Inter', sans-serif; display: flex; align-items: center; justify-content: center; overflow-x: hidden; }

/* ---- Animated BG ---- */
.bg-animated {
    position: fixed; inset: 0; z-index: 0;
    background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.18) 0%, transparent 70%),
                radial-gradient(ellipse 60% 40% at 90% 100%, rgba(251,191,36,0.1) 0%, transparent 60%),
                #06050f;
    animation: bgShift 14s ease-in-out infinite;
}
@keyframes bgShift {
    0%, 100% { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(139,92,246,0.18) 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 90% 100%, rgba(251,191,36,0.1) 0%, transparent 60%), #06050f; }
    50% { background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(99,102,241,0.22) 0%, transparent 70%), radial-gradient(ellipse 60% 40% at 10% 100%, rgba(139,92,246,0.12) 0%, transparent 60%), #06050f; }
}

.bg-glow {
    position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0;
    animation: glowPulse 8s ease-in-out infinite;
}
.bg-glow-1 { width: 380px; height: 380px; background: rgba(139,92,246,0.18); top: -14%; left: -8%; }
.bg-glow-2 { width: 320px; height: 320px; background: rgba(251,191,36,0.11); bottom: -10%; right: -6%; animation-delay: -4s; }
.bg-glow-3 { width: 240px; height: 240px; background: rgba(34,197,94,0.07); top: 40%; right: 20%; animation-delay: -7s; }
@keyframes glowPulse {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.12); opacity: 1; }
}

/* ---- Particle dots ---- */
.particles { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.particle {
    position: absolute; border-radius: 50%; background: rgba(139,92,246,0.4);
    animation: particleFly linear infinite;
}
@keyframes particleFly {
    0% { transform: translateY(100vh) rotate(0deg); opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { transform: translateY(-100px) rotate(720deg); opacity: 0; }
}

/* ---- Container ---- */
.login-container {
    position: relative; z-index: 10; width: 100%; display: flex; align-items: center; justify-content: center; padding: 24px 16px; min-height: 100vh;
}
.card-wrapper { width: 100%; max-width: 440px; }

/* ==================== LOGIN CARD ==================== */
.login-card {
    background: linear-gradient(165deg, rgba(24,18,42,0.97) 0%, rgba(14,10,26,0.99) 100%);
    border: 1px solid rgba(139,92,246,0.25); border-radius: 28px;
    padding: 40px 34px; box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(139,92,246,0.1);
    animation: cardAppear 0.7s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes cardAppear { 0% { transform: scale(0.88) translateY(30px); opacity: 0; } 100% { transform: scale(1) translateY(0); opacity: 1; } }

/* Brand */
.brand-header { text-align: center; margin-bottom: 28px; }
.brand-badge {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(251,191,36,0.1); border: 1px solid rgba(251,191,36,0.25);
    border-radius: 25px; padding: 5px 16px; font-size: 10px; font-weight: 700;
    color: #fbbf24; letter-spacing: 2px; margin-bottom: 14px;
}
.brand-badge i { font-size: 13px; }
.brand-title {
    font-family: 'Orbitron', sans-serif; font-size: 24px; font-weight: 900; line-height: 1.15;
    background: linear-gradient(135deg, #fff 0%, #c4b5fd 60%, #fbbf24 100%);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    margin-bottom: 8px;
}
.brand-subtitle { font-size: 13px; color: rgba(255,255,255,0.45); line-height: 1.5; }

/* Logo showcase */
.logo-area { display: flex; justify-content: center; margin-bottom: 28px; }
.logo-showcase { position: relative; width: 110px; height: 110px; display: flex; align-items: center; justify-content: center; }
.logo-orbit { position: absolute; inset: 0; }
.orbit-ring {
    position: absolute; border-radius: 50%; border: 2px solid transparent;
    animation: orbitSpin 5s linear infinite;
}
.orbit-ring-1 { inset: 0; border-top-color: rgba(139,92,246,0.7); border-right-color: rgba(251,191,36,0.4); }
.orbit-ring-2 { inset: 10px; animation-duration: 3.5s; animation-direction: reverse; border-top-color: rgba(251,191,36,0.6); border-right-color: rgba(139,92,246,0.4); }
.orbit-ring-3 { inset: 20px; animation-duration: 7s; border-top-color: rgba(34,197,94,0.5); border-right-color: rgba(139,92,246,0.3); }
@keyframes orbitSpin { to { transform: rotate(360deg); } }
.logo-aura {
    position: absolute; inset: 14px; border-radius: 50%;
    background: radial-gradient(circle, rgba(139,92,246,0.25) 0%, transparent 70%);
    animation: auraPulse 3s ease-in-out infinite;
}
@keyframes auraPulse { 0%, 100% { transform: scale(1); opacity: 0.8; } 50% { transform: scale(1.2); opacity: 1; } }
.logo-img-wrap { position: relative; z-index: 2; width: 54px; height: 54px; display: flex; align-items: center; justify-content: center; }
.logo-img-wrap img { width: 54px; height: 54px; border-radius: 50%; }

/* Auth buttons */
.auth-buttons { margin-bottom: 20px; }
.auth-btn {
    width: 100%; display: flex; align-items: center; justify-content: center; gap: 12px;
    padding: 15px 20px; border-radius: 14px; border: none; cursor: pointer; font-size: 14px; font-weight: 600;
    transition: all 0.2s;
}
.btn-google {
    background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
    color: #fff;
}
.btn-google:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.22); transform: translateY(-1px); }
.google-svg { width: 20px; height: 20px; flex-shrink: 0; }

.security-badge {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    font-size: 12px; color: rgba(255,255,255,0.35); margin-bottom: 16px;
    animation: fadeIn 1s ease 0.4s forwards; opacity: 0;
}
.security-badge i { font-size: 14px; color: #22c55e; }
.terms-text {
    text-align: center; font-size: 11.5px; color: rgba(255,255,255,0.3); line-height: 1.6;
}
.terms-text a { color: rgba(139,92,246,0.8); text-decoration: underline dotted; }

/* ==================== PIN CARD ==================== */
.pin-card {
    background: linear-gradient(165deg, rgba(24,18,42,0.97) 0%, rgba(14,10,26,0.99) 100%);
    border: 1px solid rgba(139,92,246,0.25); border-radius: 28px;
    padding: 36px 30px; display: none; box-shadow: 0 32px 80px rgba(0,0,0,0.6);
    animation: cardAppear 0.5s cubic-bezier(0.34,1.56,0.64,1);
}
.pin-card.visible { display: block; }

.pin-header { text-align: center; margin-bottom: 28px; }
.pin-icon {
    width: 68px; height: 68px; border-radius: 50%;
    background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(99,102,241,0.15));
    border: 2px solid rgba(139,92,246,0.35); display: flex; align-items: center; justify-content: center;
    font-size: 30px; color: #a78bfa; margin: 0 auto 18px;
    animation: iconPop 0.5s cubic-bezier(0.34,1.56,0.64,1) forwards;
}
@keyframes iconPop { 0% { transform: scale(0) rotate(-90deg); } 100% { transform: scale(1) rotate(0); } }
.pin-header h2 { font-family: 'Orbitron', sans-serif; font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.pin-header p { font-size: 13.5px; color: rgba(255,255,255,0.5); line-height: 1.6; }
.pin-header p strong { color: #c4b5fd; }

.pin-digits { display: flex; justify-content: center; gap: 10px; margin-bottom: 6px; }
.pin-digit {
    width: 44px; height: 54px; border-radius: 12px;
    background: rgba(255,255,255,0.04); border: 1.5px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; justify-content: center;
    font-size: 26px; font-weight: 800; color: #fff; transition: all 0.2s;
}
.pin-digit.filled { border-color: rgba(139,92,246,0.6); background: rgba(139,92,246,0.12); }
.pin-digit.filled::after { content: '●'; font-size: 16px; color: #a78bfa; }
.pin-digit.error { border-color: rgba(239,68,68,0.7); background: rgba(239,68,68,0.1); animation: shake 0.4s ease; }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-5px); } 75% { transform: translateX(5px); } }
.pin-digit.success { border-color: rgba(34,197,94,0.7); background: rgba(34,197,94,0.12); }

.pin-error {
    text-align: center; font-size: 12.5px; color: #f87171; margin-bottom: 8px;
    min-height: 20px; opacity: 0; transition: opacity 0.2s;
}
.pin-error.show { opacity: 1; }

.pin-keypad {
    display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 20px;
}
.key-btn {
    height: 58px; border-radius: 14px; background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.08); color: #fff;
    font-size: 20px; font-weight: 600; cursor: pointer; transition: all 0.15s;
    display: flex; align-items: center; justify-content: center;
    font-family: 'Orbitron', sans-serif;
}
.key-btn:hover { background: rgba(139,92,246,0.18); border-color: rgba(139,92,246,0.35); }
.key-btn:active { transform: scale(0.94); background: rgba(139,92,246,0.28); }
.key-del { font-size: 20px; }
.key-submit {
    background: linear-gradient(135deg, #7c3aed, #6d28d9); border: none;
    font-size: 13px; font-weight: 800; letter-spacing: 1.5px;
    box-shadow: 0 4px 0 #4c1d95;
}
.key-submit:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 6px 0 #4c1d95; }
.key-submit:active { transform: translateY(1px); box-shadow: 0 2px 0 #4c1d95; }
.key-submit:disabled { opacity: 0.35; cursor: not-allowed; transform: none; box-shadow: 0 4px 0 #4c1d95; }

/* ==================== TOAST ==================== */
#toast {
    position: fixed; bottom: 28px; left: 50%; transform: translateX(-50%) translateY(60px);
    background: rgba(30,22,50,0.97); border: 1px solid rgba(139,92,246,0.3);
    border-radius: 14px; padding: 14px 24px; font-size: 14px; font-weight: 600;
    color: #fff; z-index: 9999; pointer-events: none; white-space: nowrap;
    transition: transform 0.35s cubic-bezier(0.34,1.56,0.64,1), opacity 0.3s;
    opacity: 0;
}
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.error { border-color: rgba(239,68,68,0.4); }
#toast.success { border-color: rgba(34,197,94,0.4); }

/* ==================== LOADING OVERLAY ==================== */
.loading-overlay {
    position: fixed; inset: 0; background: rgba(6,5,15,0.85); backdrop-filter: blur(8px);
    z-index: 9000; display: none; align-items: center; justify-content: center; flex-direction: column; gap: 18px;
}
.loading-overlay.show { display: flex; }
.loading-spinner {
    width: 52px; height: 52px; border-radius: 50%;
    border: 3px solid rgba(139,92,246,0.2); border-top-color: #8b5cf6;
    animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { font-size: 13.5px; color: rgba(255,255,255,0.6); font-weight: 500; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
