/* ==========================================
   配置管理页样式（沿用 debug.css / log.css 的设计语言）
   Bootstrap 5 打底，这里只补业务组件
   ========================================== */

/* 标题：左边框特色，与 debug 页一致 */
h1 {
    margin: 6px 0 18px 0; color: #111827; font-size: 1.25rem; font-weight: 700;
    border-left: 4px solid #3b82f6; padding-left: 10px;
    display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
}
h1 .sub { font-size: .78rem; font-weight: 400; color: #6b7280; }

/* 统计卡 */
.stat-panel {
    background: #fff; border-radius: 12px; padding: 14px 16px;
    box-shadow: 0 1px 3px rgba(0,0,0,.08); height: 100%;
}
.stat-panel .k { font-size: .75rem; color: #6b7280; }
.stat-panel .v { font-size: 1.6rem; font-weight: 700; line-height: 1.2; margin-top: 2px; }
.stat-panel .v small { font-size: .72rem; font-weight: 400; color: #6b7280; }
.stat-panel .m { font-size: .74rem; color: #6b7280; margin-top: 4px; }
.stat-panel .m b { font-weight: 700; }

/* 厂区切换 tab（与 debug.css 一致） */
.tabs { display: flex; gap: 8px; margin-bottom: 16px; position: sticky; top: 0; z-index: 100; background: #f3f4f6; padding: 10px 0; }
.tab { flex: 1; text-align: center; padding: 11px 0; background: #e5e7eb; border-radius: 8px; color: #374151; font-weight: 700; cursor: pointer; transition: .2s; border: none; font-size: .88rem; }
.tab.active { background: #3b82f6; color: #fff; box-shadow: 0 2px 4px rgba(59,130,246,.3); }

/* 面板（避开 Bootstrap 的 .card） */
.panel { background: #fff; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.1); margin-bottom: 18px; overflow: hidden; }
.panel-head { padding: 12px 16px; border-bottom: 1px solid #e5e7eb; display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: .92rem; }
.panel-head .sub {
    font-weight: 400; font-size: .74rem; color: #6b7280;
    flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* 折叠用的面板头：本质是一个按钮，别让它长得像按钮 */
.panel-toggle {
    width: 100%;
    background: #fff;
    border: 0;
    border-bottom: 1px solid #e5e7eb;
    color: inherit;
    font: inherit;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
    transition: background .15s ease-out, border-color .15s ease-out;
}
.panel-toggle:hover { background: #fafbfc; }
.panel-toggle:focus-visible { outline: 2px solid #3b82f6; outline-offset: -2px; }
.panel-toggle[aria-expanded="false"] { border-bottom-color: transparent; }

.panel-head .ph-count {
    margin-left: auto; flex: 0 0 auto;
    font-size: .72rem; font-weight: 500; color: #4b5563;
    background: #f1f5f9; border-radius: 999px; padding: 2px 8px;
}
.panel-head .ph-chev {
    flex: 0 0 auto; width: 7px; height: 7px; margin: 0 2px 2px 2px;
    border-right: 1.6px solid #9aa3af; border-bottom: 1.6px solid #9aa3af;
    transform: rotate(-45deg);               /* 收起：指向右 */
    transition: transform .18s ease-out, margin .18s ease-out;
}
.panel-toggle[aria-expanded="true"] .ph-chev { transform: rotate(45deg); margin-bottom: -2px; }

@media (prefers-reduced-motion: reduce) {
    .panel-toggle, .panel-head .ph-chev { transition: none; }
}
.panel-body { padding: 0; }

/* 表格 */
.adm-scroll { max-height: calc(100vh - 320px); overflow: auto; }
.adm-scroll-sm { max-height: 240px; overflow: auto; }
.adm-table { width: 100%; border-collapse: collapse; min-width: 720px; }
.adm-table th {
    position: sticky; top: 0; z-index: 2; background: #fafbfc;
    text-align: left; font-size: .74rem; font-weight: 700; color: #6b7280;
    padding: 9px 14px; border-bottom: 1px solid #e5e7eb; white-space: nowrap;
}
.adm-table td { padding: 9px 14px; border-bottom: 1px solid #f1f2f4; vertical-align: middle; font-size: .84rem; }
.adm-table tbody tr { transition: background .12s; }
.adm-table tbody tr:hover td { background: #fafbff; }
/* 没开「访客通查询」的行：只把身份信息调浅，不要整行调透明度
   —— 45% 透明度的勾选框 / 开关 / 按钮看起来就是"禁用"，
      人根本不敢点。状态已经由那个开关自己表达清楚了 */
.adm-table tr.off td.nm { color: #9ca3af; }
.adm-table tr.off td.mono { color: #c3c9d2; }
.nm { font-weight: 700; color: #111827; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: .76rem; color: #6b7280; letter-spacing: .2px; }

/* 徽章（与 log-badge 同风格） */
.pill { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .7rem; font-weight: 700; white-space: nowrap; }
.pill-blue { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }
.pill-gray { background: #f3f4f6; color: #4b5563; border: 1px solid #e5e7eb; }
.pill-green { background: #d1fae5; color: #065f46; border: 1px solid #a7f3d0; }
.pill-amber { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; }

/* 可点编辑 */
.edit { cursor: pointer; border-bottom: 1px dashed #cbd5e1; }
.edit:hover { color: #2563eb; border-bottom-color: #2563eb; }

/* 行内下拉 */
.adm-sel { border: 1px solid #e5e7eb; border-radius: 7px; padding: 4px 8px; font-size: .78rem; background: #fff; max-width: 160px; }
.adm-sel:focus { border-color: #3b82f6; outline: none; box-shadow: 0 0 0 2px rgba(59,130,246,.15); }

/* 搜索框 */
.adm-search { max-width: 300px; border-radius: 9px; font-size: .84rem; }

/* 空状态 */
.adm-empty { padding: 36px; text-align: center; color: #9ca3af; font-size: .84rem; }


/* ==========================================
   手机适配：表格在窄屏变成卡片，不再横向滚动
   ========================================== */
@media (max-width: 720px) {
    .wrap, .container { padding-left: 10px; padding-right: 10px; }
    h1 { font-size: 1.05rem; margin: 4px 0 12px; }
    .tabs { gap: 6px; padding: 8px 0; }
    .tab { padding: 9px 0; font-size: .82rem; }
    .stat-panel { padding: 11px 12px; }
    .stat-panel .v { font-size: 1.35rem; }
    .panel { border-radius: 10px; margin-bottom: 12px; }
    .panel-head { padding: 10px 12px; font-size: .86rem; }
    .adm-scroll, .adm-scroll-sm { max-height: none; overflow: visible; }
    .hide-sm { display: none !important; }

    /* 表格 → 卡片 */
    .adm-table { min-width: 0; display: block; }
    .adm-table thead { display: none; }
    .adm-table tbody { display: block; }
    .adm-table tr {
        display: block; border: 1px solid #e5e7eb; border-radius: 10px;
        margin: 8px 10px; padding: 6px 0; background: #fff;
    }
    .adm-table tr:hover td { background: transparent; }
    .adm-table td {
        display: flex; align-items: center; justify-content: space-between;
        gap: 10px; border: 0; padding: 5px 12px; font-size: .84rem;
        white-space: normal; word-break: break-all;
    }
    .adm-table td::before {
        content: attr(data-label);
        flex: 0 0 auto; color: #9ca3af; font-size: .72rem; font-weight: 400;
    }
    .adm-table td:not([data-label])::before { content: none; }
    .adm-table td.nm { font-size: .95rem; }
    .adm-table td[data-label="由谁接"] { display: block; }
    .adm-table td[data-label="由谁接"]::before { display: block; margin-bottom: 4px; }
    .adm-table td[data-label="访客通查询"],
.adm-table td[data-label="自动续期"] { justify-content: flex-end; }
    .adm-sel { max-width: none; width: 100%; }
    /* 姓名这一格是 flex + space-between：勾选框会飘到中间。
       给个 margin-left:auto，让它贴着右边的姓名，读起来是一组 */
    .adm-table td.nm .row-pick { margin-left: auto; }

    /* 弹层在手机上铺满 */
    .modal-dialog { margin: 8px; max-width: none; }
    .mobile-fullscreen .modal-dialog { height: calc(100% - 16px); }
}

/* 密码门：横幅下面的一张卡片，不占整屏、不挡页面 */
#gate { margin: 26px auto 0; }

.gate-box {
    max-width: 560px; margin: 0 auto;
    background: #fff; border: 1px solid #e7e9ee; border-radius: 14px;
    padding: 18px 18px 14px;
}
.gate-hd { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.gate-lock { font-size: 1.3rem; line-height: 1.25; }
.gate-hd-t { min-width: 0; }
.gate-box h5 { margin: 0 0 3px; font-size: .96rem; font-weight: 700; color: #111827; }
.gate-tip { color: #6b7280; font-size: .78rem; margin: 0; line-height: 1.6; }

.gate-row { display: flex; gap: 8px; }
.gate-row .form-control { flex: 1 1 auto; min-width: 0; }
.gate-row .btn { flex: 0 0 auto; padding: 0 20px; }

.gate-err { color: #dc2626; font-size: .76rem; min-height: 18px; margin-top: 6px; }

/* 确认层永远最上面：它经常叠在「开单」「体检」弹层之上 */
#askDlg { z-index: 1085; }

/* 删除按钮 */
.del-btn { cursor: pointer; opacity: .35; font-size: .95rem; }
.del-btn:hover { opacity: 1; }

/* ==========================================
   加载态：骨架屏 + 顶部细进度条
   内部工具每天开几十次，加载态要"安静"：
   焦点只留一个（顶部进度条），骨架只做一道同步扫光，
   内容到位一次性淡入，不做逐块上浮。
   ========================================== */

/* 顶部不确定进度条 */
.adm-progress {
    position: fixed; top: 0; left: 0; right: 0; height: 2px;
    overflow: hidden; opacity: 0; z-index: 2005; pointer-events: none;
    transition: opacity .18s ease;
}
.adm-progress.on { opacity: 1; }
.adm-progress i {
    display: block; height: 100%; width: 36%; border-radius: 0 2px 2px 0;
    background: linear-gradient(90deg, rgba(59,130,246,.12), #3b82f6 55%, #93c5fd);
    animation: admBar 1.25s cubic-bezier(.45,.05,.35,.95) infinite;
}
@keyframes admBar {
    0%   { transform: translateX(-115%); }
    100% { transform: translateX(315%); }
}

/* 骨架块：同周期同相位，看起来像一道光横过整页 */
.sk {
    position: relative; overflow: hidden;
    background: #e6ebf2; border-radius: 8px;
}
.sk::after {
    content: ""; position: absolute; inset: 0; transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, rgba(255,255,255,.72), transparent);
    animation: admSweep 1.45s ease-in-out infinite;
}
@keyframes admSweep { 100% { transform: translateX(100%); } }

.sk-card   { height: 100px; border-radius: 12px; }
.sk-pill   { height: 43px; flex: 1; border-radius: 8px; }
.sk-avatar { width: 30px; height: 30px; border-radius: 999px; flex: none; }
.sk-cell   { height: 11px; border-radius: 6px; }
.sk-switch { width: 36px; height: 19px; border-radius: 999px; }
.sk-dot    { width: 16px !important; height: 16px !important; max-width: 16px !important; border-radius: 4px; margin: 0 auto; }

/* 内容到位：一次性淡入 */
.adm-fade { animation: admFade .24s ease-out both; }
@keyframes admFade { from { opacity: 0; } to { opacity: 1; } }

/* 错误态 */
.adm-err-title { color: #dc2626; font-weight: 700; margin-bottom: 6px; }
.adm-err-msg   { color: #6b7280; font-size: .82rem; margin-bottom: 12px; word-break: break-all; }

/* 手机上表格是"卡片 + 标签行"布局，骨架条也要跟着变成整行宽，否则看起来是一堆碎点 */
@media (max-width: 720px) {
    .sk-cell { width: 100% !important; max-width: 150px; height: 10px; }
    .sk-switch { margin: 0 0 0 auto !important; }
    .sk-card { height: 107px; }
}

@media (prefers-reduced-motion: reduce) {
    .adm-progress i, .sk::after { animation: none; }
    .adm-fade { animation: none; }
}

/* ==========================================
   查看人员档案（👁 按钮 + 档案弹层）
   只读视图：资料、开关、由谁接、照片附件、原始字段
   ========================================== */

/* 操作列的小图标按钮：和删除按钮同一套"低调到悬停才显影"的规则 */
.info-btn { cursor: pointer; opacity: .62; font-size: .95rem; margin-right: 8px; transition: opacity .12s, transform .12s; }
.info-btn:hover { opacity: 1; transform: scale(1.12); }

/* 基本信息：两列键值 */
.info-rows {
    display: grid; grid-template-columns: 1fr 1fr; gap: 10px 16px;
    padding: 12px 14px; background: #f8fafc;
    border: 1px solid #eef2f7; border-radius: 10px; margin-bottom: 16px;
}
.info-row { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.info-k { font-size: .7rem; color: #94a3b8; letter-spacing: .2px; }
.info-v { font-size: .84rem; font-weight: 600; color: #111827; word-break: break-all; }
.info-v.mono { font-family: ui-monospace, Consolas, monospace; font-weight: 500; font-size: .79rem; letter-spacing: .2px; }

.info-sec { margin-bottom: 15px; }
.info-h { font-size: .72rem; font-weight: 700; color: #64748b; letter-spacing: .4px; margin-bottom: 7px; }
.info-inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: .8rem; }
.info-tag { font-size: .78rem; color: #374151; }

/* 接待人明细 */
.info-rec {
    border: 1px solid #eef2f7; border-radius: 9px; padding: 9px 11px; margin-bottom: 7px;
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    font-size: .76rem; background: #fff;
}
.info-rec b { font-size: .85rem; color: #111827; }
.info-reason {
    flex: 1 0 100%; color: #6b7280; font-size: .76rem;
    padding-top: 5px; margin-top: 2px; border-top: 1px dashed #eef2f7;
}

/* 附件：图片能取到就显示缩略图，取不到退回 📄 */
.info-files { display: flex; gap: 9px; flex-wrap: wrap; }
.info-file {
    width: 128px; text-decoration: none; color: #374151;
    display: flex; flex-direction: column; gap: 5px; font-size: .7rem;
}
.info-file:hover { color: #2563eb; }
.info-thumb {
    position: relative; width: 128px; height: 88px; border-radius: 8px;
    background: #f1f5f9; border: 1px solid #e8eef6; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
}
.info-thumb::before { content: "📄"; font-size: 1.3rem; position: absolute; opacity: .45; }
/* contain 而不是 cover：证件照/社保单不能被裁掉边角，要能看全 */
.info-thumb img { position: relative; width: 100%; height: 100%; object-fit: contain; background: #fff; }
/* 文件名一行放不下就折两行，别只剩 "mmexport175…" */
.info-file-nm {
    line-height: 1.25; max-height: 2.5em; overflow: hidden;
    display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
    word-break: break-all;
}

/* 全部原始字段（默认收起） */
.info-details { border-top: 1px solid #eef2f7; padding-top: 10px; margin-bottom: 12px; }
.info-details summary { font-size: .76rem; color: #64748b; cursor: pointer; user-select: none; }
.info-details summary:hover { color: #2563eb; }
.info-tbl { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .76rem; }
.info-tbl td { padding: 5px 8px; border-bottom: 1px solid #f4f6f9; vertical-align: top; word-break: break-all; }
.info-tbl td:first-child { width: 118px; white-space: nowrap; color: #94a3b8; }
.info-tbl .info-files { gap: 6px; }
.info-tbl .info-file { width: 72px; }
.info-tbl .info-thumb { width: 72px; height: 52px; }

.info-src { font-size: .72rem; color: #94a3b8; border-top: 1px solid #eef2f7; padding-top: 10px; }

@media (max-width: 720px) {
    .info-rows { grid-template-columns: 1fr; gap: 8px; }
    .info-file { width: 88px; }
    .info-thumb { width: 88px; height: 64px; }
    .info-tbl td:first-child { width: 84px; white-space: normal; }
}

/* ==========================================
   开启自动续期：强制选日期开单
   ========================================== */
.renew-warn {
    background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412;
    border-radius: 9px; padding: 9px 12px; font-size: .8rem; margin-bottom: 14px;
}
.renew-warn b { color: #c2410c; }
.renew-hint {
    font-size: .74rem; color: #6b7280; line-height: 1.55; margin-top: 10px;
}
.renew-hint b { color: #b91c1c; }

@media (max-width: 720px) {
    .renew-warn { font-size: .78rem; padding: 8px 10px; }
}

/* ==========================================
   多选 + 批量开单
   ========================================== */

/* 行首勾选框：自己画，不用系统控件
   —— 系统 checkbox 是各平台自己画的一套图形：Android 上就是一整块
      圆角蓝底 + 粗白勾，跟这个页面的细线风格完全不是一路。
      这里做成 18px 圆角小方块，1.5px 细边框，
      勾是一根 2.2px 圆头线画的，只有选中才填色 */
.row-pick {
    -webkit-appearance: none; appearance: none;
    position: relative;
    flex: none;
    width: 18px; height: 18px;
    margin: 0 8px 0 0;
    border: 1.5px solid #94a3b8;
    border-radius: 5px;
    background: #fff center / 12px 12px no-repeat;
    cursor: pointer;
    vertical-align: -3px;
    touch-action: manipulation;
    transition: background-color .12s ease, border-color .12s ease, transform .12s ease;
}
/* 视觉只有 18px，手指头有 36px：四周多留一圈透明命中区，
   手机上不用瞄准，点到附近就算（不影响布局，绝对定位不占位） */
.row-pick::after {
    content: ""; position: absolute;
    inset: -9px -6px -9px -9px;
}
.row-pick:hover { border-color: #64748b; }
.row-pick:active { transform: scale(.92); }
.row-pick:focus-visible { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.18); }
.row-pick:checked {
    border-color: #2563eb;
    background-color: #2563eb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.6 8.7l3 3 5.8-6.4' fill='none' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@media (prefers-reduced-motion: reduce) {
    .row-pick, .row-pick:active { transition: none; transform: none; }
}

/* 批量操作条：只在有选中时出现 */
.bulk {
    display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
    background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 10px;
    padding: 9px 12px; margin-bottom: 14px;
}
.bulk-n { font-size: .84rem; font-weight: 700; color: #1d4ed8; margin-right: auto; }
.bulk .btn { border-radius: 7px; }

/* 弹层里的人员 chip */
.renew-people { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; max-height: 108px; overflow: auto; }
.renew-chip {
    display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: .74rem;
    background: #eff6ff; color: #1d4ed8; border: 1px solid #dbeafe; white-space: nowrap;
}
.renew-rule { font-size: .75rem; color: #6b7280; margin-bottom: 14px; line-height: 1.5; }
.renew-rule b { color: #b45309; }

/* 开单结果 */
.renew-res-head { border-radius: 9px; padding: 9px 12px; font-size: .82rem; font-weight: 700; margin-bottom: 12px; }
.renew-res-head.ok   { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.renew-res-head.warn { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.renew-res-head.bad  { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }

.renew-res { border: 1px solid #eef2f7; border-radius: 9px; padding: 9px 11px; margin-bottom: 8px; background: #fff; }
.renew-res.bad { border-color: #fecaca; background: #fffafa; }
.renew-res-top { display: flex; align-items: center; gap: 6px; font-size: .8rem; flex-wrap: wrap; }
.renew-res-top b { font-size: .85rem; color: #111827; }
.renew-res-tag {
    margin-left: auto; font-size: .7rem; font-weight: 700; padding: 1px 7px; border-radius: 5px;
    background: #d1fae5; color: #065f46;
}
.renew-res-tag.bad { background: #fee2e2; color: #991b1b; }
.renew-res-nm { font-size: .75rem; color: #6b7280; margin-top: 4px; word-break: break-all; }
.renew-res-msg { font-size: .74rem; color: #b91c1c; margin-top: 4px; word-break: break-all; }

@media (max-width: 720px) {
    .bulk { padding: 8px 10px; gap: 6px; }
    .bulk-n { flex: 1 0 100%; margin-bottom: 2px; }
    .bulk .btn { flex: 1; }
}


/* ==========================================================
   开单弹层：起止日期 + 单数估算 + 续期勾选
   ========================================================== */
.renew-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; margin-bottom: 8px; }
.renew-fld { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.renew-fld > span { font-size: .72rem; color: #6b7280; }
.renew-fld input { width: 100%; min-width: 0; }

.renew-plan {
    border: 1px solid #e5e7eb; border-radius: 9px; background: #f8fafc;
    padding: 9px 11px; font-size: .78rem; line-height: 1.55; color: #374151; margin-bottom: 10px;
}
.renew-plan b { font-weight: 700; }
.renew-plan .pk { color: #b45309; font-size: 1rem; }
.renew-plan.ok { border-color: #bfdbfe; background: #eff6ff; color: #1e3a8a; }
.renew-plan.ok .pk { color: #c2410c; }
.renew-plan.bad { border-color: #fecaca; background: #fef2f2; color: #991b1b; }
.renew-plan.loading { color: #6b7280; }
.renew-plan-sub { margin-top: 3px; font-size: .72rem; color: #64748b; word-break: break-all; }

.renew-chk { display: block; font-size: .8rem; color: #374151; margin: 0 0 10px; cursor: pointer; line-height: 1.6; }
.renew-chk input { margin-right: 6px; vertical-align: -2px; }
.renew-chk input:disabled { cursor: default; }
.renew-chk-tip { color: #6b7280; font-size: .72rem; }

/* ==========================================================
   访客通体检
   ========================================================== */
.adm-audit { white-space: nowrap; border-radius: 8px; }
.adm-hint { font-size: .78rem; }

.audit-loading { padding: 26px 4px 18px; text-align: center; }
.audit-loading-t { font-size: .9rem; font-weight: 650; color: #111827; }
.audit-loading-s { font-size: .76rem; color: #6b7280; margin-top: 5px; }
.audit-bar { height: 3px; border-radius: 3px; background: #eef2f7; overflow: hidden; margin: 18px auto 0; max-width: 320px; }
.audit-bar > i { display: block; height: 100%; width: 38%; border-radius: 3px; background: #3b82f6; animation: auditSlide 1.25s ease-in-out infinite; }
@keyframes auditSlide { 0% { transform: translateX(-100%); } 100% { transform: translateX(300%); } }
@media (prefers-reduced-motion: reduce) { .audit-bar > i { animation: none; width: 100%; opacity: .5; } }

.audit-head { display: flex; gap: 8px; margin-bottom: 10px; }
.audit-kpi {
    flex: 1 1 0; min-width: 0; border: 1px solid #eef2f7; border-radius: 9px; padding: 8px 10px; background: #fbfcfe;
}
.audit-kpi b { display: block; font-size: 1.25rem; line-height: 1.15; color: #111827; }
.audit-kpi span { font-size: .72rem; color: #6b7280; }
.audit-kpi.bad b { color: #b91c1c; }

.audit-note { font-size: .72rem; color: #6b7280; line-height: 1.6; margin-bottom: 10px; }

.audit-list { display: flex; flex-direction: column; gap: 5px; }
.audit-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr) auto;
    grid-template-areas: "pk nm st" ".  meta meta";
    gap: 1px 8px;
    padding: 8px 10px; margin: 0;
    border: 1px solid #eef2f7; border-radius: 9px; background: #fff;
    cursor: pointer; transition: border-color .15s ease-out, background .15s ease-out;
}
.audit-row:hover { border-color: #dbe3ef; background: #fcfdff; }
.audit-row.is-suggest { border-color: #fde2e2; background: #fffafa; }
.audit-row input { grid-area: pk; width: 16px; height: 16px; margin: 2px 0 0; accent-color: #dc2626; }
.audit-nm { grid-area: nm; font-size: .84rem; font-weight: 650; color: #111827; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-pill {
    grid-area: st; align-self: start; font-size: .7rem; padding: 2px 7px; border-radius: 999px; white-space: nowrap;
}
.audit-pill.bad { background: #fee2e2; color: #991b1b; }
.audit-pill.warn { background: #fef3c7; color: #92400e; }
.audit-pill.ok { background: #d1fae5; color: #065f46; }
.audit-pill.gray { background: #eef2f7; color: #4b5563; }
.audit-meta { grid-area: meta; font-size: .72rem; color: #6b7280; }
.audit-meta b.on { color: #059669; }
.audit-meta b.off { color: #9ca3af; }

.audit-empty { text-align: center; padding: 22px 10px; border: 1px dashed #e5e7eb; border-radius: 10px; color: #6b7280; font-size: .8rem; line-height: 1.7; }
.audit-empty b { display: block; color: #111827; font-size: .88rem; margin-bottom: 3px; }
.audit-empty.bad { border-color: #fecaca; background: #fffafa; color: #991b1b; }
.audit-empty.bad b { color: #991b1b; }
.audit-empty.ok { border-color: #d1fae5; background: #f7fdfa; }

.audit-foot-tip { font-size: .76rem; color: #6b7280; margin-right: auto; }

@media (max-width: 720px) {
    .adm-toolbar { gap: 6px !important; }
    .adm-search { flex: 1 1 100%; }
    .adm-audit { flex: 1 1 auto; }
    .adm-hint { flex: 1 1 100%; }
    .audit-head { gap: 6px; }
    .audit-kpi { padding: 7px 8px; }
    .audit-kpi b { font-size: 1.1rem; }
    .audit-kpi span { font-size: .68rem; }
    .renew-dates { grid-template-columns: 1fr 1fr; }
    .audit-foot-tip { flex: 1 0 100%; margin-bottom: 2px; }
}


/* 极窄屏：两个日期并排会把 "2026/11/28" 挤成省略号，改成上下 */
@media (max-width: 420px) {
    .renew-dates { grid-template-columns: 1fr; }
    .audit-head { flex-wrap: wrap; }
    .audit-kpi { flex: 1 1 120px; }
}

@media (max-width: 720px) {
    #gate { padding: 0 10px; margin-top: 16px; }
    .gate-box { padding: 16px 14px 12px; border-radius: 12px; }
    .gate-row { flex-direction: column; }
    .gate-row .form-control { font-size: 16px; min-height: 44px; }
    .gate-row .btn { width: 100%; min-height: 44px; }
}


/* ==========================================================
   逐张发包的进度台（开单弹层里，边发边显示）
   ========================================================== */
.run-box { border: 1px solid #e7e9ee; border-radius: 10px; padding: 12px; background: #fbfcfe; }
.run-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.run-title { font-size: .74rem; color: #6b7280; }
.run-count { font-size: .78rem; color: #4b5563; white-space: nowrap; }
.run-count b { font-size: 1.05rem; color: #1d4ed8; font-weight: 700; }
.run-sep { margin: 0 2px; color: #9ca3af; }

.run-bar { height: 6px; border-radius: 999px; background: #eef2f7; overflow: hidden; }
.run-bar i {
    display: block; height: 100%; width: 0; border-radius: 999px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    transition: width .3s ease-out;
}

.run-eta { font-size: .74rem; color: #6b7280; margin-top: 7px; }

.run-log { margin-top: 10px; max-height: 210px; overflow: auto; border-top: 1px dashed #e7e9ee; padding-top: 8px; }
.run-line { font-size: .76rem; line-height: 1.75; color: #374151; word-break: break-all; }
.run-line b { font-weight: 650; color: #111827; }
.run-line.bad { color: #991b1b; }
.run-line.bad b { color: #7f1d1d; }
.run-why { display: block; color: #b91c1c; font-size: .72rem; margin-left: 1.1em; }

.run-warn {
    margin-top: 10px; font-size: .72rem; line-height: 1.6;
    color: #b45309; background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 9px;
}

@media (prefers-reduced-motion: reduce) { .run-bar i { transition: none; } }
