/* 研学工作台 - 公共样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
    background: #f0f2f5;
    color: #333;
    font-size: 14px;
}

/* 登录页 */
.login-wrap {
    width: 100vw; height: 100vh;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}
.login-box {
    background: #fff; padding: 40px; border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2); width: 380px;
}
.login-box h2 { text-align: center; margin-bottom: 24px; color: #333; }
.login-box .form-group { margin-bottom: 16px; }
.login-box label { display: block; margin-bottom: 6px; color: #666; }
.login-box input {
    width: 100%; padding: 10px 12px; border: 1px solid #ddd;
    border-radius: 6px; font-size: 14px;
}
.login-box input:focus { outline: none; border-color: #667eea; }
.login-box .btn-login {
    width: 100%; padding: 12px; background: #667eea; color: #fff;
    border: none; border-radius: 6px; font-size: 16px; cursor: pointer;
}
.login-box .btn-login:hover { background: #5568d3; }
.login-error { color: #e74c3c; text-align: center; margin-top: 10px; min-height: 20px; }

/* 主布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar {
    width: 220px; background: #1f2937; color: #fff; padding: 20px 0;
    flex-shrink: 0;
}
.sidebar .logo {
    padding: 0 20px 20px; font-size: 18px; font-weight: bold;
    border-bottom: 1px solid #374151; margin-bottom: 16px;
}
.sidebar a {
    display: block; padding: 12px 20px; color: #d1d5db;
    text-decoration: none; transition: all 0.2s;
}
.sidebar a:hover, .sidebar a.active {
    background: #374151; color: #fff; border-left: 3px solid #667eea;
}
.sidebar .user-info {
    position: absolute; bottom: 20px; width: 220px;
    padding: 16px 20px; border-top: 1px solid #374151; font-size: 13px;
}
.main { flex: 1; padding: 24px; overflow-x: auto; }
.page-header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 20px;
}
.page-header h2 { font-size: 20px; color: #1f2937; }

/* 卡片 */
.card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08); margin-bottom: 16px;
}
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card {
    background: #fff; border-radius: 8px; padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
.stat-card .label { color: #6b7280; font-size: 13px; margin-bottom: 8px; }
.stat-card .value { font-size: 28px; font-weight: bold; color: #1f2937; }
.stat-card .value.blue { color: #3b82f6; }
.stat-card .value.green { color: #10b981; }
.stat-card .value.orange { color: #f59e0b; }
.stat-card .value.red { color: #ef4444; }

/* 表格 */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e5e7eb; }
th { background: #f9fafb; font-weight: 600; color: #374151; font-size: 13px; }
tr:hover { background: #f9fafb; }

/* 按钮 */
.btn {
    padding: 8px 16px; border: none; border-radius: 6px;
    cursor: pointer; font-size: 14px;
}
.btn-primary { background: #3b82f6; color: #fff; }
.btn-primary:hover { background: #2563eb; }
.btn-success { background: #10b981; color: #fff; }
.btn-danger { background: #ef4444; color: #fff; }
.btn-warning { background: #f59e0b; color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 标签 */
.tag { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.tag-green { background: #d1fae5; color: #065f46; }
.tag-yellow { background: #fef3c7; color: #92400e; }
.tag-red { background: #fee2e2; color: #991b1b; }
.tag-blue { background: #dbeafe; color: #1e40af; }

/* 表单 */
.form-row { display: flex; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.form-item { flex: 1; min-width: 150px; }
.form-item label { display: block; margin-bottom: 4px; color: #6b7280; font-size: 13px; }
.form-item input, .form-item select, .form-item textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #d1d5db;
    border-radius: 6px; font-size: 14px;
}

/* 弹窗 */
.modal-mask {
    display: none; position: fixed; top:0; left:0; right:0; bottom:0;
    background: rgba(0,0,0,0.5); z-index: 100;
    align-items: center; justify-content: center;
}
.modal-mask.show { display: flex; }
.modal {
    background: #fff; border-radius: 8px; padding: 24px;
    width: 560px; max-height: 80vh; overflow-y: auto;
}
.modal h3 { margin-bottom: 16px; }

/* 简单柱状图 */
.bar-chart { display: flex; align-items: flex-end; gap: 12px; height: 200px; padding: 10px 0; }
.bar-item { flex: 1; display: flex; flex-direction: column; align-items: center; }
.bar {
    width: 100%; background: linear-gradient(180deg, #667eea, #764ba2);
    border-radius: 4px 4px 0 0; min-height: 2px; transition: height 0.3s;
}
.bar-label { font-size: 12px; color: #6b7280; margin-top: 6px; }
