@charset "UTF-8";

/* --- 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; }
.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); }

/* FIX: Upgraded to 4 columns to fit the new Usage Card */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 25px; }
.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-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%; height: 350px; position: relative; }

.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; }

/* =========================================
   MOBILE RESPONSIVENESS (DASHBOARD)
   ========================================= */
@media screen and (max-width: 768px) {
    /* Prevent Structure Break on Graph */
    .chart-section { 
        max-width: 100vw !important; 
        overflow: hidden !important; 
        box-sizing: border-box !important; 
        width: 100% !important; 
        padding: 20px !important;
        padding-bottom: 40px !important; /* Gives room for X-axis labels */
    }
    
    /* Constrain the ChartJS Canvas */
    .canvas-wrapper { 
        position: relative !important; 
        height: 300px !important; 
        width: 100% !important; 
        max-width: 100% !important; 
        padding-bottom: 30px !important; 
        box-sizing: border-box !important;
    }
}