.stq-card,
.stq-question-row,
.stq-message,
.stq-empty {
	background: #fff;
	border: 1px solid #e7e9ee;
	border-radius: 14px;
}

.stq-card {
	padding: 24px;
	margin-bottom: 28px;
}

.stq-page-heading,
.stq-thread-header,
.stq-message-head,
.stq-question-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.stq-page-heading h2,
.stq-thread-header h2 {
	margin: 0 0 6px;
}

.stq-page-heading p,
.stq-thread-header p {
	margin: 0;
	color: #737987;
}

.stq-form {
	display: grid;
	gap: 10px;
}

.stq-form input[type="text"],
.stq-form select,
.stq-form textarea {
	width: 100%;
	border: 1px solid #d9dde5;
	border-radius: 9px;
	padding: 10px 12px;
}

.stq-form small {
	color: #767d8b;
}

.stq-form .button {
	justify-self: start;
	margin-top: 8px;
}

.stq-list-title {
	margin: 0 0 14px;
}

.stq-question-list {
	display: grid;
	gap: 10px;
}

.stq-question-row {
	padding: 15px 17px;
	color: inherit;
	text-decoration: none;
	transition: border-color .2s ease, box-shadow .2s ease;
}

.stq-question-row:hover,
.stq-question-row.is-unread {
	border-color: var(--primary_color, #4f46e5);
	box-shadow: 0 5px 18px rgba(31, 41, 55, .07);
}

.stq-question-main,
.stq-question-meta {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.stq-question-main span,
.stq-question-meta time,
.stq-message-head time {
	font-size: 12px;
	color: #7b8190;
}

.stq-question-meta {
	align-items: flex-end;
}

.stq-status,
.stq-menu-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	font-size: 11px;
	font-weight: 700;
}

.stq-status {
	padding: 5px 10px;
	background: #eef2ff;
	color: #4338ca;
}

.stq-status-answered { background: #ecfdf3; color: #087443; }
.stq-status-closed { background: #f1f2f4; color: #5f6672; }
.stq-status-unassigned { background: #fff6e6; color: #a15c00; }

.stq-menu-badge {
	min-width: 20px;
	height: 20px;
	padding: 0 5px;
	background: #ef4444;
	color: #fff;
}

.stq-empty {
	padding: 24px;
	text-align: center;
	color: #747b89;
}

.stq-back {
	display: inline-block;
	margin-bottom: 18px;
}

.stq-thread-header {
	margin-bottom: 20px;
}

.stq-message {
	padding: 17px;
	margin-bottom: 12px;
}

.stq-message.is-teacher {
	border-color: #bdebd2;
	background: #f6fff9;
}

.stq-message-body {
	margin-top: 12px;
}

.stq-message-body > :last-child {
	margin-bottom: 0;
}

.stq-attachments {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
	gap: 10px;
	margin-top: 14px;
}

.stq-attachments img {
	width: 100%;
	height: 110px;
	object-fit: cover;
	border-radius: 9px;
}

.stq-reply-form {
	margin-top: 22px;
}

.stq-status-form {
	margin-top: 12px;
}

@media (max-width: 600px) {
	.stq-page-heading,
	.stq-thread-header,
	.stq-question-row {
		align-items: flex-start;
		flex-direction: column;
	}

	.stq-question-meta {
		align-items: flex-start;
	}
}

/* Scoped account conversation layout; inherits the site's Persian font. */
.stq-student-workspace { max-width: 1080px; margin-inline: auto; }
.stq-student-tabs { display: flex; gap: 6px; padding: 5px; margin-bottom: 24px; background: #f0f6f5; border: 1px solid #dce9e6; border-radius: 11px; width: fit-content; max-width: 100%; }
.stq-student-tabs a { padding: 10px 24px; border-radius: 8px; color: #58746f; font-weight: 600; text-decoration: none; text-align: center; }
.stq-student-tabs a.is-active { background: #fff; color: #147e75; box-shadow: 0 2px 6px rgba(30,80,68,.08); }
.stq-student-tabs a:hover { color: #116f68; background: #e4efec; }
.stq-student-tabs a:focus-visible { outline: 2px solid #168e85; outline-offset: 2px; }
.stq-student-list-heading { margin-bottom: 20px; }
.stq-student-list-heading h2 { font-size: 20px; color: #2d484d; }
.stq-student-list-heading p { font-size: 13px; }
@media (max-width: 480px) { .stq-student-tabs { width: 100%; } .stq-student-tabs a { flex: 1; padding-inline: 12px; } }
.stq-student-workspace .stq-new-question { padding: 24px; margin-bottom: 28px; border-color: #e1e9ed; }
.stq-new-question .stq-page-heading { padding-bottom: 19px; margin-bottom: 22px; border-bottom: 1px solid #edf1f3; }
.stq-new-question .stq-page-heading h2 { font-size: 20px; color: #2d484d; }
.stq-new-question .stq-page-heading p { font-size: 13px; line-height: 1.9; }
.stq-new-question .stq-form { gap: 20px; }
.stq-form-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 20px; }
.stq-field { min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.stq-new-question label { margin: 0; font-size: 13px; font-weight: 600; color: #36525a; }
.stq-new-question .stq-form input[type="text"], .stq-new-question .stq-form select { min-height: 46px; margin: 0; background: #fff; box-shadow: none; }
.stq-new-question .select2-container { width: 100% !important; }
.stq-new-question .select2-container .select2-selection--single { min-height: 46px; border: 1px solid #d9dde5; border-radius: 9px; display: flex; align-items: center; }
.stq-new-question .select2-container .select2-selection__rendered { width: 100%; padding-inline: 12px 28px; }
.stq-new-question .select2-container .select2-selection__arrow { height: 44px; }
.stq-new-question .stq-form textarea { min-height: 150px; margin: 0; resize: vertical; font: inherit; font-size: 14px; line-height: 1.9; box-shadow: none; background: #fcfdfd; }
.stq-upload-field { padding: 15px 18px; border: 1px dashed #b9d8d2; border-radius: 10px; background: #f6fbf9; display: grid; gap: 9px; }
.stq-upload-field label span { font-size: 11px; font-weight: 400; color: #7c8f89; margin-inline-start: 8px; }
.stq-new-question .stq-upload-field input[type="file"] { background: transparent; border: 0; padding: 0; }
.stq-new-question .stq-upload-field small { font-size: 11px; line-height: 1.8; }
.stq-submit-row { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; padding-top: 16px; border-top: 1px solid #edf1f3; }
.stq-submit-row small { font-size: 12px; }
.stq-new-question .stq-submit-row .button { margin: 0; min-width: 140px; min-height: 44px; border-radius: 8px; background: #168e85; color: #fff; border: 0; padding: 10px 24px; font: inherit; }
.stq-new-question .stq-submit-row .button:hover { background: #116f68; }
.stq-student-workspace .stq-list-title { padding-inline: 3px; font-size: 17px; }
.stq-student-workspace .stq-question-row { padding: 18px 20px; }
@media (max-width: 680px) {
	.stq-form-top { grid-template-columns: minmax(0, 1fr); gap: 18px; }
	.stq-student-workspace .stq-new-question { padding: 16px; }
	.stq-submit-row { align-items: stretch; flex-direction: column; }
	.stq-new-question .stq-submit-row .button { width: 100%; }
}
.stq-course-filter { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px; padding: 18px; margin: 20px 0 12px; background: #f5faf9; border: 1px solid #dcebe7; border-radius: 12px; }
.stq-course-filter > div { flex: 1 1 260px; }
.stq-course-filter label { display: block; font-weight: 600; margin-bottom: 8px; color: #345550; }
.stq-course-filter select { width: 100%; min-height: 44px; padding: 8px 12px; background: #fff; border: 1px solid #bdd8d2; border-radius: 8px; font: inherit; }
.stq-course-filter .button { min-height: 44px; padding: 8px 20px; background: #168e85; color: #fff; border: 0; border-radius: 8px; font: inherit; }
.stq-course-filter a { padding: 8px; color: #57746e; }
.stq-filter-count { font-size: 12px; color: #6a7e79; }
.stq-pagination { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.stq-pagination .page-numbers { padding: 6px 13px; border: 1px solid #dcebe7; border-radius: 7px; }
.stq-pagination .current { background: #168e85; color: #fff; }
.stq-course-filter select:focus-visible, .stq-course-filter button:focus-visible { outline: 2px solid #168e85; outline-offset: 3px; }
.stq-thread {
	--stq-accent: #168e85;
	color: #263b48;
	max-width: 1040px;
	margin-inline: auto;
	font-family: inherit;
	line-height: 1.9;
}
.stq-thread *, .stq-form * { box-sizing: border-box; }
.stq-thread .stq-back { color: #657785; font-size: 13px; margin-bottom: 18px; }
.stq-thread-header {
	padding: 22px 24px;
	border: 1px solid #dcece9;
	background: #f2faf8;
	border-radius: 14px;
	margin-bottom: 24px;
}
.stq-thread-header h2 { font-size: 23px; line-height: 1.6; color: #203c43; overflow-wrap: anywhere; }
.stq-eyebrow { display: block; color: #64847e; font-size: 12px; margin-bottom: 7px; }
.stq-thread .stq-status { white-space: nowrap; flex-shrink: 0; font-size: 12px; padding: 6px 14px; }
.stq-status-open { background: #e6f5f3; color: #126e67; }
.stq-thread .stq-message { padding: 22px; border-color: #e1e7ec; box-shadow: 0 3px 12px rgba(32,60,67,.025); }
.stq-thread .stq-message.is-teacher { margin-inline-start: 28px; background: #f1faf7; border-color: #cbe8df; }
.stq-author { display: flex; align-items: center; gap: 11px; min-width: 0; }
.stq-author strong { display: block; font-size: 14px; }
.stq-avatar { width: 38px; height: 38px; flex: 0 0 38px; display: grid; place-items: center; border-radius: 12px; color: #557181; background: #edf2f6; font-weight: 700; }
.is-teacher .stq-avatar { background: #d9eee7; color: #18755e; }
.stq-role { display: block; color: #7a8892; font-size: 11px; }
.stq-message-head { padding-bottom: 15px; border-bottom: 1px solid #e9eef0; }
.stq-message-head time { white-space: nowrap; direction: rtl; font-size: 11px; }
.stq-message-body { line-height: 2.1; overflow-wrap: anywhere; font-size: 14px; margin-top: 16px; }
.stq-thread .stq-attachments { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; }
.stq-thread .stq-attachments a { display: block; width: 190px; max-width: 100%; border: 1px solid #dbe4e9; border-radius: 10px; padding: 5px; background: #f5f7f8; }
.stq-thread .stq-attachments img { display: block; width: 100%; height: 132px; object-fit: contain; border-radius: 6px; }
.stq-thread .stq-reply-form { border: 1px solid #dce5e9; box-shadow: none; margin: 25px 0 14px; padding: 22px; gap: 12px; }
.stq-compose-title { font-size: 16px; font-weight: 700; color: #243e49; }
.stq-thread .stq-form textarea { min-height: 145px; background: #fafcfc; resize: vertical; font: inherit; color: inherit; line-height: 1.9; }
.stq-form input[type="text"], .stq-form select { font: inherit; }
.stq-form textarea:focus, .stq-form input:focus, .stq-form select:focus { outline: 2px solid #55b9ad; outline-offset: 2px; border-color: #168e85; }
.stq-form input[type="file"] { width: 100%; max-width: 100%; padding: 12px; border: 1px dashed #b8d5d0; border-radius: 9px; background: #f7fbfa; font: inherit; font-size: 12px; color: #61776f; }
.stq-form input[type="file"]::file-selector-button { background: #e1f0ec; color: #21675a; border: 0; border-radius: 6px; padding: 8px 12px; margin-inline-end: 12px; cursor: pointer; font: inherit; }
.stq-thread .stq-form .button { background: #168e85; border: 1px solid #168e85; border-radius: 8px; padding: 10px 25px; min-height: 44px; color: #fff; font: inherit; font-weight: 600; }
.stq-thread .stq-form .button:hover { background: #116f68; }
.stq-thread .stq-status-form { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px; margin-top: 20px; border: 1px solid #e7e3db; border-radius: 10px; background: #fbfaf7; }
.stq-status-help { color: #6b6255; font-size: 13px; line-height: 1.8; }
.stq-thread .stq-status-form .button { flex-shrink: 0; background: #fff; border: 1px solid #d6dfe5; color: #566c79; border-radius: 8px; padding: 8px 18px; font: inherit; }
.stq-thread .stq-status-form .stq-close-button { border-color: #b98245; color: #875621; }
.stq-thread .stq-status-form .button:disabled { opacity: .55; cursor: not-allowed; }
.stq-closed-note { padding: 17px 20px; background: #f5f7f9; border-radius: 10px; color: #687b86; font-size: 13px; }
.stq-feedback { display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; margin: 16px 0 22px; border: 1px solid #e9d2ad; border-inline-start: 5px solid #b97828; border-radius: 10px; background: #fff8eb; color: #62461d; line-height: 1.8; }
.stq-feedback strong { display: block; font-size: 15px; }
.stq-feedback p { margin: 5px 0 0; font-size: 13px; }
.stq-feedback-icon { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 28px; border-radius: 50%; background: #b97828; color: #fff; font-weight: 700; }
.stq-feedback-success { border-color: #bfdfce; border-inline-start-color: #27825a; background: #f0faf4; color: #1e6646; }
.stq-feedback-success .stq-feedback-icon { background: #27825a; }
.stq-feedback-notice { border-color: #c8dcea; border-inline-start-color: #3f7c9d; background: #f0f7fb; color: #285f7c; }
.stq-feedback-notice .stq-feedback-icon { background: #3f7c9d; }
.stq-navigation { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.stq-back-note { color: #687b86; font-size: 12px; }
.stq-question-row { border-inline-start: 3px solid transparent; }
.stq-question-row.is-unread { border-inline-start-color: #168e85; background: #f7fcfa; }
.stq-question-row:hover { border-color: #9bcbc3; }
@media (max-width: 600px) {
	.stq-thread-header, .stq-thread .stq-message, .stq-thread .stq-reply-form { padding: 16px; }
	.stq-thread-header h2 { font-size: 19px; }
	.stq-message-head { align-items: flex-start; flex-direction: column; gap: 9px; }
	.stq-thread .stq-message.is-teacher { margin-inline-start: 0; }
	.stq-thread .stq-attachments a { width: calc(50% - 6px); }
	.stq-thread .stq-form .button { width: 100%; }
	.stq-thread .stq-status-form { align-items: stretch; flex-direction: column; }
	.stq-thread .stq-status-form .button { width: 100%; }
	.stq-feedback { padding: 14px; }
	.stq-student-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
	.stq-student-tabs a { min-width: 0; padding-inline: 8px; }
	.stq-course-filter { align-items: stretch; padding: 14px; }
	.stq-course-filter > div { flex-basis: 100%; }
	.stq-course-filter .button { width: 100%; }
	.stq-student-workspace .stq-question-row { gap: 12px; padding: 16px; }
	.stq-question-main { width: 100%; min-width: 0; }
	.stq-question-main strong { overflow-wrap: anywhere; }
	.stq-question-meta { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; gap: 10px; }
}
