/* 财报数据聚合器 - 前后端分离版共用样式 */

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

.status-indicator {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
}

.status-online { background-color: #dcfce7; color: #166534; }
.status-offline { background-color: #fee2e2; color: #991b1b; }
.status-warning { background-color: #fef3c7; color: #92400e; }

.report-card {
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
    transition: all 0.2s ease;
}

.report-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.report-header { display: flex; align-items: center; margin-bottom: 0.75rem; }
.report-logo {
    width: 2.5rem; height: 2.5rem; border-radius: 0.375rem;
    background: #f3f4f6; display: flex; align-items: center; justify-content: center;
    margin-right: 0.75rem; font-weight: 600; color: #374151;
}
.report-title { font-size: 1rem; font-weight: 600; color: #111827; margin: 0; }
.report-subtitle { font-size: 0.875rem; color: #6b7280; margin: 0; }
.report-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}
.metric-item { text-align: center; padding: 0.5rem; background: #f9fafb; border-radius: 0.375rem; }
.metric-value { font-size: 1.125rem; font-weight: 600; color: #111827; margin: 0; }
.metric-label { font-size: 0.75rem; color: #6b7280; margin: 0; }

.datasource-item {
    display: flex; align-items: center; justify-content: space-between;
    padding: 0.75rem 0; border-bottom: 1px solid #f3f4f6;
}
.datasource-item:last-child { border-bottom: none; }
.datasource-name { font-size: 0.875rem; color: #374151; font-weight: 500; }
.datasource-status { display: flex; align-items: center; font-size: 0.75rem; }
.status-dot {
    width: 0.5rem; height: 0.5rem; border-radius: 50%; margin-right: 0.5rem;
}
.status-dot.online { background-color: #10b981; }
.status-dot.offline { background-color: #ef4444; }
.status-dot.warning { background-color: #f59e0b; }

@media (max-width: 768px) {
    .report-metrics { grid-template-columns: repeat(2, 1fr); }
    .metric-item { padding: 0.375rem; }
    .metric-value { font-size: 1rem; }
}

.loading { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.error-message {
    background-color: #fee2e2; border: 1px solid #fecaca; color: #991b1b;
    padding: 0.75rem; border-radius: 0.375rem; font-size: 0.875rem;
}
.success-message {
    background-color: #dcfce7; border: 1px solid #bbf7d0; color: #166534;
    padding: 0.75rem; border-radius: 0.375rem; font-size: 0.875rem;
}

/* 快速操作区：确保按钮和链接可点击，不被遮挡 */
#quick-actions button,
#quick-actions a {
    pointer-events: auto;
    position: relative;
    z-index: 1;
}

.btn-primary {
    background-color: #3b82f6; color: white; padding: 0.5rem 1rem;
    border-radius: 0.375rem; border: none; font-weight: 500; cursor: pointer;
}
.btn-primary:hover { background-color: #2563eb; }
.btn-secondary {
    background-color: #6b7280; color: white; padding: 0.5rem 1rem;
    border-radius: 0.375rem; border: none; font-weight: 500; cursor: pointer;
}
.btn-secondary:hover { background-color: #4b5563; }

.table-container { overflow-x: auto; border-radius: 0.5rem; border: 1px solid #e5e7eb; }
.table-container table { width: 100%; border-collapse: collapse; }
.table-container th {
    background-color: #f9fafb; padding: 0.75rem; text-align: left;
    font-weight: 600; color: #374151; border-bottom: 1px solid #e5e7eb;
}
.table-container td { padding: 0.75rem; border-bottom: 1px solid #f3f4f6; }
.table-container tr:hover { background-color: #f9fafb; }
