/* ============================================================================
 * 老肯收送服务 · 调度管理后台样式
 * V31 · 集团品牌 UI 重制（老肯蓝 · 企业级调度台）
 *   · 主色：老肯品牌蓝 #2281C1（直接取自集团 LOGO 底色），延伸 11 级同色系色阶
 *   · 品牌：内置集团 LOGO（侧栏徽标 / 登录卡徽标 / 浏览器图标 / 底纹水印）
 *   · 风格：去水滴、去水波，改为几何格栅 + 大号品牌水印 —— 干净、克制、专业
 *   · 体系：色阶 / 圆角 / 阴影 / 间距 / 动效 全量统一；菜单图标化、卡片层次感、
 *          表单沉浸聚焦、表格轻盈、弹窗玻璃质感
 *   · 原则：类名与结构完全兼容既有视图，只做视觉升级，不改业务
 * ========================================================================== */

/* ---------------------------------------------------------------- 设计变量 */
:root {
  /* 老肯品牌蓝色阶（基准 #2281C1 = 集团 LOGO 底色） */
  --brand: #2281c1;
  --c-950: #05223a;
  --c-900: #0a3454;
  --c-800: #0f4a75;
  --c-700: #17628f;
  --c-600: #2281c1;
  --c-500: #3393d1;
  --c-400: #5ca9dc;
  --c-300: #93c8e9;
  --c-200: #c6e1f3;
  --c-100: #e4f0f9;
  --c-50: #f3f8fc;

  /* 语义色 */
  --ok: #0e8a60;
  --ok-bg: #e7f7ef;
  --warn: #b4711c;
  --warn-bg: #fff6e4;
  --danger: #d64747;
  --danger-bg: #fdeeee;

  /* 文本 / 背景 / 描边（冷蓝调中性色，与品牌蓝同源） */
  --t-1: #16303f;
  --t-2: #4a6273;
  --t-3: #8399a8;
  --line: #e2eaf1;
  --line-s: #edf3f8;
  --bg: #f2f7fb;
  --card: #ffffff;

  /* 圆角 */
  --radius: 16px;
  --radius-s: 10px;

  /* 阴影（柔和多层） */
  --shadow-s: 0 1px 2px rgba(10, 52, 84, .05), 0 3px 10px rgba(10, 52, 84, .05);
  --shadow-m: 0 8px 24px rgba(10, 52, 84, .10);
  --shadow-l: 0 22px 56px rgba(10, 52, 84, .20);
  --ring: 0 0 0 3px rgba(34, 129, 193, .18);

  /* 过渡 */
  --ease: cubic-bezier(.22, .68, .32, 1);

  /* 集团 LOGO 素材（由原图提取，透明底；faint 为底纹水印专用） */
  --ks-mark-white: url("../assets/ks-mark-white.png");
  --ks-mark-blue: url("../assets/ks-mark-blue.png");
  --ks-mark-faint: url("../assets/ks-mark-faint.png");
  --ks-tile: url("../assets/ks-logo.png"); /* 方形图标：index.html 的 favicon / 主屏图标直接引用 */

  /* 几何格栅纹样（取代水滴 / 水波） */
  --grid-pattern:
    linear-gradient(180deg, rgba(34, 129, 193, .05) 1px, transparent 1px) 0 0 / 100% 74px,
    linear-gradient(90deg, rgba(34, 129, 193, .05) 1px, transparent 1px) 0 0 / 74px 100%;

  /* 菜单图标（stroke，经 mask 着色） */
  --mi-home: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3.5 10.6L12 3.4l8.5 7.2'/%3E%3Cpath d='M5.6 9.8V20a1 1 0 0 0 1 1H10v-5.6h4V21h3.4a1 1 0 0 0 1-1V9.8'/%3E%3C/svg%3E");
  --mi-hospital: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.6 21V5.2a1.7 1.7 0 0 1 1.7-1.7h11.4a1.7 1.7 0 0 1 1.7 1.7V21'/%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M12 8v6M9 11h6'/%3E%3C/svg%3E");
  --mi-truck: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.6 7.4H13v9.4H2.6z'/%3E%3Cpath d='M13 11h4.2l3.2 3.2v2.6H13'/%3E%3Ccircle cx='6.6' cy='18.6' r='1.7'/%3E%3Ccircle cx='16.9' cy='18.6' r='1.7'/%3E%3C/svg%3E");
  --mi-box: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l8 4.4v9.2L12 21l-8-4.4V7.4z'/%3E%3Cpath d='M4.2 7.6L12 12l7.8-4.4M12 12v8.6'/%3E%3C/svg%3E");
  --mi-shield: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 2.8l7.3 2.7v5.3c0 4.5-3.1 8.4-7.3 10-4.2-1.6-7.3-5.5-7.3-10V5.5z'/%3E%3Cpath d='M8.8 11.6l2.3 2.3 4.1-4.1'/%3E%3C/svg%3E");
  --mi-factory: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 21h18'/%3E%3Cpath d='M4.6 21v-9.8l5.4 3.5v-3.5l5.4 3.5V4.6H20V21'/%3E%3C/svg%3E");
  --mi-gear: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h8M18 7h2M4 12h3M13 12h7M4 17h11'/%3E%3Ccircle cx='15' cy='7' r='2'/%3E%3Ccircle cx='10' cy='12' r='2'/%3E%3Ccircle cx='18' cy='17' r='2'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- 基础 */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  color: var(--t-1);
  background-color: var(--bg);
  background-image:
    radial-gradient(900px 320px at 88% -90px, rgba(34, 129, 193, .12), rgba(34, 129, 193, 0) 62%),
    radial-gradient(700px 300px at 12% -120px, rgba(190, 224, 245, .14), rgba(190, 224, 245, 0) 60%),
    linear-gradient(180deg, #ecf3fa 0%, #f4f8fc 320px, var(--bg) 100%);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button { font-family: inherit; }
a { color: var(--c-700); text-decoration: none; }
a:hover { color: var(--c-500); }
::selection { background: var(--c-200); color: var(--c-950); }

/* 细滚动条 */
* { scrollbar-width: thin; scrollbar-color: #c3d6e6 transparent; }
*::-webkit-scrollbar { width: 9px; height: 9px; }
*::-webkit-scrollbar-thumb {
  background: #cbdce9; border-radius: 10px; border: 2px solid transparent; background-clip: content-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--c-400); background-clip: content-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* ---------------------------------------------------------------- 布局 */
.layout { display: flex; min-height: 100vh; }

/* ============================== 侧栏 ============================== */
.side {
  width: 234px; flex: 0 0 234px; position: relative; overflow: hidden;
  background: linear-gradient(178deg, #2a8cc9 0%, #2281c1 26%, #17628f 66%, #10476b 100%);
  color: #cfe2f2;
  display: flex; flex-direction: column;
  box-shadow: 6px 0 28px rgba(8, 44, 72, .22);
}
/* 品牌水印：侧栏下部压印大号集团 LOGO（取代原水滴纹样） */
.side::before {
  content: ''; position: absolute; right: -54px; bottom: 26px; width: 226px; height: 226px;
  background: var(--ks-mark-faint) center / contain no-repeat;
  pointer-events: none;
}
/* 顶部光泽 */
.side::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 300px;
  background:
    radial-gradient(380px 230px at 112% -60px, rgba(255, 255, 255, .20), rgba(255, 255, 255, 0) 68%),
    linear-gradient(202deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, 0) 46%);
  pointer-events: none;
}
.side > * { position: relative; z-index: 1; }

.brand {
  padding: 22px 18px 2px; font-size: 17px; font-weight: 700; color: #fff;
  letter-spacing: 1px; display: flex; align-items: center; gap: 11px;
}
/* 集团 LOGO 徽标 */
.brand::before {
  content: ''; width: 34px; height: 34px; flex: 0 0 34px; border-radius: 10px;
  background: var(--ks-mark-white) center / 22px no-repeat, rgba(255, 255, 255, .18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .34), 0 7px 18px rgba(8, 44, 72, .32);
}
.brand-center { padding: 5px 18px 3px; font-size: 12.5px; color: #eaf4fc; font-weight: 600; letter-spacing: .4px; }
.brand-sub { padding: 0 18px 16px; font-size: 10.5px; color: #b3cee4; letter-spacing: 1.4px; }

.menu {
  padding: 14px 12px 26px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
  border-top: 1px solid rgba(255, 255, 255, .18);
}
.menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .3); }
.menu-item {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: 10px; cursor: pointer;
  color: #dceaf7; font-size: 14px; position: relative;
  transition: background .16s var(--ease), color .16s var(--ease), transform .16s var(--ease);
}
.menu-item:hover { background: rgba(255, 255, 255, .14); color: #fff; transform: translateX(2px); }
.menu-item.active {
  background: #fff; color: var(--c-700); font-weight: 700;
  box-shadow: 0 8px 20px rgba(8, 44, 72, .26);
}
/* 顶菜单图标（经 mask 着色，跟随文字颜色） */
.menu-item[data-route="dashboard"]::before {
  content: ''; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; opacity: .92;
  -webkit-mask: var(--mi-home) center / contain no-repeat;
  mask: var(--mi-home) center / contain no-repeat;
}

/* ---- V26/V27：左侧菜单「7 个主菜单 + 二级折叠」（手风琴） ---- */
.menu-group { display: flex; flex-direction: column; gap: 2px; }
.menu-head {
  display: flex; align-items: center; gap: 9px;
  padding: 10px 12px; border-radius: 10px; cursor: pointer;
  color: #cbdff0; font-size: 13px; font-weight: 700; letter-spacing: 1px;
  transition: background .16s var(--ease), color .16s var(--ease);
}
.menu-head:hover { background: rgba(255, 255, 255, .13); color: #fff; }
.menu-head.is-active { color: #fff; }
.menu-head::before {
  content: ''; width: 17px; height: 17px; flex: 0 0 17px; background: currentColor; opacity: .9;
  -webkit-mask: var(--mi, var(--mi-box)) center / contain no-repeat;
  mask: var(--mi, var(--mi-box)) center / contain no-repeat;
  transition: opacity .16s;
}
.menu-head[data-key="医院管理"] { --mi: var(--mi-hospital); }
.menu-head[data-key="司机管理"] { --mi: var(--mi-truck); }
.menu-head[data-key="转运箱管理"] { --mi: var(--mi-box); }
.menu-head[data-key="质量管理"] { --mi: var(--mi-shield); }
.menu-head[data-key="生产管理"] { --mi: var(--mi-factory); }
.menu-head[data-key="系统设置"] { --mi: var(--mi-gear); }
/* 折叠指示：展开时 ▾，折叠时 ▸ */
.menu-head::after {
  content: ''; width: 6px; height: 6px; margin-left: auto; flex: 0 0 6px;
  border-right: 1.6px solid currentColor; border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg) translate(-1px, -1px); opacity: .7;
  transition: transform .22s var(--ease);
}
.menu-group.closed .menu-head::after { transform: rotate(-45deg) translate(-1px, 1px); }
.menu-items {
  display: flex; flex-direction: column; gap: 2px;
  padding: 2px 0 4px 13px; margin: 0 0 2px 20px; border-left: 1px solid rgba(255, 255, 255, .22);
}
.menu-group.closed .menu-items { display: none; }
.menu-items .menu-item { font-size: 13.5px; padding: 8px 12px; }
.menu-items .menu-item::before {
  content: ''; width: 5px; height: 5px; flex: 0 0 5px; border-radius: 50%;
  background: rgba(198, 225, 243, .6); transition: background .16s, box-shadow .16s;
}
.menu-items .menu-item:hover::before { background: #fff; }
.menu-items .menu-item.active::before { background: var(--c-600); box-shadow: 0 0 0 3px rgba(34, 129, 193, .18); }
.menu-label { padding: 12px; font-size: 13px; color: #a6c6e0; }

/* ============================== 主区 ============================== */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 60px; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 6px 20px rgba(10, 52, 84, .045);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 22px; position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 16px; font-weight: 700; display: flex; align-items: center; gap: 9px; letter-spacing: .3px; }
.crumb::before {
  content: ''; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--c-400), var(--c-700));
  box-shadow: 0 2px 6px rgba(34, 129, 193, .4);
}
.who { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--t-2); }
/* V27：用户胶囊（头像 + 姓名） */
.who-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 12px 3px 3px; box-shadow: var(--shadow-s);
}
.who-ava {
  display: inline-flex; align-items: center; justify-content: center;
  width: 27px; height: 27px; border-radius: 50%; font-style: normal;
  background: linear-gradient(140deg, var(--c-400), var(--c-700));
  color: #fff; font-size: 12px; font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .35);
}
.who-name { font-size: 13px; color: var(--t-1); font-weight: 600; }

/* V5：顶栏中心选择器 */
.center-sel {
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 7px 10px; font-size: 13px; margin-right: 8px; color: var(--t-1);
  cursor: pointer; outline: none; transition: border-color .16s, box-shadow .16s;
}
.center-sel:hover { border-color: var(--c-300); }
.center-sel:focus { border-color: var(--c-500); box-shadow: var(--ring); }
.center-tag {
  display: inline-flex; align-items: center; background: var(--c-100); color: var(--c-700);
  border: 1px solid var(--c-200); border-radius: 999px; padding: 3px 11px;
  font-size: 12px; margin-right: 8px; font-weight: 600;
}

/* V9：初始密码提醒横幅（红色水光渐变） */
.pw-banner {
  background: linear-gradient(120deg, #dd5a50, #b02f34); color: #fff;
  padding: 11px 22px; font-size: 13px; display: flex; align-items: center;
  justify-content: space-between; gap: 12px; letter-spacing: .3px;
  box-shadow: 0 6px 18px rgba(176, 47, 52, .28);
}
.pw-banner .btn {
  border-color: rgba(255, 255, 255, .55); color: #fff; background: rgba(255, 255, 255, .14);
}
.pw-banner .btn:hover { background: rgba(255, 255, 255, .26); border-color: #fff; color: #fff; }

.content {
  padding: 20px 24px 56px; flex: 1; position: relative;
}
.content::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 220px; pointer-events: none;
  background-image: var(--grid-pattern);
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0));
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0));
}
.content > * { position: relative; animation: rise .24s var(--ease); }
@keyframes rise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 登录 */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background:
    radial-gradient(900px 430px at 14% 2%, rgba(160, 210, 240, .40), rgba(160, 210, 240, 0) 62%),
    radial-gradient(820px 460px at 92% 98%, rgba(5, 34, 58, .52), rgba(5, 34, 58, 0) 64%),
    linear-gradient(150deg, #2f90cd 0%, #2281c1 34%, #17628f 72%, #0f4a75 100%);
  position: relative; overflow: hidden;
}
/* 品牌水印：大号集团 LOGO（取代原水滴纹样） */
.login-wrap::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background:
    var(--ks-mark-faint) right -70px bottom -50px / 460px no-repeat,
    var(--ks-mark-faint) left -90px top -80px / 300px no-repeat;
}
/* 斜向光泽（取代底部水波） */
.login-wrap::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(206deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, 0) 40%);
}
.login-card {
  position: relative; width: 400px;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(8px);
  border-radius: 22px; padding: 40px 38px 28px;
  border: 1px solid rgba(255, 255, 255, .65);
  box-shadow: var(--shadow-l);
}
.login-card::before {
  content: ''; position: absolute; left: 50%; top: -34px; transform: translateX(-50%);
  width: 68px; height: 68px; border-radius: 20px;
  background: var(--ks-mark-blue) center / 42px no-repeat, linear-gradient(160deg, #ffffff, #e9f3fb);
  border: 1px solid #d5e6f4;
  box-shadow: 0 16px 34px rgba(8, 44, 72, .26), 0 0 0 6px rgba(255, 255, 255, .3);
}
.login-title {
  font-size: 20px; font-weight: 700; text-align: center; margin: 14px 0 4px;
  letter-spacing: 1px;
  background: linear-gradient(120deg, var(--c-900), var(--c-500));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.login-sub { text-align: center; font-size: 12px; color: var(--t-3); margin-bottom: 22px; letter-spacing: 2px; }
.login-card .field { margin-bottom: 14px; }
.login-card .field label { font-size: 12.5px; color: var(--t-2); font-weight: 600; letter-spacing: .5px; }
.login-card .field input {
  height: 44px; font-size: 14px; border-radius: 12px; padding: 0 14px; background: #fbfdff;
}
.login-card .btn.block { height: 46px; padding: 0; margin-top: 10px; font-size: 15px; border-radius: 12px; letter-spacing: 4px; }
.login-foot { text-align: center; margin-top: 16px; font-size: 12px; color: var(--t-3); }
.login-foot a { color: var(--c-600); cursor: pointer; }
.login-foot a:hover { color: var(--c-500); text-decoration: underline; }
/* V31：登录页「自动登录」选项（勾选 → 保持登录状态，下次打开免登录） */
label.chk.login-auto {
  margin: 2px 0 4px; padding: 4px 0; font-size: 12.5px; color: var(--t-2); line-height: 1.5;
}
label.chk.login-auto input { flex: 0 0 auto; margin-top: 1px; }

/* ---------------------------------------------------------------- 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 5px;
  border: 1px solid var(--c-200); background: #fff; color: var(--c-800);
  padding: 7px 15px; border-radius: 10px; cursor: pointer; font-size: 13px; line-height: 1.45;
  transition: background .16s var(--ease), border-color .16s var(--ease), color .16s var(--ease),
    box-shadow .16s var(--ease), transform .14s var(--ease);
  white-space: nowrap;
}
.btn:hover {
  border-color: var(--c-400); color: var(--c-600); background: var(--c-50);
  box-shadow: 0 3px 10px rgba(15, 74, 117, .12);
  transform: translateY(-1px);
}
.btn:active { transform: translateY(0); }
.btn:focus-visible { outline: none; box-shadow: var(--ring); }
.btn.primary {
  background: linear-gradient(135deg, var(--c-400) 0%, var(--c-600) 58%, var(--c-700) 100%);
  border-color: var(--c-600); color: #fff; font-weight: 600;
  box-shadow: 0 5px 16px rgba(15, 74, 117, .30), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.btn.primary:hover {
  background: linear-gradient(135deg, #4dc3d3, var(--c-500) 58%, var(--c-600));
  color: #fff; transform: translateY(-1px);
  box-shadow: 0 9px 22px rgba(15, 74, 117, .36), inset 0 1px 0 rgba(255, 255, 255, .32);
}
.btn.warn { color: var(--warn); border-color: #f0d3a0; background: #fffdf8; }
.btn.warn:hover { background: var(--warn-bg); border-color: #e3bd77; color: #96601a; }
.btn.danger { background: linear-gradient(135deg, #e3595c, #c93b3f); border-color: #c93b3f; color: #fff; }
.btn.danger:hover { background: linear-gradient(135deg, #d94a4a, #b32f33); border-color: #b32f33; color: #fff; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
.btn.mini { padding: 3px 10px; font-size: 12px; border-radius: 8px; }
.btn.block { display: flex; width: 100%; padding: 11px; margin-top: 8px; font-size: 14px; }
.btn.mini.danger { background: var(--danger-bg); color: #c93b3f; border-color: #f5c2c2; }
.btn.mini.danger:hover { background: #fbdcdc; }

/* 标签页（分段控件） */
.tab-link {
  display: inline-flex; align-items: center; padding: 6px 15px; border-radius: 999px;
  font-size: 13px; color: var(--t-2); cursor: pointer; user-select: none;
  border: 1px solid transparent; transition: all .16s var(--ease);
}
.tab-link:hover { background: var(--c-50); color: var(--c-700); }
.tab-link.on {
  background: linear-gradient(135deg, var(--c-500), var(--c-700)); color: #fff; font-weight: 600;
  box-shadow: 0 5px 14px rgba(15, 74, 117, .28), inset 0 1px 0 rgba(255, 255, 255, .25);
}

/* ---------------------------------------------------------------- 表单控件 */
.inp, select.inp, input[type="date"].inp, input[type="month"].inp {
  border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; font-size: 13px;
  background: #fff; color: var(--t-1); outline: none; min-width: 60px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease), background .16s;
}
.inp:hover { border-color: var(--c-300); }
.inp:focus { border-color: var(--c-500); box-shadow: var(--ring); background: #fff; }
select.inp { cursor: pointer; padding-right: 6px; }
input[disabled] { background: #f2f6fa; color: var(--t-3); }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 13px; }
.field label { font-size: 12px; color: var(--t-2); font-weight: 600; letter-spacing: .3px; }
.field.full { grid-column: 1 / -1; }
.field input, .field select, .field textarea {
  border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 13px;
  outline: none; background: #fff; color: var(--t-1); font-family: inherit;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--c-300); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-500); box-shadow: var(--ring);
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; column-gap: 18px; }
label.chk { display: flex; gap: 8px; align-items: center; font-size: 13px; color: var(--t-1); padding: 6px 0; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--c-600); width: 15px; height: 15px; cursor: pointer; }

/* ---------------------------------------------------------------- 工具条 */
.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .title {
  font-weight: 700; font-size: 17px; color: var(--c-900); display: inline-flex; align-items: center; gap: 9px;
  letter-spacing: .3px;
}
.toolbar .title::before {
  content: ''; width: 5px; height: 18px; border-radius: 3px;
  background: linear-gradient(180deg, var(--c-400), var(--c-700));
  box-shadow: 0 2px 6px rgba(34, 129, 193, .4);
}
.filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.filter-bar .lbl { color: var(--t-3); }
.filter-bar .sep { color: #c6d4e2; margin: 0 4px; }
.filter-bar input[type="date"], .filter-bar input[type="month"] {
  height: 34px; border: 1px solid var(--line); border-radius: 10px; padding: 0 9px; font-size: 13px;
  background: #fff; outline: none; color: var(--t-1);
  transition: border-color .16s, box-shadow .16s;
}
.filter-bar input[type="date"]:focus { border-color: var(--c-500); box-shadow: var(--ring); }
.filter-bar .sp { flex: 1; }
.tabbar { margin-top: 6px; }
.sp { flex: 1; }
.row-gap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.w80 { width: 80px; }
.chk-inline {
  display: inline-flex; align-items: center; gap: 5px; font-size: 13px; color: var(--t-2);
  white-space: nowrap; cursor: pointer;
}
.muted { color: var(--t-3); }
.small { font-size: 12px; }
.loading { padding: 64px; text-align: center; color: var(--t-3); letter-spacing: 1px; }
.loading::before {
  content: ''; display: inline-block; width: 18px; height: 18px; margin-right: 9px; vertical-align: -3px;
  border: 2px solid var(--c-200); border-top-color: var(--c-600); border-radius: 50%;
  animation: rot .8s linear infinite;
}
.empty-td { text-align: center; color: #9db0c0; padding: 38px !important; letter-spacing: .5px; }

/* ---- V47：生产排班周看板（周一 ~ 周日 7 天完整周，与小程序端同一份数据） ---- */
.sched-tbl th, .sched-tbl td { text-align: center; }
.sched-tbl .sc-th-name, .sched-tbl .sc-name { text-align: left; min-width: 140px; }
.sched-tbl .sc-name { vertical-align: middle; }
.sc-th { min-width: 92px; }
.sc-th.today { background: linear-gradient(180deg, #e6f4ff, #d3e9ff) !important; color: #0b5cab; }
.sc-th.weekend { background: linear-gradient(180deg, #fff7ec, #ffeecd) !important; color: #b4690e; }
.sc-wd { font-size: 12px; font-weight: 700; }
.sc-d { font-size: 12px; color: #5b6b7b; margin-top: 2px; }
.sc-cnt { margin-top: 4px; font-size: 11px; color: #9db0c0; }
.sc-cnt.on { color: #0b5cab; font-weight: 700; }
.sc-td { min-width: 92px; padding: 6px 4px !important; cursor: pointer; border-radius: 4px; }
.sc-td:hover { box-shadow: inset 0 0 0 2px var(--c-500); }
.sc-td .sc-nm { font-weight: 700; color: #1f2d3d; font-size: 13px; }
.sc-td .sc-tm { font-size: 11px; color: #64748b; margin-top: 2px; }
.sc-td .sc-add { color: #b8c6d4; font-size: 16px; font-weight: 700; }
.sc-td[data-mark="rest"] { background: #eef2f7; }
.sc-td[data-mark="leave"] { background: #fff1e6; }
/* V94：排班表刷新中 —— 保留旧表格（不清空，防止高度塌缩把滚动条拉回顶部），期间禁止误点 */
.ps-refreshing { opacity: .55; pointer-events: none; }
/* V93：历史排班（今天之前）锁定 —— 灰化 + 禁止点击，提示该日已产生打卡不可修改 */
.sc-td.locked { cursor: not-allowed; opacity: .55; filter: grayscale(.7); }
.sc-td.locked:hover { box-shadow: inset 0 0 0 2px #cbd5e1; }
.sc-mark { font-size: 15px; font-weight: 700; color: #64748b; }
.sc-td[data-mark="leave"] .sc-mark { color: #d97706; }

/* ---- V47：排班面板（对齐小程序端：当前状态 + 快捷休/假 + 班次点选即生效） ---- */
.sc-ph { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: #f6fafd; border-radius: 8px; }
.sc-pname { font-size: 15px; font-weight: 700; }
.sc-chip { padding: 4px 12px; border-radius: 999px; color: #fff; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sc-chip-gray { background: #64748b; }
.sc-chip-orange { background: #f59e0b; }
.sc-chip-none { background: #e2e8f0; color: #64748b; }
.sc-quick { display: flex; gap: 10px; margin: 12px 0 4px; }
.sc-qbtn { flex: 1; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-s); border-radius: 10px; background: #fff; cursor: pointer; text-align: left; }
.sc-qbtn:hover { border-color: var(--c-500); }
.sc-qbtn.on { border-color: var(--c-500); box-shadow: 0 0 0 2px rgba(30, 136, 229, .15); }
.sc-qic { width: 32px; height: 32px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; background: #64748b; flex: none; }
.sc-qbtn.leave .sc-qic { background: #f59e0b; }
.sc-qtxt { font-size: 13px; font-weight: 600; line-height: 1.35; display: flex; flex-direction: column; }
.sc-qtxt small { font-weight: 400; color: #8a99a8; font-size: 11px; }
.sc-gtitle { margin: 14px 0 6px; font-size: 12px; font-weight: 700; color: #5b6b7b; letter-spacing: .5px; }
.sc-list { max-height: 320px; overflow-y: auto; border: 1px solid var(--line-s); border-radius: 10px; }
/* V84：班次「适用星期」勾选（新建 / 编辑班次表单） */
.wd-ck-box { display: flex; flex-wrap: wrap; gap: 10px 16px; margin-top: 6px; }
.wd-ck { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #33475b; cursor: pointer; }
.wd-ck input { width: 15px; height: 15px; cursor: pointer; }
.sc-srow { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--line-s); cursor: pointer; }
.sc-srow:last-child { border-bottom: 0; }
.sc-srow:hover { background: #f6fafd; }
.sc-srow.picked { background: #eaf4ff; }
.sc-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sc-smain { flex: 1; min-width: 0; }
.sc-sname { font-size: 13px; font-weight: 600; }
.sc-cur { margin-left: 6px; font-size: 11px; color: #0b5cab; background: #e3f0ff; border-radius: 999px; padding: 1px 8px; }
.sc-arrow { color: #b8c6d4; font-size: 16px; }
.sc-clear { margin-top: 12px; text-align: center; }
.err-banner, .warn-banner {
  background: var(--warn-bg); border: 1px solid #f0d7a3; color: #8a5c10;
  padding: 11px 15px; border-radius: var(--radius-s); margin-bottom: 12px; font-size: 13px;
}
.err-banner { background: var(--danger-bg); border-color: #f6c6c6; color: #b03030; }

/* ---------------------------------------------------------------- 卡片 / 面板 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: linear-gradient(180deg, #fff, #fbfeff);
  border-radius: var(--radius); padding: 18px 20px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-s); border: 1px solid var(--line);
  transition: transform .2s var(--ease), box-shadow .2s var(--ease);
}
.stat-card::before {
  content: ''; position: absolute; left: 0; top: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--c-400), var(--c-700));
  opacity: 0; transition: opacity .2s;
}
.stat-card::after {
  content: ''; position: absolute; right: -30px; top: -30px; width: 100px; height: 100px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 129, 193, .15), rgba(34, 129, 193, 0) 70%);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); }
.stat-card:hover::before { opacity: 1; }
.stat-title { font-size: 12.5px; color: var(--t-2); font-weight: 500; letter-spacing: .3px; }
.stat-value {
  font-size: 32px; font-weight: 700; color: var(--c-900); margin-top: 7px; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums;
}
.stat-value span { font-size: 13px; font-weight: 400; color: var(--t-3); margin-left: 5px; }

.panel {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow-s);
  border: 1px solid var(--line); margin-bottom: 16px; overflow: hidden;
}
.panel-h {
  padding: 14px 18px; font-weight: 700; font-size: 14px; color: var(--c-800);
  border-bottom: 1px solid var(--line-s); background: linear-gradient(180deg, #fdfeff, #f5f9fd);
  display: flex; align-items: center; gap: 9px; letter-spacing: .3px;
}
.panel-h::before {
  content: ''; width: 4px; height: 15px; border-radius: 2px;
  background: linear-gradient(180deg, var(--c-400), var(--c-700));
  box-shadow: 0 2px 5px rgba(34, 129, 193, .35);
}
.panel-b { padding: 12px 18px 18px; }
.quick {
  display: inline-block; background: linear-gradient(135deg, var(--c-100), #e9f3fb); color: var(--c-700);
  padding: 12px 18px; border-radius: 12px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--c-200); transition: all .18s var(--ease);
}
.quick:hover {
  background: linear-gradient(135deg, var(--c-400), var(--c-700)); color: #fff;
  transform: translateY(-2px); box-shadow: 0 8px 18px rgba(15, 74, 117, .3);
  border-color: var(--c-600);
}

/* ---------------------------------------------------------------- 表格 */
.tbl { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; }
.tbl th {
  text-align: left; font-size: 12px; color: var(--c-800); font-weight: 700;
  letter-spacing: .6px;
  padding: 12px 11px; background: linear-gradient(180deg, #f3f8fd, #e7f0f9);
  border-bottom: 1px solid var(--c-200); white-space: nowrap;
}
.tbl th:first-child { border-top-left-radius: 0; }
.tbl td { padding: 11px; border-bottom: 1px solid var(--line-s); vertical-align: top; color: var(--t-1); }
.tbl tbody tr { transition: background .13s; }
.tbl tbody tr:hover td { background: #f6fafd; }
.tbl tbody tr:last-child td { border-bottom: 0; }
.tbl .ops { white-space: nowrap; }
.tbl .ops .btn { margin: 1px 2px 1px 0; }
.row-focus td { background: #f1fbfc !important; box-shadow: inset 3px 0 0 var(--c-500); }

/* ---- V50：宽表格统一处理（列不再被挤成「一字一行」，容器窄时横向滚动） ---- */
.tbl-scroll { overflow-x: auto; }

/* ---- V111：发货箱数「按医院」表格（新增「登记人」列后仍保持整齐） ----
 * ① 计数 / 人名列不换行，避免被挤成竖排；② 只有「医院」列允许换行，全称完整可见；
 * ③ 登记人超长省略（完整名单挂在 title 上，悬停可见） */
.bs-tbl th, .bs-tbl td { white-space: nowrap; vertical-align: middle; }
.bs-tbl th:first-child, .bs-tbl td:first-child {
  white-space: normal; word-break: break-word; overflow-wrap: anywhere; min-width: 150px;
}
.bs-tbl .bs-op { max-width: 138px; overflow: hidden; text-overflow: ellipsis; }

/* ===== V60：医院档案列表重排版（分组清晰 + 收送时间一眼可见 + 科室可增删改） ===== */
.ta-r { text-align: right; }
.nowrap { white-space: nowrap; }

/* 标题行：左侧菜单名 + 右侧当前筛选结果计数 */
.hp-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.hp-count { font-size: 12px; font-weight: 500; color: var(--t-3); }
.hp-count b { color: var(--c-600); font-size: 13px; }

/* 筛选区：搜索框 + 分段筛选 + 操作按钮一行排开 */
.hp-filter { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 0 14px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; }
.hp-filter .sp { flex: 1; }
.hp-search { display: flex; gap: 6px; }
.hp-search .inp { width: 250px; }

/* 分段筛选（替代原来的下拉框，当前筛选项一眼可见） */
.seg { display: inline-flex; align-items: center; gap: 2px; padding: 2px; background: var(--c-50); border: 1px solid var(--line); border-radius: var(--radius-s); }
.seg-btn { border: 0; background: transparent; padding: 5px 12px; font-size: 12px; color: var(--t-2); border-radius: 8px; cursor: pointer; transition: all .15s var(--ease); white-space: nowrap; }
.seg-btn:hover { color: var(--c-700); background: rgba(255, 255, 255, .7); }
.seg-btn.on { background: #fff; color: var(--c-700); font-weight: 600; box-shadow: var(--shadow-s); }

.hp-scroll { margin-top: 10px; }
.hp-tbl th { white-space: nowrap; }
.hp-tbl td { vertical-align: middle; }

/* 医院名单元格：名称 + 等级标签同一行，第二行放简称/地址 */
.hp-name { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.hp-level { font-size: 11px; line-height: 1.4; padding: 1px 6px; border-radius: 6px; background: var(--c-100); color: var(--c-700); border: 1px solid var(--c-200); font-weight: 600; }

/* 收 / 送时间：标签 + 时间上下两行对齐 */
.hp-time { display: flex; align-items: center; gap: 6px; line-height: 1.9; }
.hp-tl { flex: 0 0 20px; width: 20px; height: 20px; line-height: 20px; text-align: center; font-size: 11px; border-radius: 6px; font-weight: 600; }
.hp-tl.t-pickup { background: #e8f1fd; color: #1a5fb4; }
.hp-tl.t-delivery { background: var(--ok-bg); color: var(--ok); }

/* 所属路线：只显示路线名，用淡蓝胶囊区分 */
.hp-route { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--c-50); border: 1px solid var(--c-100); color: var(--c-700); font-size: 12px; }

/* 科室管理弹窗 */
.hp-tip { background: var(--c-50); border: 1px solid var(--c-100); color: var(--c-700); border-radius: var(--radius-s); padding: 10px 12px; font-size: 12px; line-height: 1.7; }
.hp-add { display: flex; gap: 8px; margin: 12px 0; }
.hp-add .inp { flex: 1; }
.hp-inline { font-weight: 400; }

@media (max-width: 900px) {
  .hp-search .inp { width: 100%; }
  .hp-search { width: 100%; }
}

/* ---- V50：生产人员账号列表（姓名不折行 / 登录与创建时间合并一列） ---- */
.pu-tbl { min-width: 1000px; }
.pu-tbl th, .pu-tbl td { white-space: nowrap; vertical-align: middle; }
.pu-tbl .c-name { font-size: 14px; }
/* 工作区间可能有多个徽标，允许换行，但限制宽度避免把其它列挤扁 */
.pu-tbl .c-areas { white-space: normal; max-width: 268px; }
.pu-tbl .c-time { font-size: 12px; color: var(--t-2); }
.pu-tbl .c-time .t-sub { display: block; margin-top: 2px; color: var(--t-3); }

/* ---- V50：路线编辑「医院站点」表格（医院名给足宽度，不再每字一行） ---- */
.rt-tbl { min-width: 1060px; }
.rt-tbl th, .rt-tbl td { white-space: nowrap; vertical-align: middle; }
.rt-tbl .rt-hname {
  white-space: normal; word-break: break-word; overflow-wrap: anywhere;
  min-width: 176px; max-width: 250px; line-height: 1.45;
}
/* 操作列四个按钮：允许换行，避免把整表撑到必须横向滚动 */
.rt-tbl .ops { white-space: normal; }
.rt-tbl .rt-wdcell { min-width: 196px; }
.rt-tbl .rt-wdcell .wd-pills { gap: 3px; }
.rt-tbl .rt-wdcell .wd-pill { min-width: 24px; padding: 0 5px; }

/* ---- V100：路线管理「执行日」筛选条（周内 / 周末 / 指定星期 / 全部） ---- */
.rt-daybar { flex-wrap: wrap; gap: 8px; padding-top: 0; }
.rt-daybar .lbl { font-size: 12px; color: var(--t-2); }
.rt-daybar .muted { line-height: 1.6; }

/* ---- V110：临时路线（节假日专用）—— 生效日期编辑区 / 排班表非生效日置灰 ---- */
.tmp-chips {
  display: flex; flex-wrap: wrap; gap: 6px; min-height: 30px; padding: 6px 8px;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
}
.tmp-chip {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 4px 2px 9px;
  background: var(--c-50); border: 1px solid var(--c-200); border-radius: 999px;
  font-size: 12px; line-height: 18px; color: var(--c-700); font-weight: 600; white-space: nowrap;
}
.tmp-chip-x {
  font-style: normal; width: 16px; height: 16px; line-height: 15px; text-align: center;
  border-radius: 50%; color: #97a9bb; cursor: pointer; font-size: 12px; transition: all .15s var(--ease);
}
.tmp-chip-x:hover { background: var(--danger-bg); color: #c93b3f; }
.tmp-add { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 7px; }
.tmp-add .sep { color: var(--line); }
/* 排班表：临时路线在非生效日期的格子（不可排班） */
.td-temp-off { background: #f7f9fb; color: #b6c2cf; text-align: center; cursor: not-allowed; }

/* ---- V27：路线管理「行内展开医院清单」（固定网格格式，只显示医院名称） ---- */
tr.rt-main { cursor: pointer; }
tr.rt-main > td:first-child { white-space: nowrap; }
tr.rt-main.is-open > td { background: var(--c-50); }
.rt-caret {
  display: inline-block; width: 14px; margin-right: 4px; color: var(--c-500);
  font-size: 10px; transition: transform .18s var(--ease);
}
tr.rt-main:hover .rt-caret { color: var(--c-700); }
tr.rt-main.is-open .rt-caret { transform: rotate(90deg); }
.rt-cnt { display: inline-block; min-width: 22px; text-align: center; font-weight: 700; color: var(--c-700); }
tr.rt-detail > td.rt-detail-td { background: #f7fafd; padding: 10px 14px 14px; }
tr.rt-detail[hidden] { display: none !important; }
.rt-open-hd { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 9px; }
/* V46：格子加宽（200 → 300px），医院全称不再被截断省略号，长名称自动换行显示完整 */
.rt-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 6px; }
.rt-chip {
  display: flex; align-items: flex-start; gap: 7px; padding: 4px 5px 4px 9px; min-width: 0;
  background: #fff; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; line-height: 20px;
}
.rt-chip > i {
  flex: none; font-style: normal; font-size: 11px; color: var(--t-3);
  min-width: 14px; text-align: right; line-height: 20px;
}
/* V96：临时医院站点 —— 只显示「医院名称 临时」，虚线框区别于固定医院（不做时间展示） */
.rt-chip.is-temp {
  background: #fbfcfe; border-style: dashed; border-color: #cfdcea;
}
.rt-chip.is-temp > .muted.small { color: var(--t-3); }
/* V46：名称区可换行 —— 完整显示医院全称（收送 / 时间仍在同一行的右侧，不换行） */
.rt-chip-n {
  flex: 1 1 auto; min-width: 0; line-height: 20px;
  white-space: normal; word-break: break-word; overflow-wrap: anywhere;
}
.rt-chip > .muted.small { flex: none; white-space: nowrap; line-height: 20px; }
.rt-chip-x {
  flex: none; width: 19px; height: 19px; margin-top: 1px; padding: 0; border: 0; border-radius: 5px; line-height: 17px;
  background: transparent; color: #c2d0da; font-size: 14px; cursor: pointer; transition: all .15s var(--ease);
}
.rt-chip-x:hover { background: var(--danger-bg); color: #c93b3f; }

/* ---- V41：添加医院弹窗「医院 → 收送时间线」两级选择 ---- */
.pk-lines { margin: 3px 0 8px 20px; }
.pk-line {
  display: block; margin: 2px 0; padding: 3px 6px; border-radius: 6px;
  font-size: 13px; line-height: 20px; cursor: pointer;
}
.pk-line:hover { background: #f2f7fb; }
.pk-line > input { margin-right: 6px; vertical-align: middle; }

/* ---- V54：添加医院弹窗里「业务 + 收送时间」可编辑的行 ---- */
.pk-line-edit { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.pk-line-edit > input[type="checkbox"] { margin-right: 0; }
.pk-line-edit > .inp { height: 26px; padding: 0 6px; font-size: 13px; line-height: 24px; }

/* ---- V42：收送行的「执行日」下沉到每一行（周内 / 周末收送时间不同时各占一行） ---- */
.wd-pills { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.wd-pill {
  min-width: 26px; height: 24px; padding: 0 6px; border: 1px solid var(--c-200); border-radius: 8px;
  background: #fff; color: var(--t-2); font-size: 12px; line-height: 22px; text-align: center;
  cursor: pointer; transition: all .12s var(--ease);
}
.wd-pill:hover { border-color: var(--c-400); color: var(--c-600); background: var(--c-50); }
.wd-pill.on {
  background: linear-gradient(135deg, var(--c-400) 0%, var(--c-600) 100%);
  border-color: var(--c-600); color: #fff; font-weight: 600;
}
.wd-pill.off { color: #b6c2cf; }
.wd-cell { min-width: 216px; }

/* ---- V27：排班调度「按天排班」 ---- */
.dt-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.dt-tab {
  display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 10px;
  border: 1px solid var(--line); background: #fff; font-size: 13px; color: var(--t-2); cursor: pointer;
  transition: all .16s var(--ease);
}
.dt-tab:hover { border-color: var(--c-300); color: var(--c-700); }
.dt-tab.on {
  background: linear-gradient(135deg, var(--c-500), var(--c-700)); border-color: transparent; color: #fff;
  box-shadow: 0 4px 12px rgba(15, 74, 117, .25);
}
.dt-tab.on .muted { color: rgba(255, 255, 255, .82) !important; }
.dt-cnt { font-size: 11px; background: var(--c-50); color: var(--c-700); border-radius: 999px; padding: 1px 7px; }
.dt-tab.on .dt-cnt { background: rgba(255, 255, 255, .22); color: #fff; }
.dt-day-hd { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ov-off { text-align: center; background: #fbfdff; color: #cfdde7; }
.cell-hl { background: linear-gradient(180deg, #fff8e6, #fff3d6); border-radius: 6px; padding: 1px 6px; font-weight: 600; color: #8a5c10; }
.cell-hl-box { display: block; background: #fffdf5; box-shadow: inset 2px 0 0 #e6b95c; border-radius: 6px; padding: 3px 6px; }
/* ---- V32.9：本周总览单元格内嵌司机下拉 ---- */
.ov-cell { padding: 6px !important; }
.ov-sel {
  width: 100%; min-width: 92px; max-width: 140px; padding: 4px 6px; font-size: 12px;
  border-radius: 7px; background: #fff;
}
.ov-cell.ov-hl .ov-sel { background: linear-gradient(180deg, #fff8e6, #fff3d6); border-color: #e6b95c; font-weight: 600; color: #8a5c10; }
.ov-cell.ov-off-cell .ov-sel { border-style: dashed; background: #fbfdff; color: #7c8f9e; }
.ov-cell.ov-off-cell .ov-sel:hover { border-color: var(--c-400); color: var(--c-700); }
.abn-txt { color: var(--warn); }

/* ---------------------------------------------------------------- 徽标 */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 999px;
  font-size: 12px; line-height: 18px; white-space: nowrap; border: 1px solid transparent; font-weight: 500;
}
.badge::before {
  content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; opacity: .6;
}
.b-ok { background: var(--ok-bg); color: #0b6e4c; border-color: #bfe8d5; }
.b-g { background: #f1f5fa; color: var(--t-2); border-color: #dde7f0; }
.b-r { background: var(--danger-bg); color: #b03030; border-color: #f6c6c6; }
.b-b { background: var(--c-100); color: var(--c-700); border-color: var(--c-200); }
.b-p { background: #f4eefd; color: #6b34c9; border-color: #e0d2f7; }
.b-w { background: var(--warn-bg); color: #96601a; border-color: #f0d7a3; }
.role { background: linear-gradient(135deg, #e3595c, #c93b3f); color: #fff; font-size: 11px; padding: 2px 8px; border-radius: 999px; }

/* ---------------------------------------------------------------- 分页 */
.pager { display: flex; align-items: center; gap: 6px; justify-content: flex-end; padding: 14px 2px 0; color: var(--t-2); font-size: 12px; }
.pager button {
  border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 4px 12px;
  font-size: 12px; cursor: pointer; color: var(--c-800);
  transition: border-color .15s, color .15s, background .15s;
}
.pager button:hover { border-color: var(--c-400); color: var(--c-600); background: var(--c-50); }

/* ---------------------------------------------------------------- 弹窗 */
.overlay {
  position: fixed; inset: 0; background: rgba(8, 44, 72, .5); z-index: 100;
  backdrop-filter: blur(4px);
  display: flex; align-items: flex-start; justify-content: center; overflow: auto; padding: 44px 12px;
  animation: fade .16s ease-out;
}
.modal {
  background: #fff; border-radius: 20px; max-width: 96vw; width: 720px;
  box-shadow: var(--shadow-l); margin-bottom: 44px; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .6);
  animation: pop .2s var(--ease);
}
.modal-h {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 22px; font-weight: 700; font-size: 15px; color: var(--c-900);
  letter-spacing: .4px;
  background: linear-gradient(120deg, #f2f7fd, #e8f1f9);
  border-bottom: 1px solid var(--line);
}
.modal-x {
  border: 0; background: rgba(255, 255, 255, .8); font-size: 17px; cursor: pointer; color: var(--t-3); line-height: 1;
  width: 30px; height: 30px; border-radius: 50%; transition: all .18s var(--ease);
}
.modal-x:hover { background: var(--danger-bg); color: var(--danger); transform: rotate(90deg); }
.modal-b { padding: 18px 22px; max-height: calc(100vh - 170px); overflow: auto; }
.dlg { background: #fff; border-radius: 18px; width: 460px; max-width: 94vw; box-shadow: var(--shadow-l); overflow: hidden; animation: pop .2s var(--ease); }
.dlg-title {
  padding: 15px 20px; font-weight: 700; color: var(--c-900); letter-spacing: .4px;
  border-bottom: 1px solid var(--line); background: linear-gradient(120deg, #f2f7fd, #e8f1f9);
}
.dlg-body { padding: 17px 20px; max-height: 60vh; overflow: auto; }
.dlg-ft { padding: 13px 20px; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--line-s); background: #fbfdfe; }
.modal-ft { display: flex; align-items: center; gap: 8px; padding-top: 15px; border-top: 1px solid var(--line-s); margin-top: 6px; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- 键值 / 备注卡 */
.kv { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 0 14px; border-bottom: 1px solid var(--line-s); margin-bottom: 14px; }
.kv-item { min-width: 130px; }
.kv-k { font-size: 12px; color: var(--t-3); letter-spacing: .3px; }
.kv-v { font-size: 14px; font-weight: 600; color: var(--t-1); margin-top: 3px; }
.note-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 10px;
  background: #fbfdfe; transition: border-color .15s, box-shadow .15s;
}
.note-card:hover { border-color: var(--c-200); box-shadow: var(--shadow-s); }
/* V33：医院端回复高亮（售后反馈「沟通记录」里医院在手机端的回复/追问） */
.note-card.note-hospital { border-color: #f6c6c6; background: #fffafa; }
.note-card.note-hospital b { color: #b03030; }
.ph-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
/* V32.4：缩略图外层容器（加载失败时整体替换为 .ph-fail） */
.ph-cell { display: inline-flex; }
.ph-img { width: 96px; height: 96px; object-fit: cover; border-radius: 10px; cursor: zoom-in; border: 1px solid var(--line); }
/* V32.3：图片解析/加载失败的可见占位（避免静默隐藏后「看不到图片」却无提示） */
.ph-fail {
  width: 96px; height: 96px; border-radius: 10px; border: 1px dashed var(--danger);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--danger); background: #fff7f6; cursor: help;
}

/* V32.5：售后反馈「涉及费用」（退回本次消毒费 / 赔偿器械，金额可暂不填） */
.fee-chip {
  display: inline-block; margin: 2px 6px 2px 0; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 600; white-space: nowrap;
}
.fee-chip.refund { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.fee-chip.indemnity { background: #fff7ed; color: #b45309; border: 1px solid #fed7aa; }
.fee-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.fee-row select { width: 190px; }
.fee-row input { width: 150px; }
.fee-row .fee-unit { color: #64748b; font-size: 12px; }
.fee-row .btn-mini { padding: 4px 10px; font-size: 12px; }
.fee-hint { color: #64748b; font-size: 12px; margin: 4px 0 0; }

/* V32.4：站内图片查看器（点击缩略图放大；← → / 左右按钮 / 左右滑动切换；Esc 关闭） */
body.imgv-open { overflow: hidden; }
.imgv {
  position: fixed; left: 0; top: 0; right: 0; bottom: 0; z-index: 9999;
  background: rgba(6, 20, 28, .88); display: flex; align-items: center; justify-content: center;
  user-select: none; animation: imgvIn .12s ease-out;
}
@keyframes imgvIn { from { opacity: 0 } to { opacity: 1 } }
.imgv-img {
  max-width: 88vw; max-height: 82vh; border-radius: 8px; background: #0b1a22;
  box-shadow: 0 14px 44px rgba(0, 0, 0, .55); cursor: zoom-in;
  /* V32.5：滚轮缩放以图片中心为原点；放大后可拖拽平移 */
  transform-origin: center center; will-change: transform; -webkit-user-drag: none;
}
/* V32.5：缩放工具条（− 100% + 适应） */
.imgv-zoom {
  display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .16);
  border-radius: 999px; padding: 2px 6px;
}
.imgv-zoom button {
  border: none; background: transparent; color: #fff; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 5px 7px; border-radius: 6px;
}
.imgv-zoom button:hover { background: rgba(255, 255, 255, .24); }
.imgv-pct { min-width: 46px; text-align: center; font-size: 12px; color: #e6f2f6; }
.imgv-bar {
  position: fixed; top: 16px; right: 22px; display: flex; align-items: center; gap: 12px;
  color: #e6f2f6; font-size: 13px;
}
.imgv-idx { background: rgba(255, 255, 255, .16); padding: 5px 12px; border-radius: 999px; }
.imgv-x {
  width: 34px; height: 34px; border-radius: 50%; border: none; cursor: pointer;
  background: rgba(255, 255, 255, .16); color: #fff; font-size: 20px; line-height: 1;
}
.imgv-x:hover { background: rgba(255, 255, 255, .3); }
.imgv-nav {
  position: fixed; top: 50%; transform: translateY(-50%); width: 46px; height: 46px;
  border: none; border-radius: 50%; cursor: pointer; font-size: 26px; line-height: 1;
  background: rgba(255, 255, 255, .16); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.imgv-nav:hover { background: rgba(255, 255, 255, .32); }
.imgv-nav.prev { left: 26px; }
.imgv-nav.next { right: 26px; }
.ph-wrap { display: inline-flex; position: relative; margin: 2px; }
.ph-wrap img { width: 56px; height: 56px; object-fit: cover; border-radius: 9px; }
.ph-wrap b {
  position: absolute; right: -6px; top: -8px; background: var(--danger); color: #fff; width: 17px; height: 17px;
  text-align: center; line-height: 16px; border-radius: 50%; cursor: pointer; font-size: 12px;
}
.ph-ph { width: 56px; height: 56px; display: flex; align-items: center; justify-content: center; background: #eef4fa; border-radius: 9px; font-size: 11px; color: var(--t-3); }
.m-chip { display: inline-block; background: var(--warn-bg); border: 1px solid #f0d7a3; padding: 2px 8px; border-radius: 7px; font-size: 12px; color: #8a5c10; }
.row-b { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.note-edit { border: 1px solid var(--line); border-radius: 12px; padding: 10px; margin-bottom: 10px; background: #fcfefe; }
.photo-edits { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.markers-edit { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.m-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Toast / Busy */
#toastBox { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast {
  background: rgba(255, 255, 255, .98); border-radius: 12px; padding: 11px 20px; font-size: 13px;
  box-shadow: var(--shadow-m); transition: opacity .3s;
  border: 1px solid var(--line); border-left: 4px solid var(--c-500); max-width: 80vw;
  animation: pop .2s var(--ease);
}
.toast.t-ok { border-left-color: var(--ok); }
.toast.t-w { border-left-color: var(--warn); }
.toast.hide { opacity: 0; }
.busy { position: fixed; inset: 0; background: rgba(242, 247, 251, .72); z-index: 200; backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; }
.busy-box {
  display: flex; flex-direction: column; align-items: center; gap: 10px; background: #fff;
  padding: 22px 32px; border-radius: 16px; box-shadow: var(--shadow-m); border: 1px solid var(--line);
}
.busy-text { font-size: 13px; color: var(--t-2); letter-spacing: .5px; }
.spinner { width: 26px; height: 26px; border: 3px solid var(--c-100); border-top-color: var(--c-600); border-radius: 50%; animation: rot .8s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- 其他既有组件 */
.stars { color: #f2a33c; font-size: 15px; letter-spacing: 1px; }
.stars i { color: #e3ebee; font-style: normal; }
.dist { display: flex; flex-direction: column; gap: 5px; margin-top: 4px; }
.dist-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.dist-row .bar { flex: 1; max-width: 260px; background: #edf3f9; border-radius: 999px; height: 8px; overflow: hidden; }
.dist-row .bar-in { height: 100%; background: linear-gradient(90deg, var(--c-400), var(--c-700)); border-radius: 999px; }
.toolbar input[type="date"], .toolbar input[type="month"] { min-height: 32px; }
.toolbar { flex-wrap: wrap; }
.modal-b textarea, .modal-b select { font-size: 13px; }
.img-badge {
  display: inline-flex; align-items: center; padding: 2px 10px; background: var(--c-100); color: var(--c-700);
  border-radius: 999px; font-size: 12px; white-space: nowrap; border: 1px solid var(--c-200);
}
.stat { background: #fff; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-s); }
.qwrap { margin-top: 4px; }
.empty { color: var(--t-3); padding: 30px; text-align: center; letter-spacing: .5px; }
.page { padding: 6px 0; }
.title { font-weight: 700; }
.lbl { font-size: 13px; color: var(--t-3); }
.block { display: block; }
.tabbar .tab-link { margin-right: 6px; }

/* ---------------------------------------------------------------- 移动适配 */
@media (max-width: 900px) {
  .side { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .content { padding: 14px 12px 40px; }
  .topbar { padding: 0 14px; }
  .who-name { display: none; }
  .login-card { width: 92vw; padding: 36px 26px 24px; }
}

/* ============================================================================
 * V24 · 医院地图 / 地址定位（views_hospital_map.js）
 * ========================================================================== */

/* ---- 统计卡（湖蓝风格，含水波纹进度条；V123 压缩为紧凑小卡，空间让给地图） ---- */
.hm-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; margin-bottom: 10px; }
.hm-stat {
  background: linear-gradient(180deg, #fff, #fafeff); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 8px 12px; position: relative; overflow: hidden;
  box-shadow: var(--shadow-s);
}
.hm-stat::after {
  content: ''; position: absolute; right: -18px; top: -18px; width: 56px; height: 56px; border-radius: 50%;
  background: radial-gradient(circle at 50% 50%, rgba(34, 129, 193, .18), rgba(34, 129, 193, 0) 70%);
}
.hm-stat-k { font-size: 12px; color: var(--t-2); }
.hm-stat-v { font-size: 19px; font-weight: 700; margin-top: 2px; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.hm-bar { height: 5px; background: #e8f0f8; border-radius: 999px; margin-top: 6px; overflow: hidden; }
.hm-bar i { display: block; height: 100%; border-radius: 999px; transition: width .4s; }

/* ---- 地图容器 ---- */
.hm-map-wrap {
  position: relative; background: #e8f0f8; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; margin-bottom: 12px; box-shadow: var(--shadow-s);
}
/* V123：地图加高（原 540px 固定）→ 随窗口高度自适应，最小 620px、最大 900px */
.hm-map-wrap #hm_map { height: clamp(620px, calc(100vh - 210px), 900px); width: 100%; z-index: 1; }
.hm-legend {
  position: absolute; z-index: 500; left: 12px; bottom: 12px;
  background: rgba(255, 255, 255, .94); border: 1px solid var(--c-200); border-radius: 12px;
  padding: 9px 13px; font-size: 12px; color: var(--t-2); display: flex; flex-direction: column; gap: 5px;
  box-shadow: var(--shadow-s); backdrop-filter: blur(4px);
}
.hm-legend > span { display: flex; align-items: center; gap: 7px; }
.hm-lg-dot {
  width: 12px; height: 12px; border-radius: 50%; background: linear-gradient(140deg, var(--c-400), var(--c-600));
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px var(--c-500); display: inline-block;
}
.hm-lg-dot.is-stop { background: linear-gradient(140deg, #ffcf6b, #e8a12c); box-shadow: 0 0 0 1.5px #d99b22; }
.hm-lg-line { width: 22px; height: 4px; border-radius: 3px; background: var(--c-600); display: inline-block; }
/* V123：图例 —— 红色五角星（固定医院） */
.hm-lg-star {
  width: 17px; height: 17px; display: inline-block;
  background: linear-gradient(140deg, #ff6f5e, #c62828);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 1px 2px rgba(8, 44, 72, .35));
}
.hm-map-tip {
  position: absolute; z-index: 500; right: 12px; top: 12px;
  background: rgba(8, 55, 74, .88); color: #fff; border-radius: 12px; padding: 9px 13px;
  font-size: 12px; line-height: 1.7; max-width: 320px; box-shadow: var(--shadow-m);
}
.hm-map-tip b { color: #a9d5f2; }
.hm-hint { margin: 2px 2px 12px; }

/* ---- V123：医院列表折叠条（默认收起，页面专注地图） ---- */
.hm-list-bar {
  display: flex; align-items: center; gap: 12px; margin: 10px 0 12px; flex-wrap: wrap;
  padding: 9px 14px; background: linear-gradient(180deg, #fff, #fafeff);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-s);
}
.hm-list-bar .hm-list-n { font-weight: 700; color: var(--c-600); font-variant-numeric: tabular-nums; }

/* ---- 定位点（医院名称直接显示在定位点上） ---- */
.hm-icon { background: transparent !important; border: 0 !important; }
.hm-pin { position: relative; width: 0; height: 0; }
.hm-pin-dot {
  position: absolute; left: 0; top: 0; width: 14px; height: 14px; margin: -7px 0 0 -7px;
  border-radius: 50%; background: linear-gradient(140deg, var(--c-400), var(--c-600));
  border: 2.5px solid #fff; box-shadow: 0 0 0 1.5px var(--c-600), 0 3px 9px rgba(8, 44, 72, .35);
}
.hm-pin.is-stop .hm-pin-dot { display: none; }
/* V123：固定医院 —— 红色五角星（白描边 + 投影，与蓝色圆点的临时医院区分） */
.hm-pin-star {
  position: absolute; left: 0; top: 0; width: 28px; height: 28px; margin: -14px 0 0 -14px;
  background: #fff;
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
  filter: drop-shadow(0 3px 7px rgba(140, 20, 20, .5));
}
.hm-pin-star::after {
  content: ''; position: absolute; left: 2.5px; top: 2.5px; right: 2.5px; bottom: 2.5px;
  background: linear-gradient(140deg, #ff6f5e, #c62828);
  clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}
.hm-pin.is-stop .hm-pin-star { display: none; }
/* V123：路线站点模式下固定医院 —— 名称标签前加 ★ 以示区分（序号圆点保持不变） */
.hm-pin-star-mark { color: #c62828; font-weight: 700; margin-right: 2px; }
.hm-pin-no {
  position: absolute; left: 0; top: 0; width: 21px; height: 21px; margin: -10.5px 0 0 -10.5px;
  border-radius: 50%; background: linear-gradient(140deg, #ffd071, #e39414);
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px #c9820f, 0 3px 9px rgba(8, 44, 72, .35);
  color: #573c00; font-size: 11px; font-weight: 700; font-style: normal;
  display: flex; align-items: center; justify-content: center;
}
.hm-pin-label {
  position: absolute; left: 13px; top: 0; transform: translateY(-50%);
  white-space: nowrap; background: rgba(255, 255, 255, .96); border: 1px solid var(--c-200);
  color: var(--c-900); font-size: 12px; line-height: 18px; padding: 1px 8px; border-radius: 999px;
  box-shadow: 0 2px 7px rgba(8, 44, 72, .16); font-weight: 600;
}
.hm-pin.is-stop .hm-pin-label { left: 15px; border-color: #f0cf95; color: #7a5406; }
/* V25：「全部医院」模式下一次显示百余家名称，过密时自动缩小字号以减少遮挡 */
.hm-pin-label.is-dense { font-size: 11px; line-height: 16px; padding: 0 6px; opacity: .95; }
/* V123：固定医院 —— 医院名称文本框改红色边框（字体仍为黑色），配合红色五角星强化识别 */
.hm-pin.is-fix .hm-pin-label {
  border: 2px solid #c62828; color: #111;
  box-shadow: 0 2px 8px rgba(198, 40, 40, .25); font-weight: 700;
}
/* 非站点模式：五角星放大到 28px，名称框相应右移，避免压住星标 */
.hm-pin.is-fix:not(.is-stop) .hm-pin-label { left: 21px; }

/* ---- V25：分公司（本公司）位置地标（红色旗标，永远盖在医院标记之上） ---- */
.hm-flag { position: relative; width: 0; height: 0; }
.hm-flag-dot {
  position: absolute; left: 0; top: 0; width: 10px; height: 10px; margin: -5px 0 0 -5px;
  border-radius: 50%; background: #d32f2f; border: 2px solid #fff; box-shadow: 0 0 0 1.5px #d32f2f;
}
.hm-flag-badge {
  position: absolute; left: 0; top: 0; margin: -30px 0 0 -4px;
  background: linear-gradient(140deg, #ff8a75, #d32f2f); color: #fff;
  font-style: normal; font-size: 11px; font-weight: 700; line-height: 18px;
  padding: 0 8px; border-radius: 999px 999px 999px 3px; border: 2px solid #fff;
  box-shadow: 0 3px 10px rgba(120, 20, 20, .45); white-space: nowrap;
}
.hm-flag-label {
  position: absolute; left: 0; top: 0; margin: 5px 0 0 12px;
  white-space: nowrap; background: rgba(255, 255, 255, .97); border: 1px solid #f0b3ad;
  color: #a3241b; font-size: 12px; font-weight: 700; line-height: 18px;
  padding: 1px 8px; border-radius: 999px; box-shadow: 0 2px 7px rgba(120, 20, 20, .18);
}
.hm-lg-flag {
  width: 12px; height: 12px; border-radius: 3px 3px 3px 0; background: linear-gradient(140deg, #ff8a75, #d32f2f);
  border: 2px solid #fff; box-shadow: 0 0 0 1.5px #d32f2f; display: inline-block;
}
.hm-pop-flag {
  display: inline-flex; align-items: center; justify-content: center; height: 18px; padding: 0 7px;
  border-radius: 999px; background: linear-gradient(140deg, #ff8a75, #d32f2f); color: #fff;
  font-size: 11px; font-weight: 700; font-style: normal;
}

/* ---- 路线信息条 ---- */
.hm-plan {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: linear-gradient(120deg, #f0f6fc, #e7f0f9);
  border: 1px solid var(--c-200); border-left: 4px solid var(--c-600);
  border-radius: 12px; padding: 12px 15px; margin-bottom: 12px; font-size: 13px;
  box-shadow: var(--shadow-s);
}
.hm-plan-t { font-weight: 700; color: var(--c-800); }
.hm-plan-i { color: var(--t-2); }
.hm-plan-i b { color: var(--c-700); }

/* ---- 序号 / 警示文字 ---- */
.hm-seq {
  display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px;
  border-radius: 7px; background: var(--c-100); color: var(--c-700); font-size: 12px; font-weight: 700;
}
.hm-warn-t { color: #c93b3f; }

/* ---- 按名称搜索（候选列表 / 批量结果） ---- */
.hm-search { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.hm-search .inp { flex: 1; min-width: 200px; }
.hm-cands { display: flex; flex-direction: column; gap: 8px; max-height: 340px; overflow: auto; }
.hm-cand {
  display: flex; gap: 10px; align-items: flex-start; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: 12px; background: #fcfeff; cursor: pointer;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.hm-cand:hover { border-color: var(--c-400); background: #f6fafd; box-shadow: var(--shadow-s); }
.hm-cand input { margin-top: 3px; }
.hm-cand-b { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hm-cand-n { font-weight: 600; color: var(--t-1); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hm-cand-s {
  font-style: normal; font-size: 11px; font-weight: 500; color: var(--c-700);
  background: var(--c-100); border: 1px solid var(--c-200); border-radius: 999px; padding: 0 7px;
}
.hm-cand-a { font-size: 12px; color: var(--t-2); }
.hm-sum { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.hm-blk { margin-bottom: 14px; }
.hm-blk-t { font-size: 13px; font-weight: 600; color: var(--c-800); margin-bottom: 6px; }
.hm-list { display: flex; flex-direction: column; gap: 4px; max-height: 200px; overflow: auto; }
.hm-li { display: flex; gap: 10px; font-size: 12px; padding: 5px 8px; background: #fafdfe; border-radius: 7px; }
.hm-li b { min-width: 140px; }
.hm-nc { border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; margin-bottom: 10px; background: #fcfeff; }
.hm-nc-h { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; flex-wrap: wrap; }
.hm-nc-f { margin-top: 8px; text-align: right; }

/* ---- 地图弹窗 ---- */
.hm-pop { min-width: 250px; font-size: 13px; line-height: 1.7; color: var(--t-1); }
.hm-pop-t { font-weight: 700; font-size: 14px; color: var(--c-900); display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.hm-pop-no {
  display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px;
  border-radius: 50%; background: linear-gradient(140deg, #ffd071, #e39414); color: #573c00;
  font-size: 11px; font-weight: 700; font-style: normal;
}
.hm-pop-row { margin-top: 4px; }
.hm-pop-ops { margin-top: 9px; display: flex; gap: 5px; flex-wrap: wrap; }

/* Leaflet 控件 / 弹窗风格对齐（湖蓝） */
.leaflet-container { font-family: inherit; background: #e8f0f8; }
.leaflet-popup-content-wrapper { border-radius: 14px; box-shadow: var(--shadow-m); border: 1px solid var(--c-200); }
.leaflet-popup-content { margin: 12px 14px; }
.leaflet-popup-tip { box-shadow: var(--shadow-s); }
.leaflet-bar a, .leaflet-bar a:hover {
  background: #fff; color: var(--c-700); border-color: var(--c-200); border-radius: 8px;
}
.leaflet-bar a:hover { background: var(--c-50); }
.leaflet-control-attribution { background: rgba(255, 255, 255, .8); font-size: 10px; }

/* ---------------------------------------------------------------- V32.8 可搜索医院选择器 */
.hp { position: relative; display: flex; align-items: center; width: 100%; }
.hp-inp { width: 100%; padding-right: 24px; }
.hp-clr {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  border: 0; background: transparent; color: var(--t-3); font-size: 16px; line-height: 1;
  cursor: pointer; padding: 2px 5px; border-radius: 6px;
}
.hp-clr:hover { background: var(--c-50); color: var(--c-700); }
.hp-pop {
  position: fixed; z-index: 3000; max-height: 264px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-l, 0 12px 30px rgba(15, 74, 117, .18)); padding: 4px;
}
.hp-item {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 7px 10px; border-radius: 7px; font-size: 13px; color: var(--t-1); cursor: pointer;
}
.hp-item:hover, .hp-item.on { background: var(--c-50); color: var(--c-700); }
.hp-tip { padding: 8px 10px; font-size: 12px; color: var(--t-3); }

/* ------------------------------------------------- V42 收送行「执行日冲突」提示 */
/* 某行的执行日与本路线执行日完全错开 → 这行永远不会生成派单，整行淡红底提警 */
.row-conflict > td { background: var(--danger-bg, #fdeeee); }
.row-conflict > td.wd-cell { box-shadow: inset 2px 0 0 var(--danger, #d64747); }

/* ============================================================================
 * V61 · 湖蓝 3.0 深度美化（集团实景 + 品牌湖蓝）
 *   · 实景背景：assets/ks-building.jpg —— 登录页全屏 / 侧栏品牌头图 / 工作台横幅 / 主区水印
 *   · 主色：延续集团 LOGO 湖蓝 #2281C1（色阶沿用 V31 定义）
 *   · 排版：侧栏「品牌头图 + 手风琴菜单」，顶栏「面包屑 + 用户胶囊」，内容区「统一留白 + 卡片层次」
 *   · 原则：只做视觉与版式升级，不改类名、不改业务
 * ========================================================================== */

/* ---- 实景素材变量 ---- */
:root {
  --ks-photo: url("../assets/ks-building.jpg");
}

/* ---- 侧栏：品牌头图 + LOGO ---- */
.side {
  background: linear-gradient(180deg, #1070a8 0%, #0c5186 32%, #0a3f69 68%, #072e50 100%);
  box-shadow: 8px 0 34px rgba(6, 32, 54, .26);
}
.side::before { opacity: .42; }
.side-brand {
  position: relative; min-height: 152px; padding: 20px 18px 18px;
  display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden;
  background:
    linear-gradient(180deg, rgba(6, 38, 62, .10) 0%, rgba(6, 34, 56, .58) 48%, rgba(5, 28, 47, .88) 100%),
    var(--ks-photo) center 42% / cover no-repeat;
}
.side-brand::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, rgba(255, 255, 255, .55), rgba(255, 255, 255, 0) 72%);
}
.sb-logo {
  display: block; width: 138px; max-width: 66%; height: auto;
  filter: drop-shadow(0 3px 10px rgba(3, 20, 34, .55));
}
.sb-sub {
  display: block; margin-top: 9px; font-size: 11.5px; letter-spacing: 2.2px;
  color: rgba(255, 255, 255, .82);
}
.brand-center {
  margin: 13px 14px 3px; padding: 7px 13px; border-radius: 12px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .22);
  color: #fff; font-size: 12.5px; font-weight: 700; letter-spacing: .4px;
  display: flex; align-items: center; gap: 7px; white-space: normal;
}
.brand-center::before {
  content: ''; flex: none; width: 6px; height: 6px; border-radius: 50%;
  background: #6ee7c4; box-shadow: 0 0 0 3px rgba(110, 231, 196, .22);
}
.brand-sub { padding: 0 18px; font-size: 10.5px; letter-spacing: 1.8px; color: rgba(255, 255, 255, .48); }

.menu { flex: 1 1 auto; margin-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); padding: 14px 12px 18px; }
.menu-item { padding: 10px 12px; border-radius: 12px; font-size: 13.8px; }
.menu-item.active {
  background: linear-gradient(90deg, rgba(255, 255, 255, .98), rgba(232, 245, 252, .92));
  box-shadow: 0 10px 22px rgba(6, 32, 54, .26), inset 3px 0 0 var(--c-500);
}
.menu-head { padding: 11px 12px; border-radius: 12px; font-size: 13px; letter-spacing: 1.3px; }
.menu-head.is-active { background: rgba(255, 255, 255, .10); }
.menu-items { border-left: 1px dashed rgba(255, 255, 255, .28); }
.side-foot {
  padding: 12px 18px 14px; font-size: 11px; letter-spacing: .5px;
  color: rgba(255, 255, 255, .52); display: flex; align-items: center; gap: 7px;
}
.sf-dot {
  width: 6px; height: 6px; border-radius: 50%; flex: none;
  background: #6ee7b7; box-shadow: 0 0 0 3px rgba(110, 231, 183, .2);
}

/* ---- 顶栏 ---- */
.topbar {
  height: 62px; padding: 0 24px; background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(170%) blur(14px);
  box-shadow: 0 8px 26px rgba(10, 52, 84, .05);
}
.topbar::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, rgba(34, 129, 193, .32), rgba(34, 129, 193, .08) 62%, transparent);
}
.tb-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.tb-tag {
  font-size: 12px; color: var(--t-3); padding: 3px 10px; border-radius: 999px;
  background: var(--c-50); border: 1px solid var(--line-s); white-space: nowrap;
}
.crumb { font-size: 17px; }
.who { gap: 8px; }
.who-chip { padding: 3px 6px 3px 3px; background: linear-gradient(90deg, #fff, #f8fbfe); }
.who-pos {
  font-style: normal; font-size: 11.5px; color: var(--c-700); font-weight: 600;
  background: var(--c-100); border: 1px solid var(--c-200);
  border-radius: 999px; padding: 1px 9px; margin-left: 2px; white-space: nowrap;
}
.center-sel, .center-tag { min-height: 34px; }
.pw-banner { padding: 12px 24px; background: linear-gradient(100deg, #e2706a, #b33137); }

/* ---- 主区：建筑实景水印 ---- */
.main { position: relative; }
.main::before {
  content: ''; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: var(--ks-photo) center top / 1180px no-repeat; opacity: .055;
  -webkit-mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0) 60%);
  mask-image: linear-gradient(180deg, #000, rgba(0, 0, 0, 0) 60%);
}
.main > * { position: relative; z-index: 1; }

/* ---- 工作台横幅（集团大楼实景） ---- */
.hero-wrap { padding: 20px 0 0; }
.hero {
  position: relative; margin: 0 24px 2px; padding: 26px 30px; overflow: hidden;
  min-height: 152px; border-radius: 20px; color: #fff;
  display: flex; align-items: center; justify-content: space-between; gap: 22px; flex-wrap: wrap;
  background:
    linear-gradient(100deg, rgba(5, 32, 55, .94) 0%, rgba(9, 58, 94, .78) 42%, rgba(23, 98, 143, .40) 72%, rgba(52, 158, 208, .22) 100%),
    var(--ks-photo) center 44% / cover no-repeat;
  box-shadow: 0 18px 42px -18px rgba(6, 32, 54, .55), inset 0 1px 0 rgba(255, 255, 255, .18);
}
.hero::after {
  content: ''; position: absolute; right: -46px; top: -46px; width: 260px; height: 260px;
  border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%);
}
.hero-kicker { font-size: 11.5px; letter-spacing: 2.6px; color: rgba(255, 255, 255, .72); }
.hero-title {
  margin: 9px 0 11px; font-size: 25px; font-weight: 700; letter-spacing: .5px;
  text-shadow: 0 2px 12px rgba(3, 20, 34, .4);
}
.hero-meta { display: flex; gap: 10px; flex-wrap: wrap; }
.hm-i {
  display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px;
  color: rgba(255, 255, 255, .92); background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px; padding: 4px 13px;
}
.hm-ico {
  width: 7px; height: 7px; border-radius: 2px; flex: none; display: inline-block;
  background: linear-gradient(140deg, #a9e2f7, #48a9dd);
}
.hm-ico.i-org { border-radius: 50%; background: linear-gradient(140deg, #ffe6a8, #e9a13c); }
.hm-ico.i-role { transform: rotate(45deg); background: linear-gradient(140deg, #c7f0dd, #4fbf94); }
.hero-badge {
  display: flex; flex-direction: column; gap: 5px; padding: 14px 20px; border-radius: 16px;
  background: rgba(255, 255, 255, .15); border: 1px solid rgba(255, 255, 255, .26);
  backdrop-filter: blur(6px);
}
.hero-badge b { font-size: 14.5px; letter-spacing: 1.2px; }
.hero-badge span { font-size: 11.5px; color: rgba(255, 255, 255, .82); }

/* ---- 卡片 / 面板 ---- */
.cards { gap: 16px; margin-bottom: 18px; }
.panel, .stat-card, .stat, .hm-stat, .hm-map-wrap { border-radius: 18px; }
.panel {
  border: 1px solid rgba(34, 129, 193, .13);
  box-shadow: 0 1px 2px rgba(10, 52, 84, .04), 0 12px 30px -18px rgba(10, 52, 84, .26);
}
.panel-h { padding: 15px 20px; font-size: 14.5px; background: linear-gradient(180deg, #fdfeff, #f2f8fd); }
.panel-b { padding: 14px 20px 20px; }
.stat-card {
  border: 1px solid rgba(34, 129, 193, .14);
  background: linear-gradient(180deg, #ffffff, #f8fcff);
  box-shadow: 0 1px 2px rgba(10, 52, 84, .04), 0 10px 26px -16px rgba(10, 52, 84, .28);
}
.stat-card::before { opacity: 1; height: 4px; border-radius: 18px 18px 0 0; }
.stat-card::after { width: 116px; height: 116px; opacity: .9; }
.stat-title { font-size: 12.5px; letter-spacing: .6px; }
.stat-value { font-size: 30px; }
.toolbar { margin-bottom: 16px; }
.toolbar .title { font-size: 18px; letter-spacing: .5px; }

/* ---- 表格 ---- */
.tbl th {
  padding: 13px 14px; font-size: 12.5px; letter-spacing: .5px;
  background: linear-gradient(180deg, #f8fbfe, #edf5fc);
  border-bottom: 1px solid rgba(34, 129, 193, .22);
}
.tbl td { padding: 12px 14px; }
.tbl tbody tr:hover td { background: #eef7fd; }
.tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--c-500); }
.row-focus td { background: #eaf6fd !important; box-shadow: inset 3px 0 0 var(--c-600); }
.tbl-scroll { border-radius: 14px; }

/* ---- 按钮 / 分段控件 ---- */
.btn { padding: 8px 16px; border-radius: 11px; }
.btn.primary { background: linear-gradient(135deg, #4fb0e0 0%, #2281c1 52%, #17628f 100%); }
.btn.primary:hover { background: linear-gradient(135deg, #5cbae8 0%, #2a8dcd 54%, #1c6c9a 100%); }
.btn.mini { padding: 4px 12px; border-radius: 999px; font-size: 12px; }
.seg { padding: 3px; border-radius: 12px; background: linear-gradient(180deg, #f4f9fd, #eaf3fa); }
.seg-btn { padding: 6px 14px; border-radius: 9px; }
.seg-btn.on { box-shadow: 0 3px 10px rgba(15, 74, 117, .18); }
.tab-link { padding: 7px 16px; }

/* ---- 表单 ---- */
.inp, .field input, .field select, .field textarea { border-radius: 11px; }
.inp:hover, .field input:hover, .field select:hover, .field textarea:hover {
  border-color: var(--c-300); background: #fbfdff;
}
.inp:focus, .field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--c-500); box-shadow: 0 0 0 3px rgba(34, 129, 193, .16); background: #fff;
}

/* ---- 弹窗 / 提示 ---- */
.overlay { background: rgba(6, 30, 50, .5); backdrop-filter: blur(6px); }
.modal { border-radius: 22px; box-shadow: 0 30px 70px -22px rgba(6, 32, 54, .48); }
.modal-h { padding: 17px 24px; font-size: 15.5px; background: linear-gradient(120deg, #f4f9fe, #e5f0fa); }
.modal-b { padding: 20px 24px; }
.dlg { border-radius: 20px; }
.toast { border-radius: 14px; box-shadow: 0 14px 34px rgba(10, 52, 84, .2); }

/* ============================== 登录页：分栏玻璃卡 ============================== */
.login-wrap {
  padding: 30px 22px;
  background: var(--ks-photo) center 46% / cover no-repeat;
}
.login-wrap::before {
  content: ''; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 560px at 8% 10%, rgba(31, 140, 199, .48), rgba(31, 140, 199, 0) 62%),
    radial-gradient(940px 540px at 96% 94%, rgba(4, 26, 45, .76), rgba(4, 26, 45, 0) 66%),
    linear-gradient(140deg, rgba(6, 44, 74, .93) 0%, rgba(10, 69, 111, .86) 44%, rgba(19, 102, 150, .78) 100%);
}
.login-shell {
  position: relative; z-index: 1; width: min(1020px, 96vw); min-height: 560px;
  display: grid; grid-template-columns: 1.06fr 400px; overflow: hidden; border-radius: 26px;
  background: rgba(255, 255, 255, .10); border: 1px solid rgba(255, 255, 255, .28);
  backdrop-filter: blur(14px) saturate(150%);
  box-shadow: 0 40px 90px -32px rgba(3, 20, 34, .68), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.login-hero { padding: 46px 40px; color: #fff; display: flex; flex-direction: column; gap: 12px; }
.lh-logo { width: 172px; height: auto; filter: drop-shadow(0 4px 12px rgba(3, 20, 34, .5)); }
.lh-title {
  margin: 4px 0 0; font-size: 30px; line-height: 1.34; font-weight: 700; letter-spacing: 1px;
  text-shadow: 0 2px 14px rgba(3, 20, 34, .42);
}
.lh-desc { margin: 0; font-size: 13px; line-height: 1.95; color: rgba(255, 255, 255, .82); max-width: 430px; }
.lh-list { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.lh-list li { display: flex; align-items: center; gap: 11px; font-size: 13.5px; color: rgba(255, 255, 255, .96); }
.lh-list li i {
  display: inline-flex; align-items: center; justify-content: center; flex: none;
  width: 22px; height: 22px; border-radius: 50%; font-style: normal; font-size: 11px; font-weight: 700;
  background: linear-gradient(140deg, rgba(255, 255, 255, .34), rgba(255, 255, 255, .12));
  border: 1px solid rgba(255, 255, 255, .45);
}
.lh-foot { margin-top: auto; font-size: 11.5px; letter-spacing: 2.4px; color: rgba(255, 255, 255, .58); }
.login-card {
  width: 100%; margin: 0; padding: 46px 38px 30px; border-radius: 0; border: 0;
  background: rgba(255, 255, 255, .97); box-shadow: none; display: flex; flex-direction: column; justify-content: center;
}
.login-card::before { display: none; }
.login-title { margin: 0 0 4px; font-size: 20px; }
.login-sub { margin-bottom: 24px; }

/* ============================================================================
 * V62 · 医院档案列表 —— 功能与排版定型
 *   ①科室：行内徽标 +「＋ 科室」按钮，点开即可增 / 改名 / 删除
 *   ②收 / 送时间：固定医院直接显示最晚抵达时间（多班次折叠 +N）
 *   ③所属路线：只显示路线名称，不再铺开执行日 / 时间线细节
 *   ④排版：筛选分行、列宽固定、表头吸顶、行高舒适、空态引导
 * ========================================================================== */
.hp-panel { overflow: hidden; }
.hp-head { padding-bottom: 13px; }

/* 筛选：第一行「搜索 + 新增 / 导入」，第二行「类型 / 状态」分段 */
.hp-frow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.hp-frow + .hp-frow { margin-top: 11px; padding-top: 11px; border-top: 1px dashed var(--line); }
.hp-flab { font-size: 12px; color: var(--t-3); }
.hp-search .inp { border-radius: 11px; }

/* 表格：左右滚动 + 表头吸顶，长列表也能对得上列 */
.hp-scroll { max-height: calc(100vh - 272px); min-height: 168px; overflow: auto; }
.hp-tbl { min-width: 1060px; }
.hp-tbl thead th { position: sticky; top: 0; z-index: 3; }
.hp-tbl thead th small {
  display: block; margin-top: 1px; font-size: 10.5px; font-weight: 500;
  color: var(--t-3); letter-spacing: 0;
}
.hp-tbl td { padding-top: 10px; padding-bottom: 10px; }

/* 收 / 送时间 */
.hp-tv { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.hp-more {
  font-style: normal; margin-left: 4px; padding: 0 5px; border-radius: 6px;
  font-size: 11px; color: var(--c-600); background: var(--c-100);
}
.hp-temp-tag { font-size: 12px; color: var(--t-3); }

/* 所属路线：只列名称，纵向排列避免横向撑宽 */
.hp-routes { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.hp-route { max-width: 158px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 科室：徽标 + 行内新增按钮 */
.hp-depts { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.hp-chip {
  max-width: 122px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 11.5px; line-height: 1.55; padding: 1px 7px; border-radius: 6px;
  background: var(--c-50); border: 1px solid var(--c-100); color: var(--c-700);
}
.hp-chip-more { background: #f1f5f9; border-color: var(--line); color: var(--t-3); }
.hp-dept-btn { padding: 2px 9px; }

/* V67（需求 ⑧）：医院档案列表第二行「简称 · 地址」——与司机端同一份数据源，超长省略 */
.hp-addr {
  margin-top: 4px; font-size: 12px; color: var(--t-3);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 空状态 */
.hp-empty-td { padding: 0 !important; }
.hp-empty { padding: 54px 20px; text-align: center; }
.hp-empty-i {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 21px; color: var(--c-600); background: var(--c-50); border: 1px dashed var(--c-200);
}
.hp-empty-t { font-size: 14px; font-weight: 600; color: var(--t-2); }
.hp-empty-s { margin-top: 6px; font-size: 12.5px; color: var(--t-3); }

@media (max-width: 900px) {
  .hp-scroll { max-height: none; }
  .hp-flab { display: none; }
}

/* ---- 窄屏回落 ---- */
@media (max-width: 900px) {
  .hero { margin: 0 12px; padding: 20px 22px; }
  .hero-title { font-size: 20px; }
  .hero-badge { display: none; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-hero { display: none; }
  .login-card { width: 100%; padding: 40px 28px 28px; }
}

/* ---------------------------------------------------------------- V76：医院管理 → 配送记录 */
/* 列表内现场照片缩略图（比通用 .ph-img 更紧凑，一屏能看多张） */
.ph-img.dr-ph { width: 68px; height: 68px; border-radius: 8px; }
.ph-fail.dr-ph { width: 68px; height: 68px; border-radius: 8px; font-size: 11px; }
.dr-ph-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.dr-more { cursor: pointer; }
/* 「全部照片」大图列表（含拍摄时间，1 张 / 多张都能看全） */
.dr-g-wrap { display: flex; flex-wrap: wrap; gap: 12px; max-height: 62vh; overflow: auto; padding: 2px; }
.dr-g-cell { width: 186px; }
.dr-g-img {
  width: 186px; height: 186px; object-fit: cover; border-radius: 10px;
  border: 1px solid var(--line); cursor: zoom-in; display: block;
}

/* ---------------------------------------------------------------- V86：生产人员排班表 */
/* 需求 ②：容器自带横 / 纵向滚动 —— 表头吸顶、姓名列吸左，人多 / 日期多时对得上列 */
.sc-scroll {
  max-height: calc(100vh - 268px); min-height: 220px;
  overflow: auto; border-radius: 14px; padding: 0 !important;
}
.sched-tbl { min-width: 940px; }
.sched-tbl thead th { position: sticky; top: 0; z-index: 2; }
/* 左上角交叉格：既吸顶又吸左，层级最高 */
.sched-tbl thead th.sc-th-name { position: sticky; top: 0; left: 0; z-index: 4; }
/* 需求 ③：首列固定宽度，不随姓名 / 职级长度撑宽，右侧投影与内容区分隔 */
.sched-tbl .sc-th-name,
.sched-tbl .sc-name { width: 168px; min-width: 168px; max-width: 168px; text-align: left; }
.sched-tbl .sc-name {
  position: sticky; left: 0; z-index: 1; background: #fff; vertical-align: middle;
  box-shadow: 1px 0 0 var(--line-s), 6px 0 14px -10px rgba(10, 52, 84, .35);
}
.sched-tbl tbody tr:hover td.sc-name {
  background: #f6fafd;
  box-shadow: inset 3px 0 0 var(--c-500), 6px 0 14px -10px rgba(10, 52, 84, .35);
}
/* 首列内容：姓名加粗一行 + 职级徽标一行（多区间才补一行），超长省略 */
.sc-uname {
  font-size: 13.5px; font-weight: 700; color: var(--t-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-upos {
  margin-top: 3px; display: inline-block; max-width: 100%;
  font-size: 11.5px; color: var(--c-700); background: var(--c-50);
  border: 1px solid var(--c-100); border-radius: 6px; padding: 0 6px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sc-uarea {
  margin-top: 3px; font-size: 11px; color: var(--t-3);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
@media (max-width: 900px) { .sc-scroll { max-height: none; } }

/* ---------------------------------------------------------------- V87：班次管理（独立界面） */
/* 顶部筛选栏（区域 / 星期 + 新建）固定在列表上方，班次多时先筛后看 */
.shm-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 12px 14px; background: linear-gradient(180deg, #f7fbfe, #edf5fc);
  border: 1px solid var(--line); border-radius: 14px 14px 0 0;
}
.shm-bar .inp { min-height: 32px; }
.shm-bar label { white-space: nowrap; }
.shm-sp { flex: 1; }
.shm-sum {
  padding: 9px 14px; font-size: 12.5px; color: var(--t-2); background: #fff;
  border: 1px solid var(--line); border-top: 0;
}
.shm-sum b { color: var(--c-700); }
/* 列表自带纵向滚动 + 表头吸顶，班次再多也不用滚整页 */
.shm-list {
  max-height: calc(100vh - 340px); min-height: 180px; overflow: auto;
  border: 1px solid var(--line); border-top: 0; border-radius: 0 0 14px 14px; padding: 0;
}
.shm-tbl { min-width: 960px; }
.shm-tbl thead th { position: sticky; top: 0; z-index: 2; }
.shm-tbl td { vertical-align: middle; white-space: nowrap; }
.shm-name { white-space: nowrap; }
/* 班次名左侧色条：与排班格子的颜色一一对应，一眼对上 */
.shm-cbar {
  display: inline-block; width: 4px; height: 15px; border-radius: 2px; margin-right: 8px;
  vertical-align: -2px; box-shadow: 0 1px 3px rgba(10, 52, 84, .25);
}
.shm-nm { font-size: 13.5px; font-weight: 700; color: var(--t-1); }
.shm-sub {
  margin-top: 3px; font-size: 11.5px; color: var(--t-3); max-width: 200px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.shm-time { font-variant-numeric: tabular-nums; }
/* 适用星期：7 个小格，能排的那天高亮 */
.shm-wds { display: flex; align-items: center; gap: 4px; }
.shm-wd {
  width: 22px; height: 22px; line-height: 21px; text-align: center; border-radius: 7px;
  font-size: 11.5px; color: #93a4b3; background: #f4f7fa; border: 1px solid #e6edf3;
}
.shm-wd.on {
  background: var(--c-100); color: var(--c-700); border-color: var(--c-200); font-weight: 700;
}
.shm-wdtext { margin-left: 6px; font-size: 11.5px; color: var(--t-3); }
.shm-h {
  display: inline-block; padding: 1px 9px; border-radius: 999px;
  background: #f1f5fa; border: 1px solid #dde7f0; color: var(--t-2); font-size: 12px;
}
.shm-sw {
  display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; color: var(--t-3);
  font-family: ui-monospace, Menlo, Consolas, monospace;
}
.shm-sw i {
  width: 16px; height: 16px; border-radius: 5px; display: inline-block;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .08);
}
.shm-tip { margin-top: 10px; font-size: 12px; color: var(--t-3); line-height: 1.8; }
@media (max-width: 900px) { .shm-list { max-height: none; } }

/* ---------------------------------------------------------------- V88：系统设置 → 上班时长设定（按职级） */
.ph-tbl td { vertical-align: middle; }
/* 「默认」行独立底色，和下面可单独设定的职级区分开 */
.ph-tbl tr.ph-def td { background: #f7fbfe; }
.ph-tbl .ph-inp { text-align: center; font-variant-numeric: tabular-nums; }

/* ---------------------------------------------------------------- V89：管理员账号 → 功能权限分组 */
.perm-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 8px; }
.perm-sp { flex: 1 1 auto; }
.perm-groups {
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--card);
  max-height: 340px;
  overflow: auto;
}
.perm-group + .perm-group { border-top: 1px solid var(--line); }
/* 组头吸附在滚动区顶部，滚动长列表时仍知道当前在哪一组 */
.perm-g-hd {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  background: var(--c-50);
  border-bottom: 1px solid var(--line-s);
}
/* V91：组名可点击折叠 / 展开（原来组头还有个整组复选框，与「全选 / 清空」重复，已去掉） */
.perm-g-toggle { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; user-select: none; font-weight: 600; }
.perm-g-caret { display: inline-block; width: 9px; color: var(--t-3); font-size: 10px; transition: transform .12s; }
.perm-group.collapsed .perm-g-caret { transform: rotate(-90deg); }
.perm-group.collapsed .perm-g-bd { display: none; }
.perm-g-count { color: var(--c-600); font-weight: 600; font-size: 12px; font-variant-numeric: tabular-nums; }
/* 描述过长截断，保证组头始终一行、不把「全选 / 清空」挤到下一行 */
.perm-g-desc { flex: 1 1 auto; min-width: 0; color: var(--t-3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.perm-g-bd {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0 14px;
  padding: 6px 10px 10px;
}
.perm-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 0;
  font-weight: 400;
  cursor: pointer;
}
.perm-item .perm-name { flex: 1 1 auto; }
/* V91：英文编码默认不显示（中文名后面跟一串英文会挤爆排版）；
   需要对照排查时，勾选弹窗顶部「显示编码」即可临时显示（加 .show-key）。 */
.perm-item .perm-key { display: none; color: var(--t-3); font-size: 11px; font-family: Consolas, ui-monospace, monospace; }
.perm-groups.show-key .perm-item .perm-key { display: inline; }
.perm-item:hover .perm-name { color: var(--c-700); }
.perm-item.on .perm-name { color: var(--c-700); font-weight: 600; }
.perm-empty { padding: 18px; text-align: center; color: var(--t-3); }
@media (max-width: 900px) {
  .perm-g-bd { grid-template-columns: 1fr 1fr; }
  .perm-g-desc { display: none; }
}
