.sm-dashboard-page {
	scrollbar-gutter: stable;
}

html:has(.sm-dashboard) {
	overflow-y: scroll;
	scrollbar-gutter: stable;
}

.sm-dashboard,
.sm-login-card {
	--sm-font: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	--sm-bg: #f6f7f9;
	--sm-panel: #ffffff;
	--sm-border: #d9dee7;
	--sm-text: #1d2327;
	--sm-heading: #151a1f;
	--sm-muted: #646970;
	--sm-primary: #1f6feb;
	--sm-primary-strong: #174ea6;
	--sm-ok: #147d45;
	--sm-error: #b42318;
}

.sm-dashboard {
	background: var(--sm-bg);
	color: var(--sm-text);
	font-family: var(--sm-font);
	margin: 0;
	min-height: 70vh;
	padding: clamp(16px, 3vw, 32px);
}

.sm-dashboard *,
.sm-dashboard *::before,
.sm-dashboard *::after,
.sm-login-card *,
.sm-login-card *::before,
.sm-login-card *::after {
	box-sizing: border-box;
}

.sm-dashboard :where(h1, h2, h3, h4, h5, h6),
.sm-login-card :where(h1, h2, h3, h4, h5, h6) {
	color: var(--sm-heading);
	font-family: var(--sm-font);
	font-weight: 820;
	letter-spacing: 0;
}

.sm-dashboard :where(p, label, span, td, th, li, input, select, textarea, button),
.sm-login-card :where(p, label, span, td, th, li, input, select, textarea, button) {
	color: inherit;
	font-family: var(--sm-font);
	letter-spacing: 0;
}

.sm-dashboard :where(a),
.sm-login-card :where(a) {
	color: var(--sm-primary);
}

.sm-dashboard__header {
	align-items: flex-start;
	display: flex;
	gap: 16px;
	justify-content: space-between;
	margin: 0 auto 18px;
	max-width: 1180px;
}

.sm-dashboard__header h1 {
	font-size: clamp(28px, 4vw, 42px);
	letter-spacing: 0;
	line-height: 1.1;
	margin: 0;
}

.sm-dashboard__tools {
	align-items: flex-end;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sm-dashboard__logout {
	white-space: nowrap;
}

.sm-dashboard-switcher {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 14px;
}

.sm-dashboard-switcher__link {
	align-items: center;
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 999px;
	color: var(--sm-text);
	display: inline-flex;
	font-size: 13px;
	font-weight: 800;
	line-height: 1.15;
	min-height: 34px;
	padding: 8px 12px;
	text-decoration: none;
}

.sm-dashboard-switcher__link:hover,
.sm-dashboard-switcher__link.is-active {
	background: var(--sm-primary);
	border-color: var(--sm-primary);
	color: #fff;
}

.sm-kicker {
	color: var(--sm-muted);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: 0;
	margin: 0 0 6px;
	text-transform: uppercase;
}

.sm-dashboard__status {
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	color: var(--sm-muted);
	font-size: 13px;
	line-height: 1.3;
	max-width: 260px;
	padding: 8px 10px;
	text-align: right;
}

.sm-dashboard__status[data-tone="ok"] {
	border-color: rgba(20, 125, 69, 0.32);
	color: var(--sm-ok);
}

.sm-dashboard__status[data-tone="error"] {
	border-color: rgba(180, 35, 24, 0.32);
	color: var(--sm-error);
}

.sm-login-card {
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	box-shadow: 0 18px 46px rgba(29, 35, 39, 0.08);
	color: var(--sm-text);
	font-family: var(--sm-font);
	margin: 32px auto;
	max-width: 460px;
	padding: clamp(22px, 4vw, 34px);
}

.sm-login-card h2 {
	font-size: 28px;
	letter-spacing: 0;
	line-height: 1.15;
	margin: 0 0 18px;
}

.sm-login-card .login-username,
.sm-login-card .login-password,
.sm-login-card .login-remember,
.sm-login-card .login-submit {
	margin: 0 0 14px;
}

.sm-login-card label {
	color: var(--sm-muted);
	display: block;
	font-size: 13px;
	font-weight: 750;
	margin: 0 0 6px;
}

.sm-login-card input[type="text"],
.sm-login-card input[type="email"],
.sm-login-card input[type="tel"],
.sm-login-card input[type="password"] {
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	color: var(--sm-text);
	font: inherit;
	min-height: 42px;
	padding: 9px 11px;
	width: 100%;
}

.sm-login-card input[type="submit"] {
	appearance: none;
	background: var(--sm-primary);
	border: 1px solid var(--sm-primary);
	border-radius: 6px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 800;
	min-height: 42px;
	padding: 9px 16px;
	width: 100%;
}

.sm-login-card input[type="submit"]:hover {
	background: var(--sm-primary-strong);
	border-color: var(--sm-primary-strong);
}

.sm-login-tabs {
	background: #eef2f7;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	display: grid;
	gap: 4px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	margin: 0 0 18px;
	padding: 4px;
}

.sm-login-tab {
	border-radius: 4px;
	color: var(--sm-muted);
	font-size: 14px;
	font-weight: 850;
	line-height: 1.2;
	padding: 10px 12px;
	text-align: center;
	text-decoration: none;
}

.sm-login-tab:hover,
.sm-login-tab.is-active {
	background: var(--sm-panel);
	color: var(--sm-heading);
}

.sm-login-card:has(#sm-signup-form:target) .sm-login-tab {
	background: transparent;
	color: var(--sm-muted);
}

.sm-login-card:has(#sm-signup-form:target) .sm-login-tab[href="#sm-signup-form"] {
	background: var(--sm-panel);
	color: var(--sm-heading);
}

.sm-login-card:has(#sm-signup-form:target) .sm-login-tab[href="#sm-login-form"] {
	background: transparent;
	color: var(--sm-muted);
}

.sm-login-panel {
	display: block;
}

#sm-signup-form {
	display: none;
}

.sm-login-card:has(#sm-signup-form:target) #sm-login-form {
	display: none;
}

.sm-login-card:has(#sm-signup-form:target) #sm-signup-form {
	display: block;
}

.sm-signup-form p {
	margin: 0 0 14px;
}

.sm-login-links {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sm-warning {
	background: #fff8e1;
	border: 1px solid #d6a100;
	border-radius: 6px;
	color: #5c4500;
	font-size: 13px;
	font-weight: 650;
	grid-column: 1 / -1;
	line-height: 1.35;
	padding: 10px 12px;
}

.sm-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 auto 16px;
	max-width: 1180px;
}

.sm-tab,
.sm-button {
	align-items: center;
	appearance: none;
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	color: var(--sm-text);
	cursor: pointer;
	display: inline-flex;
	font: inherit;
	font-size: 14px;
	font-weight: 650;
	justify-content: center;
	line-height: 1.2;
	min-height: 38px;
	padding: 8px 12px;
	text-decoration: none;
	transition: background 150ms ease, border-color 150ms ease, color 150ms ease;
}

.sm-tab:hover,
.sm-button:hover {
	border-color: var(--sm-primary);
	color: var(--sm-primary-strong);
}

.sm-tab.is-active,
.sm-button--primary {
	background: var(--sm-primary);
	border-color: var(--sm-primary);
	color: #ffffff;
}

.sm-tab.is-active:hover,
.sm-button--primary:hover {
	background: var(--sm-primary-strong);
	color: #ffffff;
}

.sm-button--danger {
	border-color: rgba(180, 35, 24, 0.36);
	color: var(--sm-error);
}

.sm-button--danger:hover {
	background: #fff7f6;
	border-color: var(--sm-error);
	color: var(--sm-error);
}

.sm-button--small {
	font-size: 12px;
	min-height: 30px;
	padding: 6px 9px;
}

.sm-icon-button {
	flex: 0 0 auto;
	height: 38px;
	padding: 0;
	position: relative;
	width: 38px;
}

.sm-icon-button.sm-button--small {
	height: 32px;
	min-height: 32px;
	padding: 0;
	width: 32px;
}

.sm-icon-text-button {
	gap: 7px;
	white-space: nowrap;
}

.sm-icon-text-button .sm-action-icon {
	height: 16px;
	width: 16px;
}

.sm-action-icon {
	background: currentColor;
	display: block;
	height: 18px;
	mask: var(--sm-action-icon) center / contain no-repeat;
	-webkit-mask: var(--sm-action-icon) center / contain no-repeat;
	width: 18px;
}

.sm-button-tooltip {
	background: #111827;
	border-radius: 4px;
	bottom: calc(100% + 8px);
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	left: 50%;
	line-height: 1.2;
	max-width: 220px;
	opacity: 0;
	padding: 6px 8px;
	pointer-events: none;
	position: absolute;
	text-align: center;
	transform: translate(-50%, 4px);
	transition: opacity 120ms ease, transform 120ms ease;
	visibility: hidden;
	white-space: nowrap;
	z-index: 10020;
}

.sm-button-tooltip::after {
	border: 5px solid transparent;
	border-top-color: #111827;
	content: "";
	left: 50%;
	position: absolute;
	top: 100%;
	transform: translateX(-50%);
}

.sm-icon-button:hover .sm-button-tooltip,
.sm-icon-button:focus-visible .sm-button-tooltip {
	opacity: 1;
	transform: translate(-50%, 0);
	visibility: visible;
}

.sm-icon-button--tooltip-left .sm-button-tooltip {
	left: auto;
	right: -4px;
	transform: translateY(4px);
}

.sm-icon-button--tooltip-left .sm-button-tooltip::after {
	left: auto;
	right: 12px;
	transform: none;
}

.sm-icon-button--tooltip-left:hover .sm-button-tooltip,
.sm-icon-button--tooltip-left:focus-visible .sm-button-tooltip {
	transform: translateY(0);
}

.sm-icon-button--tooltip-below-left .sm-button-tooltip {
	bottom: auto;
	left: auto;
	right: -4px;
	top: calc(100% + 8px);
	transform: translateY(-4px);
}

.sm-icon-button--tooltip-below-left .sm-button-tooltip::after {
	border-bottom-color: #111827;
	border-top-color: transparent;
	bottom: 100%;
	left: auto;
	right: 12px;
	top: auto;
	transform: none;
}

.sm-icon-button--tooltip-below-left:hover .sm-button-tooltip,
.sm-icon-button--tooltip-below-left:focus-visible .sm-button-tooltip {
	transform: translateY(0);
}

.sm-action--add,
.sm-action--save {
	background: var(--sm-primary);
	border-color: var(--sm-primary);
	color: #ffffff;
}

.sm-action--save {
	background: #147d64;
	border-color: #147d64;
}

.sm-action--edit {
	background: #eff6ff;
	border-color: #bfdbfe;
	color: #1d4ed8;
}

.sm-action--export {
	background: #ecfdf5;
	border-color: #a7f3d0;
	color: #047857;
}

.sm-action--sell {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.sm-action--attendance {
	background: #f0fdfa;
	border-color: #99f6e4;
	color: #0f766e;
}

.sm-action--settings {
	background: #f8fafc;
	border-color: #cbd5e1;
	color: #334155;
}

.sm-action--delete,
.sm-action--cancel {
	background: #fff1f2;
	border-color: #fecdd3;
	color: #be123c;
}

.sm-action--add:hover,
.sm-action--save:hover {
	background: var(--sm-primary-strong);
	color: #ffffff;
}

.sm-action--edit:hover {
	background: #dbeafe;
	border-color: #93c5fd;
	color: #1e40af;
}

.sm-action--export:hover {
	background: #d1fae5;
	border-color: #6ee7b7;
	color: #065f46;
}

.sm-action--sell:hover {
	background: #fef3c7;
	border-color: #fbbf24;
	color: #78350f;
}

.sm-action--attendance:hover {
	background: #ccfbf1;
	border-color: #5eead4;
	color: #115e59;
}

.sm-action--settings:hover {
	background: #e2e8f0;
	border-color: #94a3b8;
	color: #0f172a;
}

.sm-action--delete:hover,
.sm-action--cancel:hover {
	background: #ffe4e6;
	border-color: #fda4af;
	color: #9f1239;
}

.sm-button:disabled {
	cursor: not-allowed;
	opacity: 0.48;
}

.sm-dashboard__content {
	display: grid;
	gap: 16px;
	margin: 0 auto;
	max-width: 1180px;
}

.sm-reception-footer {
	display: flex;
	justify-content: flex-end;
	padding-bottom: 8px;
}

.sm-metrics {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sm-metric,
.sm-panel {
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 8px;
}

.sm-metric {
	min-height: 92px;
	padding: 16px;
}

.sm-metric span {
	color: var(--sm-muted);
	display: block;
	font-size: 13px;
	font-weight: 650;
	margin-bottom: 8px;
}

.sm-metric strong {
	display: block;
	font-size: 34px;
	letter-spacing: 0;
	line-height: 1;
}

.sm-metrics--compact {
	border-top: 1px solid var(--sm-border);
	grid-template-columns: repeat(5, minmax(0, 1fr));
	padding: 14px 16px;
}

.sm-metrics--compact .sm-metric {
	min-height: 76px;
	padding: 12px;
}

.sm-metrics--compact .sm-metric strong {
	font-size: 24px;
}

.sm-stat-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 16px;
}

.sm-stat-grid--inline .sm-detail-item {
	min-height: 66px;
	padding: 12px 14px;
}

.sm-metric--danger {
	background: #fff7f6;
	border-color: rgba(180, 35, 24, 0.24);
}

.sm-metric--danger strong {
	color: var(--sm-error);
}

.sm-metric--warning {
	background: #fffbeb;
	border-color: #fde68a;
}

.sm-metric--warning strong {
	color: #92400e;
}

.sm-metric--success {
	background: #f3fcf7;
	border-color: #bbf7d0;
}

.sm-metric--success strong {
	color: var(--sm-ok);
}

.sm-panel {
	overflow: hidden;
}

.sm-panel__header {
	align-items: center;
	border-bottom: 1px solid var(--sm-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 14px 16px;
}

.sm-panel__header--toolbar {
	align-items: end;
}

.sm-list-toolbar__search {
	margin: 0;
	max-width: 420px;
	min-width: min(100%, 280px);
}

.sm-list-toolbar__search--reception {
	flex: 1 1 680px;
	max-width: 760px;
}

.sm-panel__header h2 {
	font-size: 18px;
	letter-spacing: 0;
	line-height: 1.25;
	margin: 0;
}

.sm-form {
	align-items: end;
	border-bottom: 1px solid var(--sm-border);
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(5, minmax(120px, 1fr)) auto;
	padding: 14px 16px;
}

.sm-form--compact {
	grid-template-columns: repeat(2, minmax(120px, 220px)) auto;
}

.sm-payment-status-form {
	grid-template-columns: minmax(220px, 1.1fr) minmax(180px, 0.8fr) minmax(220px, 1fr) auto;
}

.sm-form--single-column {
	align-items: stretch;
	border-bottom: 0;
	grid-template-columns: 1fr;
	padding: 16px;
}

.sm-form--single-column .sm-button {
	justify-self: center;
	min-width: 160px;
}

.sm-form--inline {
	border-bottom: 0;
	padding: 0;
}

.sm-form-section {
	border-top: 1px solid var(--sm-border);
	display: grid;
	gap: 12px;
	padding-top: 14px;
}

.sm-form-section h4 {
	font-size: 13px;
	line-height: 1.2;
	margin: 0;
}

.sm-form--student-profile {
	border-bottom: 0;
	border-top: 1px solid var(--sm-border);
	grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.sm-group-info-form {
	align-items: end;
	border-bottom: 0;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 16px;
}

.sm-group-info-form .sm-button {
	grid-column: 2;
	justify-self: center;
	min-width: 180px;
}

.sm-form--student-self .sm-action--save {
	grid-column: 1 / -1;
	justify-self: center;
}

.sm-field {
	display: grid;
	gap: 5px;
	min-width: 0;
}

.sm-field span {
	color: var(--sm-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.sm-field input,
.sm-field select,
.sm-field textarea {
	background: #ffffff;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	color: var(--sm-text);
	font: inherit;
	font-size: 14px;
	min-height: 38px;
	min-width: 0;
	padding: 7px 9px;
	width: 100%;
}

.sm-field textarea {
	line-height: 1.4;
	min-height: 110px;
	resize: vertical;
}

.sm-field--small input,
.sm-field--small select {
	font-size: 12px;
	min-height: 30px;
	padding: 5px 7px;
}

.sm-field--wide {
	min-width: 170px;
}

.sm-field--roles {
	border: 0;
	display: grid;
	gap: 4px;
	margin: 0;
	min-width: 160px;
	padding: 0;
}

.sm-field--roles legend {
	color: var(--sm-muted);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	padding: 0;
}

.sm-checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
}

.sm-checkbox {
	align-items: center;
	display: inline-flex;
	gap: 5px;
	min-height: 20px;
	padding: 0;
}

.sm-checkbox input {
	height: 14px;
	margin: 0;
	width: 14px;
}

.sm-checkbox span {
	color: var(--sm-text);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.sm-checkline {
	align-items: center;
	display: inline-flex;
	gap: 6px;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
}

.sm-attendance-cell {
	align-items: end;
	display: grid;
	gap: 8px;
	grid-template-columns: minmax(90px, auto) minmax(150px, 1fr) minmax(92px, 110px) minmax(92px, 110px);
	min-width: 520px;
}

.sm-attendance-quick-row {
	align-items: center;
	display: flex;
	gap: 8px;
	min-width: 96px;
}

.sm-attendance-toolbar {
	display: flex;
	justify-content: flex-end;
	margin: 0 0 10px;
}

.sm-attendance-counter {
	align-items: center;
	background: #f8fafc;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	color: var(--sm-text);
	display: inline-flex;
	font-weight: 800;
	padding: 10px 14px;
}

.sm-attendance-check {
	background: #f3f4f6;
	border-color: #d1d5db;
	color: #6b7280;
}

.sm-attendance-check.is-present {
	background: #16a34a;
	border-color: #15803d;
	color: #ffffff;
	box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.18);
}

.sm-attendance-check:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.sm-attendance-checkmark {
	border-bottom: 2px solid currentColor;
	border-right: 2px solid currentColor;
	display: block;
	height: 14px;
	transform: rotate(45deg) translate(-1px, -1px);
	width: 7px;
}

.sm-attendance-remove {
	background: #f9fafb;
	border-color: #d1d5db;
	color: #6b7280;
}

.sm-attendance-remove:hover {
	background: #fff1f2;
	border-color: #fecdd3;
	color: #be123c;
}

.sm-table tr.is-frozen-membership,
.sm-attendance-table tr.is-frozen-membership {
	background: #eff6ff;
}

.sm-membership-freeze-badge {
	align-items: center;
	background: #dbeafe;
	border: 1px solid #93c5fd;
	border-radius: 999px;
	color: #1d4ed8;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	gap: 6px;
	line-height: 1.2;
	padding: 6px 9px;
	white-space: nowrap;
}

.sm-membership-freeze-badge small {
	color: #2563eb;
	font-size: 11px;
	font-weight: 700;
}

.sm-student-name-with-status {
	align-items: center;
	display: inline-flex;
	gap: 7px;
	min-width: 0;
}

.sm-student-freeze-icon {
	align-items: center;
	background: #dbeafe;
	border: 1px solid #93c5fd;
	border-radius: 999px;
	color: #1d4ed8;
	display: inline-flex;
	font-size: 12px;
	height: 22px;
	justify-content: center;
	line-height: 1;
	width: 22px;
}

.sm-active-freeze {
	align-items: center;
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	border-radius: 8px;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: space-between;
	margin-bottom: 14px;
	padding: 12px;
}

.sm-table-wrap {
	overflow-x: auto;
}

.sm-table {
	border-collapse: collapse;
	font-size: 14px;
	min-width: 720px;
	width: 100%;
}

.sm-table th,
.sm-table td {
	border-bottom: 1px solid var(--sm-border);
	line-height: 1.35;
	padding: 10px 12px;
	text-align: left;
	vertical-align: middle;
}

.sm-table th {
	background: #f9fafb;
	color: var(--sm-muted);
	font-size: 12px;
	font-weight: 750;
	text-transform: uppercase;
}

.sm-table tr:last-child td {
	border-bottom: 0;
}

.sm-table-thumb {
	border: 1px solid var(--sm-border);
	border-radius: 4px;
	display: block;
	height: 44px;
	object-fit: contain;
	width: 44px;
}

.sm-pagination {
	align-items: center;
	border-top: 1px solid var(--sm-border);
	display: flex;
	gap: 10px;
	justify-content: center;
	padding: 12px 16px;
}

.sm-pagination span {
	color: var(--sm-muted);
	font-size: 13px;
	font-weight: 700;
}

.sm-code-cell {
	display: block;
	font-size: 12px;
	line-height: 1.35;
	max-width: 320px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sm-log-summary {
	display: block;
	line-height: 1.4;
	max-width: 520px;
	white-space: normal;
	word-break: break-word;
}

.sm-log-filters,
.sm-log-cleanup-form {
	align-items: end;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	margin: 16px 0;
}

.sm-log-stats {
	margin: 14px 0 18px;
}

.sm-log-level {
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 6px 9px;
	text-transform: uppercase;
}

.sm-log-level--important {
	background: #e8f2ff;
	color: #1155a3;
}

.sm-log-level--financial {
	background: #e6f7ef;
	color: #087045;
}

.sm-log-level--security {
	background: #fff1d8;
	color: #8a5200;
}

.sm-log-level--system {
	background: #eef0f4;
	color: #485160;
}

.sm-log-level--info {
	background: #f3efff;
	color: #6042a6;
}

.sm-log-cleanup {
	border-top: 1px solid var(--sm-border);
	margin-top: 20px;
	padding-top: 18px;
}

.sm-empty,
.sm-error {
	padding: 18px 16px;
}

.sm-empty {
	color: var(--sm-muted);
}

.sm-error {
	background: #fff7f6;
	border: 1px solid rgba(180, 35, 24, 0.22);
	border-radius: 8px;
	color: var(--sm-error);
	font-size: 14px;
	line-height: 1.45;
	margin: 16px;
	max-height: 220px;
	overflow: auto;
	white-space: normal;
	word-break: break-word;
}

.sm-attendance-actions {
	align-items: center;
	border-bottom: 1px solid var(--sm-border);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 14px 16px;
}

.sm-attendance-booking {
	border-bottom: 1px solid var(--sm-border);
	padding: 14px 16px;
}

.sm-attendance-booking h3 {
	font-size: 15px;
	margin: 0 0 10px;
}

.sm-attendance-result {
	border-bottom: 1px solid var(--sm-border);
	font-size: 14px;
	line-height: 1.45;
	padding: 12px 16px;
}

.sm-attendance-result.is-ok {
	background: #f3fcf7;
	color: var(--sm-ok);
}

.sm-attendance-result.has-errors {
	background: #fff7f6;
	color: var(--sm-error);
}

.sm-attendance-result__title {
	font-weight: 750;
	margin-top: 8px;
}

.sm-attendance-result ul {
	margin: 6px 0 0;
	padding-left: 18px;
}

.sm-payment-help {
	border-top: 1px solid var(--sm-border);
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 14px 16px;
}

.sm-payment-help p {
	color: var(--sm-muted);
	line-height: 1.45;
	margin: 6px 0 0;
	white-space: pre-wrap;
}

.sm-payment-help img {
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	display: block;
	margin-top: 8px;
	max-width: 160px;
	width: 100%;
}

.sm-payment-help--modal {
	display: grid;
	gap: 14px;
	padding: 16px;
}

.sm-payment-help--modal img {
	margin-inline: auto;
	max-width: 260px;
}

.sm-payment-split {
	display: grid;
	gap: 10px;
	grid-column: 1 / -1;
	padding: 12px;
	border: 1px solid var(--sm-border);
	background: var(--sm-surface);
}

.sm-payment-split__title {
	font-weight: 800;
	color: var(--sm-text);
}

.sm-payment-split__row {
	display: grid;
	gap: 10px;
	grid-template-columns: minmax(150px, 1fr) minmax(120px, 0.7fr) minmax(160px, 1fr);
}

.sm-inline-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sm-inline-actions--stacked {
	align-items: stretch;
	flex-direction: column;
	margin-top: 8px;
	min-width: 220px;
}

.sm-pill {
	align-items: center;
	background: #f8fafc;
	border: 1px solid var(--sm-border);
	border-radius: 999px;
	color: var(--sm-muted);
	display: inline-flex;
	font-size: 12px;
	font-weight: 700;
	min-height: 30px;
	padding: 5px 9px;
}

.sm-finance-badge {
	align-items: center;
	border: 1px solid var(--sm-border);
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	line-height: 1.2;
	min-height: 28px;
	padding: 5px 9px;
	white-space: nowrap;
}

.sm-finance-badge-wrap {
	align-items: center;
	display: inline-flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sm-finance-badge--debt {
	background: #fff7f6;
	border-color: rgba(180, 35, 24, 0.24);
	color: var(--sm-error);
}

.sm-finance-badge--pending {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.sm-finance-badge--ok {
	background: #f3fcf7;
	border-color: #bbf7d0;
	color: var(--sm-ok);
}

.sm-finance-summary {
	border-bottom: 1px solid var(--sm-border);
	padding: 16px;
}

.sm-finance-summary__actions {
	display: flex;
	justify-content: center;
	padding-top: 12px;
}

.sm-form--quick-debt {
	padding: 16px;
}

.sm-detail-panel {
	background: #ffffff;
	border-top: 1px solid var(--sm-border);
}

.sm-profile-summary {
	align-items: center;
	border-bottom: 1px solid var(--sm-border);
	display: grid;
	gap: 16px;
	grid-template-columns: 84px minmax(0, 1fr);
	padding: 16px;
}

.sm-profile-summary .sm-detail-grid {
	grid-column: 1 / -1;
	width: 100%;
}

.sm-profile-summary .sm-form--inline {
	width: 100%;
}

.sm-profile-photo {
	align-items: center;
	aspect-ratio: 1;
	background: #eef2f7;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	color: var(--sm-muted);
	display: flex;
	font-size: 24px;
	font-weight: 800;
	justify-content: center;
	overflow: hidden;
	width: 84px;
}

.sm-profile-photo img {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.sm-detail-grid {
	display: grid;
	gap: 12px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 16px;
}

.sm-detail-grid--compact {
	padding: 0;
}

.sm-timeline {
	display: grid;
	gap: 12px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.sm-timeline__item {
	display: grid;
	gap: 10px;
	grid-template-columns: 14px minmax(0, 1fr);
}

.sm-timeline__marker {
	background: #2563eb;
	border-radius: 999px;
	height: 10px;
	margin-top: 7px;
	width: 10px;
}

.sm-timeline__body {
	background: #f9fafb;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	padding: 10px 12px;
}

.sm-timeline__head {
	align-items: baseline;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: space-between;
}

.sm-timeline__head strong {
	color: var(--sm-text);
	font-size: 14px;
}

.sm-timeline__head span,
.sm-timeline__body small {
	color: var(--sm-muted);
	font-size: 12px;
}

.sm-timeline__body p {
	color: var(--sm-text);
	font-size: 13px;
	line-height: 1.45;
	margin: 6px 0;
}

.sm-detail-item {
	background: #f9fafb;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	min-height: 72px;
	padding: 12px;
}

.sm-detail-item span,
.sm-detail-note span {
	color: var(--sm-muted);
	display: block;
	font-size: 12px;
	font-weight: 750;
	line-height: 1.2;
	margin-bottom: 6px;
	text-transform: uppercase;
}

.sm-detail-item strong {
	display: block;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.3;
	overflow-wrap: anywhere;
}

.sm-detail-note {
	border-top: 1px solid var(--sm-border);
	padding: 16px;
}

.sm-detail-note p {
	margin: 0;
}

.sm-detail-columns {
	border-top: 1px solid var(--sm-border);
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sm-detail-columns > div + div {
	border-left: 1px solid var(--sm-border);
}

.sm-detail-columns h3,
.sm-detail-section h3 {
	font-size: 15px;
	line-height: 1.25;
	margin: 0;
	padding: 14px 16px;
}

.sm-detail-section {
	border-top: 1px solid var(--sm-border);
}

.sm-media-setting {
	grid-column: 1 / -1;
	padding: 0 16px 16px;
}

.sm-media-setting h3 {
	padding-left: 0;
}

.sm-detail-actions {
	border-top: 1px solid var(--sm-border);
	display: flex;
	gap: 8px;
	padding: 12px 16px;
}

.sm-detail-section__header {
	align-items: center;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding-right: 16px;
}

.sm-detail-section__header h3 {
	padding-right: 0;
}

.sm-schedule-summary {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 16px;
}

.sm-schedule-pill {
	background: #f8fafc;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	display: grid;
	gap: 2px;
	min-width: 150px;
	padding: 10px 12px;
}

.sm-schedule-pill strong,
.sm-schedule-pill span,
.sm-schedule-pill em {
	font-size: 13px;
	line-height: 1.25;
}

.sm-schedule-pill em {
	color: var(--sm-muted);
	font-style: normal;
}

.sm-modal[hidden] {
	display: none;
}

.sm-modal {
	align-items: center;
	display: flex;
	inset: 0;
	justify-content: center;
	padding: 20px;
	position: fixed;
	z-index: 9999;
}

.sm-modal--top {
	z-index: 10020;
}

.sm-modal__backdrop {
	background: rgba(15, 23, 42, 0.48);
	inset: 0;
	position: absolute;
}

.sm-modal__dialog {
	background: var(--sm-panel);
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.22);
	max-height: min(760px, calc(100vh - 40px));
	max-width: 980px;
	overflow: auto;
	position: relative;
	width: min(100%, 980px);
	z-index: 1;
}

.sm-modal__dialog--narrow {
	max-width: 560px;
	width: min(100%, 560px);
}

.sm-modal__dialog--wide {
	max-width: calc(100vw - 40px);
	width: calc(100vw - 40px);
}

.sm-panel__header-actions,
.sm-notification-search,
.sm-notification-controls {
	align-items: end;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.sm-panel__header-actions {
	justify-content: flex-end;
}

.sm-panel__header--subtle {
	margin-bottom: 12px;
}

.sm-panel__header--subtle h3 {
	font-size: 18px;
	margin: 0;
}

.sm-notification-workspace {
	display: grid;
	gap: 22px;
}

.sm-notification-search .sm-field--search {
	flex: 1 1 420px;
}

.sm-notification-search {
	padding: 0 16px;
}

.sm-notification-queue {
	border-top: 1px solid var(--sm-border);
	display: grid;
	gap: 14px;
	padding: 20px 16px 16px;
}

.sm-notification-queue .sm-table-wrap {
	margin: 0;
}

.sm-notification-queue .sm-button-row {
	align-items: center;
	display: flex;
	flex-wrap: nowrap;
	gap: 8px;
	justify-content: flex-start;
	white-space: nowrap;
}

.sm-notification-bulk-actions {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

.sm-notification-controls .sm-field {
	min-width: 180px;
}

.sm-notification-preview {
	display: grid;
	gap: 12px;
	padding: 16px;
}

.sm-notification-preview pre {
	background: #f9fafb;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	font: inherit;
	line-height: 1.5;
	margin: 0;
	max-height: 420px;
	overflow: auto;
	padding: 14px;
	white-space: pre-wrap;
	word-break: break-word;
}

.sm-notification-edit-form {
	grid-column: 1 / -1;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	align-items: start;
}

.sm-notification-edit-form .sm-field {
	align-self: start;
}

.sm-notification-edit-form .sm-field span {
	align-self: start;
}

.sm-notification-edit-form .sm-field--full {
	grid-column: 1 / -1;
}

.sm-notification-edit-form textarea {
	min-height: 220px;
	width: 100%;
}

.sm-notification-settings {
	display: grid;
	gap: 18px;
	padding: 18px;
}

.sm-notification-channels {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	width: 100%;
}

.sm-channel-toggle {
	align-items: center;
	border: 1px solid var(--sm-border);
	border-radius: 6px;
	display: inline-flex;
	gap: 8px;
	min-height: 38px;
	padding: 8px 10px;
}

.sm-channel-toggle input[type="checkbox"] {
	height: 16px;
	margin: 0;
	width: 16px;
}

.sm-channel-toggle.is-disabled {
	color: var(--sm-muted);
	opacity: 0.75;
}

.sm-notification-scenarios {
	align-items: stretch;
	border-bottom: 0;
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr;
	padding: 0;
	width: 100%;
}

.sm-notification-scenarios .sm-form__actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 4px;
}

.sm-scenario-table-wrap {
	margin: 0;
	width: 100%;
}

.sm-settings-form {
	align-items: stretch;
	border-bottom: 0;
	display: grid;
	gap: 16px;
	grid-template-columns: 1fr;
	padding: 16px;
}

.sm-settings-section {
	background: #ffffff;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	display: grid;
	gap: 16px;
	padding: 16px;
}

.sm-settings-section__header {
	display: grid;
	gap: 4px;
}

.sm-settings-section__header h3,
.sm-settings-section h4 {
	color: var(--sm-text);
	font-size: 15px;
	line-height: 1.25;
	margin: 0;
}

.sm-settings-section__header p {
	color: var(--sm-muted);
	font-size: 13px;
	line-height: 1.4;
	margin: 0;
}

.sm-settings-grid {
	align-items: start;
	display: grid;
	gap: 12px;
}

.sm-settings-grid--one {
	grid-template-columns: minmax(220px, 360px);
}

.sm-settings-grid--two {
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sm-settings-grid--three {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sm-settings-grid--four {
	grid-template-columns: repeat(4, minmax(0, 1fr));
}

.sm-settings-stack {
	display: grid;
	gap: 12px;
}

.sm-settings-status-row {
	align-items: start;
	display: grid;
	gap: 12px;
	grid-template-columns: minmax(180px, 260px) 1fr;
}

.sm-settings-actions {
	display: flex;
	justify-content: flex-end;
}

.sm-scenario-table {
	min-width: 860px;
	width: 100%;
}

.sm-scenario-table th:not(:first-child),
.sm-scenario-table td:not(:first-child) {
	text-align: center;
	width: 120px;
}

.sm-scenario-table th:nth-child(2),
.sm-scenario-table td:nth-child(2) {
	width: 96px;
}

.sm-scenario-table td:first-child {
	min-width: 260px;
}

.sm-compact-check {
	align-items: center;
	display: inline-flex;
	justify-content: center;
	min-height: 24px;
	min-width: 24px;
}

.sm-compact-check input[type="checkbox"] {
	height: 16px;
	margin: 0;
	width: 16px;
}

.sm-compact-check input[type="checkbox"]:disabled {
	cursor: not-allowed;
	opacity: 0.35;
}

.sm-template-edit-form {
	align-items: stretch;
	border-bottom: 0;
	display: grid;
	gap: 16px;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	padding: 18px;
}

.sm-template-edit-form .sm-form__actions {
	display: flex;
	grid-column: 1 / -1;
	justify-content: flex-end;
}

.sm-template-language {
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	display: grid;
	gap: 12px;
	padding: 16px;
}

.sm-template-language h4 {
	font-size: 15px;
	margin: 0;
}

.sm-template-language textarea {
	min-height: 160px;
}

.sm-modal__dialog--full {
	max-height: calc(100vh - 24px);
	max-width: calc(100vw - 24px);
	width: calc(100vw - 24px);
}

.sm-modal__dialog--sale {
	max-width: 820px;
	width: min(100%, 820px);
}

.sm-modal__dialog--membership {
	padding: 18px;
}

.sm-modal__dialog--membership .sm-modal__header {
	margin: -18px -18px 18px;
}

.sm-modal__dialog--membership .sm-detail-section {
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	padding: 16px;
}

.sm-modal__dialog--membership .sm-detail-section + .sm-detail-section {
	margin-top: 14px;
}

.sm-modal__dialog--membership .sm-detail-section h4 {
	font-size: 15px;
	line-height: 1.25;
	margin: 0 0 14px;
}

.sm-modal__dialog--membership .sm-form {
	border-bottom: 0;
	padding: 0;
}

.sm-student-profile-modal .sm-detail-panel > .sm-panel__header {
	display: none;
}

.sm-student-profile-modal [data-student-profile-modal-content] {
	padding-bottom: 16px;
}

.sm-attendance-sale-form {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 16px;
}

.sm-form-actions {
	display: flex;
	gap: 8px;
	grid-column: 1 / -1;
}

.sm-form-actions--center {
	justify-content: center;
}

.sm-form-actions--right {
	justify-content: flex-end;
}

.sm-confirm-box {
	background: var(--sm-surface);
	border: 1px solid var(--sm-border);
	display: grid;
	gap: 12px;
	grid-column: 1 / -1;
	padding: 14px;
}

.sm-confirm-box p {
	color: var(--sm-text);
	font-weight: 700;
	margin: 0;
}

.sm-confirm-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: flex-end;
}

.sm-modal__header {
	align-items: center;
	border-bottom: 1px solid var(--sm-border);
	display: flex;
	gap: 12px;
	justify-content: space-between;
	padding: 14px 16px;
}

.sm-modal__header h3 {
	font-size: 18px;
	line-height: 1.25;
	margin: 0;
	padding: 0;
}

.sm-modal__header p {
	color: var(--sm-muted);
	font-size: 13px;
	margin: 3px 0 0;
}

.sm-schedule-edit-grid {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 16px;
}

.sm-schedule-edit-card {
	align-items: end;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	padding: 14px;
}

.sm-schedule-edit-card h4 {
	grid-column: 1 / -1;
	font-size: 15px;
	line-height: 1.25;
	margin: 0;
}

.sm-schedule-edit-card__column {
	display: grid;
	gap: 10px;
}

.sm-schedule-edit-card__actions {
	display: flex;
	gap: 8px;
	justify-content: center;
}

.sm-group-schedule-create {
	align-items: end;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sm-group-schedule-create h4,
.sm-group-schedule-create .sm-button {
	grid-column: 1 / -1;
}

.sm-group-schedule-create .sm-button {
	justify-self: center;
}

.sm-student-tabs {
	border-top: 1px solid var(--sm-border);
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	padding: 12px 16px;
}

.sm-student-tab {
	appearance: none;
	background: #ffffff;
	border: 1px solid var(--sm-border);
	border-radius: 999px;
	color: var(--sm-text);
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	min-height: 34px;
	padding: 7px 12px;
}

.sm-student-tab:hover {
	border-color: var(--sm-primary);
	color: var(--sm-primary-strong);
}

.sm-student-tab.is-active {
	background: var(--sm-primary);
	border-color: var(--sm-primary);
	color: #ffffff;
}

.sm-student-tab--action {
	border-color: rgba(29, 78, 216, 0.28);
	color: var(--sm-primary);
}

.sm-student-tab-panel {
	display: none;
}

.sm-student-tab-panel.is-active {
	display: block;
}

.sm-student-tab-panel[data-student-tab-panel="notes"] {
	padding: 16px;
}

.sm-student-tab-panel[data-student-tab-panel="notes"] .sm-field {
	margin: 0;
}

.sm-note-list {
	display: grid;
	gap: 10px;
	margin-bottom: 14px;
}

.sm-note-item {
	align-items: start;
	background: #f8fafc;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	display: grid;
	gap: 10px;
	grid-template-columns: 1fr auto;
	padding: 12px;
}

.sm-note-item p {
	margin: 0;
	white-space: pre-wrap;
}

.sm-note-compose {
	display: grid;
	gap: 10px;
}

.sm-detail-actions--footer {
	justify-content: flex-end;
}

.sm-template-section {
	grid-column: 1 / -1;
}

.sm-template-section p {
	color: var(--sm-muted);
	font-size: 13px;
	line-height: 1.4;
	margin: 0;
	padding: 0;
}

.sm-template-list {
	display: grid;
	gap: 12px;
	padding: 0;
}

.sm-template-card {
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	overflow: hidden;
}

.sm-template-card h4,
.sm-template-language h5 {
	font-size: 14px;
	line-height: 1.25;
	margin: 0;
}

.sm-template-card h4 {
	background: #f6f7f9;
	border-bottom: 1px solid var(--sm-border);
	padding: 10px 12px;
}

.sm-template-languages {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sm-template-language {
	display: grid;
	gap: 10px;
	padding: 12px;
}

.sm-template-language + .sm-template-language {
	border-left: 1px solid var(--sm-border);
}

.sm-export-grid {
	display: grid;
	gap: 10px;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	padding: 16px;
}

.sm-dashboard--login,
.sm-dashboard--denied {
	background: #ffffff;
	border: 1px solid var(--sm-border);
	border-radius: 8px;
	min-height: 0;
	padding: 18px;
}

@media (max-width: 900px) {
	.sm-dashboard__header {
		display: grid;
	}

	.sm-dashboard__status {
		max-width: none;
		text-align: left;
	}

	.sm-metrics {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sm-metrics--compact {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sm-stat-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sm-form,
	.sm-form--compact,
	.sm-form--student-profile,
	.sm-settings-grid--one,
	.sm-settings-grid--two,
	.sm-settings-grid--three,
	.sm-settings-grid--four,
	.sm-settings-status-row {
		grid-template-columns: 1fr;
	}

	.sm-payment-split__row {
		grid-template-columns: 1fr;
	}

	.sm-group-info-form .sm-button {
		grid-column: 1;
	}

	.sm-template-languages {
		grid-template-columns: 1fr;
	}

	.sm-template-language + .sm-template-language {
		border-left: 0;
		border-top: 1px solid var(--sm-border);
	}

	.sm-export-grid {
		grid-template-columns: 1fr;
	}

	.sm-panel__header-actions,
	.sm-notification-search,
	.sm-notification-controls {
		align-items: stretch;
		display: grid;
		grid-template-columns: 1fr;
	}

	.sm-profile-summary {
		grid-template-columns: 1fr;
	}

	.sm-detail-grid,
	.sm-detail-columns,
	.sm-schedule-edit-grid,
	.sm-schedule-edit-card,
	.sm-group-schedule-create,
	.sm-payment-help {
		grid-template-columns: 1fr;
	}

	.sm-detail-columns > div + div {
		border-left: 0;
		border-top: 1px solid var(--sm-border);
	}
}

@media (max-width: 560px) {
	.sm-dashboard {
		padding: 14px;
	}

	.sm-metrics {
		grid-template-columns: 1fr;
	}

	.sm-stat-grid {
		grid-template-columns: 1fr;
	}

	.sm-tab,
	.sm-button {
		min-height: 36px;
		padding: 8px 10px;
	}
}
