/* Painel Sofisticado para WooCommerce - Estilos */

.psw-dashboard-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--psw-text);
	width: 100%;
}

.psw-dashboard-wrap * {
	box-sizing: border-box;
}

/* Cabeçalho */
.psw-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 28px;
}

.psw-welcome h2 {
	margin: 0 0 4px;
	font-size: 26px;
	font-weight: 900;
}

.psw-welcome p {
	margin: 0;
	color: var(--psw-text-muted);
	font-size: 15px;
}

.psw-tier-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	border-radius: 999px;
	font-weight: 600;
	font-size: 14px;
	color: #fff;
	background: linear-gradient(135deg, #a1887f, #6d4c41);
	white-space: nowrap;
}

.psw-tier-badge .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

.psw-tier-bronze  { background: linear-gradient(135deg, #b08d57, #8a6a3e); }
.psw-tier-prata   { background: linear-gradient(135deg, #b8bec7, #8c93a0); }
.psw-tier-ouro    { background: linear-gradient(135deg, #f4c150, #d69e1f); }
.psw-tier-diamante{ background: linear-gradient(135deg, #7dd3fc, #6d28d9); }

/* Grid de estatísticas */
.psw-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
	margin-bottom: 24px;
}

.psw-stat-card {
	background: var(--psw-bg-card);
	border: 1px solid var(--psw-border);
	border-radius: var(--psw-radius);
	box-shadow: var(--psw-shadow);
	padding: 18px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.psw-stat-icon {
	width: 44px;
	height: 44px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--psw-bg-soft);
	color: var(--psw-primary);
	flex-shrink: 0;
}

.psw-stat-icon .dashicons {
	font-size: 22px;
	width: 22px;
	height: 22px;
}

.psw-icon-money     { color: #16a34a; background: #eafcef; }
.psw-icon-pending   { color: #d97706; background: #fef6e8; }
.psw-icon-completed { color: #2563eb; background: #eaf1fe; }

.psw-stat-info {
	display: flex;
	flex-direction: column;
}

.psw-stat-value {
	font-size: 20px;
	font-weight: 900;
	line-height: 1.2;
}

.psw-stat-label {
	font-size: 13px;
	color: var(--psw-text-muted);
}

/* Grid principal (gráfico + produtos) */
.psw-main-grid {
	display: grid;
	grid-template-columns: 1.4fr 1fr;
	gap: 16px;
	margin-bottom: 16px;
}

.psw-panel {
	background: var(--psw-bg-card);
	border: 1px solid var(--psw-border);
	border-radius: var(--psw-radius);
	box-shadow: var(--psw-shadow);
	padding: 20px;
}

.psw-panel h3 {
	margin: 0 0 16px;
	font-size: 16px;
	font-weight: 800;
}

/* Lista de produtos mais comprados */
.psw-product-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.psw-product-list li {
	display: flex;
	align-items: center;
	gap: 12px;
}

.psw-product-thumb img {
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.psw-product-info {
	display: flex;
	flex-direction: column;
	font-size: 14px;
}

.psw-product-info a {
	color: var(--psw-text);
	font-weight: 600;
	text-decoration: none;
}

.psw-product-info a:hover {
	color: var(--psw-primary);
}

.psw-product-info span {
	font-size: 12px;
	color: var(--psw-text-muted);
}

/* Tabela de pedidos recentes */
.psw-table-wrap {
	overflow-x: auto;
}

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

.psw-orders-table th {
	text-align: left;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--psw-text-muted);
	padding: 10px 12px;
	border-bottom: 1px solid var(--psw-border);
}

.psw-orders-table td {
	padding: 12px;
	border-bottom: 1px solid var(--psw-border);
}

.psw-orders-table tr:last-child td {
	border-bottom: none;
}

.psw-status {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #eef0f4;
	color: #495066;
}

.psw-status-completed  { background: #e6f7ec; color: #157347; }
.psw-status-processing { background: #eaf1fe; color: #1d4ed8; }
.psw-status-pending,
.psw-status-on-hold     { background: #fef6e8; color: #b45309; }
.psw-status-cancelled,
.psw-status-failed,
.psw-status-refunded    { background: #fdeaea; color: #b91c1c; }

.psw-btn-small {
	display: inline-block;
	padding: 6px 14px;
	border-radius: 8px;
	background: var(--psw-primary);
	color: #fff !important;
	text-decoration: none;
	font-size: 12px;
	font-weight: 600;
	transition: background 0.15s ease;
}

.psw-btn-small:hover {
	background: var(--psw-primary-light);
}

.psw-empty {
	color: var(--psw-text-muted);
	font-size: 14px;
	margin: 0;
}

/* Atalhos rápidos */
.psw-quicklinks {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 20px;
}

.psw-quicklink {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px;
	background: var(--psw-bg-soft);
	border-radius: 10px;
	color: var(--psw-text);
	text-decoration: none;
	font-weight: 600;
	font-size: 14px;
	border: 1px solid var(--psw-border);
	transition: all 0.15s ease;
}

.psw-quicklink:hover {
	background: var(--psw-primary);
	color: #fff !important;
	border-color: var(--psw-primary);
}

.psw-quicklink .dashicons {
	font-size: 18px;
	width: 18px;
	height: 18px;
}

.psw-quicklink-logout:hover {
	background: #b91c1c;
	border-color: #b91c1c;
}

.psw-quicklink-admin {
	background: #fff7e6;
	border-color: #f5d38b;
	color: #92620a;
}

.psw-quicklink-admin:hover {
	background: #f59e0b;
	border-color: #f59e0b;
	color: #3a2600 !important;
}

/* Responsivo */
@media (max-width: 900px) {
	.psw-stats-grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.psw-main-grid {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 500px) {
	.psw-stats-grid {
		grid-template-columns: 1fr;
	}
	.psw-header {
		flex-direction: column;
		align-items: flex-start;
	}
}
