/**
 * Dashboard page styles for Agentorie Chat.
 *
 * @package    Agentorie_Chat
 * @subpackage Agentorie_Chat/admin/css
 * @since      1.0.0
 */

/* Dashboard Header */
.agentorie-dashboard-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	padding-bottom: 16px;
	border-bottom: 1px solid #e5e7eb;
}

.agentorie-dashboard-header .header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.agentorie-dashboard-header h1 {
	margin: 0;
	font-size: 24px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
}

.agentorie-dashboard-header h1 .dashicons {
	color: #6366f1;
}

.version-badge {
	background: #f3f4f6;
	color: #6b7280;
	padding: 4px 10px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 500;
}

.license-badge {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	font-weight: 500;
}

.license-badge.active {
	background: #ecfdf5;
	color: #059669;
}

.license-badge.inactive,
.license-badge.expired {
	background: #fef3c7;
	color: #d97706;
}

/* Notice */
.agentorie-notice {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px 20px;
	background: #fff;
	border-radius: 12px;
	margin-bottom: 24px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.agentorie-notice.warning {
	border-left: 4px solid #f59e0b;
}

.agentorie-notice > .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #f59e0b;
}

.agentorie-notice .notice-content {
	flex: 1;
}

.agentorie-notice .notice-content strong {
	display: block;
	margin-bottom: 2px;
}

.agentorie-notice .notice-content p {
	margin: 0;
	color: #6b7280;
	font-size: 13px;
}

/* Stats Grid */
.agentorie-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
	margin-bottom: 24px;
}

.agentorie-stat-card {
	background: #fff;
	border-radius: 12px;
	padding: 20px;
	display: flex;
	align-items: center;
	gap: 16px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	transition: transform 0.2s, box-shadow 0.2s;
}

.agentorie-stat-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.agentorie-stat-card .stat-icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.agentorie-stat-card .stat-icon .dashicons {
	font-size: 24px;
	width: 24px;
	height: 24px;
	color: #fff;
}

.agentorie-stat-card.purple .stat-icon { background: linear-gradient(135deg, #8b5cf6, #6366f1); }
.agentorie-stat-card.blue .stat-icon { background: linear-gradient(135deg, #3b82f6, #2563eb); }
.agentorie-stat-card.green .stat-icon { background: linear-gradient(135deg, #10b981, #059669); }
.agentorie-stat-card.orange .stat-icon { background: linear-gradient(135deg, #f59e0b, #d97706); }

.agentorie-stat-card .stat-content {
	flex: 1;
}

.agentorie-stat-card .stat-value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: #111827;
	line-height: 1.2;
}

.agentorie-stat-card .stat-label {
	font-size: 13px;
	color: #6b7280;
}

/* Dashboard Grid */
.agentorie-dashboard-grid {
	display: grid;
	grid-template-columns: 2fr 1fr;
	grid-template-rows: auto auto;
	gap: 20px;
}

.agentorie-card {
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.1);
	overflow: hidden;
}

.agentorie-card .card-header {
	padding: 16px 20px;
	border-bottom: 1px solid #f3f4f6;
}

.agentorie-card .card-header h2 {
	margin: 0;
	font-size: 15px;
	font-weight: 600;
	display: flex;
	align-items: center;
	gap: 8px;
	color: #374151;
}

.agentorie-card .card-header h2 .dashicons {
	color: #6366f1;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.agentorie-card .card-body {
	padding: 20px;
}

/* Chart Card */
.chart-card {
	grid-row: span 2;
}

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

/* Quick Actions */
.quick-actions-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 12px;
}

.action-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 20px 16px;
	background: #f9fafb;
	border-radius: 10px;
	text-decoration: none;
	color: #374151;
	transition: all 0.2s;
	position: relative;
}

.action-card:hover {
	background: #f3f4f6;
	transform: translateY(-2px);
	color: #111827;
}

.action-card .action-icon {
	font-size: 24px;
	width: 24px;
	height: 24px;
	margin-bottom: 8px;
	color: #6366f1;
}

.action-card .action-label {
	font-size: 13px;
	font-weight: 500;
}

.action-card .action-badge {
	position: absolute;
	top: 8px;
	right: 8px;
	background: #ef4444;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 10px;
}

.action-card.livechat:hover .action-icon { color: #059669; }
.action-card.conversations:hover .action-icon { color: #3b82f6; }
.action-card.settings:hover .action-icon { color: #8b5cf6; }
.action-card.external:hover .action-icon { color: #f59e0b; }

/* Usage Card */
.usage-display {
	text-align: center;
}

.usage-numbers {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 4px;
	margin-bottom: 4px;
}

.usage-current {
	font-size: 36px;
	font-weight: 700;
	color: #111827;
}

.usage-separator {
	font-size: 24px;
	color: #9ca3af;
}

.usage-limit {
	font-size: 24px;
	color: #6b7280;
}

.usage-unlimited {
	display: flex;
	align-items: center;
	gap: 4px;
	color: #059669;
	font-size: 16px;
	font-weight: 500;
}

.usage-label {
	color: #9ca3af;
	font-size: 13px;
}

.usage-bar-container {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: 16px;
}

.usage-bar {
	flex: 1;
	height: 8px;
	background: #e5e7eb;
	border-radius: 4px;
	overflow: hidden;
}

.usage-progress {
	height: 100%;
	background: linear-gradient(90deg, #6366f1, #8b5cf6);
	border-radius: 4px;
	transition: width 0.5s ease;
}

.usage-progress.warning {
	background: linear-gradient(90deg, #f59e0b, #d97706);
}

.usage-progress.critical {
	background: linear-gradient(90deg, #ef4444, #dc2626);
}

.usage-percent {
	font-size: 13px;
	font-weight: 600;
	color: #6b7280;
	min-width: 40px;
}

.usage-warning {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	margin-top: 12px;
	padding: 8px 12px;
	background: #fef3c7;
	border-radius: 6px;
	font-size: 12px;
	color: #92400e;
}

.usage-warning .dashicons {
	font-size: 14px;
	width: 14px;
	height: 14px;
}

.usage-warning a {
	color: #d97706;
	font-weight: 600;
}

/* Help Card */
.help-links {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.help-link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: #f9fafb;
	border-radius: 8px;
	text-decoration: none;
	color: #374151;
	font-size: 13px;
	transition: all 0.2s;
}

.help-link:hover {
	background: #f3f4f6;
	color: #6366f1;
}

.help-link .dashicons {
	color: #9ca3af;
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.help-link:hover .dashicons {
	color: #6366f1;
}

/* Responsive */
@media (max-width: 1200px) {
	.agentorie-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	
	.agentorie-dashboard-grid {
		grid-template-columns: 1fr;
	}
	
	.chart-card {
		grid-row: auto;
	}
}

@media (max-width: 782px) {
	.agentorie-stats-grid {
		grid-template-columns: 1fr;
	}
	
	.agentorie-dashboard-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}
	
	.quick-actions-grid {
		grid-template-columns: 1fr;
	}
}

.usage-hint {
    margin-top: 12px;
}

.usage-hint .dashicons-external {
    font-size: 14px;
    width: 14px;
    height: 14px;
    vertical-align: middle;
}
