/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	background: linear-gradient(180deg, #eef2ff 0%, #f5f7fa 45%, #f5f7fa 100%);
    color: #333;
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* 导航栏 */
.navbar {
	background: #ffffff;
	color: #111827;
	padding: 12px 0;
	box-shadow: 0 6px 18px rgba(15,23,42,0.06);
	border-bottom: 1px solid #e5e7eb;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar-brand a {
	color: #111827;
	text-decoration: none;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: 0.03em;
}

/* 顶部品牌区（教师端） */
.app-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	text-decoration: none;
	color: inherit;
}

.app-brand-mark {
	width: 38px;
	height: 38px;
	border-radius: 12px;
	display: inline-block;
	object-fit: cover;
	background: transparent;
	box-shadow: 0 10px 20px rgba(37, 99, 235, 0.22);
}

.app-brand-text {
	font-size: 18px;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: #111827;
	background: linear-gradient(135deg, #111827 0%, #1d4ed8 60%, #0ea5e9 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.app-brand-sub {
	font-size: 12px;
	color: #6b7280;
	padding: 3px 10px;
	border-radius: 999px;
	border: 1px solid #e5e7eb;
	background: #ffffff;
}

.app-brand:hover .app-brand-mark {
	filter: brightness(0.98);
	box-shadow: 0 12px 24px rgba(37, 99, 235, 0.26);
}

.navbar-menu {
    display: flex;
    gap: 20px;
    align-items: center;
}

.navbar-menu a {
	color: #4b5563;
	text-decoration: none;
	padding: 6px 12px;
	border-radius: 999px;
	font-size: 14px;
	transition: background-color 0.2s, color 0.2s, box-shadow 0.2s;
}

.navbar-menu a:hover {
	background: #eff6ff;
	color: #1d4ed8;
	box-shadow: 0 0 0 1px rgba(37,99,235,0.12);
}

.navbar-user {
    position: relative;
}

/* 头像/用户名点击展开下拉菜单 */
.navbar-user-toggle {
	background: linear-gradient(135deg, #4f46e5, #2563eb);
	border: none;
	color: #ffffff;
	cursor: pointer;
	padding: 8px 18px;
	border-radius: 999px;
	font: inherit;
	font-size: 14px;
	box-shadow: 0 8px 18px rgba(15,23,42,0.28);
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.navbar-user-toggle::before {
	content: '\1F464';
	font-size: 15px;
}

.navbar-user-toggle::after {
	content: '\25BE';
	font-size: 11px;
	opacity: 0.85;
}

.navbar-user-toggle:hover {
	background: linear-gradient(135deg, #4338ca, #1d4ed8);
	box-shadow: 0 10px 22px rgba(30,64,175,0.32);
}

.navbar-user .dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 18px 45px rgba(15,23,42,0.45);
    border-radius: 4px;
    min-width: 150px;
    margin-top: 5px;
    z-index: 1000;
}

/* 打开状态下显示下拉菜单 */
.navbar-user.open .dropdown {
    display: block;
}

.navbar-user .dropdown a {
    display: block;
    color: #333;
    padding: 10px 15px;
}

.navbar-user .dropdown a:hover {
    background: #f5f5f5;
}

/* 消息提示 */
.flash-messages {
	position: fixed;
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 1000;
	max-width: 480px;
	width: calc(100% - 40px);
}

.alert {
	padding: 14px 40px 14px 16px;
	margin-bottom: 10px;
	border-radius: 8px;
	box-shadow: 0 4px 14px rgba(15,23,42,0.25);
	position: relative;
	animation: slideIn 0.25s;
	font-size: 14px;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-warning {
	background: #fef3c7;
	color: #92400e;
	border-left: 4px solid #f59e0b;
}

.alert-warning::before {
	content: '\26A0'; /* ⚠ */
	margin-right: 8px;
	font-size: 16px;
}

.alert-error {
	background: linear-gradient(90deg, #dc2626, #f97316);
	color: #ffffff;
	border-left: none;
}

.alert-error::before {
	content: '\26A0'; /* ⚠ */
	margin-right: 8px;
	font-size: 16px;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
}

/* 主内容 */
.main-content {
    min-height: calc(100vh - 200px);
    padding: 20px 0;
}

/* 页面头部 */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 32px;
    color: #2c3e50;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #ffffff;
	border-radius: 999px;
	box-shadow: 0 8px 18px rgba(37,99,235,0.25);
}

.btn-primary:hover {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	box-shadow: 0 10px 22px rgba(30,64,175,0.30);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
}

 .btn-success {
 	background: linear-gradient(135deg, #16a34a, #22c55e);
 	color: #ffffff;
 	border-radius: 999px;
 	box-shadow: 0 8px 18px rgba(22, 163, 74, 0.22);
 }

 .btn-success:hover {
 	background: linear-gradient(135deg, #15803d, #16a34a);
 	box-shadow: 0 10px 22px rgba(21, 128, 61, 0.26);
 }

 .btn-warning {
 	background: linear-gradient(135deg, #f59e0b, #f97316);
 	color: #ffffff;
 	border-radius: 999px;
 	box-shadow: 0 8px 18px rgba(245, 158, 11, 0.22);
 }

 .btn-warning:hover {
 	background: linear-gradient(135deg, #d97706, #ea580c);
 	box-shadow: 0 10px 22px rgba(217, 119, 6, 0.26);
 }

 .btn-info {
 	background: linear-gradient(135deg, #0ea5e9, #6366f1);
 	color: #ffffff;
 	border-radius: 999px;
 	box-shadow: 0 8px 18px rgba(14, 165, 233, 0.18);
 }

 .btn-info:hover {
 	background: linear-gradient(135deg, #0284c7, #4f46e5);
 	box-shadow: 0 10px 22px rgba(2, 132, 199, 0.22);
 }

 .btn-outline-primary {
 	background: #ffffff;
 	color: #1d4ed8;
 	border: 1px solid rgba(29, 78, 216, 0.28);
 	border-radius: 999px;
 	box-shadow: 0 10px 22px rgba(29, 78, 216, 0.08);
 }

 .btn-outline-primary:hover {
 	background: rgba(29, 78, 216, 0.06);
 	box-shadow: 0 12px 26px rgba(29, 78, 216, 0.12);
 }

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-block {
    display: block;
    width: 100%;
}

.btn-icon {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 5px;
}

/* 表单 */
.form-container {
    max-width: 600px;
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #3498db;
}

.form-group.checkbox label {
    display: flex;
    align-items: center;
    gap: 8px;
}

.form-group.checkbox input {
    width: auto;
}

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

/* 认证页面 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.auth-container--teacher {
	min-height: calc(100vh - 160px);
}

.auth-container--student {
	min-height: calc(100vh - 160px);
}

.auth-shell {
	width: 100%;
	max-width: 980px;
	padding: 24px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box--teacher {
	max-width: 460px;
	margin: 0 auto;
	border-radius: 18px;
	border: 1px solid rgba(229, 231, 235, 0.85);
	box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
	padding: 34px 34px 30px;
	position: relative;
	overflow: hidden;
}

.auth-box--student {
	max-width: 460px;
	margin: 0 auto;
	border-radius: 18px;
	border: 1px solid rgba(229, 231, 235, 0.85);
	box-shadow: 0 18px 55px rgba(15, 23, 42, 0.12);
	padding: 34px 34px 30px;
	position: relative;
	overflow: hidden;
}

.auth-box--teacher::before {
	content: '';
	position: absolute;
	top: -160px;
	right: -160px;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle at 30% 30%, rgba(99, 102, 241, 0.45), rgba(37, 99, 235, 0.0) 62%);
	pointer-events: none;
}

.auth-box--teacher::after {
	content: '';
	position: absolute;
	bottom: -180px;
	left: -180px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle at 60% 50%, rgba(14, 165, 233, 0.35), rgba(14, 165, 233, 0.0) 60%);
	pointer-events: none;
}

.auth-box--student::before {
	content: '';
	position: absolute;
	top: -160px;
	right: -160px;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle at 30% 30%, rgba(16, 185, 129, 0.34), rgba(16, 185, 129, 0.0) 62%);
	pointer-events: none;
}

.auth-box--student::after {
	content: '';
	position: absolute;
	bottom: -180px;
	left: -180px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle at 60% 50%, rgba(56, 189, 248, 0.28), rgba(56, 189, 248, 0.0) 60%);
	pointer-events: none;
}

.auth-logo {
    text-align: center;
    margin-bottom: 12px;
}

/* 教师登录页品牌区 */
.auth-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 18px;
	position: relative;
	z-index: 1;
}

.auth-brand-mark {
	width: 44px;
	height: 44px;
	border-radius: 14px;
	display: inline-block;
	object-fit: cover;
	background: transparent;
	box-shadow: 0 12px 26px rgba(37, 99, 235, 0.22);
}

.auth-brand-mark--student {
	box-shadow: 0 12px 26px rgba(16, 185, 129, 0.20);
}

.auth-brand-name {
	font-size: 20px;
	font-weight: 800;
	letter-spacing: 0.01em;
	color: #111827;
	background: linear-gradient(135deg, #111827 0%, #1d4ed8 60%, #0ea5e9 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.auth-brand-sub {
	font-size: 12px;
	color: #6b7280;
	margin-top: 2px;
}

.auth-title {
	margin-bottom: 20px;
	position: relative;
	z-index: 1;
}

.auth-title h1 {
	font-size: 24px;
	margin-bottom: 6px;
	color: #0f172a;
}

.auth-title p {
	font-size: 13px;
	color: #64748b;
}

.auth-form {
	position: relative;
	z-index: 1;
}

.form-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
}

.input-wrap {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	background: rgba(248, 250, 252, 0.85);
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.input-wrap:focus-within {
	border-color: rgba(37, 99, 235, 0.65);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
	background: #ffffff;
}

.input-icon {
	width: 22px;
	text-align: center;
	font-size: 16px;
	opacity: 0.85;
}

.input-wrap input {
	border: none !important;
	padding: 0 !important;
	background: transparent !important;
	outline: none !important;
	font-size: 14px;
}

.input-action {
	border: none;
	background: rgba(37, 99, 235, 0.10);
	color: #1d4ed8;
	padding: 6px 10px;
	border-radius: 10px;
	font-size: 12px;
	cursor: pointer;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.input-action:hover {
	background: rgba(37, 99, 235, 0.16);
	transform: translateY(-1px);
}

.auth-divider {
	margin: 18px 0 12px;
	position: relative;
	text-align: center;
	color: #9ca3af;
	font-size: 12px;
	position: relative;
	z-index: 1;
}

.auth-divider::before {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	top: 50%;
	height: 1px;
	background: #e5e7eb;
}

.auth-divider span {
	position: relative;
	padding: 0 10px;
	background: #ffffff;
}

.auth-links--stack {
	margin-top: 0;
	position: relative;
	z-index: 1;
}

.auth-links--stack p {
	font-size: 13px;
	color: #6b7280;
	margin: 6px 0;
}

.auth-links--stack a {
	color: #2563eb;
	font-weight: 600;
}

.auth-logo-main {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
}

.auth-logo-sub {
    font-size: 13px;
    color: #6b7280;
    margin-top: 4px;
    letter-spacing: 0.12em;
}

.auth-box h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
}

.auth-links {
    text-align: center;
    margin-top: 20px;
}

.auth-links a {
    color: #3498db;
    text-decoration: none;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 表格卡片 */
.table-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.table-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    /* 允许下拉菜单超出卡片区域显示，否则菜单会被裁剪 */
    overflow: visible;
    transition: transform 0.3s, box-shadow 0.3s;
}

.table-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.table-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
}

.table-card-header h3 {
    font-size: 18px;
    color: #2c3e50;
    margin: 0;
}

.table-card-actions {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border-radius: 4px;
    min-width: 120px;
    z-index: 100;
}

.dropdown-menu a,
.dropdown-menu button {
    display: block;
    width: 100%;
    padding: 10px 15px;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    color: #333;
    text-decoration: none;
}

.dropdown-menu a:hover,
.dropdown-menu button:hover {
    background: #f5f5f5;
}

.dropdown-item.danger {
    color: #e74c3c;
}

.table-card-body {
    padding: 15px;
}

.table-description {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.table-meta {
    display: flex;
    gap: 15px;
    font-size: 12px;
    color: #999;
}

.table-card-footer {
    padding: 15px;
    border-top: 1px solid #eee;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.empty-state h2 {
    color: #666;
    margin-bottom: 10px;
}

.empty-state p {
    color: #999;
    margin-bottom: 20px;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 30px;
}

.page-info {
    color: #666;
}

/* 数据表格 */
.data-table {
    width: 100%;
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.data-table th,
.data-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

 .table-scroll {
 	width: 100%;
 	overflow-x: auto;
 	-webkit-overflow-scrolling: touch;
 }

 .table-scroll table {
 	min-width: 860px;
 }

/* 徽章 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.badge-success {
    background: #d4edda;
    color: #155724;
}

.badge-danger {
    background: #f8d7da;
    color: #721c24;
}

/* 管理后台 */
.admin-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 2px solid #eee;
}

.admin-nav a {
    padding: 10px 20px;
    text-decoration: none;
    color: #666;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
}

.admin-nav a.active,
.admin-nav a:hover {
    color: #3498db;
    border-bottom-color: #3498db;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    text-align: center;
}

.stat-icon {
    font-size: 48px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 14px;
}

.admin-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.admin-section h2 {
    margin-bottom: 15px;
    color: #2c3e50;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.empty-icon {
    font-size: 80px;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 16px;
    color: #666;
    margin-bottom: 30px;
}

.empty-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.empty-actions .btn {
    min-width: 200px;
}

.empty-hint {
    font-size: 14px;
    color: #999;
    margin-top: 20px;
}

.empty-hint code {
    background: #f5f5f5;
    padding: 5px 10px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 13px;
    display: inline-block;
    margin-top: 5px;
}

/* 个人资料 */
.profile-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
}

.profile-info,
.profile-actions {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.profile-info h2,
.profile-actions h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.info-item {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.info-item label {
    width: 120px;
    font-weight: 500;
    color: #666;
}

.info-item div {
    flex: 1;
    color: #333;
}

/* 模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-content {
    background: white;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-content--modern {
	border-radius: 18px;
	border: 1px solid rgba(226, 232, 240, 0.9);
	box-shadow: 0 26px 70px rgba(2, 6, 23, 0.38);
	overflow: hidden;
	animation: modal-pop 0.18s ease-out;
}

@keyframes modal-pop {
	from { transform: translateY(8px) scale(0.98); opacity: 0.0; }
	to { transform: translateY(0) scale(1); opacity: 1.0; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #eee;
}

.modal-header--modern {
	padding: 18px 20px;
	border-bottom: 1px solid rgba(226, 232, 240, 0.9);
	background: linear-gradient(180deg, rgba(239, 246, 255, 0.95) 0%, rgba(255, 255, 255, 1) 100%);
}

.modal-title {
	font-size: 16px;
	font-weight: 800;
	color: #0f172a;
}

.modal-subtitle {
	font-size: 12px;
	color: #64748b;
	margin-top: 4px;
}

.modal-close {
	border: none;
	background: rgba(15, 23, 42, 0.06);
	color: #334155;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	cursor: pointer;
	font-size: 20px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background-color 0.2s ease, transform 0.2s ease;
}

.modal-close:hover {
	background: rgba(15, 23, 42, 0.10);
	transform: translateY(-1px);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

.modal-footer--modern {
	padding: 16px 20px;
	border-top: 1px solid rgba(226, 232, 240, 0.9);
	background: rgba(248, 250, 252, 0.9);
}

.modal-textarea {
	width: 100%;
	min-height: 140px;
	padding: 10px 12px;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
	resize: vertical;
	font-size: 14px;
	background: rgba(248, 250, 252, 0.85);
	transition: box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.modal-textarea:focus {
	outline: none;
	border-color: rgba(37, 99, 235, 0.65);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14);
	background: #ffffff;
}


/* 页脚 */
.footer {
	background: transparent;
	color: #9ca3af;
	text-align: center;
	padding: 24px 0 28px;
	margin-top: 40px;
	border-top: 1px solid #e5e7eb;
	font-size: 13px;
}
/* 学生端上传作业页面 */
.student-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 30px 0 10px;
}

.student-room-header {
    margin-bottom: 20px;
}

.student-room-label {
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: #999;
}

.student-room-code {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-top: 4px;
}

.student-room-desc {
    font-size: 14px;
    color: #777;
    margin-top: 8px;
}

.student-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.06);
    padding: 24px 28px;
}

.student-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 20px;
}

.student-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #3498db;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 20px;
}

.student-card-header-text .student-greeting {
    font-size: 18px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.student-card-header-text .student-assignment {
    font-size: 14px;
    color: #666;
}

.student-card-header-actions {
    margin-left: auto;
}

.student-card-header-actions .btn {
    border-radius: 999px;
    font-size: 13px;
    padding: 6px 14px;
}

.student-wrongbook-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    background: #ffffff;
    color: #065f46;
    text-decoration: none;
    font-size: 13px;
    box-shadow: 0 6px 14px rgba(16, 185, 129, 0.18);
    border: 1px solid #10b981;
}

.student-wrongbook-btn:hover {
    background: #ecfdf5;
    box-shadow: 0 10px 22px rgba(4, 120, 87, 0.28);
}

.student-wrongbook-icon {
    font-size: 18px;
}

.student-wrongbook-text {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.student-wrongbook-title {
    font-weight: 600;
}

.student-wrongbook-subtitle {
    font-size: 11px;
    opacity: 0.9;
}

.student-card-body {
    border-top: 1px solid #f0f0f0;
    padding-top: 16px;
}

/* 学生端：作业选择卡片高亮状态 */
.student-page .dashboard-grid .table-card {
	border: 2px solid transparent;
	cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.student-page .dashboard-grid .table-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.18);
    transform: translateY(-3px);
}

.student-page .dashboard-grid .table-card:active {
    border-color: #1d4ed8;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.25);
    	transform: translateY(-1px);
}

.student-page .dashboard-grid .table-card .table-card-footer .btn-primary {
	width: 100%;
	border-radius: 999px;
	padding: 10px 18px;
	font-size: 14px;
	font-weight: 500;
	background: linear-gradient(90deg, #3b82f6, #2563eb);
	box-shadow: 0 10px 22px rgba(37,99,235,0.25);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
}

.student-page .dashboard-grid .table-card .table-card-footer .btn-primary::before {
	content: '\1F4E4';
	font-size: 16px;
}

.student-page .dashboard-grid .table-card .table-card-footer .btn-primary:hover {
	background: linear-gradient(90deg, #2563eb, #1d4ed8);
	box-shadow: 0 12px 26px rgba(30,64,175,0.28);
	transform: translateY(-1px);
}

.student-page .dashboard-grid .table-card .table-card-footer .btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 6px 14px rgba(30,64,175,0.25);
}

.student-hint {
    font-size: 13px;
    color: #888;
    margin-bottom: 16px;
}

.student-upload-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.student-upload-dropzone {
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    padding: 16px 18px;
    text-align: center;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.2s;
}

.student-upload-dropzone:hover {
    border-color: #3498db;
    background: #eef6ff;
}

.student-upload-dropzone .upload-title {
    display: block;
    font-size: 14px;
    color: #2c3e50;
    margin-bottom: 4px;
}

.student-upload-dropzone .upload-subtitle {
    display: block;
    font-size: 12px;
    color: #888;
}

.student-upload-dropzone input[type="file"] {
    display: none;
}

.student-upload-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 4px;
}

.student-upload-tip {
    font-size: 12px;
    color: #999;
}

.student-preview {
    margin-top: 10px;
}

.student-preview-title {
    font-size: 13px;
    color: #666;
    margin-bottom: 6px;
}

.student-preview-image {
    max-width: 100%;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.student-preview-placeholder {
    font-size: 12px;
    color: #999;
}

/* 响应式 */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 15px;
    }

    .navbar-menu {
        flex-wrap: wrap;
        justify-content: center;
    }

    .app-brand-sub {
        display: none;
    }

    .table-grid {
        grid-template-columns: 1fr;
    }

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

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .container {
        /* 默认移动端容器留白 */
        padding: 16px 12px;
    }

    .page-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .page-header h1 {
        font-size: 24px;
    }

    .form-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn {
        width: 100%;
        text-align: center;
    }

    .main-content .viewer-container {
        padding: 16px 12px;
    }

    .main-content .viewer-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .main-content .viewer-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .main-content .viewer-actions .btn {
        width: 100%;
        text-align: center;
    }

    .main-content .editor-header {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .main-content .editor-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .main-content .editor-actions .btn {
        width: 100%;
        text-align: center;
    }

    .student-page {
        /* 学生端页面在手机上额外增加左右内边距，避免文字贴着屏幕边缘 */
        padding: 20px 24px 12px;
    }

    .student-room-code {
        font-size: 20px;
    }

    .student-card {
        padding: 16px 12px;
    }

    .student-card-header {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }

    .student-avatar {
        width: 40px;
        height: 40px;
        font-size: 18px;
    }

    .student-card-header-actions {
        margin-left: 0;
        width: 100%;
    }

    .student-card-header-actions .btn {
        margin-top: 4px;
    }

    .student-wrongbook-btn {
        margin-top: 4px;
        width: 100%;
        justify-content: center;
    }

    .dashboard-grid,
    .table-grid {
        grid-template-columns: 1fr;
    }

    .student-upload-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .student-upload-actions .btn {
        width: 100%;
        text-align: center;
    }

    .contact-float-btn {
        right: 16px;
        bottom: 20px;
        padding: 8px 14px 8px 12px;
        font-size: 12px;
        box-shadow: 0 10px 25px rgba(15,23,42,0.4);
    }

    .contact-popover {
        right: 12px;
        bottom: 88px;
    }

    .auth-shell {
        padding: 16px 12px;
    }

    .auth-box--teacher {
        padding: 22px 18px 18px;
        border-radius: 14px;
    }

    .auth-box--student {
        padding: 22px 18px 18px;
        border-radius: 14px;
    }
}

 .app-modal {
     position: fixed;
     inset: 0;
     display: none;
     align-items: center;
     justify-content: center;
     z-index: 2000;
     padding: 18px;
 }

 .app-modal.is-open {
     display: flex;
 }

 .app-modal-backdrop {
     position: absolute;
     inset: 0;
     background: radial-gradient(1200px circle at 50% 25%, rgba(15, 23, 42, 0.52), rgba(15, 23, 42, 0.78));
     backdrop-filter: blur(7px) saturate(1.2);
 }

 .app-modal-dialog {
     position: relative;
     width: 100%;
     max-width: 520px;
     max-height: calc(100vh - 36px);
     display: flex;
     align-items: stretch;
 }

 .app-modal-card {
     width: 100%;
     background: #ffffff;
     border-radius: 18px;
     border: 1px solid rgba(15, 23, 42, 0.08);
     border-top: 4px solid rgba(59, 130, 246, 0.55);
     box-shadow: 0 34px 110px rgba(2, 6, 23, 0.45);
     overflow: hidden;
     transform: translateY(12px) scale(0.985);
     opacity: 0;
     animation: appModalIn 200ms cubic-bezier(0.2, 0.9, 0.2, 1) forwards;
 }

 .app-modal[data-app-variant="info"] .app-modal-card {
     border-top-color: rgba(59, 130, 246, 0.60);
 }

 .app-modal[data-app-variant="success"] .app-modal-card {
     border-top-color: rgba(16, 185, 129, 0.65);
 }

 .app-modal[data-app-variant="danger"] .app-modal-card {
     border-top-color: rgba(239, 68, 68, 0.70);
 }

 @keyframes appModalIn {
     to {
         transform: translateY(0) scale(1);
         opacity: 1;
     }
 }

 .app-modal-header {
     display: flex;
     align-items: center;
     gap: 12px;
     padding: 18px 22px;
     background: linear-gradient(180deg, rgba(248, 250, 252, 0.95), rgba(255, 255, 255, 1));
     border-bottom: 1px solid rgba(15, 23, 42, 0.08);
 }

 .app-modal-icon {
     width: 44px;
     height: 44px;
     border-radius: 14px;
     display: flex;
     align-items: center;
     justify-content: center;
     background: rgba(59, 130, 246, 0.12);
     color: #2563eb;
     font-size: 20px;
     flex: 0 0 auto;
     box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.08);
 }

 .app-modal-icon.is-danger {
     background: rgba(239, 68, 68, 0.12);
     color: #ef4444;
 }

 .app-modal-icon.is-success {
     background: rgba(16, 185, 129, 0.12);
     color: #10b981;
 }

 .app-modal-titles {
     min-width: 0;
 }

 .app-modal-title {
     font-size: 18px;
     font-weight: 700;
     color: #0f172a;
     line-height: 1.25;
     letter-spacing: 0.2px;
 }

 .app-modal-subtitle {
     margin-top: 4px;
     font-size: 13px;
     color: #64748b;
     line-height: 1.4;
 }

 .app-modal-x {
     margin-left: auto;
     border: none;
     background: rgba(15, 23, 42, 0.05);
     color: #64748b;
     font-size: 20px;
     line-height: 1;
     cursor: pointer;
     width: 34px;
     height: 34px;
     border-radius: 12px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     transition: background 150ms ease, color 150ms ease, transform 150ms ease;
 }

 .app-modal-x:hover {
     background: rgba(15, 23, 42, 0.08);
     color: #0f172a;
     transform: translateY(-1px);
 }

 .app-modal-x:focus-visible {
     outline: none;
     box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
 }

 .app-modal-body {
     padding: 14px 22px 2px;
     font-size: 14.5px;
     color: #1f2937;
     line-height: 1.7;
     word-break: break-word;
     overflow: auto;
     max-height: calc(100vh - 220px);
 }

 .app-modal-body:empty {
     display: none;
 }

 .app-modal-actions {
     display: flex;
     justify-content: flex-end;
     gap: 12px;
     padding: 16px 22px 20px;
     border-top: 1px solid rgba(15, 23, 42, 0.08);
     background: linear-gradient(180deg, rgba(248, 250, 252, 0.72), rgba(255, 255, 255, 1));
 }

 .app-modal-actions .btn {
     min-width: 104px;
     min-height: 40px;
     border-radius: 12px;
     padding: 10px 16px;
     font-weight: 700;
     letter-spacing: 0.2px;
     transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
 }

 .app-modal-actions .btn:hover {
     transform: translateY(-1px);
 }

 .app-modal-actions .btn:active {
     transform: translateY(0);
 }

 .app-modal-actions .btn:focus-visible {
     outline: none;
     box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
 }

 .app-modal-actions .btn.btn-secondary {
     background: rgba(255, 255, 255, 0.92);
     border: 1px solid rgba(15, 23, 42, 0.14);
     color: #334155;
     box-shadow: none;
 }

 .app-modal-actions .btn.btn-secondary:hover {
     background: rgba(248, 250, 252, 1);
     border-color: rgba(15, 23, 42, 0.18);
     box-shadow: 0 10px 20px rgba(2, 6, 23, 0.10);
 }

 .app-modal-actions .btn.btn-primary {
     border: none;
     color: #fff;
     background: linear-gradient(135deg, #2563eb, #4f46e5);
     box-shadow: 0 14px 28px rgba(37, 99, 235, 0.22);
 }

 .app-modal-actions .btn.btn-primary:hover {
     box-shadow: 0 18px 34px rgba(37, 99, 235, 0.28);
 }

 .app-modal-actions .btn.btn-danger {
     border: none;
     color: #fff;
     background: linear-gradient(135deg, #ef4444, #dc2626);
     box-shadow: 0 14px 28px rgba(239, 68, 68, 0.22);
 }

 .app-modal-actions .btn.btn-danger:hover {
     box-shadow: 0 18px 34px rgba(239, 68, 68, 0.28);
 }

 @media (prefers-reduced-motion: reduce) {
     .app-modal-card {
         animation: none;
         transform: none;
         opacity: 1;
     }
     .app-modal-x {
         transition: none;
     }
 }

 @media (max-width: 480px) {
     .app-modal {
         padding: 12px;
     }

     .app-modal-dialog {
         max-height: calc(100vh - 24px);
     }

     .app-modal-actions {
         flex-direction: column-reverse;
         align-items: stretch;
     }

     .app-modal-actions .btn {
         width: 100%;
     }
 }

/* 右下角客服/公众号悬浮入口 */
.contact-float {
    position: fixed;
    right: 32px;
    bottom: 56px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    z-index: 1200;
}

.contact-float-btn {
    border: none;
    border-radius: 999px;
    padding: 12px 24px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(135deg, #2563eb, #4f46e5);
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(37, 99, 235, 0.32);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    min-width: 120px;
}

.contact-float-btn--ghost {
    background: linear-gradient(135deg, #0ea5e9, #38bdf8);
}

.contact-float-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 36px rgba(37, 99, 235, 0.36);
}

.contact-qr-modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    background: rgba(15, 23, 42, 0.6);
    z-index: 1300;
    padding: 20px;
}

.contact-qr-modal.is-active {
    display: flex;
}

.contact-qr-card {
    width: min(90vw, 360px);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.contact-qr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 18px 10px;
    border-bottom: 1px solid rgba(148, 163, 184, 0.2);
}

.contact-qr-title {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.contact-qr-close {
    border: none;
    background: transparent;
    font-size: 22px;
    cursor: pointer;
    color: #64748b;
}

.contact-qr-body {
    padding: 18px;
    text-align: center;
}

.contact-qr-body img {
    width: 220px;
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: #f8fafc;
}

.contact-qr-body p {
    margin-top: 12px;
    color: #475569;
    font-size: 13px;
}

.contact-qr-body img.is-loading {
    opacity: 0.4;
}


@media (max-width: 640px) {
    .contact-float {
        right: 16px;
        bottom: 32px;
    }

    .contact-float-btn {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 108px;
    }
}


