/* ============================================================
   EO 单管理网站 —— 共享样式（模拟 Word 文档排版风格）
   仅页面结构与样式，暂不含业务逻辑
   ============================================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: "SimSun", "宋体", "Songti SC", serif;
    font-size: 14px;
    color: #000;
    line-height: 1.5;
    background: linear-gradient(160deg, #eef5fc 0%, #e2ecf7 100%);  /* 明亮冷灰蓝渐变背景 */
    min-height: 100vh;
    padding: 24px 0 60px;
}

/* ---------- 宽屏容器（适配 1080P，1920×1080） ---------- */
/* 原 A4 794px 窄版 → 宽屏自适应版，保持 Word 单线框字段风格 */
.paper {
    width: 96%;
    max-width: 1760px;              /* 1080P 满幅 */
    margin: 0 auto;
    background: #fff;
    padding: 40px 48px 56px;
    box-shadow: 0 4px 28px rgba(0,0,0,.28);
}

/* ---------- 页面标题 ---------- */
.doc-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 6px;
    margin-bottom: 18px;
}

/* ---------- 通用表格（Word 单线框风格） ---------- */
table.eo {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
    table-layout: fixed;
    font-size: 13px;
}
table.eo td,
table.eo th {
    border: 1px solid #000;
    padding: 5px 6px;
    vertical-align: middle;
    word-break: break-all;
    line-height: 1.45;
}
/* 标签列（左对齐、留白） */
td.label {
    text-align: left;
    padding-left: 8px;
    white-space: nowrap;
    color: #000;
}
/* 部门分区标题行 */
tr.section td.section-head {
    background: #e7eef6;
    text-align: center;
    font-weight: bold;
    letter-spacing: 2px;
    padding: 4px 0;
}
/* 小标题行（如 客房安排 / 茶歇安排） */
tr.subhead td {
    background: #f1f5fa;
    text-align: center;
    font-weight: bold;
    padding: 3px 0;
}
/* 说明文字单元格（小字） */
td.note {
    font-size: 12px;
    line-height: 1.7;
    text-align: left;
    padding: 6px 8px;
}

/* ---------- 签署行 ---------- */
.sign-row {
    display: flex;
    justify-content: space-between;
    margin-top: 34px;
    font-size: 15px;
}
.sign-row .sign { min-width: 120px; }
.sign-row .sign span { margin-right: 6px; }

/* ---------- 分发栏 ---------- */
.dispatch {
    margin-top: 26px;
    font-size: 14px;
    letter-spacing: 1px;
}
.dispatch b { font-weight: bold; }

/* ---------- 顶部导航 ---------- */
.topnav {
    width: 96%;
    max-width: 1760px;
    margin: 0 auto 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topnav .brand {
    font-size: 18px;
    font-weight: bold;
    color: #1f7ad9;
    letter-spacing: 2px;
}
.topnav nav a {
    text-decoration: none;
    color: #1f7ad9;
    font-size: 14px;
    padding: 6px 14px;
    border: 1px solid #1f7ad9;
    border-radius: 4px;
    margin-left: 10px;
    background: #fff;
}
.topnav nav a.active {
    background: linear-gradient(135deg, #2b8af0 0%, #1f6fd0 100%);
    color: #fff;
    border-color: #1f6fd0;
    box-shadow: 0 2px 8px rgba(31,122,217,.28);
}
.topnav nav a:hover { opacity: .85; }
.topnav-user {
    display: flex; align-items: center; gap: 8px;
    font-size: 13px; color: #1f7ad9;
}
.topnav-user .user-name {
    font-weight: bold; padding: 3px 8px;
    background: #1f7ad9; color: #fff; border-radius: 4px;
}
.topnav-user .user-dept {
    color: #888; font-size: 12px;
}
.topnav-user .logout-link {
    text-decoration: none; color: #e0245e; font-size: 12px;
    padding: 3px 8px; border: 1px solid #e0245e; border-radius: 4px;
}
.topnav-user .logout-link:hover { background: #e0245e; color: #fff; }

/* ---------- 全站统一底部版权栏（固定在页面底部，打印/导出 PDF 时隐藏） ---------- */
.site-footer {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 9px 12px; text-align: center;
    color: #98a4b6; font-size: 12px; letter-spacing: .5px;
    background: rgba(255,255,255,.94);
    border-top: 1px solid #e6ecf5;
}

/* 打印友好 / 导出 PDF：隐藏导航、操作栏、审计横幅、底部栏，保留签字与分发；表格强制实线边框 */
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff; padding: 0; }
    .paper { box-shadow: none; width: 100%; padding: 0; }
    .topnav, .detail-actions, .audit-banner, .site-footer { display: none !important; }
    .detail-wrap { max-width: none; margin: 0; padding: 0; }
    .detail-sec { break-inside: avoid; page-break-inside: avoid; }
    .dispatch { break-inside: avoid; page-break-inside: avoid; }
    .sig-grid { break-inside: avoid; page-break-inside: avoid; }
    .sig-form-grid { break-inside: avoid; page-break-inside: avoid; }
    .sig-preview, .sig-cell .sig-preview { background: transparent !important; }
    table.list, table.kv, table.basic { border-collapse: collapse; }
    table.list th, table.list td, table.kv td, table.basic td { border: 1px solid #333 !important; }
    table.list th { background: #f0f0f0 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    .detail-title { text-align: center; font-size: 20px; }
    a { color: #000; text-decoration: none; }
    /* 导出 PDF：A4 打印视口≈718px 会命中 ≤820px 窄屏断点（表格 min-width 760px + 容器横滚），
       必须取消最小宽度与横向滚动，表格随 A4 宽度自适应换行，不出现横向滚动条 */
    .form-sec > .body, .detail-sec > .body, .dept-sec > .body { overflow-x: visible; }
    table.list, table.rows-table, table.user-table { min-width: 0 !important; width: 100%; table-layout: fixed; }
    table.list th, table.rows-table th, table.user-table th { white-space: normal; word-break: break-all; }
    table.list td { word-break: break-all; }
    .tbl-scroll { overflow-x: visible; }
    .sig-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .sig-form-grid { grid-template-columns: repeat(4, 1fr) !important; }
    .sig-form-grid .sig-slot-qr .sig-qr-img { width: 130px; height: 130px; }
    .sig-slot-preview img { max-height: 120px; }
    .sig-slot { padding: 6px 8px; }
    /* A4 打印视口≈718px 会命中 ≤820px 窄屏断点，导致 grid2 变单列、field 标签/内容
       各占一行（各部门说明等区块被拉得过长）。打印时恢复两列 + 横向排列。 */
    .grid2 { grid-template-columns: 1fr 1fr !important; gap: 8px 18px !important; }
    .grid2 .field { flex-direction: row !important; align-items: center !important; gap: 0 !important; }
    .grid2 .field label { width: 92px !important; text-align: left !important; padding: 0 8px 0 0 !important; }
    .grid2 .field .detail-note { padding-top: 0 !important; }
    .grid2 .field.wide { flex-direction: column !important; align-items: stretch !important; }
}

/* ============================================================
   功能层：列表 / 表单 / 详情
   ============================================================ */
.toolbar {
    width: 96%; max-width: 1760px; margin: 0 auto 14px; display: flex;
    justify-content: space-between; align-items: center;
}
.toolbar .search { display: flex; gap: 8px; }
.toolbar .search input[type=text] { width: 360px; }
.toolbar input[type=text], .toolbar input[type=date], .toolbar select {
    height: 32px; padding: 0 10px; border: 1px solid #d6dde8;
    border-radius: 4px; font-size: 14px; font-family: inherit;
}
.btn {
    display: inline-block; padding: 7px 16px; font-size: 14px;
    font-family: inherit; border: 1px solid #1f7ad9; border-radius: 4px;
    background: #fff; color: #1f7ad9; cursor: pointer; text-decoration: none;
}
.btn:hover { opacity: .88; }
.btn-primary { background: linear-gradient(135deg, #3f97ef 0%, #1f74d6 100%); color: #fff; border-color: #1f74d6; box-shadow: 0 2px 6px rgba(31,116,214,.26); }
.btn-primary:hover { background: linear-gradient(135deg, #348ae8 0%, #1a66c6 100%); box-shadow: 0 3px 10px rgba(31,116,214,.36); }
.btn-sm { padding: 3px 10px; font-size: 12.5px; border-radius: 3px; }
.btn-danger { border-color: #e0245e; color: #e0245e; background: #fff; }
.btn-danger:hover { background: #e0245e; color: #fff; }
.btn-warn { border-color: #b9740a; color: #b9740a; background: #fff; }
.btn-warn:hover { background: #b9740a; color: #fff; }
.btn-clone { border-color: #15a34a; color: #15a34a; background: #fff; }
.btn-clone:hover { background: #15a34a; color: #fff; }
.btn-recall { border-color: #1f6fd0; color: #1f6fd0; background: #fff; }
.btn-recall:hover { background: #1f6fd0; color: #fff; }
.btn-demo { border-color: #7c4dff; color: #7c4dff; background: #fff; }
.btn-demo:hover { background: #7c4dff; color: #fff; }
/* 审计入口：活力橙金，与普通操作按钮区分 */
.btn-audit { border-color: #f5a623; color: #a35e00; background: linear-gradient(135deg, #fff7e8 0%, #fff0d2 100%); font-weight: 600; }
.btn-audit:hover { background: linear-gradient(135deg, #f7b13e 0%, #f5a623 100%); color: #fff; border-color: #f5a623; }
/* 审计状态徽标 */
.audit-badge { display:inline-block; font-size:11px; line-height:1; padding:2px 7px; border-radius:10px; margin-bottom:4px; }
.audit-badge.on { background:#e7f8ee; color:#15a34a; border:1px solid #a7e4bd; }
.audit-badge.off { background:#f0f0f0; color:#999; border:1px solid #ddd; }
.audit-locked { display:inline-block; font-size:11px; color:#d6dde8; }
/* 单页顶部审计状态横幅 */
.audit-banner {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    background:#fff4e0; border:1px solid #f3d9a8; border-radius:8px;
    padding:10px 14px; margin:0 0 16px;
}
.audit-banner-ico { font-size:18px; }
.audit-banner-label { font-size:14px; font-weight:600; color:#a35e00; letter-spacing:1px; }
.audit-banner .btn-audit { margin-left:auto; }
/* 审计区底部保存行 */
.audit-save-row { margin-top:14px; display:flex; align-items:center; gap:12px; }
.audit-save-msg { font-size:13px; }

.empty { text-align: center; color: #999; padding: 24px !important; }

/* 分页 */
.pager { width: 96%; max-width: 1760px; margin: 18px auto; display: flex; gap: 6px; justify-content: center; font-size: 13px; }
.pager a, .pager span { padding: 5px 11px; border: 1px solid #d6dde8; border-radius: 3px; text-decoration: none; color: #1f7ad9; background: #fff; }
.pager .cur { background: #1f7ad9; color: #fff; border-color: #1f7ad9; }

/* 表单 */
.form-card { width: 96%; max-width: 1760px; margin: 0 auto; background: #fff; box-shadow: 0 2px 14px rgba(0,0,0,.18); padding: 22px 26px 30px; }
.form-sec { border: 1px solid #d6dde8; border-radius: 6px; margin-bottom: 16px; overflow-x: auto; }
.form-sec > h3 { background: linear-gradient(135deg, #2b8af0 0%, #1f6fd0 100%); color: #fff; font-size: 14px; font-weight: normal; letter-spacing: 2px; padding: 8px 14px; margin: 0; box-shadow: 0 1px 4px rgba(31,122,217,.25); }
.form-sec > .body { padding: 14px 16px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.field { display: flex; align-items: center; }
.field label { width: 92px; flex: none;  padding-right: 8px; color: #333; }
.field input, .field select, .field textarea {
    flex: 1; height: 34px; padding: 0 9px; border: 1px solid #d6dde8;
    border-radius: 4px; font-size: 13.5px; font-family: inherit; background: #fff;
}
/* 高度由 JS autoResize 控制：flex 基准必须是 auto，
   否则纵向 .field 里 flex-basis:0% 会覆盖 height，导致内容被裁切 */
.field textarea { flex: 1 1 auto; min-height: 40px; max-height: 500px; padding: 10px 12px; resize: vertical; overflow-x: hidden; overflow-y: auto; transition: height .15s ease-out, box-shadow .15s ease-out, border-color .15s ease-out; line-height: 1.7; }
/* 说明类文本域（客房说明/餐饮说明/杂项收费说明/结算说明/各部门说明等）：
   浅灰底 + 圆角 + 淡阴影，与输入框/表格形成视觉分层；聚焦时高亮蓝框 */
.field.wide textarea, .field-stacked textarea {
    background: #f8fafc; border: 1px solid #dbe3ee; border-radius: 6px;
    box-shadow: 0 1px 3px rgba(31,42,68,.06); padding: 10px 12px; line-height: 1.75;
}
.field.wide textarea:focus, .field-stacked textarea:focus {
    border-color: #2b8af0; box-shadow: 0 0 0 3px rgba(43,138,240,.12); background: #fff;
}
/* 各部门说明整区：用更深的浅灰底 + 内边距 + 圆角，
   把「工程部/安全部」「PA/财务/公关… 」整组框起来，与标题、快捷按钮形成层次 */
.field-stacked { background: #f4f7fb; border: 1px solid #e4eaf3; border-radius: 8px; padding: 12px 14px; margin-top: 2px; width: 100%; box-sizing: border-box; min-width: 0; }
.field-stacked label { font-weight: 500; color: #1f2a44; margin-bottom: 2px; }
.field-stacked textarea { background: #fff; width: 100% !important; box-sizing: border-box; min-width: 0; flex: none; }
.field.wide textarea { background: #f8fafc; }
.field.wide textarea:focus { background: #fff; }
.field.wide { grid-column: 1 / -1; flex-direction: column; align-items: stretch; }
.field.wide label { width: auto; text-align: left; padding: 0 0 6px; flex: none; }
.field.wide textarea { flex: none; }
/* 纵向堆叠字段（标签在上、控件在下）：textarea 必须 flex:none，
   否则 flex-basis 参与内在高度计算，栅格行高被压扁导致内容裁切 */
.field-stacked { flex-direction: column; align-items: stretch; }
.field-stacked label { width: auto; text-align: left; padding: 0 0 6px; flex: none; }
.field-stacked textarea { flex: none; width: 100%; box-sizing: border-box; min-width: 0; }
.field .req { color: #e0245e; margin-left: 3px; }

/* placeholder 浅灰色，与正式输入文字明显区分 */
input::placeholder, textarea::placeholder { color: #b0b8c4; font-size: 13px; }

/* 快捷语句按钮组 */
.qk-btns { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; padding: 0 9px 2px 0; }
.qk-btn {
    font-size: 12px; padding: 3px 8px; border: 1px solid #d6dde8; border-radius: 4px;
    background: #eef3fa; color: #444; cursor: pointer; line-height: 1.5;
    -webkit-user-select: none; user-select: none;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    max-width: 100%;
}
.qk-btn:hover { background: #e8ecf2; border-color: #1f7ad9; color: #1f7ad9; }
/* 个人话术按钮（浅金底，区别于公共灰底）+ 删除角标 + 新建按钮 */
.qk-btn.mine { background: #fff8e8; border-color: #e6c987; color: #8a6b1f; }
.qk-btn.mine:hover { background: #fff1d4; border-color: #c9a24b; color: #7a5a10; }
.qk-add {
    font-size: 13px; padding: 2px 8px; border: 1px dashed #c9a24b; border-radius: 4px;
    background: #fffdf7; color: #b8912f; cursor: pointer; line-height: 1.5; flex: none;
}
.qk-add:hover { background: #fff6df; border-color: #a8811f; color: #8a6b1f; }
/* ===== 个人快捷话术弹层 ===== */
.pq-mask {
    display: none; position: fixed; inset: 0; z-index: 20000;
    background: rgba(15,23,42,.45); align-items: center; justify-content: center;
}
.pq-box {
    width: min(480px, 92vw); max-height: 82vh; display: flex; flex-direction: column;
    background: #fff; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.25);
    overflow: hidden; font-family: inherit;
}
.pq-head {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 16px; background: linear-gradient(135deg,#1f2a44,#2c3c60); color: #fff;
}
.pq-title { font-size: 15px; font-weight: 700; letter-spacing: 1px; }
.pq-x { border: 0; background: transparent; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 0 4px; }
.pq-mod { padding: 9px 16px; font-size: 12px; color: #8a6b1f; background: #fffaf0; border-bottom: 1px solid #f0e6cc; }
.pq-list { flex: 1; overflow-y: auto; padding: 8px 16px; min-height: 60px; }
.pq-loading, .pq-empty { color: #9aa4b2; font-size: 13px; padding: 14px 2px; text-align: center; }
.pq-item { display: flex; align-items: center; gap: 6px; padding: 7px 0; border-bottom: 1px solid #f0f3f7; }
.pq-txt { flex: 1; font-size: 13px; color: #1f2a44; word-break: break-word; }
.pq-edit, .pq-del {
    border: 1px solid #d6dde8; background: #fff; border-radius: 4px; padding: 2px 8px;
    font-size: 12px; color: #55617a; cursor: pointer; flex: none;
}
.pq-del:hover { background: #e0245e; border-color: #e0245e; color: #fff; }
.pq-edit:hover { border-color: #1f7ad9; color: #1f7ad9; }
.pq-new { display: flex; gap: 8px; padding: 12px 16px 4px; border-top: 1px solid #eef2f7; }
.pq-new input {
    flex: 1; height: 34px; padding: 0 9px; border: 1px solid #d6dde8; border-radius: 5px;
    font-size: 13px; font-family: inherit; outline: none;
}
.pq-new input:focus { border-color: #1f7ad9; }
.pq-add { height: 34px; padding: 0 16px; border: 0; border-radius: 5px; background: #c9a24b; color: #fff; font-size: 13px; cursor: pointer; flex: none; }
.pq-add:hover { background: #b08f3a; }
.pq-msg { min-height: 20px; padding: 2px 16px 10px; font-size: 12px; }

/* 可增删行容器：table-layout:fixed 让每列按 th 的 width 严格分配，窄屏下表格出现横向滚动条，避免"备注"列被挤没 */
.rows-table { width: 100%; min-width: 780px; table-layout: fixed; border-collapse: collapse; font-size: 13px; }
.rows-table th { background: #eef3fa; border: 1px solid #d6dde8; padding: 8px 10px; font-weight: normal; font-size: 14px; }
.rows-table td { border: 1px solid #d6dde8; padding: 6px; }
.rows-table input, .rows-table select {
    width: 100%; height: 32px; padding: 0 8px; border: 1px solid #d6dde8;
    border-radius: 3px; font-size: 14px; font-family: inherit;
}
/* 客房房型单元格：下拉 + 自定义手输框，二者并排自适应 */
.room-type-cell { position: relative; }
.room-type-cell .room-type-sel { width: 100%; }
.room-type-cell .room-type-custom {
    width: 100%; height: 32px; padding: 0 8px; border: 1px dashed #c9a24b;
    border-radius: 3px; font-size: 14px; font-family: inherit; margin-top: 4px;
    background: #fffdf5;
}
/* 通用「多选下拉 + 自定义」单元格 */
.multi-cell { position: relative; }
.multi-box { position: relative; }
.multi-summary {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
    width: 100%; min-height: 32px; padding: 4px 8px; border: 1px solid #d6dde8;
    border-radius: 3px; font-size: 13px; background: #fff; cursor: pointer; line-height: 1.4;
}
.multi-summary:hover { border-color: #9db8d8; }
.mc-text { flex: 1; color: #9aa4b2; word-break: break-all; text-align: left; }
.mc-caret { color: #8a94a6; font-size: 12px; flex: none; }
.multi-panel {
    display: none; position: absolute; z-index: 9999; left: 0; top: calc(100% + 2px);
    min-width: 200px; max-width: 320px; max-height: 300px; overflow-y: auto;
    background: #fff; border: 1px solid #c9d6e6; border-radius: 6px;
    box-shadow: 0 6px 20px rgba(31,42,68,.18); padding: 8px;
}
.multi-opts { display: grid; grid-template-columns: 1fr 1fr; gap: 2px 8px; }
.mc-opt {
    display: flex; align-items: center; gap: 5px; padding: 4px 5px; cursor: pointer;
    font-size: 13px; color: #39435a; border-radius: 4px; white-space: nowrap;
}
.mc-opt:hover { background: #f0f5fc; }
.mc-opt input[type=checkbox] { width: 14px; height: 14px; margin: 0; flex: none; }
.mc-cust-row { margin-top: 6px; border-top: 1px dashed #e2e8f0; padding-top: 8px; }
.mc-custom-input {
    width: 100%; height: 30px; padding: 0 8px; border: 1px dashed #c9a24b;
    border-radius: 4px; font-size: 13px; font-family: inherit; background: #fffdf5;
}
/* 删除列：可见叉叉图标 + 隐藏 checkbox（不依赖 CSS appearance，兼容性最稳） */
.del-x {
    display: inline-block; width: 24px; height: 24px; line-height: 22px;
    text-align: center; cursor: pointer; color: #c4c9d2; font-size: 20px; font-weight: bold;
    border: 1px solid #d6dde8; border-radius: 4px; background: #fff;
    -webkit-user-select: none; user-select: none;
}
.del-x:hover { color: #e0245e; border-color: #e0245e; }
.del-x.on { color: #fff; background: #e0245e; border-color: #e0245e; }
/* 复制列图标 */
.row-ops { white-space: nowrap; }
.copy-x {
    display: inline-block; width: 24px; height: 24px; line-height: 22px;
    text-align: center; cursor: pointer; color: #2b6cb0; font-size: 18px;
    border: 1px solid #bcd4ee; border-radius: 4px; background: #eef5fc;
    -webkit-user-select: none; user-select: none; margin-right: 4px;
}
.copy-x:hover { color: #1a4f86; border-color: #2b6cb0; background: #dcebfa; }
tr.row-del { background: #fdeaf0 !important; }
tr.row-del td { color: #e0245e; }
tr.row-del input { text-decoration: line-through; }
/* 删除提示条（可撤销） */
.del-hint { margin: 0 0 14px; padding: 8px 12px; font-size: 13px; color: #8a5a00;
    background: #fff4e0; border: 1px solid #ffe2a8; border-radius: 6px; }
.del-hint b { color: #e0245e; margin: 0 2px; }
.del-hint a { color: #1f7ad9; cursor: pointer; margin-left: 4px; }
.del-hint a:hover { text-decoration: underline; }
.add-row-btn { margin-top: 10px; }

/* 基本信息宽表（仿 Word 单线框 label-value-label-value） */
table.basic {
    width: 100%; border-collapse: collapse; font-size: 14px;
    table-layout: fixed;
}
table.basic td {
    border: 1px solid #000; padding: 8px 12px; vertical-align: middle;
}
table.basic td.label {
    background: #eef3fa; text-align: left; font-weight: normal; color: #222;
    white-space: nowrap; width: 140px;
}
table.basic td input, table.basic td select {
    width: 100%; border: 0; outline: none; background: transparent;
    font-size: 14px; font-family: inherit; padding: 4px 0;
    border-bottom: 1px dashed #d6dde8; transition: border-color .15s;
}
table.basic td input:focus, table.basic td select:focus {
    border-bottom: 1px solid #1f7ad9;
}


/* ---------- 手写签名板 ---------- */
.sig-pad {
    border: 1px solid #d6dde8; border-radius: 4px; background: #fff;
    height: 120px; position: relative; overflow: hidden; touch-action: none;
    cursor: crosshair;
}
.sig-pad canvas { display: block; width: 100%; height: 100%; }
.sig-pad .sig-placeholder {
    position: absolute; inset: 0; display: flex; align-items: center;
    justify-content: center; color: #d6dde8; font-size: 14px; pointer-events: none;
    border: 1px dashed #dce4ee; margin: 8px;
}
.sig-actions { display: flex; gap: 8px; margin-top: 6px; }
.sig-actions .btn-sm { font-size: 12px; padding: 3px 10px; }
.sig-preview { width: 100%; height: 300px; object-fit: contain; background: transparent; }
.sig-cell { display: flex; flex-direction: column; gap: 4px; }
.sig-cell .sig-label { font-size: 13px; color: #333; text-align: right; }
/* 签署区：一行 4 个签字格，左对齐，签名图放大 */
.sig-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 16px; }
.sig-grid .sig-cell { align-items: flex-start; }
.sig-grid .sig-cell .sig-label { text-align: left; }
.sig-grid .sig-preview { height: 130px; }
@media (max-width: 900px) {
    .sig-grid { grid-template-columns: repeat(2, 1fr); }
    .sig-form-grid { grid-template-columns: repeat(2, 1fr); }
}
/* 后续签字层级配置行 */
.level-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.level-row .lvl-no { width: 60px; flex: none; font-size: 13px; color: #1f7ad9; }
.level-row .lvl-signer { flex: 1 1 0; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d6dde8; border-radius: 4px; font-family: inherit; font-size: 14px; }
.level-row .lvl-label { flex: 1 1 0; min-width: 0; height: 32px; padding: 0 8px; border: 1px solid #d6dde8; border-radius: 4px; font-family: inherit; font-size: 14px; }
.level-row .del-x { flex: none; }

/* 跨设备签字组件 */
.sig-slot { border: 1px dashed #f5a623; border-radius: 8px; padding: 10px; background: #fffaf0; }
.sig-slot-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.sig-slot-title { font-size: 14px; font-weight: bold; color: #1f7ad9; }
.sig-slot-state { font-size: 12px; color: #b9740a; }
.sig-slot-state.done { color: #15a34a; }
.sig-slot-state.warn { color: #e0245e; font-weight: 600; }
.sig-slot-qr { text-align: center; padding: 6px 0; }
.sig-slot-qr .sig-qr-img { display: inline-block; width: 180px; height: 180px; border: 1px solid #eef2f8; border-radius: 8px; background: #fff; padding: 6px; }
.sig-slot-qr .sig-qr-img img { display: block; width: 100%; height: 100%; }
.sig-slot-qr .sig-qr-tip { font-size: 12px; color: #888; margin-top: 6px; }
.sig-slot-preview { text-align: center; padding: 6px 0; }
.sig-slot-preview img { max-width: 100%; max-height: 160px; background: transparent; }
.sig-slot-preview .sig-done-tip { font-size: 13px; color: #15a34a; margin-top: 6px; }
.sig-slot-preview .sig-done-tip.big { font-size: 18px; padding: 18px 0; }
.sig-slot-mobile { background: #fff; }
.sig-slot-mobile .sig-slot-body { margin-top: 6px; }
.sig-pad-m { display: block; width: 100%; height: 260px; background: #f7fafe; border: 2px dashed #f5a623; border-radius: 10px; touch-action: none; }
.sig-slot-mobile .sig-actions { display: flex; gap: 10px; margin-top: 10px; }
.sig-slot-mobile .sig-actions button { flex: 1; }
/* 表单签署区：4 列网格，签名槽占 1/4 宽（比原来 grid2 半宽紧凑） */
.sig-form-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.sig-form-grid .sig-slot { width: 100%; }
.sig-form-grid .sig-slot-qr .sig-qr-img { width: 200px; height: 200px; }
.sig-form-grid .sig-slot-qr .sig-qr-tip { font-size: 12px; }
/* 手机签名页：既有签名回显卡片 */
.prev-card { background:#fff; border-radius:12px; box-shadow:0 3px 16px rgba(0,0,0,.08); padding:12px; margin-top:10px; text-align:center; }
.prev-card .prev-title { font-size:13px; color:#666; margin-bottom:8px; }
.prev-card .prev-img { max-width:80%; max-height:240px; border:1px solid #ddd; border-radius:8px; }
.prev-card .btn-re { margin-top:10px; padding:9px 18px; font-size:14px; border:none; border-radius:9px; background:#eee; color:#555; font-family:inherit; }
@media (max-width: 768px) {
    .sig-pad-m { height: 240px; }
    .sig-slot-qr .sig-qr-img { width: 150px; height: 150px; }
    /* 表单签署区手机端恢复全宽 */
    .sig-form-grid { grid-template-columns: 1fr; }
}

/* 详情 */
.detail-wrap { width: 96%; max-width: 1760px; margin: 0 auto; font-family: SimSun, 宋体, serif; }
.detail-title { font-size: 20px; font-weight: bold; text-align: center; margin-bottom: 14px; letter-spacing: 3px; }
.detail-sec { margin-bottom: 18px; }
.detail-sec > h3 {
    font-size: 14px; font-weight: bold; color: #000; margin: 0 0 8px;
    padding: 0; border: none; letter-spacing: 1px;
}
.detail-sec > .body { padding: 0; }
table.kv { width: 100%; border-collapse: collapse; font-size: 13px; }
table.kv td { border: 1px solid #000; padding: 8px 12px; vertical-align: middle; }
table.kv td.k { background: #eef3fa; width: 140px; font-weight: normal; color: #222; }
table.list { width: 100%; border-collapse: collapse; font-size: 13px; margin-bottom: 8px; }
table.list th, table.list td { border: 1px solid #dfe6f0; padding: 8px 10px; text-align: center; }
table.list thead th { background: #eef3fa; font-weight: bold; color: #33517a; letter-spacing: 0; border-bottom: 2px solid #c7d7ec; }
table.list tbody tr:nth-child(even) { background: #fafcfe; }
table.list tbody tr { transition: background .12s ease; }
table.list tbody tr:hover { background: #eef4fb; }
/* 列表内纯文本链接：默认无下划线，悬停才变色加下划线（排除 .btn 按钮，避免覆盖按钮文字色） */
table.list a:not(.btn) { color: #1f7ad9; text-decoration: none; }
table.list a:not(.btn):hover { color: #1656a0; text-decoration: underline; }
.detail-note { font-size: 13px; line-height: 1.9; white-space: pre-line; color: #222; padding: 4px 0 0; }
.detail-note:empty { display: none; }
.detail-actions { display: flex; gap: 10px; margin: 16px 0; }

/* EO 表单：自动生成编号展示（新建占位 / 编辑实号） */
.no-view { font-weight: 600; color: #1f7ad9; letter-spacing: .5px; }
.no-auto { color: #9aa3b2; font-weight: 400; font-style: italic; letter-spacing: 0; }


/* ============================================================
   响应式适配：桌面 / 平板 / 手机（全站核心）
   设计原则：容器保持流式（已在各页 width:96% max-width）；
   窄屏下重排栅格与表单、放大触控目标、宽表父容器横向滚动。
   ============================================================ */
img, canvas { max-width: 100%; height: auto; }

/* 显式横向滚动容器：需要让某张表在窄屏滚动时，用 <div class="tbl-scroll"> 包裹 */
.tbl-scroll {
    width: 100%; max-width: 100%;
    overflow-x: auto; -webkit-overflow-scrolling: touch;
}

/* 各数据表所在的“卡片正文”作为横向滚动容器，避免整页出现横向滚动条 */
.form-sec > .body,
.detail-sec > .body,
.dept-sec > .body { overflow-x: auto; -webkit-overflow-scrolling: touch; }

/* 多列数据表：窄屏给最小宽度，由父容器横向滚动（不挤压、不溢出整页） */
@media (max-width: 820px) {
    table.list       { min-width: 760px; }
    table.rows-table { min-width: 720px; }
    table.user-table { min-width: 620px; }
    /* 表头不换行：列宽由内容撑开，靠横向滚动而不是逐字折行 */
    table.list th, table.rows-table th, table.user-table th { white-space: nowrap; }
    /* 单元格内中文不逐字断行（长文本列自然撑宽，由滚动容器消化） */
    table.list td { word-break: keep-all; }
}

/* 通用按钮：统一为可居中的内联弹性按钮，触控高度 ≥ 38px（桌面鼠标也好点） */
.btn {
    min-height: 38px;
    display: inline-flex; align-items: center; justify-content: center;
}
/* 小号按钮保持紧凑（列表操作列等），窄屏再放大 */
.btn-sm { min-height: 28px; }

/* ---------- 平板及以下：开始重排 ---------- */
@media (max-width: 768px) {
    body { padding: 14px 0 40px; font-size: 15px; }

    .paper { padding: 18px 14px 26px; }

    .doc-title { font-size: 19px; letter-spacing: 2px; margin-bottom: 12px; }

    /* 顶部导航：品牌整行，菜单链接一行等分（3 个各 1/3） */
    .topnav { flex-wrap: wrap; gap: 8px 10px; }
    .topnav .brand { font-size: 16px; width: 100%; }
    .topnav nav {
        width: 100%; display: flex; flex-wrap: nowrap; gap: 4px;
        margin: 2px 0;
    }
    .topnav nav a {
        flex: 1 1 0; min-width: 0; text-align: center; margin-left: 0;
        padding: 10px 4px; font-size: 13.5px;
        white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
    }
    .topnav-user { width: 100%; flex-wrap: wrap; gap: 6px; justify-content: flex-start; }

    /* 工具栏：搜索框整行、按钮换行 */
    .toolbar { flex-wrap: wrap; gap: 10px; }
    .toolbar .search { flex: 1 1 100%; flex-wrap: wrap; }
    .toolbar .search input[type=text],
    .toolbar .search input[type=date],
    .toolbar .search select { flex: 1 1 auto; min-width: 0; }
    .toolbar .search input[type=text] { width: auto; }
    .toolbar > a, .toolbar > div { flex: 1 1 auto; }

    /* 表单：两列变单列、标签上置、输入框加高（触控友好） */
    .form-card { padding: 16px 14px 22px; }
    .form-sec > .body { padding: 12px 12px; }
    .grid2 { grid-template-columns: 1fr; gap: 10px 0; }
    .field { flex-direction: column; align-items: stretch; gap: 4px; }
    .field label { width: auto; text-align: left; padding: 0 0 2px; }
    .field input, .field select { height: 42px; font-size: 15px; width: 100%; }
    /* textarea 高度由 JS autoResize 控制，移动端同样不能用固定 height 覆盖 */
    .field textarea { font-size: 15px; width: 100%; min-height: 46px; box-sizing: border-box; min-width: 0; }
    /* 各部门说明区（.field-stacked）：移动端收窄内边距、textarea 宽度撑满且不溢出 */
    .field-stacked { padding: 6px; border-radius: 4px; width: 100%; box-sizing: border-box; min-width: 0; }
    .field-stacked textarea { width: 100% !important; box-sizing: border-box; min-width: 0; font-size: 14px; padding: 8px 10px; flex: none; }

    /* 两列表（basic / kv）：窄屏缩小标签列并允许折行 */
    table.basic td.label { width: auto; min-width: 84px; white-space: normal; padding: 8px 8px; }
    table.kv td.k { width: auto; min-width: 84px; padding: 8px 8px; }
    table.eo td, table.eo th,
    table.basic td, table.kv td { padding: 7px 8px; font-size: 13px; }

    /* 按钮：触控目标 ≥ 42px（主操作按钮） */
    .btn { min-height: 42px; font-size: 15px; padding: 9px 18px; }
    .btn-sm { min-height: 34px; padding: 5px 12px; }

    /* 搜索 / 提交类按钮：与输入框等高、紧凑，不与主操作按钮抢视觉 */
    form.search .btn,
    .view-toolbar form .btn,
    button.btn[type=submit] {
        min-height: 36px; font-size: 14px; padding: 4px 16px; white-space: nowrap;
    }
    form.search input[type=text],
    form.search input[type=date],
    form.search select { height: 36px; }
    /* 表格操作列的小按钮：保持紧凑、不换行，避免“查看”竖排折行 */
    .list .btn, .list .btn-sm, .rows-table .btn, .rows-table .btn-sm {
        min-height: 32px; font-size: 13.5px; padding: 4px 12px; white-space: nowrap;
    }
    /* 状态列等短文本不逐字竖排 */
    .list td span, .list td em { word-break: keep-all; }

    /* 签署行：换行排布 */
    .sign-row { flex-wrap: wrap; gap: 10px 18px; font-size: 14px; }
    .sign-row .sign { min-width: 0; flex: 1 1 40%; }

    /* 快捷语句按钮放大一点，方便手指点；移动端限制最大宽度，文字超长用省略号截断 */
    .qk-btn { padding: 6px 10px; font-size: 13px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }

    /* 可增删行删除叉：放大触控目标 */
    .del-x { width: 32px; height: 32px; line-height: 30px; font-size: 22px; }

    /* 详情页操作按钮换行铺满 */
    .detail-actions { flex-wrap: wrap; gap: 8px; }
    .detail-actions .btn { flex: 1 1 auto; }

    /* 登录页兜底二维码框不溢出 */
    #ww_login_fb { width: 100% !important; max-width: 100%; }
}

/* ---------- 小屏手机：进一步收紧 ---------- */
@media (max-width: 480px) {
    body { font-size: 14.5px; }
    .paper { padding: 14px 10px 20px; }
    .doc-title { font-size: 17px; letter-spacing: 1px; }
    .field input, .field select { height: 44px; }
    /* textarea 高度由 JS 控制，不用固定 height */
    .field textarea { font-size: 14px; min-height: 44px; }
    .field-stacked { padding: 4px; border-radius: 3px; width: 100%; box-sizing: border-box; min-width: 0; }
    .field-stacked textarea { width: 100% !important; box-sizing: border-box; min-width: 0; font-size: 13px; padding: 6px 8px; flex: none; }
    .btn { min-height: 44px; }
    /* 搜索按钮在小屏也不要臃肿 */
    form.search .btn,
    .view-toolbar form .btn,
    button.btn[type=submit] { min-height: 38px; padding: 4px 14px; font-size: 13.5px; }
    .topnav nav a { padding: 11px 2px; font-size: 13px; }
    .form-sec > h3 { letter-spacing: 1px; padding: 8px 10px; }
    /* 小屏快捷按钮：更紧凑，文字超长截断 */
    .qk-btn { padding: 5px 8px; font-size: 12px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
}

/* ========== 财务消费审计 ========== */
.audit-switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; margin-left: 12px; font-weight: normal; vertical-align: middle; }
.audit-switch input { display: none; }
.audit-slider { width: 40px; height: 22px; background: #c8ccd4; border-radius: 11px; position: relative; transition: background .2s; flex: 0 0 auto; }
.audit-slider::after { content: ''; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; background: #fff; border-radius: 50%; transition: left .2s; box-shadow: 0 1px 3px rgba(0,0,0,.25); }
.audit-switch input:checked + .audit-slider { background: #15a34a; }
.audit-switch input:checked + .audit-slider::after { left: 20px; }
.audit-switch-txt { font-size: 13px; color: #555; white-space: nowrap; }
/* 完成状态行：避免嵌套 label 被 .field label 的 92px 宽度挤压导致文字竖排 */
.field .audit-switch { width: auto; flex: 0 0 auto; padding-right: 0; margin-left: 0; white-space: nowrap; }
.audit-complete-field { align-items: center; }
.audit-complete-ctrl { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; min-width: 0; flex: 1 1 auto; }
.audit-complete-hint { font-size: 12px; color: #999; line-height: 1.6; }
.audit-blk { border: 1px solid #dce4ee; border-radius: 8px; padding: 12px 14px; margin-bottom: 14px; background: #fff; }
.audit-blk-title { font-weight: bold; color: #1f7ad9; border-left: 4px solid #1f7ad9; padding-left: 8px; margin-bottom: 10px; font-size: 14px; }
.audit-item-tbl input, .audit-item-tbl select {
    width: 100%; box-sizing: border-box;
    border: 1px solid #d6dde8; border-radius: 4px;
    padding: 6px 10px; font-size: 14px; font-family: inherit;
    background: #fff; color: #222;
    transition: border-color .18s, box-shadow .18s;
}
.audit-item-tbl input[type=date] { min-height: 34px; }
.audit-item-tbl input:focus, .audit-item-tbl select:focus {
    outline: none; border-color: #1f7ad9;
    box-shadow: 0 0 0 3px rgba(31,122,217,.12);
}
.audit-item-tbl select { text-align: center; cursor: pointer; appearance: auto; }
.audit-item-tbl input[type=number] { text-align: right; }
/* 手机端：消费统计表不挤压，改为横向滚动（列宽可用） */
.audit-item-tbl { min-width: 560px; }
.audit-item-tbl thead th {
    background: linear-gradient(180deg, #f4f8fd 0%, #eaf1f9 100%);
    color: #1f2a44; font-weight: 600; letter-spacing: .5px;
    border-bottom: 2px solid #d6dde8;
}
.audit-item-tbl tbody tr:hover { background: #f7fafe; }
.audit-amt-cell { text-align: right; font-weight: 700; color: #1f7ad9; white-space: nowrap; font-variant-numeric: tabular-nums; }
.audit-sum-row { display: flex; justify-content: space-between; align-items: center; border-top: 2px dashed #f0c674; margin-top: 14px; padding: 12px 4px 0; font-size: 15px; }
.audit-sum-row b {
    color: #fff; background: linear-gradient(135deg, #f5a623 0%, #e8940a 100%);
    font-size: 18px; padding: 3px 14px; border-radius: 999px;
    box-shadow: 0 2px 6px rgba(232,148,10,.3);
    font-variant-numeric: tabular-nums;
}
.audit-income {
    background: linear-gradient(135deg, #fff8ea 0%, #fff1d4 100%);
    border: 1px solid #f0d9a6; border-radius: 10px; padding: 12px 16px; margin-top: 12px;
    box-shadow: 0 1px 4px rgba(240,217,166,.2);
}
.audit-income .lab { font-size: 13px; color: #7a5a00; letter-spacing: .5px; }
.audit-income .val {
    font-size: 26px; font-weight: 800; color: #e8940a; margin-top: 4px;
    font-variant-numeric: tabular-nums; letter-spacing: .5px;
}
.audit-hint { font-size: 12px; color: #999; margin-top: 8px; line-height: 1.6; }

/* ===== 消费类型标注（详情页金额后） ===== */
.item-tag-inline { display: inline-block; margin-left: 6px; vertical-align: middle; }
.item-tag-sel {
    font-size: 12px; height: 26px; padding: 0 4px; max-width: 108px;
    border: 1px solid #a9c6ee; border-radius: 4px; background: #f4f9ff; color: #1f6fd0;
    cursor: pointer; font-family: inherit;
}
.item-tag-sel:focus { outline: none; border-color: #1f7ad9; box-shadow: 0 0 0 3px rgba(31,122,217,.12); }
.item-tag-ro {
    display: inline-block; font-size: 12px; color: #1f6fd0; background: #eaf3ff;
    border: 1px solid #cfe0f8; border-radius: 999px; padding: 2px 8px; white-space: nowrap;
}
/* 由 EO 单明细自动生成的消费统计行：只读、淡蓝底 */
.audit-auto-row { background: #f6faff; }
.audit-auto-row input, .audit-auto-row select { color: #5b7089; background: #f2f6fb; }
.audit-auto-tag {
    display: inline-block; margin-left: 5px; font-size: 11px; line-height: 1.4;
    color: #1f6fd0; background: #e8f2ff; border: 1px solid #cfe0f8;
    border-radius: 4px; padding: 1px 5px; white-space: nowrap; cursor: help;
}
/* 按消费类型自动统计 */
.audit-type-sum {
    margin-top: 14px; border: 1px solid #dbe6f5; border-radius: 10px;
    background: linear-gradient(180deg, #fbfdff 0%, #f4f8fd 100%); padding: 12px 16px 10px;
}
.audit-type-sum-title {
    font-size: 13px; font-weight: 700; color: #1f4e8c; letter-spacing: .5px;
    padding-left: 9px; border-left: 3px solid #1f7ad9; margin-bottom: 10px;
}
.audit-type-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.audit-type-item {
    background: #fff; border: 1px solid #e3ebf6; border-radius: 8px;
    padding: 8px 10px; text-align: center; box-shadow: 0 1px 3px rgba(31,78,140,.05);
}
.audit-type-item .t-lab { display: block; font-size: 12px; color: #6b7f99; margin-bottom: 4px; }
.audit-type-item .t-val {
    display: block; font-size: 16px; font-weight: 800; color: #1f6fd0;
    font-variant-numeric: tabular-nums; letter-spacing: .3px;
}
.audit-type-foot {
    text-align: right; font-size: 13px; color: #6b7f99; margin-top: 10px;
    padding-top: 8px; border-top: 1px dashed #d6e2f2;
}
.audit-type-foot b { color: #e8940a; font-size: 17px; margin-left: 8px; font-variant-numeric: tabular-nums; }
@media (max-width: 780px) {
    .audit-type-grid { grid-template-columns: repeat(2, 1fr); }
}
.audit-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; }
.audit-grid2 .field { margin: 0; }
/* 终账信息：期限/已付/结账状态/开票情况 一行四列；结账方式单独一行不换行 */
.audit-grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px 18px; }
.audit-grid4 .field { margin: 0; }
.audit-chk-group { display: flex; flex-wrap: wrap; gap: 6px 14px; padding: 8px 0 2px; }
.audit-chk-nowrap { flex-wrap: nowrap; }
.audit-remark {
    width: 100%; min-height: 140px; box-sizing: border-box; resize: vertical;
    line-height: 1.7; padding: 12px 14px; font-size: 14px; font-family: inherit;
    border: 1px solid #d6dde8; border-radius: 6px; background: #fff; color: #222;
    transition: border-color .18s, box-shadow .18s;
}
.audit-remark:focus {
    outline: none; border-color: #1f7ad9;
    box-shadow: 0 0 0 3px rgba(31,122,217,.12);
}
.audit-remark::placeholder { color: #bbb; }
.audit-grid4 .field input, .audit-grid4 .field select,
.audit-grid2 .field input, .audit-grid2 .field select {
    border-radius: 6px; transition: border-color .18s, box-shadow .18s;
}
.audit-grid4 .field input:focus, .audit-grid4 .field select:focus,
.audit-grid2 .field input:focus, .audit-grid2 .field select:focus {
    outline: none; border-color: #1f7ad9;
    box-shadow: 0 0 0 3px rgba(31,122,217,.12);
}
.audit-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #444; white-space: nowrap; cursor: pointer; }
.audit-file-tip { font-size: 12px; color: #a35e00; background: #fff4e0; border: 1px solid #f3d9a8; border-radius: 6px; padding: 8px 10px; margin-bottom: 10px; line-height: 1.7; }
.audit-file-list { margin-top: 10px; }
.audit-file-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid #dce4ee; border-radius: 8px; margin-bottom: 6px; background: #f7fafe; }
.audit-file-row .f-ic { flex: 0 0 auto; }
.audit-file-row .f-name { flex: 1 1 auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: #333; }
.audit-file-row .f-size { flex: 0 0 auto; font-size: 12px; color: #999; }
.audit-file-row .f-op { flex: 0 0 auto; font-size: 12px; color: #1f7ad9; text-decoration: underline; }
.audit-file-row .f-op.f-del { color: #e0245e; }
.audit-up-msg { font-size: 13px; margin-top: 6px; min-height: 18px; }
/* 审计区标题栏：渐变蓝底 + 圆角徽章，与系统主色一致，去掉生硬的左边硬条 */
.audit-sec { background: #fff; border: 1px solid #d6dde8; border-radius: 10px; box-shadow: 0 2px 12px rgba(31,42,68,.07); }
.audit-sec > h3 {
    background: linear-gradient(135deg, #2b8af0 0%, #1f6fd0 100%);
    color: #fff; font-size: 14px; font-weight: normal; letter-spacing: 2px;
    padding: 10px 18px; margin: 0; box-shadow: 0 1px 4px rgba(31,122,217,.25);
    display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
    border-radius: 10px 10px 0 0;
}
.audit-sec > h3 .audit-sec-title {
    font-weight: 600; font-size: 15px; letter-spacing: 3px;
    background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.28);
    padding: 2px 12px; border-radius: 999px;
}
.audit-sec > h3 .audit-sec-hint {
    font-size: 12px; font-weight: normal; color: #fff; opacity: .92;
    background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.22);
    padding: 3px 12px; border-radius: 999px; letter-spacing: .3px;
}
.audit-sec > h3 .audit-sec-hint.on { background: rgba(255,255,255,.24); border-color: rgba(255,255,255,.32); }
.audit-sec > .body { padding: 16px 18px; background: #fff; border-radius: 0 0 10px 10px; }
@media (max-width: 768px) {
    .audit-grid2 { grid-template-columns: 1fr; }
    /* !important 用于压过容器上的内联四列样式（防缓存兜底），手机端降两列、勾选恢复换行 */
    .audit-grid4 { grid-template-columns: 1fr 1fr !important; }
    .audit-chk-nowrap { flex-wrap: wrap !important; }
    .audit-file-row { flex-wrap: wrap; }
    .audit-file-row .f-name { flex: 1 0 100%; }
    /* 基本信息 8 列表：窄屏降为两列标签-值堆叠，避免 8 列挤压不可用 */
    table.basic { display: block; overflow-x: auto; }
    table.basic thead, table.basic tbody { display: block; }
    table.basic tr { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; }
    table.basic td { border: none !important; }
    table.basic td.label { min-width: 0; }
}

/* ========== EO 单修改日志页 ========== */
.log-title { font-size: 16px; font-weight: 600; color: #1f2a44; }
.log-wrap { padding: 8px 14px 24px; max-width: 1100px; }
.log-group {
    border: 1px solid #e4eaf3; border-radius: 8px; background: #fff;
    margin-bottom: 12px; overflow: hidden; box-shadow: 0 1px 3px rgba(31,42,68,.05);
}
.log-group:first-child { margin-top: 8px; }
.log-head {
    display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
    background: #f4f7fb; border-bottom: 1px solid #e4eaf3;
    padding: 8px 14px; font-size: 13px;
}
.log-time { font-weight: 600; color: #1f2a44; }
.log-by { color: #5b6b85; }
.log-items { list-style: none; margin: 0; padding: 8px 14px; }
.log-items li { padding: 4px 0; line-height: 1.7; font-size: 14px; border-bottom: 1px dashed #eef1f6; }
.log-items li:last-child { border-bottom: none; }
.log-field { font-weight: 600; color: #1f2a44; }
.log-colon { color: #888; }
.log-old { color: #b9740a; text-decoration: line-through; text-decoration-color: rgba(185,116,10,.4); }
.log-arrow { color: #888; margin: 0 2px; }
.log-new { color: #15a34a; font-weight: 500; }
.log-create { color: #2b8af0; font-weight: 500; }
.log-add { color: #15a34a; font-weight: 500; }
.log-del { color: #d9480f; font-weight: 500; }
@media (max-width: 768px) {
    .log-head { gap: 10px; padding: 7px 10px; }
    .log-wrap { padding: 6px 8px 20px; }
    .log-items { padding: 6px 10px; }
    .log-items li { font-size: 13px; line-height: 1.65; word-break: break-all; }
}

/* 付款方式多选标签（checkbox 组）—— 兼容 Chrome 87 等旧内核 */
.pay-method-box { display:inline-flex; flex-wrap:wrap; gap:6px; align-items:center; }
.pm-chip {
    display:inline-flex; align-items:center; gap:3px;
    padding:3px 7px; border:1px solid #d6dde8; border-radius:12px;
    background:#fff; color:#39435a; font-size:12px; cursor:pointer; user-select:none;
    white-space:nowrap; transition:background .15s, border-color .15s;
}
.pm-chip:hover { background:#f5f8fd; }
/* 选中高亮：新版走 :has()；旧版(Chrome<105 不支持 :has)由 JS 同步 .is-checked 兜底 */
.pm-chip:has(input:checked), .pm-chip.is-checked { background:#1f7ad9; border-color:#1f7ad9; color:#fff; }
/* ★ Chrome 87 下 checkbox 在 flex 容器里会被压扁到不可见：固定尺寸 + 禁止收缩 + 强制原生外观 */
.pm-chip input[type=checkbox] {
    -webkit-appearance: checkbox; appearance: checkbox;
    flex: none; width: 14px; height: 14px; margin: 0 3px 0 0; cursor: pointer;
}

/* ===== 自定义时间选择（替代原生 time picker，滚轮逐格、点击即选） ===== */
.tc-display {
    display: flex; align-items: center; justify-content: space-between; gap: 4px;
    width: 100%; height: 34px; padding: 0 9px; border: 1px solid #d6dde8;
    border-radius: 4px; font-size: 13.5px; font-family: inherit; background: #fff;
    cursor: pointer; line-height: 1; box-sizing: border-box;
}
.tc-display:hover { border-color: #9db8d8; }
.tc-text { flex: 1; text-align: left; color: #1f2a44; white-space: nowrap; }
.tc-text.ph { color: #9aa4b2; }
.tc-caret { color: #8a94a6; font-size: 12px; flex: none; }
.tc-edit {
    width: 74px; height: 26px; padding: 0 5px; border: 1px solid #1f7ad9; border-radius: 3px;
    font-size: 13px; font-family: inherit; outline: none; flex: 1;
}
.tc-panel {
    display: none; position: fixed; z-index: 10050; padding: 8px;
    background: #fff; border: 1px solid #c9d6e6; border-radius: 6px;
    box-shadow: 0 6px 20px rgba(31,42,68,.18);
}
.tc-cols { display: flex; align-items: stretch; gap: 4px; }
.tc-col {
    width: 52px; height: 210px; overflow-y: auto; border: 1px solid #e2e8f0;
    border-radius: 4px; background: #fafcff; scrollbar-width: thin;
    overscroll-behavior: contain; /* 时/分列滚到顶/底后不再把滚动传给整页 */
}
.tc-item { padding: 5px 0; text-align: center; font-size: 13px; color: #39435a; cursor: pointer; user-select: none; }
.tc-item:hover { background: #eef4fc; }
.tc-item.on { background: #1f7ad9; color: #fff; font-weight: 600; }
.tc-sep { align-self: center; font-size: 18px; color: #8a94a6; padding: 0 1px; }
.tc-foot { margin-top: 7px; text-align: right; }
.tc-clear {
    border: 1px solid #d6dde8; background: #fff; border-radius: 3px;
    padding: 3px 12px; font-size: 12px; color: #6b7688; cursor: pointer;
}
.tc-clear:hover { background: #f5f8fd; color: #39435a; }
