/* ================= 通用 ================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: "Microsoft YaHei", "PingFang SC", sans-serif; }
a { color: #2f5597; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; border-radius: 6px; }
input, select, textarea { font-family: inherit; font-size: 14px; padding: 7px 10px; border: 1px solid #d0d5dd; border-radius: 6px; outline: none; }
input:focus, select:focus, textarea:focus { border-color: #2f5597; }
.btn { padding: 8px 16px; font-size: 14px; background: #2f5597; color: #fff; }
.btn:hover { background: #1e3f75; }
.btn.primary { background: #f59e0b; color: #1a1206; font-weight: 600; }
.btn.primary:hover { background: #d97706; }
.btn.ghost { background: #fff; color: #2f5597; border: 1px solid #2f5597; }
.btn.ghost:hover { background: #eef2fa; }
.btn.danger { background: #d92d20; }
.btn.small { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.card { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; padding: 18px; box-shadow: 0 1px 3px rgba(16,24,40,.06); }
.muted { color: #667085; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }

/* 弹窗 / 抽屉（浅色页面用） */
.overlay { position: fixed; inset: 0; background: rgba(16,24,40,.45); z-index: 100; display: flex; align-items: center; justify-content: center; }
.modal { background: #fff; border-radius: 12px; padding: 28px; width: min(960px, 94vw); max-height: 92vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.modal h3 { margin-bottom: 14px; font-size: 17px; }
.modal .close { float: right; background: none; font-size: 20px; color: #667085; }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th, table.data td { border-bottom: 1px solid #eef1f5; padding: 8px 10px; text-align: left; }
table.data th { background: #f8fafc; color: #475467; font-weight: 600; white-space: nowrap; }
table.data tr:hover td { background: #f8faff; }
.tag { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.high { background: #fee4e2; color: #b42318; border: 1px solid #f97066; }
.tag.mid { background: #fef0c7; color: #b54708; border: 1px solid #f79009; }
.tag.low { background: #dcfae6; color: #067647; border: 1px solid #12b76a; }
.tag.status-wait { background: #eff4ff; color: #3538cd; }
.tag.status-prod { background: #eef4ff; color: #1570ef; }
.tag.status-assy { background: #fdf2fa; color: #c11574; }
.tag.status-ship { background: #fff4e5; color: #b93815; }
.tag.status-done { background: #f2f4f7; color: #475467; }

/* ================= 看板大屏（深色） ================= */
body.screen { background: #0b1526; color: #e6edf7; overflow-x: hidden; }
.screen .header { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 24px; margin: 12px 24px 0; background: #fff; border: 1px solid #e4e7ec; border-radius: 12px; box-shadow: 0 3px 12px rgba(16,24,40,.10); }
.screen .title { font-size: 26px; font-weight: 800; letter-spacing: 2px; color: #ffd166; text-shadow: 0 0 18px rgba(255,209,102,.35); }
.screen .title .star { color: #ff6b6b; }
.screen .brand { display: flex; align-items: center; gap: 14px; }
.screen .brand-logo { width: 44px; height: 44px; border-radius: 10px; object-fit: contain; background: #fff; border: 1px solid #e4e7ec; flex: none; }
.screen .brand-text { display: flex; flex-direction: column; gap: 2px; }
.screen .brand-title { font-size: 18px; font-weight: 800; color: #1f2937; line-height: 1.25; }
.screen .brand-sub { font-size: 12px; color: #98a2b3; }
.screen .header-right { display: flex; gap: 10px; align-items: center; font-size: 13px; color: #475467; }
.screen .header-right button { background: #f2f4f7; color: #1f2937; padding: 6px 14px; font-size: 13px; border: 1px solid #e4e7ec; border-radius: 8px; cursor: pointer; }
.screen .header-right button:hover { background: #e7ebf1; }
.screen .header-right a.btnlink { background: #f2f4f7; color: #1f2937; padding: 7px 14px; font-size: 13px; border: 1px solid #e4e7ec; border-radius: 8px; text-decoration: none; }
.screen .header-right a.btnlink:hover { background: #e7ebf1; }

/* 看板头部时钟（正上方居中） */
.screen .header { position: relative; }
.screen .clock { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; align-items: baseline; gap: 12px; white-space: nowrap; user-select: none; }
.screen .clock .cdate { font-size: 15px; color: #1f2937; font-weight: 600; letter-spacing: .5px; }
.screen .clock .ctime { font-family: "DIN Alternate", Consolas, monospace; font-size: 22px; font-weight: 800; color: #1e3f75; }

/* 看板只读表格辅助：单号/链接按钮 */
table.orders td .orderno { font-family: Consolas, Menlo, monospace; color: #8ab4f8; font-weight: 700; letter-spacing: .3px; }
table.orders td a.btnparts { text-decoration: none; display: inline-block; }

.filterbar { display: flex; gap: 10px; padding: 14px 28px 0; flex-wrap: wrap; }
.filterbar .tab { padding: 6px 18px; border-radius: 999px; background: #14263f; color: #9fb3d1; font-size: 14px; cursor: pointer; border: 1px solid #1d3355; user-select: none; }
.filterbar .tab.active { background: #ffd166; color: #132238; font-weight: 700; border-color: #ffd166; }

.statgrid { display: flex; gap: 12px; padding: 6px 28px; flex-wrap: wrap; }
.stat { flex: 1; min-width: 130px; background: linear-gradient(135deg, #2563eb, #1d4ed8); border: 1px solid #1e40af; border-radius: 10px; padding: 8px 14px; position: relative; overflow: hidden; box-shadow: 0 3px 10px rgba(37,99,235,.25); transition: transform .18s ease, box-shadow .18s ease; }
.stat .label { font-size: 12px; color: #dbeafe; }
.stat .num { font-size: 24px; font-weight: 800; margin-top: 2px; font-family: "DIN Alternate", Consolas, monospace; color: #fff; }
.stat .unit { font-size: 11px; color: #dbeafe; margin-left: 3px; }
.stat.s-total { background: linear-gradient(135deg, #1e3a8a, #1e40af); border-color: #1e3a8a; }
.stat.s-model { background: linear-gradient(135deg, #2563eb, #3b82f6); }
.stat:hover { transform: translateY(-3px); box-shadow: 0 10px 26px rgba(37,99,235,.45); }
.stat::after { content: ""; position: absolute; right: -20px; top: -20px; width: 80px; height: 80px; border-radius: 50%; background: rgba(255,255,255,.08); }

/* 第一行：按机型小卡（背景色由后端按机型类别下发，统一白字保证对比度） */
.modelbar { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px 28px 0; align-items: center; }
.modelchip { border: 1px solid rgba(255,255,255,.25); color: #fff; border-radius: 18px; padding: 4px 10px; font-size: 12px; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, filter .15s ease; }
.modelchip:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(0,0,0,.3); filter: brightness(1.08); }
.modelchip.active { outline: 3px solid rgba(255,255,255,.92); outline-offset: -1px; box-shadow: 0 4px 14px rgba(0,0,0,.35); border-color: rgba(255,255,255,.85); }
.modelchip .cnt { color: rgba(255,255,255,.85); margin-left: 3px; font-weight: 400; }

/* 第二行大卡：点击筛选态 */
.stat.s0, .stat.s1, .stat.s2, .stat.s-ready { cursor: pointer; }
.stat.s0.active, .stat.s1.active, .stat.s2.active, .stat.s-ready.active { outline: 2px solid #5b9bff; outline-offset: 2px; }
/* 已完工待发货：醒目橙卡 */
.stat.s-ready { background: linear-gradient(135deg, #f97316, #ea580c); border-color: #c2410c; box-shadow: 0 4px 14px rgba(234,88,12,.30); }
.stat.s-ready .label, .stat.s-ready .unit { color: #ffedd5; }

/* 筛选提示 */
.filterhint { padding: 2px 28px 0; font-size: 11px; color: #9fb3d1; display: flex; align-items: center; gap: 8px; }
.filterhint b { color: #dbeafe; }
.filterhint .clearfilter { background: none; border: 1px solid #29466f; color: #c7d6ee; border-radius: 6px; padding: 3px 10px; cursor: pointer; font-size: 12px; }
.filterhint .clearfilter:hover { border-color: #f97066; color: #fca5a5; }

/* 看板搜索框（派工单号/项目/型号 实时过滤） */
.screen .searchbar { display: flex; align-items: center; gap: 6px; padding: 6px 28px 0; }
.screen .searchbar .searchicon { font-size: 13px; opacity: .8; }
.screen .searchbar .searchinput { flex: 1; max-width: 400px; padding: 5px 10px; font-size: 12px;
  color: #e6edf7; background: #13203a; border: 1px solid #2a3c5e; border-radius: 8px; outline: none; }
.screen .searchbar .searchinput::placeholder { color: #7e8aa3; }
.screen .searchbar .searchinput:focus { border-color: #3b82f6; }
.screen .searchbar .clearsearch { background: #1c2c4a; border: 1px solid #2a3c5e; color: #c7d6ee;
  border-radius: 8px; padding: 6px 11px; cursor: pointer; font-size: 13px; }
.screen .searchbar .clearsearch:hover { border-color: #f97066; color: #fca5a5; }

.orderwrap { padding: 2px 28px 10px; }
/* 派工单表格：浅色卡面 + 隔行底色（奇白 / 偶浅灰）+ 悬停浅蓝；文字同步转深色保证可读 */
table.orders { width: 100%; border-collapse: collapse; font-size: 13px; background: #fff; table-layout: fixed; }
table.orders th { text-align: left; padding: 6px 8px; color: #475467; background: #F1F5F9; border-bottom: 1px solid #e4e7ec; font-weight: 600; white-space: nowrap; font-size: 12px; }
table.orders td { padding: 5px 8px; border-bottom: 1px solid #eef1f5; color: #1f2937; white-space: nowrap; }
table.orders tbody tr:nth-child(odd)  { background: #FFFFFF; }
table.orders tbody tr:nth-child(even) { background: #EEF2F7; }
table.orders tbody tr:hover           { background: #E3F2FD; }
table.orders tr.row { cursor: default; }
.orderlink { color: #1565C0; cursor: pointer; font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.modellink { color: #1565C0; cursor: pointer; text-decoration: underline dotted; }
/* 浅底下的次要文字 */
table.orders td .dim, table.orders td .nocode { color: #667085; }
.prog { display: flex; align-items: center; gap: 8px; }
.prog .bar { width: 110px; height: 10px; background: #14263f; border-radius: 999px; overflow: hidden; }
.prog .bar i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #22d3ee, #4ade80); transition: width .5s; }
.prog span { font-family: Consolas, monospace; }
.statuscell { position: relative; }
.statuscell select { background: transparent; color: #e6edf7; border: 1px solid transparent; font-size: 15px; padding: 3px 4px; }
.statuscell select:hover, .statuscell select:focus { border-color: #29466f; background: #14263f; }
.statuscell select:disabled { color: #9fb3d1; }
.st { display: inline-block; padding: 3px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.st.st0 { background: rgba(138,180,248,.15); color: #8ab4f8; }
.st.st1 { background: rgba(74,222,128,.15); color: #4ade80; }
.st.st2 { background: rgba(244,114,182,.15); color: #f472b6; }
.st.st3 { background: rgba(251,191,36,.15); color: #fbbf24; }
.st.st4 { background: rgba(148,163,184,.15); color: #94a3b8; }
.st.st5 { background: rgba(191,90,242,.15); color: #bf5af2; }
.codelink { color: #22d3ee; cursor: pointer; font-family: Consolas, monospace; text-decoration: underline; text-underline-offset: 3px; }
.nocode { color: #5b7397; font-style: italic; cursor: pointer; }


/* 侧边详情栏 */
.sidebar-mask { position: fixed; inset: 0; background: rgba(4,10,20,.55); z-index: 200; }
.sidebar { position: fixed; top: 0; right: 0; bottom: 0; width: 460px; background: #0f1e35; border-left: 1px solid #1d3355; z-index: 201; padding: 22px 26px; overflow-y: auto; box-shadow: -12px 0 40px rgba(0,0,0,.45); }
.sidebar h3 { color: #ffd166; font-size: 19px; margin-bottom: 16px; }
.sidebar .kv { display: grid; grid-template-columns: 92px 1fr; gap: 9px 12px; font-size: 14px; color: #c8d6ec; }
.sidebar .kv b { color: #9fb3d1; font-weight: 600; }
.sidebar .adminbox { margin-top: 20px; border-top: 1px solid #1d3355; padding-top: 16px; }
.sidebar .adminbox label { font-size: 13px; color: #9fb3d1; display: block; margin: 10px 0 4px; }
.sidebar .adminbox input[type=range] { width: 100%; }
.sidebar .adminbox select, .sidebar .adminbox input { width: 100%; background: #14263f; border-color: #1d3355; color: #e6edf7; }

/* 整机配置单弹窗（深色） */
.sheetmodal { position: fixed; inset: 0; background: rgba(4,10,20,.6); z-index: 300; display: flex; align-items: center; justify-content: center; padding: 20px; }
.sheetmodal .box { background: #0f1e35; border: 1px solid #1d3355; border-radius: 12px; width: min(720px, 95vw); max-height: 88vh; overflow: auto; padding: 22px 26px; }
.sheetmodal .box.wide { width: min(880px, 95vw); }
.sheetmodal h3 { color: #ffd166; }
.btnparts { background: #1d3355; color: #dbe7fa; padding: 3px 8px; font-size: 11px; border-radius: 5px; }
.btnparts:hover { background: #29466f; }
.btnparts.ghost { background: transparent; border: 1px dashed #29466f; color: #8ab4f8; }
.btnparts.ghost:hover { background: #14263f; }
.sheetgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin-top: 6px; }
.sheetgrid .sr { display: flex; gap: 10px; align-items: baseline; }
.sheetgrid .sr.full { grid-column: 1 / -1; flex-direction: column; align-items: stretch; gap: 4px; }
.sheetgrid label { color: #9fb3d1; font-size: 13px; min-width: 64px; flex: none; }
.sheetgrid .sr > span { color: #e6edf7; font-size: 14px; }
.sheetgrid .req { white-space: pre-wrap; line-height: 1.6; }
.speclist { width: 100%; border-collapse: collapse; margin-top: 2px; font-size: 14px; }
.speclist td { padding: 5px 8px; border-bottom: 1px solid #14263f; color: #c8d6ec; }
.speclist td.k { color: #8ab4f8; width: 40%; }
.sheet-ops { display: flex; gap: 10px; margin-top: 18px; }
/* 装配工艺密码虚拟键盘（大屏无物理键盘用鼠标点击） */
.asm-keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.asm-key { padding: 14px 0; font-size: 20px; font-weight: 600; background: #1b2c47; color: #eaf2ff; border: 1px solid #2a4368; border-radius: 10px; cursor: pointer; user-select: none; transition: background .12s; }
.asm-key:hover { background: #25406b; }
.asm-key:active { background: #2f5288; transform: translateY(1px); }
.asm-key.wide { grid-column: span 1; color: #ff9d7a; }
/* 看板整页门禁遮罩（打开看板先输访问口令；大屏只需输一次） */
.boardlock { position: fixed; inset: 0; z-index: 900; background: #0b1526; display: flex; align-items: center; justify-content: center; padding: 20px; }
.boardlockbox { width: min(340px, 92vw); background: #0f1e35; border: 1px solid #1d3355; border-radius: 14px; padding: 26px 24px; text-align: center; }
.boardlocklogo { width: 58px; height: 58px; border-radius: 10px; object-fit: contain; background: #fff; padding: 3px; }
.boardlockbrand { font-size: 12px; color: #9fb3d1; margin-top: 10px; letter-spacing: 1px; }
.boardlocktitle { font-size: 20px; color: #ffd166; margin: 6px 0 18px; font-weight: 600; }
.boardlocktip { font-size: 13px; color: #9fb3d1; margin-bottom: 12px; }
.boardlockinput { width: 100%; padding: 11px 12px; border: 1px solid #2a4368; border-radius: 8px; font-size: 20px; letter-spacing: 6px; text-align: center; box-sizing: border-box; background: #12233d; color: #eaf2ff; }
.boardlockerr { color: #ff8a80; font-size: 13px; min-height: 20px; margin-top: 6px; }
.boardlockpad { margin-top: 10px; }
.boardlockops { margin-top: 14px; }
.boardlockops .btn { width: 100%; }
/* 装配工艺页内查看窗口（iframe 内嵌 PDF，白底） */
.sheetmodal.asm-viewmodal { padding: 12px; align-items: stretch; }
.sheetmodal .asm-viewerbox { background: #fff; width: 92vw; height: 94vh; max-width: none; max-height: none; padding: 0; display: flex; flex-direction: column; overflow: hidden; border-radius: 10px; }
.asm-viewer-bar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; background: #0f1e35; color: #ffd166; font-weight: 600; border-bottom: 1px solid #1d3355; }
.asm-viewer-bar .btn { padding: 6px 14px; font-size: 13px; }
.model3d-msg { padding: 14px 20px; background: #eef4ff; color: #1e3a5f; font-size: 15px; border-bottom: 1px solid #d3e0f5; }
.model3d-msg.err { background: #fdecec; color: #a02020; border-bottom-color: #f5c6c6; }
.model3d-tip { margin-top: 8px; font-size: 12px; opacity: .8; }
.model3d-bar { margin-top: 10px; width: 260px; max-width: 60%; height: 8px; background: #d3e0f5; border-radius: 4px; overflow: hidden; }
.model3d-bar-in { height: 100%; background: linear-gradient(90deg, #4a90d9, #2d6fb8); border-radius: 4px; transition: width .2s ease; }
.model3d-pct { margin-top: 5px; font-size: 13px; font-weight: 600; color: #2d6fb8; }
/* 图片画廊：逐页 JPG 平滑滚动 */
.asm-gallery { flex: 1; overflow: auto; background: #3a3f47; padding: 14px; min-height: 0; }
.asm-page { display: block; width: 100%; max-width: 920px; margin: 0 auto 14px; border-radius: 4px; box-shadow: 0 3px 12px rgba(0,0,0,.45); background: #fff; }
.form2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 18px; margin-top: 8px; }
.form2 .f { display: flex; flex-direction: column; gap: 4px; }
.form2 .f.full { grid-column: 1 / -1; }
.form2 label { font-size: 13px; color: #9fb3d1; }
.form2 input, .form2 textarea { background: #14263f; border: 1px solid #1d3355; color: #e6edf7; border-radius: 6px; padding: 7px 10px; font-size: 14px; font-family: inherit; }
.spec-edit { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 14px; }
.spec-edit th { color: #9fb3d1; text-align: left; font-size: 13px; padding: 6px 4px; border-bottom: 1px solid #1d3355; }
.spec-edit td { padding: 4px; }
.spec-edit input { width: 100%; background: #14263f; border: 1px solid #1d3355; color: #e6edf7; border-radius: 6px; padding: 6px 8px; }
.delbtn { background: none; color: #d92d20; font-size: 14px; padding: 4px 8px; }
.btn.danger { background: #d92d20; }
.btn.danger:hover { background: #b42318; }

/* 编码徽章 / 配置单只读头部 / 关联选择框（三页共用） */
.code-badge { display: inline-block; font-family: Consolas, Menlo, monospace; background: #e8eefc; color: #1e3f75; border: 1px solid #c7d6f2; border-radius: 6px; padding: 1px 8px; font-size: 12px; white-space: nowrap; }
.cfg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 2px 0 14px; }
.cfg-head .code-badge { font-size: 14px; padding: 3px 12px; background: #14263f; color: #8ab4f8; border-color: #29466f; }
.cfg-cat { color: #9fb3d1; font-size: 14px; }
.cfg-shared { color: #fbbf24; font-size: 12px; margin-left: auto; }
.cfg-note { color: #5b7397; font-size: 12px; margin-top: 10px; line-height: 1.7; }
.bindfield { margin: 8px 0 4px; }
.bindfield select { width: 100%; background: #14263f; color: #e6edf7; border: 1px solid #1d3355; padding: 8px 10px; border-radius: 6px; }
.dateinput { width: 100%; background: #14263f; color: #e6edf7; border: 1px solid #1d3355; padding: 8px 10px; border-radius: 6px; font-size: 14px; margin: 4px 0 2px; box-sizing: border-box; }
.dateinput::-webkit-calendar-picker-indicator { filter: invert(.8); cursor: pointer; }
.btn.deliver { background: #1e7e46; margin-top: 12px; width: 100%; }
.btn.deliver:hover { background: #176038; }
.cfg-val { font-size: 14px; color: #101828; padding: 4px 0; white-space: pre-wrap; word-break: break-all; }

/* 登录弹窗 */
.loginbox { background: #fff; border-radius: 12px; padding: 26px; width: 360px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.loginbox h3 { color: #101828; margin-bottom: 12px; font-size: 17px; }
.loginbox input { width: 100%; margin: 6px 0 0; }
.loginbox .lg-reason { font-size: 13px; color: #475467; line-height: 1.7; white-space: pre-line; margin: 0 0 6px; }
.loginbox .lg-err { min-height: 20px; font-size: 13px; color: #b42318; margin-top: 4px; }
.loginbox .lg-ops { display: flex; justify-content: flex-end; gap: 10px; margin-top: 12px; }

/* 空状态 */
.empty { padding: 60px 0; text-align: center; color: #5b7397; font-size: 15px; }

/* toast */
.toast { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 999; padding: 10px 22px; border-radius: 8px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.25); }
.toast.ok { background: #067647; color: #fff; }
.toast.err { background: #b42318; color: #fff; }
.toast.info { background: #1d3355; color: #dbe7fa; }

/* ================= 整机配置单分块表单（PDF 风格，三页共用） ================= */
.cs-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; margin-top: 14px; }
.cs-picker button, .cs-pick-card { padding: 18px; display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-size: 15px; font-weight: 700; background: #14263f; color: #dbe7fa; border: 1px solid #1d3355; border-radius: 10px; cursor: pointer; }
.cs-picker button:hover, .cs-pick-card:hover { background: #1d3c66; }
.cs-pick-icon { font-size: 34px; line-height: 1; }
.cs-pick-name { text-align: center; }
.dim { color: #5b7397; }
.cs-block { background: #fff; border: 1px solid #e4e7ec; border-radius: 10px; margin-bottom: 14px; overflow: hidden; }
.cs-block > .cs-block-title { background: #1F4E79; color: #fff; font-weight: 700; padding: 9px 14px; font-size: 14px; }
.cs-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 11px 16px; padding: 14px; background: #f7faff; }
.cs-field { display: flex; flex-direction: column; gap: 4px; }
.cs-field.span2 { grid-column: 1 / -1; }
.cs-field > label { font-size: 12px; color: #475467; }
.cs-field input, .cs-field textarea, .cs-field select { width: 100%; background: #fff; color: #101828; border: 1px solid #d0d5dd; border-radius: 6px; padding: 7px 9px; font-size: 14px; }
.cs-field textarea { resize: vertical; }
.cs-radio { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.cs-radio label { display: inline-flex; gap: 5px; align-items: center; font-size: 14px; color: #101828; }
.cs-remark { font-size: 12px; color: #7a8699; padding: 6px 14px 12px; background: #f7faff; }
.cs-check { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: #101828; }
.doc-html { background: #fff; color: #101828; padding: 16px; border-radius: 8px; overflow: auto; max-height: 70vh; font-size: 14px; line-height: 1.7; }
.doc-html img { max-width: 100%; }
@media (max-width: 760px) { .cs-grid { grid-template-columns: repeat(2, 1fr); } .cs-picker { grid-template-columns: 1fr; } }

/* ================= 看板多设备自适应（随屏高自动撑满） ================= */
/* 宽屏（≥768，含横屏手机/平板/大屏）：整页铺满视口、无外部滚动；表格区弹性占满剩余高度，前端按可用高度动态算每页行数 */
@media (min-width: 768px) {
  html, body { height: 100%; }
  body.screen { height: 100vh; display: flex; flex-direction: column; overflow: hidden; }
  .screen #app { display: flex; flex-direction: column; flex: 1; min-height: 0; }
  .screen .header, .screen .bannerbar, .screen .modelbar, .screen .searchbar, .screen .statgrid, .screen .filterhint { flex: none; }
  .orderwrap { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow: hidden; padding-bottom: 8px; }
  .orders-scroll { flex: 1; min-height: 0; overflow: auto; }
  .pager { flex: none; }
}
/* 平板（768~1023）与手机（≤767）：整页正常滚动，字号放大更易读，表格可横向滚动 */
@media (max-width: 1023px) {
  .orderwrap { padding: 4px 14px 16px; }
  .orders-scroll { width: 100%; overflow-x: auto; }
  table.orders { font-size: 14px; min-width: 760px; }
  table.orders th { font-size: 13px; padding: 8px 10px; }
  table.orders td { padding: 8px 10px; }
  .statgrid { gap: 10px; padding: 10px 14px; }
  .stat .num { font-size: 26px; }
  .bannerbar { margin: 8px 14px 6px; font-size: 20px; padding: 10px 16px; }
  .screen .header { margin: 10px 14px 0; padding: 10px 16px; }
  /* 平板端头部：缩小间距避免挤压 */
  .screen .brand-title { font-size: 15px; }
  .screen .brand-logo { width: 36px; height: 36px; }
  .screen .clock .cdate { font-size: 12px; }
  .screen .clock .ctime { font-size: 18px; }
  .screen .clock { gap: 8px; }
}
@media (max-width: 767px) {
  /* 手机端头部：改为上下两行，不再绝对定位 */
  .screen .header { flex-wrap: wrap; padding: 8px 14px; margin: 6px 10px 0; gap: 6px; }
  .screen .brand { gap: 8px; }
  .screen .brand-logo { width: 28px; height: 28px; }
  .screen .brand-title { font-size: 13px; line-height: 1.2; }
  /* 时钟取消绝对定位，作为正常流元素排在第二行 */
  .screen .clock { position: static; transform: none; justify-content: center; width: 100%; order: 3; gap: 8px; }
  .screen .clock .cdate { font-size: 11px; }
  .screen .clock .ctime { font-size: 16px; }
  .screen .header-right button { padding: 4px 10px; font-size: 12px; }
  .statgrid { gap: 8px; }
  .stat { min-width: 120px; padding: 8px 10px; }
  .stat .num { font-size: 22px; }
  .stat .label { font-size: 11px; }
  .modelbar, .searchbar { padding-left: 14px; padding-right: 14px; }
  .filterhint { padding-left: 14px; padding-right: 14px; }
}

/* ================= 第八轮新增 ================= */
/* 看板公告栏 */
.bannerbar { margin: 10px 24px 6px; padding: 12px 20px; background: linear-gradient(90deg, #fffbeb, #fef3c7); border: 1px solid #fcd34d; border-radius: 8px; color: #92400e; font-size: 24px; font-weight: 700; text-align: center; letter-spacing: .5px; line-height: 1.35; word-break: break-word; display: flex; align-items: center; justify-content: center; gap: 10px; }
/* 动态小喇叭（SVG + CSS 动画） */
.megaphone-icon { display: inline-block; width: 30px; height: 28px; flex-shrink: 0; animation: mega-swing 0.7s ease-in-out infinite alternate; transform-origin: 70% 50%; }
@keyframes mega-swing {
  0%   { transform: rotate(-12deg) scale(1); }
  60%  { transform: rotate(6deg) scale(1.08); }
  100% { transform: rotate(14deg) scale(1.05); }
}
/* 看板分页 */
.pager { display: flex; justify-content: center; align-items: center; gap: 12px; padding: 6px 0 12px; color: #9fb3d1; font-size: 13px; }
.pager button { background: #14263f; color: #9fb3d1; border: 1px solid #1d3355; padding: 6px 14px; border-radius: 6px; cursor: pointer; font-size: 14px; }
.pager button:hover:not(:disabled) { background: #1d3355; color: #e6edf7; }
.pager button:disabled { opacity: .4; cursor: default; }
.pager .pinfo { color: #8ab4f8; font-weight: 700; }
/* 配置单只读弹窗分块标题（深色） */
.cfg-block-title { color: #ffd166; font-size: 14px; font-weight: 700; margin: 14px 0 6px; border-bottom: 1px solid #1d3355; padding-bottom: 4px; }

/* ================= 看板配色优化（需求二） ================= */
/* 订单行：未交货蓝条 / 已交货绿条 + 悬停浮起 */
table.orders tr.row { transition: transform .15s ease, box-shadow .15s ease; }
table.orders tr.row-open td:first-child { box-shadow: inset 6px 0 0 #38bdf8; }
table.orders tr.row-ready td:first-child { box-shadow: inset 6px 0 0 #f97316; }
table.orders tr.row-done td:first-child { box-shadow: inset 6px 0 0 #22c55e; }
table.orders tr.row:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(30,64,175,.18); background: #dbeafe; }

/* ================= 配置单列表（需求一：搜索/筛选/表格/分页） ================= */
.cfg-list-bar { display: flex; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.cfg-search { flex: 1; min-width: 200px; }
.cfg-catfilter { min-width: 160px; }
.cfg-table-wrap { border: 1px solid #e4e7ec; border-radius: 8px; }
.cfg-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cfg-table th { background: #f1f5f9; color: #475467; font-weight: 600; text-align: left; padding: 9px 12px; border-bottom: 1px solid #e4e7ec; white-space: nowrap; }
.cfg-table td { padding: 8px 12px; border-bottom: 1px solid #eef1f5; color: #101828; white-space: nowrap; }
.cfg-table tbody tr:hover { background: #f5f9ff; }
.cfg-table tbody tr.active { background: #e8f0fe; }
.cfg-table .cfg-op { text-align: center; width: 80px; }
.cfg-empty { text-align: center; color: #98a2b3; padding: 24px; }
.cfg-pager { display: flex; justify-content: flex-end; align-items: center; gap: 12px; margin-top: 10px; color: #475467; font-size: 14px; }
.cfg-pager button { background: #2f5597; color: #fff; border: none; padding: 5px 12px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.cfg-pager button:disabled { opacity: .5; cursor: default; }

/* ================= 发货历史（统计卡右侧入口 + 年月筛选弹窗） ================= */
.histbtn { flex: 0 0 auto; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 3px;
  min-width: 112px; padding: 8px 14px; background: #12233c; border: 1px dashed #2f5580; border-radius: 10px;
  color: #bcd3f0; cursor: pointer; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.histbtn:hover { background: #1a3454; border-color: #4a7db8; color: #fff; }
.histbtn .hi { font-size: 17px; line-height: 1; }
.histbtn .ht { font-size: 12px; }
.histbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 10px 0 14px; }
.histbar select { background: #14263f; color: #dbe7fa; border: 1px solid #29466f; border-radius: 8px;
  padding: 7px 10px; font-size: 14px; cursor: pointer; }
.histbar select:focus { outline: none; border-color: #4a7db8; }
.histbar .histnote { margin-left: auto; font-size: 12px; color: #8fa9c8; }
.histstat { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 14px; }
.histstat .hs { background: #12233c; border: 1px solid #1d3355; border-radius: 10px; padding: 10px 12px; min-width: 0; }
.histstat .hs .k { font-size: 12px; color: #8fa9c8; }
.histstat .hs .v { font-size: 21px; font-weight: 800; color: #fff; margin-top: 2px; font-family: "DIN Alternate", Consolas, monospace; }
.histstat .hs .v small { font-size: 12px; font-weight: 400; color: #b9cde8; margin-left: 3px; font-family: inherit; }
.histstat .hs .s { font-size: 13px; color: #b9cde8; margin-top: 5px; line-height: 1.5; word-break: break-all; }
.histscroll { max-height: 46vh; overflow: auto; border: 1px solid #1d3355; border-radius: 10px; }
table.histtable { width: 100%; border-collapse: collapse; font-size: 14px; }
table.histtable th { position: sticky; top: 0; z-index: 1; text-align: left; font-size: 12px; font-weight: 400;
  color: #8fa9c8; background: #12233c; padding: 8px 10px; border-bottom: 1px solid #1d3355; white-space: nowrap; }
table.histtable td { padding: 9px 10px; color: #dbe7fa; border-bottom: 1px solid #16283f; }
table.histtable tr:last-child td { border-bottom: none; }
table.histtable tr.hrow { cursor: pointer; }
table.histtable tr.hrow:hover { background: #16283f; }
table.histtable .hdate { font-family: "DIN Alternate", Consolas, monospace; color: #9fd3ff; white-space: nowrap; }
table.histtable .hno { color: #ffd166; white-space: nowrap; }
table.histtable .hmodel { white-space: nowrap; }
.histempty { padding: 34px 0; text-align: center; color: #5b7397; font-size: 14px; }
@media (max-width: 767px) {
  .histbtn { min-width: 92px; padding: 8px 10px; }
  .histstat { grid-template-columns: 1fr; }
  .histbar .histnote { margin-left: 0; }
  table.histtable { font-size: 13px; }
}
