/**
 * Dashboard Page Styles
 *
 * @package Wisewand
 * @since 1.0.0
 */

.wisewand-dashboard-page {
	max-width: 1400px;
	margin: 20px 0;
}

.dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 30px;
	padding-bottom: 20px;
	border-bottom: 2px solid #e2e8f0;
}

.dashboard-header h1 {
	margin: 0 0 4px 0;
	font-size: 32px;
}

.dashboard-header p {
	margin: 0;
	color: #64748b;
}

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

.auto-refresh-indicator {
	font-size: 12px;
	color: #64748b;
	background: #f1f5f9;
	padding: 6px 12px;
	border-radius: 16px;
}

.key-metrics {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 20px;
	margin-bottom: 30px;
}

.metric-card {
	background: white;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
	display: flex;
	align-items: center;
	gap: 16px;
	cursor: pointer;
	transition: all 0.2s;
}

.metric-card:hover {
	border-color: #4338ca;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(67, 56, 202, 0.15);
}

.metric-icon {
	font-size: 36px;
	opacity: 0.9;
}

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

.metric-label {
	font-size: 13px;
	color: #64748b;
	font-weight: 500;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.metric-generating {
	border-color: #f59e0b;
}

.metric-ready {
	border-color: #10b981;
}

.metric-imported {
	border-color: #6366f1;
}

.metric-failed {
	border-color: #ef4444;
}

.dashboard-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
	margin-bottom: 24px;
}

.dashboard-card {
	background: white;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 24px;
}

.dashboard-card h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 700;
	color: #1e293b;
}

.upcoming-stats {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.upcoming-stat {
	display: flex;
	justify-content: space-between;
	padding: 12px;
	background: #f8fafc;
	border-radius: 8px;
}

.stat-label {
	font-weight: 500;
	color: #475569;
}

.stat-value {
	font-weight: 700;
	color: #4338ca;
	font-size: 18px;
}

.pipeline-items {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.pipeline-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 3px solid #4338ca;
}

.pipeline-item-warning {
	border-left-color: #ef4444;
	background: #fef2f2;
}

.pipeline-icon {
	font-size: 24px;
}

.pipeline-text {
	font-size: 14px;
	color: #475569;
}

.pipeline-text strong {
	color: #1e293b;
	font-size: 16px;
}

.content-type-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.content-type-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: #f8fafc;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.content-type-item:hover {
	background: #e0e7ff;
}

.type-icon {
	font-size: 20px;
}

.type-label {
	flex: 1;
	font-weight: 500;
	color: #475569;
}

.type-count {
	font-weight: 700;
	color: #4338ca;
	font-size: 16px;
}

.success-rate-stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 24px;
}

.success-rate-chart {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #10b981 0%, #059669 100%);
	color: white;
	border-radius: 12px;
	padding: 24px;
}

.success-label {
	font-size: 14px;
	opacity: 0.9;
	margin-top: 8px;
}

.success-breakdown {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.breakdown-item {
	display: flex;
	justify-content: space-between;
	padding: 8px 12px;
	background: #f8fafc;
	border-radius: 6px;
}

.breakdown-label {
	font-size: 13px;
	color: #64748b;
}

.breakdown-value {
	font-weight: 700;
	color: #1e293b;
}

.success-text .breakdown-value {
	color: #10b981;
}

.failed-text .breakdown-value {
	color: #ef4444;
}

.recent-activity-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 400px;
	overflow-y: auto;
}

.activity-item {
	display: flex;
	gap: 12px;
	padding: 12px;
	background: #f8fafc;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s;
}

.activity-item:hover {
	background: #e0e7ff;
}

.activity-time {
	font-size: 11px;
	color: #94a3b8;
	min-width: 60px;
}

.activity-content {
	flex: 1;
	font-size: 13px;
	color: #475569;
}

.wisewand-link {
	margin-left: 8px;
	font-size: 12px;
	color: #6366f1;
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.wisewand-link:hover {
	color: #4f46e5;
	text-decoration: underline;
}

.activity-icon {
	margin-right: 4px;
}

.cron-status-info {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.cron-stat {
	display: flex;
	justify-content: space-between;
	padding: 10px;
	background: #f8fafc;
	border-radius: 6px;
}

.cron-label {
	font-weight: 500;
	color: #64748b;
}

.cron-value {
	font-weight: 600;
	color: #1e293b;
}

.cron-healthy {
	color: #10b981;
}

.cron-overall-status {
	background: #f0fdf4;
	border-left: 3px solid #10b981;
}

.cron-section {
	margin-top: 16px;
	padding: 16px;
	background: #f8fafc;
	border-radius: 8px;
	border: 1px solid #e2e8f0;
}

.cron-section-header {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 12px;
	padding-bottom: 12px;
	border-bottom: 1px solid #e2e8f0;
}

.cron-section-header strong {
	font-size: 14px;
	color: #1e293b;
}

.cron-description {
	font-size: 12px;
	color: #64748b;
	font-weight: 400;
}

.cron-mini-summary {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 8px;
}

.mini-stat {
	display: inline-block;
	padding: 4px 10px;
	background: #e0e7ff;
	border-radius: 12px;
	font-size: 11px;
	color: #4338ca;
	font-weight: 600;
}

.cron-next-run {
	color: #6366f1;
	font-weight: 700;
}

.cron-last-run-summary {
	margin-top: 8px;
	padding: 12px;
	background: #f0fdf4;
	border-radius: 6px;
	font-size: 13px;
}

.cron-last-run-summary ul {
	margin: 8px 0 0 0;
	padding-left: 20px;
}

.cron-last-run-summary li {
	color: #475569;
}

.dashboard-quick-actions {
	display: flex;
	gap: 16px;
	justify-content: center;
}

.quick-action-btn {
	display: inline-block;
	padding: 12px 24px;
	background: #4338ca;
	color: white;
	text-decoration: none;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.2s;
}

.quick-action-btn:hover {
	background: #3730a3;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(67, 56, 202, 0.3);
}

.empty-state-small {
	text-align: center;
	padding: 20px;
	color: #94a3b8;
}

/* Imported Articles Section */
.dashboard-imported-articles {
	margin-bottom: 24px;
}

.imported-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	flex-wrap: wrap;
	gap: 16px;
}

.imported-header h3 {
	margin: 0;
}

.imported-stats-summary {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.import-stat-badge {
	background: #f1f5f9;
	padding: 6px 14px;
	border-radius: 20px;
	font-size: 13px;
	color: #475569;
}

.import-stat-badge strong {
	color: #6366f1;
	font-weight: 700;
	margin-right: 4px;
}

.imported-articles-table-wrapper {
	overflow-x: auto;
	margin: 0 -24px;
	padding: 0 24px;
}

.imported-articles-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.imported-articles-table thead {
	background: #f8fafc;
	border-bottom: 2px solid #e2e8f0;
}

.imported-articles-table th {
	padding: 12px 16px;
	text-align: left;
	font-weight: 600;
	color: #64748b;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.imported-articles-table td {
	padding: 14px 16px;
	border-bottom: 1px solid #f1f5f9;
}

.imported-article-row {
	transition: background 0.2s;
}

.imported-article-row:hover {
	background: #f8fafc;
}

.article-title-wrapper {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.article-title {
	color: #1e293b;
	font-size: 14px;
	line-height: 1.4;
}

.wisewand-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 11px;
	color: #6366f1;
	text-decoration: none;
	padding: 2px 8px;
	background: #eef2ff;
	border-radius: 12px;
	width: fit-content;
	transition: all 0.2s;
}

.wisewand-badge:hover {
	background: #e0e7ff;
	color: #4f46e5;
}

.language-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.5px;
}

.language-badge.language-fr {
	background: #dbeafe;
	color: #1e40af;
}

.language-badge.language-en {
	background: #fef3c7;
	color: #92400e;
}

.language-badge.language-es {
	background: #fee2e2;
	color: #991b1b;
}

.language-badge.language-de {
	background: #e0e7ff;
	color: #3730a3;
}

.language-badge.language-it {
	background: #dcfce7;
	color: #166534;
}

.status-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
}

.status-badge.status-publish {
	background: #dcfce7;
	color: #166534;
}

.status-badge.status-draft {
	background: #f1f5f9;
	color: #475569;
}

.status-badge.status-pending {
	background: #fef3c7;
	color: #92400e;
}

.status-badge.status-future {
	background: #dbeafe;
	color: #1e40af;
}

.categories-list {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.category-tag {
	display: inline-block;
	padding: 3px 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	font-size: 11px;
	color: #64748b;
}

.category-more {
	display: inline-block;
	padding: 3px 8px;
	background: #e0e7ff;
	border-radius: 8px;
	font-size: 11px;
	color: #4338ca;
	font-weight: 600;
}

.text-muted {
	color: #94a3b8;
}

.author-cell {
	color: #475569;
	font-size: 13px;
}

.import-time {
	color: #64748b;
	font-size: 12px;
}

.article-actions {
	display: flex;
	gap: 8px;
}

.action-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	background: #f1f5f9;
	border-radius: 6px;
	text-decoration: none;
	transition: all 0.2s;
	font-size: 14px;
}

.action-btn:hover {
	background: #e0e7ff;
	transform: scale(1.1);
}

.empty-state {
	text-align: center;
	padding: 60px 20px;
}

.empty-state-icon {
	font-size: 64px;
	margin-bottom: 16px;
	opacity: 0.6;
}

.empty-state h4 {
	margin: 0 0 8px 0;
	font-size: 18px;
	color: #1e293b;
}

.empty-state p {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

.imported-footer {
	margin-top: 20px;
	padding-top: 16px;
	border-top: 1px solid #e2e8f0;
	text-align: center;
}

.view-all-link {
	color: #6366f1;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	transition: color 0.2s;
}

.view-all-link:hover {
	color: #4f46e5;
	text-decoration: underline;
}

/* Responsive adjustments */
@media (max-width: 1400px) {
	.key-metrics {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 900px) {
	.key-metrics {
		grid-template-columns: repeat(2, 1fr);
	}

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

	.imported-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.imported-articles-table {
		font-size: 12px;
	}

	.imported-articles-table th,
	.imported-articles-table td {
		padding: 10px 12px;
	}
}
