:root {
	--pshp-accent: #0d9488;
	--pshp-accent-hover: #0f766e;
	--pshp-accent-soft: rgba(13, 148, 136, 0.12);
	--pshp-surface: #ffffff;
	--pshp-page-bg: linear-gradient(160deg, #ecfeff 0%, #f8fafc 45%, #f0fdf9 100%);
	--pshp-border: rgba(13, 148, 136, 0.18);
	--pshp-text: #0f172a;
	--pshp-muted: #64748b;
	--pshp-danger: #b91c1c;
	--pshp-success: #047857;
	--pshp-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
	--pshp-radius: 12px;
	--pshp-font: Vazir, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto,
		'Helvetica Neue', Arial, sans-serif;
	--pshp-sidebar-width: 240px;
}

*,
*::before,
*::after {
	box-sizing: border-box;
}

body.pshp-portal-shell {
	margin: 0;
	min-height: 100vh;
	overflow-x: hidden;
	background: var(--pshp-page-bg);
	color: var(--pshp-text);
	font-family: var(--pshp-font);
	line-height: 1.55;
}

.pshp-portal-main .entry-content > * {
	max-width: 100%;
}

.pshp-wrap.pshp-shell,
.pshp-login-card {
	text-align: start;
}

.pshp-login-card h1 {
	font-family: var(--pshp-font);
}

[dir='rtl'] .pshp-login-card input[type='text'],
[dir='rtl'] .pshp-login-card input[type='password'] {
	text-align: right;
}

.pshp-portal-main {
	max-width: 1100px;
	margin: 0 auto;
	padding: clamp(1rem, 3vw, 2rem);
}

.pshp-section-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	margin-top: 1.35rem;
}

.pshp-section-header .pshp-section-title {
	margin: 0;
}

.pshp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.35rem;
	padding: 0.55rem 1rem;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: var(--pshp-font);
	line-height: 1.3;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.pshp-btn--primary {
	background: var(--pshp-accent);
	color: #fff;
	border-color: var(--pshp-accent);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

.pshp-btn--primary:hover,
.pshp-btn--primary:focus {
	background: var(--pshp-accent-hover);
	border-color: var(--pshp-accent-hover);
	color: #fff;
}

.pshp-btn--ghost {
	background: #fff;
	color: var(--pshp-text);
	border-color: var(--pshp-border);
}

.pshp-btn--ghost:hover,
.pshp-btn--ghost:focus {
	background: var(--pshp-accent-soft);
	border-color: rgba(13, 148, 136, 0.35);
	color: var(--pshp-accent);
}

.pshp-btn--block {
	width: 100%;
}

.pshp-btn--small {
	padding: 0.35rem 0.65rem;
	font-size: 0.8rem;
	border-radius: 6px;
}

.pshp-filter-bar {
	display: flex;
	gap: 0.5rem;
	flex-wrap: wrap;
	margin: 0.5rem 0 0.75rem;
	align-items: center;
}

.pshp-filter-input {
	padding: 0.4rem 0.6rem;
	border: 1px solid var(--pshp-border);
	border-radius: 6px;
	font-size: 0.82rem;
	background: #fff;
	color: var(--pshp-text);
}

.pshp-filter-input--narrow {
	max-width: 140px;
}

.pshp-filter-bar .pshp-btn {
	min-height: 34px;
}
.pshp-pagination {
	margin: 0.5rem 0;
}

.pshp-pagination-form {
	display: flex;
	align-items: center;
	gap: 0.3rem;
	flex-wrap: wrap;
}

.pshp-pagination-info {
	font-size: 0.82rem;
	color: var(--pshp-muted);
	padding: 0 0.25rem;
	font-weight: 500;
}

.pshp-detail-row {
	background: #f8fafc;
}

.pshp-detail-inner {
	padding: 0.75rem 1rem;
}

.pshp-sub-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.82rem;
	background: #fff;
	border-radius: 8px;
	border: 1px solid rgba(13, 148, 136, 0.12);
	overflow: hidden;
}

.pshp-sub-table thead th {
	background: #f1f5f9;
	color: var(--pshp-muted);
	font-weight: 600;
	padding: 0.5rem 0.65rem;
	text-align: inherit;
	border-bottom: 1px solid var(--pshp-border);
	font-size: 0.78rem;
}

.pshp-sub-table tbody td {
	padding: 0.5rem 0.65rem;
	border-bottom: 1px solid rgba(15, 23, 42, 0.05);
	vertical-align: middle;
}

.pshp-sub-table tbody tr:last-child td {
	border-bottom: none;
}

.pshp-sub-table code {
	font-size: 0.8em;
	background: rgba(14, 116, 144, 0.08);
	padding: 0.1rem 0.3rem;
	border-radius: 3px;
}

.pshp-detail-toggle {
	cursor: pointer;
}

.pshp-kpi-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
	gap: 0.75rem;
	margin-bottom: 1rem;
}

.pshp-kpi-card {
	background: var(--pshp-surface);
	border: 1px solid var(--pshp-border);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	box-shadow: 0 1px 6px rgba(15, 23, 42, 0.04);
}

.pshp-kpi-label {
	font-size: 0.75rem;
	color: var(--pshp-muted);
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
}

.pshp-kpi-value {
	font-size: 1.2rem;
	font-weight: 700;
	color: var(--pshp-text);
	line-height: 1.3;
}

.pshp-filter-input:focus {
	outline: none;
	border-color: var(--pshp-accent) !important;
	box-shadow: 0 0 0 2px var(--pshp-accent-soft) !important;
	font-family: var(--pshp-font);
}

.pshp-filter-input {
	font-family: var(--pshp-font);
}
.pshp-filter-input:option {
	font-family: var(--pshp-font);
}
.pshp-filter-input:option:hover {
	font-family: var(--pshp-font);
}
.pshp-filter-input:option:selected {
	font-family: var(--pshp-font);
}
.pshp-filter-input:option:active {
	font-family: var(--pshp-font);
}
.pshp-entry-content .pshp-wrap:first-child {
	margin-top: 0;
}

/* ===== LAYOUT: sidebar right, content left ===== */
.pshp-layout {
	display: flex;
	flex-direction: row-reverse;
	gap: 1.5rem;
	align-items: flex-start;
}

.pshp-content {
	flex: 1;
	min-width: 0;
}

.pshp-wrap.pshp-shell {
	background: var(--pshp-surface);
	border-radius: var(--pshp-radius);
	box-shadow: var(--pshp-shadow);
	border: 1px solid var(--pshp-border);
	padding: clamp(1rem, 2vw, 1.75rem);
}

/* ===== SIDEBAR ===== */
.pshp-sidebar {
	width: var(--pshp-sidebar-width);
	flex-shrink: 0;
	background: var(--pshp-surface);
	border-radius: var(--pshp-radius);
	box-shadow: var(--pshp-shadow);
	border: 1px solid var(--pshp-border);
	display: flex;
	flex-direction: column;
	min-height: calc(100vh - 4rem);
	position: sticky;
	top: 1rem;
	overflow: hidden;
}

.pshp-sidebar-user {
	padding: 1.25rem 1rem 1rem;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.6rem;
	border-bottom: 1px solid var(--pshp-border);
	text-align: center;
}

.pshp-sidebar-avatar {
	border-radius: 50%;
	width: 52px;
	height: 52px;
	object-fit: cover;
	border: 2px solid var(--pshp-accent-soft);
	box-shadow: 0 2px 8px var(--pshp-accent-soft);
}

.pshp-sidebar-avatar--dashicon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--pshp-accent-soft);
	color: var(--pshp-accent);
}

.pshp-sidebar-avatar--dashicon .dashicons {
	font-size: 28px;
	width: 28px;
	height: 28px;
}

.pshp-sidebar-user-info {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.pshp-sidebar-user-name {
	font-weight: 700;
	font-size: 0.95rem;
	color: var(--pshp-text);
	line-height: 1.3;
}

.pshp-sidebar-user-role {
	font-size: 0.78rem;
	color: var(--pshp-muted);
}

.pshp-sidebar-nav {
	flex: 1;
	padding: 0.75rem 0.65rem;
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
}

.pshp-sidebar-nav-item {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem 0.75rem;
	border-radius: 8px;
	color: var(--pshp-text);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
	transition: background 0.12s, color 0.12s;
}

.pshp-sidebar-nav-item:hover {
	background: var(--pshp-accent-soft);
	color: var(--pshp-accent);
}

.pshp-sidebar-nav-item--active {
	background: var(--pshp-accent-soft);
	color: var(--pshp-accent);
	font-weight: 600;
}

.pshp-nav-icon {
	width: 20px;
	height: 20px;
	font-size: 20px;
	line-height: 1;
	text-align: center;
	flex-shrink: 0;
}

.pshp-sidebar-footer {
	padding: 0.65rem;
	border-top: 1px solid var(--pshp-border);
}

.pshp-sidebar-logout {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	padding: 0.6rem 0.75rem;
	border-radius: 8px;
	color: var(--pshp-danger);
	text-decoration: none;
	font-size: 0.88rem;
	font-weight: 500;
	transition: background 0.12s;
}

.pshp-sidebar-logout:hover {
	background: #fef2f2;
	color: #991b1b;
}

/* ===== TOPBAR removed, now in sidebar ===== */

.pshp-meta-strip {
	display: flex;
	flex-wrap: wrap;
	gap: 0.65rem 1.25rem;
	font-size: 0.875rem;
	color: var(--pshp-muted);
	margin-bottom: 1rem;
}

.pshp-meta-strip strong {
	color: var(--pshp-text);
}

.pshp-meta-strip .pshp-inline-sync {
	margin-inline-start: auto;
	display: inline-flex;
	align-items: center;
}

.pshp-meta-strip .pshp-inline-sync .pshp-btn {
	margin: 0;
}

.pshp-notice {
	border-radius: 9px;
	padding: 0.65rem 0.85rem;
	margin: 0 0 1rem;
	font-size: 0.9rem;
	line-height: 1.45;
}

.pshp-notice--danger {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.pshp-notice--info {
	background: #f0fdf9;
	border: 1px solid var(--pshp-border);
	color: var(--pshp-muted);
}

.pshp-notice--success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: var(--pshp-success);
}

.pshp-muted-note {
	margin: 0.35rem 0 1rem;
	font-size: 0.88rem;
	color: var(--pshp-muted);
}

.pshp-subtitle {
	margin: 1.25rem 0 0.5rem;
	font-size: 0.95rem;
	font-weight: 700;
}

.pshp-kpi-filter {
	margin-bottom: 1rem;
}

.pshp-report-export {
	margin: 0 0 1rem;
}

.pshp-report-subtitle {
	margin: 1.5rem 0 0.75rem;
	font-size: 1.05rem;
	font-weight: 700;
}

.pshp-kpi-cards--compact .pshp-kpi-card {
	min-width: 140px;
}

.pshp-link-card {
	border: 1px solid var(--pshp-border);
	border-radius: var(--pshp-radius);
	padding: 1rem;
	margin: 0 0 1rem;
	background: var(--pshp-surface);
}

.pshp-link-card h5 {
	margin: 0 0 0.65rem;
	font-size: 0.95rem;
}

.pshp-link-row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.pshp-link-input {
	flex: 1 1 220px;
	min-width: 0;
	padding: 0.55rem 0.75rem;
	border: 1px solid var(--pshp-border);
	border-radius: 8px;
	font-family: ui-monospace, monospace;
	font-size: 0.82rem;
	direction: ltr;
	text-align: left;
}

.pshp-withdraw-form {
	max-width: 420px;
	margin: 0 0 1.25rem;
	padding: 1rem;
	border: 1px solid var(--pshp-border);
	border-radius: var(--pshp-radius);
	background: var(--pshp-surface);
}

.pshp-withdraw-form label {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.88rem;
	font-weight: 600;
}

.pshp-issue {
	padding: 0.75rem 1rem;
	background: #fffbeb;
	border: 1px solid #fde68a;
	border-radius: 9px;
}

.pshp-section-title {
	margin: 1.35rem 0 0.5rem;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--pshp-text);
	letter-spacing: -0.02em;
	font-family: var(--pshp-font);
}

.pshp-section-hint {
	margin: 0 0 0.65rem;
	font-size: 0.88rem;
	color: var(--pshp-muted);
	line-height: 1.45;
}

.pshp-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	margin: 0 0 0.35rem;
	border-radius: 10px;
	border: 1px solid var(--pshp-border);
	background: rgba(248, 250, 252, 0.7);
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04) inset;
}

.pshp-wrap table.pshp-table {
	width: 100%;
	min-width: 560px;
	border-collapse: collapse;
	font-size: 0.885rem;
}

.pshp-wrap table.pshp-table thead th {
	background: linear-gradient(180deg, #f8fafc, #f1f5f9);
	color: var(--pshp-muted);
	text-transform: none;
	letter-spacing: 0;
	font-weight: 600;
	padding: 0.72rem 0.85rem;
	text-align: inherit;
	border-bottom: 2px solid var(--pshp-border);
	white-space: nowrap;
}

.pshp-wrap table.pshp-table tbody td {
	padding: 0.72rem 0.85rem;
	vertical-align: top;
	border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

.pshp-wrap table.pshp-table tbody tr:last-child td {
	border-bottom: none;
}

.pshp-wrap table.pshp-table tbody tr:hover td {
	background: rgba(204, 251, 241, 0.35);
}

.pshp-wrap table.pshp-table code {
	font-size: 0.82em;
	background: rgba(14, 116, 144, 0.08);
	padding: 0.12rem 0.35rem;
	border-radius: 4px;
	word-break: break-word;
}

.pshp-login-outer {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 60vh;
	padding: 1rem 0;
}

.pshp-login-card {
	width: min(420px, 100%);
	background: var(--pshp-surface);
	border-radius: var(--pshp-radius);
	box-shadow: var(--pshp-shadow);
	border: 1px solid var(--pshp-border);
	padding: clamp(1.5rem, 4vw, 2rem);
}

.pshp-login-card h1 {
	margin: 0 0 0.35rem;
	font-size: 1.35rem;
	color: var(--pshp-text);
}

.pshp-login-card .pshp-login-lead {
	margin: 0 0 1.25rem;
	color: var(--pshp-muted);
	font-size: 0.925rem;
}

.pshp-login-form label {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--pshp-text);
	margin-bottom: 0.35rem;
}

.pshp-login-form input[type='text'],
.pshp-login-form input[type='password'] {
	width: 100%;
	padding: 0.65rem 0.85rem;
	border-radius: 8px;
	border: 1px solid #cbd5e1;
	font-size: 1rem;
	font-family: inherit;
	margin-bottom: 0.9rem;
	background: #fff;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.pshp-login-form input:focus {
	outline: none;
	border-color: var(--pshp-accent);
	box-shadow: 0 0 0 3px var(--pshp-accent-soft);
}

.pshp-login-remember {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: -0.25rem 0 1rem;
	font-size: 0.875rem;
	color: var(--pshp-muted);
}

.pshp-login-actions {
	margin: 0;
}

.pshp-cell-url a {
	word-break: break-all;
	font-size: 0.82rem;
}

.pshp-muted {
	color: var(--pshp-muted);
}

@media (max-width: 768px) {
	.pshp-layout {
		flex-direction: column-reverse;
	}

	.pshp-sidebar {
		width: 100%;
		min-height: auto;
		position: static;
		flex-direction: row;
		flex-wrap: wrap;
		align-items: center;
		padding: 0.5rem 0.75rem;
	}

	.pshp-sidebar-user {
		flex-direction: row;
		padding: 0.35rem 0;
		border-bottom: none;
		gap: 0.5rem;
		flex: 1;
	}

	.pshp-sidebar-avatar {
		width: 36px;
		height: 36px;
	}

	.pshp-sidebar-user-info {
		flex-direction: row;
		gap: 0.4rem;
		align-items: baseline;
	}

	.pshp-sidebar-user-role {
		display: none;
	}

	.pshp-sidebar-nav {
		flex: none;
		padding: 0;
		flex-direction: row;
	}

	.pshp-sidebar-footer {
		padding: 0;
		border-top: none;
	}
}

.pshp-jdate-input {
	cursor: pointer;
	background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="%2364748b" stroke-width="2"><rect x="3" y="4" width="18" height="18" rx="2" ry="2"/><line x1="16" y1="2" x2="16" y2="6"/><line x1="8" y1="2" x2="8" y2="6"/><line x1="3" y1="10" x2="21" y2="10"/></svg>') no-repeat left 0.5rem center;
	padding-left: 2rem !important;
}

.pshp-jdate-input:focus {
	outline: none;
	border-color: var(--pshp-accent) !important;
	box-shadow: 0 0 0 2px var(--pshp-accent-soft) !important;
}

.jdp-container,
.jdp-overlay {
	z-index: 10050 !important;
}

.pshp-sidebar-nav-item code {
	font-size: 0.75rem;
	background: rgba(14, 116, 144, 0.08);
	padding: 0.05rem 0.25rem;
	border-radius: 3px;
	margin-inline-start: auto;
}

@media (max-width: 639px) {
	.pshp-portal-main {
		padding: 0.75rem;
	}

	.pshp-wrap table.pshp-table {
		min-width: 100%;
		font-size: 0.815rem;
	}

	.pshp-wrap table.pshp-table thead th,
	.pshp-wrap table.pshp-table tbody td {
		padding: 0.55rem 0.6rem;
	}
}