/* 全局重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f0f2f5;
    color: #333;
    height: 100vh;
}

/* 登录页面整体容器 */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    width: 420px;
    padding: 40px;
    animation: fadeIn 0.6s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.login-header p {
    color: #a0aec0;
    font-size: 14px;
}

.role-tabs {
    display: flex;
    margin-bottom: 30px;
    border-radius: 12px;
    background: #edf2f7;
    padding: 4px;
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 10px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #4a5568;
}

.role-tab.active {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    color: #667eea;
    font-weight: 600;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: border 0.3s ease;
    outline: none;
}

.form-group input:focus {
    border-color: #667eea;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.1s, box-shadow 0.3s;
}

.login-btn:hover {
    box-shadow: 0 10px 25px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.login-btn:active {
    transform: translateY(0);
}

.error-msg {
    background: #fff5f5;
    color: #c53030;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 14px;
}

/* 管理后台布局 */
.admin-layout {
    display: flex;
    height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 260px;
    background: #1e293b;
    color: #cbd5e1;
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #334155;
}

.sidebar-header h2 {
    font-size: 22px;
    color: #f1f5f9;
    font-weight: 600;
}

.sidebar-header span {
    font-size: 13px;
    color: #94a3b8;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.nav-section {
    margin-bottom: 20px;
}

.nav-section-title {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #64748b;
    padding: 0 20px 10px;
    font-weight: 600;
}

.nav-item {
    display: block;
    padding: 12px 20px;
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.2s;
    font-size: 15px;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: #334155;
    color: #f8fafc;
}

.nav-item.active {
    background: #334155;
    color: #ffffff;
    border-left-color: #667eea;
    font-weight: 500;
}

/* 主内容区 */
.main-content {
    flex: 1;
    background: #f8fafc;
    padding: 30px;
    overflow-y: auto;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h1 {
    font-size: 26px;
    font-weight: 600;
    color: #1e293b;
}

.placeholder-card {
    background: white;
    border-radius: 16px;
    padding: 60px 40px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-top: 20px;
}

.placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.7;
}

.placeholder-card h3 {
    font-size: 22px;
    color: #334155;
    margin-bottom: 10px;
}

.placeholder-card p {
    color: #64748b;
    font-size: 16px;
}

/* 教师端特殊布局（无侧边栏） */
.teacher-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    background: linear-gradient(135deg, #f6f9fc 0%, #e9f2f9 100%);
}

.teacher-welcome {
    text-align: center;
}

.teacher-welcome h1 {
    font-size: 36px;
    color: #1e293b;
    margin-bottom: 15px;
}

.teacher-welcome p {
    color: #64748b;
    font-size: 18px;
}

.logout-btn {
    display: inline-block;
    margin-top: 30px;
    padding: 12px 30px;
    background: #667eea;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.3s;
}

.logout-btn:hover {
    background: #5a67d8;
}