/**
 * 学生成绩管理系统 — 前台专用样式（与主题解耦，不依赖主题外观）
 * 作用域：.sgm-public 及其子元素
 */

.sgm-public {
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
	font-size: 16px;
	line-height: 1.55;
	color: #1d2327;
	max-width: 960px;
	margin-left: auto !important;
	margin-right: auto !important;
	box-sizing: border-box;
}

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

.sgm-public.sgm-login,
.sgm-public.sgm-report {
	background: #ffffff;
	box-sizing: border-box;
}

/* 成绩单区：与登录页一致，无圆角外框卡片 */
.sgm-public.sgm-report {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	max-width: 100% !important;
	width: 100% !important;
	min-width: 0;
}

/* 登录区：无外框圆角，不与主题「卡片」抢视觉；整体居中，仅标签文字在栏内左对齐 */
.sgm-public.sgm-login {
	border: 0;
	border-radius: 0;
	box-shadow: none;
	text-align: center;
}

.sgm-public.sgm-login > .sgm-alert {
	text-align: center;
}

/* ---------- 登录 ---------- */

/* 每项：固定宽度栏在页面中居中，标签与输入在栏内左对齐 */
.sgm-public .sgm-login-field {
	max-width: 300px;
	width: 100%;
	margin-left: auto !important;
	margin-right: auto !important;
	text-align: left;
}

.sgm-public .sgm-login-form {
	margin: 0;
}

.sgm-public .sgm-login-form > p {
	margin: 0 0 1rem;
}

.sgm-public .sgm-login-form label {
	display: inline-block;
	font-size: 1.125rem;
	font-weight: 600;
	color: #1d2327;
	margin-bottom: 0.35rem;
}

.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input[type="text"],
.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input[type="password"] {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0;
	margin: 0;
	padding: 12px 14px;
	font-family: inherit;
	font-size: 1rem;
	line-height: 1.4;
	color: #1d2327;
	background-color: #fff !important;
	background-image: none !important;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	box-shadow: none;
	-webkit-appearance: none;
	appearance: none;
}

.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input[type="text"]:focus,
.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input[type="password"]:focus {
	outline: none;
	border-color: #f8c662 !important;
	box-shadow: 0 0 0 1px #f8c662 !important;
}

.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input.sgm-login-input--error,
.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input.sgm-login-input--error:focus {
	background-color: #fff0f0 !important;
	background-image: none !important;
	border-color: #e4989e !important;
	color: #1d2327 !important;
}

.sgm-public .sgm-login-form .sgm-login-field input.sgm-login-input.sgm-login-input--error:focus {
	border-color: #f8c662 !important;
	box-shadow: 0 0 0 1px #f8c662 !important;
}

.sgm-public .sgm-login-form > p.sgm-login-hint {
	margin: 0.65rem 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #50575e;
	text-align: center;
}

.sgm-public .sgm-login-form > p.sgm-login-submit-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 14px;
	margin: 0;
	text-align: center;
}

.sgm-public .sgm-login-form > p.sgm-login-error-wrap {
	margin: 0.75rem 0 0;
	text-align: center;
}

.sgm-public .sgm-login-form button[type="submit"],
.sgm-public a.sgm-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
	font-weight: 600;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	border: 0;
	border-radius: 4px;
	transition: background-color 0.15s ease, opacity 0.15s ease;
}

.sgm-public .sgm-login-form button[type="submit"] {
	background-color: #f8c662;
	color: #ffffff;
	padding: 25px 50px 23px;
	font-size: 15px;
	min-width: 200px;
	line-height: 1.2;
}

.sgm-public .sgm-login-form button[type="submit"]:hover,
.sgm-public .sgm-login-form button[type="submit"]:focus {
	background-color: #e8b652;
	color: #ffffff;
}

.sgm-public .sgm-login-form button[type="submit"]:focus {
	outline: 2px solid #1d2327;
	outline-offset: 2px;
}

.sgm-public a.sgm-btn {
	background-color: #f8c662;
	color: #ffffff !important;
	padding: 25px 50px 23px;
	font-size: 15px;
	min-width: 200px;
	line-height: 1.2;
}

.sgm-public a.sgm-btn:hover,
.sgm-public a.sgm-btn:focus {
	background-color: #e8b652;
	color: #ffffff !important;
	text-decoration: none !important;
}

.sgm-public a.sgm-btn:focus {
	outline: 2px solid #1d2327;
	outline-offset: 2px;
}

.sgm-public a.sgm-btn.sgm-btn--compact {
	padding: 9px 20px 8px;
	font-size: 14px;
	min-width: 0;
	line-height: 1.25;
}

.sgm-public a.sgm-btn--ghost {
	background-color: transparent;
	color: #1d2327 !important;
	border: 2px solid #f8c662;
	padding: 10px 20px;
	min-width: auto;
	font-size: 14px;
	font-weight: 600;
}

.sgm-public a.sgm-btn--ghost:hover,
.sgm-public a.sgm-btn--ghost:focus {
	background-color: #fff8e7;
	color: #1d2327 !important;
}

.sgm-public .sgm-login-error {
	font-size: 15px;
	font-weight: 600;
	color: #b32d2e;
	text-align: center;
	max-width: 100%;
	line-height: 1.4;
}

.sgm-public .sgm-alert {
	margin: 0 0 1rem;
	padding: 12px 14px;
	border-radius: 4px;
	font-size: 15px;
	text-align: left;
}

.sgm-public .sgm-alert--error {
	background: #fcf0f1;
	border: 1px solid #f0b0b5;
	color: #1d2327;
}

.sgm-public .sgm-alert--center {
	text-align: center;
}

.sgm-public.sgm-login > p:not( .sgm-alert ) {
	margin: 0 0 0.75rem;
	font-size: 16px;
}

/* ---------- 成绩单 ---------- */

.sgm-public.sgm-report .sgm-report-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 0 0 1.25rem;
	padding-bottom: 12px;
	border-bottom: 1px solid #dcdcde;
	font-size: 17px;
	font-weight: 600;
	color: #1d2327;
}

.sgm-public.sgm-report .sgm-report-meta a.sgm-btn {
	flex-shrink: 0;
}

.sgm-public .sgm-table-wrap {
	overflow-x: hidden;
	margin: 0;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0;
	-webkit-overflow-scrolling: touch;
}

.sgm-public table.sgm-table {
	width: 100% !important;
	max-width: 100% !important;
	margin: 0;
	table-layout: fixed;
	border-collapse: collapse;
	font-size: 15px;
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 0;
	overflow: hidden;
}

.sgm-public table.sgm-table th,
.sgm-public table.sgm-table td {
	padding: 12px 14px;
	text-align: center !important;
	vertical-align: middle !important;
	border: 1px solid #dcdcde;
	color: #1d2327;
	background: #fff;
	white-space: normal !important;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.sgm-public table.sgm-table thead th {
	background: #f0f0f1;
	font-weight: 600;
	white-space: normal !important;
}

.sgm-public table.sgm-table tbody tr:nth-child( even ) td {
	background: #fafafa;
}

.sgm-public table.sgm-table tbody tr:hover td {
	background-color: #ececec !important;
}

.sgm-public.sgm-report > p:not( .sgm-report-meta ):not( .sgm-alert ) {
	margin: 0;
	font-size: 15px;
	color: #50575e;
}
