/* Tasnim Referral System — frontend */
.trs-dashboard,
.trs-shortcode,
.trs-form {
	direction: inherit;
}

.trs-dashboard__nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 1px solid #e4ecef;
	padding-bottom: 10px;
}

.trs-dashboard__tab {
	display: inline-block;
	padding: 8px 14px;
	border-radius: 999px;
	text-decoration: none;
	color: #3d4f58;
	background: #f3f7f8;
	font-size: 14px;
}

.trs-dashboard__tab.is-active {
	background: #135e73;
	color: #fff;
}

.trs-summary-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	gap: 12px;
	margin-bottom: 24px;
}

.trs-summary-card {
	background: #f6fbfc;
	border: 1px solid #d7e6ea;
	border-radius: 12px;
	padding: 16px;
}

.trs-summary-card span,
.trs-summary-card em {
	display: block;
	color: #5b6b75;
	font-size: 13px;
	font-style: normal;
}

.trs-summary-card strong {
	display: block;
	margin: 6px 0;
	font-size: 20px;
	color: #12313d;
}

.trs-link-box,
.trs-link-generator {
	background: #fff;
	border: 1px solid #d7e6ea;
	border-radius: 12px;
	padding: 16px;
}

.trs-link-row {
	display: flex;
	gap: 8px;
	margin-top: 8px;
	align-items: stretch;
}

.trs-link-row .trs-copy-btn {
	flex: 0 0 auto;
	white-space: nowrap;
}

.trs-link-row input,
.trs-form input,
.trs-form select,
.trs-form textarea,
.trs-input {
	width: 100%;
	max-width: 100%;
	padding: 8px 10px;
}

.trs-form input[type="radio"],
.trs-form input[type="checkbox"],
.trs-form .trs-payout-option input[type="radio"] {
	width: auto !important;
	max-width: none !important;
	height: auto;
	padding: 0;
	margin: 0;
	flex: 0 0 auto;
	accent-color: #135e73;
}

.trs-share {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 12px;
}

.trs-share__btn {
	display: inline-block;
	padding: 6px 12px;
	border-radius: 8px;
	color: #fff !important;
	text-decoration: none;
	font-size: 13px;
}

.trs-share__telegram { background: #229ed9; }
.trs-share__whatsapp { background: #25d366; }
.trs-share__bale { background: #00a859; }
.trs-share__eitaa { background: #fa6400; }
.trs-share__x { background: #111; }

.trs-table-wrap {
	overflow-x: auto;
}

.trs-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.trs-table th,
.trs-table td {
	border-bottom: 1px solid #e6eef1;
	padding: 10px 8px;
	text-align: start;
}

.trs-badge {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
	background: #eef2f5;
	color: #44555e;
}

.trs-badge--enabled,
.trs-badge--completed,
.trs-badge--paid { background: #e5f7ee; color: #0d7a45; }
.trs-badge--pending,
.trs-badge--pending-payment { background: #fff6e5; color: #9a6b00; }
.trs-badge--rejected,
.trs-badge--banned,
.trs-badge--cancelled,
.trs-badge--refunded { background: #fdecee; color: #b42318; }

.trs-notice {
	padding: 12px 16px;
	border-radius: 10px;
	margin-bottom: 16px;
}

.trs-notice--info { background: #eef7fb; color: #135e73; }
.trs-notice--error { background: #fdecee; color: #b42318; }

.trs-form input[readonly] {
	background: #f3f4f6;
	cursor: not-allowed;
	color: #4b5563;
}

.trs-form .description {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: #5b6b75;
	font-weight: 400;
}

.trs-login-cta {
	display: inline-block;
	margin-top: 8px;
}

.trs-pagination { margin-top: 16px; }

.trs-payout-option {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: flex-start;
	gap: 8px;
	width: fit-content;
	max-width: 100%;
	margin: 10px 0;
	font-weight: 600;
	cursor: pointer;
}

.trs-payout-option span {
	flex: 0 1 auto;
}

.trs-payout-panel {
	border: 1px solid #d7e6ea;
	border-radius: 12px;
	padding: 14px 16px;
	margin: 0 0 16px;
	margin-inline-start: 1.6rem;
	background: #f8fbfc;
}

.trs-warning {
	background: #fff6e5;
	color: #9a6b00;
	padding: 10px 12px;
	border-radius: 8px;
}

.trs-gift {
	background: #e5f7ee;
	color: #0d7a45;
	padding: 10px 12px;
	border-radius: 8px;
}

.trs-product-ref {
	background: #f6fbfc;
	border: 1px solid #d7e6ea;
	border-radius: 12px;
	padding: 16px;
	margin: 16px 0;
}

.trs-product-ref__title {
	margin: 0 0 8px;
	font-size: 16px;
	color: #12313d;
}

.trs-product-ref__hint {
	margin: 0 0 10px;
	font-size: 13px;
	color: #5b6b75;
}

.trs-product-ref .trs-link-row .trs-copy-target {
	flex: 1 1 auto;
	min-width: 0;
	direction: ltr;
	text-align: left;
}

@media (max-width: 600px) {
	.trs-link-row { flex-direction: column; }
	.trs-date-filter { flex-direction: column; align-items: stretch; }
}

.trs-date-filter {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	gap: 10px;
	margin-bottom: 16px;
}

.trs-date-filter label {
	display: flex;
	flex-direction: column;
	gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #3d4f58;
}

.trs-date-filter .trs-jalali-date {
	width: 140px;
	max-width: 100%;
	padding: 8px 10px;
	padding-inline-end: 32px;
	cursor: pointer;
	background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%235b6b75' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'%3E%3C/rect%3E%3Cline x1='16' y1='2' x2='16' y2='6'%3E%3C/line%3E%3Cline x1='8' y1='2' x2='8' y2='6'%3E%3C/line%3E%3Cline x1='3' y1='10' x2='21' y2='10'%3E%3C/line%3E%3C/svg%3E") no-repeat;
	background-position: left 8px center;
}

.trs-dp-popup {
	position: absolute;
	z-index: 99999;
	background: #fff;
	border: 1px solid #d7e6ea;
	border-radius: 10px;
	box-shadow: 0 8px 24px rgba(18, 49, 61, 0.12);
	min-width: 280px;
	direction: rtl;
	font-size: 13px;
}

.trs-dp-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 10px 14px;
	border-bottom: 1px solid #eef4f6;
	background: #f6fbfc;
	border-radius: 10px 10px 0 0;
}

.trs-dp-title {
	font-weight: 700;
	color: #12313d;
}

.trs-dp-nav {
	background: none;
	border: 1px solid #d7e6ea;
	border-radius: 4px;
	width: 28px;
	height: 28px;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #3d4f58;
}

.trs-dp-nav:hover { background: #e9ecef; }

.trs-dp-table {
	width: 100%;
	border-collapse: collapse;
}

.trs-dp-table th {
	text-align: center;
	padding: 6px 0;
	color: #98a2b3;
	font-size: 11px;
}

.trs-dp-table td {
	text-align: center;
	padding: 5px 2px;
}

.trs-dp-day {
	border-radius: 6px;
	cursor: pointer;
	width: 34px;
	height: 30px;
	line-height: 30px;
}

.trs-dp-day:hover { background: #e8f4f7; color: #135e73; }

.trs-dp-today {
	background: #eef7fb;
	color: #135e73;
	font-weight: 700;
}

.trs-dp-selected {
	background: #135e73 !important;
	color: #fff !important;
	font-weight: 700;
}

.trs-dp-footer {
	padding: 8px 14px;
	border-top: 1px solid #eef4f6;
	text-align: center;
}

.trs-dp-clear {
	background: none;
	border: 1px solid #d7e6ea;
	border-radius: 4px;
	padding: 4px 12px;
	cursor: pointer;
	font-size: 12px;
	color: #5b6b75;
}

.trs-dp-clear:hover { background: #fff6e5; color: #9a6b00; }
