.hsm-app,
.hsm-auth,
.hsm-public-card {
	--hsm-primary: #5b4ee8;
	--hsm-primary-dark: #4337c3;
	--hsm-text: #172033;
	--hsm-muted: #6b7488;
	--hsm-border: #e4e8f0;
	--hsm-surface: #fff;
	--hsm-bg: #f6f7fb;
	--hsm-success: #087b55;
	--hsm-danger: #b4233f;
	font-family: "HSM IranSans", IRANSans, IRANSansX, Vazirmatn, Tahoma, Arial, sans-serif;
	color: var(--hsm-text);
	box-sizing: border-box;
}

/* Educational content cards (0.6). */
.hsm-content-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;margin:20px 0}.hsm-content-card{display:grid;grid-template-columns:150px minmax(0,1fr);overflow:hidden;border:1px solid #e4e8f1;border-radius:18px;background:#fff;box-shadow:0 8px 28px rgba(24,39,75,.08);transition:.2s ease}.hsm-content-card:hover{transform:translateY(-2px);box-shadow:0 14px 34px rgba(24,39,75,.12)}.hsm-content-card.is-locked{border-color:#f2c7cd}.hsm-content-card__thumb{display:flex;min-height:210px;align-items:center;justify-content:center;background:linear-gradient(145deg,#eef3ff,#f8faff);color:#6d7fa9}.hsm-content-card__thumb img{width:100%;height:100%;object-fit:cover}.hsm-content-card__thumb .dashicons{width:auto;height:auto;font-size:52px}.hsm-content-card__body{display:flex;min-width:0;flex-direction:column;padding:16px}.hsm-content-card__top,.hsm-content-card__actions{display:flex;align-items:center;justify-content:space-between;gap:10px}.hsm-content-card__top>span{color:#5368df;font-weight:800}.hsm-content-card__top small{color:#8b94a7}.hsm-content-card h3{margin:10px 0 6px;font-size:17px;line-height:1.8}.hsm-content-card h3 a{color:#172033;text-decoration:none}.hsm-content-card p{margin:8px 0;color:#606b80;font-size:13px;line-height:1.9}.hsm-content-card__path,.hsm-content-card__meta{display:flex;flex-wrap:wrap;gap:6px}.hsm-content-card__path span,.hsm-content-card__meta span{padding:3px 8px;border-radius:999px;background:#f1f3f7;color:#5d6678;font-size:11px}.hsm-content-card__meta .is-recommended{background:#fff0cb;color:#9d6500}.hsm-content-card__meta .hsm-access-label{background:#e8f7ef;color:#16764a}.hsm-content-card.is-locked .hsm-access-label{background:#fff0f2;color:#b8324a}.hsm-content-card__actions{margin-top:auto;padding-top:14px}.hsm-bookmark{display:inline-flex;align-items:center;gap:5px;border:1px solid #dce1eb;border-radius:10px;background:#fff;color:#687186;padding:8px 10px;cursor:pointer;font:inherit}.hsm-bookmark.is-saved{border-color:#efb31b;background:#fff8df;color:#9b6800}.hsm-library-sentinel{padding:22px;text-align:center;color:#778196}.hsm-library-sentinel.is-loading span::after{content:' •••'}.hsm-grade-card__latest{margin:12px 0 0;padding:12px 22px 0 0;border-top:1px solid #edf0f5;font-size:12px;line-height:2}.hsm-grade-card__latest a{color:#40506f;text-decoration:none}.hsm-saved-search{max-width:480px}.hsm-conflict-list{display:grid;gap:7px;margin-top:10px;padding:10px;border-radius:10px;background:#fff6df}.hsm-conversion-preview{display:grid;gap:7px;margin:10px 0;padding:10px;border:1px solid #e1e6ef;border-radius:10px}
.hsm-saved-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.hsm-content-detail{width:min(1100px,calc(100% - 24px));margin:24px auto;padding:24px;border:1px solid #e2e7f0;border-radius:22px;background:#fff;box-shadow:0 12px 38px rgba(23,32,51,.09);font-family:var(--hsm-font)}.hsm-content-detail>header{display:grid;grid-template-columns:1fr minmax(180px,320px);gap:24px;align-items:center;padding-bottom:20px;border-bottom:1px solid #edf0f5}.hsm-content-detail>header h1{margin:8px 0;font-size:clamp(22px,3vw,34px)}.hsm-content-detail>header img{width:100%;max-height:230px;object-fit:cover;border-radius:16px}.hsm-content-detail__meta{display:flex;flex-wrap:wrap;gap:8px;margin:18px 0}.hsm-content-detail__meta span{padding:7px 11px;border-radius:10px;background:#f2f4f8;color:#556077}.hsm-content-detail__body{line-height:2;color:#283248}
@media (max-width:980px){.hsm-content-grid{grid-template-columns:1fr}.hsm-saved-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media (max-width:600px){.hsm-content-detail>header{grid-template-columns:1fr}.hsm-saved-filters{grid-template-columns:1fr}.hsm-content-card{grid-template-columns:1fr}.hsm-content-card__thumb{min-height:160px;max-height:220px}.hsm-content-card__actions{align-items:stretch;flex-direction:column}.hsm-content-card__actions>*{justify-content:center;text-align:center}}

.hsm-app *,
.hsm-auth *,
.hsm-public-card * { box-sizing: border-box; }

.hsm-app {
	width: min(100%, 1240px);
	margin: 24px auto;
	padding: 14px;
	border-radius: 24px;
	background: var(--hsm-bg);
}

.hsm-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 16px;
	padding: 25px;
	border-radius: 20px;
	background:
		radial-gradient(circle at 10% 10%, rgba(255,255,255,.23), transparent 30%),
		linear-gradient(120deg, #4a3fd0, #6c5ce7);
	color: #fff;
	overflow: hidden;
}

.hsm-hero__identity { display: flex; align-items: center; gap: 14px; }
.hsm-hero__identity p { margin: 0 0 3px; opacity: .84; }
.hsm-hero__identity h2 { margin: 0; color: #fff; font-size: clamp(18px, 2vw, 25px); }

.hsm-avatar {
	display: grid;
	place-items: center;
	width: 54px;
	height: 54px;
	flex: 0 0 54px;
	border: 1px solid rgba(255,255,255,.4);
	border-radius: 17px;
	background: rgba(255,255,255,.18);
	font-size: 24px;
	font-weight: 800;
	backdrop-filter: blur(5px);
}

.hsm-module-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	margin-bottom: 16px;
}

.hsm-module-card {
	--card-accent: #5b4ee8;
	display: grid;
	grid-template-columns: 46px 1fr 20px;
	align-items: center;
	gap: 11px;
	width: 100%;
	min-height: 104px;
	padding: 17px;
	border: 1px solid var(--hsm-border);
	border-radius: 17px;
	background: var(--hsm-surface);
	color: var(--hsm-text);
	text-align: right;
	cursor: pointer;
	box-shadow: 0 7px 22px rgba(35, 43, 67, .045);
	transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.hsm-module-card:hover,
.hsm-module-card:focus-visible,
.hsm-module-card.is-active {
	transform: translateY(-2px);
	border-color: color-mix(in srgb, var(--card-accent) 48%, white);
	box-shadow: 0 11px 28px color-mix(in srgb, var(--card-accent) 14%, transparent);
	outline: none;
}

.hsm-module-card__icon {
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	border-radius: 14px;
	background: color-mix(in srgb, var(--card-accent) 12%, white);
	color: var(--card-accent);
	font-size: 24px;
}

.hsm-module-card__text { min-width: 0; }
.hsm-module-card__text strong { display: block; margin-bottom: 5px; font-size: 15px; }
.hsm-module-card__text small { display: block; color: var(--hsm-muted); font-size: 12px; line-height: 1.55; }
.hsm-module-card > .dashicons:last-child { color: #a8afbd; font-size: 17px; }
.hsm-module-card--blue { --card-accent: #1976b9; }
.hsm-module-card--emerald { --card-accent: #0a8b63; }
.hsm-module-card--orange { --card-accent: #da6b16; }
.hsm-module-card--rose { --card-accent: #c2325b; }
.hsm-module-card--violet { --card-accent: #6655d8; }
.hsm-module-card--slate { --card-accent: #4c5a70; }

.hsm-workspace {
	min-height: 245px;
	padding: 24px;
	border: 1px solid var(--hsm-border);
	border-radius: 20px;
	background: var(--hsm-surface);
	box-shadow: 0 10px 35px rgba(35, 43, 67, .045);
}

.hsm-workspace__empty,
.hsm-empty {
	display: grid;
	place-items: center;
	min-height: 190px;
	padding: 24px;
	color: var(--hsm-muted);
	text-align: center;
}
.hsm-workspace__empty .dashicons,
.hsm-empty .dashicons { width: auto; height: auto; margin-bottom: 8px; color: #b1b7c5; font-size: 37px; }
.hsm-workspace__empty h3 { margin: 4px 0; color: var(--hsm-text); }
.hsm-workspace__empty p,
.hsm-empty p { margin: 5px 0; }

.hsm-section-heading {
	display: flex;
	align-items: center;
	gap: 13px;
	margin-bottom: 22px;
}
.hsm-section-heading > .dashicons {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	border-radius: 14px;
	background: #eeecff;
	color: var(--hsm-primary);
	font-size: 25px;
}
.hsm-section-heading h2 { margin: 0 0 4px; color: var(--hsm-text); font-size: clamp(18px, 2vw, 23px); }
.hsm-section-heading p { margin: 0; color: var(--hsm-muted); font-size: 13px; }

.hsm-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	min-height: 43px;
	padding: 9px 17px;
	border: 1px solid transparent;
	border-radius: 11px;
	font: inherit;
	font-size: 14px;
	font-weight: 700;
	text-decoration: none !important;
	cursor: pointer;
	transition: background .18s ease, transform .18s ease;
}
.hsm-button:hover { transform: translateY(-1px); }
.hsm-button:focus-visible { outline: 3px solid rgba(91,78,232,.25); outline-offset: 2px; }
.hsm-button:disabled { opacity: .65; cursor: wait; transform: none; }
.hsm-button--primary { background: var(--hsm-primary); color: #fff !important; }
.hsm-button--primary:hover { background: var(--hsm-primary-dark); }
.hsm-button--ghost { border-color: rgba(255,255,255,.35); background: rgba(255,255,255,.12); color: #fff !important; }
.hsm-button--soft { background: #eeecff; color: var(--hsm-primary) !important; }
.hsm-button--link { padding-inline: 5px; background: transparent; color: var(--hsm-primary); }

.hsm-auth,
.hsm-public-card {
	width: min(100%, 760px);
	margin: 28px auto;
	padding: clamp(20px, 4vw, 34px);
	border: 1px solid var(--hsm-border);
	border-radius: 22px;
	background: var(--hsm-surface);
	box-shadow: 0 18px 60px rgba(31, 38, 64, .09);
}
.hsm-auth { max-width: 460px; }
.hsm-registration { width: min(100%, 940px); max-width: 940px; }
.hsm-access-grid {
	display: grid;
	grid-template-columns: minmax(320px, .8fr) minmax(520px, 1.2fr);
	gap: 18px;
	align-items: start;
	width: min(100%, 1320px);
	margin: 20px auto;
}
.hsm-access-grid > .hsm-auth,
.hsm-access-grid > .hsm-registration { width: 100%; margin: 0; }
.hsm-role-picker { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.hsm-role-picker label {
	position: relative;
	display: grid;
	grid-template-columns: 34px 1fr;
	gap: 3px 10px;
	align-items: center;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 13px;
	background: #fff;
	cursor: pointer;
}
.hsm-role-picker input { position: absolute; opacity: 0; }
.hsm-role-picker .dashicons { grid-row: 1 / 3; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: #eeecff; color: var(--hsm-primary); }
.hsm-role-picker strong { font-size: 14px; }
.hsm-role-picker small { color: var(--hsm-muted); }
.hsm-role-picker label:has(input:checked) { border-color: var(--hsm-primary); box-shadow: 0 0 0 3px rgba(91,78,232,.1); }
.hsm-form-section { margin: 4px 0 0; padding-bottom: 9px; border-bottom: 1px solid var(--hsm-border); font-size: 15px; }
.hsm-role-fields { padding: 14px; border-radius: 13px; background: #f8f9fd; }
.hsm-related-toggle { display: flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; }
.hsm-related-account { padding: 16px; border: 1px dashed #c9c4ff; border-radius: 14px; background: #faf9ff; }
.hsm-registration-verification { padding: 14px; border-radius: 13px; background: #eef8f4; }
.hsm-registration-verification p { margin: 7px 0 0; color: var(--hsm-success); font-size: 12px; }
.hsm-auth__brand { display: flex; align-items: center; gap: 13px; margin-bottom: 22px; }
.hsm-auth__brand > .dashicons {
	display: grid; place-items: center; width: 50px; height: 50px; border-radius: 15px;
	background: linear-gradient(135deg, #5b4ee8, #8276f2); color: #fff; font-size: 26px;
}
.hsm-auth__brand h2 { margin: 0 0 4px; font-size: 21px; }
.hsm-auth__brand p { margin: 0; color: var(--hsm-muted); font-size: 13px; }
.hsm-auth__tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 4px; border-radius: 12px; background: var(--hsm-bg); }
.hsm-auth__tabs button { padding: 9px; border: 0; border-radius: 9px; background: transparent; color: var(--hsm-muted); font: inherit; cursor: pointer; }
.hsm-auth__tabs button.is-active { background: #fff; color: var(--hsm-primary); font-weight: 700; box-shadow: 0 3px 10px rgba(31,38,64,.08); }
.hsm-auth__panel { display: none; padding-top: 20px; }
.hsm-auth__panel.is-active { display: grid; }

.hsm-form { gap: 15px; }
.hsm-form--grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.hsm-field { display: grid; gap: 7px; margin: 0; }
.hsm-field > span { font-size: 13px; font-weight: 700; }
.hsm-field input:not([type="checkbox"]):not([type="radio"]),
.hsm-field select,
.hsm-field textarea,
.hsm-library-search input,
.hsm-library-search select {
	width: 100%;
	min-height: 44px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid #d7dce6;
	border-radius: 10px;
	background: #fff;
	color: var(--hsm-text);
	font: inherit;
	font-size: 14px;
	box-shadow: none;
}
.hsm-field input:not([type="checkbox"]):not([type="radio"]):focus,
.hsm-field select:focus,
.hsm-field textarea:focus,
.hsm-library-search input:focus,
.hsm-library-search select:focus {
	border-color: var(--hsm-primary);
	outline: 3px solid rgba(91,78,232,.13);
}
.hsm-field textarea { min-height: 90px; resize: vertical; }
.hsm-field--full { grid-column: 1 / -1; }
.hsm-checkbox { display: flex; align-items: center; gap: 9px; color: var(--hsm-muted); font-size: 13px; cursor: pointer; }
.hsm-app input[type="checkbox"],
.hsm-app input[type="radio"],
.hsm-public-card input[type="checkbox"],
.hsm-public-card input[type="radio"],
.hsm-auth input[type="checkbox"],
.hsm-auth input[type="radio"] {
	width: 20px !important;
	height: 20px !important;
	min-width: 20px !important;
	min-height: 20px !important;
	max-width: 20px !important;
	margin: 0 !important;
	padding: 0 !important;
	flex: 0 0 20px;
	accent-color: var(--hsm-primary);
	box-shadow: none !important;
}
.hsm-checkbox-card {
	min-height: 46px;
	padding: 11px 13px;
	border: 1px solid #dfe3ec;
	border-radius: 11px;
	background: #fafbfe;
	color: var(--hsm-text);
	font-weight: 700;
}
.hsm-checkbox-card:has(input:checked) { border-color: #9d94ee; background: #f2f0ff; color: var(--hsm-primary-dark); }
.hsm-field input[type="file"] { max-width: 100%; padding: 7px; overflow: hidden; font-size: 12px; }
.hsm-field input[type="file"]::file-selector-button { margin-inline-end: 9px; padding: 7px 10px; border: 0; border-radius: 7px; background: #eeecff; color: var(--hsm-primary); font: inherit; font-weight: 700; cursor: pointer; }
.hsm-honeypot { position: absolute !important; right: -10000px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; }

.hsm-form-message { display: none; padding: 10px 12px; border-radius: 9px; font-size: 13px; white-space: pre-line; }
.hsm-form-message:not(:empty) { display: block; }
.hsm-form-message.is-success { background: #e8f8f1; color: var(--hsm-success); }
.hsm-form-message.is-error { background: #fff0f2; color: var(--hsm-danger); }
.hsm-form-message.is-warning { background: #fff7e6; color: #915d08; }
.hsm-import-report-link { margin-top: 9px; }

.hsm-message {
	width: min(100%, 720px);
	margin: 20px auto;
	padding: 14px 17px;
	border-radius: 11px;
	background: #edf1ff;
	color: #3944a0;
}
.hsm-message--success { background: #e8f8f1; color: var(--hsm-success); }
.hsm-message--warning { background: #fff7e6; color: #915d08; }
.hsm-message--error { background: #fff0f2; color: var(--hsm-danger); }

.hsm-tabs {
	display: flex;
	gap: 5px;
	margin-bottom: 18px;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--hsm-border);
	overflow-x: auto;
}
.hsm-tabs button {
	flex: 0 0 auto;
	padding: 8px 13px;
	border: 0;
	border-radius: 9px;
	background: transparent;
	color: var(--hsm-muted);
	font: inherit;
	cursor: pointer;
}
.hsm-tabs button.is-active { background: #eeecff; color: var(--hsm-primary); font-weight: 700; }
.hsm-tab-panel { display: none; }
.hsm-tab-panel.is-active { display: block; }

.hsm-table-scroll { width: 100%; overflow-x: auto; }
.hsm-data-table { width: 100%; min-width: 650px; border-spacing: 0; border-collapse: separate; font-size: 13px; }
.hsm-data-table th { padding: 11px 12px; border-bottom: 1px solid var(--hsm-border); background: #f8f9fc; color: var(--hsm-muted); text-align: right; font-weight: 700; }
.hsm-data-table th:first-child { border-radius: 0 9px 9px 0; }
.hsm-data-table th:last-child { border-radius: 9px 0 0 9px; }
.hsm-data-table td { padding: 13px 12px; border-bottom: 1px solid #edf0f5; vertical-align: middle; }
.hsm-cell-stack{display:grid;gap:5px;min-width:130px}.hsm-cell-stack small{display:block;color:var(--hsm-muted);line-height:1.65}.hsm-data-table[data-hsm-sortable] th:not([data-no-sort]){cursor:pointer;user-select:none}.hsm-data-table[data-hsm-sortable] th:not([data-no-sort])::after{content:'↕';margin-inline-start:6px;color:#a1a8b7;font-size:11px}.hsm-data-table[data-hsm-sortable] th[aria-sort="ascending"]::after{content:'↑';color:var(--hsm-primary)}.hsm-data-table[data-hsm-sortable] th[aria-sort="descending"]::after{content:'↓';color:var(--hsm-primary)}
.hsm-compact-input {
	width: 100%;
	min-width: 110px;
	min-height: 38px;
	padding: 7px 9px;
	border: 1px solid #d7dce6;
	border-radius: 8px;
	font: inherit;
}
.hsm-compact-input:focus { border-color: var(--hsm-primary); outline: 2px solid rgba(91,78,232,.13); }
.hsm-data-table__image { width: 80px; }
.hsm-data-table__image img { display: block; width: 56px; height: 56px; border-radius: 10px; object-fit: cover; }
.hsm-table-link { color: var(--hsm-primary); font-weight: 700; text-decoration: none; }

.hsm-pill {
	display: inline-flex;
	align-items: center;
	width: max-content;
	padding: 4px 9px;
	border-radius: 999px;
	background: #edf1f7;
	color: #526078;
	font-size: 11px;
	font-weight: 700;
}
.hsm-pill--paid { background: #e8f8f1; color: var(--hsm-success); }
.hsm-pill--unpaid,
.hsm-pill--overdue { background: #fff0f2; color: var(--hsm-danger); }
.hsm-enrollment-preview{grid-column:1/-1;margin:2px 0 4px;padding:12px 14px;border:1px solid #cfe3da;border-radius:11px;background:#f0faf6;color:#176a4e;line-height:1.85}.hsm-enrollment-preview.is-warning{border-color:#efd99b;background:#fff8e5;color:#805500}
.hsm-manager-teacher-form{margin-top:18px;padding:18px;border:1px solid var(--hsm-border);border-radius:14px;background:#fafbfc}.hsm-application-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;margin-bottom:10px}.hsm-application-filters .hsm-field{margin:0}.hsm-filter-result{margin:10px 0;color:var(--hsm-muted)}.hsm-application-action{display:grid;gap:7px;min-width:240px}.hsm-recipient-list{display:grid;gap:6px;padding:9px;border:1px solid var(--hsm-border);border-radius:9px}.hsm-recipient-list legend{padding:0 5px;font-weight:700}.hsm-recipient-list label{display:flex;align-items:center;gap:5px}.hsm-application-detail-row td{padding:18px!important;background:#f8f9fc}.hsm-application-details{display:grid;grid-template-columns:minmax(130px,.6fr) 1.4fr;gap:8px 15px;margin:0}.hsm-application-details dt{color:var(--hsm-muted)}.hsm-application-details dd{margin:0;font-weight:650}.hsm-block{display:block;margin-top:5px;color:var(--hsm-muted)}
@media(max-width:900px){.hsm-application-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.hsm-application-filters,.hsm-application-details{grid-template-columns:1fr}}

.hsm-detail-grid,
.hsm-finance-summary {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 11px;
}
.hsm-detail-grid > div,
.hsm-finance-summary > div {
	display: grid;
	gap: 5px;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 12px;
	background: #fafbfc;
}
.hsm-detail-grid span,
.hsm-finance-summary span { color: var(--hsm-muted); font-size: 12px; }
.hsm-detail-grid strong,
.hsm-finance-summary strong { font-size: 15px; overflow-wrap: anywhere; }
.hsm-detail-grid__wide { grid-column: 1 / -1; }
.hsm-help { margin: 17px 0 0; color: var(--hsm-muted); font-size: 13px; }

.hsm-resource-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}
.hsm-resource-card {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	gap: 11px;
	padding: 16px;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #fff;
}
.hsm-resource-card > .dashicons {
	display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 42px;
	border-radius: 12px; background: #fff3e8; color: #d06616; font-size: 22px;
}
.hsm-resource-card > div { min-width: 0; flex: 1; }
.hsm-resource-card h3 { margin: 8px 0 4px; font-size: 15px; }
.hsm-resource-card p { margin: 0 0 5px; color: var(--hsm-muted); font-size: 12px; line-height: 1.7; }
.hsm-resource-card small { color: #8b93a3; }
.hsm-resource-card > a { flex: 0 0 100%; color: var(--hsm-primary); font-size: 13px; font-weight: 700; text-decoration: none; }

.hsm-accordion { margin-bottom: 12px; border: 1px solid var(--hsm-border); border-radius: 13px; overflow: hidden; }
.hsm-accordion summary { display: flex; justify-content: space-between; gap: 10px; padding: 14px 16px; background: #fafbfc; cursor: pointer; font-weight: 700; }
.hsm-accordion > :not(summary) { margin: 14px; }
.hsm-accordion .hsm-table-scroll { width: auto; }
.hsm-balance { color: var(--hsm-danger); font-size: 12px; }

.hsm-callout {
	padding: 20px;
	border: 1px solid #ddd9ff;
	border-radius: 14px;
	background: #f6f4ff;
}
.hsm-callout strong { color: var(--hsm-primary-dark); }
.hsm-callout p { color: var(--hsm-muted); line-height: 1.8; }

.hsm-two-panel {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}
.hsm-two-panel > .hsm-form {
	display: grid;
	align-content: start;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #fafbfc;
}
.hsm-two-panel h3 { margin: 0 0 4px; font-size: 16px; }
.hsm-installment-repeater { display: grid; gap: 9px; padding: 14px; border: 1px solid var(--hsm-border); border-radius: 13px; background: #fafbfc; }
.hsm-repeater-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.hsm-installment-row { display: grid; grid-template-columns: minmax(120px, 1fr) minmax(120px, 1fr) minmax(145px, .8fr) auto; gap: 8px; margin-bottom: 8px; }
.hsm-installment-row input { width: 100%; min-height: 41px; padding: 8px 10px; border: 1px solid #d7dce6; border-radius: 9px; font: inherit; }
.hsm-manager-list { display: grid; gap: 10px; }
.hsm-manager-row {
	display: grid;
	grid-template-columns: minmax(220px, 1fr) minmax(360px, 1.3fr);
	gap: 15px;
	align-items: center;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 13px;
	background: #fff;
}
.hsm-manager-row > div { display: grid; gap: 4px; }
.hsm-manager-row small { color: var(--hsm-muted); }
.hsm-manager-row p { margin: 3px 0 0; color: var(--hsm-muted); font-size: 12px; }
.hsm-manager-inline-form { display: grid; grid-template-columns: 140px minmax(130px, 1fr) auto auto; gap: 7px; align-items: center; }
.hsm-manager-inline-form select,
.hsm-manager-inline-form input[type="text"] { min-height: 39px; border: 1px solid #d7dce6; border-radius: 8px; font: inherit; }

.hsm-library { width: min(100%, 1240px); max-width: 1240px; }
.hsm-library-types {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}
.hsm-library-types button {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 39px;
	padding: 7px 13px;
	border: 1px solid #edf0f5;
	border-radius: 999px;
	background: #f7f8fb;
	color: #4f5a70;
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}
.hsm-library-types button:nth-child(3n+1) .dashicons { color: #2a78d1; }
.hsm-library-types button:nth-child(3n+2) .dashicons { color: #1e9b65; }
.hsm-library-types button:nth-child(3n) .dashicons { color: #e06229; }
.hsm-library-types button .dashicons{color:var(--hsm-type-color,#5267df)!important}
.hsm-library-types button.is-active { border-color: var(--hsm-primary); background: #eeecff; color: var(--hsm-primary); }
.hsm-library-hero {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	min-height: 190px;
	margin-bottom: 22px;
	padding: clamp(24px, 4vw, 44px);
	border-radius: 18px;
	background:
		radial-gradient(circle at 10% 10%, rgba(255,184,0,.34), transparent 28%),
		linear-gradient(115deg, #0a0b0f, #18120a 58%, #060606);
	color: #fff;
	overflow: hidden;
}
.hsm-library-hero > div > span { color: #ffbf17; font-size: 13px; font-weight: 800; }
.hsm-library-hero h2 { margin: 8px 0; color: #fff; font-size: clamp(25px, 4vw, 42px); }
.hsm-library-hero p { max-width: 700px; margin: 0; color: #d8d9df; line-height: 1.9; }
.hsm-library-hero > .dashicons { width: auto; height: auto; color: #ffb400; font-size: clamp(76px, 10vw, 130px); opacity: .78; transform: rotate(-8deg); }
.hsm-library-search {
	display: grid;
	grid-template-columns: 150px 150px 160px minmax(180px, 1fr) auto;
	gap: 9px;
	margin-bottom: 20px;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #fff;
}
.hsm-library-search label { display: grid; gap: 6px; }
.hsm-library-search label > span { font-size: 11px; font-weight: 800; color: var(--hsm-muted); }
.hsm-library-search .hsm-button { align-self: end; }
.hsm-library-results { min-height: 170px; }
.hsm-grade-overview { margin-bottom: 25px; }
.hsm-grade-overview > header,
.hsm-results-heading { display: flex; justify-content: space-between; align-items: flex-end; gap: 15px; margin: 18px 0 13px; }
.hsm-grade-overview > header span { color: var(--hsm-primary); font-size: 11px; font-weight: 800; }
.hsm-grade-overview > header h3 { margin: 3px 0 0; font-size: 19px; }
.hsm-grade-overview > header small,
.hsm-results-heading small { color: var(--hsm-muted); }
.hsm-grade-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 11px; }
.hsm-grade-card {
	--grade-color: #4f9c35;
	padding: 14px;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 7px 24px rgba(26,32,48,.065);
}
.hsm-grade-card--red { --grade-color: #e14b2d; }
.hsm-grade-card--cyan { --grade-color: #03a1d4; }
.hsm-grade-card--purple { --grade-color: #9437c7; }
.hsm-grade-card--orange { --grade-color: #e68016; }
.hsm-grade-card--blue { --grade-color: #386bd1; }
.hsm-grade-card > header { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hsm-grade-card h4 { margin: 0; color: var(--grade-color); font-size: 16px; }
.hsm-grade-card > header > span { padding: 3px 8px; border-radius: 999px; background: color-mix(in srgb, var(--grade-color) 13%, white); color: var(--grade-color); font-size: 10px; font-weight: 800; }
.hsm-grade-card > p { margin: 9px 0 12px; color: var(--hsm-muted); font-size: 11px; }
.hsm-grade-card__stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.hsm-grade-card__stats button { display: grid; place-items: center; gap: 3px; min-width: 0; padding: 8px 3px; border: 0; border-radius: 9px; background: #f8f9fb; color: var(--hsm-text); font: inherit; cursor: pointer; }
.hsm-grade-card__stats button:hover { background: color-mix(in srgb, var(--grade-color) 10%, white); }
.hsm-grade-card__stats .dashicons { color: var(--grade-color); font-size: 17px; }
.hsm-grade-card__stats small { width: 100%; color: var(--hsm-muted); font-size: 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hsm-grade-card__stats strong { font-size: 11px; }
.hsm-library-welcome { margin: 20px 0; padding: 20px; border: 1px dashed #cac5ff; border-radius: 14px; background: #faf9ff; text-align: center; }
.hsm-library-welcome p { margin-bottom: 0; color: var(--hsm-muted); }
.hsm-results-heading { padding-top: 10px; border-top: 1px solid var(--hsm-border); }
.hsm-results-heading > div { display: flex; align-items: center; gap: 7px; }
.hsm-results-heading .dashicons { color: var(--hsm-primary); }
.hsm-result-meta { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.hsm-result-meta span { padding: 2px 6px; border-radius: 6px; background: #f0f2f6; color: #667085; font-size: 9px; }
.hsm-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 5px; margin-top: 18px; }
.hsm-pagination button { min-width: 37px; height: 37px; border: 1px solid var(--hsm-border); border-radius: 9px; background: #fff; color: var(--hsm-text); cursor: pointer; }
.hsm-pagination button.is-active { border-color: var(--hsm-primary); background: var(--hsm-primary); color: #fff; }

.hsm-gradebook-filter {
	display: grid;
	grid-template-columns: repeat(2, minmax(180px, 1fr)) auto;
	align-items: end;
	gap: 10px;
	margin-bottom: 18px;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #f8f9fb;
}
.hsm-gradebook-filter .hsm-field { margin: 0; }
.hsm-gradebook-hint { margin: -8px 3px 18px; color: var(--hsm-muted); font-size: 11px; }
.hsm-gradebook-results { min-height: 180px; }
.hsm-gradebook-sheet__heading,
.hsm-gradebook-actions,
.hsm-report-actions,
.hsm-inline-action {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
}
.hsm-gradebook-sheet__heading { margin-bottom: 14px; padding: 0 4px; }
.hsm-gradebook-sheet__heading h3 { margin: 3px 0 0; }
.hsm-gradebook-sheet__heading small,
.hsm-gradebook-sheet__heading > span { color: var(--hsm-muted); font-size: 11px; }
.hsm-grade-matrix-wrap {
	max-width: 100%;
	max-height: min(68vh, 720px);
	overflow: auto;
	border: 1px solid var(--hsm-border);
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(24,32,48,.06);
	overscroll-behavior: contain;
}
.hsm-grade-matrix {
	width: max-content;
	min-width: 100%;
	border-collapse: separate;
	border-spacing: 0;
	direction: rtl;
	font-size: 11px;
}
.hsm-grade-matrix th,
.hsm-grade-matrix td {
	min-width: 104px;
	height: 58px;
	padding: 7px;
	border-left: 1px solid #e7eaf0;
	border-bottom: 1px solid #e7eaf0;
	background: #fff;
	text-align: center;
	vertical-align: middle;
}
.hsm-grade-matrix thead th {
	position: sticky;
	top: 0;
	z-index: 3;
	height: 64px;
	background: #f6f5ff;
	color: #353069;
	box-shadow: 0 1px 0 #dedaf7;
}
.hsm-grade-matrix th span,
.hsm-grade-matrix th small,
.hsm-grade-matrix__student strong,
.hsm-grade-matrix__student small { display: block; }
.hsm-grade-matrix th small,
.hsm-grade-matrix__student small { margin-top: 3px; color: var(--hsm-muted); font-size: 9px; font-weight: 500; }
.hsm-grade-matrix__student {
	position: sticky;
	right: 0;
	z-index: 2;
	min-width: 190px !important;
	max-width: 230px;
	background: #fbfbfd !important;
	text-align: right !important;
	box-shadow: -2px 0 5px rgba(36,39,55,.06);
}
.hsm-grade-matrix thead .hsm-grade-matrix__student { z-index: 5; background: #efedff !important; }
.hsm-grade-matrix tbody tr:hover td,
.hsm-grade-matrix tbody tr:hover th { background-color: #faf9ff !important; }
.hsm-grade-matrix__score input {
	width: 82px;
	height: 38px;
	padding: 5px;
	border: 1px solid #ccd2de;
	border-radius: 9px;
	background: #fff;
	font: inherit;
	font-size: 13px;
	font-weight: 750;
	text-align: center;
}
.hsm-grade-matrix__score input:focus { border-color: var(--hsm-primary); outline: 3px solid rgba(111,83,255,.14); }
.hsm-grade-matrix__score.is-locked { background: #f4f5f7; color: #a3a8b2; }
.hsm-grade-matrix .is-conduct { background: #fff9e8; }
.hsm-grade-matrix .is-average { min-width: 88px; background: #eefaf5; color: #087b55; }
.hsm-grade-matrix .is-average strong { font-size: 14px; }
.hsm-grade-matrix .is-report { min-width: 66px; }
.hsm-icon-button { display: inline-grid; width: 36px; height: 36px; place-items: center; border: 1px solid #d9d5ff; border-radius: 9px; background: #f5f3ff; color: var(--hsm-primary); cursor: pointer; }
.hsm-icon-button:hover { border-color: var(--hsm-primary); background: var(--hsm-primary); color: #fff; }
.hsm-student-grade-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.hsm-student-grade-card {
	min-width: 0;
	padding: 15px;
	border: 1px solid var(--hsm-border);
	border-radius: 15px;
	background: #fff;
	box-shadow: 0 8px 28px rgba(24,32,48,.06);
}
.hsm-student-grade-card > header { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 12px; }
.hsm-student-grade-card > header img { width: 52px; height: 52px; border-radius: 14px; object-fit: cover; background: #f1f3f7; }
.hsm-student-grade-card h4 { margin: 0 0 3px; font-size: 15px; }
.hsm-student-grade-card header small { color: var(--hsm-muted); font-size: 10px; }
.hsm-grade-average { display: grid; place-items: center; min-width: 67px; padding: 7px; border-radius: 11px; background: #fff8e2; color: #8a5c00; }
.hsm-grade-average span,
.hsm-grade-average small { font-size: 9px; }
.hsm-grade-average strong { font-size: 17px; }
.hsm-grade-subject-list { display: grid; gap: 7px; }
.hsm-grade-subject {
	display: grid;
	grid-template-columns: minmax(110px, 1.1fr) 82px minmax(95px, .8fr) minmax(120px, 1fr);
	gap: 6px;
	align-items: end;
	padding: 9px;
	border: 1px solid #edf0f4;
	border-radius: 11px;
	background: #fafbfc;
}
.hsm-grade-subject__title { align-self: center; min-width: 0; }
.hsm-grade-subject__title strong,
.hsm-grade-subject__title small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hsm-grade-subject__title small,
.hsm-grade-subject label span { color: var(--hsm-muted); font-size: 9px; }
.hsm-grade-subject label { display: grid; gap: 3px; }
.hsm-grade-subject input { width: 100%; min-width: 0; height: 36px; padding: 6px 7px; border: 1px solid #d8dde6; border-radius: 8px; font: inherit; font-size: 11px; }
.hsm-student-grade-card > .hsm-button { margin-top: 10px; }
.hsm-gradebook-actions { position: sticky; bottom: 9px; z-index: 4; flex-wrap: wrap; margin-top: 14px; padding: 12px; border: 1px solid #dcdfe7; border-radius: 13px; background: rgba(255,255,255,.94); box-shadow: 0 8px 30px rgba(23,32,51,.12); backdrop-filter: blur(8px); }
.hsm-gradebook-actions > small { flex: 1; color: var(--hsm-muted); font-size: 10px; }
.hsm-gradebook-actions .hsm-form-message { flex: 1 0 100%; margin: 0; }
.hsm-report-actions { padding: 11px 13px; border-top: 1px solid var(--hsm-border); }
.hsm-inline-action { margin: 12px 0 18px; padding: 13px 15px; border: 1px solid #f0d795; border-radius: 13px; background: #fffaf0; }
.hsm-inline-action > div:first-child { display: grid; gap: 3px; }
.hsm-inline-action small { color: var(--hsm-muted); }
.hsm-inline-action .hsm-form-message { flex: 1; margin: 0; }
.hsm-due-cell { min-width: 165px; }
.hsm-due-cell time { display: block; direction: ltr; text-align: right; white-space: nowrap; }
.hsm-overdue-text,
.hsm-due-text,
.hsm-paid-late-text { display: block; margin-top: 5px; line-height: 1.65; white-space: nowrap; }
.hsm-overdue-text { color: #c4384f; font-weight: 800; }
.hsm-due-text { color: #52617a; font-weight: 700; }
.hsm-paid-late-text { color: #a05c00; font-weight: 800; }
.hsm-pill--overdue { background: #fff0f2; color: #b4233f; }
.hsm-pill--sent { background: #e7f8f1; color: #087b55; }
.hsm-pill--failed { background: #fff0f2; color: #b4233f; }
.hsm-pill--pending { background: #fff7dc; color: #8a5c00; }
.hsm-finance-live-summary { margin-bottom: 12px; }

.hsm-loading {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 6px;
	min-height: 190px;
	color: var(--hsm-muted);
}
.hsm-loading span { width: 8px; height: 8px; border-radius: 50%; background: var(--hsm-primary); animation: hsm-pulse .85s infinite alternate; }
.hsm-loading span:nth-child(2) { animation-delay: .15s; }
.hsm-loading span:nth-child(3) { animation-delay: .3s; }
.hsm-loading p { flex: 0 0 100%; margin: 5px 0 0; text-align: center; }

@keyframes hsm-pulse {
	from { opacity: .25; transform: translateY(2px); }
	to { opacity: 1; transform: translateY(-2px); }
}

@media (prefers-reduced-motion: reduce) {
	.hsm-module-card,
	.hsm-button,
	.hsm-loading span { transition: none; animation: none; }
}

@media (max-width: 980px) {
	.hsm-access-grid { grid-template-columns: 1fr; }
	.hsm-module-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-detail-grid,
	.hsm-finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-resource-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-grade-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-gradebook-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-gradebook-filter .hsm-button { grid-column: 1 / -1; }
	.hsm-student-grade-grid { grid-template-columns: 1fr; }
	.hsm-library-search { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-library-search .hsm-button { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
	.hsm-app { margin: 6px auto; padding: 8px max(8px, env(safe-area-inset-right)) max(8px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left)); border-radius: 16px; overflow-x: clip; }
	.hsm-hero { align-items: flex-start; flex-wrap: wrap; padding: 18px; border-radius: 15px; }
	.hsm-hero__identity { min-width: 0; }
	.hsm-hero__identity > div { min-width: 0; }
	.hsm-hero__identity h2, .hsm-hero__identity p { overflow-wrap: anywhere; }
	.hsm-hero .hsm-button { min-height: 38px; padding: 7px 10px; font-size: 12px; }
	.hsm-avatar { width: 45px; height: 45px; flex-basis: 45px; border-radius: 13px; }
	.hsm-module-grid { grid-template-columns: 1fr; gap: 8px; }
	.hsm-module-card { min-height: 84px; padding: 13px; }
	.hsm-workspace { padding: 17px 13px; border-radius: 15px; overflow-x: clip; }
	.hsm-workspace, .hsm-tab-panel, .hsm-form, .hsm-public-card, .hsm-registration, .hsm-library { width: 100%; max-width: 100%; }
	.hsm-form--grid,
	.hsm-role-picker,
	.hsm-two-panel,
	.hsm-manager-row,
	.hsm-manager-inline-form,
	.hsm-installment-row,
	.hsm-detail-grid,
	.hsm-finance-summary,
	.hsm-resource-grid,
	.hsm-library-search,
	.hsm-grade-grid { grid-template-columns: 1fr; }
	.hsm-gradebook-filter,
	.hsm-grade-subject { grid-template-columns: 1fr; }
	.hsm-gradebook-filter .hsm-button { grid-column: auto; }
	.hsm-grade-subject__title { padding-bottom: 4px; }
	.hsm-gradebook-sheet__heading,
	.hsm-gradebook-actions,
	.hsm-report-actions,
	.hsm-inline-action { align-items: stretch; flex-direction: column; }
	.hsm-gradebook-actions { position: static; }
	.hsm-library-hero { min-height: 160px; }
	.hsm-library-hero h2 { font-size: clamp(23px, 8vw, 31px); line-height: 1.55; }
	.hsm-library-hero p { font-size: 13px; }
	.hsm-library-hero > .dashicons { display: none; }
	.hsm-library-search .hsm-button { grid-column: auto; }
	.hsm-grade-card__stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
	.hsm-field--full { grid-column: auto; }
	.hsm-auth,
	.hsm-public-card { margin: 12px auto; padding: 19px 15px; border-radius: 16px; }
	.hsm-section-heading { align-items: flex-start; }
	.hsm-section-heading > div { min-width: 0; }
	.hsm-section-heading h2, .hsm-section-heading p { overflow-wrap: anywhere; }
	.hsm-tabs { flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
	.hsm-tabs button { flex: 0 0 auto; min-height: 42px; white-space: nowrap; }
	.hsm-table-scroll { margin-inline: 0; padding-bottom: 4px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-gutter: stable; -webkit-overflow-scrolling: touch; }
	.hsm-data-table { min-width: 600px; }
	.hsm-form .hsm-field--full > .hsm-button,
	.hsm-form > .hsm-field--full > .hsm-button,
	.hsm-library-search > .hsm-button { width: 100%; }
	.hsm-library-types { justify-content: flex-start; flex-wrap: nowrap; overflow-x: auto; padding-bottom: 5px; -webkit-overflow-scrolling: touch; }
	.hsm-library-types button { flex: 0 0 auto; white-space: nowrap; }
	.hsm-library-search input, .hsm-library-search select, .hsm-library-search .hsm-button { min-height: 46px; }
	.hsm-button, .hsm-tabs button, .hsm-module-card, .hsm-subject-card { touch-action: manipulation; }
	.hsm-grade-overview > header, .hsm-results-heading { align-items: flex-start; flex-direction: column; }
	.hsm-account-menu { max-width: 100%; }
	.hsm-account-menu__toggle { max-width: 100%; }
	.hsm-account-menu__dropdown { max-width: calc(100vw - 24px); }
	.hsm-app-action-dialog { width: calc(100vw - 20px); padding: 18px 14px; }
	.hsm-accordion summary { flex-direction: column; }
}

@media (max-width: 420px) {
	.hsm-grade-card__stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.hsm-library-hero { padding: 20px 16px; }
	.hsm-library-hero h2 { font-size: 24px; }
	.hsm-workspace { padding-inline: 11px; }
	.hsm-section-heading { gap: 9px; }
	.hsm-section-heading .dashicons { flex: 0 0 auto; }
	.hsm-data-table { min-width: 560px; }
}
.hsm-account-menu{position:relative;display:inline-flex;font-family:"HSM IranSans",IRANSans,IRANSansX,Vazirmatn,Tahoma,sans-serif;z-index:50}.hsm-account-menu--guest{gap:8px}.hsm-account-menu--guest a{padding:9px 16px;border:1px solid #dbe2ef;border-radius:11px;color:#263247;text-decoration:none}.hsm-account-menu--guest a.is-primary{background:#4f46e5;color:#fff;border-color:#4f46e5}.hsm-account-menu__toggle{display:flex;align-items:center;gap:9px;padding:6px 10px;border:1px solid #dbe2ef;border-radius:14px;background:#fff;color:#1e293b;cursor:pointer;text-align:right;font:inherit}.hsm-account-menu__toggle strong,.hsm-account-menu__toggle small{display:block;line-height:1.45}.hsm-account-menu__toggle small{color:#64748b;font-size:11px}.hsm-account-menu__avatar{display:grid;place-items:center;width:36px;height:36px;border-radius:11px;background:#eef2ff;color:#4f46e5;font-weight:800}.hsm-account-menu__dropdown{position:absolute;top:calc(100% + 8px);inset-inline-end:0;min-width:190px;padding:7px;background:#fff;border:1px solid #dbe2ef;border-radius:14px;box-shadow:0 18px 45px #1720332b}.hsm-account-menu__dropdown a{display:block;padding:10px 12px;border-radius:9px;color:#263247;text-decoration:none}.hsm-account-menu__dropdown a:hover{background:#f4f6fb}.hsm-account-menu__dropdown a.is-danger{color:#c62828}
.hsm-subject-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(190px,1fr));gap:12px;margin:18px 0}.hsm-subject-card{display:grid;grid-template-columns:42px 1fr;gap:2px 10px;align-items:center;padding:15px;border:1px solid #e1e7f0;border-radius:16px;background:#fff;color:#1e293b;text-align:right;cursor:pointer;font:inherit}.hsm-subject-card>.dashicons{grid-row:1/4;display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#fff3df;color:#f18b18}.hsm-subject-card strong,.hsm-subject-card small,.hsm-subject-card em{grid-column:2}.hsm-subject-card small{color:#64748b}.hsm-subject-card em{color:#7c3aed;font-size:11px;font-style:normal}.hsm-subject-card:hover,.hsm-subject-card.is-active{border-color:#f18b18;box-shadow:0 8px 22px #f18b1820}.hsm-subject-results{min-height:120px;padding-top:8px}.hsm-personal-library{margin-top:28px;padding-top:20px;border-top:1px solid #e7ebf2}.hsm-personal-library .hsm-resource-card form{grid-column:1/-1}
.hsm-profile-photo{width:120px;height:120px;object-fit:cover;border-radius:22px;border:4px solid #fff;box-shadow:0 8px 25px #17203322}
.hsm-table-search{width:min(100%,360px);min-height:40px;margin:0 0 10px;padding:8px 11px;border:1px solid #d8dde6;border-radius:10px;background:#fff;font:inherit}
.hsm-table-pagination{display:flex;align-items:center;justify-content:flex-start;gap:8px;flex-wrap:wrap;margin:10px 0 4px}.hsm-table-pagination__summary{margin-inline-end:auto;color:var(--hsm-muted,#64748b);font-size:13px}.hsm-table-pagination button:disabled{opacity:.45;cursor:not-allowed}
.hsm-inactive-filters{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;align-items:end;margin-bottom:10px}.hsm-inactive-filters .hsm-field{margin:0}.hsm-inactive-filters+ .hsm-filter-result{min-height:22px}.hsm-data-table [data-hsm-inactive-row] td:first-child small{color:var(--hsm-muted,#64748b)}
@media(max-width:900px){.hsm-inactive-filters{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:560px){.hsm-inactive-filters{grid-template-columns:1fr}}
.hsm-avatar img,.hsm-account-menu__avatar img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
/* Whole-school matrix and resilient management layouts. */
.hsm-form > *, .hsm-panel > *, .hsm-tab-panel > *, .hsm-module-card__text { min-width: 0; }
.hsm-school-matrix { display: grid; gap: 18px; }
.hsm-matrix-summary { display:flex; flex-wrap:wrap; gap:10px; }
.hsm-matrix-summary span { padding:10px 14px; border:1px solid #e1e7f0; border-radius:12px; background:#fff; color:#667085; }
.hsm-matrix-summary b { margin-inline-end:5px; color:#4f46e5; font-size:18px; }
.hsm-matrix-toolbar { display: grid; grid-template-columns: minmax(260px,2fr) repeat(4,minmax(150px,1fr)); gap: 12px; align-items:end; }
.hsm-matrix-result-count { color:#667085; font-size:13px; }
.hsm-matrix-table-wrap { width:100%; overflow:auto; border:1px solid #e1e7f0; border-radius:16px; background:#fff; }
.hsm-matrix-table { min-width:1500px; margin:0; border:0; border-collapse:separate; border-spacing:0; }
.hsm-matrix-table th { position:sticky; top:0; z-index:2; background:#f5f7fb; white-space:nowrap; }
.hsm-matrix-table th:first-child,.hsm-matrix-table td:first-child { position:sticky; right:0; z-index:3; width:55px; background:#fff; }
.hsm-matrix-table th:nth-child(2),.hsm-matrix-table td:nth-child(2) { position:sticky; right:55px; z-index:3; background:#fff; }
.hsm-matrix-table thead th:first-child,.hsm-matrix-table thead th:nth-child(2) { z-index:5; background:#f5f7fb; }
.hsm-matrix-table td strong,.hsm-matrix-table td small { display:block; }.hsm-matrix-table td small{margin-top:4px;color:#667085;white-space:nowrap}
.hsm-person-kind { display:inline-flex; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:800; white-space:nowrap; }
.hsm-person-kind--student{background:#eef2ff;color:#4338ca}.hsm-person-kind--teacher{background:#ecfdf3;color:#087443}
.hsm-matrix-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,340px),1fr)); gap: 16px; align-items: start; }
.hsm-matrix-class { border: 1px solid #e5e7eb; border-radius: 18px; background: #fff; padding: 16px; overflow: hidden; box-shadow: 0 8px 24px rgba(15,23,42,.04); }
.hsm-matrix-class > header { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.hsm-matrix-class h3 { margin: 3px 0; }
.hsm-matrix-class header > strong { color: #4f46e5; font-size: 24px; white-space: nowrap; }
.hsm-matrix-class header > strong small { font-size: 12px; }
.hsm-matrix-teachers { min-height: 44px; overflow-wrap: anywhere; }
.hsm-matrix-students { grid-column: 1/-1; margin-top: 14px; }
.hsm-person-dialog { position: fixed; inset: 0; z-index: 100000; display: grid; place-items: center; padding: 18px; }
.hsm-person-dialog[hidden] { display: none; }
.hsm-person-dialog__backdrop { position: absolute; inset: 0; background: rgba(15,23,42,.62); backdrop-filter: blur(4px); }
.hsm-person-dialog > section { position: relative; width: min(1120px,96vw); max-height: 92vh; overflow: auto; background: #fff; border-radius: 20px; padding: 24px; }
.hsm-person-dialog__close { position: sticky; float: left; top: 0; z-index: 2; border: 0; border-radius: 50%; width: 36px; height: 36px; font-size: 24px; cursor: pointer; }
.hsm-person-dialog > section > [data-hsm-person-body] > header { padding:0 0 16px 52px; border-bottom:1px solid #e8ecf3; }
.hsm-person-dialog > section > [data-hsm-person-body] > header h2 { margin:0 0 5px; font-size:24px; }
.hsm-person-dialog > section > [data-hsm-person-body] > header p { margin:0; color:#667085; }
.hsm-modal-tabs { position:sticky; z-index:4; top:-24px; display:flex; flex-wrap:wrap; gap:6px; margin:18px 0; padding:6px; overflow-x:auto; border:1px solid #e5e9f1; border-radius:14px; background:#f3f5f9; box-shadow:0 8px 18px #1f2a4412; }
.hsm-modal-tabs button { flex:1 0 105px; min-height:36px; padding:6px 10px; border:0; border-radius:9px; background:transparent; color:#596277; font:inherit; font-size:13px; font-weight:700; cursor:pointer; }
.hsm-modal-tabs button:hover,.hsm-modal-tabs button.is-active { background:#fff; color:#4f46e5; box-shadow:0 4px 13px #1f2a441c; }
.hsm-modal-panel { display:none; padding:18px; border:1px solid #e8ecf3; border-radius:16px; background:#fff; }
.hsm-modal-panel.is-active { display:block; }
.hsm-modal-panel[hidden] { display:none !important; }
.hsm-modal-details { display:grid; grid-template-columns:minmax(145px,190px) minmax(0,1fr); margin:0; border:1px solid #edf0f5; border-radius:13px; overflow:hidden; }
.hsm-modal-details dt,.hsm-modal-details dd { padding:11px 13px; border-bottom:1px solid #edf0f5; }
.hsm-modal-details dt { color:#667085; background:#f8fafc; font-weight:650; }
.hsm-modal-details dd { margin:0; font-weight:700; }
.hsm-modal-panel .widefat,.hsm-modal-panel table { width:100%; border-collapse:collapse; }
.hsm-modal-panel th,.hsm-modal-panel td { padding:10px 12px; border-bottom:1px solid #e8ecf3; text-align:right; vertical-align:top; }
.hsm-modal-panel th { background:#f8fafc; color:#475467; white-space:nowrap; }
.hsm-modal-action-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:12px 0 22px; padding:16px; border:1px solid #e5e9f1; border-radius:14px; background:#f8fafc; }
.hsm-modal-action-form label { display:grid; gap:6px; min-width:0; }
.hsm-modal-action-form .hsm-field--full { grid-column:1/-1; }
.hsm-modal-action-form label.hsm-checkbox { display:flex; align-items:center; gap:8px; }
.hsm-modal-action-form textarea { min-height:84px; }
.hsm-modal-action-form .hsm-form-message { grid-column:1/-1; }
.hsm-person-dialog .hsm-modal-action-form > button { align-self:end; justify-self:start; width:auto !important; min-width:0 !important; min-height:36px !important; height:auto !important; margin:0 !important; padding:7px 14px !important; border-radius:8px !important; font-size:13px !important; line-height:1.5 !important; display:inline-flex; align-items:center; justify-content:center; }
.hsm-note { margin:10px 0; padding:14px; border:1px solid #e5e9f1; border-radius:12px; background:#fff; }
.hsm-note header { display:flex; flex-wrap:wrap; align-items:center; justify-content:flex-start; gap:8px; }
.hsm-note header strong { margin-inline-end:auto; }
.hsm-note p { margin:7px 0; }.hsm-note small{color:#667085}
.hsm-modal-details dd, .hsm-note p, td, th { overflow-wrap: anywhere; }
.hsm-finance-dossier { display:grid; gap:16px; }
.hsm-finance-invoice-card { padding:18px; border:1px solid #dfe4ec; border-radius:16px; background:#fff; box-shadow:0 8px 26px #1018280a; }
.hsm-finance-invoice-card>header { display:flex; align-items:flex-start; justify-content:space-between; gap:18px; margin-bottom:14px; }
.hsm-finance-invoice-card h3 { margin:4px 0; }.hsm-finance-invoice-card h4{margin:18px 0 8px}
.hsm-finance-figures { display:grid; grid-template-columns:repeat(3,minmax(105px,1fr)); gap:8px; }
.hsm-finance-figures span { display:grid; gap:4px; padding:10px; border-radius:11px; background:#f5f7fb; color:#667085; font-size:12px; }
.hsm-finance-figures b { color:#172033; font-size:16px; }
.hsm-compact-table { min-width:620px; }
.hsm-finance-editor { margin-top:14px; border:1px solid #dfe4ec; border-radius:12px; background:#fafbfc; }
.hsm-finance-editor>summary { padding:12px 14px; cursor:pointer; font-weight:750; }
.hsm-finance-editor>form { margin:0 12px 12px; }
.hsm-inline-cheque-form { display:flex; align-items:center; gap:6px; min-width:260px; }.hsm-inline-cheque-form select{min-width:150px}
.hsm-cheque-register__header{display:flex;align-items:flex-start;justify-content:space-between;gap:16px}.hsm-cheque-register__header h2{margin:0 0 5px}.hsm-cheque-register__header p{margin:0;color:#667085}.hsm-cheque-register td>small{display:block;margin-top:4px;color:#667085}.hsm-cheque-distance{white-space:nowrap}.hsm-cheque-distance.is-overdue{color:#b42318;font-weight:800}
.hsm-danger-action { margin-top:12px; }.hsm-locked-hint{margin:12px 0 0;color:#8a5a00;background:#fff8e5;padding:9px 12px;border-radius:9px}
.hsm-finance-communication { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.hsm-app-action-dialog { width:min(620px,94vw); max-height:90vh; overflow:auto; border:0; border-radius:20px; padding:24px; box-shadow:0 24px 80px rgba(15,23,42,.3); }
.hsm-app-action-dialog::backdrop { background:rgba(15,23,42,.62); backdrop-filter:blur(4px); }
.hsm-app-action-close { float:left;border:0;border-radius:50%;width:36px;height:36px;font-size:24px;cursor:pointer; }
@media (max-width:1100px){.hsm-matrix-toolbar{grid-template-columns:repeat(2,minmax(0,1fr))}.hsm-matrix-toolbar__search{grid-column:1/-1}}
@media (max-width:680px){.hsm-matrix-toolbar{grid-template-columns:1fr}.hsm-matrix-toolbar__search{grid-column:auto}.hsm-matrix-class{padding:12px}.hsm-person-dialog{padding:0}.hsm-person-dialog>section{width:100vw;max-height:100vh;min-height:100vh;border-radius:0;padding:16px 12px}.hsm-modal-tabs{top:-16px;flex-wrap:nowrap}.hsm-modal-tabs button{flex:0 0 auto}.hsm-modal-details{grid-template-columns:1fr}.hsm-modal-details dt{padding-bottom:3px;border-bottom:0}.hsm-modal-details dd{padding-top:3px}.hsm-modal-action-form,.hsm-finance-communication{grid-template-columns:1fr}.hsm-finance-invoice-card>header{display:grid}.hsm-finance-figures{grid-template-columns:1fr}.hsm-cheque-register__header{display:grid}.hsm-inline-cheque-form{min-width:0;flex-wrap:wrap}.hsm-inline-cheque-form select{min-width:0;flex:1 1 150px}.hsm-modal-panel{padding:12px}.hsm-modal-panel .hsm-table-scroll{overflow-x:auto}}
.hsm-year-filter{max-width:520px;margin:0 0 18px}.hsm-year-filter select{width:100%}.hsm-year-filter small{display:block;margin-top:6px;color:var(--hsm-muted,#64748b)}
.hsm-panel-choices{display:flex;align-items:center;flex-wrap:wrap;gap:8px;margin:14px 0;padding:12px;border:1px solid var(--hsm-border,#e2e8f0);border-radius:14px;background:#fff}
.hsm-inline-action{display:flex;align-items:flex-end;flex-wrap:wrap;gap:10px;margin:10px 0;padding:10px;border:1px solid #e2e8f0;border-radius:12px}.hsm-inline-action form{display:flex;align-items:flex-end;flex-wrap:wrap;gap:8px;margin:0}

/* Compact, theme-resistant manager controls. */
.hsm-app .hsm-button--primary {
	border-color: var(--hsm-primary) !important;
	background: var(--hsm-primary) !important;
	color: #fff !important;
}
.hsm-app .hsm-button--primary:hover { border-color: var(--hsm-primary-dark) !important; background: var(--hsm-primary-dark) !important; }
.hsm-app .hsm-button--soft { border-color: #d9d5ff !important; background: #f1efff !important; color: var(--hsm-primary) !important; }
.hsm-app .hsm-button--danger { border-color: #fecdd3 !important; background: #fff1f2 !important; color: #b4233f !important; }
.hsm-app .hsm-button--danger:hover { border-color: #fda4af !important; background: #ffe4e6 !important; }
.hsm-app .hsm-button--small {
	width: auto !important;
	min-width: 0 !important;
	min-height: 34px !important;
	height: auto !important;
	margin: 0 !important;
	padding: 6px 11px !important;
	border-radius: 8px !important;
	font-size: 12px !important;
	line-height: 1.55 !important;
}
.hsm-app .hsm-bulk-import { margin: 0 0 18px; padding: clamp(14px, 2vw, 20px); border: 1px solid var(--hsm-border); border-radius: 16px; background: #fff; }
.hsm-app .hsm-bulk-import > h2 { margin: 0 0 8px; font-size: 19px; }
.hsm-app .hsm-bulk-import > p { max-width: 1050px; margin: 7px 0; line-height: 1.9; }
.hsm-app .hsm-bulk-import .hsm-two-column { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 16px; }
.hsm-app .hsm-import-form { display: grid; align-content: start; gap: 10px; padding: 14px; border: 1px solid #e4e8f0; border-radius: 13px; background: #fafbfe; }
.hsm-app .hsm-import-form h3 { margin: 0 0 2px; font-size: 16px; }
.hsm-app .hsm-import-form .hsm-field input[type="file"] { width: 100%; min-height: 42px; padding: 5px 6px; border-radius: 9px; background: #fff; }
.hsm-app .hsm-import-form .hsm-field input[type="file"]::file-selector-button { width: auto; min-height: 30px; margin-inline-end: 8px; padding: 5px 10px; }
.hsm-app .hsm-import-form__actions { margin: 0; }
.hsm-app .hsm-import-form > .hsm-button { justify-self: start; width: auto !important; min-height: 38px !important; padding: 7px 14px !important; }
.hsm-app .hsm-import-form .hsm-checkbox { align-items: flex-start; line-height: 1.8; }
.hsm-app .hsm-class-editor { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 9px; margin: 8px 0; padding: 10px; border-color: #e2e8f0; background: #f8fafc; }
.hsm-app .hsm-class-editor > form:first-child { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(90px, 130px) auto; align-items: end; gap: 8px; width: 100%; }
.hsm-app .hsm-class-editor > form:last-child { align-self: end; }
.hsm-app .hsm-class-editor label { display: grid; gap: 4px; min-width: 0; color: var(--hsm-muted); font-size: 11px; }
.hsm-app .hsm-class-editor input[type="text"],
.hsm-app .hsm-class-editor input[type="number"] { width: 100%; min-width: 0; min-height: 36px; margin: 0; padding: 6px 9px; border: 1px solid #d7dce6; border-radius: 8px; background: #fff; color: var(--hsm-text); font: inherit; font-size: 13px; box-shadow: none; }
.hsm-app .hsm-class-editor input:focus { border-color: var(--hsm-primary); outline: 3px solid rgba(91,78,232,.12); }
.hsm-app .hsm-class-editor .hsm-form-message:not(:empty) { grid-column: 1 / -1; }
@media (max-width: 900px) {
	.hsm-app .hsm-bulk-import .hsm-two-column { grid-template-columns: 1fr; }
}
@media (max-width: 680px) {
	.hsm-app .hsm-class-editor { grid-template-columns: 1fr; align-items: stretch; }
	.hsm-app .hsm-class-editor > form:first-child { grid-template-columns: 1fr; align-items: stretch; }
	.hsm-app .hsm-class-editor > form:last-child { justify-self: start; }
}
