/* Analytics Dashboard Styles */

.analytics-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px;
}

/* Header */
.analytics-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
    padding-bottom: 24px;
    border-bottom: 2px solid #f1f5f9;
}

.page-title {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 8px 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.page-subtitle {
    font-size: 15px;
    color: #64748b;
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
}

.btn-refresh {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Outfit', sans-serif;
}

.btn-refresh:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

/* Section Title */
.section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1e293b;
    margin: 32px 0 16px 0;
    padding-left: 12px;
    border-left: 4px solid #667eea;
}

/* Metrics Grid */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.metric-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.metric-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.metric-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.metric-content {
    flex: 1;
}

.metric-label {
    font-size: 13px;
    color: #64748b;
    font-weight: 500;
    margin-bottom: 6px;
}

.metric-value {
    font-size: 32px;
    font-weight: 700;
    color: #0f172a;
    line-height: 1;
}

/* Financial Grid */
.financial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.financial-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
    transition: all 0.3s;
}

.financial-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.financial-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.financial-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.financial-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 600;
}

.financial-value {
    font-size: 28px;
    font-weight: 700;
    color: #0f172a;
}

/* Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 20px;
    margin-bottom: 20px;
}

.chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.chart-wide {
    grid-column: span 1;
}

.chart-full {
    grid-column: 1 / -1;
    margin-bottom: 20px;
}

.chart-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.chart-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.chart-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.chart-body {
    position: relative;
    height: 280px;
}

.chart-full .chart-body {
    height: 320px;
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 20px;
}

.list-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    border: 1px solid #f1f5f9;
}

.list-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f1f5f9;
}

.list-header h3 {
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 4px 0;
}

.list-header p {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.list-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: #f8fafc;
    border-radius: 10px;
    transition: all 0.2s;
}

.list-item:hover {
    background: #f1f5f9;
    transform: translateX(4px);
}

.list-item-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 16px;
    flex-shrink: 0;
}

.list-item-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #e0e7ff;
    color: #667eea;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.list-item-content {
    flex: 1;
}

.list-item-name {
    font-size: 14px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 2px;
}

.list-item-meta {
    font-size: 12px;
    color: #64748b;
}

.list-item-badge {
    padding: 6px 12px;
    background: #e0e7ff;
    color: #667eea;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.list-item-status {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: capitalize;
}

.list-item-status.status-active {
    background: #dbeafe;
    color: #1e40af;
}

.list-item-status.status-closed {
    background: #d1fae5;
    color: #065f46;
}

.list-item-status.status-draft {
    background: #f3f4f6;
    color: #4b5563;
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #94a3b8;
    font-size: 14px;
}

/* Responsive Design */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: 1fr;
    }

    .chart-wide {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .analytics-container {
        padding: 16px;
    }

    .analytics-header {
        flex-direction: column;
        gap: 16px;
    }

    .page-title {
        font-size: 24px;
    }

    .metrics-grid {
        grid-template-columns: 1fr;
    }

    .financial-grid {
        grid-template-columns: 1fr;
    }

    .bottom-grid {
        grid-template-columns: 1fr;
    }

    .metric-value {
        font-size: 28px;
    }

    .financial-value {
        font-size: 24px;
    }
}

/* Animation */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.metric-card,
.financial-card,
.chart-card,
.list-card {
    animation: fadeInUp 0.5s ease-out;
}

.metric-card:nth-child(1) {
    animation-delay: 0.1s;
}

.metric-card:nth-child(2) {
    animation-delay: 0.2s;
}

.metric-card:nth-child(3) {
    animation-delay: 0.3s;
}

.metric-card:nth-child(4) {
    animation-delay: 0.4s;
}