/* ============================================================
   Tasaa3d Salary Tools — كل الأنماط مسبوقة بـ .tsd-
   الهوية: خط Tajawal | #3d77b2 أساسي | #0F172A عناوين | #4A4A4A نص
   ============================================================ */

.tsd-wrap {
	--tsd-primary: #3d77b2;
	--tsd-primary-dark: #2f5e8f;
	--tsd-ink: #0f172a;
	--tsd-body: #4a4a4a;
	--tsd-border: #dcdcdc;
	--tsd-bg: #f7f9fc;
	--tsd-white: #ffffff;
	--tsd-ok: #1f7a4d;
	--tsd-warn: #b45309;
	font-family: 'Tajawal', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	color: var(--tsd-body);
	line-height: 1.8;
	max-width: 1100px;
	margin: 0 auto;
	padding: 0 4px;
	box-sizing: border-box;
}

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

.tsd-wrap .tsd-h2 {
	color: var(--tsd-ink);
	font-size: 1.6rem;
	line-height: 1.5;
	margin: 2rem 0 1rem;
	font-weight: 700;
}

.tsd-wrap .tsd-h3 {
	color: var(--tsd-ink);
	font-size: 1.15rem;
	margin: 1.4rem 0 0.4rem;
	font-weight: 700;
}

.tsd-wrap .tsd-p {
	margin: 0 0 0.9rem;
	font-size: 1.02rem;
	color: var(--tsd-body);
}

/* ---------------- البطاقات ---------------- */
.tsd-card {
	background: var(--tsd-white);
	border: 1px solid var(--tsd-border);
	border-radius: 16px;
	padding: 24px;
	margin: 0 0 24px;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.tsd-card--hero {
	background: linear-gradient(180deg, #f7f9fc 0%, #ffffff 60%);
}

.tsd-chip {
	display: inline-block;
	background: rgba(61, 119, 178, 0.1);
	color: var(--tsd-primary-dark);
	font-size: 0.85rem;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 12px;
}

.tsd-hero__title {
	margin-top: 0 !important;
	font-size: 1.75rem !important;
}

.tsd-hero__lead {
	font-size: 1.05rem;
}

/* ---------------- العد التنازلي ---------------- */
.tsd-countdown {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin: 20px 0 12px;
}

.tsd-countdown__unit {
	background: var(--tsd-primary);
	color: #fff;
	border-radius: 14px;
	padding: 16px 8px;
	text-align: center;
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.tsd-countdown__num {
	font-size: 1.9rem;
	font-weight: 700;
	line-height: 1.2;
	font-variant-numeric: tabular-nums;
}

.tsd-countdown__lbl {
	font-size: 0.82rem;
	opacity: 0.9;
}

.tsd-note {
	font-size: 0.9rem;
	color: #64748b;
	margin: 10px 0 0;
}

.tsd-note--early {
	color: var(--tsd-ok);
	font-weight: 700;
}

.tsd-note--late {
	color: var(--tsd-warn);
	font-weight: 700;
}

/* ---------------- الجداول ---------------- */
.tsd-table-wrap {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	border: 1px solid var(--tsd-border);
	border-radius: 14px;
	margin: 0 0 20px;
	background: #fff;
}

.tsd-table {
	width: 100%;
	border-collapse: collapse;
	min-width: 640px;
	font-size: 0.95rem;
}

.tsd-table--scale {
	min-width: 900px;
	font-size: 0.88rem;
}

.tsd-table thead th {
	background: var(--tsd-primary);
	color: #fff;
	font-weight: 700;
	padding: 12px 10px;
	text-align: center;
	white-space: nowrap;
}

.tsd-table tbody th {
	background: #f1f5f9;
	color: var(--tsd-ink);
	font-weight: 700;
	padding: 10px;
	text-align: right;
	white-space: nowrap;
}

.tsd-table tbody td {
	padding: 10px;
	text-align: center;
	border-top: 1px solid #eef2f6;
	font-variant-numeric: tabular-nums;
}

.tsd-table tbody tr:nth-child(even) td {
	background: #fbfcfe;
}

.tsd-table tbody tr.tsd-row--next td,
.tsd-table tbody tr.tsd-row--next th {
	background: rgba(61, 119, 178, 0.08);
	font-weight: 700;
}

.tsd-tag {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.8rem;
	font-weight: 700;
	white-space: nowrap;
}

.tsd-tag--next {
	background: rgba(61, 119, 178, 0.14);
	color: var(--tsd-primary-dark);
}

.tsd-tag--soon {
	background: #eef2f6;
	color: #475569;
}

.tsd-tag--paid {
	background: #e8f5ee;
	color: var(--tsd-ok);
}

.tsd-tag--early,
.tsd-tag--late {
	background: #fff4e5;
	color: var(--tsd-warn);
}

/* ---------------- الحاسبة ---------------- */
.tsd-calc {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(255px, 1fr));
	gap: 14px;
	margin: 18px 0;
}

.tsd-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.tsd-field label {
	font-size: 0.9rem;
	font-weight: 700;
	color: var(--tsd-ink);
}

.tsd-field select {
	width: 100%;
	padding: 11px 12px;
	border: 1px solid var(--tsd-border);
	border-radius: 10px;
	background: #fff;
	font-family: inherit;
	font-size: 0.95rem;
	color: var(--tsd-ink);
	appearance: none;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath fill='%234a4a4a' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: left 14px center;
	padding-left: 34px;
	text-overflow: ellipsis;
	min-width: 0;
}

.tsd-field select:focus {
	outline: 2px solid rgba(61, 119, 178, 0.35);
	outline-offset: 1px;
}

.tsd-result {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	background: var(--tsd-bg);
	border: 1px solid var(--tsd-border);
	border-radius: 14px;
	padding: 16px;
}

.tsd-result__row {
	display: flex;
	justify-content: space-between;
	gap: 10px;
	align-items: center;
	padding: 8px 10px;
	background: #fff;
	border-radius: 10px;
	font-size: 0.95rem;
}

.tsd-result__row strong {
	color: var(--tsd-ink);
	font-variant-numeric: tabular-nums;
}

.tsd-result__row--net {
	grid-column: 1 / -1;
	background: var(--tsd-primary);
}

.tsd-result__row--net span,
.tsd-result__row--net strong {
	color: #fff;
	font-size: 1.1rem;
}

/* ---------------- بطاقة التطبيق ---------------- */
.tsd-app-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	background: linear-gradient(135deg, #3d77b2 0%, #2f5e8f 100%);
	color: #fff;
	border-radius: 18px;
	padding: 24px;
	margin: 28px 0 8px;
}

.tsd-app-card__badge {
	display: inline-block;
	background: rgba(255, 255, 255, 0.18);
	color: #fff;
	font-size: 0.78rem;
	font-weight: 700;
	padding: 4px 12px;
	border-radius: 999px;
	margin-bottom: 8px;
}

.tsd-app-card__title {
	color: #fff;
	margin: 0 0 6px;
	font-size: 1.25rem;
	font-weight: 700;
}

.tsd-app-card__text {
	color: rgba(255, 255, 255, 0.92);
	margin: 0;
	font-size: 0.95rem;
	max-width: 520px;
}

.tsd-app-card__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.tsd-btn {
	display: inline-block;
	padding: 11px 20px;
	border-radius: 10px;
	font-weight: 700;
	font-size: 0.92rem;
	text-decoration: none !important;
	transition: transform 0.15s ease, background 0.15s ease;
}

.tsd-btn--primary {
	background: #fff;
	color: var(--tsd-primary-dark) !important;
}

.tsd-btn--ghost {
	background: transparent;
	color: #fff !important;
	border: 1px solid rgba(255, 255, 255, 0.65);
}

.tsd-btn:hover {
	transform: translateY(-1px);
}

/* ---------------- أسئلة شائعة ---------------- */
.tsd-faq {
	margin-top: 28px;
	padding-top: 8px;
	border-top: 1px solid var(--tsd-border);
}

.tsd-faq .tsd-h3 {
	background: var(--tsd-bg);
	padding: 10px 14px;
	border-radius: 10px;
	border-right: 3px solid var(--tsd-primary);
}

.tsd-scale__title {
	margin-top: 2.2rem !important;
	padding-bottom: 6px;
	border-bottom: 2px solid var(--tsd-bg);
}

/* ---------------- الجوال ---------------- */
@media (max-width: 782px) {
	.tsd-card {
		padding: 18px;
		border-radius: 14px;
	}

	.tsd-hero__title {
		font-size: 1.35rem !important;
	}

	.tsd-h2 {
		font-size: 1.25rem !important;
	}

	.tsd-countdown {
		grid-template-columns: repeat(2, 1fr);
		gap: 10px;
	}

	.tsd-countdown__num {
		font-size: 1.5rem;
	}

	.tsd-calc {
		grid-template-columns: 1fr;
	}

	.tsd-result {
		grid-template-columns: 1fr;
	}

	.tsd-app-card {
		padding: 18px;
		text-align: center;
		justify-content: center;
	}

	.tsd-app-card__actions {
		width: 100%;
		justify-content: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tsd-btn {
		transition: none;
	}
}

/* ---------------- لوحة البدلات (checkboxes / نسب / اختيارات) ---------------- */
.tsd-allow {
	border: 1px solid var(--tsd-border);
	border-radius: 14px;
	background: #fff;
	padding: 14px 16px;
	margin: 0 0 16px;
}

.tsd-allow__head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	margin-bottom: 12px;
}

.tsd-allow__title {
	margin: 0;
	font-size: 1.02rem;
	font-weight: 700;
	color: var(--tsd-ink);
}

.tsd-allow__hint {
	font-size: 0.82rem;
	color: #64748b;
}

.tsd-allow__grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 10px;
}

.tsd-check {
	display: flex;
	align-items: center;
	gap: 8px;
	border: 1px solid var(--tsd-border);
	border-radius: 10px;
	padding: 9px 12px;
	background: #fff;
	cursor: pointer;
	font-size: 0.92rem;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.tsd-check input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--tsd-primary);
	flex: 0 0 auto;
	cursor: pointer;
}

.tsd-check__label {
	flex: 1;
	color: var(--tsd-ink);
}

.tsd-check__value {
	font-size: 0.8rem;
	color: #64748b;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.tsd-check:hover {
	border-color: var(--tsd-primary);
}

.tsd-check:has(input:checked) {
	border-color: var(--tsd-primary);
	background: rgba(61, 119, 178, 0.07);
}

.tsd-check:has(input:checked) .tsd-check__value {
	color: var(--tsd-primary-dark);
	font-weight: 700;
}

.tsd-allow__field {
	display: flex;
	flex-direction: column;
	gap: 5px;
	border: 1px solid var(--tsd-border);
	border-radius: 10px;
	padding: 9px 12px;
	background: #fff;
}

.tsd-allow__label {
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--tsd-ink);
}

.tsd-allow__field select,
.tsd-allow__field input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--tsd-border);
	border-radius: 8px;
	background: #fff;
	font-family: inherit;
	font-size: 0.9rem;
	color: var(--tsd-ink);
}

.tsd-allow__field select:focus,
.tsd-allow__field input:focus {
	outline: 2px solid rgba(61, 119, 178, 0.35);
	outline-offset: 1px;
}

.tsd-allow__empty {
	margin: 0;
	font-size: 0.9rem;
	color: #64748b;
}

@media (max-width: 782px) {
	.tsd-allow__grid {
		grid-template-columns: 1fr;
	}
}

