/* ===== 长沙线上服务科工作台 — 深蓝医疗风 ===== */
:root {
  --blue: #0e4da4;
  --blue-2: #1565d8;
  --blue-soft: #e8f0fd;
  --teal: #00b4d8;
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #1f2d3d;
  --muted: #6b7a90;
  --line: #e3e9f2;
  /* 班次配色 */
  --s-ban: #e6f7ee;   --s-ban-c: #1f9d57;   /* 班 绿 */
  --s-bai: #eafaf4;   --s-bai-c: #1f9d57;   /* 白 白班 */
  --s-xiu: #fdecea;   --s-xiu-c: #e23b2e;   /* 休 休息 红 */
  --s-wan: #e3f2fd;   --s-wan-c: #1565c0;   /* 晚 晚班 淡蓝 */
  --s-zhi: #fff4e0;   --s-zhi-c: #e08e0b;   /* 值 值班 橙 */
  --s-pei: #efeaff;   --s-pei-c: #7a4ddb;   /* 培 培训 紫 */
  --s-jia: #eef1f5;   --s-jia-c: #8895a7;   /* 假 请假 灰 */
  --s-chu: #e0f7fa;   --s-chu-c: #00838f;   /* 初 */
  --s-zhong: #fff8e1; --s-zhong-c: #f57f17; /* 中 */
  --s-nian: #fce4ec;  --s-nian-c: #c2185b;  /* 年 年假 */
  --s-chan: #f3e5f5;  --s-chan-c: #7b1fa2;  /* 产 产休 */
  --s-hui: #e8eaf6;   --s-hui-c: #3949ab;   /* 会 开会 */
  --s-a: #dbeafe;     --s-a-c: #1d4ed8;     /* A 班 美团组 */
  --s-b: #dcfce7;     --s-b-c: #15803d;     /* B 班 */
  --s-c: #fce7f3;     --s-c-c: #be185d;     /* C 班 */
  --s-jing: #fff7ed;  --s-jing-c: #c2410c;  /* 静 静班 橘红 */
  --s-mei: #0070c0;   --s-mei-c: #ffffff;   /* 美 美团组：沿用源表蓝底 #0070C0 */
  --s-koubei: #e6f1fb; --s-koubei-c: #185fa5; /* 口碑 会话班 / 副号班周合并：淡蓝 */
  --s-special: #faece7; --s-special-c: #712b13; /* 特殊班制：浅橘底 + 深橘字 */
  --s-special-label: #d85a30; /* 特殊班制行标签（锁门/B组换飞鱼/…）：实心橘底白字 */
  --s-loc: #cffafe;   --s-loc-c: #0e7490;   /* 出诊地点 融圣/北辰/河西/常德/星沙/湘府 */
  --shadow: 0 2px 10px rgba(14,77,164,.08);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px;
  padding-bottom: env(safe-area-inset-bottom);
}

/* 顶部栏 */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  background: linear-gradient(90deg, var(--blue), var(--blue-2));
  color: #fff; box-shadow: var(--shadow);
}
.brand { display: flex; align-items: center; gap: 10px; flex: 0 0 auto; }
.brand-logo { width: 36px; height: 36px; border-radius: 50%; background: #fff; object-fit: cover; }
.brand-title { font-weight: 700; font-size: 15px; line-height: 1.1; }
.brand-sub { font-size: 11px; opacity: .8; }
.search-wrap { position: relative; flex: 1 1 auto; max-width: 460px; }
.search-wrap input {
  width: 100%; height: 38px; border: none; border-radius: 19px;
  padding: 0 16px; font-size: 14px; background: rgba(255,255,255,.92); color: var(--text);
  outline: none;
}
.install-btn {
  flex: 0 0 auto; border: 1px solid rgba(255,255,255,.7); background: rgba(255,255,255,.15);
  color: #fff; padding: 8px 14px; border-radius: 19px; font-size: 13px; cursor: pointer; font-weight: 600;
}
.install-btn:hover { background: rgba(255,255,255,.28); }
.month-sel {
  flex: 0 0 auto; height: 36px; border: 1px solid rgba(255,255,255,.6); border-radius: 10px;
  background: rgba(255,255,255,.92); color: var(--text); font-size: 13px; font-weight: 700;
  padding: 0 8px; cursor: pointer;
}

/* 搜索结果下拉 */
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; background: #fff; color: var(--text);
  border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.18); overflow: hidden; max-height: 70vh; overflow-y: auto;
}
.sr-item { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.sr-item:last-child { border-bottom: none; }
.sr-item:hover, .sr-item.active { background: var(--blue-soft); }
.sr-name { font-weight: 600; }
.sr-tag { font-size: 11px; color: #fff; background: var(--blue-2); padding: 2px 8px; border-radius: 10px; white-space: nowrap; }
.sr-tag.campus { background: var(--teal); }
.sr-empty { padding: 16px; text-align: center; color: var(--muted); }
.sr-more { padding: 9px 14px; text-align: center; font-size: 12px; color: var(--muted); background: var(--blue-soft); }

/* 布局 */
.layout { display: flex; align-items: flex-start; min-height: calc(100vh - 58px); }

/* 左侧菜单（桌面） */
.sidebar {
  flex: 0 0 200px;
  background: #f8fafc;
  border-right: 1px solid var(--line);
  padding: 22px 14px;
  position: sticky;
  top: 58px;
  height: calc(100vh - 58px);
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  color: #64748b;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.25;
  white-space: nowrap;
  transition: background .18s ease, color .18s ease, box-shadow .18s ease;
  background: transparent;
  overflow: hidden;
}
.nav-item .ni-icon {
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  min-width: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  transition: color .18s ease;
}
.nav-item .ni-icon svg { width: 100%; height: 100%; display: block; }
.nav-item .ni-label { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: inherit; }
.nav-item:hover {
  background: #eef2f7;
  color: #334155;
}
.nav-item:hover .ni-icon { color: #64748b; }
.nav-item.active {
  background: var(--blue);
  color: #fff;
  box-shadow: 0 4px 14px rgba(14, 77, 164, .22);
}
.nav-item.active .ni-icon { color: #fff; }
.nav-item.active:hover { background: var(--blue-2); }
.nav-sep { height: 1px; background: var(--line); margin: 8px 6px; }

/* 内容区 */
.content { flex: 1 1 auto; padding: 14px; min-width: 0; }

.card { background: var(--card); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; margin-bottom: 16px; }
.card h2 { margin: 0 0 4px; font-size: 17px; }
.card .sub { color: var(--muted); font-size: 12px; margin-bottom: 12px; }

/* 统计横幅 */
.stats-banner {
  display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 16px;
}
.stat-pill {
  flex: 1 1 200px; background: linear-gradient(135deg, #fff, #f3f8ff);
  border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; box-shadow: var(--shadow);
}
.stat-pill .sp-label { font-size: 12px; color: var(--muted); margin-bottom: 6px; }
.stat-pill .sp-num { font-size: 30px; font-weight: 800; color: var(--blue); line-height: 1; }
.stat-pill .sp-num small { font-size: 14px; font-weight: 600; color: var(--muted); }
.stat-pill .sp-break { margin-top: 8px; font-size: 12px; color: var(--text); }
.stat-pill .sp-break b { color: var(--s-xiu-c); }
.stat-warn { color: var(--muted); font-size: 12px; }

/* 院区切换 pills */
.campus-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.campus-tab {
  padding: 8px 16px; border-radius: 20px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text);
}
.campus-tab.active { background: var(--blue); color: #fff; border-color: var(--blue); }

/* 工具条 */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.toolbar .seg { display: inline-flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.toolbar .seg button { border: none; background: #fff; padding: 7px 14px; cursor: pointer; font-size: 13px; color: var(--text); }
.toolbar .seg button.active { background: var(--blue-2); color: #fff; }
.toolbar select { height: 34px; border-radius: 8px; border: 1px solid var(--line); padding: 0 10px; font-size: 13px; background: #fff; }
.toolbar .link-btn {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px; color: var(--blue-2);
  text-decoration: none; font-weight: 600; font-size: 13px; border: 1px solid var(--blue-soft);
  padding: 7px 12px; border-radius: 8px; background: var(--blue-soft);
}
.toolbar .link-btn:hover { background: #d8e7fd; }

/* 排班表表格 */
/* 纵向也要限高：表头（日期 + 星期）才能相对滚动容器吸顶固定 —— 长名单下翻时仍能看到日期/星期 */
.table-scroll { overflow: auto; max-height: calc(100vh - 200px); border-radius: 12px; border: 1px solid var(--line); width: 100%; }
table.sched { border-collapse: collapse; width: 100%; table-layout: fixed; font-size: 13px; min-width: 100%; }
table.sched th, table.sched td { border: 1px solid var(--line); text-align: center; padding: 0; width: auto; }
table.sched thead th {
  background: var(--blue); color: #fff; font-weight: 600; position: sticky; top: 0; z-index: 2;
  height: auto; padding: 5px 2px; line-height: 1.25;
}
/* 第一行「日期」与第二行「星期」各自吸顶（不能都用 top:0，否则两行叠在一起互相覆盖） */
table.sched thead tr:first-child th { top: 0; height: 28px; padding: 1px 2px; line-height: 1.3; }
table.sched thead tr:nth-child(2) th { top: 28px; }
table.sched thead th.weekend { background: #0a3c82; }
table.sched thead th .dnum { font-size: 14px; display: block; }
table.sched thead th.dow { font-size: 11px; opacity: .85; font-weight: 500; padding: 3px 2px; }
table.sched th.rowhead, table.sched td.rowhead {
  position: sticky; left: 0; z-index: 3; background: #fff; text-align: left; padding: 8px 12px;
  width: 130px; min-width: 130px; white-space: nowrap; box-shadow: 1px 0 0 var(--line);
}
table.sched thead th.rowhead { z-index: 4; }
table.sched th.rowhead.dept-head, table.sched td.dept-cell {
  position: sticky; left: 130px; z-index: 3; background: #fff; text-align: left; padding: 8px;
  width: 90px; min-width: 90px; font-size: 12px; color: var(--muted);
}
table.sched thead th.rowhead.dept-head { z-index: 4; color: #fff; }
table.sched.has-dept th.rowhead, table.sched.has-dept td.rowhead { box-shadow: 1px 0 0 var(--line); }
table.sched.has-dept th.rowhead.dept-head, table.sched.has-dept td.dept-cell { box-shadow: 1px 0 0 var(--line); }
.grp-head { background: var(--blue-soft) !important; color: var(--blue) !important; font-weight: 700; text-align: left !important; padding-left: 14px; }
.cell { height: 34px; line-height: 34px; font-weight: 700; font-size: 13px; }
.cell.ban { background: var(--s-ban); color: var(--s-ban-c); }
.cell.bai { background: var(--s-bai); color: var(--s-bai-c); }
.cell.xiu { background: var(--s-xiu); color: var(--s-xiu-c); }
.cell.wan { background: var(--s-wan); color: var(--s-wan-c); }
.cell.zhi { background: var(--s-zhi); color: var(--s-zhi-c); }
.cell.pei { background: var(--s-pei); color: var(--s-pei-c); }
.cell.ke { background: var(--s-pei); color: var(--s-pei-c); }
.cell.jia { background: var(--s-jia); color: var(--s-jia-c); }
.cell.chu { background: var(--s-chu); color: var(--s-chu-c); }
.cell.zhong { background: var(--s-zhong); color: var(--s-zhong-c); }
.cell.nian { background: var(--s-nian); color: var(--s-nian-c); }
.cell.chan { background: var(--s-chan); color: var(--s-chan-c); }
.cell.hui { background: var(--s-hui); color: var(--s-hui-c); }
.cell.ab-a { background: var(--s-a); color: var(--s-a-c); }
.cell.ab-b { background: var(--s-b); color: var(--s-b-c); }
.cell.ab-c { background: var(--s-c); color: var(--s-c-c); }
.cell.jing { background: var(--s-jing); color: var(--s-jing-c); }
.cell.mei { background: var(--s-mei); color: var(--s-mei-c); }
.cell.koubei { background: var(--s-koubei); color: var(--s-koubei-c); }
.cell.special { background: var(--s-special); color: var(--s-special-c); }
.cell.loc { background: var(--s-loc); color: var(--s-loc-c); font-weight: 700; border: 1px solid #67e8f9; }
.cell.today { outline: 2px solid var(--blue-2); outline-offset: -2px; }

/* ---------- 本部门特殊班制页（源表一致布局） ---------- */
.ss-block { margin-top: 18px; }
.ss-block h3 { margin: 14px 0 8px; font-size: 16px; color: var(--blue); }
.ss-block .sub { margin: 2px 0 10px; }
.ss-table { table-layout: auto; }
.ss-table th.rowhead, .ss-table td.rowhead {
  min-width: 100px; width: auto; max-width: 220px; text-align: center;   /* 首列（班制名 / 组员名）一律居中 */
  padding: 6px 10px; position: sticky; left: 0; z-index: 3;
}
.ss-table thead th.rowhead { color: #fff; background: var(--blue-2); }
.ss-table tbody td.rowhead { background: #fff; }
/* ⚠ 行标签（锁门/B组换飞鱼/…/C组副号班）必须提高优先级，
   否则被上面的 `.ss-table tbody td.rowhead{background:#fff}` 覆盖成白底白字而「看不见」。 */
.ss-table tbody td.rowhead.ss-shift {
  background: var(--s-special-label); color: #fff; font-weight: 700; text-align: center;
  white-space: nowrap;
}
.ss-table tbody td.rowhead.ss-name { background: #fff; font-weight: 700; }
/* 特殊班制姓名单元格：浅橘底 + 深橘字（沿用 app 的 special 配色），允许换行 */
.ss-cell { white-space: normal; line-height: 1.35; height: auto; min-height: 40px;
  padding: 5px 4px; font-weight: 600; font-size: 12.5px; }
.ss-cell.empty, .cell.empty { background: transparent; color: var(--muted); }
/* 副号班按周合并的单元格：浅蓝底 + 蓝字 + 左侧分周蓝线（与页面顶部表格卡片样式一致） */
.ss-merged { text-align: center; vertical-align: middle; word-break: break-word; }
.ss-table tbody td.ss-week {
  background: var(--s-koubei); color: var(--s-koubei-c); font-weight: 600;
  border-left: 2px solid var(--s-koubei-c);
}
.ss-table tbody td.ss-week.empty { background: transparent; }
.rowhead .pname { font-weight: 700; font-size: 15px; }
.rowhead .pgrp { font-size: 11px; color: var(--muted); }

/* 图例 */
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 5px; }
.legend i { width: 14px; height: 14px; border-radius: 4px; display: inline-block; }

/* 个人详情 */
.person-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 12px; }
.person-card .pc-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.person-card .pc-name { font-size: 20px; font-weight: 800; color: var(--text); }
.person-card .pc-meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.summary-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.summary-chips .chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 5px 10px; border-radius: 12px;
  font-size: 12px; font-weight: 600; background: var(--bg); color: var(--text); border: 1px solid var(--line);
}
.summary-chips .chip.ban { background: var(--s-ban); color: var(--s-ban-c); }
.summary-chips .chip.bai { background: var(--s-bai); color: var(--s-bai-c); }
.summary-chips .chip.xiu { background: var(--s-xiu); color: var(--s-xiu-c); }
.summary-chips .chip.wan { background: var(--s-wan); color: var(--s-wan-c); }
.summary-chips .chip.zhi { background: var(--s-zhi); color: var(--s-zhi-c); }
.summary-chips .chip.pei { background: var(--s-pei); color: var(--s-pei-c); }
.summary-chips .chip.ke { background: var(--s-pei); color: var(--s-pei-c); }
.summary-chips .chip.jia { background: var(--s-jia); color: var(--s-jia-c); }
.summary-chips .chip.chu { background: var(--s-chu); color: var(--s-chu-c); }
.summary-chips .chip.zhong { background: var(--s-zhong); color: var(--s-zhong-c); }
.summary-chips .chip.nian { background: var(--s-nian); color: var(--s-nian-c); }
.summary-chips .chip.chan { background: var(--s-chan); color: var(--s-chan-c); }
.summary-chips .chip.hui { background: var(--s-hui); color: var(--s-hui-c); }
.summary-chips .chip.ab-a { background: var(--s-a); color: var(--s-a-c); }
.summary-chips .chip.ab-b { background: var(--s-b); color: var(--s-b-c); }
.summary-chips .chip.ab-c { background: var(--s-c); color: var(--s-c-c); }
.summary-chips .chip.jing { background: var(--s-jing); color: var(--s-jing-c); }
.summary-chips .chip.mei { background: var(--s-mei); color: var(--s-mei-c); }
.summary-chips .chip.koubei { background: var(--s-koubei); color: var(--s-koubei-c); }
.summary-chips .chip.special { background: var(--s-special); color: var(--s-special-c); }
.summary-chips .chip.loc { background: var(--s-loc); color: var(--s-loc-c); font-weight: 700; }
.card h3 { margin: 0 0 10px; font-size: 15px; color: var(--text); }
.card .detail-table { width: 100%; max-width: 420px; margin-bottom: 12px; }
.card .detail-table td, .card .detail-table th { height: 34px; line-height: 34px; }
.card .detail-table td.rowhead { width: 90px; min-width: 90px; }
/* 变更报告 */
.chg-banner { display: flex; flex-wrap: wrap; gap: 10px; margin: 12px 0; }
.chg-pill { background: #eef4ff; border: 1px solid #cfe0ff; border-radius: 10px; padding: 10px 16px; min-width: 84px; }
.chg-pill .n { font-size: 22px; font-weight: 800; color: var(--blue-2); line-height: 1.1; }
.chg-pill .t { font-size: 12px; color: var(--muted); margin-top: 4px; }
.chg-pill.new .n { color: #b7791f; }
.chg-pill.del .n { color: #c53030; }
.chg-table-wrap { overflow: auto; margin-bottom: 18px; }
.chg-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.chg-table th, .chg-table td { border: 1px solid #e6ebf2; padding: 7px 10px; text-align: left; white-space: nowrap; }
.chg-table th { background: #f4f7fb; color: #41506b; font-weight: 600; }
.chg-table td.k-new { color: #b7791f; font-weight: 700; }
.chg-table td.k-mod { color: var(--blue-2); font-weight: 700; }
.chg-table td.k-del { color: #c53030; font-weight: 700; }
.month-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; max-width: 420px; }
.month-grid .mg-cell {
  height: 46px; border-radius: 6px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-weight: 700; line-height: 1.15; padding: 2px;
}
.month-grid .mg-day { font-size: 18px; font-weight: 800; }
.month-grid .mg-shift { font-size: 12px; font-weight: 600; margin-top: 1px; }
.month-grid .mg-camp { font-size: 10px; font-weight: 600; color: var(--blue-2); margin-top: 1px; opacity: .85; }
.month-grid .mg-loc { font-size: 10px; font-weight: 600; color: #c2410c; margin-top: 1px; opacity: .9; }
.month-grid .mg-empty { opacity: .35; }
.month-grid .mg-dow { background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; height: 28px; }
.month-grid .mg-pad { background: transparent !important; color: #d0d7e0; opacity: .6; }
.month-grid .mg-cell.xiu { background: var(--s-xiu); color: var(--s-xiu-c); }
.month-grid .mg-cell.wan { background: var(--s-wan); color: var(--s-wan-c); }
.month-grid .mg-cell.ban { background: var(--s-ban); color: var(--s-ban-c); }
.month-grid .mg-cell.bai { background: var(--s-bai); color: var(--s-bai-c); }
.month-grid .mg-cell.zhi { background: var(--s-zhi); color: var(--s-zhi-c); }
.month-grid .mg-cell.pei { background: var(--s-pei); color: var(--s-pei-c); }
.month-grid .mg-cell.ke { background: var(--s-pei); color: var(--s-pei-c); }
.month-grid .mg-cell.jia { background: var(--s-jia); color: var(--s-jia-c); }
.month-grid .mg-cell.chu { background: var(--s-chu); color: var(--s-chu-c); }
.month-grid .mg-cell.zhong { background: var(--s-zhong); color: var(--s-zhong-c); }
.month-grid .mg-cell.nian { background: var(--s-nian); color: var(--s-nian-c); }
.month-grid .mg-cell.chan { background: var(--s-chan); color: var(--s-chan-c); }
.month-grid .mg-cell.hui { background: var(--s-hui); color: var(--s-hui-c); }
.month-grid .mg-cell.ab-a { background: var(--s-a); color: var(--s-a-c); }
.month-grid .mg-cell.ab-b { background: var(--s-b); color: var(--s-b-c); }
.month-grid .mg-cell.ab-c { background: var(--s-c); color: var(--s-c-c); }
.month-grid .mg-cell.jing { background: var(--s-jing); color: var(--s-jing-c); }
.month-grid .mg-cell.mei { background: var(--s-mei); color: var(--s-mei-c); }
.month-grid .mg-cell.koubei { background: var(--s-koubei); color: var(--s-koubei-c); }
.month-grid .mg-cell.special { background: var(--s-special); color: var(--s-special-c); }
.month-grid .mg-cell.loc { background: var(--s-loc); color: var(--s-loc-c); font-weight: 700; }
.month-grid .mg-cell.today { outline: 2px solid var(--blue-2); outline-offset: -2px; }

/* 底部导航（手机） */
.bottomnav {
  display: none; position: fixed; bottom: 0; left: 0; right: 0; z-index: 50;
  background: #fff; border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
  box-shadow: 0 -2px 12px rgba(0,0,0,.08);
}
.bottomnav .bn-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 0; font-size: 12px; color: var(--muted); cursor: pointer;
}
.bottomnav .bn-item .bn-icon { width: 22px; height: 22px; display: flex; align-items: center; justify-content: center; }
.bottomnav .bn-item .bn-icon svg { width: 100%; height: 100%; }
/* 手机端底部菜单只保留文字：bn-icon 仅存在于 bottomnav（桌面端整个 bottomnav 都不显示），
   因此这里无条件隐藏即可，桌面端不受影响。 */
.bottomnav .bn-item .bn-icon { display: none; }
.bottomnav .bn-item.active { color: var(--blue); font-weight: 700; }
.bottomnav .bn-item .bn-icon { color: var(--muted); }
.bottomnav .bn-item.active .bn-icon { color: var(--blue); }

/* Toast */
.toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(20,30,45,.92); color: #fff; padding: 10px 18px; border-radius: 22px;
  font-size: 13px; z-index: 90; box-shadow: 0 6px 20px rgba(0,0,0,.25);
}

.hidden { display: none !important; }

/* ===== 响应式：手机端 ===== */
/* 仅在 ≤768px 生效；电脑端样式完全不受影响。v43 移动端适配 */
@media (max-width: 768px) {
  .sidebar { display: none; }
  .content { padding: 12px 10px 96px; }
  .bottomnav { display: flex; }

  /* --- 1. 顶部栏：去标题文字，搜索框占满剩余空间 --- */
  .topbar { padding: 8px 10px; gap: 8px; }
  .brand-text { display: none; }            /* 删除「长沙线上服务科」标题文字（保留 logo） */
  .brand-logo { width: 32px; height: 32px; }
  .search-wrap { flex: 1 1 auto; max-width: none; min-width: 0; }
  .search-wrap input { height: 36px; font-size: 13px; padding: 0 12px; }
  .install-btn { padding: 7px 9px; font-size: 12px; }
  .month-sel { height: 32px; font-size: 12px; }

  /* --- 2. 今日/明日休息·晚班：四行改两行（2×2），整体缩小、信息完整 --- */
  .stats-banner { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 12px; }
  .stat-pill { flex: none; padding: 9px 11px; border-radius: 12px; min-width: 0; }
  .stat-pill .sp-label { font-size: 11px; margin-bottom: 3px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stat-pill .sp-num { font-size: 20px; }
  .stat-pill .sp-num small { font-size: 12px; }
  .stat-pill .sp-break { margin-top: 5px; font-size: 11px; line-height: 1.45; }
  .stat-warn { font-size: 11px; }

  /* --- 4. 删除页面底部「班制介绍」（图例）模块 --- */
  .legend { display: none; }

  /* --- 5. 班制（院区）详情页：姓名+科室列缩小；姓名列固定左侧不随横向滚动 --- */
  /* 表格按列宽展开（而非压进屏幕）：日期列保持可读宽度、产生真实横向滚动，
     配合下方 sticky 姓名列。min-width:100% 保证列少（如周视图）时仍撑满容器 */
  table.sched { font-size: 12px; width: max-content; min-width: 100%; }
  table.sched th, table.sched td { width: 30px; }
  /* ⚠ table-layout: fixed 下列宽由首行 th 决定，所以 th/td 都要覆盖 */
  table.sched.has-dept th.rowhead {
    left: 0;                                 /* 左上角：纵向吸顶 + 横向吸附 */
    z-index: 6;                              /* 压过科室列表头(z4)，避免滚动途中被叠 */
    width: 68px; min-width: 68px; padding: 5px 4px; font-size: 12px;
    color: var(--blue);                      /* 角落文字原本白底白字，移动端改为蓝字可见 */
  }
  table.sched.has-dept td.rowhead {
    position: sticky; left: 0; z-index: 5;   /* 姓名列固定在左侧，横向滚动时始终可见 */
    width: 68px; min-width: 68px; padding: 5px 4px;
  }
  table.sched.has-dept th.rowhead.dept-head {
    left: auto; width: 58px; min-width: 58px; padding: 5px 3px; font-size: 11px;
  }
  table.sched.has-dept td.dept-cell {
    position: static; width: 58px; min-width: 58px; padding: 5px 3px; font-size: 11px;
  }
  table.sched.has-dept .rowhead .pname { font-size: 12.5px; }
  table.sched.has-dept .rowhead .pgrp { font-size: 10px; }
  /* 取消桌面端 rowhead 的 nowrap：否则星沙等院区的长备注行
     （如「值班医生上班时间：9：30--18：30」）在 max-content 展开下会把姓名列撑到 200px+ */
  table.sched th.rowhead, table.sched td.rowhead { white-space: normal; word-break: break-all; }
  /* 本部门（无科室列）与院区姓名列统一：宽 68px、字号 12.5px、内边距一致 */
  table.sched th.rowhead, table.sched td.rowhead { width: 68px; min-width: 68px; padding: 5px 4px; }
  .cell { height: 30px; line-height: 30px; font-size: 12px; }
  .rowhead .pname { font-size: 12.5px; }

  /* --- 6. 其余文字/间距统一收敛到手机阅读尺寸 --- */
  .card { padding: 12px; margin-bottom: 12px; border-radius: 12px; }
  .card h2 { font-size: 16px; }
  .card h3 { font-size: 14px; }
  .card .sub { font-size: 11.5px; line-height: 1.5; }
  .campus-tabs { gap: 6px; margin-bottom: 10px; }
  .campus-tab { padding: 6px 12px; font-size: 12px; }
  .toolbar { gap: 8px; margin-bottom: 10px; }
  .toolbar .seg button { padding: 6px 11px; font-size: 12px; }
  .toolbar select { height: 32px; font-size: 12px; flex: 0 1 auto; min-width: 0; max-width: 100%; }
  .toolbar .link-btn { margin-left: 0; padding: 6px 10px; font-size: 12px; }
  .month-grid { max-width: none; gap: 2px; }
  .month-grid .mg-cell { height: 44px; }
  .month-grid .mg-day { font-size: 15px; }
  .month-grid .mg-shift { font-size: 11px; }
  .person-card .pc-name { font-size: 18px; }
  .summary-chips .chip { font-size: 11px; padding: 4px 8px; }
  .chg-pill { padding: 8px 12px; min-width: 72px; }
  .chg-pill .n { font-size: 18px; }
  .chg-table { font-size: 12px; }
  .chg-table th, .chg-table td { padding: 6px 8px; }
  .ss-table th.rowhead, .ss-table td.rowhead { min-width: 78px; padding: 5px 6px; }
  .ss-cell { font-size: 11.5px; min-height: 34px; }
  .toast { bottom: 96px; width: max-content; max-width: 86vw; }

  /* --- 3. 底部菜单栏：去图标、纯文字；选中=电脑端同款蓝色高亮条，未选中=灰色 --- */
  .bottomnav {
    gap: 2px; padding: 5px 5px calc(5px + env(safe-area-inset-bottom));
  }
  .bottomnav .bn-item {
    flex: 1 1 0; flex-direction: row; gap: 0;
    align-items: center; justify-content: center; text-align: center;
    padding: 9px 2px; font-size: 11px; line-height: 1.25; font-weight: 600;
    color: #64748b;                          /* 未选中：电脑端菜单同款灰 */
    border-radius: 10px; margin: 0 1px;
    word-break: break-all; white-space: normal;
  }
  .bottomnav .bn-item .bn-icon { display: none; }   /* 移除图标，仅保留文字 */
  .bottomnav .bn-item.active {
    background: var(--blue);                 /* 选中：电脑端菜单同款蓝色高亮条 */
    color: #fff;
    box-shadow: 0 4px 14px rgba(14, 77, 164, .22);
  }
}
