/**
 * AI Reports Styles - PREMIUM EDITION
 * ProductiveApp v4.0
 *
 * Ultra smooth animations & beautiful effects
 */

/* =============================================
   CSS VARIABLES
   ============================================= */

:root {
    --ai-gradient-1: linear-gradient(135deg, #e07840 0%, #f59e0b 50%, #fbbf24 100%);
    --ai-gradient-2: linear-gradient(135deg, #8b5cf6 0%, #ec4899 100%);
    --ai-gradient-3: linear-gradient(135deg, #10b981 0%, #34d399 100%);
    --ai-glass: rgba(255, 255, 255, 0.05);
    --ai-glass-border: rgba(255, 255, 255, 0.1);
    --ai-shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.1);
    --ai-shadow-glow: 0 0 40px rgba(224, 120, 64, 0.3);
}

/* =============================================
   DASHBOARD LAYOUT
   ============================================= */

.ai-reports-dashboard {
    padding: 32px;
    max-width: 1400px;
    margin: 0 auto;
    animation: ai-pageEnter 0.6s ease-out;
}

@keyframes ai-pageEnter {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 40px;
    flex-wrap: wrap;
    gap: 24px;
}

.ai-reports-title h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin: 0 0 8px 0;
    background: var(--ai-gradient-1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: ai-shimmer 3s ease-in-out infinite;
    background-size: 200% 100%;
}

@keyframes ai-shimmer {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.ai-reports-title p {
    color: var(--text-muted);
    margin: 0;
    font-size: 1rem;
    opacity: 0.8;
}

.ai-reports-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

/* =============================================
   PREMIUM BUTTONS
   ============================================= */

.ai-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 24px;
    border: none;
    border-radius: 14px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    isolation: isolate;
}

.ai-btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.2) 0%, transparent 50%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.4s;
}

.ai-btn::after {
    content: '';
    position: absolute;
    inset: -50%;
    background: conic-gradient(from 0deg, transparent, rgba(255,255,255,0.3), transparent 30%);
    animation: ai-btnRotate 4s linear infinite;
    opacity: 0;
    z-index: -1;
}

@keyframes ai-btnRotate {
    to { transform: rotate(360deg); }
}

.ai-btn:hover::before {
    opacity: 1;
}

.ai-btn:hover::after {
    opacity: 1;
}

.ai-btn-primary {
    background: var(--ai-gradient-1);
    color: white;
    box-shadow: 0 4px 20px rgba(224, 120, 64, 0.4),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.ai-btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(224, 120, 64, 0.5),
                0 0 60px rgba(224, 120, 64, 0.2),
                inset 0 1px 0 rgba(255,255,255,0.3);
}

.ai-btn-primary:active {
    transform: translateY(-1px) scale(0.98);
}

.ai-btn-secondary {
    background: var(--ai-glass);
    color: var(--text);
    border: 1px solid var(--ai-glass-border);
    backdrop-filter: blur(10px);
}

.ai-btn-secondary:hover {
    background: rgba(224, 120, 64, 0.1);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.ai-btn-accent {
    background: var(--ai-gradient-2);
    color: white;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.4),
                inset 0 1px 0 rgba(255,255,255,0.2);
}

.ai-btn-accent:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5),
                0 0 60px rgba(139, 92, 246, 0.2);
}

.ai-btn-ghost {
    background: transparent;
    color: var(--accent);
    padding: 10px 18px;
}

.ai-btn-ghost:hover {
    background: rgba(224, 120, 64, 0.1);
    transform: translateX(4px);
}

.ai-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.ai-btn-icon {
    font-size: 1.2rem;
    transition: transform 0.3s;
}

.ai-btn:hover .ai-btn-icon {
    transform: scale(1.2) rotate(10deg);
}

/* Premium Spinner */
.ai-spinner {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-top-color: white;
    border-radius: 50%;
    animation: ai-spin 0.8s cubic-bezier(0.5, 0, 0.5, 1) infinite;
}

@keyframes ai-spin {
    to { transform: rotate(360deg); }
}

/* Select */
.ai-select {
    padding: 14px 44px 14px 18px;
    border: 1px solid var(--ai-glass-border);
    border-radius: 14px;
    background: var(--ai-glass);
    backdrop-filter: blur(10px);
    color: var(--text);
    font-size: 0.95rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23e07840' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 18px center;
    transition: all 0.3s;
}

.ai-select:hover, .ai-select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(224, 120, 64, 0.15);
    outline: none;
}

/* =============================================
   STATS CARDS - GLASSMORPHISM
   ============================================= */

.ai-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.ai-stat-card {
    background: var(--ai-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ai-glass-border);
    border-radius: 20px;
    padding: 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--ai-gradient-1);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-stat-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 0%, rgba(224, 120, 64, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
}

.ai-stat-card:not(.loading)::before {
    transform: scaleX(1);
}

.ai-stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--ai-shadow-glow);
    border-color: rgba(224, 120, 64, 0.3);
}

.ai-stat-card:hover::after {
    opacity: 1;
}

.ai-stat-card.loading {
    animation: ai-pulse 1.5s ease-in-out infinite;
}

@keyframes ai-pulse {
    0%, 100% { opacity: 0.5; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.01); }
}

.ai-stat-icon {
    font-size: 2.5rem;
    margin-bottom: 16px;
    filter: drop-shadow(0 4px 8px rgba(0,0,0,0.2));
    animation: ai-iconFloat 3s ease-in-out infinite;
}

@keyframes ai-iconFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-5px); }
}

.ai-stat-value {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text) 0%, var(--score-color, var(--accent)) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
    z-index: 1;
}

.ai-stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 500;
}

/* =============================================
   CHARTS - PREMIUM CARDS
   ============================================= */

.ai-charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 28px;
    margin-bottom: 40px;
}

.ai-chart-card {
    background: var(--ai-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ai-glass-border);
    border-radius: 20px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: all 0.4s ease;
}

.ai-chart-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(224, 120, 64, 0.5), transparent 40%, transparent 60%, rgba(245, 158, 11, 0.3));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.4s;
}

.ai-chart-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--ai-shadow-soft), 0 0 40px rgba(224, 120, 64, 0.1);
}

.ai-chart-card:hover::before {
    opacity: 1;
}

.ai-chart-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ai-chart-container {
    position: relative;
    height: 240px;
}

/* =============================================
   ANALYSIS SECTION - GLASSMORPHISM
   ============================================= */

.ai-analysis-section {
    background: var(--ai-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ai-glass-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.ai-analysis-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(224, 120, 64, 0.05) 0%, transparent 50%);
    animation: ai-ambientRotate 20s linear infinite;
}

@keyframes ai-ambientRotate {
    to { transform: rotate(360deg); }
}

.ai-analysis-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    position: relative;
    z-index: 1;
}

.ai-analysis-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--text);
}

.ai-analysis-placeholder {
    color: var(--text-muted);
    text-align: center;
    padding: 60px;
    font-style: italic;
    font-size: 1.1rem;
}

.ai-analysis-card {
    display: flex;
    gap: 32px;
    margin-bottom: 28px;
    align-items: flex-start;
    position: relative;
    z-index: 1;
}

.ai-analysis-score {
    text-align: center;
    flex-shrink: 0;
}

.ai-score-circle {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: conic-gradient(
        var(--score-color, var(--accent)) calc(var(--score, 0) * 3.6deg),
        rgba(255,255,255,0.1) 0deg
    );
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 12px;
    box-shadow: 0 0 30px rgba(224, 120, 64, 0.3);
    animation: ai-scorePulse 2s ease-in-out infinite;
}

@keyframes ai-scorePulse {
    0%, 100% { box-shadow: 0 0 30px rgba(224, 120, 64, 0.3); }
    50% { box-shadow: 0 0 50px rgba(224, 120, 64, 0.5); }
}

.ai-score-circle::before {
    content: '';
    position: absolute;
    inset: 10px;
    background: var(--bg-card);
    border-radius: 50%;
}

.ai-score-circle span {
    position: relative;
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--text);
}

.ai-analysis-score > span {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.ai-analysis-text {
    flex: 1;
}

.ai-analysis-text p {
    color: var(--text);
    line-height: 1.8;
    margin: 0;
    font-size: 1rem;
}

/* SWOT Sections - Premium */
.ai-swot-section {
    padding: 20px 24px;
    border-radius: 16px;
    margin-bottom: 20px;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.ai-swot-section:hover {
    transform: translateX(4px);
}

.ai-swot-section h4 {
    margin: 0 0 14px 0;
    font-size: 1rem;
    font-weight: 600;
}

.ai-swot-section ul {
    margin: 0;
    padding-left: 24px;
}

.ai-swot-section li {
    color: var(--text);
    margin-bottom: 8px;
    line-height: 1.6;
}

.ai-strengths {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(16, 185, 129, 0.05) 100%);
    border-left: 4px solid #10b981;
}

.ai-weaknesses {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.15) 0%, rgba(245, 158, 11, 0.05) 100%);
    border-left: 4px solid #f59e0b;
}

.ai-recommendations {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-left: 4px solid #3b82f6;
    padding: 20px 24px;
    border-radius: 16px;
}

.ai-recommendations h4 {
    margin: 0 0 14px 0;
}

.ai-recommendations ul {
    margin: 0;
    padding-left: 24px;
}

.ai-recommendations li {
    color: var(--text);
    margin-bottom: 10px;
    line-height: 1.6;
}

/* =============================================
   REPORTS LIST - PREMIUM
   ============================================= */

.ai-reports-history {
    background: var(--ai-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--ai-glass-border);
    border-radius: 24px;
    padding: 32px;
    margin-bottom: 40px;
}

.ai-reports-history h3 {
    margin: 0 0 24px 0;
    font-size: 1.3rem;
    color: var(--text);
}

.ai-reports-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.ai-report-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid transparent;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.ai-report-item:hover {
    background: rgba(224, 120, 64, 0.1);
    border-color: rgba(224, 120, 64, 0.3);
    transform: translateX(8px);
    box-shadow: -8px 0 30px rgba(224, 120, 64, 0.1);
}

.ai-report-item-icon {
    font-size: 1.8rem;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--ai-glass);
    border-radius: 14px;
    transition: transform 0.3s;
}

.ai-report-item:hover .ai-report-item-icon {
    transform: scale(1.1) rotate(5deg);
}

.ai-report-item-info {
    flex: 1;
}

.ai-report-item-info h4 {
    margin: 0 0 6px 0;
    font-size: 1.05rem;
    color: var(--text);
    font-weight: 600;
}

.ai-report-item-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.ai-report-item-score {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--score-color, var(--accent));
    padding: 10px 20px;
    background: linear-gradient(135deg, rgba(224, 120, 64, 0.15), rgba(224, 120, 64, 0.05));
    border-radius: 24px;
    border: 1px solid rgba(224, 120, 64, 0.2);
}

.ai-no-reports {
    color: var(--text-muted);
    text-align: center;
    padding: 60px;
    font-size: 1.1rem;
}

/* =============================================
   META SYNTHESIS - PREMIUM
   ============================================= */

.ai-meta-section {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.15) 0%, rgba(236, 72, 153, 0.15) 100%);
    border-radius: 24px;
    padding: 40px;
    text-align: center;
    border: 1px solid rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.ai-meta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 30% 50%, rgba(139, 92, 246, 0.2) 0%, transparent 50%),
                radial-gradient(circle at 70% 50%, rgba(236, 72, 153, 0.2) 0%, transparent 50%);
    animation: ai-metaGlow 4s ease-in-out infinite alternate;
}

@keyframes ai-metaGlow {
    0% { opacity: 0.5; }
    100% { opacity: 1; }
}

.ai-meta-header {
    position: relative;
    z-index: 1;
}

.ai-meta-header h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    color: var(--text);
}

.ai-meta-header p {
    color: var(--text-muted);
    margin: 0 0 28px 0;
    font-size: 1rem;
}

/* =============================================
   MODAL - ULTRA PREMIUM
   ============================================= */

.ai-report-modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    transition: opacity 0.4s ease;
    padding: 24px;
}

.ai-report-modal.open {
    opacity: 1;
}

.ai-report-modal-content {
    background: var(--bg-card);
    border-radius: 28px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transform: scale(0.85) translateY(40px);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.4),
                0 0 100px rgba(224, 120, 64, 0.1);
    border: 1px solid var(--ai-glass-border);
}

.ai-report-modal.open .ai-report-modal-content {
    transform: scale(1) translateY(0);
}

.ai-report-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 28px 32px;
    background: var(--ai-gradient-1);
    position: relative;
    overflow: hidden;
}

.ai-report-modal-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: ai-headerShine 3s ease-in-out infinite;
}

@keyframes ai-headerShine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ai-report-modal-header h2 {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    color: white;
    position: relative;
    z-index: 1;
}

.ai-modal-close {
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.2);
    color: white;
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.ai-modal-close:hover {
    background: rgba(255,255,255,0.3);
    transform: rotate(90deg) scale(1.1);
}

.ai-report-modal-body {
    padding: 32px;
    overflow-y: auto;
    flex: 1;
}

.ai-report-score-large {
    text-align: center;
    margin-bottom: 40px;
}

.ai-score-ring {
    width: 140px;
    height: 140px;
    margin: 0 auto 16px;
    position: relative;
    filter: drop-shadow(0 0 20px rgba(224, 120, 64, 0.4));
}

.ai-score-ring svg {
    transform: rotate(-90deg);
    animation: ai-ringAppear 1s ease-out;
}

@keyframes ai-ringAppear {
    from {
        opacity: 0;
        transform: rotate(-90deg) scale(0.8);
    }
    to {
        opacity: 1;
        transform: rotate(-90deg) scale(1);
    }
}

.ai-score-ring circle:last-child {
    animation: ai-scoreFill 1.5s ease-out forwards;
    stroke-dasharray: 0 283;
}

@keyframes ai-scoreFill {
    to {
        stroke-dasharray: var(--score-dash, 0) 283;
    }
}

.ai-score-value {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    font-weight: 800;
    color: var(--text);
    animation: ai-valueAppear 0.5s ease-out 0.5s both;
}

@keyframes ai-valueAppear {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.ai-score-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 2px;
}

.ai-report-analysis {
    margin-bottom: 32px;
}

.ai-report-analysis h3 {
    margin: 0 0 20px 0;
    color: var(--text);
    font-size: 1.2rem;
}

.ai-report-analysis p {
    color: var(--text);
    line-height: 1.9;
    white-space: pre-wrap;
    font-size: 1rem;
}

/* Full SWOT in modal */
.ai-swot {
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    animation: ai-swotAppear 0.5s ease-out both;
}

.ai-swot:nth-child(1) { animation-delay: 0.1s; }
.ai-swot:nth-child(2) { animation-delay: 0.2s; }
.ai-swot:nth-child(3) { animation-delay: 0.3s; }
.ai-swot:nth-child(4) { animation-delay: 0.4s; }

@keyframes ai-swotAppear {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.ai-swot h3 {
    margin: 0 0 18px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.ai-swot ul, .ai-swot ol {
    margin: 0;
    padding-left: 28px;
}

.ai-swot li {
    margin-bottom: 12px;
    line-height: 1.8;
    font-size: 1.15rem;
}

.ai-strengths-full {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.35) 0%, rgba(16, 185, 129, 0.2) 100%);
    border: 1px solid rgba(16, 185, 129, 0.5);
}

.ai-weaknesses-full {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.35) 0%, rgba(245, 158, 11, 0.2) 100%);
    border: 1px solid rgba(245, 158, 11, 0.5);
}

.ai-opportunities {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.35) 0%, rgba(59, 130, 246, 0.2) 100%);
    border: 1px solid rgba(59, 130, 246, 0.5);
}

.ai-threats {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.35) 0%, rgba(239, 68, 68, 0.2) 100%);
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.ai-recommendations-full {
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.35) 0%, rgba(139, 92, 246, 0.2) 100%);
    border: 1px solid rgba(139, 92, 246, 0.5);
    padding: 24px;
    border-radius: 16px;
}

.ai-recommendations-full h3 {
    margin: 0 0 18px 0;
    font-size: 1.4rem;
    font-weight: 700;
}

.ai-recommendations-full ol {
    margin: 0;
    padding-left: 28px;
    counter-reset: item;
}

.ai-recommendations-full li {
    margin-bottom: 16px;
    line-height: 1.8;
    color: var(--text);
    font-size: 1.15rem;
}

.ai-report-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 16px;
    padding: 24px 32px;
    background: var(--ai-glass);
    border-top: 1px solid var(--ai-glass-border);
}

/* =============================================
   RESPONSIVE
   ============================================= */

@media (max-width: 768px) {
    .ai-reports-dashboard {
        padding: 20px;
    }

    .ai-reports-header {
        flex-direction: column;
    }

    .ai-reports-title h2 {
        font-size: 1.8rem;
    }

    .ai-reports-actions {
        width: 100%;
    }

    .ai-reports-actions .ai-btn {
        flex: 1;
        justify-content: center;
    }

    .ai-stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .ai-stat-value {
        font-size: 2rem;
    }

    .ai-charts-grid {
        grid-template-columns: 1fr;
    }

    .ai-analysis-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .ai-report-modal-content {
        max-height: 95vh;
        margin: 10px;
        border-radius: 20px;
    }

    .ai-report-modal-header {
        padding: 20px 24px;
    }

    .ai-report-modal-body {
        padding: 24px;
    }
}

/* =============================================
   ENTRANCE ANIMATIONS
   ============================================= */

.ai-stat-card,
.ai-chart-card,
.ai-report-item {
    animation: ai-fadeSlideUp 0.6s ease-out both;
}

@keyframes ai-fadeSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.ai-stat-card:nth-child(1) { animation-delay: 0.1s; }
.ai-stat-card:nth-child(2) { animation-delay: 0.15s; }
.ai-stat-card:nth-child(3) { animation-delay: 0.2s; }
.ai-stat-card:nth-child(4) { animation-delay: 0.25s; }

.ai-chart-card:nth-child(1) { animation-delay: 0.2s; }
.ai-chart-card:nth-child(2) { animation-delay: 0.3s; }
.ai-chart-card:nth-child(3) { animation-delay: 0.4s; }
.ai-chart-card:nth-child(4) { animation-delay: 0.5s; }

.ai-report-item:nth-child(1) { animation-delay: 0.1s; }
.ai-report-item:nth-child(2) { animation-delay: 0.15s; }
.ai-report-item:nth-child(3) { animation-delay: 0.2s; }
.ai-report-item:nth-child(4) { animation-delay: 0.25s; }
.ai-report-item:nth-child(5) { animation-delay: 0.3s; }

/* Error state */
.ai-error {
    color: #ef4444;
    text-align: center;
    padding: 40px;
    font-size: 1rem;
}

/* =============================================
   FULLPAGE VIEW & NAVIGATION
   ============================================= */

.ai-reports-fullpage {
    min-height: 100vh;
    padding-top: 20px;
    background: linear-gradient(180deg, rgba(0,0,0,0.1) 0%, transparent 100%);
}

.ai-reports-fullpage.hidden {
    display: none;
}

.ai-reports-nav {
    padding: 16px 32px;
    margin-bottom: 8px;
}

.ai-btn-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--ai-glass);
    border: 1px solid var(--ai-glass-border);
    border-radius: 12px;
    color: var(--text, #ffffff);
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ai-btn-back:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(-4px);
    box-shadow: var(--ai-shadow-soft);
}

.ai-btn-back span {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.ai-btn-back:hover span {
    transform: translateX(-4px);
}

/* Hide tasks view when showing reports */
.view-tasks.hidden {
    display: none !important;
}
