/**
 * Flyingfish School Platform UI
 */
:root {
	--sch-primary: #6366F1;
	--sch-primary-dark: #4F46E5;
	--sch-primary-soft: #EEF2FF;
	--sch-accent: #8B5CF6;
	--sch-success: #10B981;
	--sch-warn: #F59E0B;
	--sch-danger: #EF4444;
	--sch-ink: #0F172A;
	--sch-muted: #64748B;
	--sch-border: #E2E8F0;
	--sch-bg: #F1F5F9;
	--sch-surface: #FFFFFF;
	--sch-radius: 14px;
	--sch-shadow: 0 1px 3px rgba(15, 23, 42, 0.06), 0 8px 24px rgba(15, 23, 42, 0.04);
	--sch-topbar-h: 60px;
	--sch-sidebar-w: 252px;
}

/* Tabler icon fallback for older school views (font files not bundled locally) */
@font-face {
	font-family: "tabler-icons";
	font-style: normal;
	font-weight: 400;
	font-display: block;
	src: url("https://cdn.jsdelivr.net/npm/@tabler/icons-webfont@3.26.0/dist/fonts/tabler-icons.woff2") format("woff2");
}

.ti {
	font-family: "tabler-icons" !important;
	font-style: normal;
	font-weight: normal;
	line-height: 1;
	-webkit-font-smoothing: antialiased;
}

*, *::before, *::after { box-sizing: border-box; }

html,
body,
body.sch-body {
	margin: 0;
	padding: 0;
	min-height: 100%;
	background: var(--sch-bg);
	color: var(--sch-ink);
	font-family: 'DM Sans', system-ui, sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

/* ——— App shell (flex: sidebar + main) ——— */
.sch-app {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	width: 100%;
	background: var(--sch-bg);
}

.sch-frame {
	flex: 1;
	display: flex;
	align-items: stretch;
	min-height: 0;
	width: 100%;
}

.sch-topbar {
	flex-shrink: 0;
	position: relative;
	z-index: 300;
	height: var(--sch-topbar-h);
	background: #fff;
	border-bottom: 1px solid var(--sch-border);
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sch-topbar__inner {
	height: 100%;
	padding: 0 20px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.sch-topbar__left {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.sch-topbar__menu {
	display: none;
	width: 40px;
	height: 40px;
	border: 1px solid var(--sch-border);
	border-radius: 10px;
	background: #fff;
	color: var(--sch-ink);
	font-size: 22px;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	padding: 0;
}

.sch-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: var(--sch-ink);
	font-weight: 700;
	font-size: 1.05rem;
	min-width: 0;
}

.sch-brand__icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: linear-gradient(135deg, var(--sch-primary), var(--sch-accent));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 17px;
	flex-shrink: 0;
}

.sch-brand__text {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sch-topbar__actions {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.sch-sidebar {
	flex: 0 0 var(--sch-sidebar-w);
	width: var(--sch-sidebar-w);
	align-self: stretch;
	background: #fff;
	border-right: 1px solid var(--sch-border);
	overflow: hidden;
}

.sch-sidebar__inner {
	height: 100%;
	max-height: calc(100vh - var(--sch-topbar-h));
	overflow-y: auto;
	padding: 16px 12px 24px;
}

.sch-sidebar__user {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	margin-bottom: 12px;
	background: linear-gradient(135deg, var(--sch-primary-soft), #fff);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
}

.sch-sidebar__avatar {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	background: var(--sch-primary);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 18px;
	flex-shrink: 0;
}

.sch-sidebar__meta {
	min-width: 0;
}

.sch-sidebar__meta strong {
	display: block;
	font-size: 14px;
	font-weight: 700;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sch-sidebar__meta span {
	display: block;
	font-size: 12px;
	color: var(--sch-primary-dark);
	font-weight: 600;
	margin-top: 2px;
}

.sch-sidebar__meta small {
	display: block;
	font-size: 11px;
	color: var(--sch-muted);
	margin-top: 4px;
	line-height: 1.35;
}

.sch-nav {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.sch-nav__link {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border-radius: 10px;
	color: var(--sch-muted);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: background 0.15s, color 0.15s;
}

.sch-nav__link i {
	font-size: 17px;
	width: 20px;
	text-align: center;
	flex-shrink: 0;
}

.sch-nav__link span {
	flex: 1;
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.sch-nav__link:hover,
.sch-nav__link.is-active {
	background: var(--sch-primary-soft);
	color: var(--sch-primary-dark);
	font-weight: 600;
}

.sch-sidebar-backdrop {
	display: none;
	position: fixed;
	inset: 0;
	top: var(--sch-topbar-h);
	background: rgba(15, 23, 42, 0.4);
	z-index: 240;
}

.sch-main {
	flex: 1 1 0;
	min-width: 0;
	margin: 0;
	padding: 24px 28px 32px;
	display: block;
	overflow-x: hidden;
}

.sch-app--auth {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--sch-bg);
}

.sch-app--auth .sch-topbar__menu {
	display: none !important;
}

.sch-app--auth .sch-main--auth {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 24px 16px 48px;
}

.sch-auth {
	width: 100%;
	max-width: 420px;
}

.sch-main--auth > .sch-auth {
	margin-left: auto;
	margin-right: auto;
}

.sch-main--auth > .sch-landing {
	max-width: 1100px;
	width: 100%;
	margin-left: auto;
	margin-right: auto;
}

.sch-auth__icon {
	width: 52px;
	height: 52px;
	border-radius: 14px;
	background: var(--sch-primary-soft);
	color: var(--sch-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 24px;
	margin-bottom: 16px;
}

.sch-auth__link {
	display: inline-block;
	font-size: 13px;
	color: var(--sch-primary);
	font-weight: 600;
	text-decoration: none;
	margin-bottom: 16px;
}

.sch-btn--block {
	width: 100%;
	margin-top: 4px;
}

.sch-select--dial {
	width: 118px;
	flex-shrink: 0;
	padding-left: 10px;
	padding-right: 8px;
	font-size: 13px;
}

.sch-bottom-nav {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 300;
	background: #fff;
	border-top: 1px solid var(--sch-border);
	padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
	box-shadow: 0 -4px 16px rgba(15, 23, 42, 0.06);
}

.sch-bottom-nav__link {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 2px;
	padding: 6px 4px;
	text-decoration: none;
	color: var(--sch-muted);
	font-size: 10px;
	font-weight: 600;
	border-radius: 8px;
	min-width: 0;
}

.sch-bottom-nav__link i { font-size: 18px; }
.sch-bottom-nav__link.is-active {
	color: var(--sch-primary);
	background: var(--sch-primary-soft);
}

@media (max-width: 991.98px) {
	.sch-topbar__menu { display: inline-flex; }

	.sch-sidebar {
		position: fixed;
		top: var(--sch-topbar-h);
		left: 0;
		bottom: 0;
		width: var(--sch-sidebar-w);
		z-index: 250;
		transform: translateX(-100%);
		transition: transform 0.2s ease;
		box-shadow: 8px 0 32px rgba(15, 23, 42, 0.12);
	}

	.sch-sidebar.is-open { transform: translateX(0); }
	.sch-sidebar-backdrop:not([hidden]) { display: block; }

	.sch-main {
		padding: 20px 16px calc(88px + env(safe-area-inset-bottom, 0px));
	}

	.sch-bottom-nav { display: flex; gap: 4px; }

	body.sch-nav-open { overflow: hidden; }
}

@media (min-width: 992px) {
	.sch-topbar__menu { display: none !important; }
}

/* ——— Page layout (list + detail screens) ——— */
.sch-page {
	max-width: 1200px;
	width: 100%;
	display: block;
}

.sch-page-top {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 16px;
	margin-bottom: 20px;
	height: auto;
}

.sch-page-top__text {
	min-width: 0;
}

.sch-page-top__action {
	justify-self: end;
	align-self: start;
	white-space: nowrap;
}

@media (max-width: 575.98px) {
	.sch-page-top {
		grid-template-columns: 1fr;
	}
	.sch-page-top__action {
		justify-self: start;
	}
}

/* Legacy alias used on principal dashboard */
.sch-page__head {
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: start;
	gap: 16px;
	margin-bottom: 20px;
	height: auto;
}

.sch-page__intro {
	min-width: 0;
}

.sch-page__head .sch-btn,
.sch-page__head .sch-pill,
.sch-page__head-extra {
	justify-self: end;
	align-self: start;
	white-space: nowrap;
}

.sch-page__title {
	margin: 0 0 4px;
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.sch-page__sub {
	margin: 0;
	color: var(--sch-muted);
	font-size: 14px;
}

.sch-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	background: #fff;
	border: 1px solid var(--sch-border);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	color: var(--sch-muted);
}

.sch-page__head .sch-btn,
.sch-page__head .sch-pill,
.sch-page__head-extra {
	justify-self: end;
	align-self: start;
	white-space: nowrap;
}

.sch-metrics {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
	margin-bottom: 24px;
}

@media (min-width: 768px) {
	.sch-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sch-metric {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 18px;
	background: #fff;
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	text-decoration: none;
	color: inherit;
	box-shadow: var(--sch-shadow);
	transition: transform 0.15s, border-color 0.15s;
}

.sch-metric:hover {
	transform: translateY(-2px);
	border-color: var(--sch-primary);
	color: inherit;
}

.sch-metric__icon {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 22px;
	flex-shrink: 0;
}

.sch-metric__icon--blue { background: #EFF6FF; color: #2563EB; }
.sch-metric__icon--violet { background: #F5F3FF; color: #7C3AED; }
.sch-metric__icon--green { background: #ECFDF5; color: #059669; }
.sch-metric__icon--amber { background: #FFFBEB; color: #D97706; }

.sch-metric__num {
	font-size: 1.75rem;
	font-weight: 800;
	line-height: 1;
	color: var(--sch-ink);
}

.sch-metric__label {
	font-size: 13px;
	color: var(--sch-muted);
	margin-top: 4px;
	font-weight: 500;
}

.sch-split {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
}

@media (min-width: 900px) {
	.sch-split { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.sch-panel {
	background: #fff;
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 22px;
	box-shadow: var(--sch-shadow);
}

.sch-panel--full { margin-top: 16px; }

.sch-panel__title {
	margin: 0 0 16px;
	font-size: 15px;
	font-weight: 700;
	display: flex;
	align-items: center;
	gap: 8px;
}

.sch-kv { margin: 0; }

.sch-kv__row {
	display: grid;
	grid-template-columns: 100px 1fr;
	gap: 8px 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-kv__row:last-child { border-bottom: none; }

.sch-kv__row dt {
	margin: 0;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sch-muted);
}

.sch-kv__row dd {
	margin: 0;
	font-size: 14px;
	color: var(--sch-ink);
}

.sch-actions {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.sch-action {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 18px 12px;
	border-radius: 12px;
	border: 1px solid var(--sch-border);
	background: #fff;
	text-decoration: none;
	color: var(--sch-ink);
	font-size: 13px;
	font-weight: 600;
	transition: background 0.15s, border-color 0.15s;
}

.sch-action i { font-size: 22px; color: var(--sch-primary); }

.sch-action:hover {
	background: var(--sch-primary-soft);
	border-color: var(--sch-primary);
	color: var(--sch-primary-dark);
}

.sch-action--primary {
	background: var(--sch-primary);
	border-color: var(--sch-primary);
	color: #fff;
}

.sch-action--primary i { color: #fff; }

.sch-action--primary:hover {
	background: var(--sch-primary-dark);
	color: #fff;
}

.sch-feed__item {
	padding: 12px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-feed__item:last-child { border-bottom: none; }

.sch-feed__item strong {
	display: block;
	font-size: 14px;
	margin-bottom: 4px;
}

.sch-feed__item p {
	margin: 0;
	font-size: 13px;
	color: var(--sch-muted);
}

.sch-panel--full > .sch-link {
	display: inline-block;
	margin-top: 12px;
}

/* Legacy aliases for inner pages */
.sch-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 14px;
	border: none;
	cursor: pointer;
	text-decoration: none;
	transition: all 0.15s ease;
}

.sch-btn--primary {
	background: var(--sch-primary);
	color: #fff;
}

.sch-btn--primary:hover {
	background: var(--sch-primary-dark);
	color: #fff;
}

.sch-btn--ghost {
	background: transparent;
	color: var(--sch-ink);
	border: 1px solid var(--sch-border);
}

.sch-btn--ghost:hover {
	background: var(--sch-primary-soft);
	border-color: var(--sch-primary);
	color: var(--sch-primary-dark);
}

.sch-btn--sm {
	padding: 7px 12px;
	font-size: 13px;
}

.sch-grid {
	display: grid;
	gap: 16px;
}

.sch-grid--2 {
	grid-template-columns: 1fr;
}

.sch-grid--3 {
	grid-template-columns: 1fr;
}

.sch-grid--4 {
	grid-template-columns: repeat(2, 1fr);
}

@media (min-width: 768px) {
	.sch-grid--2 { grid-template-columns: repeat(2, 1fr); }
	.sch-grid--3 { grid-template-columns: repeat(3, 1fr); }
	.sch-grid--4 { grid-template-columns: repeat(4, 1fr); }
}

.sch-card {
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 20px;
	box-shadow: var(--sch-shadow);
}

.sch-card__title {
	font-size: 15px;
	font-weight: 600;
	margin: 0 0 12px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
}

.sch-stat {
	text-align: center;
}

.sch-stat__num {
	font-size: 2rem;
	font-weight: 700;
	color: var(--sch-primary);
	line-height: 1;
}

.sch-stat__label {
	font-size: 13px;
	color: var(--sch-muted);
	margin-top: 6px;
}

.sch-badge {
	display: inline-block;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 12px;
	font-weight: 600;
}

.sch-badge--ok { background: #D1FAE5; color: #065F46; }
.sch-badge--warn { background: #FEF3C7; color: #92400E; }
.sch-badge--bad { background: #FEE2E2; color: #991B1B; }
.sch-badge--info { background: #E0E7FF; color: #3730A3; }

.sch-metric--static { cursor: default; }
.sch-metric--static:hover { transform: none; border-color: var(--sch-border); }

.sch-metrics--compact .sch-metric { padding: 14px; }
.sch-metrics--compact .sch-metric__icon { width: 40px; height: 40px; font-size: 18px; }
.sch-metrics--compact .sch-metric__num { font-size: 1.25rem; }

.sch-table__sub { font-size: 12px; color: var(--sch-muted); margin-top: 2px; }

.sch-form-section {
	margin: 24px 0 12px;
	font-size: 14px;
	font-weight: 700;
	color: var(--sch-ink);
}

.sch-form-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 20px;
}

.sch-hint { font-size: 13px; color: var(--sch-muted); margin: 8px 0 0; }

.sch-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
}

.sch-check input { width: 16px; height: 16px; }

.sch-attendance-filters {
	display: grid;
	grid-template-columns: 1fr 200px;
	gap: 16px;
}

@media (max-width: 575.98px) {
	.sch-attendance-filters { grid-template-columns: 1fr; }
}

.sch-attendance-picks {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.sch-attendance-pick {
	display: inline-flex;
	cursor: pointer;
}

.sch-attendance-pick input { position: absolute; opacity: 0; pointer-events: none; }

.sch-attendance-pick span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 32px;
	padding: 0 8px;
	border: 1px solid var(--sch-border);
	border-radius: 8px;
	font-size: 12px;
	font-weight: 700;
	color: var(--sch-muted);
	background: #fff;
}

.sch-attendance-pick.is-active span,
.sch-attendance-pick input:checked + span {
	background: var(--sch-primary-soft);
	border-color: var(--sch-primary);
	color: var(--sch-primary-dark);
}

.sch-input--sm { padding: 8px 10px; font-size: 13px; }

.sch-hw-item__title { color: inherit; text-decoration: none; font-weight: 600; }
.sch-hw-item__meta { font-size: 12px; color: var(--sch-muted); }

.sch-muted { color: var(--sch-muted); }

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

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

.sch-table th,
.sch-table td {
	padding: 12px 14px;
	text-align: left;
	border-bottom: 1px solid var(--sch-border);
}

.sch-table th {
	font-weight: 600;
	color: var(--sch-muted);
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.sch-form-group {
	margin-bottom: 16px;
}

.sch-form-group label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--sch-ink);
}

.sch-input,
.sch-select,
.sch-textarea {
	width: 100%;
	padding: 11px 14px;
	border: 1px solid var(--sch-border);
	border-radius: 10px;
	font-size: 14px;
	background: #fff;
	color: var(--sch-ink);
}

.sch-textarea {
	min-height: 100px;
	resize: vertical;
}

.sch-input:focus,
.sch-select:focus,
.sch-textarea:focus {
	outline: none;
	border-color: var(--sch-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sch-landing {
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 20px 80px;
}

.sch-hero {
	text-align: center;
	padding: 48px 0 64px;
}

.sch-hero__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 14px;
	background: var(--sch-primary-soft);
	color: var(--sch-primary-dark);
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 20px;
}

.sch-hero h1 {
	font-size: clamp(2rem, 5vw, 3.25rem);
	font-weight: 800;
	line-height: 1.1;
	margin: 0 0 16px;
	letter-spacing: -0.03em;
}

.sch-hero h1 span {
	background: linear-gradient(135deg, var(--sch-primary), var(--sch-accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.sch-hero p {
	font-size: 1.125rem;
	color: var(--sch-muted);
	max-width: 560px;
	margin: 0 auto 32px;
	line-height: 1.6;
}

.sch-hero__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
}

.sch-features {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	margin-top: 48px;
}

@media (min-width: 768px) {
	.sch-features {
		grid-template-columns: repeat(3, 1fr);
	}
}

.sch-feature {
	padding: 28px;
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	text-align: left;
}

.sch-feature i {
	font-size: 28px;
	color: var(--sch-primary);
	margin-bottom: 14px;
	display: block;
}

.sch-feature h3 {
	font-size: 1.1rem;
	margin: 0 0 8px;
}

.sch-feature p {
	font-size: 14px;
	color: var(--sch-muted);
	margin: 0;
	line-height: 1.5;
}

.sch-auth-wrap {
	max-width: 640px;
	margin: 0 auto;
	padding: 0 16px;
}

.sch-auth-wrap .sch-loader,
.sch-auth-wrap #error_div {
	margin-bottom: 12px;
}

.sch-auth__card {
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 32px 28px;
	box-shadow: var(--sch-shadow);
}

.sch-auth__card h2 {
	margin: 0 0 8px;
	font-size: 1.65rem;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.sch-auth__sub {
	color: var(--sch-muted);
	font-size: 14px;
	line-height: 1.55;
	margin: 0 0 24px;
}

.sch-auth .sch-form-group label,
.sch-auth .ob-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: var(--sch-ink);
	margin-bottom: 8px;
	text-transform: none;
	letter-spacing: normal;
}

.sch-auth .ob-pin-boxes .boxes {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
}

.sch-auth .ob-pin-boxes .box {
	flex: 1 1 0;
	min-width: 0;
	max-width: 52px;
	height: 52px;
	border-radius: 12px;
	border: 1px solid var(--sch-border);
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.sch-auth .ob-pin-boxes .box:focus-within {
	border-color: var(--sch-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sch-auth .ob-pin-boxes .box input {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	outline: none;
	color: var(--sch-ink);
	padding: 0;
}

.sch-auth__foot {
	text-align: center;
	margin-top: 20px;
	font-size: 14px;
	color: var(--sch-muted);
}

.sch-auth__foot a {
	color: var(--sch-primary);
	font-weight: 600;
}

.sch-phone-row {
	display: flex;
	gap: 8px;
}

.sch-phone-row select {
	width: 118px;
	flex-shrink: 0;
}

.sch-timetable-grid {
	display: grid;
	gap: 8px;
	overflow-x: auto;
}

.sch-timetable-day {
	background: var(--sch-primary-soft);
	padding: 8px 12px;
	border-radius: 8px;
	font-weight: 600;
	font-size: 13px;
}

.sch-slot {
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: 10px;
	padding: 12px;
	margin-bottom: 8px;
}

.sch-slot__time {
	font-size: 12px;
	color: var(--sch-muted);
}

.sch-slot__subject {
	font-weight: 600;
	font-size: 14px;
	margin-top: 4px;
}

.sch-hw-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-hw-item:last-child {
	border-bottom: none;
}

.sch-hw-item__due {
	font-size: 12px;
	color: var(--sch-warn);
	font-weight: 600;
	white-space: nowrap;
}

.sch-panel--table {
	padding: 0;
	overflow: hidden;
}

.sch-panel--table .sch-table th,
.sch-panel--table .sch-table td {
	padding: 14px 22px;
}

.sch-panel--table .sch-empty {
	padding: 56px 24px;
}

.sch-hw-item__title {
	color: inherit;
	text-decoration: none;
	font-weight: 600;
	font-size: 15px;
}

.sch-hw-item__title:hover {
	color: var(--sch-primary);
}

.sch-hw-item__meta {
	font-size: 13px;
	color: var(--sch-muted);
	margin-top: 4px;
}

.sch-hw-item__desc {
	font-size: 13px;
	margin: 6px 0 0;
	color: var(--sch-muted);
}

.sch-empty {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 40px 20px;
	gap: 12px;
	color: var(--sch-muted);
}

.sch-empty__icon {
	width: 64px;
	height: 64px;
	border-radius: 16px;
	background: var(--sch-primary-soft);
	color: var(--sch-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
}

.sch-empty__text {
	margin: 0;
	font-size: 15px;
	color: var(--sch-muted);
}

.sch-empty i {
	font-size: 40px;
	opacity: 0.4;
	display: block;
	margin-bottom: 0;
}

.sch-import-zone {
	border: 2px dashed var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 48px 24px;
	text-align: center;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
	background: #fff;
}

.sch-import-zone i {
	font-size: 40px;
	color: var(--sch-primary);
	display: block;
	margin-bottom: 12px;
}

.sch-import-zone__title {
	margin: 0 0 4px;
	font-weight: 600;
	font-size: 15px;
}

.sch-import-zone__sub {
	font-size: 13px;
	color: var(--sch-muted);
	margin: 0;
}

.sch-import-zone:hover,
.sch-import-zone.is-dragover,
.sch-import-zone:focus {
	border-color: var(--sch-primary);
	background: var(--sch-primary-soft);
	outline: none;
}

.sch-import-pins,
.sch-import-errors {
	margin: 8px 0 0;
	padding-left: 20px;
	font-size: 13px;
}

.sch-import-errors li {
	color: var(--sch-danger);
}

.sch-loader {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 16px;
	background: var(--sch-primary-soft);
	border-radius: 10px;
	margin-bottom: 16px;
	font-size: 14px;
	color: var(--sch-primary-dark);
	font-weight: 500;
}

.sch-loader__spin {
	width: 18px;
	height: 18px;
	border: 2px solid var(--sch-primary-soft);
	border-top-color: var(--sch-primary);
	border-radius: 50%;
	animation: sch-spin 0.7s linear infinite;
}

@keyframes sch-spin {
	to { transform: rotate(360deg); }
}

/* Legacy page title aliases (inner forms) */
.sch-page-title {
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	font-weight: 700;
	margin: 0 0 6px;
}

.sch-page-sub {
	color: var(--sch-muted);
	margin: 0 0 20px;
	font-size: 14px;
}

.sch-card {
	transition: box-shadow 0.15s ease;
}

.sch-card:hover {
	box-shadow: 0 8px 30px rgba(99, 102, 241, 0.1);
}

.sch-table tbody tr:hover {
	background: #fafbff;
}

.sch-empty {
	padding: 48px 24px;
}

.sch-empty i {
	font-size: 48px;
}

.sch-alert {
	padding: 14px 16px;
	border-radius: 10px;
	font-size: 14px;
	margin-bottom: 20px;
}

.sch-alert--info {
	background: var(--sch-primary-soft);
	color: var(--sch-primary-dark);
}

.sch-alert--success {
	background: #ECFDF5;
	color: #065F46;
	border: 1px solid #A7F3D0;
}

.sch-alert--warn {
	background: #FEF3C7;
	color: #92400E;
}

.sch-toolbar {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px 16px;
	margin-bottom: 20px;
	max-width: 1200px;
}

.sch-toolbar .sch-btn {
	flex-shrink: 0;
}

.sch-list-link,
.sch-link {
	color: var(--sch-primary);
	text-decoration: none;
	font-size: 13px;
	font-weight: 600;
}

.sch-link:hover,
.sch-list-link:hover {
	text-decoration: underline;
}

.sch-dash-stats {
	margin-bottom: 24px;
}

.sch-stat-card {
	display: block;
	text-decoration: none;
	color: inherit;
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	padding: 20px;
	text-align: center;
	box-shadow: var(--sch-shadow);
	transition: transform 0.15s, border-color 0.15s;
}

.sch-stat-card:hover {
	transform: translateY(-2px);
	border-color: var(--sch-primary);
	color: inherit;
}

.sch-action-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
}

.sch-action-tile {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 16px 12px;
	border-radius: 12px;
	border: 1px solid var(--sch-border);
	background: #fff;
	text-decoration: none;
	color: var(--sch-ink);
	font-size: 13px;
	font-weight: 600;
	transition: background 0.15s, border-color 0.15s;
}

.sch-action-tile i {
	font-size: 22px;
	color: var(--sch-primary);
}

.sch-action-tile:hover {
	background: var(--sch-primary-soft);
	border-color: var(--sch-primary);
	color: var(--sch-primary-dark);
}

.sch-action-tile--primary {
	background: var(--sch-primary);
	border-color: var(--sch-primary);
	color: #fff;
}

.sch-action-tile--primary i {
	color: #fff;
}

.sch-action-tile--primary:hover {
	background: var(--sch-primary-dark);
	color: #fff;
}

.sch-dl {
	margin: 0;
	display: grid;
	gap: 10px;
}

.sch-dl dt {
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	color: var(--sch-muted);
}

.sch-dl dd {
	margin: 0 0 4px;
	font-size: 14px;
}

.sch-list-item {
	padding: 12px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-list-item p {
	font-size: 13px;
	color: var(--sch-muted);
	margin: 4px 0 0;
}

.sch-card__title i {
	margin-right: 6px;
	color: var(--sch-primary);
	font-size: 18px;
	vertical-align: -2px;
}

.sch-dash-stats .sch-card {
	border: none;
	background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
}
/* 6-digit PIN boxes */
.sch-form-group .ob-label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 6px;
	color: var(--sch-ink);
	text-transform: none;
	letter-spacing: normal;
}

.sch-pin-wrap {
	margin-bottom: 16px;
}

.sch-pin-wrap .ob-pin-boxes .boxes {
	display: flex;
	gap: 8px;
	flex-wrap: nowrap;
	justify-content: flex-start;
	margin-bottom: 6px;
}

.sch-pin-wrap .ob-pin-boxes .box {
	flex: 0 0 44px;
	width: 44px;
	height: 48px;
	border-radius: 10px;
	border: 1px solid var(--sch-border);
	background: #fff;
	box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
	transition: border-color 0.15s, box-shadow 0.15s;
}

.sch-pin-wrap .ob-pin-boxes .box:focus-within {
	border-color: var(--sch-primary);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.sch-pin-wrap .ob-pin-boxes .box input {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	text-align: center;
	font-size: 20px;
	font-weight: 700;
	outline: none;
	color: var(--sch-ink);
	padding: 0;
	-moz-appearance: textfield;
}

.sch-pin-wrap .ob-pin-boxes .box input::-webkit-outer-spin-button,
.sch-pin-wrap .ob-pin-boxes .box input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.sch-pin-wrap .pin-hint {
	font-size: 12px;
	color: var(--sch-muted);
	margin: 4px 0 0;
}

@media (max-width: 400px) {
	.sch-pin-wrap .ob-pin-boxes .boxes {
		gap: 6px;
	}
	.sch-pin-wrap .ob-pin-boxes .box {
		flex: 1 1 0;
		min-width: 0;
		max-width: 48px;
		height: 44px;
	}
	.sch-pin-wrap .ob-pin-boxes .box input {
		font-size: 18px;
	}
}

/* Toast notifications (ajax forms) */
.ynaps-toast-container {
	position: fixed;
	left: 50%;
	bottom: calc(24px + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	z-index: 10050;
	display: flex;
	flex-direction: column-reverse;
	gap: 10px;
	width: min(92vw, 380px);
	pointer-events: none;
}

.ynaps-toast {
	pointer-events: auto;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 14px 16px;
	border-radius: 12px;
	background: #0F172A;
	color: #fff;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.25);
	font-size: 14px;
	line-height: 1.4;
}

.ynaps-toast__title {
	font-weight: 700;
	margin-bottom: 2px;
}

.ynaps-toast__text {
	opacity: 0.9;
	font-size: 13px;
}

.ynaps-toast__close {
	margin-left: auto;
	background: none;
	border: none;
	color: #fff;
	opacity: 0.7;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	padding: 0;
}

/* Exams & AI tools */
.sch-page--exam {
	position: relative;
}

.sch-exam-timer {
	position: sticky;
	top: 12px;
	z-index: 20;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 16px;
	margin-bottom: 16px;
	border-radius: 999px;
	background: #0F172A;
	color: #fff;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	box-shadow: 0 8px 24px rgba(15, 23, 42, 0.2);
}

.sch-exam-questions {
	display: flex;
	flex-direction: column;
	gap: 16px;
	margin: 16px 0 24px;
}

.sch-exam-q {
	padding: 16px;
	border: 1px solid var(--sch-border);
	border-radius: 12px;
	background: #fff;
}

.sch-exam-q__head {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.sch-exam-q-card__title {
	margin: 0 0 12px;
	font-size: 1rem;
}

.sch-mcq-options {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 12px;
}

.sch-mcq-option {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px 14px;
	border: 1px solid var(--sch-border);
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.sch-mcq-option:hover {
	border-color: var(--sch-primary);
	background: rgba(99, 102, 241, 0.04);
}

.sch-mcq-option input {
	margin-top: 3px;
	flex-shrink: 0;
}

.sch-exam-review {
	padding: 16px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-exam-review:last-child {
	border-bottom: none;
}

.sch-exam-review__head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 8px;
}

.sch-badge--bad {
	background: rgba(239, 68, 68, 0.12);
	color: #DC2626;
}

.sch-badge--info {
	background: rgba(99, 102, 241, 0.12);
	color: var(--sch-primary);
}

.sch-ai-explain {
	margin-top: 10px;
	padding: 12px;
	border-radius: 10px;
	background: rgba(99, 102, 241, 0.06);
	border: 1px solid rgba(99, 102, 241, 0.15);
	white-space: pre-wrap;
}

.sch-study-bars {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.sch-study-bar__head {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	font-size: 13px;
	margin-bottom: 6px;
}

.sch-study-bar__track {
	height: 10px;
	border-radius: 999px;
	background: var(--sch-border);
	overflow: hidden;
}

.sch-study-bar__fill {
	height: 100%;
	border-radius: 999px;
	transition: width 0.4s ease;
}

.sch-study-bar__fill--good { background: #22C55E; }
.sch-study-bar__fill--mid { background: #F59E0B; }
.sch-study-bar__fill--low { background: #EF4444; }

.sch-doc-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 16px;
}

.sch-doc-card {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 18px;
	border: 1px solid var(--sch-border);
	border-radius: 14px;
	background: #fff;
}

.sch-doc-card__icon {
	width: 44px;
	height: 44px;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(99, 102, 241, 0.1);
	color: var(--sch-primary);
	font-size: 20px;
}

.sch-doc-card__body h3 {
	margin: 0 0 4px;
	font-size: 1rem;
}

.sch-doc-card__actions {
	display: flex;
	gap: 8px;
	margin-top: auto;
}

.sch-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sch-list__item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	padding: 12px 0;
	border-bottom: 1px solid var(--sch-border);
}

.sch-list__item:last-child {
	border-bottom: none;
}

.sch-list__meta {
	display: flex;
	align-items: center;
	gap: 10px;
}

.sch-split {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

@media (max-width: 640px) {
	.sch-split {
		grid-template-columns: 1fr;
	}
}
