/* Sadid Pishfactor – public app styles (standalone page) */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body.spf-body {
	margin: 0;
	padding: 0;
	background: #f4f6f9;
	color: #1d2327;
	font-family: Vazirmatn, IRANSansX, "Segoe UI", Tahoma, sans-serif;
	font-size: 14px;
	line-height: 1.75;
}

/* Top bar */
.spf-topbar {
	background: #fff;
	border-bottom: 1px solid #e2e6ec;
	box-shadow: 0 1px 2px rgba(16, 34, 54, 0.04);
	position: sticky;
	top: 0;
	z-index: 20;
}

.spf-topbar-inner {
	max-width: 1180px;
	margin: 0 auto;
	padding: 10px 16px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	flex-wrap: wrap;
}

.spf-brand {
	display: flex;
	flex-direction: column;
	gap: 0;
	text-decoration: none;
	line-height: 1.5;
}

.spf-brand-name {
	font-size: 15px;
	font-weight: 700;
	color: #17324d;
}

.spf-brand-sub {
	font-size: 11px;
	color: #7a8798;
}

.spf-nav {
	display: flex;
	gap: 4px;
	flex-wrap: wrap;
}

.spf-nav a {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13px;
	color: #41556c;
	text-decoration: none;
	transition: background 0.15s, color 0.15s;
}

.spf-nav a:hover {
	background: #f1f5f9;
	color: #17324d;
}

.spf-nav a.is-active {
	background: #eaf0f7;
	color: #17324d;
	font-weight: 600;
}

/* Layout */
.spf-main .spf-wrap {
	max-width: 1180px;
	margin: 0 auto;
	padding: 22px 16px 56px;
}

.spf-wrap h1,
.spf-wrap .spf-page-title {
	font-size: 20px;
	font-weight: 700;
	color: #17324d;
	margin: 0 0 14px;
	line-height: 1.5;
}

.spf-wrap h2 {
	font-size: 15px;
	font-weight: 700;
	color: #22364d;
	margin: 0 0 8px;
}

.spf-wrap h3 {
	font-size: 13px;
	font-weight: 700;
	margin: 0 0 6px;
}

/* Buttons (wp-admin styles are absent on the front) */
.button,
.page-title-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 32px;
	padding: 0 14px;
	border: 1px solid #c9d0d9;
	border-radius: 6px;
	background: #fff;
	color: #17324d;
	font-family: inherit;
	font-size: 13px;
	font-weight: 500;
	line-height: 1.6;
	white-space: nowrap;
	cursor: pointer;
	text-decoration: none;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.page-title-action {
	margin-inline-start: 8px;
	vertical-align: middle;
}

.button:hover,
.page-title-action:hover {
	background: #f3f6fa;
	border-color: #9fb0c4;
	color: #0f2740;
}

.button-primary {
	background: #17324d;
	border-color: #17324d;
	color: #fff;
}

.button-primary:hover {
	background: #0f2740;
	border-color: #0f2740;
	color: #fff;
}

.button-small {
	min-height: 28px;
	padding: 0 10px;
	font-size: 12px;
}

.button-hero {
	min-height: 40px;
	padding: 0 22px;
	font-size: 14px;
	font-weight: 600;
}

.button-link {
	min-height: 0;
	padding: 0;
	border: 0;
	background: none;
	color: #2271b1;
	text-decoration: underline;
}

.button-link:hover {
	background: none;
	color: #0f2740;
}

.spf-danger,
.spf-danger:hover {
	color: #b32d2e;
	border-color: #e0b4b4;
	background: #fff;
}

.spf-danger:hover {
	background: #fdf5f5;
	border-color: #b32d2e;
}

.spf-danger-link {
	color: #b32d2e;
}

/* Forms */
.spf-field input[type="text"],
.spf-field input[type="search"],
.spf-field input[type="tel"],
.spf-field input[type="number"],
.spf-field select,
.spf-field textarea,
.spf-search input[type="search"] {
	border: 1px solid #c9d0d9;
	border-radius: 6px;
	padding: 6px 10px;
	min-height: 34px;
	font-family: inherit;
	font-size: 13px;
	color: #1d2327;
	background: #fff;
}

.spf-field input:focus,
.spf-field select:focus,
.spf-field textarea:focus,
.spf-search input:focus,
.spf-input:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.spf-field textarea {
	min-height: 70px;
	resize: vertical;
}

/* Data tables */
.spf-table {
	width: 100%;
	border-collapse: collapse;
	background: #fff;
}

.spf-table thead th {
	background: #f0f2f5;
	border-bottom: 1px solid #dcdcde;
	padding: 9px 12px;
	text-align: right;
	font-size: 12px;
	font-weight: 600;
	color: #3c434a;
	white-space: nowrap;
}

.spf-table tbody td {
	padding: 9px 12px;
	border-bottom: 1px solid #eef0f3;
	text-align: right;
	font-size: 13px;
	vertical-align: middle;
}

.spf-table tbody tr:last-child td {
	border-bottom: 0;
}

.spf-table tbody tr:nth-child(even) td {
	background: #fafbfc;
}

.spf-table tbody tr:hover td {
	background: #f5f8fc;
}

.spf-table .spf-empty,
.spf-table .spf-empty:hover {
	background: #fff;
	text-align: center;
	padding: 26px 12px;
	color: #646970;
}

.spf-table-card {
	overflow-x: auto;
}

.spf-table a {
	color: #2271b1;
}

.spf-table a.button {
	color: #17324d;
}

.spf-table a.button-primary {
	color: #fff;
}

/* Notices */
.notice {
	background: #fff;
	border: 1px solid #e2e6ec;
	border-right: 4px solid #2271b1;
	border-radius: 6px;
	padding: 10px 14px;
	margin: 0 0 14px;
}

.notice p {
	margin: 0;
	font-size: 13px;
}

.notice-success {
	border-right-color: #00a32a;
	background: #f5fbf6;
}

.notice-error {
	border-right-color: #d63638;
	background: #fdf5f5;
}

.notice-warning {
	border-right-color: #dba617;
	background: #fffaf0;
}

/* Search bar */
.spf-search input[type="search"] {
	min-width: 260px;
}

/* Mobile */
@media (max-width: 782px) {
	.spf-topbar-inner {
		padding: 8px 12px;
	}

	.spf-nav {
		width: 100%;
	}

	.spf-main .spf-wrap {
		padding: 16px 12px 44px;
	}

	.spf-wrap h1,
	.spf-wrap .spf-page-title {
		font-size: 18px;
	}

	.spf-search input[type="search"] {
		min-width: 0;
		flex: 1 1 auto;
	}
}
