/* homeroom-tools.css — 班主任工具 (完整视觉版) */

#homeroom-tools { display: none; }
#homeroom-tools.active { display: block; }

.ht-inner { max-width: 1000px; margin: 0 auto; padding: 24px 16px; }

.ht-header { margin-bottom: 20px; }
.ht-header h2 { font-size: 24px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.ht-header p { font-size: 14px; color: var(--text-secondary); }

/* 子分类 tabs */
.ht-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.ht-tab { padding: 7px 18px; border-radius: 20px; font-size: 13px; font-weight: 500; cursor: pointer; background: white; border: 1px solid var(--border); color: var(--text-secondary); transition: all 0.2s var(--ease-out); }
.ht-tab:hover { border-color: var(--brand-300); color: var(--brand-600); }
.ht-tab.active { background: #D6F3EA; color: #2D7365; border-color: transparent; font-weight: 600; }

/* 工具卡片网格 — 大图框卡片（与老师工具箱一致） */
.ht-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 12px; }
@media (min-width: 640px) { .ht-grid { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (min-width: 768px) { .ht-grid { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; } }

.ht-card {
    position: relative;
    background: #FFFFFF; border-radius: 16px; padding: 16px;
    border: 1px solid #e5e7eb;
    display: flex; flex-direction: column; gap: 12px;
    text-align: left; cursor: pointer;
    transition: all 0.15s ease;
}
.ht-card:hover {
    border-color: #F5DEB3; box-shadow: 0 4px 12px rgba(0,0,0,.06);
    transform: translateY(-1px);
}
.ht-card:active { transform: scale(0.97); }

.ht-card-icon { width: 48px; height: 48px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 24px; flex-shrink: 0; }

.ht-card-name-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.ht-card-name { font-size: 14px; font-weight: 700; color: #111827; line-height: 1.4; }
.ht-card:hover .ht-card-name { color: #e06020; }

.ht-card-desc { font-size: 12px; color: #9ca3af; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }

.ht-card-enter { font-size: 11px; color: #9ca3af; margin-top: auto; padding-top: 4px; transition: color 0.2s; }
.ht-card:hover .ht-card-enter { color: #e06020; }

.ht-card-tag { font-size: 10px; font-weight: 600; padding: 1px 6px; border-radius: 999px; white-space: nowrap; position: static; width: auto; }
.ht-card-tag.tag-free { background: #D6F3EA; color: #2D7365; }
.ht-card-tag.tag-new { background: #FEF3C7; color: #92400E; }
.ht-card-tag.tag-wip { background: #EDE9FE; color: #6D28D9; }
.ht-card.ht-card-wip .ht-card-icon { filter: grayscale(0.35); opacity: 0.85; }
.ht-card.ht-card-wip .ht-card-enter { color: #a5a5a5; }

/* ============ 通用面板 ============ */
.ht-panel { display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 500; align-items: flex-start; justify-content: center; backdrop-filter: blur(4px); padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ht-panel.active { display: flex !important; }

.ht-panel-box { background: white; border-radius: 20px; width: 560px; max-height: calc(100vh - 48px); overflow-y: auto; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.15); margin: auto; }

.ht-panel-header { padding: 18px 24px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid var(--border); }
.ht-panel-header h3 { font-size: 16px; font-weight: 600; color: var(--text-primary); }
.ht-panel-close { width: 32px; height: 32px; border: none; background: var(--bg-subtle); border-radius: 50%; cursor: pointer; font-size: 16px; color: #999; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.ht-panel-close:hover { background: #fee2e2; color: #dc2626; }

.ht-panel-body { padding: 24px; flex: 1; }

.ht-panel-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; gap: 12px; justify-content: center; }

/* 通用按钮 */
.ht-btn { padding: 12px 24px; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; border: none; }
.ht-btn-primary { background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #FFFFFF; box-shadow: 0 4px 12px rgba(79, 70, 229,0.3); }
.ht-btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(79, 70, 229,0.4); }
.ht-btn-secondary { background: white; border: 1px solid var(--border); color: var(--text-secondary); }
.ht-btn-secondary:hover { border-color: var(--brand-300); color: var(--brand-600); background: var(--brand-50); }

/* ============ 课程表 ============ */
.schedule-grid { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.schedule-grid th, .schedule-grid td { border: 1px solid var(--border); padding: 10px 8px; font-size: 13px; text-align: center; }
.schedule-grid th { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.schedule-grid td { cursor: pointer; min-width: 60px; transition: background 0.15s; }
.schedule-grid td:hover { background: var(--brand-50); }
.schedule-grid td.has-class { background: #FEF3C7; color: #92400E; font-weight: 500; }

/* ============ 座位表 ============ */
.seating-container { display: flex; flex-direction: column; align-items: center; }
.seating-stage { background: linear-gradient(135deg, var(--brand-50), var(--brand-100)); padding: 10px 60px; border-radius: 12px; font-size: 14px; color: var(--brand-600); margin-bottom: 16px; font-weight: 600; letter-spacing: 4px; }
.seating-grid { display: grid; gap: 8px; justify-content: center; }
.seating-seat { width: 60px; height: 40px; border-radius: 10px; border: 1px solid var(--border); background: white; display: flex; align-items: center; justify-content: center; font-size: 12px; cursor: pointer; transition: all 0.2s; }
.seating-seat:hover { border-color: var(--brand-300); background: var(--brand-50); transform: scale(1.05); }
.seating-seat.empty { background: var(--bg-subtle); color: var(--text-tertiary); }
.seating-seat.occupied { background: #FEF3C7; color: #92400E; border-color: #FCD34D; }

/* 座位表工具栏 */
.seating-toolbar { width: 100%; margin-bottom: 12px; }
.seating-layout-controls { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; background: #f9fafb; border-radius: 12px; padding: 10px 16px; border: 1px solid #e5e7eb; }
.seating-layout-label { font-size: 13px; font-weight: 600; color: #6b7280; margin-right: 4px; }
.seating-layout-item { display: flex; align-items: center; gap: 4px; }
.seating-lbl { font-size: 12px; color: #9ca3af; margin-right: 2px; }
.seating-layout-btn { width: 28px; height: 28px; border-radius: 8px; border: 1px solid #d0d5dd; background: white; cursor: pointer; font-size: 16px; font-weight: 600; color: #4B5563; display: flex; align-items: center; justify-content: center; transition: all 0.15s; line-height: 1; }
.seating-layout-btn:hover { background: #eef2ff; border-color: var(--brand-300); color: var(--brand-600); }
.seating-layout-val { min-width: 28px; text-align: center; font-size: 15px; font-weight: 700; color: #111827; }
.seating-apply-btn { padding: 6px 16px; border-radius: 8px; border: none; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #FFFFFF; font-size: 12px; font-weight: 600; cursor: pointer; transition: all 0.15s; margin-left: 4px; }
.seating-apply-btn:hover { transform: translateY(-1px); box-shadow: 0 2px 8px rgba(79, 70, 229,0.3); }
.seating-clear-btn { padding: 6px 12px; border-radius: 8px; border: 1px solid #e5e7eb; background: white; color: #ef4444; font-size: 12px; cursor: pointer; transition: all 0.15s; margin-left: auto; }
.seating-clear-btn:hover { background: #fef2f2; border-color: #fca5a5; }
/* 信息条 */
.seating-info-bar { text-align: center; font-size: 12px; color: #9ca3af; margin-bottom: 8px; }
.seating-info-bar strong { color: var(--brand-600); }
/* 学生选择弹窗 */
.seating-picker-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; backdrop-filter: blur(4px); }
.seating-picker-box { background: white; border-radius: 16px; width: 380px; max-height: 70vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0,0,0,0.2); overflow: hidden; }
.seating-picker-header { padding: 16px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #e5e7eb; font-size: 15px; font-weight: 700; color: #111827; }
.seating-picker-close { width: 28px; height: 28px; border-radius: 50%; border: none; background: #f3f4f6; cursor: pointer; font-size: 14px; color: #9ca3af; display: flex; align-items: center; justify-content: center; transition: all 0.15s; }
.seating-picker-close:hover { background: #fee2e2; color: #dc2626; }
.seating-picker-search { padding: 12px 20px; border-bottom: 1px solid #f3f4f6; }
.seating-picker-search input { width: 100%; padding: 8px 12px; border: 1px solid #e5e7eb; border-radius: 10px; font-size: 13px; outline: none; box-sizing: border-box; transition: border-color 0.15s; }
.seating-picker-search input:focus { border-color: var(--brand-400); box-shadow: 0 0 0 3px rgba(79, 70, 229,0.15); }
.seating-picker-list { flex: 1; overflow-y: auto; padding: 8px; display: flex; flex-direction: column; gap: 2px; }
.seating-picker-item { padding: 10px 14px; border-radius: 10px; cursor: pointer; font-size: 14px; color: #374151; transition: all 0.12s; display: flex; align-items: center; gap: 6px; }
.seating-picker-item:hover { background: #f3f4f6; }
.seating-picker-item.current-seat { background: #fef3c7; font-weight: 600; }
.seating-picker-item.already-seated { opacity: 0.5; }
.seating-picker-item .seating-picker-sid { font-size: 12px; color: #9ca3af; }
.seating-picker-item .seating-picker-badge { font-size: 10px; padding: 1px 6px; border-radius: 999px; background: #e5e7eb; color: #6b7280; font-weight: 600; margin-left: auto; }
.seating-picker-item .seating-picker-badge.current { background: #fef3c7; color: #92400e; }
.seating-picker-item.remove-item { border-bottom: 1px solid #f3f4f6; margin-bottom: 4px; color: #ef4444; font-weight: 500; }
.seating-picker-item.remove-item:hover { background: #fef2f2; }
.seating-picker-item .seating-picker-check { margin-left: auto; }

/* ============ 签到 ============ */
.checkin-list { display: flex; flex-direction: column; gap: 8px; }
.checkin-row { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-radius: 12px; background: var(--bg-subtle); transition: background 0.2s; }
.checkin-row:hover { background: #f0f0f0; }
.checkin-name { flex: 1; font-size: 14px; color: var(--text-primary); font-weight: 500; }
.checkin-status { font-size: 12px; font-weight: 500; padding: 4px 14px; border-radius: 14px; cursor: pointer; transition: all 0.2s; }
.checkin-status.present { background: #D6F3EA; color: #2D7365; }
.checkin-status.absent { background: #FEE2E2; color: #991B1B; }
.checkin-status.late { background: #FEF3C7; color: #92400E; }
.checkin-status:hover { transform: scale(1.05); }

/* ============ 值日表 ============ */
.duty-grid { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.duty-grid th, .duty-grid td { border: 1px solid var(--border); padding: 6px; font-size: 13px; text-align: center; }
.duty-grid th { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.duty-grid td { cursor: pointer; transition: background 0.15s; min-width: 70px; }
.duty-grid td.duty-empty { color: #9ca3af; background: #f9fafb; font-size: 14px; }
.duty-grid td.duty-occupied { background: #FFFBEB; color: #92400E; font-weight: 500; }
.duty-grid td:hover { background: var(--brand-50) !important; }
.duty-tag { display: inline-block; background: #FEF3C7; padding: 1px 8px; border-radius: 6px; font-size: 12px; margin: 1px; color: #92400E; font-weight: 600; }
.duty-plus { font-size: 16px; }
.duty-picker-cancel-btn:hover { background: #f3f4f6; }

/* ============ 奖状生成器 ============ */
.certificate-preview { border: 3px solid #DAA520; border-radius: 16px; padding: 40px 30px; text-align: center; background: linear-gradient(135deg, #FFF8E7, #FFFDF5); min-height: 300px; box-shadow: 0 4px 20px rgba(218,165,32,0.15); }
.certificate-title { font-size: 28px; font-weight: 700; color: #DAA520; margin-bottom: 8px; letter-spacing: 4px; }
.certificate-subtitle { font-size: 14px; color: #666; margin-bottom: 20px; }
.certificate-name { font-size: 24px; font-weight: 600; color: var(--text-primary); margin-bottom: 12px; }
.certificate-content { font-size: 16px; color: #555; margin-bottom: 20px; line-height: 1.8; }
.certificate-date { font-size: 14px; color: #888; }
.certificate-seal { font-size: 36px; margin-top: 16px; }

/* ============ 班级公约 ============ */
.convention-list { display: flex; flex-direction: column; gap: 10px; }
.convention-item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: white; border: 1px solid var(--border); transition: all 0.2s; }
.convention-item:hover { border-color: var(--brand-200); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.convention-num { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--brand-400), var(--brand-600)); color: #FFFFFF; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.convention-text { font-size: 14px; color: var(--text-primary); flex: 1; line-height: 1.5; }

/* ============ 作业完成情况表 ============ */
.hw-table { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.hw-table th, .hw-table td { border: 1px solid var(--border); padding: 6px 8px; font-size: 13px; text-align: center; }
.hw-table th { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.hw-table td { cursor: pointer; min-width: 40px; transition: background 0.15s; }
.hw-table td:hover { background: var(--bg-subtle); }
.hw-done { background: #F0FDF4; }
.hw-miss { background: #FEF2F2; }

/* ============ 未交作业欠条 ============ */
.debt-item { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px; border-radius: 12px; background: white; border: 1px solid var(--border); margin-bottom: 10px; transition: all 0.2s; }
.debt-item:hover { border-color: var(--brand-200); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.debt-info { display: flex; gap: 12px; align-items: center; }
.debt-student { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.debt-subject { font-size: 13px; color: var(--brand-600); background: var(--brand-50); padding: 2px 10px; border-radius: 10px; }
.debt-date { font-size: 12px; color: var(--text-secondary); margin-left: auto; }
.debt-reason { font-size: 13px; color: var(--text-secondary); padding-left: 4px; }
.debt-clear { padding: 4px 16px; border-radius: 8px; border: 1px solid var(--brand-300); background: white; color: var(--brand-600); font-size: 12px; cursor: pointer; align-self: flex-end; transition: all 0.2s; }
.debt-clear:hover { background: var(--brand-50); transform: scale(1.02); }

/* ============ 一日常规表（可编辑打印版）============ */
.routine-header-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.routine-print-btn { padding: 8px 20px; background: #28a745; color: #FFFFFF; border: none; border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 600; transition: background 0.2s; }
.routine-print-btn:hover { background: #218838; }
.routine-desc { text-align: center; color: #888; font-size: 12px; margin-bottom: 12px; }
.routine-modules { }
.rule-item { position: relative; display: flex; margin-bottom: 10px; background: #fff; border-radius: 8px; border: 1px solid #e5e7eb; overflow: hidden; }
.rule-title { flex: 0 0 100px; display: flex; justify-content: center; align-items: center; padding: 12px; color: #111827; text-align: center; font-size: 1.3em; font-weight: 600; outline: none; }
.rule-content { flex: 1; padding: 12px 16px; line-height: 1.6; font-size: 13px; outline: none; }
.rule-title:focus, .rule-content:focus { outline: 2px solid #007bff; box-shadow: inset 0 0 5px rgba(0,123,255,0.5); }
.rule-content ol, .rule-content ul { padding-left: 22px; margin: 0; }
.rule-content li { margin-bottom: 4px; }
.rule-content p { margin: 4px 0; }
.sub-list { margin-top: 4px; padding-left: 18px; list-style-type: disc; }
.no-marker-list { list-style-type: none; padding-left: 0; }
.delete-module-btn { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; line-height: 22px; text-align: center; background: rgba(0,0,0,0.3); color: #FFFFFF; border: none; border-radius: 50%; cursor: pointer; font-size: 14px; opacity: 0; transition: opacity 0.3s; z-index: 5; }
.rule-item:hover .delete-module-btn { opacity: 1; }
.delete-module-btn:hover { background: #dc3545; }
/* 标题颜色 */
.title-prep, .title-arrival, .title-class { background-color: #4a90e2; }
.title-recess, .title-exercises, .title-club { background-color: #4caf50; }
.title-noon { background-color: #f44336; }
.title-afternoon { background-color: #ffb300; }
.title-dresscode { background-color: #4a90e2; }
.title-hygiene { background-color: #1abc9c; }
.title-custom-1 { background-color: #9b59b6; } .title-custom-2 { background-color: #3498db; }
.title-custom-3 { background-color: #1abc9c; } .title-custom-4 { background-color: #e67e22; }
.title-custom-5 { background-color: #2ecc71; } .title-custom-6 { background-color: #e74c3c; }
.title-custom-7 { background-color: #34495e; } .title-custom-8 { background-color: #f1c40f; }
/* 打印样式 */
@media print {
  .ht-panel-header, .ht-panel-close, .routine-print-btn, .routine-desc, .delete-module-btn, #routine-hover-add { display: none !important; }
  #ht-panel-daily-routine.active { display: block !important; position: static !important; background: none !important; backdrop-filter: none !important; }
  .ht-panel-box { box-shadow: none !important; width: 100% !important; max-height: none !important; border-radius: 0 !important; }
  .ht-panel-body { padding: 0 !important; }
  .rule-item { border: 1px solid #000 !important; margin-bottom: -1px !important; break-inside: avoid; page-break-inside: avoid; border-radius: 0 !important; }
  .rule-title { -webkit-print-color-adjust: exact; print-color-adjust: exact; flex: 0 0 80px; padding: 8px; font-size: 1.1em; }
  .rule-content { padding: 6px 12px; font-size: 9pt; line-height: 1.35; }
  .rule-content ol, .rule-content ul { padding-left: 18px; margin: 4px 0; }
  .rule-content li { margin-bottom: 2px; }
  body { background: white; }
}

/* ============ 奖品券 ============ */
.coupon-preview { border: 2px dashed #DAA520; border-radius: 16px; padding: 30px 24px; text-align: center; background: linear-gradient(135deg, #FFFBEB, #FFFDF5); }
.coupon-title { font-size: 22px; font-weight: 700; color: #DAA520; margin-bottom: 16px; letter-spacing: 2px; }
.coupon-body { }
.coupon-to { font-size: 20px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.coupon-prize { font-size: 18px; color: var(--brand-600); margin-bottom: 12px; }
.coupon-date { font-size: 13px; color: var(--text-secondary); }
.coupon-stamp { font-size: 40px; margin-top: 12px; }

/* ============ 批量评语 ============ */
.comment-row { display: flex; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); align-items: center; transition: background 0.15s; }
.comment-row:hover { background: var(--bg-subtle); }
.comment-name { font-weight: 600; font-size: 14px; min-width: 60px; color: var(--text-primary); }
.comment-text { font-size: 14px; color: var(--text-secondary); flex: 1; line-height: 1.5; }

/* ============ 家长通知 ============ */
.notice-preview { border: 1px solid var(--border); border-radius: 12px; padding: 24px; margin-top: 16px; background: white; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.notice-preview-title { font-size: 18px; font-weight: 700; text-align: center; margin-bottom: 16px; color: var(--text-primary); }
.notice-preview-body { font-size: 14px; line-height: 1.8; color: var(--text-secondary); margin-bottom: 20px; }
.notice-preview-footer { font-size: 13px; color: var(--text-tertiary); text-align: right; }

/* ============ 高情商回复 ============ */
.reply-item { padding: 16px; border-radius: 12px; background: white; border: 1px solid var(--border); margin-bottom: 12px; transition: all 0.2s; }
.reply-item:hover { border-color: var(--brand-200); box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.reply-scenario { font-size: 14px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.reply-text { font-size: 14px; color: var(--text-secondary); line-height: 1.7; margin-bottom: 10px; padding: 8px 12px; background: var(--bg-subtle); border-radius: 8px; }
.reply-copy { padding: 6px 16px; border-radius: 8px; border: 1px solid var(--brand-300); background: white; color: var(--brand-600); font-size: 12px; cursor: pointer; transition: all 0.2s; }
.reply-copy:hover { background: var(--brand-50); }

/* ============ 德育案例 ============ */
.moral-item { padding: 16px; border-radius: 12px; background: white; border: 1px solid var(--border); margin-bottom: 12px; transition: all 0.2s; }
.moral-item:hover { border-color: var(--brand-200); }
.moral-title { font-size: 15px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.moral-desc { font-size: 14px; color: var(--text-secondary); line-height: 1.6; margin-bottom: 8px; }
.moral-lesson { font-size: 13px; color: var(--brand-600); background: var(--brand-50); padding: 10px 12px; border-radius: 8px; line-height: 1.5; }

/* ============ 家访记录 ============ */
.visit-item { position: relative; padding: 16px; border-radius: 12px; background: white; border: 1px solid var(--border); margin-bottom: 10px; transition: all 0.2s; }
.visit-item:hover { border-color: var(--brand-200); }
.visit-header { display: flex; justify-content: space-between; margin-bottom: 8px; }
.visit-header span:first-child { font-weight: 600; font-size: 14px; color: var(--text-primary); }
.visit-header span:last-child { font-size: 12px; color: var(--text-secondary); }
.visit-reason { font-size: 13px; color: var(--text-secondary); margin-bottom: 6px; }
.visit-note { font-size: 13px; color: var(--text-primary); line-height: 1.6; padding: 8px 12px; background: var(--bg-subtle); border-radius: 8px; }
.visit-del { position: absolute; top: 8px; right: 8px; width: 26px; height: 26px; border: none; background: var(--bg-subtle); border-radius: 50%; cursor: pointer; font-size: 12px; color: #999; display: flex; align-items: center; justify-content: center; transition: all 0.2s; }
.visit-del:hover { background: #FEE2E2; color: #DC2626; }

/* ============ 班委分工表 ============ */
.committee-table { width: 100%; border-collapse: collapse; border-radius: 12px; overflow: hidden; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.committee-table th, .committee-table td { border: 1px solid var(--border); padding: 10px 12px; font-size: 14px; text-align: center; }
.committee-table th { background: var(--brand-50); color: var(--brand-600); font-weight: 600; }
.committee-table td { cursor: pointer; transition: background 0.15s; }
.committee-table td:hover { background: var(--bg-subtle); }
.committee-table td:first-child { font-weight: 600; color: var(--text-primary); }

/* ============ 班委分工表（新）============ */
.cm-toolbar { text-align: right; margin-bottom: 8px; }
.cm-print-btn { padding: 6px 16px; background: #28a745; color: #FFFFFF; border: none; border-radius: 8px; cursor: pointer; font-size: 13px; font-weight: 600; }
.cm-print-btn:hover { background: #218838; }
.cm-title { text-align: center; font-size: 18px; color: #333; margin: 0 0 6px 0; padding: 6px; border-radius: 6px; outline: none; }
.cm-title:hover { background: #e9f5ff; }
.cm-title:focus { outline: 2px solid #007bff; background: #fff; }
.cm-hint { text-align: center; color: #888; font-size: 12px; margin-bottom: 12px; }
.cm-table { width: 100%; border-collapse: collapse; }
.cm-table th, .cm-table td { border: 1px solid #d0d5dd; padding: 8px 10px; font-size: 13px; text-align: center; vertical-align: middle; }
.cm-table th { background: #f2f2f2; font-weight: 600; color: #333; position: sticky; top: 0; z-index: 2; }
.cm-col-seq { width: 8%; } .cm-col-pos { width: 20%; } .cm-col-name { width: 18%; } .cm-col-duty { width: 54%; text-align: left; }
.cm-handle { cursor: pointer; user-select: none; font-weight: 600; color: #666; }
.cm-handle:hover { background: #e9f5ff !important; font-weight: bold; color: #007bff; }
.cm-table td[contenteditable="true"]:hover { background: #f8f8f8; }
.cm-table td[contenteditable="true"]:focus { outline: 2px solid #007bff; background: #fff; }
/* 模态框 */
.cm-modal { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 1000; display: flex; align-items: flex-start; justify-content: center; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.cm-modal-box { background: white; padding: 24px 30px; border-radius: 12px; text-align: center; box-shadow: 0 10px 40px rgba(0,0,0,0.2); }
.cm-modal-box p { margin: 0 0 16px 0; font-size: 16px; font-weight: 600; }
.cm-modal-btn { display: block; width: 100%; padding: 10px 24px; margin: 6px 0; border: 1px solid #d0d5dd; border-radius: 8px; cursor: pointer; font-size: 14px; background: white; transition: all 0.12s; }
.cm-modal-btn:hover { background: #f3f4f6; border-color: var(--brand-300); }
.cm-modal-btn.cm-del-btn { color: #dc3545; border-color: #dc3545; }
.cm-modal-btn.cm-del-btn:hover { background: #fef2f2; }
/* 打印 */
@media print {
  .ht-panel-header, .ht-panel-close, .cm-toolbar, .cm-hint, .cm-modal, #cm-modal { display: none !important; }
  #ht-panel-class-committee.active { display: block !important; position: static !important; background: none !important; }
  .ht-panel-box { box-shadow: none !important; width: 100% !important; max-height: none !important; }
  .ht-panel-body { padding: 0 !important; }
  .cm-table th, .cm-table td { border-color: #000 !important; }
  .cm-table th { background: #f2f2f2 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .cm-title { font-size: 20pt; }
}

/* ============ 课程表弹窗 ============ */
.schedule-edit-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.4); z-index: 600; display: flex; align-items: flex-start; justify-content: center; backdrop-filter: blur(4px); padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.schedule-edit-popup { background: white; border-radius: 20px; padding: 24px; width: 380px; max-width: 92vw; max-height: calc(100vh - 48px); overflow-y: auto; box-shadow: 0 20px 60px rgba(0,0,0,0.15); margin: auto; }
.schedule-subject-group { margin-bottom: 16px; }
.schedule-subject-group:last-child { margin-bottom: 0; }
.schedule-subject-label { font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 10px; padding-left: 2px; }
.schedule-subject-list { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.schedule-subject-btn { flex: 1 0 auto; min-width: 70px; padding: 9px 10px; border-radius: 10px; border: 1px solid #d8dff7; background: white; cursor: pointer; font-size: 14px; color: var(--text-primary); transition: all 0.15s; text-align: center; }
.schedule-subject-btn:hover { background: #f5f7ff; border-color: #a5b4fc; transform: translateY(-1px); }
.schedule-subject-btn.active { background: var(--brand-500); border-color: var(--brand-500); color: #FFFFFF; box-shadow: 0 4px 10px rgba(79,70,229,0.25); }
.schedule-subject-btn.clear { border-color: #FCA5A5; color: #DC2626; background: #fff; }
.schedule-subject-btn.clear:hover { background: #FEF2F2; }
.schedule-subject-btn.clear.active { background: #FEF2F2; border-color: #EF4444; color: #B91C1C; }

/* ============ 施工中弹窗 ============ */
.uc-overlay { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); z-index: 9999; display: flex; align-items: flex-start; justify-content: center; backdrop-filter: blur(4px); animation: ucFadeIn 0.2s ease; padding: 24px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.uc-dialog { background: white; border-radius: 20px; padding: 40px 48px; text-align: center; box-shadow: 0 20px 60px rgba(0,0,0,0.15); min-width: 280px; animation: ucSlideUp 0.25s ease; margin: auto; }
.uc-icon { font-size: 56px; margin-bottom: 12px; animation: ucBounce 1s infinite; }
.uc-name { font-size: 18px; font-weight: 700; color: #111827; margin-bottom: 6px; }
.uc-text { font-size: 14px; color: #9ca3af; margin-bottom: 20px; }
.uc-close { padding: 8px 36px; border-radius: 10px; border: none; background: #D6F3EA; color: #2D7365; font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.uc-close:hover { background: #bce8d8; transform: scale(1.03); }
@keyframes ucFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes ucSlideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }
@keyframes ucBounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 响应式 */
@media (max-width: 600px) {
    .ht-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
    .ht-card { padding: 12px; }
    .ht-card-icon { width: 40px; height: 40px; font-size: 20px; }
    .ht-panel-box { width: 95vw; }
    .hw-table { font-size: 12px; }
    .hw-table th, .hw-table td { padding: 4px 6px; }
}
