.sm-notice-board {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
	background: #fafafa;
	max-width: 700px;
	margin: 20px 0;
}
.sm-notice-title {
	margin-top: 0;
	border-bottom: 2px solid #2271b1;
	padding-bottom: 10px;
}
.sm-notice-list { list-style: none; margin: 0; padding: 0; }
.sm-notice-item {
	padding: 12px 0;
	border-bottom: 1px solid #eee;
}
.sm-notice-item:last-child { border-bottom: none; }
.sm-notice-date {
	display: inline-block;
	font-size: 12px;
	color: #777;
	background: #eef3f7;
	padding: 2px 8px;
	border-radius: 10px;
	margin-bottom: 6px;
}
.sm-notice-item-title { display: block; font-size: 16px; margin-bottom: 4px; }
.sm-notice-content { color: #444; font-size: 14px; }

.sm-result-lookup { max-width: 600px; margin: 20px 0; }
.sm-result-form { display: flex; gap: 10px; align-items: center; margin-bottom: 15px; }
.sm-result-table { width: 100%; border-collapse: collapse; margin-top: 10px; }
.sm-result-table th, .sm-result-table td { border: 1px solid #ddd; padding: 8px 10px; text-align: left; }
.sm-result-table th { background: #f5f5f5; }
.sm-error { color: #d63638; }

/* ---------- Student / Teacher Portal ---------- */
.sm-portal-box { max-width: 900px; margin: 20px auto; font-family: -apple-system, sans-serif; }
.sm-portal-login {
	max-width: 380px;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 26px;
	background: #fafafa;
}
.sm-portal-login h3 { margin-top: 0; }
.sm-input {
	width: 100%;
	padding: 8px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
}
.sm-btn {
	background: #2271b1;
	color: #fff;
	border: none;
	padding: 9px 18px;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
}
.sm-btn-outline {
	background: transparent;
	color: #2271b1;
	border: 1px solid #2271b1;
	text-decoration: none;
	padding: 7px 14px;
	border-radius: 6px;
	font-size: 13px;
}
.sm-portal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-bottom: 2px solid #2271b1;
	padding-bottom: 12px;
	margin-bottom: 18px;
}
.sm-portal-header h2 { margin: 0 0 4px; }
.sm-portal-header p { margin: 0; color: #666; font-size: 13px; }
.sm-portal-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 700px) {
	.sm-portal-grid { grid-template-columns: 1fr; }
}
.sm-portal-card {
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	padding: 16px;
	background: #fff;
}
.sm-portal-card h3 { margin-top: 0; font-size: 15px; border-bottom: 1px solid #eee; padding-bottom: 8px; }
.sm-portal-table { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: 13px; }
.sm-portal-table th, .sm-portal-table td { border: 1px solid #eee; padding: 6px 8px; text-align: left; }
.sm-portal-notice { padding: 8px 0; border-bottom: 1px solid #f0f0f0; }
.sm-portal-notice-date { display: block; font-size: 11px; color: #888; }

/* ---------- Class Teacher Panel ---------- */
.sm-portal-card-wide { grid-column: 1 / -1; }
.sm-ct-panel h3 { margin-top: 0; }
.sm-ct-class-switch { margin-bottom: 12px; }
.sm-ct-class-switch select { padding: 6px 8px; border-radius: 6px; border: 1px solid #ccc; }
.sm-ct-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	border-bottom: 1px solid #e5e5e5;
	margin-bottom: 16px;
	padding-bottom: 8px;
}
.sm-ct-tab {
	padding: 7px 14px;
	border-radius: 6px;
	background: #f0f2f5;
	color: #333;
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}
.sm-ct-tab:hover { background: #e4e7eb; }
.sm-ct-tab.active { background: #2271b1; color: #fff; }
.sm-ct-inline-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.sm-ct-inline-form label { font-weight: 600; font-size: 13px; }
.sm-ct-inline-form select, .sm-ct-inline-form input[type="date"] {
	padding: 7px 9px;
	border: 1px solid #ccc;
	border-radius: 6px;
}
.sm-ct-content table.sm-portal-table input[type="text"] { width: 90px; padding: 4px 6px; border: 1px solid #ccc; border-radius: 4px; }

/* ---------- Online Admission Form ---------- */
.sm-admission-box {
	max-width: 720px;
	margin: 20px auto;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 26px;
	font-family: -apple-system, sans-serif;
}
.sm-admission-box h2 { margin-top: 0; border-bottom: 2px solid #2271b1; padding-bottom: 12px; }
.sm-admission-form .sm-form-row { margin-bottom: 14px; }
.sm-admission-form .sm-form-row-group {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 14px;
	margin-bottom: 14px;
}
@media (max-width: 600px) {
	.sm-admission-form .sm-form-row-group { grid-template-columns: 1fr; }
}
.sm-admission-form .sm-form-row-group .sm-form-row { margin-bottom: 0; }
.sm-admission-form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: #333; }
.sm-admission-form input[type="text"],
.sm-admission-form input[type="date"],
.sm-admission-form input[type="email"],
.sm-admission-form input[type="file"],
.sm-admission-form select,
.sm-admission-form textarea {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 14px;
}
.sm-payment-section {
	background: #f7f9fb;
	border: 1px solid #e0e6ea;
	border-radius: 8px;
	padding: 14px;
}
.sm-payment-methods { display: flex; gap: 20px; margin: 10px 0; flex-wrap: wrap; }
.sm-pay-option { font-weight: normal; display: flex; align-items: center; gap: 6px; }
.sm-pay-details { margin-top: 10px; padding: 10px; background: #fff; border-radius: 6px; border: 1px solid #eee; }

.sm-alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-size: 14px; }
.sm-alert-success { background: #edfaef; color: #1a7d34; border: 1px solid #b8e6c1; }
.sm-alert-error { background: #fcf0f1; color: #a02128; border: 1px solid #f3c2c5; }

.sm-admission-confirmation { max-width: 600px; margin: 20px auto; text-align: center; font-family: -apple-system, sans-serif; }
.sm-app-id-box {
	display: inline-block;
	background: #2271b1;
	color: #fff;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 1px;
	padding: 12px 24px;
	border-radius: 8px;
	margin: 14px 0;
}
.sm-confirm-table { width: 100%; border-collapse: collapse; margin: 20px 0; text-align: left; }
.sm-confirm-table th, .sm-confirm-table td { border: 1px solid #eee; padding: 8px 12px; }
.sm-confirm-table th { background: #f7f7f7; width: 40%; }

.sm-badge {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	background: #f0f0f1;
	color: #50575e;
}
.sm-badge-app-pending { background: #fef8ee; color: #dba617; }
.sm-badge-app-approved { background: #edfaef; color: #00a32a; }
.sm-badge-app-rejected { background: #fcf0f1; color: #d63638; }

.sm-approved-box {
	margin: 20px 0;
	border: 2px solid #00a32a;
	border-radius: 8px;
	padding: 16px;
	background: #f5fcf6;
	text-align: left;
}
.sm-approved-box h3 { margin-top: 0; color: #1a7d34; }

.sm-confirm-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 20px; }

.sm-status-check-box {
	max-width: 500px;
	margin: 20px auto;
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 26px;
	font-family: -apple-system, sans-serif;
	text-align: center;
}
.sm-status-check-box h2 { margin-top: 0; }
.sm-status-check-sub { color: #666; font-size: 13px; margin-top: -8px; }
.sm-status-form { text-align: left; margin-top: 16px; }
.sm-status-form .sm-form-row { margin-bottom: 14px; }
.sm-status-form label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: #333; }
.sm-status-form input {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 14px;
}
.sm-status-form .sm-btn { width: 100%; padding: 10px; }
.sm-status-check-box .sm-admission-confirmation { text-align: left; margin: 20px 0 0; }

/* ---------- Submit Success পপ-আপ (মোডাল) ---------- */
.sm-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 20, 25, 0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 99999;
	padding: 20px;
	box-sizing: border-box;
}
.sm-modal-card {
	position: relative;
	background: #fff;
	border-radius: 12px;
	max-width: 640px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	padding: 30px 26px 24px;
	box-shadow: 0 10px 40px rgba(0,0,0,0.25);
	animation: sm-modal-pop 0.2s ease-out;
}
@keyframes sm-modal-pop {
	from { transform: scale(0.94); opacity: 0; }
	to   { transform: scale(1); opacity: 1; }
}
.sm-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: #f0f0f1;
	border: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	font-size: 15px;
	cursor: pointer;
	color: #555;
	line-height: 1;
}
.sm-modal-close:hover { background: #e2e2e3; }
.sm-modal-card .sm-admission-confirmation { margin: 0; }

/* ---------- Roll-number Result Lookup ("Check Your Result") ---------- */
.sm-rbr-box {
	max-width: 640px;
	margin: 20px auto;
	background: #fafafa;
	border: 1px solid #e0e0e0;
	border-radius: 10px;
	padding: 22px 26px;
	font-family: -apple-system, sans-serif;
}
.sm-rbr-box h3 { margin-top: 0; }
.sm-rbr-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.sm-rbr-form .sm-form-row:last-of-type,
.sm-rbr-form .sm-btn { grid-column: 1 / -1; }
.sm-rbr-form .sm-form-row label { display: block; margin-bottom: 5px; font-weight: 600; font-size: 13px; color: #333; }
.sm-rbr-form select, .sm-rbr-form input[type="text"] {
	width: 100%;
	padding: 9px 10px;
	border: 1px solid #ccc;
	border-radius: 6px;
	box-sizing: border-box;
	font-size: 14px;
}
.sm-rbr-actions { max-width: 780px; margin: 16px auto; text-align: center; }

/* ---------- Result Sheet (frontend copy of the admin Result Sheet design) ---------- */
.sm-resultsheet-wrap { display: flex; justify-content: center; margin: 10px auto 30px; }
.sm-resultsheet {
	width: 100%;
	max-width: 780px;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 8px;
	padding: 26px 30px;
	box-shadow: 0 2px 6px rgba(0,0,0,.08);
	font-family: -apple-system, sans-serif;
}
.sm-rs-header { display: flex; align-items: center; gap: 14px; border-bottom: 3px solid #2271b1; padding-bottom: 14px; margin-bottom: 10px; }
.sm-rs-logo { width: 54px; height: 54px; object-fit: contain; }
.sm-rs-school-name { font-size: 19px; font-weight: 700; }
.sm-rs-school-meta { font-size: 12px; color: #666; margin-top: 2px; }
.sm-rs-title { text-align: center; font-size: 18px; text-decoration: underline; margin: 14px 0 4px; }
.sm-rs-exam { text-align: center; color: #555; margin: 0 0 18px; font-size: 13px; }
.sm-rs-info-table, .sm-rs-subjects-table, .sm-rs-summary-table {
	width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 18px;
}
.sm-rs-info-table th, .sm-rs-info-table td,
.sm-rs-subjects-table th, .sm-rs-subjects-table td,
.sm-rs-summary-table th, .sm-rs-summary-table td { border: 1px solid #ddd; padding: 6px 10px; text-align: left; }
.sm-rs-info-table th { background: #f7f7f7; width: 18%; }
.sm-rs-subjects-table thead th { background: #2271b1; color: #fff; }
.sm-rs-optional-row td { background: #fafbfc; }
.sm-rs-opt-tag { color: #8a6116; font-size: 11px; font-weight: 600; }
.sm-rs-summary-table th { background: #f7f7f7; width: 12%; }
.sm-rs-status { font-weight: 800; padding: 3px 12px; border-radius: 4px; letter-spacing: 1px; }
.sm-rs-status-pass { background: #edfaef; color: #1a7d34; }
.sm-rs-status-fail { background: #fcf0f1; color: #a02128; }
.sm-rs-status-absent { background: #fef3e6; color: #a05a00; }
.sm-rs-absent-cell { color: #a05a00; font-weight: 600; }
.sm-rs-failed-note { color: #a02128; font-size: 13px; margin: -8px 0 16px; }
.sm-rs-footer { margin-top: 20px; padding-top: 12px; border-top: 1px solid #eee; font-size: 11px; color: #777; text-align: center; line-height: 1.5; }

/* ---------- ID Card (portal copy of the admin design) ---------- */
.sm-idcard-wrap { display: flex; justify-content: center; margin-top: 20px; }
.sm-idcard { width: 340px; border: 1px solid #ccc; border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.08); font-family: -apple-system, sans-serif; }
.sm-idcard-header { background: #2271b1; color: #fff; padding: 14px; display: flex; align-items: center; gap: 10px; }
.sm-idcard-logo { width: 44px; height: 44px; object-fit: contain; background: #fff; border-radius: 6px; padding: 3px; }
.sm-idcard-school-name { font-size: 15px; font-weight: 700; }
.sm-idcard-school-meta { font-size: 11px; opacity: .9; }
.sm-idcard-body { display: flex; gap: 14px; padding: 16px; }
.sm-idcard-photo { width: 90px; height: 100px; background: #f0f0f1; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; flex-shrink: 0; color: #999; font-size: 12px; }
.sm-idcard-photo img { width: 100%; height: 100%; object-fit: cover; }
.sm-idcard-info h3 { margin: 0 0 6px; font-size: 16px; }
.sm-idcard-info p { margin: 2px 0; font-size: 12px; color: #333; }
.sm-idcard-footer { background: #f5f5f5; padding: 8px 14px; font-size: 10px; color: #666; text-align: center; border-top: 1px solid #eee; }

/* ---------- Admit Card (portal copy of the admin design) ---------- */
.sm-admitcard-wrap { display: flex; justify-content: center; margin-top: 10px; }
.sm-admitcard { width: 100%; max-width: 620px; background: #fff; border: 2px solid #2271b1; border-radius: 8px; padding: 24px 28px; font-family: -apple-system, sans-serif; }
.sm-admitcard-header { display: flex; align-items: center; gap: 12px; border-bottom: 2px solid #2271b1; padding-bottom: 12px; margin-bottom: 8px; }
.sm-admitcard-logo { width: 48px; height: 48px; object-fit: contain; }
.sm-admitcard-school-name { font-size: 17px; font-weight: 700; }
.sm-admitcard-school-meta { font-size: 11px; color: #666; }
.sm-admitcard-title { text-align: center; font-size: 20px; letter-spacing: 2px; margin: 10px 0 2px; color: #2271b1; }
.sm-admitcard-exam { text-align: center; color: #555; font-size: 13px; margin: 0 0 12px; }
.sm-admitcard-photo-row { display: flex; justify-content: flex-end; margin-bottom: -70px; }
.sm-admitcard-photo { width: 80px; height: 95px; object-fit: cover; border: 1px solid #ccc; }
.sm-admitcard-photo-empty { width: 80px; height: 95px; border: 1px dashed #ccc; display: flex; align-items: center; justify-content: center; color: #999; font-size: 11px; }
.sm-admitcard-info-table { width: 78%; border-collapse: collapse; font-size: 13px; margin-bottom: 16px; }
.sm-admitcard-info-table th { text-align: left; background: #f7f7f7; padding: 5px 8px; width: 40%; border: 1px solid #ddd; }
.sm-admitcard-info-table td { padding: 5px 8px; border: 1px solid #ddd; }
.sm-admitcard-subjects h4 { margin-bottom: 6px; font-size: 13px; }
.sm-admitcard-subjects ol { margin: 0 0 16px 20px; font-size: 13px; }
.sm-admitcard-signatures { display: flex; justify-content: space-between; margin-top: 40px; }
.sm-admitcard-sign-box { text-align: center; font-size: 11px; color: #555; width: 45%; }
.sm-admitcard-sign-box span { display: block; border-top: 1px solid #999; margin-bottom: 4px; height: 30px; }
.sm-admitcard-footer { margin-top: 18px; font-size: 10px; color: #888; text-align: center; }

/* ---------- Class Teacher Portal tools ---------- */
.sm-ct-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 14px 0; }
.sm-ct-nav a { padding: 7px 14px; border-radius: 6px; background: #eef3f7; color: #2271b1; text-decoration: none; font-size: 13px; font-weight: 600; }
.sm-ct-nav a.sm-ct-active { background: #2271b1; color: #fff; }
.sm-absent-checkbox-row { display: flex; align-items: center; gap: 6px; }
.sm-absent-checkbox-row label { font-size: 11px; color: #a02128; white-space: nowrap; }

@media print {
	.sm-no-print { display: none !important; }

	/* Keep the mark sheet / card to a single printed page */
	@page { size: A4; margin: 12mm; }
	body * { visibility: hidden; }
	.sm-resultsheet-wrap, .sm-resultsheet-wrap *,
	.sm-idcard-wrap, .sm-idcard-wrap *,
	.sm-admitcard-wrap, .sm-admitcard-wrap * { visibility: visible; }
	.sm-resultsheet-wrap, .sm-idcard-wrap, .sm-admitcard-wrap { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
	.sm-resultsheet {
		box-shadow: none;
		border: none;
		max-width: 100%;
		page-break-inside: avoid;
		font-size: 12px;
	}
	.sm-rs-info-table, .sm-rs-subjects-table, .sm-rs-summary-table { font-size: 11px; }
	.sm-admitcard { page-break-inside: avoid; }
}
