/**
 * 学术班级管理 · 样式表
 * 前缀: acl- (academic-classes)
 */

/* ── 页面容器 ────────────────────────────────────────── */
.acl-page { padding: 20px; font-family: inherit; color: #333; max-width: 1600px; margin: 0 auto; }

/* ── Header ──────────────────────────────────────────── */
.acl-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.acl-header h2 { margin: 0; font-size: 20px; font-weight: 600; color: #1a1a2e; }
.acl-header h2 i { margin-right: 8px; color: #1890ff; }
.acl-actions { display: flex; gap: 8px; }

/* ── 工具栏 ──────────────────────────────────────────── */
.acl-toolbar { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.acl-input, .acl-select {
  padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 14px; outline: none; transition: border-color 0.2s; background: #fff;
}
.acl-input:focus, .acl-select:focus { border-color: #1890ff; }
.acl-input { flex: 1; min-width: 200px; }
.acl-select { min-width: 120px; }
.acl-textarea {
  width: 100%; padding: 8px 12px; border: 1px solid #d9d9d9; border-radius: 6px;
  font-size: 14px; resize: vertical; min-height: 80px; outline: none; font-family: inherit; box-sizing: border-box;
}
.acl-textarea:focus { border-color: #1890ff; }
.acl-textarea-lg { min-height: 160px; }

/* ── 按钮 ────────────────────────────────────────────── */
.acl-btn {
  padding: 8px 16px; border: 1px solid #d9d9d9; border-radius: 6px;
  background: #fff; cursor: pointer; font-size: 14px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.acl-btn:hover { border-color: #1890ff; color: #1890ff; }
.acl-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.acl-btn-primary { background: #1890ff; border-color: #1890ff; color: #fff; }
.acl-btn-primary:hover { background: #40a9ff; border-color: #40a9ff; color: #fff; }
.acl-btn-danger { background: #ff4d4f; border-color: #ff4d4f; color: #fff; }
.acl-btn-danger:hover { background: #ff7875; border-color: #ff7875; color: #fff; }
.acl-btn-sm {
  padding: 4px 10px; border: 1px solid #d9d9d9; border-radius: 4px;
  background: #fff; cursor: pointer; font-size: 12px; transition: all 0.2s; display: inline-flex; align-items: center; gap: 4px;
}
.acl-btn-sm:hover { border-color: #1890ff; color: #1890ff; }
.acl-btn-sm[disabled] { opacity: 0.5; cursor: not-allowed; }
.acl-btn-xs {
  padding: 2px 6px; border: none; background: transparent; cursor: pointer;
  font-size: 14px; color: #999; transition: color 0.2s; border-radius: 4px;
}
.acl-btn-xs:hover { color: #ff4d4f; background: #fff1f0; }
.acl-btn-danger-text { color: #ff4d4f; border-color: transparent; }
.acl-btn-danger-text:hover { color: #e04343; background: #fff1f0; }
.acl-btn-close {
  background: none; border: none; font-size: 22px; cursor: pointer; color: #999; padding: 0 8px; line-height: 1;
}
.acl-btn-close:hover { color: #333; }

/* ── 三栏布局 ────────────────────────────────────────── */
.acl-layout { display: flex; gap: 16px; min-height: calc(100vh - 200px); }

.acl-left-panel {
  width: 320px; flex-shrink: 0; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; flex-direction: column; overflow: hidden;
}

.acl-center-panel {
  flex: 1; min-width: 0; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; flex-direction: column;
}

.acl-right-panel {
  width: 320px; flex-shrink: 0; background: #fff; border-radius: 10px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06); display: flex; flex-direction: column; overflow: hidden;
}

/* ── 左侧面板 ────────────────────────────────────────── */
.acl-left-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
}
.acl-left-title { font-size: 15px; font-weight: 600; color: #333; }
.acl-left-count {
  background: #f0f0f0; color: #666; font-size: 12px; font-weight: 600;
  padding: 2px 8px; border-radius: 10px;
}

.acl-class-list { flex: 1; overflow-y: auto; padding: 8px; }

/* ── 状态分组 ────────────────────────────────────────── */
.acl-status-group { margin-bottom: 12px; }
.acl-status-header {
  display: flex; align-items: center; gap: 6px; padding: 6px 8px;
  font-size: 13px; font-weight: 600; color: #555; border-bottom: 1px solid #f5f5f5; margin-bottom: 6px;
}
.acl-status-dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.acl-status-count {
  margin-left: auto; background: #f5f5f5; color: #999; font-size: 11px;
  padding: 1px 6px; border-radius: 8px;
}

/* ── 班级卡片 ────────────────────────────────────────── */
.acl-class-card {
  padding: 10px 12px; border-radius: 8px; cursor: pointer; transition: all 0.15s;
  border: 1px solid transparent; margin-bottom: 4px;
}
.acl-class-card:hover { background: #fafafa; border-color: #e8e8e8; }
.acl-class-card-active { background: #e6f7ff !important; border-color: #91d5ff !important; }
.acl-class-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
.acl-class-card-name { font-size: 14px; font-weight: 600; color: #1a1a2e; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acl-class-card-badge {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; font-weight: 600; white-space: nowrap; border: 1px solid;
}
.acl-class-card-meta { display: flex; gap: 10px; font-size: 12px; color: #888; flex-wrap: wrap; }
.acl-class-card-meta span { display: inline-flex; align-items: center; gap: 3px; }

/* ── 状态徽标 ────────────────────────────────────────── */
.acl-status-badge {
  display: inline-block; padding: 3px 12px; border-radius: 12px;
  font-size: 13px; font-weight: 600; white-space: nowrap; border: 1px solid;
}

/* ── 中间面板 ────────────────────────────────────────── */
.acl-placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 80px 20px; color: #bbb; text-align: center; flex: 1;
}
.acl-placeholder-icon { font-size: 48px; margin-bottom: 12px; opacity: 0.4; }
.acl-placeholder p { font-size: 15px; margin: 0; }

.acl-center-content { padding: 20px; flex: 1; overflow-y: auto; }

/* ── 详情头部 ────────────────────────────────────────── */
.acl-detail-header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.acl-detail-header h3 { margin: 0; font-size: 18px; font-weight: 700; color: #1a1a2e; }

.acl-detail-actions { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }

/* ── 统计卡片 ────────────────────────────────────────── */
.acl-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 20px; }
.acl-stat-card {
  background: #fafafa; border-radius: 8px; padding: 14px 12px;
  text-align: center; border: 1px solid #f0f0f0;
}
.acl-stat-number { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.acl-stat-label { font-size: 12px; color: #888; }
.acl-stat-active .acl-stat-number { color: #1890ff; }
.acl-stat-suspended .acl-stat-number { color: #faad14; }
.acl-stat-completed .acl-stat-number { color: #52c41a; }
.acl-stat-total .acl-stat-number { color: #333; }

/* ── 详情字段 ────────────────────────────────────────── */
.acl-detail-fields { border: 1px solid #f0f0f0; border-radius: 8px; overflow: hidden; }
.acl-detail-row {
  display: flex; padding: 10px 16px; border-bottom: 1px solid #f5f5f5;
  font-size: 14px; align-items: center;
}
.acl-detail-row:last-child { border-bottom: none; }
.acl-detail-label { width: 100px; flex-shrink: 0; color: #999; font-weight: 500; }
.acl-detail-row-full { flex-direction: column; align-items: flex-start; }
.acl-detail-row-full .acl-detail-label { margin-bottom: 4px; }

/* ── 右侧面板（学员名册） ────────────────────────────── */
.acl-right-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 14px 16px; border-bottom: 1px solid #f0f0f0;
}
.acl-right-header h4 { margin: 0; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 6px; }
.acl-right-header h4 i { color: #1890ff; }
.acl-right-count { font-size: 12px; color: #999; font-weight: 400; }
.acl-right-actions { display: flex; gap: 4px; }

.acl-right-search { padding: 10px 16px; border-bottom: 1px solid #f0f0f0; }
.acl-right-search .acl-input { width: 100%; box-sizing: border-box; min-width: 0; }

.acl-right-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── 学员列表 ────────────────────────────────────────── */
.acl-student-list { flex: 1; overflow-y: auto; padding: 8px; }

.acl-student-row {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px;
  border-radius: 8px; transition: background 0.15s; border-bottom: 1px solid #f5f5f5;
}
.acl-student-row:last-child { border-bottom: none; }
.acl-student-row:hover { background: #fafafa; }

.acl-student-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #1890ff;
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 700; flex-shrink: 0;
}

.acl-student-info { flex: 1; min-width: 0; }
.acl-student-name { font-size: 14px; font-weight: 600; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.acl-student-meta { font-size: 12px; color: #999; margin-top: 2px; }

.acl-student-actions { flex-shrink: 0; }

/* ── 添加学员搜索结果 ────────────────────────────────── */
.acl-add-student-results {
  max-height: 200px; overflow-y: auto; border: 1px solid #e8e8e8;
  border-radius: 6px; margin-bottom: 12px; background: #fff;
}
.acl-add-student-item {
  padding: 8px 12px; cursor: pointer; display: flex; justify-content: space-between;
  align-items: center; border-bottom: 1px solid #f5f5f5; transition: background 0.12s;
}
.acl-add-student-item:last-child { border-bottom: none; }
.acl-add-student-item:hover { background: #e6f7ff; }
.acl-add-student-item.selected { background: #bae7ff; font-weight: 600; }
.acl-add-student-item-name { font-size: 14px; color: #333; }
.acl-add-student-item-id { font-size: 12px; color: #999; }

.acl-form-hint { font-size: 12px; color: #999; margin: 4px 0 8px; }

/* ── 加载/空状态 ─────────────────────────────────────── */
.acl-loading, .acl-empty {
  text-align: center; padding: 40px 20px; color: #999; font-size: 14px;
}

/* ── 分页 ────────────────────────────────────────────── */
.acl-pagination { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 10px; font-size: 14px; color: #666; border-top: 1px solid #f0f0f0; }

/* ── 隐藏 ────────────────────────────────────────────── */
.acl-hidden { display: none !important; }

/* ── 弹窗 ────────────────────────────────────────────── */
.acl-modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.45); display: flex;
  align-items: center; justify-content: center; z-index: 9999;
}
.acl-modal {
  background: #fff; border-radius: 10px; width: 600px; max-width: 95vw; max-height: 85vh; overflow-y: auto;
  box-shadow: 0 6px 30px rgba(0,0,0,0.15);
}
.acl-modal-wide { width: 720px; }
.acl-modal-header { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; position: sticky; top: 0; background: #fff; z-index: 1; }
.acl-modal-header h3 { margin: 0; font-size: 17px; font-weight: 600; }
.acl-modal-content { padding: 20px; }
.acl-modal-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid #f0f0f0; position: sticky; bottom: 0; background: #fff; }

/* ── 表单 ────────────────────────────────────────────── */
.acl-form { }
.acl-form-group { margin-bottom: 14px; }
.acl-form-group label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 500; color: #555; }
.acl-form-row { display: flex; gap: 12px; }
.acl-form-row .acl-form-group { flex: 1; }
.acl-required { color: #ff4d4f; }

/* ── 响应式 ──────────────────────────────────────────── */
@media (max-width: 1200px) {
  .acl-right-panel { width: 280px; }
  .acl-left-panel { width: 280px; }
}

@media (max-width: 992px) {
  .acl-layout { flex-direction: column; }
  .acl-left-panel { width: 100%; max-height: 300px; }
  .acl-right-panel { width: 100%; max-height: 300px; }
  .acl-stats { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .acl-toolbar { flex-direction: column; }
  .acl-form-row { flex-direction: column; }
  .acl-modal { width: 95vw; }
  .acl-modal-wide { width: 95vw; }
  .acl-stats { grid-template-columns: repeat(2, 1fr); }
  .acl-detail-actions { flex-direction: column; }
}
