@charset "UTF-8";

/* --- GLOBAL SCROLLBARS & BODY --- */
body { overflow-x: hidden; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-main); }
::-webkit-scrollbar-thumb { background: #334155; border-radius: 10px; }

/* --- PREMIUM DASHBOARD STYLES --- */
.dashboard-wrapper { position: relative; max-width: 1200px; margin: 0 auto; padding: 30px; height: 100vh; overflow-y: auto; z-index: 10; }

.ambient-glow { position: fixed; border-radius: 50%; filter: blur(100px); opacity: 0.15; z-index: 0; pointer-events: none; }
.glow-1 { top: -10%; left: -10%; width: 50vw; height: 50vw; background: #38bdf8; animation: float 10s infinite ease-in-out; }
.glow-2 { bottom: -10%; right: -10%; width: 40vw; height: 40vw; background: #8b5cf6; animation: float 12s infinite ease-in-out reverse; }

@keyframes float { 0% { transform: translateY(0) scale(1); } 50% { transform: translateY(-30px) scale(1.05); } 100% { transform: translateY(0) scale(1); } }

.glass-header { display: flex; justify-content: space-between; align-items: center; background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border: 1px solid rgba(255, 255, 255, 0.08); padding: 15px 30px; border-radius: 20px; margin-bottom: 40px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
.brand { display: flex; align-items: center; gap: 15px; }
.dash-logo { height: 40px; width: auto; }
.brand-text { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.5px; }

.back-btn { background: rgba(255, 255, 255, 0.05); color: var(--text); padding: 10px 20px; border-radius: 12px; font-weight: 600; font-size: 0.9rem; display: flex; align-items: center; gap: 8px; border: 1px solid rgba(255, 255, 255, 0.1); transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
.back-btn:hover { background: var(--accent-solid); color: white; transform: translateX(-5px); box-shadow: 0 0 20px rgba(56, 189, 248, 0.4); border-color: var(--accent-solid); }

.dashboard-content { display: flex; flex-direction: column; gap: 25px; }
.bento-card { background: rgba(30, 41, 59, 0.4); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border: 1px solid rgba(255, 255, 255, 0.05); border-radius: 24px; padding: 30px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1); transition: transform 0.3s ease, border-color 0.3s ease; position: relative; overflow: hidden; }
.bento-card:hover { border-color: rgba(255, 255, 255, 0.15); transform: translateY(-2px); }

.welcome-banner { background: linear-gradient(135deg, rgba(37, 99, 235, 0.1), rgba(139, 92, 246, 0.1)); display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.welcome-banner h1 { margin: 0 0 10px 0; font-size: 2.2rem; background: var(--accent); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.welcome-banner p { margin: 0; color: var(--text-muted); font-size: 1.1rem; }
.background-icon { position: absolute; right: -20px; top: -30px; font-size: 15rem; opacity: 0.03; transform: rotate(-15deg); }

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; margin-bottom: 20px; }
.stat-card { display: flex; align-items: center; gap: 20px; padding: 25px 30px; }
.stat-icon-wrapper { width: 60px; height: 60px; border-radius: 16px; display: flex; justify-content: center; align-items: center; font-size: 1.5rem; }
.pulse-blue { background: rgba(56, 189, 248, 0.15); color: #38bdf8; box-shadow: 0 0 20px rgba(56, 189, 248, 0.2); }
.pulse-purple { background: rgba(139, 92, 246, 0.15); color: #8b5cf6; box-shadow: 0 0 20px rgba(139, 92, 246, 0.2); }
.pulse-green { background: rgba(16, 185, 129, 0.15); color: #10b981; box-shadow: 0 0 20px rgba(16, 185, 129, 0.2); }

.stat-info { display: flex; flex-direction: column; gap: 5px; }
.stat-label { margin: 0; color: var(--text-muted); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; font-weight: 600; }
.stat-num { margin: 0; font-size: 2.2rem; font-weight: 900; color: var(--text); }

.chart-section { width: 100%; box-sizing: border-box; overflow: hidden; }
.chart-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }
.chart-header h3 { margin: 0; font-size: 1.3rem; font-weight: 700; }
.badge { background: rgba(56, 189, 248, 0.1); color: #38bdf8; padding: 5px 12px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; border: 1px solid rgba(56, 189, 248, 0.2); }
.canvas-wrapper { width: 100%; max-width: 100%; height: 350px; position: relative; padding-bottom: 20px; }

.fade-in-up { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; opacity: 0; transform: translateY(20px); }
@keyframes fadeInUp { to { opacity: 1; transform: translateY(0); } }
.light-theme .glass-header, .light-theme .bento-card { background: rgba(255, 255, 255, 0.7); border: 1px solid rgba(0, 0, 0, 0.05); }
.light-theme .ambient-glow { opacity: 0.3; }
.light-theme .back-btn { background: white; color: var(--text); border: 1px solid var(--border); box-shadow: 0 4px 10px rgba(0,0,0,0.05); }

/* =========================================
   USAGE RING WIDGET STYLES
   ========================================= */
.usage-card { flex-direction: row; gap: 15px; padding: 15px 25px; }
.progress-container { position: relative; width: 80px; height: 80px; flex-shrink: 0; }
.progress-ring { transform: rotate(-90deg); overflow: visible; }
.progress-ring__bar { transition: stroke-dashoffset 0.8s ease-out, stroke 0.5s ease; transform-origin: 50% 50%; stroke-linecap: round; filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.6)); }
.progress-text { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; }
.progress-text span { font-size: 1.1rem; font-weight: 800; color: #fff; line-height: 1.1; }
.progress-text small { font-size: 0.55rem; color: #94a3b8; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; }
.usage-info { justify-content: center; }
.usage-info .stat-num { font-size: 1.6rem; display: flex; align-items: baseline; gap: 4px; }
.usage-info .limit-divider { font-size: 1rem; color: #64748b; font-weight: 400; }
.usage-info #queries-limit { font-size: 1.2rem; color: #94a3b8; }

/* =========================================
   PRO UPGRADE MODAL STYLES
   ========================================= */
.tip-jar-float { position: fixed; bottom: 30px; right: 30px; background: linear-gradient(135deg, #3b82f6, #8b5cf6); color: white; border: none; padding: 14px 24px; border-radius: 50px; font-size: 1rem; font-weight: 700; cursor: pointer; box-shadow: 0 10px 25px rgba(139, 92, 246, 0.4); z-index: 100; transition: transform 0.3s; display: flex; align-items: center; gap: 8px; }
.tip-jar-float:hover { transform: translateY(-5px) scale(1.05); box-shadow: 0 15px 35px rgba(139, 92, 246, 0.6); }

.modal-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background: rgba(11, 17, 33, 0.85); backdrop-filter: blur(10px); display: flex; justify-content: center; align-items: center; z-index: 1000; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
.modal-overlay.show { opacity: 1; pointer-events: auto; }
.modal-content { max-width: 700px; width: 90%; max-height: 90vh; overflow-y: auto; background: #151e32; border: 1px solid rgba(255,255,255,0.1); border-radius: 24px; padding: 35px; position: relative; text-align: center; transform: translateY(30px); transition: transform 0.3s ease; box-shadow: 0 20px 50px rgba(0,0,0,0.5); }
.modal-overlay.show .modal-content { transform: translateY(0); }

.modal-content::-webkit-scrollbar { width: 6px; }
.modal-content::-webkit-scrollbar-track { background: transparent; }
.modal-content::-webkit-scrollbar-thumb { background: #38bdf8; border-radius: 10px; }

.close-btn { position: absolute; top: 15px; right: 15px; background: #1e293b; border: none; color: #94a3b8; font-size: 1.2rem; cursor: pointer; transition: color 0.2s; width: 32px; height: 32px; border-radius: 50%; display: flex; justify-content: center; align-items: center; z-index: 10; }
.close-btn:hover { color: #ef4444; }

.modal-header h3 { font-size: 1.8rem; margin-bottom: 10px; color: #fff; margin-top: 10px; }
.modal-header p { color: #94a3b8; font-size: 0.95rem; line-height: 1.6; margin-bottom: 20px; }

.upgrade-bento { max-width: 700px !important; padding: 35px !important; width: 90%; }
.alert-box { background: rgba(56, 189, 248, 0.1); border-left: 4px solid #38bdf8; padding: 15px; border-radius: 8px; color: #e2e8f0; font-size: 0.9rem; text-align: left; margin-bottom: 25px; line-height: 1.5; }
.pricing-split { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.plan-card { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.1); border-radius: 16px; padding: 25px 20px; position: relative; display: flex; flex-direction: column; align-items: center; }
.premium-highlight { border-color: #8b5cf6; background: linear-gradient(180deg, rgba(139, 92, 246, 0.05) 0%, rgba(0,0,0,0.2) 100%); box-shadow: 0 0 20px rgba(139, 92, 246, 0.1); }
.popular-tag { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: #8b5cf6; color: white; font-size: 0.75rem; font-weight: 800; padding: 4px 15px; border-radius: 20px; letter-spacing: 1px; white-space: nowrap; }
.plan-card h4 { color: #94a3b8; font-size: 1rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.price { font-size: 2.2rem; font-weight: 900; color: white; margin-bottom: 15px; }
.price span { font-size: 1rem; color: #64748b; font-weight: 600; }
.qr-image { width: 140px; height: 140px; border-radius: 10px; margin-bottom: 15px; background: white; padding: 8px; }
.upi-text { display: block; font-family: monospace; color: #94a3b8; font-size: 0.9rem; margin-bottom: 15px; }
.mobile-pay-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; color: white; padding: 12px 20px; border-radius: 12px; font-weight: 700; text-decoration: none; width: 100%; box-sizing: border-box; margin-top: auto; }
.pro-btn { background: #38bdf8; }
.premium-btn { background: #8b5cf6; }

/* =========================================
   MOBILE RESPONSIVENESS (DASHBOARD CONSOLIDATED)
   ========================================= */
@media screen and (max-width: 768px) {
    /* Deep bottom padding ensuring nothing is hidden by the screen edge or buttons */
    .dashboard-wrapper { 
        padding: 10px 10px 100px 10px !important; 
        width: 100vw; 
        box-sizing: border-box; 
        overflow-x: hidden; 
    }
    
    .glass-header { padding: 10px 15px; }
    .stats-grid { grid-template-columns: 1fr; gap: 15px; }
    
    .welcome-banner { text-align: center; flex-direction: column; gap: 15px; }
    .banner-text { width: 100%; }
    .background-icon { display: none; }
    
    /* Chart Mobile Adjustments */
    .chart-header { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
    .chart-section { 
        max-width: 100vw !important; 
        overflow: hidden !important; 
        box-sizing: border-box !important; 
        width: 100% !important; 
        padding: 20px !important;
        padding-bottom: 40px !important; 
    }
    .canvas-wrapper { 
        position: relative !important; 
        height: 280px !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        padding-bottom: 50px !important; 
        margin-bottom: 20px !important;
        box-sizing: border-box !important;
    }
    
    /* Pop-Up / Modal Mobile Fixes */
    .pricing-split { 
        grid-template-columns: 1fr; 
        gap: 30px; 
        padding-bottom: 20px; /* Extra space inside so content doesn't hit the bottom edge */
    } 
    
    /* FIXED: Reduced height to 80vh and forced overflow to create the scroll line and show the box end */
    .modal-content { 
        padding: 25px 20px 25px 20px !important; 
        width: 95%; 
        max-height: 80vh !important; /* Guarantees the box is shorter than the physical phone screen */
        overflow-y: auto !important; /* Activates the scrollbar */
    }

    .qr-image { display: block; width: 120px; height: 120px; } 
    .modal-header h3 { font-size: 1.5rem; }
    .tip-jar-float { bottom: 20px; right: 20px; padding: 12px 20px; }
    .mobile-pay-btn { display: inline-flex; }
}

@media (min-width: 769px) { .mobile-pay-btn { display: none; } }