:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --primary-light: #60A5FA;
    --secondary: #64748B;
    --success: #10B981;
    --danger: #EF4444;
    --warning: #F59E0B;
    --info: #06B6D4;
    --dark: #1E293B;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --gray-400: #94A3B8;
    --gray-500: #64748B;
    --gray-600: #475569;
    --white: #FFFFFF;
    --sidebar-width: 260px;
    --sidebar-width-tablet: 80px;
    --header-height: 64px;
    --header-height-mobile: 56px;
    --border-radius: 12px;
    --border-radius-sm: 8px;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: var(--dark);
    font-size: 14px;
    line-height: 1.6;
}

/* ==================== 登录页面 ==================== */
.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    position: relative;
    overflow: hidden;
}

.login-wrapper::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.03) 0%, transparent 50%);
    animation: pulse 15s infinite linear;
}

@keyframes pulse {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.login-box {
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25);
    width: 100%;
    max-width: 420px;
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.login-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    padding: 35px 25px;
    text-align: center;
    position: relative;
}

.login-header::after {
    content: '';
    position: absolute;
    bottom: -18px;
    left: 0;
    right: 0;
    height: 36px;
    background: rgba(255,255,255,0.95);
    border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

.login-header h1 {
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin-bottom: 6px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.login-header p {
    color: rgba(255,255,255,0.9);
    font-size: 13px;
}

.login-header .icon-wrapper {
    width: 70px;
    height: 70px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.login-header .icon-wrapper i {
    font-size: 32px;
    color: white;
}

.login-form {
    padding: 45px 30px 30px;
}

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

.form-item label {
    display: block;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 8px;
    font-weight: 500;
}

.input-wrapper {
    position: relative;
}

.input-wrapper i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
    font-size: 16px;
}

.form-item input,
.form-item select {
    width: 100%;
    height: 48px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    padding: 0 14px 0 44px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: var(--gray-100);
}

.form-item input:focus,
.form-item select:focus {
    outline: none;
    border-color: var(--primary);
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

.btn-login {
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(59, 130, 246, 0.4);
}

.login-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 18px;
    border-top: 1px solid var(--gray-200);
    font-size: 12px;
    color: var(--gray-500);
}

/* ==================== 主布局 ==================== */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* ==================== 侧边栏 ==================== */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1E293B 0%, #0F172A 100%);
    color: white;
    position: fixed;
    height: 100vh;
    z-index: 1000;
    overflow-y: auto;
    transition: all 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar-brand {
    padding: 20px 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-icon {
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.brand-icon i {
    font-size: 20px;
    color: white;
}

.brand-text h3 {
    font-size: 15px;
    font-weight: 700;
    color: white;
    margin-bottom: 2px;
    white-space: nowrap;
}

.brand-text span {
    font-size: 11px;
    color: rgba(255,255,255,0.7);
}

.nav-section {
    padding: 16px 10px;
}

.nav-section-title {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--gray-500);
    padding: 0 10px;
    margin-bottom: 8px;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 3px;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 11px 14px;
    color: var(--gray-400);
    text-decoration: none;
    border-radius: var(--border-radius-sm);
    font-size: 14px;
    transition: all 0.2s ease;
    gap: 12px;
    white-space: nowrap;
}

.nav-link:hover {
    background: rgba(255,255,255,0.05);
    color: white;
}

.nav-link.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.nav-link i {
    width: 20px;
    font-size: 15px;
    text-align: center;
}

.nav-divider {
    height: 1px;
    background: rgba(255,255,255,0.1);
    margin: 12px 14px;
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid rgba(255,255,255,0.1);
    position: sticky;
    bottom: 0;
    background: linear-gradient(180deg, #0F172A 0%, #1E293B 100%);
}

.user-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    background: rgba(255,255,255,0.05);
    border-radius: var(--border-radius-sm);
}

.user-card .avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.user-card .avatar i {
    font-size: 16px;
    color: white;
}

.user-card .info h4 {
    font-size: 13px;
    font-weight: 600;
    color: white;
    margin-bottom: 1px;
    white-space: nowrap;
}

.user-card .info p {
    font-size: 10px;
    color: var(--gray-500);
    white-space: nowrap;
}

/* 移动端侧边栏遮罩 */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
}

/* ==================== 主内容区 ==================== */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

/* ==================== 顶部导航 ==================== */
.header {
    height: var(--header-height);
    background: rgba(255,255,255,0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border: none;
    background: var(--gray-100);
    border-radius: 8px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.menu-toggle:hover {
    background: var(--gray-200);
}

.menu-toggle i {
    font-size: 18px;
    color: var(--gray-600);
}

.header-left h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.header-icon {
    width: 38px;
    height: 38px;
    background: var(--gray-100);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.header-icon:hover {
    background: var(--gray-200);
}

.header-icon i {
    font-size: 16px;
    color: var(--gray-600);
}

.header-icon .badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 16px;
    height: 16px;
    background: var(--danger);
    color: white;
    font-size: 10px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 4px;
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 6px 12px;
    background: var(--gray-100);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.user-menu:hover {
    background: var(--gray-200);
}

.user-menu .avatar {
    width: 30px;
    height: 30px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--info) 100%);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-menu .avatar i {
    font-size: 13px;
    color: white;
}

.user-menu span {
    font-size: 13px;
    font-weight: 500;
    color: var(--dark);
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    min-width: 180px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 9999;
    pointer-events: none;
    border: 1px solid var(--gray-200);
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--gray-600);
    text-decoration: none;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.2s ease;
    cursor: pointer;
}

.user-dropdown a:hover {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1) 0%, rgba(6, 182, 212, 0.1) 100%);
    color: var(--primary);
    transform: translateX(4px);
}

.user-dropdown a:active {
    background: rgba(59, 130, 246, 0.15);
}

.user-dropdown a i {
    width: 18px;
    font-size: 14px;
    text-align: center;
}

.user-dropdown a[data-action="logout"] {
    color: var(--danger);
    border-top: 1px solid var(--gray-200);
    margin-top: 6px;
    padding-top: 14px;
}

.user-dropdown a[data-action="logout"]:hover {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

/* ==================== 内容区域 ==================== */
.content {
    padding: 28px 32px;
    background: linear-gradient(180deg, var(--gray-100) 0%, #E8EDF3 100%);
    min-height: calc(100vh - var(--header-height));
    max-width: 100%;
    overflow-x: hidden;
}

.page-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    margin-bottom: 24px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.3s ease;
}

.page-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.page-header {
    padding: 20px 28px;
    border-bottom: 1px solid var(--gray-200);
    background: linear-gradient(90deg, #FAFBFC 0%, white 100%);
}

.page-header h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 4px;
}

.page-header p {
    font-size: 13px;
    color: var(--gray-500);
    margin-top: 4px;
}

.page-actions {
    margin-top: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    padding: 16px 28px;
    background: #FAFBFC;
    border-top: 1px solid var(--gray-200);
}

/* ==================== 统计卡片网格 ==================== */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 24px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.04);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
    border-color: rgba(59, 130, 246, 0.2);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue { background: linear-gradient(135deg, #3B82F6 0%, #60A5FA 100%); color: white; }
.stat-icon.green { background: linear-gradient(135deg, #10B981 0%, #34D399 100%); color: white; }
.stat-icon.orange { background: linear-gradient(135deg, #F59E0B 0%, #FBBF24 100%); color: white; }
.stat-icon.purple { background: linear-gradient(135deg, #8B5CF6 0%, #A78BFA 100%); color: white; }
.stat-icon.red { background: linear-gradient(135deg, #EF4444 0%, #F87171 100%); color: white; }
.stat-icon.cyan { background: linear-gradient(135deg, #06B6D4 0%, #22D3EE 100%); color: white; }

.stat-info h3 {
    font-size: 26px;
    font-weight: 700;
    color: var(--dark);
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 13px;
    color: var(--gray-500);
}

.card-body {
    padding: 24px 28px;
}

/* ==================== 表格 ==================== */
.table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -28px;
    padding: 0 28px;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 700px;
}

table th {
    background: linear-gradient(180deg, #F8F9FA 0%, #E9ECEF 100%);
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    font-size: 12px;
    color: var(--gray-600);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    white-space: nowrap;
    border-bottom: 2px solid var(--gray-300);
}

table td {
    padding: 16px;
    border-bottom: 1px solid var(--gray-200);
    font-size: 13px;
    white-space: nowrap;
}

table tr {
    transition: background 0.2s ease;
}

table tr:hover {
    background: rgba(59, 130, 246, 0.02);
}

table tr:last-child td {
    border-bottom: none;
}

/* ==================== 徽章 ==================== */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}

.badge-primary { background: rgba(59, 130, 246, 0.1); color: var(--primary); }
.badge-success { background: rgba(16, 185, 129, 0.1); color: var(--success); }
.badge-warning { background: rgba(245, 158, 11, 0.1); color: var(--warning); }
.badge-danger { background: rgba(239, 68, 68, 0.1); color: var(--danger); }
.badge-info { background: rgba(6, 182, 212, 0.1); color: var(--info); }
.badge-secondary { background: rgba(100, 116, 139, 0.1); color: var(--secondary); }

/* ==================== 按钮 ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 18px;
    border: none;
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.btn i {
    font-size: 13px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-success {
    background: linear-gradient(135deg, var(--success) 0%, #059669 100%);
    color: white;
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #DC2626 100%);
    color: white;
}

.btn-outline {
    background: white;
    color: var(--gray-600);
    border: 1px solid var(--gray-300);
}

.btn-outline:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

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

.btn-icon {
    width: 30px;
    height: 30px;
    padding: 0;
    border-radius: 6px;
}

/* ==================== 搜索栏 ==================== */
.search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 16px;
    flex-wrap: wrap;
    align-items: center;
}

.search-bar input,
.search-bar select {
    height: 38px;
    padding: 0 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    transition: all 0.2s ease;
    flex: 1;
    min-width: 150px;
}

.search-bar input:focus,
.search-bar select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* ==================== 公告列表 ==================== */
.notice-list {
    list-style: none;
}

.notice-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--gray-200);
    cursor: pointer;
    transition: all 0.2s ease;
}

.notice-item:hover {
    background: var(--gray-100);
}

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

.notice-title {
    font-weight: 600;
    font-size: 14px;
    color: var(--dark);
    margin-bottom: 5px;
}

.notice-content {
    font-size: 13px;
    color: var(--gray-500);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.notice-meta {
    font-size: 11px;
    color: var(--gray-400);
    margin-top: 8px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.notice-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* ==================== 课表 ==================== */
.schedule-grid {
    display: grid;
    grid-template-columns: 70px repeat(5, 1fr);
    gap: 1px;
    background: var(--gray-300);
    border-radius: var(--border-radius);
    overflow: hidden;
    font-size: 12px;
    min-width: 600px;
}

.schedule-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 12px 8px;
    text-align: center;
    font-weight: 600;
}

.schedule-cell {
    background: white;
    padding: 10px 8px;
    min-height: 65px;
    text-align: center;
}

.schedule-cell .subject {
    font-weight: 600;
    font-size: 12px;
    color: var(--dark);
}

.schedule-cell .teacher {
    font-size: 10px;
    color: var(--gray-500);
    margin-top: 3px;
}

/* ==================== 模态框 ==================== */
.modal-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h5 {
    font-size: 16px;
    font-weight: 600;
}

.modal-header .close {
    color: white;
    opacity: 0.8;
    font-size: 22px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.modal-header .close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.2);
}

.modal-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

.modal-body {
    padding: 20px;
    max-height: 60vh;
    overflow-y: auto;
}

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

.form-modal label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 13px;
    color: var(--gray-600);
}

.form-modal input,
.form-modal select,
.form-modal textarea {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid var(--gray-200);
    border-radius: var(--border-radius-sm);
    font-size: 13px;
    transition: all 0.2s ease;
}

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

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* ==================== 提示消息 ==================== */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: calc(100vw - 40px);
}

.toast {
    background: white;
    border-radius: var(--border-radius-sm);
    box-shadow: var(--shadow-lg);
    padding: 14px 18px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    max-width: 400px;
    border-left: 4px solid;
    animation: slideIn 0.3s ease;
}

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

.toast.success { border-color: var(--success); }
.toast.error { border-color: var(--danger); }
.toast.warning { border-color: var(--warning); }
.toast.info { border-color: var(--info); }

.toast i {
    font-size: 18px;
    flex-shrink: 0;
}

.toast.success i { color: var(--success); }
.toast.error i { color: var(--danger); }
.toast.warning i { color: var(--warning); }
.toast.info i { color: var(--info); }

.toast-content {
    flex: 1;
    min-width: 0;
}

.toast-content h4 {
    font-size: 13px;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 2px;
}

.toast-content p {
    font-size: 12px;
    color: var(--gray-500);
}

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

.empty-state i {
    font-size: 56px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-state h5 {
    font-size: 16px;
    color: var(--gray-600);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
    color: var(--gray-400);
}

/* ==================== 快捷操作 ==================== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 12px;
    margin-top: 16px;
}

.quick-action {
    background: white;
    border: 2px dashed var(--gray-300);
    border-radius: var(--border-radius);
    padding: 20px 14px;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action:hover {
    border-color: var(--primary);
    background: rgba(59, 130, 246, 0.02);
    transform: translateY(-2px);
}

.quick-action i {
    font-size: 26px;
    color: var(--primary);
    margin-bottom: 10px;
}

.quick-action span {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-600);
}

/* ==================== 分页 ==================== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.pagination button {
    min-width: 34px;
    height: 34px;
    border: 1px solid var(--gray-300);
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    color: var(--gray-600);
    transition: all 0.2s ease;
    padding: 0 10px;
}

.pagination button:hover {
    background: var(--gray-100);
    border-color: var(--gray-400);
}

.pagination button.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    border-color: var(--primary);
}

/* ==================== 成绩颜色 ==================== */
.score-high {
    color: var(--success);
    font-weight: 600;
}

.score-mid {
    color: var(--warning);
    font-weight: 600;
}

.score-low {
    color: var(--danger);
    font-weight: 600;
}

/* ==================== 移动端隐藏元素 ==================== */
.hide-mobile {
    /* 默认显示，移动端隐藏 */
}

/* ==================== 平板适配 (768px - 1024px) ==================== */
@media screen and (max-width: 1024px) {
    .sidebar {
        width: var(--sidebar-width-tablet);
    }
    
    .brand-text,
    .nav-section-title,
    .nav-link span,
    .user-card .info {
        display: none !important;
    }
    
    .brand-icon {
        margin: 0 auto;
    }
    
    .brand-text {
        display: none;
    }
    
    .nav-link {
        justify-content: center;
        padding: 12px;
    }
    
    .nav-link i {
        margin: 0;
        font-size: 18px;
    }
    
    .sidebar-brand {
        justify-content: center;
    }
    
    .sidebar-footer {
        display: none;
    }
    
    .user-card {
        justify-content: center;
        padding: 8px;
    }
    
    .user-card .avatar {
        margin: 0;
    }
    
    .main-content {
        margin-left: var(--sidebar-width-tablet);
    }
    
    .stat-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }
    
    .header-left h2 {
        font-size: 15px;
    }
    
    .content {
        padding: 20px 24px;
    }
    
    .page-header {
        padding: 16px 20px;
    }
    
    .page-header h1 {
        font-size: 16px;
    }
    
    .card-body {
        padding: 18px 20px;
    }
}

/* ==================== 平板横屏 ==================== */
@media screen and (min-width: 768px) and (max-width: 1024px) and (orientation: landscape) {
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .brand-text,
    .nav-section-title,
    .nav-link span,
    .user-card .info {
        display: block !important;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 10px 14px;
    }
    
    .nav-link i {
        margin-right: 10px;
        font-size: 15px;
    }
    
    .sidebar-brand {
        justify-content: flex-start;
    }
    
    .brand-icon {
        margin: 0;
    }
    
    .sidebar-footer {
        display: block;
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
}

/* ==================== 手机适配 (< 768px) ==================== */
@media screen and (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .brand-text,
    .nav-section-title,
    .nav-link span,
    .user-card .info {
        display: block !important;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 11px 14px;
    }
    
    .nav-link i {
        margin-right: 10px;
        font-size: 16px;
    }
    
    .sidebar-brand {
        justify-content: flex-start;
    }
    
    .brand-icon {
        margin: 0;
    }
    
    .sidebar-footer {
        display: block;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .sidebar-overlay {
        display: block;
    }
    
    .sidebar-overlay.show {
        display: block;
    }
    
    .header {
        height: var(--header-height-mobile);
        padding: 0 16px;
    }
    
    .header-left h2 {
        font-size: 15px;
    }
    
    .header-right {
        gap: 10px;
    }
    
    .user-menu span {
        display: none;
    }
    
    .content {
        padding: 16px 18px;
    }
    
    .page-card {
        margin-bottom: 16px;
        border-radius: var(--border-radius-sm);
    }
    
    .page-header {
        padding: 14px 16px;
    }
    
    .page-header h1 {
        font-size: 16px;
    }
    
    .page-actions {
        flex-direction: column;
        padding: 12px 16px;
    }
    
    .page-actions .btn {
        width: 100%;
        justify-content: center;
    }
    
    .stat-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .stat-card {
        padding: 14px;
        gap: 12px;
        flex-direction: column;
        text-align: center;
    }
    
    .stat-icon {
        width: 46px;
        height: 46px;
        font-size: 20px;
        border-radius: 10px;
    }
    
    .stat-info h3 {
        font-size: 22px;
    }
    
    .stat-info p {
        font-size: 11px;
    }
    
    .card-body {
        padding: 14px 16px;
    }
    
    .table-wrapper {
        margin: 0 -16px;
        padding: 0 16px;
    }
    
    table th,
    table td {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .search-bar {
        flex-direction: column;
    }
    
    .search-bar input,
    .search-bar select,
    .search-bar .btn {
        width: 100%;
        flex: none;
    }
    
    .notice-item {
        padding: 14px 16px;
    }
    
    .notice-title {
        font-size: 13px;
    }
    
    .notice-content {
        font-size: 12px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .quick-action {
        padding: 16px 10px;
    }
    
    .quick-action i {
        font-size: 22px;
    }
    
    .quick-action span {
        font-size: 12px;
    }
    
    .schedule-grid {
        grid-template-columns: 60px repeat(5, 1fr);
        font-size: 11px;
    }
    
    .schedule-header {
        padding: 10px 6px;
        font-size: 11px;
    }
    
    .schedule-cell {
        padding: 8px 4px;
        min-height: 55px;
    }
    
    .schedule-cell .subject {
        font-size: 10px;
    }
    
    .schedule-cell .teacher {
        font-size: 9px;
    }
    
    .toast-container {
        top: 10px;
        right: 10px;
        left: 10px;
    }
    
    .toast {
        min-width: auto;
        width: 100%;
        max-width: none;
    }
    
    .modal-dialog {
        margin: 10px;
    }
    
    .modal-body {
        padding: 16px;
        max-height: 55vh;
    }
    
    .pagination {
        gap: 4px;
    }
    
    .pagination button {
        min-width: 30px;
        height: 30px;
        font-size: 12px;
        padding: 0 8px;
    }
}

/* ==================== 小屏手机 (< 480px) ==================== */
@media screen and (max-width: 480px) {
    .login-wrapper {
        padding: 15px;
    }
    
    .login-box {
        border-radius: 16px;
    }
    
    .login-header {
        padding: 28px 20px;
    }
    
    .login-header::after {
        bottom: -14px;
        height: 28px;
    }
    
    .login-header h1 {
        font-size: 20px;
    }
    
    .login-header .icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .login-header .icon-wrapper i {
        font-size: 28px;
    }
    
    .login-form {
        padding: 35px 20px 24px;
    }
    
    .form-item {
        margin-bottom: 16px;
    }
    
    .form-item input,
    .form-item select {
        height: 44px;
        font-size: 14px;
    }
    
    .btn-login {
        height: 46px;
        font-size: 15px;
    }
    
    .stat-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
    
    .schedule-grid {
        grid-template-columns: 50px repeat(5, 1fr);
    }
    
    .notice-meta {
        flex-direction: column;
        gap: 4px;
    }
}

/* ==================== 触摸设备优化 ==================== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .btn:active {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .quick-action:hover {
        transform: none;
    }
    
    .nav-link:hover {
        background: transparent;
    }
    
    .nav-link:active {
        background: rgba(255,255,255,0.1);
    }
    
    table tr:hover {
        background: transparent;
    }
    
    table tr:active {
        background: var(--gray-100);
    }
    
    .notice-item:hover {
        background: transparent;
    }
    
    .notice-item:active {
        background: var(--gray-100);
    }
}

/* ==================== 横屏手机适配 ==================== */
@media screen and (max-width: 768px) and (orientation: landscape) {
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .sidebar {
        width: 220px;
    }
    
    .content {
        padding: 12px;
    }
    
    .page-card {
        margin-bottom: 12px;
    }
    
    .page-header {
        padding: 12px 14px;
    }
    
    .stat-card {
        padding: 14px;
    }
}

/* ==================== iPad Pro 适配 ==================== */
@media screen and (min-width: 1024px) and (max-width: 1366px) {
    .sidebar {
        width: var(--sidebar-width);
    }
    
    .main-content {
        margin-left: var(--sidebar-width);
    }
    
    .stat-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .content {
        padding: 28px;
    }
}
