/* ===== 晨羽课时系统 v3 设计语言 ===== */
:root{
  --brand:#0891b2; --brand-dark:#0e7490; --brand-darker:#155e75; --brand-light:#ecfeff;
  --gold:#d4a017; --gold-dark:#b8860b;
  --bg:#f8fafc; --card:#ffffff; --border:#e2e8f0; --muted:#64748b; --faint:#94a3b8;
  --danger:#ef4444; --warn:#f59e0b; --ok:#10b981; --info:#3b82f6; --purple:#8b5cf6;
  --sidebar-w:240px; --topbar-h:60px; --bottomnav-h:58px;
}
*{box-sizing:border-box}
html,body{margin:0;padding:0}
body{
  font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Hiragino Sans GB","Microsoft YaHei",sans-serif;
  background:var(--bg); color:#1e293b; -webkit-tap-highlight-color:transparent;
  font-size:14px; line-height:1.5;
}
a{color:inherit;text-decoration:none}
button{font-family:inherit;cursor:pointer}
input,select,textarea{font-family:inherit;font-size:14px}
h1,h2,h3,h4{margin:0}

/* ---------- 布局骨架 ---------- */
#appShell{display:flex;min-height:100vh}
#sidebar{
  width:var(--sidebar-w); background:linear-gradient(180deg,#0e7490 0%,#155e75 100%);
  color:#e0f2fe; position:fixed; top:0; bottom:0; left:0; z-index:50;
  display:flex; flex-direction:column; transition:width .18s ease,transform .18s ease;
}
/* 手机端侧边栏遮罩：点击空白处关闭菜单 */
#sidebarMask{display:none;position:fixed;inset:0;background:rgba(15,23,42,.42);z-index:49;animation:fadeIn .15s ease}
#sidebarMask.show{display:block}
#sidebar .brand{display:flex;align-items:center;gap:10px;padding:16px 18px;border-bottom:1px solid rgba(255,255,255,.12)}
#sidebar .brand img{width:36px;height:36px;border-radius:9px;object-fit:cover}
#sidebar .brand .t{font-size:16px;font-weight:700;color:#fff;white-space:nowrap}
#sidebar .brand .s{font-size:11px;color:#a5d8e6;white-space:nowrap}
#navMenu{flex:1;overflow-y:auto;padding:12px 10px}
.nav-item{
  display:flex;align-items:center;gap:12px;padding:10px 14px;margin:2px 0;border-radius:10px;
  color:#cdeef7;cursor:pointer;font-size:14px;white-space:nowrap;transition:all .15s;user-select:none;
}
.nav-item svg{width:20px;height:20px;flex-shrink:0}
.nav-item:hover{background:rgba(255,255,255,.08);color:#fff}
.nav-item.active{background:rgba(255,255,255,.18);color:#fff;font-weight:600}
.nav-item .badge{margin-left:auto;background:var(--danger);color:#fff;font-size:11px;line-height:1;padding:2px 6px;border-radius:99px}
#sidebar .user-foot{padding:14px 18px;border-top:1px solid rgba(255,255,255,.12);display:flex;align-items:center;gap:10px}
#sidebar .user-foot .avatar{width:34px;height:34px;border-radius:50%;background:var(--gold);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:700}
#sidebar .user-foot .info{white-space:nowrap;overflow:hidden}
#sidebar .user-foot .info .n{font-size:14px;color:#fff;font-weight:600}
#sidebar .user-foot .info .r{font-size:11px;color:#a5d8e6}

#mainArea{flex:1;margin-left:var(--sidebar-w);display:flex;flex-direction:column;min-width:0}
#topbar{
  height:var(--topbar-h);background:rgba(255,255,255,.92);-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
  border-bottom:1px solid var(--border);display:flex;align-items:center;gap:14px;padding:0 20px;
  position:sticky;top:0;z-index:40;
}
#topbar .spacer{flex:1}
.global-search{position:relative}
.global-search input{
  width:260px;padding:8px 12px 8px 34px;border:1px solid var(--border);border-radius:10px;background:#f8fafc;outline:none;font-size:13px;
}
.global-search input:focus{border-color:var(--brand);background:#fff}
.global-search svg{position:absolute;left:10px;top:50%;transform:translateY(-50%);width:16px;height:16px;color:var(--faint)}
.icon-btn{position:relative;width:38px;height:38px;border-radius:10px;border:1px solid var(--border);background:#fff;display:flex;align-items:center;justify-content:center;color:var(--muted);transition:all .15s}
.icon-btn:hover{border-color:var(--brand);color:var(--brand)}
.icon-btn svg{width:20px;height:20px}
.icon-btn .dot{position:absolute;top:-4px;right:-4px;background:var(--danger);color:#fff;font-size:10px;min-width:17px;height:17px;border-radius:99px;display:flex;align-items:center;justify-content:center;padding:0 4px}
.avatar-btn{width:38px;height:38px;border-radius:50%;background:linear-gradient(135deg,var(--brand),var(--brand-dark));color:#fff;font-weight:700;border:none;display:flex;align-items:center;justify-content:center}
#content{padding:20px;flex:1;padding-bottom:calc(var(--bottomnav-h) + 24px);max-width:1400px;width:100%;margin:0 auto}

/* ---------- 视图切换 ---------- */
.view{display:none;animation:fadeIn .15s ease}
.view.active{display:block}
@keyframes fadeIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@keyframes spin{to{transform:rotate(360deg)}}

/* ---------- 卡片 ---------- */
.card{background:var(--card);border-radius:14px;box-shadow:0 1px 3px rgba(0,0,0,.05);padding:18px;transition:box-shadow .2s}
.card.hoverable:hover{box-shadow:0 6px 18px rgba(0,0,0,.08)}
.card-title{font-size:15px;font-weight:700;color:#0f172a;margin-bottom:14px;display:flex;align-items:center;justify-content:space-between}

/* 统计卡片 */
.stat-grid{display:grid;grid-template-columns:repeat(6,1fr);gap:14px;margin-bottom:18px}
.stat-card{background:#fff;border-radius:14px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,.05);position:relative;overflow:hidden}
.stat-card .label{font-size:12px;color:var(--muted)}
.stat-card .value{font-size:26px;font-weight:800;margin-top:6px;background:linear-gradient(90deg,var(--brand-dark),#0e7490);-webkit-background-clip:text;background-clip:text;color:transparent}
.stat-card .sub{font-size:11px;color:var(--faint);margin-top:4px;line-height:1.5}
.stat-card .ico{position:absolute;right:14px;top:14px;width:36px;height:36px;border-radius:10px;display:flex;align-items:center;justify-content:center}
.stat-card .ico svg{width:20px;height:20px}

/* ---------- 按钮 ---------- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:9px 16px;border-radius:10px;font-size:14px;font-weight:500;border:1px solid transparent;transition:all .15s;white-space:nowrap}
.btn:disabled{opacity:.5;cursor:not-allowed}
.btn svg{width:16px;height:16px}
.btn-primary{background:linear-gradient(135deg,var(--brand),var(--brand-dark));color:#fff}
.btn-primary:hover{box-shadow:0 4px 14px rgba(8,145,178,.35)}
.btn-gold{background:linear-gradient(135deg,var(--gold),var(--gold-dark));color:#fff}
.btn-outline{background:#fff;border-color:var(--border);color:#334155}
.btn-outline:hover{border-color:var(--brand);color:var(--brand)}
.btn-danger{background:#fff;border-color:#fecaca;color:var(--danger)}
.btn-danger:hover{background:#fef2f2}
.btn-ghost{background:transparent;color:var(--muted)}
.btn-ghost:hover{background:#f1f5f9;color:#0f172a}
.btn-sm{padding:6px 10px;font-size:12px;border-radius:8px}
.btn-lg{padding:13px 22px;font-size:15px;border-radius:12px}
.btn-block{width:100%}

/* 触控优化：移除移动端双击缩放延迟（touch-action），按下即时缩放反馈 */
.btn,.nav-item,.bn-item,.page-btn,.icon-btn,.act,.sched-item,.class-card,.tab{touch-action:manipulation}
.btn:active{transform:scale(.96)}
.nav-item:active,.bn-item:active,.page-btn:active,.icon-btn:active{transform:scale(.94)}
.class-card:active{transform:scale(.98)}

/* ---------- 表单 ---------- */
.form-row{margin-bottom:14px}
.form-row label{display:block;font-size:13px;color:#475569;margin-bottom:6px;font-weight:500}
.input,.select,.textarea{
  width:100%;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:#fff;outline:none;transition:border .15s,box-shadow .15s;color:#1e293b;
}
.input:focus,.select:focus,.textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px rgba(8,145,178,.12)}
.textarea{resize:vertical;min-height:70px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:12px}

/* ---------- 徽章 ---------- */
.badge{display:inline-flex;align-items:center;gap:4px;padding:3px 9px;border-radius:99px;font-size:12px;font-weight:500;white-space:nowrap}
.badge::before{content:"";width:6px;height:6px;border-radius:50%;background:currentColor}
.badge-none-dot::before{display:none}
.badge-green{background:#dcfce7;color:#15803d}
.badge-yellow{background:#fef9c3;color:#a16207}
.badge-red{background:#fee2e2;color:#b91c1c}
.badge-gray{background:#f1f5f9;color:#64748b}
.badge-blue{background:#dbeafe;color:#1d4ed8}
.badge-purple{background:#ede9fe;color:#6d28d9}
.badge-teal{background:#cffafe;color:#0e7490}
.badge-gold{background:#fef3c7;color:#b45309}

/* ---------- 表格 ---------- */
.table-wrap{overflow-x:auto;border-radius:12px;border:1px solid var(--border)}
.stu-cards{display:none}
.user-cards{display:none}
.stu-card{background:#fff;border:1px solid var(--border);border-radius:14px;padding:14px;margin-bottom:10px;box-shadow:0 1px 3px rgba(0,0,0,.04)}
.stu-card .sc-ops{display:flex;gap:6px;margin-top:10px;flex-wrap:wrap}
.stu-card .sc-ops .btn{flex:1;min-width:64px;padding:8px 6px;font-size:13px}
table.tbl{width:100%;border-collapse:collapse;min-width:600px;background:#fff}
.tbl thead th{background:#f8fafc;text-align:left;font-size:12px;color:var(--muted);font-weight:600;padding:11px 14px;border-bottom:1px solid var(--border);position:sticky;top:0;white-space:nowrap}
.tbl tbody td{padding:12px 14px;border-bottom:1px solid #f1f5f9;font-size:13px;color:#334155;vertical-align:middle}
.tbl tbody tr:nth-child(even){background:#fcfdfe}
.tbl tbody tr:hover{background:#f0f9ff}
.tbl .ops{display:flex;gap:4px;flex-wrap:wrap}
.act{border:none;background:transparent;color:var(--brand);font-size:12px;padding:4px 7px;border-radius:6px;cursor:pointer}
.act:hover{background:#ecfeff}
.act.danger{color:var(--danger)}
.act.danger:hover{background:#fef2f2}
.act.gray{color:var(--muted)}

/* ---------- 分页 ---------- */
.pagination{display:flex;align-items:center;justify-content:space-between;padding:12px 4px;flex-wrap:wrap;gap:8px}
.page-btn{min-width:32px;height:32px;padding:0 9px;border:1px solid var(--border);border-radius:8px;background:#fff;font-size:13px;color:#475569}
.page-btn:hover{border-color:var(--brand);color:var(--brand)}
.page-btn.active{background:var(--brand);color:#fff;border-color:var(--brand)}
.page-btn:disabled{opacity:.4;cursor:not-allowed}

/* ---------- Toast ---------- */
#toastBox{position:fixed;top:72px;right:20px;z-index:200;display:flex;flex-direction:column;gap:10px}
.toast{min-width:220px;max-width:320px;padding:13px 16px;border-radius:12px;color:#fff;font-size:14px;box-shadow:0 8px 24px rgba(0,0,0,.18);display:flex;align-items:center;gap:10px;animation:slideIn .2s ease}
.toast svg{width:18px;height:18px;flex-shrink:0}
.toast.ok{background:#10b981}
.toast.err{background:#ef4444}
.toast.warn{background:#f59e0b}
.toast.info{background:#0891b2}
@keyframes slideIn{from{opacity:0;transform:translateX(30px)}to{opacity:1;transform:none}}

/* ---------- Modal ---------- */
/* 弹窗：从顶部开始（不再垂直居中），顶部留白，长内容由 body 内部滚动、头尾固定 */
.modal-mask{position:fixed;inset:0;background:rgba(15,40,55,.5);-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);z-index:120;display:flex;align-items:flex-start;justify-content:center;padding:28px 16px 16px;overflow-y:auto;animation:fadeIn .12s ease}
.modal{background:#fff;border-radius:18px;width:100%;max-width:480px;max-height:calc(100vh - 56px);display:flex;flex-direction:column;box-shadow:0 20px 60px rgba(0,0,0,.25);animation:pop .15s ease}
.modal.lg{max-width:760px}
.modal.md{max-width:560px}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border);flex-shrink:0}
.modal-head h3{font-size:16px;font-weight:700}
.modal-body{padding:20px 22px;overflow-y:auto;flex:1 1 auto;min-height:0}
.modal-foot{padding:14px 22px;border-top:1px solid var(--border);display:flex;gap:10px;justify-content:flex-end;flex-shrink:0}
@keyframes pop{from{opacity:0;transform:scale(.96)}to{opacity:1;transform:scale(1)}}
@media (max-width:767px){.modal-mask{padding:14px 10px 10px}.modal{max-height:calc(100vh - 32px)}}

/* ---------- 抽屉 ---------- */
.drawer-mask{position:fixed;inset:0;background:rgba(15,40,55,.4);-webkit-backdrop-filter:blur(2px);backdrop-filter:blur(2px);z-index:110;animation:fadeIn .15s ease}
.drawer{position:fixed;top:0;right:0;bottom:0;width:100%;max-width:480px;background:#fff;z-index:111;box-shadow:-10px 0 40px rgba(0,0,0,.2);display:flex;flex-direction:column;animation:slideR .2s ease}
@keyframes slideR{from{transform:translateX(100%)}to{transform:none}}
.drawer-head{display:flex;align-items:center;justify-content:space-between;padding:18px 22px;border-bottom:1px solid var(--border)}
.drawer-body{flex:1;overflow-y:auto;padding:20px 22px}

/* 抽屉内操作按钮行：窄屏自动换行 */
.drawer-actions{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:16px}
.drawer-actions .btn{flex:1 1 auto;min-width:104px}

/* 经营报表图表：桌面并排，手机单列堆叠 */
.rep-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px}

/* 财务统计：桌面 3 列，手机 2 列 */
.fin-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-bottom:18px}

/* 抽屉内紧凑记录行（手机适配，替代宽表格） */
.rec-row{display:flex;align-items:center;gap:10px;padding:10px 2px;border-bottom:1px solid #f1f5f9}
.rec-row:last-child{border-bottom:none}
.rec-main{flex:1;min-width:0}
.rec-t{font-size:13px;font-weight:600;color:#1e293b;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rec-s{font-size:11px;color:#94a3b8;margin-top:2px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.rec-tag{font-size:12px;color:#0e7490;background:#ecfeff;padding:3px 9px;border-radius:99px;white-space:nowrap;flex-shrink:0}
.rec-tag.gold{color:#b8860b;background:#fef3c7}
.rec-tag.red{color:#b91c1c;background:#fee2e2}
.rec-tag.gray{color:#64748b;background:#f1f5f9}
.rec-amount{font-size:14px;font-weight:800;color:#b8860b;white-space:nowrap;flex-shrink:0}

/* ---------- Tabs ---------- */
.tabs{display:flex;gap:4px;border-bottom:1px solid var(--border);margin-bottom:16px;overflow-x:auto}
.tab{padding:9px 14px;font-size:13px;color:var(--muted);border:none;background:transparent;border-bottom:2px solid transparent;white-space:nowrap;cursor:pointer}
.tab.active{color:var(--brand);font-weight:600;border-bottom-color:var(--brand)}

/* ---------- 空状态 ---------- */
.empty{text-align:center;padding:48px 20px;color:var(--faint)}
.empty svg{width:52px;height:52px;margin-bottom:12px;opacity:.55;color:#94a3b8}
.empty .t{font-size:14px;margin-bottom:4px;color:var(--muted);font-weight:600}
.empty .s{font-size:12px;color:var(--faint)}

/* ---------- 骨架屏 ---------- */
.skeleton{background:linear-gradient(90deg,#f1f5f9 25%,#e9eef3 37%,#f1f5f9 63%);background-size:400% 100%;animation:sk 1.3s infinite;border-radius:8px}
@keyframes sk{from{background-position:100% 0}to{background-position:-100% 0}}

/* ---------- 预警列表 / 时间线 ---------- */
.alert-item{display:flex;align-items:flex-start;gap:12px;padding:12px;border-radius:10px;margin-bottom:8px;background:#fff;border:1px solid var(--border)}
.alert-item .a-ico{width:34px;height:34px;border-radius:9px;display:flex;align-items:center;justify-content:center;flex-shrink:0}
.alert-item .a-ico svg{width:18px;height:18px}
.alert-item .a-body{flex:1;min-width:0}
.alert-item .a-t{font-size:13px;font-weight:600}
.alert-item .a-s{font-size:12px;color:var(--muted)}

.timeline{position:relative;padding-left:22px}
.timeline::before{content:"";position:absolute;left:7px;top:6px;bottom:6px;width:2px;background:var(--border)}
.tl-item{position:relative;padding-bottom:16px}
.tl-item::before{content:"";position:absolute;left:-19px;top:5px;width:10px;height:10px;border-radius:50%;background:var(--brand);border:2px solid #fff}
.tl-item .tl-time{font-size:11px;color:var(--faint)}
.tl-item .tl-c{font-size:13px;color:#334155;margin-top:2px}

/* ---------- 课时进度 ---------- */
.hours-bar{height:10px;border-radius:99px;background:#e2e8f0;overflow:hidden}
.hours-bar > div{height:100%;border-radius:99px;background:linear-gradient(90deg,var(--brand),#06b6d4)}

/* ---------- 班级卡片 ---------- */
.class-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:14px}
.class-card{background:#fff;border-radius:14px;padding:16px;box-shadow:0 1px 3px rgba(0,0,0,.05);border-left:4px solid var(--brand);cursor:pointer;transition:all .15s}
.class-card:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(0,0,0,.08)}
.class-card .cn{font-size:15px;font-weight:700}
.class-card .cm{font-size:12px;color:var(--muted);margin-top:6px}

/* ---------- 排课周视图 ---------- */
.sched-grid{display:grid;grid-template-columns:90px repeat(7,1fr);gap:4px;overflow-x:auto}
.sched-cell{min-height:70px;background:#fff;border:1px solid var(--border);border-radius:8px;padding:6px;font-size:12px}
.sched-head{background:var(--brand-dark);color:#fff;text-align:center;font-weight:600;padding:8px 4px;border-radius:8px;font-size:12px}
.sched-item{background:#ecfeff;border:1px solid #a5e3f5;border-radius:6px;padding:4px 6px;margin-top:4px;cursor:pointer;font-size:11px}

/* ---------- 底部导航（手机） ---------- */
#bottomNav{display:none;position:fixed;bottom:0;left:0;right:0;height:var(--bottomnav-h);background:#fff;border-top:1px solid var(--border);z-index:45;justify-content:space-around;align-items:center}
.bn-item{display:flex;flex-direction:column;align-items:center;gap:2px;font-size:10px;color:var(--muted);cursor:pointer;padding:6px 12px;border:none;background:transparent}
.bn-item svg{width:22px;height:22px}
.bn-item.active{color:var(--brand);font-weight:600}
.bn-item .bn-badge{position:absolute;top:2px;right:8px;background:var(--danger);color:#fff;font-size:9px;padding:1px 5px;border-radius:99px}

#topbar .menu-btn{display:none}
.mobile-logo{display:none}

/* ---------- 登录页 ---------- */
#loginPage{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#0e7490,#155e75 50%,#164e63);padding:16px}
.login-card{background:#fff;border-radius:22px;box-shadow:0 24px 70px rgba(0,0,0,.3);padding:34px;width:100%;max-width:400px}

/* ================= 响应式 ================= */
@media (max-width:1023px){
  .stat-grid{grid-template-columns:repeat(3,1fr)}
  #sidebar{width:64px}
  #sidebar .brand .t,#sidebar .brand .s,#navMenu .nav-item span,#sidebar .user-foot .info{display:none}
  #sidebar .brand{justify-content:center;padding:14px 0}
  #navMenu{padding:12px 8px}
  .nav-item{justify-content:center;padding:12px 0}
  #sidebar .user-foot{justify-content:center}
  #mainArea{margin-left:64px}
}
@media (max-width:767px){
  #sidebar{transform:translateX(-100%)}
  #sidebar.open{transform:none;width:240px;box-shadow:0 0 40px rgba(0,0,0,.3)}
  #sidebar.open .brand .t,#sidebar.open .brand .s,#sidebar.open .nav-item span,#sidebar.open .user-foot .info{display:block}
  #sidebar.open .nav-item{justify-content:flex-start;padding:10px 14px}
  #mainArea{margin-left:0}
  #topbar{padding:0 12px}
  #topbar .menu-btn{display:flex}
  .mobile-logo{display:flex;align-items:center;gap:8px}
  .mobile-logo strong{display:none}
  .global-search{flex:1;min-width:0;max-width:220px}
  .global-search input{width:100%;padding:8px 12px 8px 32px;font-size:12px}
  .stat-grid{grid-template-columns:repeat(2,1fr)}
  .stat-card .value{font-size:20px}
  #content{padding:12px;padding-bottom:calc(var(--bottomnav-h) + env(safe-area-inset-bottom, 0px) + 20px)}
  /* 表格手机端不再强制 600px：列自然压缩；操作列钉在右侧常驻可见 */
  table.tbl{min-width:0;font-size:12px}
  .tbl thead th{padding:9px 8px}
  .tbl tbody td{padding:9px 8px}
  .tbl th:last-child,.tbl td:last-child{position:sticky;right:0;background:#fff;box-shadow:-6px 0 8px -6px rgba(0,0.0,0,.12);z-index:1}
  .tbl tbody tr:nth-child(even) td:last-child{background:#fcfdfe}
  .tbl .ops .act{padding:4px 7px;font-size:12px}
  /* 学员列表手机端卡片化，隐藏宽表格 */
  .stu-table{display:none}
  .stu-cards{display:block}
  /* 用户（老师）管理手机端同样卡片化，操作横排 */
  .user-table{display:none}
  .user-cards{display:block}
  .grid-2,.grid-3{grid-template-columns:1fr}
  #bottomNav{display:flex}
  .sched-grid{grid-template-columns:70px repeat(7,60px)}
  .drawer{max-width:100%}
  .fin-stats{grid-template-columns:repeat(2,1fr)}
  .fin-col-op{display:none}
  .rep-cols{grid-template-columns:1fr}
  .dash-cols{grid-template-columns:1fr !important}
}

/* ===== v9.6 视频同款工作台 ===== */
.wb-hero{background:linear-gradient(135deg,#0ea5e9,#0284c7);border-radius:18px;padding:18px;color:#fff;margin-bottom:14px;box-shadow:0 10px 28px rgba(2,132,199,.22)}
.wb-org{display:flex;align-items:center;gap:12px;margin-bottom:14px}.wb-org img{width:46px;height:46px;border-radius:12px;background:#fff;padding:3px}.wb-name{font-size:19px;font-weight:800}.wb-sub{font-size:12px;opacity:.86;margin-top:2px}
.wb-todo{margin-bottom:14px}.wb-todo-head{display:flex;justify-content:space-between;align-items:center;margin-bottom:12px}.wb-todo-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:10px}.wb-mini{border:1px solid #e2e8f0;background:#f8fafc;border-radius:12px;padding:12px 8px;text-align:center;min-height:72px}.wb-mini b{display:block;font-size:22px;line-height:1.2}.wb-mini span{font-size:12px;color:#64748b}.wb-mini.skeleton{height:72px;background:#f1f5f9}
.wb-group{margin-bottom:14px}.wb-group-title{font-size:15px;font-weight:800;margin-bottom:12px;color:#0f172a}.wb-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}.wb-tile{border:0;background:transparent;display:flex;flex-direction:column;align-items:center;gap:8px;padding:4px;color:#334155;min-width:0}.wb-tile em{font-style:normal;font-size:12px;white-space:nowrap}.wb-icon{width:46px;height:46px;border-radius:14px;display:flex;align-items:center;justify-content:center}.wb-icon svg{width:23px;height:23px}.wb-tile:active{transform:scale(.94)}
.exp-filters{margin-bottom:10px}.dc-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.dc-card{text-align:center}.dc-card p{color:#64748b;font-size:13px;min-height:62px}.dc-ico{width:54px;height:54px;border-radius:16px;display:flex;align-items:center;justify-content:center;margin:0 auto 12px}.dc-ico svg{width:27px;height:27px}.dc-ico.blue{background:#dbeafe;color:#2563eb}.dc-ico.green{background:#dcfce7;color:#16a34a}.dc-ico.orange{background:#ffedd5;color:#ea580c}.help-list{display:grid;gap:10px;color:#475569;line-height:1.7}
@media (max-width:767px){.wb-hero{padding:16px;border-radius:16px}.wb-todo-grid{grid-template-columns:repeat(2,1fr)}.wb-grid{grid-template-columns:repeat(4,1fr);gap:10px 6px}.wb-icon{width:44px;height:44px}.dc-grid{grid-template-columns:1fr}.exp-filters{gap:8px}}

/* =====================================================================
   v9.6.2 UI 增强
   1) 补齐工作台缺失样式（.wb-todo / .wb-item / .wb-ico / .wb-section / .wb-notice）
   2) 全局视觉打磨：背景、卡片、统计卡、表格、侧边栏
   ===================================================================== */

/* —— 背景柔化：从纯白灰过渡到带主色调的浅渐变 —— */
body{background:linear-gradient(180deg,#f6f9fc 0%,#f1f5f9 100%)}

/* —— 卡片：层次感提升 —— */
.card,.stat-card,.class-card,.stu-card{box-shadow:0 1px 2px rgba(15,23,42,.04),0 6px 20px -8px rgba(8,145,178,.10)}
.card{border:1px solid #e8eef3;border-radius:16px}
.card.hoverable:hover,.stat-card:hover{box-shadow:0 10px 26px -8px rgba(8,145,178,.16);transform:translateY(-1px)}
.card-title{font-size:15px;font-weight:800}

/* —— 统计卡片：彩色渐变顶条 + 图标底 —— */
.stat-card{border:1px solid #e8eef3;border-radius:16px;overflow:hidden}
.stat-card::before{content:"";position:absolute;left:0;right:0;top:0;height:4px;background:linear-gradient(90deg,var(--brand),#22d3ee)}
.stat-card .ico{background:linear-gradient(135deg,#e0f7fa,#cffafe);color:var(--brand-dark)}

/* —— 工作台待办卡片（补齐 .wb-todos 容器 + .wb-todo 卡片） —— */
.wb-todos{display:grid;grid-template-columns:repeat(7,1fr);gap:10px}
.wb-todo{
  display:flex;flex-direction:column;align-items:center;justify-content:center;gap:6px;
  background:#fff;border:1px solid #e8eef3;border-radius:14px;padding:14px 8px;min-height:78px;
  box-shadow:0 1px 2px rgba(15,23,42,.04);cursor:pointer;transition:all .18s;font-family:inherit;
}
.wb-todo b{display:flex;align-items:center;justify-content:center;width:34px;height:34px;border-radius:10px;font-size:17px;line-height:1;font-weight:800}
.wb-todo span{font-size:12px;color:var(--muted);white-space:nowrap}
.wb-todo:hover{transform:translateY(-2px);box-shadow:0 8px 20px -6px rgba(8,145,178,.22);border-color:#b8e3ee}
@media (max-width:900px){.wb-todos{grid-template-columns:repeat(4,1fr)}}
@media (max-width:520px){.wb-todos{grid-template-columns:repeat(3,1fr)}}

/* —— 工作台宫格入口（补齐 .wb-item / .wb-ico） —— */
.wb-section{margin-bottom:18px}
.wb-section h3{font-size:15px;font-weight:800;color:#0f172a;margin-bottom:12px;display:flex;align-items:center;gap:8px}
.wb-section h3::before{content:"";width:4px;height:16px;border-radius:99px;background:linear-gradient(180deg,var(--brand),#22d3ee)}
.wb-grid{display:grid;grid-template-columns:repeat(5,1fr);gap:12px}
.wb-item{
  display:flex;flex-direction:column;align-items:flex-start;gap:8px;text-align:left;
  background:#fff;border:1px solid #e8eef3;border-radius:14px;padding:14px;
  cursor:pointer;transition:all .18s;font-family:inherit;color:#334155;min-width:0;
}
.wb-item:hover{transform:translateY(-2px);box-shadow:0 8px 20px -6px rgba(8,145,178,.18);border-color:#b8e3ee}
.wb-item .wb-ico{width:42px;height:42px;border-radius:12px;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#e0f7fa,#cffafe);color:var(--brand-dark)}
.wb-ico.roster{background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:#1d4ed8}
.wb-ico.schedule{background:linear-gradient(135deg,#dcfce7,#bbf7d0);color:#15803d}
.wb-ico.calendar{background:linear-gradient(135deg,#fef9c3,#fde68a);color:#a16207}
.wb-ico.transfer{background:linear-gradient(135deg,#ffedd5,#fed7aa);color:#c2410c}
.wb-ico.book{background:linear-gradient(135deg,#ede9fe,#ddd6fe);color:#6d28d9}
.wb-ico.users{background:linear-gradient(135deg,#cffafe,#a5f3fc);color:#0e7490}
.wb-ico.checkin{background:linear-gradient(135deg,#dcfce7,#bbf7d0);color:#15803d}
.wb-ico.gift{background:linear-gradient(135deg,#fce7f3,#fbcfe8);color:#be185d}
.wb-ico.students{background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:#1d4ed8}
.wb-ico.order{background:linear-gradient(135deg,#fef9c3,#fde68a);color:#a16207}
.wb-ico.classes{background:linear-gradient(135deg,#cffafe,#a5f3fc);color:#0e7490}
.wb-ico.reports{background:linear-gradient(135deg,#ede9fe,#ddd6fe);color:#6d28d9}
.wb-ico.audit{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);color:#475569}
.wb-ico.cash{background:linear-gradient(135deg,#fee2e2,#fecaca);color:#b91c1c}
.wb-ico.finance{background:linear-gradient(135deg,#ffedd5,#fed7aa);color:#c2410c}
.wb-ico.settings{background:linear-gradient(135deg,#e2e8f0,#cbd5e1);color:#475569}
.wb-ico.bell{background:linear-gradient(135deg,#fee2e2,#fecaca);color:#b91c1c}
.wb-ico.info{background:linear-gradient(135deg,#dbeafe,#bfdbfe);color:#1d4ed8}
.wb-item b{font-size:13px;font-weight:600;color:#1e293b;display:flex;align-items:center;gap:6px}
.wb-item em{font-style:normal;font-size:11px;color:#fff;background:var(--danger);border-radius:99px;padding:1px 7px}
.wb-item small{font-size:11px;color:var(--faint)}
.wb-item:active{transform:scale(.96)}
@media (max-width:900px){.wb-grid{grid-template-columns:repeat(4,1fr)}}
@media (max-width:520px){.wb-grid{grid-template-columns:repeat(3,1fr);gap:8px}.wb-item{padding:12px 10px}}

/* —— 工作台公告条（补齐 .wb-notice） —— */
.wb-notice{margin-top:12px;background:rgba(255,255,255,.14);border:1px solid rgba(255,255,255,.25);border-radius:10px;padding:8px 12px;font-size:12px;line-height:1.6;backdrop-filter:blur(4px)}

/* —— v9.6.9 工作台今日概览 —— */
.wb-overview{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.wb-ov-item{background:#fff;border:1px solid #e8eef3;border-radius:14px;padding:14px 8px;text-align:center;box-shadow:0 1px 2px rgba(15,23,42,.04)}
.wb-ov-val{font-size:24px;font-weight:800;line-height:1.2}
.wb-ov-lbl{font-size:12px;color:#64748b;margin-top:4px}
@media(max-width:520px){.wb-overview{grid-template-columns:repeat(2,1fr)}}

/* —— v9.6.9 上课记录概览条 —— */
.ck-summary-bar{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px;padding:14px}
.ck-sum-item{display:flex;flex-direction:column;align-items:center;gap:4px}
.ck-sum-val{font-size:24px;font-weight:800;color:#0f172a}
.ck-sum-lbl{font-size:11px;color:#64748b}
@media(max-width:520px){.ck-summary-bar{grid-template-columns:repeat(2,1fr)}}

/* —— v9.6.9 侧边栏分组标签 —— */
.nav-group-label{font-size:11px;font-weight:700;color:rgba(165,216,230,.7);padding:14px 14px 4px;text-transform:uppercase;letter-spacing:.5px;white-space:nowrap}

/* —— v9.7.1 积分商城 —— */
.shop-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.shop-card{min-width:0}
.shop-card .btn-sm{padding:5px 8px;font-size:12px}
@media(max-width:520px){.shop-grid{grid-template-columns:repeat(2,1fr);gap:10px}}

/* —— v9.7.1 侧边栏分组：可展开/收起 —— */
.nav-group-head{display:flex;align-items:center;justify-content:space-between;gap:6px;padding:14px 14px 4px;cursor:pointer;user-select:none;color:rgba(165,216,230,.7);font-size:11px;font-weight:700;letter-spacing:.5px;text-transform:uppercase;white-space:nowrap}
.nav-group-head:hover{color:#a5d8e6}
.nav-group-head .nav-group-arrow{display:inline-flex;flex-shrink:0;opacity:.7;transition:transform .18s ease}
.nav-group-head .nav-group-arrow svg{width:12px;height:12px}
.nav-group.collapsed .nav-group-arrow{transform:rotate(-90deg)}
.nav-group-body{display:block}
.nav-group.collapsed .nav-group-body{display:none}
/* 手机抽屉收起（仅图标）时隐藏分组标题，展开抽屉时显示 */
@media (max-width:1023px){
  #navMenu .nav-group-head{display:none}
  #sidebar.open .nav-group-head{display:flex}
}

/* —— v9.6.9 工作台宫格分组优化 —— */
.wb-section h3{font-size:15px;font-weight:800;color:#0f172a;margin-bottom:12px;display:flex;align-items:center;gap:8px}

/* —— 工作台 Hero 增强 —— */
.wb-hero{background:linear-gradient(135deg,#0891b2 0%,#0e7490 55%,#155e75 100%);position:relative;overflow:hidden}
.wb-hero::after{content:"";position:absolute;right:-70px;top:-70px;width:220px;height:220px;border-radius:50%;background:rgba(255,255,255,.10)}
.wb-hero::before{content:"";position:absolute;right:110px;bottom:-90px;width:170px;height:170px;border-radius:50%;background:rgba(255,255,255,.06)}

/* —— 表格：表头渐变 + 行 hover 更清晰 —— */
.tbl thead th{background:linear-gradient(180deg,#f6fafc,#eef5f9);font-size:12px;letter-spacing:.2px}
.tbl tbody tr:hover{background:#f0faff}
.table-wrap{border-color:#e8eef3}

/* —— 侧边栏当前项：左侧指示条 —— */
.nav-item{position:relative}
.nav-item.active{background:rgba(255,255,255,.18)}
.nav-item.active::before{content:"";position:absolute;left:-10px;top:20%;bottom:20%;width:4px;border-radius:99px;background:#22d3ee}

/* —— 徽章/进度条微调 —— */
.hours-bar > div{background:linear-gradient(90deg,var(--brand),#22d3ee,#a5f3fc)}

/* —— 登录页标题发光微调 —— */
.login-card{background:#fff;border-radius:24px}

/* —— 工作台 Hero 精简版：机构名行 + 机构设置按钮 —— */
.wb-org-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.wb-edit{
  display:inline-flex;align-items:center;gap:6px;background:rgba(255,255,255,.16);
  border:1px solid rgba(255,255,255,.28);color:#fff;border-radius:999px;padding:5px 12px;
  font-size:12px;font-weight:600;cursor:pointer;transition:all .15s;font-family:inherit;
}
.wb-edit:hover{background:rgba(255,255,255,.26)}
.wb-edit svg{width:14px;height:14px}
/* 搜索框可输入态：恢复手型与聚焦高亮 */

/* —— “我的”页：分组式个人中心（参考来记课【我的】页） —— */
.me-head{display:flex;align-items:center;gap:14px;padding:18px}
.me-avatar{width:52px;height:52px;border-radius:50%;background:linear-gradient(135deg,#0891b2,#0e7490);color:#fff;display:flex;align-items:center;justify-content:center;font-size:20px;font-weight:700;flex-shrink:0}
.me-name{font-size:17px;font-weight:700;color:#0f172a}
.me-role{font-size:12px;color:#64748b;margin-top:2px}
.me-group{margin-bottom:16px}
.me-group-title{font-size:13px;font-weight:700;color:#64748b;margin:0 2px 8px}
.me-list{padding:4px 0}
.me-item{width:100%;display:flex;align-items:center;gap:12px;background:transparent;border:none;border-bottom:1px solid #eef2f6;padding:13px 16px;cursor:pointer;font-family:inherit;text-align:left;transition:background .15s}
.me-item:last-child{border-bottom:none}
.me-item:hover{background:#f8fafc}
.me-ico{width:34px;height:34px;border-radius:10px;background:#f0f7fb;color:var(--brand-dark);display:flex;align-items:center;justify-content:center;flex-shrink:0}
.me-ico svg{width:17px;height:17px}
.me-label{flex:1;font-size:14px;font-weight:600;color:#1e293b}
.me-arrow{color:#cbd5e1;display:flex;align-items:center}
.me-arrow svg{width:14px;height:14px}
.me-item.danger .me-ico{background:#fef2f2;color:var(--danger)}
.me-item.danger .me-label{color:var(--danger)}


