/* 刷课系统 - 管理后台样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: #f0f2f5; color: #333; }

.layout { display: flex; min-height: 100vh; }

/* 侧边栏 */
.sidebar { width: 220px; background: #1a1a2e; color: #fff; display: flex; flex-direction: column; }
.logo { padding: 20px; font-size: 18px; font-weight: bold; border-bottom: 1px solid rgba(255,255,255,.1); }
.sidebar nav { flex: 1; padding: 10px 0; }
.sidebar nav a { display: block; padding: 12px 20px; color: rgba(255,255,255,.7); text-decoration: none; transition: .2s; }
.sidebar nav a:hover, .sidebar nav a.active { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-footer { padding: 15px 20px; border-top: 1px solid rgba(255,255,255,.1); font-size: 12px; color: rgba(255,255,255,.4); display: flex; justify-content: space-between; }
.logout-link { color: rgba(255,255,255,.5); text-decoration: none; }
.logout-link:hover { color: #ff4d4f; }

/* 主区域 */
.main { flex: 1; display: flex; flex-direction: column; }
.header { background: #fff; padding: 20px 30px; border-bottom: 1px solid #e8e8e8; }
.header h1 { font-size: 22px; margin-bottom: 8px; }
.header-info { font-size: 13px; color: #666; }
.badge { display: inline-block; padding: 2px 10px; background: #e6f7ff; color: #1890ff; border-radius: 10px; margin-right: 6px; font-size: 12px; }

.content { padding: 24px; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card { background: #fff; border-radius: 8px; padding: 20px; display: flex; align-items: center; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.stat-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; margin-right: 16px; }
.stat-icon.blue { background: #e6f7ff; }
.stat-icon.green { background: #f6ffed; }
.stat-icon.orange { background: #fff7e6; }
.stat-icon.purple { background: #f9f0ff; }
.stat-value { font-size: 28px; font-weight: bold; }
.stat-label { font-size: 13px; color: #666; margin-top: 4px; }

/* 区块 */
.section { background: #fff; border-radius: 8px; padding: 20px; margin-bottom: 24px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.section h2 { font-size: 16px; margin-bottom: 16px; color: #333; }

/* 快速操作 */
.action-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.action-card { background: #fafafa; border: 1px solid #e8e8e8; border-radius: 8px; padding: 16px; cursor: pointer; transition: .2s; text-align: center; }
.action-card:hover { border-color: #1890ff; box-shadow: 0 2px 8px rgba(24,144,255,.15); }
.action-icon { font-size: 32px; margin-bottom: 8px; }
.action-card div { font-weight: 500; margin-bottom: 4px; }
.action-card small { color: #999; font-size: 12px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #f0f0f0; }
.table th { background: #fafafa; font-weight: 500; color: #666; font-size: 13px; }
.table tr:hover { background: #fafafa; }
code { background: #f5f5f5; padding: 2px 6px; border-radius: 3px; font-size: 12px; }
.tag { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.tag.green { background: #f6ffed; color: #52c41a; }
.tag.red { background: #fff2f0; color: #ff4d4f; }

/* 弹窗 */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,.45); z-index: 1000; display: flex; align-items: center; justify-content: center; }
.modal-content { background: #fff; border-radius: 8px; padding: 24px; width: 480px; max-height: 80vh; overflow-y: auto; }
.close { float: right; font-size: 24px; cursor: pointer; color: #999; }
.close:hover { color: #333; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: #333; font-weight: 500; }
.form-group input, .form-group select { width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 4px; font-size: 14px; }
.form-group input:focus, .form-group select:focus { border-color: #1890ff; outline: none; }
.btn { padding: 8px 20px; background: #1890ff; color: #fff; border: none; border-radius: 4px; cursor: pointer; font-size: 14px; }
.btn:hover { background: #40a9ff; }
.result-box { margin-top: 12px; padding: 10px; border-radius: 4px; font-size: 13px; }
.result-box.success { background: #f6ffed; border: 1px solid #b7eb8f; color: #52c41a; }
.result-box.error { background: #fff2f0; border: 1px solid #ffccc7; color: #ff4d4f; }
