.sts-wrap {
	--sts-primary: #1c1c1e;
	--sts-primary-dark: #000000;
	--sts-primary-light: #f5f2ec;
	--sts-bone: #f7f3ea;
	--sts-text: #1f2937;
	--sts-muted: #6b7280;
	--sts-border: #e5e2d9;
	--sts-bg: #faf9f6;
	--sts-danger: #b3261e;
	--sts-success: #2f6f4e;
	--sts-radius: 14px;

	direction: rtl;
	text-align: right;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Tahoma, Vazirmatn, sans-serif;
	max-width: 760px;
	margin: 0 auto;
	color: var(--sts-text);
}

/* ---------- عمومی ---------- */

.sts-wrap .sts-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
}
.sts-wrap .sts-header h3 {
	font-size: 20px;
	font-weight: 700;
	margin: 0;
}

.sts-btn {
	background: linear-gradient(135deg, var(--sts-primary), var(--sts-primary-dark)) !important;
	color: #ffffff !important;
	border: none !important;
	padding: 11px 22px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
	display: inline-block;
	transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.12s ease;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
}
.sts-btn:hover,
.sts-btn:visited,
.sts-btn:active {
	color: #ffffff !important;
}
.sts-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
}
.sts-btn:active {
	transform: translateY(0);
}
.sts-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	transform: none;
}
.sts-btn-secondary {
	background: var(--sts-bone) !important;
	color: var(--sts-text) !important;
	box-shadow: none;
	border: 1px solid var(--sts-border) !important;
}
.sts-btn-secondary:hover,
.sts-btn-secondary:visited {
	color: var(--sts-text) !important;
	background: #f0ebe0 !important;
	box-shadow: none;
}
.sts-btn-outline {
	background: #ffffff !important;
	color: var(--sts-primary) !important;
	border: 1.5px solid var(--sts-primary) !important;
	box-shadow: none;
}
.sts-btn-outline:hover,
.sts-btn-outline:visited {
	color: #ffffff !important;
	background: var(--sts-primary) !important;
	box-shadow: none;
}
.sts-btn-link {
	background: none !important;
	border: none !important;
	box-shadow: none;
	color: var(--sts-muted) !important;
	font-size: 12.5px;
	text-decoration: underline !important;
	cursor: pointer;
	padding: 6px 0;
	display: block;
	width: 100%;
	text-align: center;
}
.sts-btn-link:hover,
.sts-btn-link:visited {
	color: var(--sts-primary) !important;
}
.sts-btn-small {
	padding: 6px 14px;
	font-size: 12.5px;
	box-shadow: none;
}
.sts-btn-block {
	display: block;
	width: 100%;
	text-align: center;
	box-sizing: border-box;
}

/* ---------- نوار بالای پنل (کاربر + خروج) ---------- */

.sts-topbar {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 18px;
	padding-bottom: 12px;
	border-bottom: 1px solid var(--sts-border);
	font-size: 13px;
	color: var(--sts-muted);
}
.sts-topbar-user {
	font-weight: 600;
	color: var(--sts-text);
}
.sts-logout-link {
	color: var(--sts-muted);
	text-decoration: none;
	border: 1px solid var(--sts-border);
	padding: 5px 12px;
	border-radius: 20px;
	transition: background 0.12s ease;
}
.sts-logout-link:hover {
	background: var(--sts-bone);
	color: var(--sts-text);
}

/* ---------- کارت‌ها ---------- */

.sts-card {
	background: #fff;
	border: 1px solid var(--sts-border);
	border-radius: var(--sts-radius);
	padding: 22px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* ---------- صفحه ثبت‌نام / ورود ---------- */

.sts-auth-wrap {
	max-width: 440px;
	padding: 20px 0;
}
.sts-auth-card {
	background: #fff;
	border-radius: 20px;
	padding: 36px 30px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.10), 0 2px 8px rgba(0, 0, 0, 0.04);
	border: 1px solid var(--sts-border);
	text-align: center;
}
.sts-auth-icon {
	font-size: 40px;
	line-height: 1;
	margin-bottom: 10px;
}
.sts-auth-title {
	font-size: 21px;
	font-weight: 700;
	margin: 0 0 6px;
}
.sts-auth-subtitle {
	color: var(--sts-muted);
	font-size: 14px;
	margin: 0 0 24px;
}
.sts-auth-form {
	text-align: right;
}
.sts-auth-divider {
	display: flex;
	align-items: center;
	text-align: center;
	color: var(--sts-muted);
	font-size: 12.5px;
	margin: 20px 0;
}
.sts-auth-divider::before,
.sts-auth-divider::after {
	content: "";
	flex: 1;
	border-bottom: 1px solid var(--sts-border);
}
.sts-auth-divider span {
	padding: 0 12px;
}
.sts-status-msg-block {
	display: block;
	margin-top: 10px;
	text-align: center;
}
.sts-otp-note {
	font-size: 13.5px;
	color: var(--sts-muted);
	margin-bottom: 16px;
	text-align: center;
}

/* ---------- فرم‌ها ---------- */

.sts-wrap form .sts-field,
.sts-wrap form p {
	margin-bottom: 16px;
	text-align: right;
}
.sts-wrap form label {
	display: block;
	margin-bottom: 6px;
	font-weight: 600;
	font-size: 13.5px;
	color: var(--sts-text);
}
.sts-wrap form input[type="text"],
.sts-wrap form input[type="email"],
.sts-wrap form input[type="password"],
.sts-wrap form input[type="file"],
.sts-wrap form select,
.sts-wrap form textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1.5px solid var(--sts-border);
	border-radius: 10px;
	box-sizing: border-box;
	font-size: 14px;
	background: var(--sts-bg);
	transition: border-color 0.15s ease, background 0.15s ease;
}
.sts-wrap form input:focus,
.sts-wrap form select:focus,
.sts-wrap form textarea:focus {
	outline: none;
	border-color: var(--sts-primary);
	background: #fff;
}
.sts-wrap form textarea {
	resize: vertical;
	min-height: 90px;
}

/* ---------- لیست تیکت‌ها ---------- */

#sts-ticket-list {
	background: #fff;
	border: 1px solid var(--sts-border);
	border-radius: var(--sts-radius);
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}
.sts-table {
	width: 100%;
	border-collapse: collapse;
}
.sts-table th {
	background: var(--sts-bg);
	font-size: 12.5px;
	color: var(--sts-muted);
	font-weight: 600;
	padding: 12px 10px;
	text-align: right;
	border-bottom: 1px solid var(--sts-border);
}
.sts-table td {
	padding: 12px 10px;
	text-align: right;
	font-size: 13.5px;
	border-bottom: 1px solid var(--sts-border);
}
.sts-table tbody tr:last-child td {
	border-bottom: none;
}
.sts-table tbody tr {
	transition: background 0.12s ease;
}
.sts-table tbody tr:hover {
	background: var(--sts-primary-light);
}

.sts-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 20px;
	background: #eee;
	font-size: 11.5px;
	font-weight: 600;
}
.sts-status-باز { background: #fef3c7; color: #92400e; }
.sts-status-در-حال-بررسی { background: #dbeafe; color: #1e40af; }
.sts-status-پاسخ-داده-شده { background: #d1fae5; color: #065f46; }
.sts-status-بسته-شده { background: #e5e7eb; color: #374151; }

.sts-empty {
	color: var(--sts-muted);
	text-align: center;
	padding: 40px 20px;
	font-size: 14px;
}

/* ---------- چت / گفتگو ---------- */

#sts-chat-messages {
	max-height: 420px;
	overflow-y: auto;
	border: 1px solid var(--sts-border);
	border-radius: var(--sts-radius);
	padding: 16px;
	margin-bottom: 14px;
	background: var(--sts-bg);
}
.sts-msg {
	padding: 10px 14px;
	border-radius: 14px;
	margin-bottom: 10px;
	max-width: 82%;
	font-size: 13.5px;
	line-height: 1.7;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}
.sts-msg-customer {
	background: #fff;
	border: 1px solid var(--sts-border);
	margin-right: auto;
	border-top-right-radius: 4px;
}
.sts-msg-admin {
	background: linear-gradient(135deg, var(--sts-primary), var(--sts-primary-dark));
	color: #fff;
	margin-left: auto;
	border-top-left-radius: 4px;
}
.sts-msg-admin a {
	color: #fff;
	text-decoration: underline;
}
.sts-msg-meta {
	font-size: 11px;
	opacity: 0.75;
	margin-bottom: 4px;
}
.sts-chat-form-row {
	display: flex;
	gap: 10px;
	align-items: center;
}
.sts-chat-form-row input[type="file"] {
	flex: 1;
}
.sts-chat-form-row .sts-btn {
	flex-shrink: 0;
}

.sts-status-msg {
	margin-right: 10px;
	font-size: 12.5px;
	color: var(--sts-danger);
}

/* ---------- واکنش‌گرا ---------- */

@media (max-width: 600px) {
	.sts-table thead { display: none; }
	.sts-table, .sts-table tbody, .sts-table tr, .sts-table td {
		display: block;
		width: 100%;
	}
	.sts-table tr {
		border-bottom: 1px solid var(--sts-border);
		padding: 10px 0;
	}
	.sts-table td {
		border: none;
		padding: 4px 10px;
	}
	.sts-table td:before {
		content: attr(data-label);
		font-weight: 600;
		color: var(--sts-muted);
		display: inline-block;
		min-width: 90px;
		font-size: 12px;
	}
}
