/* 启渡教育 · 排课日历 —— 手机优先、大按钮、少文字 */
:root{
  --blue:#1d4e7e;
  --blue-dark:#143a5f;
  --blue-light:#e8f1f8;
  --ink:#1c2733;
  --grey:#8a97a5;
  --grey-light:#eef1f4;
  --green:#1e9e62;
  --red:#d9534f;
  --radius:14px;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"PingFang SC","Hiragino Sans GB","Microsoft YaHei","Noto Sans CJK SC",sans-serif;
  color:var(--ink);
  background:#f6f8fa;
  font-size:16px;
  line-height:1.55;
}

/* ---------- 顶部 ---------- */
.topbar{
  background:var(--blue);
  color:#fff;
  padding:14px 16px 12px;
  text-align:center;
}
.brand{font-size:20px;font-weight:700;letter-spacing:1px}
.brand span{font-size:12px;font-weight:400;opacity:.75;margin-left:4px}
.page-title{font-size:14px;opacity:.85;margin-top:2px}

.demo-banner{
  background:#fff4d6;color:#7a5b00;
  padding:10px 14px;font-size:14px;text-align:center;
  border-bottom:1px solid #f0dfa0;
}

/* ---------- 三个入口 ---------- */
.tabs{
  display:flex;gap:10px;
  padding:12px 12px 4px;
  max-width:640px;margin:0 auto;
}
.tab{
  flex:1;
  min-height:60px;
  border:2px solid var(--blue);
  background:#fff;color:var(--blue);
  border-radius:var(--radius);
  font-size:17px;font-weight:700;line-height:1.3;
  cursor:pointer;
}
.tab.active{background:var(--blue);color:#fff}

main{max-width:640px;margin:0 auto;padding:8px 12px 32px}

/* ---------- 通用块 ---------- */
.card{
  background:#fff;border-radius:var(--radius);
  padding:16px;margin-top:14px;
  box-shadow:0 1px 3px rgba(20,58,95,.08);
}
.step-title{
  font-size:17px;font-weight:700;color:var(--blue-dark);
  margin:0 0 10px;
}
.step-title .no{
  display:inline-block;background:var(--blue);color:#fff;
  width:24px;height:24px;border-radius:50%;
  text-align:center;line-height:24px;font-size:14px;margin-right:6px;
}
.hint{color:var(--grey);font-size:14px;margin:6px 0 0}
/* 日历订阅链接的图文说明（可展开，默认收起） */
.ical-help{
  margin:10px 0 4px;padding:10px 12px;
  border:1px solid var(--grey-light);border-radius:10px;background:#fbfcfd;
}
.ical-help summary{cursor:pointer;font-weight:600;color:var(--blue);font-size:15px}
.ical-help-sec{margin-top:12px}
.ical-help-title{font-weight:700;color:var(--ink);font-size:15px;margin:0 0 4px}
.ical-help ol{margin:4px 0 6px;padding-left:22px;font-size:16px;line-height:1.6}
.ical-help ol li{margin:3px 0}
.big-time{font-size:22px;font-weight:700}
.small-time{color:var(--grey);font-size:13px}
.empty{color:var(--grey);text-align:center;padding:18px 0;font-size:15px}

/* 大按钮组 */
.btn-grid{display:flex;flex-wrap:wrap;gap:10px}
.pick-btn{
  flex:1 1 30%;
  min-height:56px;
  padding:10px 8px;
  border:2px solid #cfdce8;border-radius:var(--radius);
  background:#fff;color:var(--ink);
  font-size:16px;font-weight:600;line-height:1.35;
  cursor:pointer;text-align:center;
}
.pick-btn .sub{display:block;font-size:12px;font-weight:400;color:var(--grey)}
.pick-btn.selected{border-color:var(--blue);background:var(--blue-light);color:var(--blue-dark)}
.pick-btn:disabled{opacity:.38;cursor:default}
.badge-example{
  display:inline-block;background:#f5a623;color:#fff;
  font-size:11px;border-radius:6px;padding:1px 6px;margin-left:6px;vertical-align:2px;
}

/* 时间格 */
.slot-btn{
  flex:1 1 28%;
  min-height:64px;
  padding:8px 4px;
  border:2px solid #cfdce8;border-radius:var(--radius);
  background:#fff;cursor:pointer;text-align:center;
}
.slot-btn .t{font-size:20px;font-weight:700;color:var(--ink)}
.slot-btn .s{display:block;font-size:12px;color:var(--grey);margin-top:2px}
.slot-btn.selected{border-color:var(--green);background:#e7f6ee}

/* 主按钮 */
.primary-btn{
  display:block;width:100%;
  min-height:56px;margin-top:14px;
  border:none;border-radius:var(--radius);
  background:var(--green);color:#fff;
  font-size:18px;font-weight:700;cursor:pointer;
}
.primary-btn:disabled{background:#b9c6cf;cursor:default}
.ghost-btn{
  display:block;width:100%;
  min-height:50px;margin-top:10px;
  border:2px solid #cfdce8;border-radius:var(--radius);
  background:#fff;color:var(--blue);
  font-size:16px;font-weight:600;cursor:pointer;
}
.danger-btn{
  border:1.5px solid var(--red);color:var(--red);background:#fff;
  border-radius:9px;padding:7px 14px;font-size:14px;font-weight:600;cursor:pointer;
  min-height:40px;
}

/* 表单 */
label.f-label{display:block;font-size:14px;color:var(--grey);margin:12px 0 5px}
input[type="text"],input[type="password"],input[type="number"],input[type="date"],select{
  width:100%;min-height:52px;
  border:2px solid #cfdce8;border-radius:11px;
  padding:10px 12px;font-size:17px;background:#fff;color:var(--ink);
}
input[type="time"]{
  min-height:48px;border:2px solid #cfdce8;border-radius:10px;
  padding:6px 8px;font-size:16px;background:#fff;color:var(--ink);
}
.check-row{display:flex;gap:10px;flex-wrap:wrap}
.check-btn{
  flex:1;min-height:52px;
  border:2px solid #cfdce8;border-radius:var(--radius);background:#fff;
  font-size:16px;font-weight:600;cursor:pointer;
}
.check-btn.selected{border-color:var(--blue);background:var(--blue-light);color:var(--blue-dark)}

/* 老师设置里的行（时长编辑等） */
.win-row{display:flex;align-items:center;gap:8px;margin-bottom:8px;flex-wrap:wrap}
.win-row span{color:var(--grey)}
.win-row .dur-min{width:96px;flex:none}
.win-row .dur-lessons{flex:1;min-width:110px;width:auto}
.win-row .dur-rec{flex:none;min-height:52px;padding:0 16px}
.ov-btn{display:inline-block;width:auto;min-height:40px;margin:0 6px 6px 0;padding:0 16px}

/* 涂空档的格子图（每周安排 + 特定日期改动共用） */
.paint-wrap{
  max-height:62vh;overflow:auto;
  border:2px solid #cfdce8;border-radius:12px;
  -webkit-overflow-scrolling:touch;background:#fff;
}
.paint-grid{display:grid}
.paint-grid.cols-7{grid-template-columns:44px repeat(7,1fr)}
.paint-grid.cols-1{grid-template-columns:44px 1fr}
.g-head{
  position:sticky;top:0;z-index:2;
  background:#fff;font-weight:700;font-size:13px;text-align:center;
  padding:7px 0;border-bottom:1.5px solid var(--grey-light);
}
.g-corner{left:0;z-index:3}
.g-time{
  position:sticky;left:0;z-index:1;
  background:#fff;font-size:10px;color:var(--grey);
  text-align:right;padding-right:5px;
  height:24px;line-height:24px;border-bottom:1px solid #f4f6f8;
}
.g-cell{
  height:24px;background:#fff;cursor:pointer;
  border-right:1px solid #eef1f4;border-bottom:1px solid #eef1f4;
  touch-action:none;user-select:none;-webkit-user-select:none;
}
.g-cell.on{background:var(--green)}
.add-win-btn{
  border:1.5px dashed var(--blue);color:var(--blue);background:#fff;
  border-radius:9px;padding:8px 14px;font-size:14px;font-weight:600;cursor:pointer;min-height:42px;
}

/* 预约列表 */
.booking-item{
  border:1.5px solid var(--grey-light);border-radius:12px;
  padding:12px;margin-top:10px;background:#fff;
}
.booking-item .line1{font-size:16px;font-weight:700}
.booking-item .line2{margin-top:3px}
.booking-item.cancelled{opacity:.5}
.booking-item.cancelled .line1{text-decoration:line-through}
.booking-item .row-flex{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}

/* 成功 + 微信消息 */
.success-box{
  background:#e7f6ee;border:1.5px solid var(--green);
  border-radius:var(--radius);padding:16px;margin-top:14px;text-align:center;
  font-size:17px;font-weight:700;color:#14663f;
}
textarea{
  width:100%;min-height:150px;
  border:2px solid #cfdce8;border-radius:11px;
  padding:12px;font-size:15px;line-height:1.6;
  font-family:inherit;background:#fbfcfd;color:var(--ink);
  resize:vertical;
}

.foot{
  text-align:center;color:var(--grey);font-size:13px;
  padding:18px 12px 30px;
}

/* 提示气泡 */
.toast{
  position:fixed;left:50%;bottom:28px;transform:translateX(-50%);
  background:rgba(20,40,60,.93);color:#fff;
  padding:12px 22px;border-radius:999px;
  font-size:15px;z-index:99;max-width:88vw;text-align:center;
}

/* ---------- 语言切换 ---------- */
.lang-switch{display:flex;gap:6px;justify-content:center;margin-top:10px}
.lang-btn{
  border:1.5px solid rgba(255,255,255,.65);background:transparent;color:#fff;
  border-radius:999px;padding:4px 12px;font-size:13px;cursor:pointer;font-family:inherit;
}
.lang-btn.active{background:#fff;color:var(--blue);font-weight:700}

/* ---------- 待确认数量提示 ---------- */
.badge-count{
  display:inline-block;min-width:22px;height:22px;line-height:22px;
  background:var(--red);color:#fff;border-radius:999px;
  font-size:13px;font-weight:700;text-align:center;
  padding:0 6px;margin-left:8px;vertical-align:2px;
}

/* ---------- 老师确认按钮行 ---------- */
.confirm-row{display:flex;flex-wrap:wrap;gap:8px;margin-top:10px}
.confirm-row .check-btn{flex:1 1 auto}
.done-panel{margin-top:10px;background:var(--grey-light);border-radius:11px;padding:10px 12px}
.done-panel .f-label{margin-top:0}
.done-panel .win-row{margin-bottom:0}
.done-panel .confirm-go{flex:1;margin-top:0}

/* ---------- 老师端顶部「临时取消」提示条（第十轮） ---------- */
.cancel-alert{
  margin-top:14px;padding:12px 14px;border-radius:var(--radius);
  background:#fdecea;border:1.5px solid var(--red);color:#8f2b27;
  font-size:15px;font-weight:600;line-height:1.5;cursor:pointer;
}

/* ---------- 邮件直达链接高亮的预约 ---------- */
.booking-item.hl{
  border-color:var(--blue);
  box-shadow:0 0 0 3px rgba(29,78,126,.35);
  background:#f2f8fd;
}

/* ---------- 课时包：剩余不多时标红（第十一轮） ---------- */
.pkg-low{color:var(--red);font-weight:700}

/* ---------- 课后反馈表单 ---------- */
.fb-area{min-height:64px}

/* ---------- 预约管理链接（成功页里给学生保存的专属链接） ---------- */
.link-area{min-height:64px}

/* ---------- 预约政策（改期/取消规则） ---------- */
.policy-box{
  margin-top:14px;background:#fff8e6;border:1.5px solid #ecd28a;
  border-radius:11px;padding:12px 14px;
}
.policy-text{margin:0 0 10px;font-size:14px;line-height:1.65}
.policy-check{display:flex;gap:8px;align-items:flex-start;font-size:15px;font-weight:600;cursor:pointer}
.policy-check input{width:20px;height:20px;margin:2px 0 0;flex:0 0 auto;accent-color:var(--blue)}

@media (min-width:560px){
  .pick-btn{flex-basis:22%}
  .slot-btn{flex-basis:20%}
}

/* ================================================================
   第六轮：学生端 FitBox 式视觉（只作用于学生端 #view-student）
   一屏一步、大圆角卡片、能打勾就不打字、底部大按钮带进度文案
   ================================================================ */
#view-student .card{
  border-radius:22px;
  padding:20px 18px;
  box-shadow:0 2px 10px rgba(20,58,95,.07);
}
#view-student .pick-btn{
  border-radius:16px;
  min-height:64px;
  position:relative;
}
#view-student .pick-btn.selected{border-width:2.5px}
#view-student .pick-btn.selected::after{
  content:'✓';position:absolute;top:6px;right:10px;
  color:var(--green);font-weight:900;font-size:17px;
}
#view-student .slot-btn{border-radius:16px;min-height:56px;position:relative}
#view-student .slot-btn.selected{border-width:2.5px}
#view-student .slot-btn.selected::after{
  content:'✓';position:absolute;top:4px;right:8px;
  color:var(--green);font-weight:900;font-size:15px;
}
#view-student input[type="text"]{border-radius:14px;min-height:56px;font-size:16px}
#view-student select{border-radius:14px;min-height:56px}
#view-student .policy-check input{width:26px;height:26px}
#view-student .primary-btn{border-radius:16px;min-height:58px;font-size:18px}

/* 底部常驻进度条：选好时间后出现，告诉学生还差一步 */
.sbar{
  position:sticky;bottom:10px;z-index:5;
  background:var(--blue);color:#fff;border-radius:16px;
  padding:12px 14px;margin-top:14px;
  display:flex;align-items:center;gap:12px;
  box-shadow:0 6px 18px rgba(20,58,95,.35);
}
.sbar .sbar-text{flex:1;font-size:14px;line-height:1.45}
.sbar .sbar-text b{font-size:16px}
.sbar .sbar-btn{
  background:#fff;color:var(--blue-dark);border:none;border-radius:12px;
  padding:12px 18px;font-size:17px;font-weight:800;cursor:pointer;flex:none;
}

/* ---------- 文件上传区（拖拽 + 点击） ---------- */
.drop-zone{
  border:2px dashed #b9cbdd;border-radius:14px;
  padding:18px 12px;text-align:center;cursor:pointer;background:#fbfcfe;
  margin-top:8px;
}
.drop-zone.over{border-color:var(--green);background:#eefaf3}
.drop-zone .dz-text{font-weight:700;color:var(--blue-dark)}
/* 反馈附件拖放区（第十二轮）：拖拽优先——区域更大、主文案更大，拖到上方时高亮更明显 */
.drop-zone.fb-zone{padding:30px 12px;border-width:2.5px}
.drop-zone.fb-zone .dz-text{font-size:17px}
.drop-zone.fb-zone.over{border-style:solid;border-color:var(--blue);background:var(--blue-light)}
.file-row{
  display:flex;justify-content:space-between;align-items:center;gap:10px;
  border:1.5px solid var(--grey-light);border-radius:11px;
  padding:9px 12px;margin-top:8px;background:#fff;
}
.file-row .fname{font-weight:600;word-break:break-all}

/* ---------- 一键开始上课 ---------- */
.join-btn{
  display:block;text-align:center;background:var(--green);color:#fff;
  font-size:19px;font-weight:800;border-radius:14px;
  padding:14px;margin-top:12px;text-decoration:none;
}
.join-wait{
  margin-top:12px;border-radius:14px;padding:12px;
  background:var(--grey-light);color:var(--grey);
  text-align:center;font-weight:700;
}
.join-missing{color:#b3261e;font-weight:700;margin-top:10px}
.checklist{
  background:#fff8e6;border:1.5px solid #ecd28a;border-radius:11px;
  padding:10px 12px;font-size:14px;margin-top:10px;
}

/* ---------- 学生姓名 → 档案（老师端） ---------- */
.link-btn{
  background:none;border:none;color:var(--blue);
  font-size:inherit;font-weight:700;cursor:pointer;
  padding:0;text-decoration:underline;
}

/* ---------- 链接状态小标签（后台） ---------- */
.pill{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:700}
.pill.missing{background:#fdeceb;color:#b3261e}

/* ---------- 我的空档页签（每周固定时间 / 日历） ---------- */
.avail-tabs{display:flex;gap:8px;margin-bottom:12px}
.avail-tab{
  flex:1;min-height:48px;
  border:2px solid var(--blue);border-radius:999px;
  background:#fff;color:var(--blue);
  font-size:16px;font-weight:700;cursor:pointer;font-family:inherit;
}
.avail-tab.active{background:var(--blue);color:#fff}

/* ---------- 日历（启渡蓝系：可约浅蓝、已预约蓝底白字、不可约浅灰/空白） ---------- */
.cal-nav{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.cal-range{flex:1;text-align:center;font-weight:700;font-size:15px}
.cal-nav-btn{width:auto;flex:none;margin-top:0;min-height:44px;padding:0 14px}
.cal-nav-btn:disabled{opacity:.38;cursor:default}
.cal-head{cursor:pointer}
.cal-head.today{color:var(--blue)}
.cal-dot{display:none;width:7px;height:7px;border-radius:50%;background:#e8833a;margin-left:4px;vertical-align:super}
.cal-dot.on{display:inline-block}
.cal-wd{font-size:12px;font-weight:400}
.cal-cell{
  height:24px;position:relative;cursor:pointer;
  border-right:1px solid #eef1f4;border-bottom:1px solid #f4f6f8;
}
.cal-cell.free{background:var(--blue-light)}
.cal-cell.booked{background:var(--blue)}
.cal-cell.off{background:#fff}
.cal-label{
  position:absolute;left:3px;top:3px;
  font-size:10px;line-height:1.25;color:#fff;
  white-space:nowrap;pointer-events:none;
}
.cal-legend{display:flex;gap:16px;flex-wrap:wrap;margin-top:10px;font-size:13px;color:var(--grey)}
.cal-legend .lg{display:flex;align-items:center;gap:6px}
.cal-legend .sw{display:inline-block;width:16px;height:16px;border-radius:4px;border:1px solid #cfdce8}
.cal-legend .sw.free{background:var(--blue-light)}
.cal-legend .sw.booked{background:var(--blue);border-color:var(--blue)}
.cal-legend .sw.off{background:#fff}
.cal-legend .sw.on{background:var(--green);border-color:var(--green)}

/* ---------- 单日编辑面板（日历下方展开，单独改这一天） ---------- */
.day-editor{
  margin-top:14px;padding:14px;
  background:var(--blue-light);
  border:1px solid #cfdce8;border-radius:var(--radius);
}
.day-editor .step-title{margin-bottom:6px}
.day-editor .paint-wrap{background:#fff;border-radius:10px;padding:6px}
.day-save-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:14px}
.day-save-bar .primary-btn{width:auto;flex:none;margin-top:0;padding:0 22px}
.day-save-bar .ghost-btn{width:auto;flex:none;margin-top:0}

/* ---------- 改期确认弹窗（第十六轮） ---------- */
.modal-overlay{
  position:fixed;inset:0;z-index:60;
  background:rgba(20,32,44,.45);
  display:flex;align-items:center;justify-content:center;
  padding:18px;
}
.modal-card{
  background:#fff;border-radius:var(--radius);
  max-width:420px;width:100%;
  padding:18px;
  box-shadow:0 12px 32px rgba(20,32,44,.25);
}
.modal-card .policy-text{margin:0}
.modal-card .win-row{display:flex;gap:8px;flex-wrap:wrap}
.modal-card .win-row .primary-btn{flex:1}
