.sch-portal,
.sch-admin {
	--sch-primary: #2563eb;
	--sch-primary-dark: #1d4ed8;
	--sch-accent: #0f766e;
	--sch-success: #16a34a;
	--sch-warning: #d97706;
	--sch-danger: #dc2626;
	--sch-info: #0284c7;
	--sch-bg: #f8fafc;
	--sch-surface: #ffffff;
	--sch-surface-soft: #f1f5f9;
	--sch-border: #d8dee8;
	--sch-text: #111827;
	--sch-muted: #64748b;
	--sch-radius: 8px;
	--sch-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
	color: var(--sch-text);
	font-size: 16px;
	line-height: 1.55;
}

.sch-portal *,
.sch-admin * {
	box-sizing: border-box;
}

.sch-theme-dark {
	--sch-bg: #0f172a;
	--sch-surface: #111827;
	--sch-surface-soft: #1f2937;
	--sch-border: #334155;
	--sch-text: #f8fafc;
	--sch-muted: #cbd5e1;
	--sch-shadow: 0 14px 36px rgba(0, 0, 0, 0.24);
}

.sch-title,
.sch-portal h2,
.sch-admin h1 {
	color: var(--sch-text);
	font-size: 28px;
	font-weight: 750;
	letter-spacing: 0;
	line-height: 1.2;
	margin: 0;
}

.sch-portal h3,
.sch-admin h2 {
	color: var(--sch-text);
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 14px;
}

.sch-subtitle,
.sch-empty,
.sch-card-label {
	color: var(--sch-muted);
}

.sch-subtitle {
	font-size: 15px;
	margin: 0 0 18px;
	max-width: 760px;
}

.sch-layout {
	display: grid;
	gap: 22px;
	grid-template-columns: minmax(190px, 240px) minmax(0, 1fr);
}

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

.sch-page-header {
	align-items: flex-start;
	display: flex;
	justify-content: space-between;
	margin-bottom: 14px;
}

.sch-sidebar {
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	box-shadow: var(--sch-shadow);
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 10px;
	position: sticky;
	top: 24px;
}

.sch-nav-link {
	align-items: center;
	border-radius: calc(var(--sch-radius) - 2px);
	color: var(--sch-text);
	display: flex;
	font-size: 14px;
	font-weight: 650;
	min-height: 40px;
	padding: 9px 11px;
	text-decoration: none;
	transition: background-color 0.18s ease, color 0.18s ease;
}

.sch-nav-link:hover,
.sch-nav-link:focus {
	background: color-mix(in srgb, var(--sch-primary) 10%, transparent);
	color: var(--sch-primary-dark);
	outline: none;
}

.sch-nav-logout {
	border-top: 1px solid var(--sch-border);
	margin-top: 6px;
}

.sch-cards {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(185px, 1fr));
	margin: 18px 0;
}

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

.sch-card {
	padding: 18px;
}

.sch-panel {
	margin: 18px 0;
	padding: 20px;
}

.sch-stat-card {
	color: var(--sch-text);
	display: flex;
	flex-direction: column;
	gap: 10px;
	min-height: 148px;
	position: relative;
	text-decoration: none;
	transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sch-stat-card:hover,
.sch-stat-card:focus {
	border-color: color-mix(in srgb, var(--sch-primary) 38%, var(--sch-border));
	box-shadow: 0 16px 34px rgba(15, 23, 42, 0.12);
	transform: translateY(-2px);
}

.sch-stat-top {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.sch-card-icon,
.sch-file-icon {
	align-items: center;
	background: color-mix(in srgb, var(--sch-primary) 12%, var(--sch-surface));
	border: 1px solid color-mix(in srgb, var(--sch-primary) 22%, var(--sch-border));
	border-radius: calc(var(--sch-radius) - 2px);
	color: var(--sch-primary-dark);
	display: inline-flex;
	font-size: 11px;
	font-weight: 800;
	justify-content: center;
	letter-spacing: 0;
	min-height: 34px;
	min-width: 42px;
	padding: 4px 8px;
}

.sch-card-value {
	color: var(--sch-text);
	display: block;
	font-size: 30px;
	font-weight: 800;
	line-height: 1.1;
}

.sch-card-action {
	color: var(--sch-primary);
	font-size: 13px;
	font-weight: 750;
	margin-top: auto;
	text-decoration: none;
}

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

.sch-form label {
	display: block;
	margin: 0 0 15px;
}

.sch-form label > span,
.sch-form legend {
	color: var(--sch-text);
	display: block;
	font-size: 14px;
	font-weight: 700;
	margin-bottom: 7px;
}

.sch-form em {
	color: var(--sch-danger);
	font-style: normal;
}

.sch-form input[type="text"],
.sch-form input[type="email"],
.sch-form input[type="password"],
.sch-form input[type="number"],
.sch-form input[type="url"],
.sch-form input[type="date"],
.sch-form input[type="datetime-local"],
.sch-form select,
.sch-form textarea {
	background: var(--sch-surface);
	border: 1px solid var(--sch-border);
	border-radius: calc(var(--sch-radius) - 2px);
	color: var(--sch-text);
	min-height: 43px;
	padding: 10px 12px;
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
	width: 100%;
}

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

.sch-form input:focus,
.sch-form select:focus,
.sch-form textarea:focus,
.sch-button:focus,
.sch-card-action:focus,
.sch-table a:focus,
.sch-nav-link:focus {
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sch-primary) 24%, transparent);
	outline: 2px solid transparent;
	outline-offset: 2px;
}

.sch-field-help,
.sch-form .description {
	color: var(--sch-muted);
	display: block;
	font-size: 12px;
	margin-top: 6px;
}

.sch-check {
	align-items: flex-start;
	display: flex !important;
	gap: 9px;
}

.sch-check input {
	margin-top: 4px;
	width: auto !important;
}

.sch-button {
	align-items: center;
	background: var(--sch-primary);
	border: 1px solid var(--sch-primary);
	border-radius: var(--sch-radius);
	color: #ffffff;
	cursor: pointer;
	display: inline-flex;
	font-weight: 750;
	gap: 8px;
	justify-content: center;
	line-height: 1.2;
	min-height: 42px;
	padding: 10px 15px;
	text-decoration: none;
	transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.sch-button:hover,
.sch-button:focus {
	background: var(--sch-primary-dark);
	border-color: var(--sch-primary-dark);
	color: #ffffff;
	transform: translateY(-1px);
}

.sch-button-secondary {
	background: var(--sch-surface);
	color: var(--sch-primary);
}

.sch-button-secondary:hover,
.sch-button-secondary:focus {
	background: color-mix(in srgb, var(--sch-primary) 9%, var(--sch-surface));
	color: var(--sch-primary);
}

.sch-button-small {
	font-size: 13px;
	min-height: 34px;
	padding: 7px 11px;
}

.sch-buttons-pill .sch-button {
	border-radius: 999px;
}

.sch-buttons-square .sch-button {
	border-radius: 4px;
}

.sch-inline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.sch-table-wrap {
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	overflow-x: auto;
}

.sch-table {
	background: var(--sch-surface);
	border-collapse: collapse;
	margin: 0;
	width: 100%;
}

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

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

.sch-table th {
	background: var(--sch-surface-soft);
	color: var(--sch-muted);
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.02em;
	text-transform: uppercase;
}

.sch-badge {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 999px;
	display: inline-flex;
	font-size: 12px;
	font-weight: 800;
	line-height: 1;
	min-height: 24px;
	padding: 5px 10px;
	white-space: nowrap;
}

.sch-badge-primary,
.sch-badge-info {
	background: color-mix(in srgb, var(--sch-info) 12%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-info) 24%, transparent);
	color: #075985;
}

.sch-badge-success {
	background: color-mix(in srgb, var(--sch-success) 12%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-success) 24%, transparent);
	color: #166534;
}

.sch-badge-warning {
	background: color-mix(in srgb, var(--sch-warning) 14%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-warning) 28%, transparent);
	color: #92400e;
}

.sch-badge-danger {
	background: color-mix(in srgb, var(--sch-danger) 12%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-danger) 26%, transparent);
	color: #991b1b;
}

.sch-badge-muted {
	background: var(--sch-surface-soft);
	border-color: var(--sch-border);
	color: var(--sch-muted);
}

.sch-theme-dark .sch-badge-primary,
.sch-theme-dark .sch-badge-info {
	color: #bae6fd;
}

.sch-theme-dark .sch-badge-success {
	color: #bbf7d0;
}

.sch-theme-dark .sch-badge-warning {
	color: #fde68a;
}

.sch-theme-dark .sch-badge-danger {
	color: #fecaca;
}

.sch-theme-dark .sch-badge-muted {
	color: #cbd5e1;
}

.sch-alert {
	align-items: flex-start;
	border: 1px solid var(--sch-border);
	border-radius: var(--sch-radius);
	display: grid;
	gap: 3px;
	margin: 0 0 16px;
	padding: 13px 15px;
}

.sch-alert strong {
	font-size: 13px;
}

.sch-alert span {
	color: var(--sch-text);
}

.sch-alert-success {
	background: color-mix(in srgb, var(--sch-success) 10%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-success) 25%, var(--sch-border));
}

.sch-alert-error {
	background: color-mix(in srgb, var(--sch-danger) 9%, var(--sch-surface));
	border-color: color-mix(in srgb, var(--sch-danger) 24%, var(--sch-border));
}

.sch-empty {
	background: var(--sch-surface-soft);
	border: 1px dashed var(--sch-border);
	border-radius: var(--sch-radius);
	margin: 0;
	padding: 16px;
}

.sch-file-name {
	align-items: center;
	display: inline-flex;
	gap: 8px;
}

.sch-message {
	background: var(--sch-surface-soft);
	border-left: 4px solid var(--sch-border);
	border-radius: var(--sch-radius);
	margin: 12px 0;
	padding: 13px 15px;
}

.sch-message strong {
	color: var(--sch-muted);
	display: block;
	font-size: 13px;
	margin-bottom: 6px;
}

.sch-message-admin {
	border-left-color: var(--sch-primary);
}

.sch-message-client {
	border-left-color: var(--sch-accent);
}

.sch-density-compact .sch-card,
.sch-density-compact .sch-panel {
	padding: 14px;
}

.sch-density-compact .sch-table th,
.sch-density-compact .sch-table td {
	padding: 9px 10px;
}
