/* ============================================================
 * styles.css —— 机车看板全部样式（原 index.html 内联 <style> 提取）
 * 与 js/ 各模块配套，classic <link> 引用，零依赖。
 * ============================================================ */
body { margin: 0; display: flex; justify-content: center; align-items: center; height: 100vh; overflow: hidden; background-color: #f0f0f0; font-family: Arial, sans-serif; user-select: none; }
#canvas { 
    width: 1920px; height: 922px; position: relative; 
    box-shadow: 0 0 10px rgba(0,0,0,0.1); overflow: visible; background-color: white;  /* visible：允许「运行故障」框贴在原提示框正上方时溢出画布顶显示 */
    -webkit-user-drag: none; 
}
.inspection-zone {
    position: absolute;
    left: 1px;     /* 最左侧，距画布左边缘 1px */
    bottom: 195px;   /* 兜底值；运行时由 JS 按「河西方向」行号计算顶边对齐线(第19行线)动态覆盖 */
    width: 419px;   /* 左距1px+419=420px(70×6) → 右缘压在单元格线上；相对原590px减少约2.5格(171px) */
    height: 280px;   /* 原255px增加3格后330px，现减2个单元格(2*BTN_HEIGHT=50px)=280px */
    border: 2px solid #222;
    background: #fff;
    z-index: 1;
    pointer-events: none;
    box-sizing: border-box;
    overflow: hidden;   /* ✅ 框内裁切：临修/其他/C1修等机车号过多时不再溢出到画布上压住别的框 */
}
.inspection-zone::before {
    content: '金泉机车统计系统';
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 13px;
    font-weight: bold;
    color: #444;
    pointer-events: none;
}
/* ✅ 内层滚动容器：标题「金泉机车统计系统」由 ::before 绝对定位固定在框顶，下方内容(运用机车/局段/各状态机车号)以 flex 纵向堆叠，超出 280px 框高时出现纵向滚动条，数据不丢失也不溢出框外 */
#inspection-body {
    position: absolute;
    top: 26px;          /* 标题下方留白，避免与标题重叠 */
    left: 0;
    right: 0;
    bottom: 0;
    padding: 4px 6px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 3px;
    overflow-y: auto;   /* ✅ 内容超过框高→框内纵向滚动 */
    overflow-x: hidden;
    scrollbar-gutter: stable;
    pointer-events: auto;   /* ✅ 必须可接收鼠标事件，滚轮/滚动条才能滚动（代价：框覆盖的左下区域不再把点击穿透给下方画布） */
}
/* ✅ 提示框：位于机车统计系统框正上方，左空1格、宽12格、高6格；标题红/贴顶，内容居中，框为正常黑边白底 */
.stats-title-box {
    position: absolute;
    left: 1px;           /* 往右移 1px */
    top: 292px;          /* ✅ 在 287px 基础上下移 5px；故障框贴其正上方 top:231px */
    width: 330px;        /* 宽约 13.2 个单元格（原 280 + 50） */
    height: 150px;       /* 高 6 个单元格 */
    border: 2px solid #222;        /* 正常黑边框 */
    background: #fff;              /* 正常白底 */
    box-sizing: border-box;
    display: flex; flex-direction: column; align-items: stretch; justify-content: flex-start;  /* 竖向排列、顶部对齐 */
    padding: 1px 6px 0;   /* ✅ 2026-09-08：顶留白 4px→1px，备用文字贴框顶（BOSS 需求） */
    text-align: center;
    z-index: 2;
    pointer-events: none;
    overflow: hidden;              /* 兜底：内容超出框时裁剪，避免溢出 */
}
.stats-title-box .tip-title { font-size: 14px; font-weight: bold; color: #333; }  /* 标题：黑、居中 */
.stats-title-box .tip-line { margin-top: 0; }   /* ✅ 2026-09-08：备用行贴框顶（原 4px）；行内 .tip-row 仍保留 2px 行距 */
.stats-title-box #tip-third { margin-top: 4px; }   /* 第三趟行与备用行之间保留 4px 间隔（备用隐藏时第三趟也仅 4px+1px，更贴顶） */
.stats-title-box .tip-row { display: flex; flex-wrap: wrap; gap: 2px 18px; margin-top: 2px; text-align: left; }  /* 每行最多排 2 台，字体允许时并排 */
.stats-title-box .tip-row.tip-row-3 { gap: 2px 8px; }   /* ✅ 2026-09-08：放不下降级为 3台/行时，列间距 18px→8px 保证三台排得下 */
.stats-title-box .tip-item { display: inline-flex; align-items: baseline; white-space: nowrap; font-size: 16px; font-weight: bold; color: #333; pointer-events: auto; }  /* 单台信息：靠左、加大、黑色；重新开启鼠标事件使右键可命中（框本体仍 pointer-events:none 不挡轨道） */
.stats-title-box .tip-item.fault { color: #c00; }  /* 运行故障整行红色 */
.stats-title-box .tip-tag { display: inline-block; margin-right: 8px; font-size: 14px; font-weight: bold; color: #333; }  /* 行首分组标签：备用/第三趟/运行故障 */
.stats-title-box .tip-tag.fault-tag { color: #c00; }
/* ✅ 独立「运行故障」提示框：位于主提示框正上方，高 2 格、长 4.5 格（1 格 = 25px，与提示框一致） */
.fault-box {
    position: absolute;
    left: 1px;              /* 向右移 1px */
    top: 231px;             /* ✅ CSS 兜底：防止 JS 未定位时回退到画布左上角（与 updateTipsBox 内 _fb.style.top 一致） */
    /* top 仍可由 JS 动态覆盖（保持原提示框位置不动） */
    width: 282.5px;          /* 长 4.5 个单元格 + 170px */
    height: 55px;           /* 高 2 个单元格 + 5px */
    border: 2px solid #c00;
    background: #fff;
    box-sizing: border-box;
    padding: 2px 4px 3px;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;    /* 框本体不挡轨道，仅条目可点 */
    display: flex; flex-direction: column;
}
.fault-box .fb-title { flex: 0 0 auto; font-size: 12px; font-weight: bold; color: #c00; text-align: center; line-height: 14px; }
.fault-box .fb-body { flex: 1 1 auto; display: flex; flex-direction: row; align-items: stretch; overflow: visible; }
.fault-box .fb-item { flex: 1 1 0; min-width: 0; text-align: center; white-space: nowrap; overflow: visible; font-size: 14px; font-weight: bold; color: #c00; pointer-events: auto; cursor: default; line-height: 16px; }
.fault-box .fb-empty { font-size: 12px; color: #c00; opacity: .55; text-align: center; }
/* ✅ 独立「速报模版」框：位于画布最右面、河西方向带正上方，大小与运行故障框一致（长 4.5 格、高 2 格）
 * 坐标推导：河西方向=row7 → 带顶边距底 (7-1)*25+25=175px；框底边贴带顶边=175px、高55 → 顶边距底230px → top=922-230=692px；
 *           最右面=右缘贴画布右界1715、宽282.5 → left=1715-282.5=1432.5px。 */
.ticket-box {
    position: absolute;
    left: 1306.5px;         /* 往左移动20px：1326.5-20；右缘=1306.5+362.5=1669，距画布右界1715约46px */
    top: 604px;             /* 上移3px：607-3 */
    width: 392.5px;         /* 长+30：362.5+30（右缘=1306.5+392.5=1699，距画布右界1715约16px，不溢出） */
    height: 135px;          /* 与运行故障框同高 +80（高 2 个单元格 +100 -20） */
    border: 2px solid #007bff;   /* 蓝色边框，区别于运行故障(红) */
    background: #fff;
    box-sizing: border-box;
    padding: 2px 4px 3px;
    z-index: 3;
    overflow: hidden;
    pointer-events: none;    /* 框本体不挡轨道，仅条目可点 */
    display: flex; flex-direction: column;
}
.ticket-box .tb-title { flex: 0 0 auto; font-size: 12px; font-weight: bold; color: #007bff; text-align: center; line-height: 14px; }
.ticket-box .tb-title .t-fault { color: #c0392b; }   /* ✅ 表头「运行故障」红色 */
.ticket-box .tb-title .t-ticket { color: #007bff; }   /* ✅ 表头「速报模板」蓝色 */
.ticket-box .tb-title .t-sep { color: #000; }         /* ✅ 表头分隔符「+」黑色 */
/* ✅ 速报模版正文：纵向列表，备注文字直接写在机车号后、可换行、框内可滚动，保持正常字号不裁切 */
.ticket-box .tb-body { flex: 1 1 auto; display: flex; flex-direction: column; align-items: stretch; gap: 2px; overflow-y: auto; overflow-x: hidden; padding-right: 2px; scrollbar-gutter: stable; }
.ticket-box .tb-item { display: block; width: 100%; box-sizing: border-box; text-align: left; white-space: normal; overflow-wrap: anywhere; word-break: break-all; font-size: 15px; font-weight: bold; color: #007bff; pointer-events: auto; cursor: default; line-height: 20px; padding: 1px 0 1px 2px; }
.ticket-box .tb-empty { font-size: 12px; color: #007bff; opacity: .55; text-align: center; }
.ticket-box .tb-item.tb-fault { color: #c0392b; }   /* ✅ 速报模版框内追加的运行故障条目：红色区分 */
.stats-title-box .tip-item.overdue { color: #198754; }  /* 备用超 24 小时：字体变绿 */
.loco-btn.spare-overdue .loco-status { color: #00e676 !important; }  /* 备用超 24 小时：画布按钮机车号同步变「亮绿」#00e676（呼应提示框 .overdue；!important 覆盖内联白字） */
.stats-title-box .tip-mark { color: #d00; }  /* 行首 ※ 序号标记：红色 */
/* ✅ 修改时间 简易对话框（替代原生 prompt） */
/* ✅ 〇-160：z-index 50→5000——同 np-edit-overlay，须盖过编组圆点(60)/施工连线(50) */
.ts-edit-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; z-index: 5000; }
.ts-edit-box { background: #fff; border: 2px solid #222; border-radius: 6px; padding: 14px 16px; min-width: 220px; box-shadow: 0 4px 16px rgba(0,0,0,.25); }
.ts-edit-title { font-size: 14px; font-weight: bold; color: #333; margin-bottom: 10px; text-align: center; }
.ts-edit-input { width: 100%; box-sizing: border-box; font-size: 14px; padding: 5px 6px; border: 1px solid #888; border-radius: 4px; }
.ts-edit-btns { display: flex; justify-content: space-between; margin-top: 12px; }
.ts-edit-btn { flex: 1; margin: 0 4px; padding: 6px 0; font-size: 13px; border: 1px solid #888; border-radius: 4px; background: #f3f3f3; cursor: pointer; }
.ts-edit-btn:hover { background: #e6e6e6; }
#inspection-formula {
    font-size: 16px;
    font-weight: bold;
    color: #000;
    white-space: nowrap;   /* ✅ 〇-65：单行显示，超出由 JS 自动缩字号（不换行） */
    pointer-events: none;
}
.ins-num { color: #e60000; font-weight: bold; }
#inspection-bureau { font-size: 16px; font-weight: bold; color: #000; white-space: normal; pointer-events: none; }
/* ✅ 局段统计单项可悬停：鼠标放上去由备注气泡竖排显示该局段具体机车号 */
.bureau-stat { pointer-events: auto; padding: 0 2px; border-radius: 3px; }
#inspection-extra { font-size: 16px; font-weight: bold; color: #000; white-space: normal; line-height: 1.5; pointer-events: none; margin-top: 2px; display: flex; flex-direction: column; }
/* ✅ 防弹性子项被超宽 nowrap 内容(min-width:auto)撑宽、超出 inspection-body(overflow-x:hidden) 被横向裁切；
   同时保证 fitFormulaOneLine 量到的 avail 为真实可视宽度，使超宽行能正确触发"缩字号→换行"回退 */
#inspection-body > * { min-width: 0; }
#inspection-extra > * { min-width: 0; }
.loco-num { pointer-events: auto; cursor: context-menu; }
.loco-remark-mark { color: #e60000; font-weight: bold; }
/* ✅ 备用机车按局段分组多行显示（自管/二十局/一局/十五局）：局段名前置一次，车号「.」连接；整块与局段行各自独立成行 */
.spare-block { display: block; }
.spare-first { display: inline-block; white-space: nowrap; vertical-align: baseline; }   /* 备用块-自管行：与标题同行，超宽时由 JS 缩字号保持单行 */
.spare-bureau-line { display: block; white-space: nowrap; padding-left: var(--spare-indent, 0); }   /* 其余局段行缩进对齐自管（悬挂缩进）；超宽时由 JS 缩字号保持单行 */
.spare-head { white-space: nowrap; }                                                           /* 备用块标题「备用机车 N台：」仅用于测量缩进基准 */
#remark-bubble { position: fixed; display: none; max-width: 320px; box-sizing: border-box; background: #fff; border: 1px solid #e60000; color: #e60000; font-size: 20px; font-weight: bold; padding: 6px 10px; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.25); z-index: 99998; pointer-events: none; white-space: normal; line-height: 1.5; word-break: break-word; overflow-wrap: anywhere; text-align: left; }
/* ✅ 局段气泡(自管*台 / 二十局*台 / 十五局*台 / 一局*台)：第一排局段名+台数、第二排 HXN3/DF8B 标题、第三排车号 全部居中 */
.bubble-bureau-title { display: block; text-align: center; }
.model-bubble-cols { display: flex; gap: 22px; font-size: 18px; justify-content: center; }
.model-col { min-width: 92px; }
.model-head { color: #000; font-weight: bold; border-bottom: 1px solid #e60000; padding-bottom: 2px; margin-bottom: 3px; text-align: center; }
.model-list { line-height: 1.5; text-align: center; }
.model-list > div { white-space: nowrap; text-align: center; }
.remark-menu { position: fixed; display: none; background: #fff; border: 1px solid #333; border-radius: 4px; box-shadow: 0 2px 10px rgba(0,0,0,0.25); padding: 4px 0; z-index: 99999; min-width: 120px; font-size: 13px; }
.remark-menu-item { padding: 7px 16px; cursor: pointer; color: #222; white-space: nowrap; }
.remark-menu-item:hover { background: #f0f4ff; }

/* 复制备注轻提示（短暂停留后自动消失） */
.copy-toast {
    position: fixed; bottom: 40px; left: 50%; transform: translateX(-50%);
    z-index: 99999; color: #fff; background: rgba(30, 40, 50, 0.92);
    padding: 8px 18px; border-radius: 20px; font-size: 13px; display: none;
    font-family: Arial, "Microsoft YaHei", sans-serif; box-shadow: 0 4px 14px rgba(0,0,0,0.25);
    white-space: nowrap;
}
/* ✅ 自定义「添加备注」居中弹窗（替代原生 prompt，保证屏幕正中） */
.remark-modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.35); z-index: 40000; display: none; align-items: center; justify-content: center; }
.remark-modal { background: #fff; border-radius: 8px; padding: 18px 20px; width: 320px; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,0.3); }
.remark-modal h4 { margin: 0 0 10px; font-size: 15px; color: #333; text-align: center; }
.remark-modal textarea { width: 100%; box-sizing: border-box; min-height: 72px; font-size: 14px; padding: 8px; border: 1px solid #ccc; border-radius: 4px; resize: vertical; font-family: inherit; }
.remark-modal .rm-btns { display: flex; gap: 8px; justify-content: center; margin-top: 12px; }
.remark-modal button { font-size: 14px; padding: 6px 16px; border-radius: 4px; cursor: pointer; border: 1px solid #ccc; background: #fff; color: #333; }
.remark-modal button.rm-ok { background: #007bff; color: #fff; border-color: #007bff; }
.panel { display: none; position: absolute; background: rgba(255,255,255,0.98); border: 1px solid #ccc; padding: 10px 12px; border-radius: 6px; box-shadow: 0 3px 6px rgba(0,0,0,0.15); z-index: 1000; }
.panel h4 { margin: 0 0 6px 0; font-size: 14px; color: #555; text-align: center; }
.panel label { display: inline-block; width: 50px; font-size: 14px; }
.panel select, .panel input[type="text"] { width: 120px; padding: 4px; box-sizing: border-box; font-size: 14px; }
/* ✅ 加入机车对话框：整体内容居中（2026-08-18）。ID 选择器优先级高于 .panel，手机端 styles-mobile.css 也会被覆盖 */
#settings-panel { text-align: center; }
#settings-panel label { display: inline-block; width: 60px; text-align: right; margin: 0 8px 0 0; }
#settings-panel select, #settings-panel input[type="text"] { display: inline-block; width: 140px; text-align: center; margin: 0; }
#settings-panel .btn-row { text-align: center; justify-content: center; }
/* 局段下拉：居中显示；2字局段中间加全角空格，使其宽度与3字局段(二十局/十五局)一致、对齐 */
#btn-bureau-select, #btn-bureau-select option { text-align: center; }
.panel input.input-error { border: 2px solid #dc3545; outline: none; animation: shake 0.3s; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-4px)} 75%{transform:translateX(4px)} }
.status-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 3px; margin-bottom: 4px; }
.status-option { padding: 4px 4px; border: 1px solid #ddd; border-radius: 3px; cursor: pointer; font-size: 12px; text-align: center; background: white; color: #333; line-height: 1.3; white-space: nowrap; transition: background-color 0.12s, border-color 0.12s; }
.status-option:hover { background: #eef3ff; border-color: #4a90e2; }
.status-divider { height: 1px; background: #eee; margin: 4px 0; }
.status-option.danger { color: #dc3545; border-color: #f5c6cb; background: #fff5f5; grid-column: 1 / -1; font-weight: bold; }
.status-option.danger:hover { background: #ffe0e0; }
.status-option.fault { color: #b8430b; border-color: #f0b27a; background: #fff3e6; grid-column: 1 / -1; font-weight: bold; }
.status-option.fault:hover { background: #ffe6cc; }
/* ✅ 运行故障+交班本 并排各占50%：覆盖 .fault 的整行 span */
.status-grid.np2 { grid-template-columns: 1fr 1fr; }
.status-grid.np2 .status-option { grid-column: auto; }
.status-option.handover { color: #c62828; border-color: #f0b27a; background: #fff3e6; font-weight: bold; }
.status-option.handover:hover { background: #ffe6cc; }
/* ✅ 交班本记事：紫色边框（看板未用色，区别于红/蓝/黄）：3px 紫 outline + 向内1px + 紫晕，不挤压内容、随机车移动 */
.loco-btn.handover-mark {
    outline: 3px solid #9c27b0 !important;
    outline-offset: -1px;
    box-shadow: 0 0 6px rgba(156,39,176,0.55);
}

.loco-btn {
    position: absolute; width: 70px; height: 25px; border-radius: 3px; 
    cursor: grab; display: flex; overflow: hidden; box-sizing: border-box;
    border: 1px solid #000; transition: box-shadow 0.1s, border-radius 0.15s;
    will-change: left, top; z-index: 2;
    background-color: white;
}
.loco-btn:active { cursor: grabbing; }
/* ✅ 施工标记（2026-08-20）：红色半格×按钮。z-index:1 低于普通机车(z-index:2)，
   故其它机车可覆盖在其上方；不受编组/状态样式影响；尺寸由 JS 内联设置（宽半个单元格、高2格）。 */
.loco-btn.construction-btn {
    z-index: 1;
    background-color: #dc3545;
    color: #fff;
    border: 1px solid #a71d2a;
    display: flex; align-items: center; justify-content: center;
    font-weight: bold;
    border-radius: 3px; cursor: grab;
}
/* ✅ 方案A(〇-95)：施工牌相邻连线层。置于按钮之上(z-index:50)确保红线可见(不再被红按钮盖住)，
   pointer-events:none 不挡拖拽/点击；overflow:visible 防坐标越界被裁切。坐标由 JS 锁 viewBox 1:1。 */
#construction-links {
    position: absolute; left: 0; top: 0; width: 100%; height: 100%;
    pointer-events: none; z-index: 50; overflow: visible;
}
/* ✅ 修复3: 拖拽时z-index提升至200，确保覆盖link-handle(60) */
.loco-btn.dragging { z-index: 200 !important; box-shadow: 0 4px 12px rgba(0,0,0,0.3); transition: none; }
.loco-bureau { width: 25%; height: 100%; flex-shrink: 0; color: white; font-size: 10px; font-weight: bold; line-height: 25px; text-align: center; pointer-events: none; }
.loco-bureau.light-bg { color: #333; }
.loco-status { 
    width: 75%; height: 100%; font-size: 22px; font-weight: bold; line-height: 25px; text-align: center; 
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; 
    background-color: white; color: #333; position: relative; pointer-events: none; 
}
/* ✅ 单列/多列车号居中（2026-08-17 需求）：所有机车只占一个竖向网格列(一列)→车号居中；
   占 2 列及以上(两列)→车号靠左(不居中)。判定由 utils.js updateColumnLayout 在 canvas 上挂/摘 .locos-single-col */
canvas:not(.locos-single-col) .loco-status { text-align: left; }
.loco-btn.grouped { border-radius: 0; }
.loco-btn.group-left { margin-left: -1px; border-top-left-radius: 0; border-bottom-left-radius: 0; z-index: 3; }
.loco-btn.group-top { margin-top: -1px; border-top-left-radius: 0; border-top-right-radius: 0; z-index: 3; }
.loco-btn.group-right { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.loco-btn.group-bottom { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* ✅ 机车被标记为「运行故障」时显示红色加粗边框；用 outline 绘制（不占布局、不挤压内容区），避免机车号被裁切 */
.loco-btn.fault-active {
    outline: 3px solid #c00 !important;
    outline-offset: -1px;
    box-shadow: 0 0 6px rgba(204,0,0,0.55);
}

.link-handle {
    position: absolute; width: 8px; height: 8px; background: #007bff; border: 1.5px solid white;
    border-radius: 50%; z-index: 60; cursor: grab; transform: translate(-50%, -50%);
    box-shadow: 0 1px 3px rgba(0,0,0,0.4); transition: background 0.15s;
}
.link-handle::after {
    content: ''; position: absolute; top: 50%; left: 50%;
    width: 15px; height: 15px; transform: translate(-50%, -50%);
    border-radius: 50%; background: transparent; pointer-events: auto; 
}
.link-handle:hover { background: #0056b3; transform: translate(-50%, -50%) scale(1.4); }
.link-handle:active { cursor: grabbing; transform: translate(-50%, -50%) scale(1.2); }

/* ============================================================
 * 验证模块（auth.js）：口令验证单元格 + 密码弹窗 + 提示气泡
 * ============================================================ */
.auth-cell {
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    writing-mode: horizontal-tb;
}
.auth-cell:hover { filter: brightness(0.96); }

/* 密码弹窗 */
.auth-modal-overlay {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(0, 0, 0, 0.3);
    display: none; align-items: center; justify-content: center;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}
.auth-modal {
    background: #fff; border: 1px solid #ccc; border-radius: 8px;
    padding: 20px 22px; width: 280px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
}
.auth-modal h4 { margin: 0 0 6px; font-size: 16px; color: #333; }
.auth-hint { margin: 0 0 12px; font-size: 12px; color: #888; }
.auth-input {
    width: 100%; box-sizing: border-box; padding: 8px 10px;
    font-size: 14px; border: 1px solid #ccc; border-radius: 4px; outline: none;
}
.auth-input:focus { border-color: #007bff; }
.auth-err { color: #dc3545; font-size: 12px; min-height: 16px; margin: 6px 0 0; }
.auth-btns { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.auth-btns button {
    font-size: 14px; padding: 6px 16px; border-radius: 4px;
    cursor: pointer; border: 1px solid #ccc; background: #f5f5f5;
}
.auth-btns .auth-ok { background: #007bff; color: #fff; border-color: #007bff; }

/* ============================================================
 * 强制合并 / 强制分开模块（merge.js）
 * ============================================================ */
/* 强制合并对的浅绿轮廓：样式对齐交班本(3px outline + 向内1px + 同色光晕)，颜色保持浅绿；不拦事件 */
.force-group-outline {
    position: absolute;
    outline: 3px solid #a5d6a7 !important;
    outline-offset: -1px;
    background: rgba(165, 214, 167, 0.10);
    box-shadow: 0 0 6px rgba(165, 214, 167, 0.55);
    box-sizing: border-box;
    pointer-events: none;
    z-index: 5;
}
/* 强制合并弹窗（覆盖层 + 对话框，风格对齐口令弹窗） */
.force-merge-overlay {
    position: fixed; inset: 0; z-index: 4000;
    background: rgba(0, 0, 0, 0.3);
    display: none; align-items: center; justify-content: center;
    font-family: Arial, "Microsoft YaHei", sans-serif;
}
.force-merge-modal {
    background: #fff; border: 1px solid #ccc; border-radius: 8px;
    padding: 18px 20px; width: 320px; box-shadow: 0 8px 30px rgba(0, 0, 0, 0.25);
    font-size: 14px; color: #333;
}
.force-merge-modal h4 { margin: 0 0 12px; font-size: 16px; color: #333; }
.force-merge-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fm-sel { flex: 1 1 auto; min-width: 0; padding: 5px 6px; font-size: 13px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; }
.fm-msg { color: #dc3545; font-size: 12px; min-height: 16px; margin: 0 0 6px; }
.force-merge-preview { background: #f5f7fa; border: 1px solid #eee; border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.force-merge-preview .act { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; }
.force-merge-list { margin-top: 12px; border-top: 1px dashed #ddd; padding-top: 8px; font-size: 13px; }
.fm-pair { display: flex; align-items: center; justify-content: space-between; margin: 4px 0; }
.fm-btn { font-size: 13px; padding: 5px 12px; border-radius: 4px; cursor: pointer; border: 1px solid #ccc; background: #f5f5f5; }
.fm-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.fm-btn.fm-ok { background: #2e7d32; color: #fff; border-color: #2e7d32; }
.fm-btn.fm-del { background: #dc3545; color: #fff; border-color: #dc3545; }

/* ✅ 记事本框：统计框右侧、河西方向带上方空白区；右键框=添加记事，点击文字=黑/红切换，右键某条=删除 */
.notepad-box {
    position: absolute;
    left: 455px;          /* 左缘对齐竖格线：7×70=490；2026-09-30 〇-124x 左移0.5格(-35) → 455 */
    top: 475px;           /* 上缘下移1格对齐下方横线：19×25=475 */
    width: 560px;         /* 8 整格：右缘 1050=15×70 */
    height: 250px;        /* 10 整格：底缘 725=29×25 仍在线、不压方向带 */
    border: 2px solid #222;
    background: #fff;
    box-sizing: border-box;
    z-index: 2;
    overflow: hidden;
    cursor: context-menu;
}
.notepad-box .np-title { text-align: center; font-size: 18px; font-weight: bold; color: #9c27b0; line-height: 22px; pointer-events: none; }
.notepad-box .np-list { margin: 2px 10px 6px 12px; padding: 0; list-style: none; font-size: 20px; font-weight: bold; color: #000; line-height: 28px; columns: 2; column-gap: 10px; column-fill: auto; }  /* 列优先：先填满左列(到框底)再往右列 */
.notepad-box .np-list li { cursor: pointer; white-space: nowrap; width: fit-content; max-width: 100%; break-inside: avoid; }
.notepad-box .np-list li.np-wide { column-span: all; width: auto; white-space: normal; word-break: break-all; }
.notepad-box .np-list li.np-red { color: #c00; }
/* ✅ 〇-125c：记事本/出入库登记 底部灰色操作提示小字已删除（用户要求） */
/* ✅ 〇-125 出入库登记框：记事本框右侧；右键框=添加登记，点击文字=黑/红切换，右键某条=删除（与记事本同构） */
.depot-box {
    position: absolute;
    left: 1050px;         /* 左缘对齐 15 格竖线：15×70=1050（记事本右缘 1015 再隔半格） */
    top: 475px;           /* 与记事本同高：上缘 475=19×25 */
    width: 175px;         /* 2.5 格：右缘 1225=17.5×70（〇-125a 减1格，〇-125b 再减0.5格） */
    height: 250px;        /* 与记事本同高：底缘 725=29×25 */
    border: 2px solid #222;
    background: #fff;
    box-sizing: border-box;
    z-index: 2;
    overflow: hidden;
    cursor: context-menu;
}
.depot-box .dp-title { text-align: center; font-size: 18px; font-weight: bold; color: #1565c0; line-height: 22px; pointer-events: none; }
.depot-box .dp-list { margin: 2px 10px 6px 12px; padding: 0; list-style: none; font-size: 20px; font-weight: bold; color: #000; line-height: 28px; }  /* 单列：框窄 */
.depot-box .dp-list li { cursor: pointer; white-space: nowrap; width: fit-content; max-width: 100%; }
.depot-box .dp-list li.dp-red { color: #c00; }
/* ✅ 〇-140：出入库登记两列（左=入库、右=出库，只显车号，悬停显示详情） */
.depot-box .dp-list { display: flex; gap: 6px; }
.depot-box .dp-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }   /* 〇-144b 纵向 flex，列表区撑满 */
.depot-box .dp-col-h { text-align: center; font-size: 0.72em; line-height: 1.35; font-weight: bold; border-bottom: 1px solid #9db8d2; margin-bottom: 2px; pointer-events: none; }
.depot-box .dp-ul { margin: 0; padding: 0; list-style: none; flex: 1; display: grid; grid-template-rows: repeat(8, 1fr); }   /* 〇-144c 固定8行槽位：第1台永远顶行、顺序固定、空位留底、整列均分占满 */
.depot-box .dp-ul li { width: auto; text-align: center; align-self: center; }   /* 车号在槽位内垂直居中 */
.depot-box .dp-ul li { width: auto; text-align: center; }   /* 车号列内居中 */
/* ✅ 〇-144 框底统计小字：今天整备机车：N台（N 红字） */
.depot-box .dp-foot { text-align: center; font-size: 12px; line-height: 16px; color: #333; font-weight: bold; border-top: 1px solid #9db8d2; margin: 0 10px; padding: 2px 0 3px; pointer-events: none; }
.depot-box .dp-foot .dp-foot-num { color: #d40000; }
/* 记事本 弹窗（沿用 ts-edit 风格，替代原生 prompt/confirm） */
/* ✅ 〇-160：z-index 60→5000——编组圆点 .link-handle 也是 60 且 DOM 靠后，同层时圆点穿透盖在弹窗上；提到圆点之上（仍低于 remark 模态 40000/气泡 99998） */
.np-edit-overlay { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; z-index: 5000; }
.np-edit-box { background: #fff; border: 2px solid #222; border-radius: 8px; padding: 22px 24px; width: 420px; max-width: 90vw; box-shadow: 0 8px 30px rgba(0,0,0,.3); box-sizing: border-box; }
.np-edit-title { font-size: 17px; font-weight: bold; color: #333; margin-bottom: 12px; text-align: center; }
.np-edit-input { width: 100%; box-sizing: border-box; font-size: 20px; line-height: 30px; padding: 10px; min-height: 110px; border: 1px solid #ccc; border-radius: 4px; resize: none; font-family: inherit; }
.np-edit-btns { display: flex; gap: 10px; justify-content: center; margin-top: 14px; }
.np-edit-btn { flex: none; padding: 8px 22px; font-size: 15px; border: 1px solid #ccc; border-radius: 4px; background: #fff; color: #333; cursor: pointer; }
.np-edit-btn:hover { background: #e6e6e6; }
.np-edit-ok { background: #007bff; color: #fff; border-color: #007bff; }
