/* ============================================================
   Plugin Store Core — dashboard.css
   پنل کاربری SaaS-style، راست‌چین. از توکن‌های قالب با fallback استفاده می‌کند.
   ============================================================ */

.psc-panel {
	--c-primary: var(--psc-primary, #2563eb);
	--c-surface: var(--psc-surface, #f4f6f9);
	--c-border:  var(--psc-border, #e5e9f0);
	--c-text:    var(--psc-text, #1f2933);
	--c-muted:   var(--psc-muted, #6b7280);
	--c-radius:  var(--psc-radius, 14px);

	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 24px;
	direction: rtl;
	color: var(--c-text);
	align-items: start;
}

/* --- مهمان (لاگین نشده) --- */
.psc-panel--guest {
	display: block;
	text-align: center;
	padding: 48px 20px;
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
}
.psc-panel--guest p { margin: 0 0 16px; color: var(--c-muted); }

/* --- ناوبری کناری --- */
.psc-panel__nav {
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: 16px;
	position: sticky;
	top: 20px;
}
.psc-panel__user {
	display: flex;
	align-items: center;
	gap: 10px;
	padding-bottom: 14px;
	margin-bottom: 12px;
	border-bottom: 1px solid var(--c-border);
}
.psc-panel__avatar {
	width: 38px; height: 38px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: rgba(37, 99, 235, .1);
	color: var(--c-primary);
	font-weight: 700;
}
.psc-panel__name { font-weight: 600; font-size: 15px; }

.psc-panel__nav ul { list-style: none; margin: 0; padding: 0; }
.psc-panel__nav li { margin: 2px 0; }
.psc-panel__nav a {
	display: block;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--c-text);
	text-decoration: none;
	font-size: 14px;
	transition: background .15s ease, color .15s ease;
}
.psc-panel__nav a:hover { background: var(--c-surface); }
.psc-panel__nav a.is-active { background: var(--c-primary); color: #fff; }
.psc-panel__logout { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--c-border); }
.psc-panel__logout a { color: var(--psc-danger, #dc2626); }

/* --- محتوا --- */
.psc-panel__content {
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--c-radius);
	padding: 24px;
	min-height: 320px;
}
.psc-panel__title { font-size: 22px; margin: 0 0 20px; }

/* --- کارت‌های آمار داشبورد --- */
.psc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.psc-stat {
	background: var(--c-surface);
	border: 1px solid var(--c-border);
	border-radius: 12px;
	padding: 18px;
	text-align: center;
}
.psc-stat__num { display: block; font-size: 28px; font-weight: 800; color: var(--c-primary); }
.psc-stat__label { color: var(--c-muted); font-size: 13px; }

/* --- بلوک و فهرست عمومی --- */
.psc-block { margin-top: 8px; }
.psc-block h2 { font-size: 17px; margin: 0 0 8px; }
.psc-muted { color: var(--c-muted); }

.psc-list { list-style: none; margin: 0; padding: 0; }
.psc-list__item {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--c-border);
}
.psc-list__item:last-child { border-bottom: 0; }
.psc-list__title { font-weight: 600; font-size: 15px; }
.psc-link { color: var(--c-primary); text-decoration: none; font-size: 14px; }
.psc-link:hover { text-decoration: underline; }

/* --- ریسپانسیو --- */
@media (max-width: 820px) {
	.psc-panel { grid-template-columns: 1fr; }
	.psc-panel__nav { position: static; }
	.psc-panel__nav ul { display: flex; flex-wrap: wrap; gap: 6px; }
	.psc-panel__nav li { margin: 0; }
	.psc-panel__logout { border-top: 0; margin: 0; padding: 0; }
	.psc-stats { grid-template-columns: 1fr; }
}

/* ============================================================
   فاز ۵ — کارت لایسنس، بج وضعیت، اعلان، دکمه کوچک
   ============================================================ */
.psc-notice {
	padding: 12px 14px;
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
	border: 1px solid var(--c-border, #e5e9f0);
}
.psc-notice--ok  { background: rgba(22,163,74,.08); border-color: rgba(22,163,74,.25); color: var(--psc-success,#16a34a); }
.psc-notice--err { background: rgba(220,38,38,.08); border-color: rgba(220,38,38,.25); color: var(--psc-danger,#dc2626); }

.psc-lic {
	border: 1px solid var(--c-border, #e5e9f0);
	border-radius: 12px;
	padding: 18px;
	margin-bottom: 16px;
	background: #fff;
}
.psc-lic__head {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	margin-bottom: 12px;
}
.psc-lic__title { font-size: 16px; margin: 0; font-weight: 700; }

.psc-lic__row {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	padding: 7px 0;
	font-size: 14px;
	border-bottom: 1px dashed var(--c-border, #e5e9f0);
}
.psc-lic__row span { color: var(--c-muted, #6b7280); }
.psc-lic__row code {
	background: var(--c-surface, #f4f6f9);
	padding: 3px 8px; border-radius: 6px; font-size: 13px;
	word-break: break-all;
}

.psc-lic__sites { margin-top: 14px; }
.psc-lic__sites-label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.psc-lic__sites form { margin: 0; }

/* بج وضعیت (هماهنگ با product.css قالب) */
.psc-badge {
	display: inline-flex; align-items: center; gap: 5px;
	padding: 3px 10px; border-radius: 999px; font-size: 12px;
	background: var(--c-surface, #f4f6f9);
	border: 1px solid var(--c-border, #e5e9f0);
	color: var(--c-text, #1f2933);
}
.psc-badge--ok    { color: var(--psc-success,#16a34a); border-color: rgba(22,163,74,.25); background: rgba(22,163,74,.07); }
.psc-badge--warn  { color: var(--psc-danger,#dc2626); border-color: rgba(220,38,38,.25); background: rgba(220,38,38,.07); }
.psc-badge--muted { color: var(--c-muted,#6b7280); }

.psc-btn--sm { padding: 7px 12px; font-size: 13px; }

/* Tickets */
.psc-ticket-form form {
	display: grid;
	gap: 16px;
}
.psc-field {
	display: grid;
	gap: 8px;
}
.psc-field label {
	font-weight: 800;
	color: var(--psc-text, #152238);
}
.psc-field input,
.psc-field select,
.psc-field textarea {
	width: 100%;
	border: 1px solid var(--psc-border, #d9e2ef);
	border-radius: 14px;
	padding: 12px 14px;
	font: inherit;
	background: #fff;
	color: var(--psc-text, #152238);
}
.psc-field textarea {
	resize: vertical;
	min-height: 130px;
}
.psc-ticket-list {
	margin-top: 18px;
}
.psc-ticket-list .psc-list__item {
	gap: 12px;
}
