/* ============================================================================
 * 班级日常（老师端「班级日常」模块 + 学生端「课堂记录」）专用样式
 *
 * 为什么单开一份：这一块有自己的一套小部件（课次行、到勤按钮组、图片墙、
 * 视频卡、拍照取景框），塞进 app.css 会把那份已经很大的文件继续撑大。
 * 所有类名统一加 dl- 前缀，避免和 app.css / text.css / show.css / meet.css 撞车。
 * 基础件（.card / .card-head / .btn / .tag / .empty / .loading）继续复用 app.css。
 * ========================================================================== */

/* ---------- 数字块 ---------- */
.dl-nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(94px, 1fr)); gap: 8px; }
.dl-num { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; }
.dl-num em { display: block; font-style: normal; font-size: 11.5px; color: var(--dim); margin-bottom: 2px; }
.dl-num b { font-size: 19px; font-weight: 600; line-height: 1.2; }
.dl-num small { font-size: 11px; color: var(--dim); font-weight: 400; margin-left: 2px; }
.dl-num.ok b { color: var(--ok); }
.dl-num.warn b { color: var(--warn); }
.dl-num.bad b { color: var(--danger); }

/* ---------- 课次列表 ---------- */
.dl-cl { display: grid; gap: 8px; }
.dl-crow { display: grid; grid-template-columns: 108px 72px 1fr auto; gap: 10px; align-items: center;
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; background: #fff;
  cursor: pointer; transition: .15s; }
.dl-crow:hover { border-color: #c9d8f5; background: #fafcff; }
.dl-crow.on { border-color: var(--brand); background: var(--brand-soft); }
.dl-crow .d { font-size: 12.5px; color: var(--mut); }
.dl-crow .t { display: block; font-weight: 600; font-size: 13.5px; }
.dl-crow .m { display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.dl-crow .x { font-size: 11.5px; color: var(--dim); }
@media (max-width: 700px) {
  .dl-crow { grid-template-columns: 1fr auto; }
  .dl-crow .t { grid-column: 1 / -1; }
}

/* ---------- 到勤打卡 ---------- */
.dl-att { display: grid; gap: 6px; }
.dl-arow { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line);
  border-radius: 10px; padding: 7px 10px; background: #fff; flex-wrap: wrap; }
.dl-arow .nm { font-weight: 600; min-width: 70px; font-size: 13.5px; }
.dl-arow .ops { display: flex; gap: 5px; margin-left: auto; flex-wrap: wrap; }
.dl-abtn { appearance: none; font-family: inherit; font-size: 12px; line-height: 1; padding: 6px 9px;
  border-radius: 8px; border: 1px solid var(--line); background: #fff; color: var(--mut); cursor: pointer; }
.dl-abtn:hover { border-color: #c9d8f5; }
.dl-abtn.present.on { background: var(--ok); border-color: var(--ok); color: #fff; font-weight: 600; }
.dl-abtn.leave.on { background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 600; }
.dl-abtn.absent.on, .dl-abtn.lost.on { background: var(--danger); border-color: var(--danger); color: #fff; font-weight: 600; }
.dl-abtn:disabled { opacity: .5; cursor: not-allowed; }
.dl-arow.s-leave { background: #fffbf2; }
.dl-arow.s-absent, .dl-arow.s-lost { background: #fff6f6; }
.dl-selfie { display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; color: var(--ok);
  background: var(--ok-soft); padding: 2px 7px; border-radius: 20px; cursor: pointer; border: 0;
  font-family: inherit; }
.dl-selfie:hover { text-decoration: underline; }

/* ---------- 表格 ---------- */
.dl-tw { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; overflow-x: auto; }
.dl-tw table { border-collapse: collapse; width: 100%; font-size: 13px; }
.dl-tw th, .dl-tw td { padding: 8px 10px; text-align: left; border-bottom: 1px solid var(--line2); vertical-align: top; }
.dl-tw th { background: #fafbfd; font-weight: 600; font-size: 12px; color: var(--mut); white-space: nowrap; }
.dl-tw tbody tr:last-child td { border-bottom: none; }

/* ---------- 图片墙 ---------- */
.dl-pics { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; margin-top: 6px; }
.dl-pics img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 8px;
  border: 1px solid var(--line); cursor: zoom-in; background: #eef2f7; }
.dl-picwrap { position: relative; }
.dl-picwrap .del { position: absolute; top: 3px; right: 3px; width: 21px; height: 21px; border-radius: 50%;
  background: rgba(0, 0, 0, .6); color: #fff; font-size: 13px; display: flex; align-items: center;
  justify-content: center; cursor: pointer; line-height: 1; border: 0; padding: 0; }

/* ---------- 视频卡 ---------- */
/* 栏目分组（2026-10-20：上传分「班级合照+趣味课堂 / 上秀风采 / 重要视频」三个栏目） */
.dl-vgrp { margin-bottom: 14px; }
.dl-vgrp:last-of-type { margin-bottom: 0; }
.dl-vgrp-h { display: flex; align-items: baseline; justify-content: space-between; gap: 8px;
  padding: 6px 10px; background: var(--brand-soft); border: 1px solid var(--line);
  border-radius: 8px 8px 0 0; font-size: 13px; font-weight: 600; color: var(--brand-deep); }
.dl-vgrp-e { padding: 8px 10px; border: 1px dashed var(--line); border-top: 0;
  border-radius: 0 0 8px 8px; }
.dl-vgrp .dl-vlist { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 8px 8px; padding: 8px; }
.dl-vgrp .dl-vcard { border: 0; background: transparent; padding: 0; }

.dl-vlist { display: grid; gap: 8px; }
.dl-vcard { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line);
  border-radius: 10px; padding: 8px; background: #fff; }
.dl-vthumb { flex: 0 0 104px; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden; background: #1c2533;
  position: relative; cursor: pointer; border: 0; padding: 0; }
.dl-vthumb .pl { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  color: #fff; font-size: 20px; }
.dl-vthumb .du { position: absolute; right: 4px; bottom: 3px; font-size: 10.5px; color: #fff;
  background: rgba(0, 0, 0, .55); padding: 0 4px; border-radius: 4px; }
.dl-vbody { min-width: 0; flex: 1; }
.dl-vbody b { display: block; font-size: 13.5px; word-break: break-all; }
@media (max-width: 600px) { .dl-vthumb { flex-basis: 86px; } }

/* ---------- 上传进度条 ---------- */
.dl-up { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: #fafcff; }
.dl-up .bar { height: 8px; border-radius: 5px; background: var(--line2); overflow: hidden; margin-top: 8px; }
.dl-up .bar i { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 5px; transition: width .2s; }

/* ============================================================================
 * 学生端「课堂记录」
 * ========================================================================== */

.dl-hero { background: linear-gradient(135deg, #6f8cff 0%, #4a63d8 100%); color: #fff;
  border: 0; border-radius: 14px; padding: 14px; }
.dl-hero b { font-size: 16px; }
.dl-hero .mt { font-size: 12.5px; opacity: .92; margin-top: 3px; }
.dl-hero .st { display: inline-block; margin-top: 9px; background: rgba(255, 255, 255, .22);
  border-radius: 20px; padding: 3px 10px; font-size: 12px; }

.dl-steps { display: grid; gap: 8px; }
.dl-stp { display: flex; align-items: center; gap: 9px; font-size: 12.5px; border: 1px solid var(--line);
  border-radius: 10px; padding: 9px 10px; background: #fff; width: 100%; text-align: left;
  font-family: inherit; cursor: pointer; }
.dl-stp:hover { border-color: #c9d8f5; }
.dl-stp .ic { font-size: 17px; }
.dl-stp .tx { flex: 1; min-width: 0; }
.dl-stp .tx b { display: block; font-size: 13px; }
.dl-stp .tx em { font-style: normal; display: block; font-size: 11.5px; color: var(--dim); }

.dl-bigbtn { width: 100%; appearance: none; font-family: inherit; font-size: 15px; font-weight: 600;
  padding: 13px; border-radius: 12px; border: 0; background: var(--brand); color: #fff; cursor: pointer; }
.dl-bigbtn.gray { background: #eef2f7; color: var(--mut); }
.dl-bigbtn:disabled { opacity: .6; cursor: not-allowed; }

/* 拍照取景框 */
.dl-cam { position: relative; width: 100%; aspect-ratio: 3 / 4; background: #111; border-radius: 12px;
  overflow: hidden; display: flex; align-items: center; justify-content: center; }
.dl-cam video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.dl-cam img { width: 100%; height: 100%; object-fit: cover; }
.dl-cam .guide { position: absolute; top: 12%; left: 50%; transform: translateX(-50%); width: 62%;
  height: 52%; border: 3px dashed rgba(255, 255, 255, .78); border-radius: 50%; pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .14); }
.dl-cam .hint { position: absolute; bottom: 14px; left: 0; right: 0; text-align: center;
  color: rgba(255, 255, 255, .92); font-size: 12px; padding: 0 12px; }
.dl-cam .ph { color: rgba(255, 255, 255, .9); text-align: center; padding: 22px; font-size: 13px; line-height: 1.7; }
.dl-shutter { position: absolute; bottom: 44px; left: 50%; transform: translateX(-50%); width: 60px;
  height: 60px; border-radius: 50%; border: 4px solid #fff; background: rgba(255, 255, 255, .92);
  cursor: pointer; box-shadow: 0 0 0 4px rgba(0, 0, 0, .25); padding: 0; }
.dl-shutter:active { transform: translateX(-50%) scale(.94); }
.dl-shutter:disabled { opacity: .5; }

/* 选图 / 加图 */
.dl-addtile { aspect-ratio: 1 / 1; border: 2px dashed var(--line); border-radius: 8px; display: flex;
  flex-direction: column; align-items: center; justify-content: center; color: var(--dim);
  cursor: pointer; font-size: 24px; background: #fff; padding: 0; font-family: inherit; }
.dl-addtile span { font-size: 11.5px; }

.dl-note { background: #f6f9ff; border: 1px solid #d9e5ff; border-radius: 10px; padding: 9px 11px;
  font-size: 12px; color: #4f6291; margin-top: 10px; }
.dl-kv { display: grid; grid-template-columns: auto 1fr; gap: 4px 12px; font-size: 12.5px; margin: 0; }
.dl-kv dt { color: var(--dim); white-space: nowrap; }
.dl-kv dd { margin: 0; }
.dl-hide { display: none !important; }

/* ---------- 往期课堂：一节一节点开 ---------- */
/* 照片缩略图（.dl-vthumb 原本是给视频用的黑底 ▶） */
.dl-vthumb.pic { background: #eef2f7; }
.dl-vthumb.pic img { width: 100%; height: 100%; object-fit: cover; display: block; }

.dl-hist { display: grid; gap: 8px; }
.dl-hitem { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; }
.dl-hitem.on { border-color: var(--brand); }
.dl-hhead { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left;
  background: #fff; border: 0; padding: 10px 11px; cursor: pointer; font-family: inherit; }
.dl-hhead:hover { background: #fafcff; }
.dl-hitem.on .dl-hhead { background: var(--brand-soft); }
.dl-hhead .tx { flex: 1; min-width: 0; }
.dl-hhead .tx b { display: block; font-size: 13.5px; }
.dl-hhead .tx em { font-style: normal; display: block; font-size: 11.5px; color: var(--dim); margin-top: 2px; }
.dl-hhead .tg { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.dl-hhead .chev { font-size: 13px; }
.dl-hbody { border-top: 1px solid var(--line2); padding: 10px 11px; background: #fcfdff; }
.hp-blk + .hp-blk { margin-top: 12px; }
.hp-t { font-size: 12px; font-weight: 600; color: var(--mut); margin-bottom: 5px; }
.hp-img { max-width: 168px; width: 100%; border-radius: 10px; border: 1px solid var(--line);
  display: block; cursor: zoom-in; background: #eef2f7; }
@media (max-width: 600px) {
  .dl-hhead { flex-wrap: wrap; }
  .dl-hhead .tg { justify-content: flex-start; }
}

/* ---------- 日精进也能交视频 ---------- */
/* 图片墙里混排视频：一个视频占两格，按 16:9 显示并自带播放条 —— 点一下就能回看 */
.dl-pics video { width: 100%; aspect-ratio: 16 / 9; border-radius: 8px;
  border: 1px solid var(--line); background: #000; display: block; }
.dl-pics > video, .dl-picwrap.vid { grid-column: span 2; }
/* 老师端台账里视频缩略跟图片一样占一格，点一下弹出来播 */
.dl-pics .dl-vthumb { flex: none; width: 100%; aspect-ratio: 1 / 1; }

/* ===== 老师回复日精进（2026-10-19）—— 老师端台账 / 学生端课堂记录共用 ===== */
.dl-reply { margin-top: 10px; border: 1px solid var(--line); border-left: 4px solid var(--brand);
  background: var(--brand-soft); border-radius: 8px; padding: 8px 10px; }
.dl-reply.stu { margin-top: 12px; }
.dl-reply-h { font-size: 12px; font-weight: 600; color: var(--brand-deep); margin-bottom: 4px; }
.dl-reply-v { font-size: 13px; color: #1b2430; white-space: pre-wrap; word-break: break-word; }
/* 回复弹窗里引用的学生原文 */
.dl-quote { background: #f6f8fc; border: 1px solid var(--line); border-radius: 8px;
  padding: 10px 12px; white-space: pre-wrap; word-break: break-word; }

/* 这份日精进被改过几次（2026-10-24：次数上限取消后留给老师看的痕迹）。
   默认很淡，改得多（≥3 次）才转成黄字提个醒。 */
.dl-editn { margin-top: 4px; font-size: 11px; color: var(--mut); white-space: nowrap; }
.dl-editn.many { color: var(--warn); }

/* 视频在这台手机上放不出来时（mkv/avi 这类容器）替掉黑框的那句话。
   默认不显示，video 的 onerror 把它打开。 */
.dl-vbad { display: none; font-size: 11px; line-height: 1.6; color: var(--danger);
  background: var(--danger-soft); border-radius: 8px; padding: 6px 8px; }
