/* analytics.css - Pro Dashboard Styles */

.analytics-container {
    padding-bottom: 2rem;
    animation: fadeIn 0.4s ease-out;
}

.glass-panel {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: auto auto;
    /* Stats Row, Main Row */
    gap: 1rem;
}

/* 1. Top Stat Cards */
.stat-card {
    grid-column: span 1;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 140px;
    position: relative;
    overflow: hidden;
}

.stat-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.2rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 2. Main Chart Area */
.chart-card {
    grid-column: span 2;
    grid-row: span 2;
    padding: 1.5rem;
    min-height: 400px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-container {
    height: 320px;
    width: 100%;
}



/* 4. Recent Activity (Bottom) */
.recent-card {
    grid-column: span 3;
    padding: 1.5rem;
}

.activity-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
}

.activity-row {
    background: rgba(255, 255, 255, 0.02);
    transition: transform 0.2s, background 0.2s;
}

.activity-row:hover {
    background: rgba(255, 255, 255, 0.05);
    /* transform: scale(1.01); user wants simple */
}

.activity-cell {
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.activity-cell:first-child {
    border-left: 1px solid rgba(255, 255, 255, 0.05);
    border-top-left-radius: 8px;
    border-bottom-left-radius: 8px;
}

.activity-cell:last-child {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-done {
    background: rgba(52, 211, 153, 0.1);
    color: #34d399;
}

/* Graphic Table & Sparklines */
.graphic-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.graphic-table th {
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 0.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.graphic-table td {
    padding: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.mini-sparkline {
    display: flex;
    gap: 4px;
    align-items: center;
}

.spark-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
}

.spark-dot.active {
    background: #f472b6;
    box-shadow: 0 0 8px rgba(244, 114, 182, 0.4);
}


@media (max-width: 1000px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        grid-column: span 1;
    }

    .chart-card {
        grid-column: span 2;
    }


    .recent-card {
        grid-column: span 2;
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        width: 100%;
        box-sizing: border-box;
    }

    .stat-card {
        grid-column: span 1;
        height: auto;
        min-height: 120px;
        padding: 1rem;
    }

    .chart-card {
        grid-column: span 1;
        min-height: 300px;
        padding: 1rem;
    }


    .recent-card {
        grid-column: span 1;
        padding: 1rem;
    }

    .activity-cell {
        padding: 0.75rem 0.5rem;
        font-size: 0.8rem;
    }

    .status-badge {
        padding: 2px 8px;
        font-size: 0.65rem;
    }
}
/* ══ Result cards ══ */
.result-ai-card { background:linear-gradient(135deg,rgba(129,140,248,.06),transparent)!important; border:1px solid rgba(129,140,248,.15)!important; }
.result-weekly-card { background:linear-gradient(135deg,rgba(251,146,60,.06),transparent)!important; border:1px solid rgba(251,146,60,.15)!important; }
.result-action-btn { background:linear-gradient(135deg,#818cf8,#6366f1);border:none;color:#fff;padding:.5rem 1.25rem;border-radius:100px;font-size:.8rem;font-weight:700;cursor:pointer;font-family:var(--font-main);outline:none;-webkit-tap-highlight-color:transparent;transition:filter .2s;white-space:nowrap; }
.result-action-btn.weekly { background:linear-gradient(135deg,#fb923c,#f59e0b); }
.result-action-btn:hover { filter:brightness(1.12); }
.result-action-btn:disabled { opacity:.6;cursor:not-allowed;filter:none; }
.result-placeholder { font-size:.88rem;color:var(--text-muted);font-style:italic;line-height:1.6; }
.ai-spinner { width:16px;height:16px;flex-shrink:0;border:2px solid rgba(255,255,255,.1);border-top-color:var(--accent-primary);border-radius:50%;animation:aiSpin .7s linear infinite; }
@keyframes aiSpin { to{transform:rotate(360deg)} }
.ai-row { display:flex;align-items:flex-start;gap:.75rem;padding:.75rem;border-radius:10px;margin-bottom:.5rem;font-size:.85rem;line-height:1.6;color:var(--text-secondary); }
.ai-row.good { background:rgba(52,211,153,.07); }
.ai-row.warn { background:rgba(251,146,60,.07); }
.ai-row.tip  { background:rgba(129,140,248,.07); }
.ai-tag { font-size:.7rem;font-weight:800;padding:.2rem .6rem;border-radius:20px;white-space:nowrap;flex-shrink:0;margin-top:.1rem; }
.ai-tag.good { background:rgba(52,211,153,.15);color:#34d399; }
.ai-tag.warn { background:rgba(251,146,60,.15);color:#fb923c; }
.ai-tag.tip  { background:rgba(129,140,248,.15);color:#818cf8; }
/* ══ Report system ══ */
.report-tab,.report-style-btn { padding:.45rem 1rem;border:1px solid rgba(255,255,255,.1);border-radius:100px;background:transparent;color:var(--text-muted);font-size:.78rem;font-weight:600;cursor:pointer;transition:all .2s;font-family:var(--font-main);outline:none;-webkit-tap-highlight-color:transparent; }
.report-tab.active,.report-style-btn.active { background:var(--accent-primary);border-color:var(--accent-primary);color:#fff; }
.report-tab:hover:not(.active),.report-style-btn:hover:not(.active) { border-color:rgba(255,255,255,.2);color:var(--text-primary); }
.report-date-input { background:rgba(255,255,255,.05);border:1px solid rgba(255,255,255,.1);border-radius:10px;padding:.45rem .75rem;color:var(--text-primary);font-size:.82rem;font-family:var(--font-main);outline:none;cursor:pointer; }
.report-date-input:focus { border-color:var(--accent-primary); }
.report-action-btn { padding:.55rem 1.25rem;border:1px solid rgba(255,255,255,.1);border-radius:100px;background:rgba(255,255,255,.04);color:var(--text-primary);font-size:.8rem;font-weight:700;cursor:pointer;transition:all .2s;font-family:var(--font-main);outline:none;-webkit-tap-highlight-color:transparent; }
.report-action-btn.primary { background:linear-gradient(135deg,#818cf8,#6366f1);border-color:transparent;color:#fff; }
.report-action-btn:hover { filter:brightness(1.12);transform:translateY(-1px); }
#report-preview { animation:fadeIn .3s ease-out; }

/* ══ Mind Map v3 ══ */
.mm3-btn {
    padding: .4rem .9rem;
    border: 1px solid rgba(255,255,255,.1);
    border-radius: 8px;
    background: rgba(255,255,255,.04);
    color: var(--text-primary);
    font-size: .78rem; font-weight: 700;
    cursor: pointer; transition: all .18s;
    font-family: var(--font-main);
    outline: none; -webkit-tap-highlight-color: transparent;
    white-space: nowrap;
}
.mm3-btn.primary { background:linear-gradient(135deg,#818cf8,#6366f1); border-color:transparent; color:#fff; }
.mm3-btn.danger  { color:#f43f5e; border-color:rgba(244,63,94,.25); }
.mm3-btn.active  { background:rgba(251,146,60,.15); border-color:#fb923c; color:#fb923c; }
.mm3-btn:hover   { filter:brightness(1.15); transform:translateY(-1px); }

.mm3-zoom-btn {
    width: 32px; height: 32px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(13,17,23,.9);
    color: #e2e8f0;
    font-size: 1rem; font-weight: 700;
    cursor: pointer; outline: none;
    display: flex; align-items: center; justify-content: center;
    transition: all .15s;
    backdrop-filter: blur(8px);
    -webkit-tap-highlight-color: transparent;
}
.mm3-zoom-btn:hover { background:rgba(129,140,248,.2); border-color:#818cf8; color:#818cf8; }
