* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", sans-serif;
  background: #f4f6f9;
  color: #1f2329;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.wrap { max-width: 1000px; margin: 0 auto; padding: 12px 12px 40px; }

/* ---------- 顶栏与导航 ---------- */
.topbar {
  background: #185fa5;
  color: #fff;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.topbar h1 { font-size: 16px; font-weight: 500; margin: 0; }
.topbar .who { font-size: 13px; opacity: .9; }
.topbar a { color: #fff; font-size: 13px; text-decoration: none; opacity: .9; }
.dim { opacity: .6; margin: 0 4px; }

nav.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  background: #185fa5;
  color: #fff;
  position: relative; z-index: 50;
  /* 不能加 overflow-x:auto —— 它会把绝对定位的下拉菜单裁掉（overflow-y 会被算成 auto）。
     菜单展开靠点击，宽度不够就让按钮换行，别用横滑。 */
  overflow: visible;
}
.navgrp {
  position: relative;
  flex: 0 0 auto;
}
.navbtn {
  display: flex; align-items: center; gap: 6px;
  height: 44px; padding: 0 16px;
  background: transparent; border: 0; color: #fff;
  font-size: 14px; white-space: nowrap; cursor: pointer;
}
.navhome {
  display: flex; align-items: center;
  height: 44px; padding: 0 16px;
  color: #fff; font-size: 14px; text-decoration: none;
  white-space: nowrap; flex: 0 0 auto;
}
.navhome:hover { background: rgba(255,255,255,.14); }
.navhome.on { background: rgba(255,255,255,.22); font-weight: 500; }
.navbtn::after {
  content: '▼'; font-size: 10px; opacity: .7;
  transition: transform .15s;
}
.navgrp:hover .navbtn { background: rgba(255,255,255,.14); }
.navgrp.open .navbtn { background: rgba(255,255,255,.22); }
.navgrp.open .navbtn::after,
.navgrp:hover .navbtn::after { transform: rotate(180deg); }
/* 菜单只认 .open（点击展开），不认 hover —— hover 和点击混用会出现「点第二下关不掉」 */
.navgrp.open .navmenu { display: block; }
.navmenu {
  display: none;
  position: absolute; top: 100%; left: 0;
  min-width: 160px;
  background: #fff;
  border: 1px solid #e3e6eb; border-top: 0;
  border-radius: 0 0 8px 8px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  z-index: 100;
  overflow: hidden;
}
.navmenu a {
  display: block;
  padding: 11px 16px;
  font-size: 14px;
  color: #4a5160;
  text-decoration: none;
  border-bottom: 1px solid #f0f1f3;
  white-space: nowrap;
}
.navmenu a:last-child { border-bottom: 0; }
.navmenu a:hover { background: #f4f7fb; color: #185fa5; }
.navmenu a.on { background: #eef4fb; color: #185fa5; font-weight: 500; }
.navgrp.on .navbtn { background: rgba(255,255,255,.12); font-weight: 500; }

@media (max-width: 600px) {
  nav.nav { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .navhome { height: 46px; padding: 0 12px; font-size: 13px; }
  .navgrp { flex: 0 0 auto; }
  .navbtn { padding: 0 10px; height: 46px; font-size: 13px; justify-content: center; }
  .navmenu {
    position: static;
    display: none;
    min-width: auto;
    background: #104a85;
    border: 0; border-radius: 0;
    box-shadow: none;
  }
  .navgrp.open .navmenu { display: block; }
  .navmenu a {
    color: #e8eef5;
    border-bottom: 1px solid #1d6bb5;
    padding: 13px 18px 13px 32px;
  }
  .navmenu a:hover { background: #1a5fa0; color: #fff; }
  .navmenu a.on { background: #1c64a8; color: #fff; }
}

/* ---------- 卡片 ---------- */
.card {
  background: #fff;
  border: 1px solid #e3e6eb;
  border-radius: 10px;
  padding: 14px;
  margin-bottom: 14px;
}
.h2 { margin: 0 0 14px; font-size: 17px; font-weight: 500; }
.text { margin: 0 0 16px; color: #4a5160; }

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.tile {
  display: block; padding: 16px 14px; text-decoration: none;
  background: #fff; border: 1px solid #e3e6eb; border-radius: 10px;
}
.tile:active { background: #eef4fb; }
.tile .t { display: block; color: #185fa5; font-size: 15px; font-weight: 500; }
.tile .s { display: block; color: #7a8290; font-size: 12px; margin-top: 4px; }
/* 分组小标题：首页/导航里把同类入口归到一块，别摊成一长条 */
.grp-t {
  margin: 18px 0 8px; font-size: 13px; font-weight: 500;
  color: #8b93a1; letter-spacing: .5px;
  border-left: 3px solid #185fa5; padding-left: 8px;
}

/* ---------- 首页常用功能：图标式入口（仿管家婆风格） ---------- */
.fav-card { padding: 16px 14px 18px; }
.fav-head {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 18px; font-size: 17px; font-weight: 500;
  color: #1f2329;
}
.fav-head::before {
  content: ''; width: 4px; height: 18px;
  background: #185fa5; border-radius: 2px;
}
.fav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
  gap: 14px;
}
.fav-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 14px 8px 12px; text-decoration: none;
  border-radius: 14px;
  transition: transform .18s, background .18s, box-shadow .18s;
}
.fav-item:hover, .fav-item:active {
  background: #f4f7fb; transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(24, 95, 165, .10);
}
.fav-icon {
  width: 60px; height: 60px; border-radius: 20px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  background: linear-gradient(135deg, var(--c1, #60a5fa) 0%, var(--c2, #2563eb) 100%);
  box-shadow: 0 6px 16px rgba(24, 95, 165, .22), inset 0 1px 0 rgba(255, 255, 255, .28);
  transition: transform .18s, box-shadow .18s;
}
.fav-item:hover .fav-icon { transform: scale(1.06) rotate(-2deg); }
.fav-icon svg { width: 30px; height: 30px; fill: currentColor; }
.fav-t { font-size: 14px; font-weight: 600; color: #1f2329; text-align: center; }
.fav-s { font-size: 11px; color: #9aa1ad; text-align: center; line-height: 1.4; }

@media (max-width: 600px) {
  .fav-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .fav-icon { width: 54px; height: 54px; border-radius: 18px; }
  .fav-icon svg { width: 27px; height: 27px; }
  .fav-t { font-size: 13px; }
  .fav-s { font-size: 11px; }
}

/* ---------- 表单 ---------- */
form.search { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.field { display: flex; flex-direction: column; gap: 4px; flex: 1 1 130px; margin-bottom: 12px; }
.field label { font-size: 12px; color: #7a8290; }
.field label.check { display: flex; align-items: center; gap: 8px; color: #1f2329; font-size: 14px; }
.field label.check input { width: auto; }
.req { color: #c0392b; font-weight: 400; }
.hint { font-size: 12px; color: #9aa1ad; margin: 4px 0 0; line-height: 1.6; }

input, select, textarea {
  font-size: 16px; padding: 9px 10px;
  border: 1px solid #d3d7dd; border-radius: 8px; background: #fff; width: 100%;
  font-family: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #185fa5; }

.row2 { display: flex; gap: 12px; flex-wrap: wrap; }
.row2 .field { flex: 1 1 200px; }

button {
  font-size: 16px; padding: 10px 18px; border: 0; border-radius: 8px;
  background: #185fa5; color: #fff; cursor: pointer; white-space: nowrap;
}
button:active { background: #0c447c; }

.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  background: #185fa5; color: #fff; text-decoration: none; font-size: 15px;
  white-space: nowrap; border: 0; cursor: pointer;
}
.btn.ghost { background: #fff; color: #4a5160; border: 1px solid #d3d7dd; }
.btn.sm { padding: 5px 12px; font-size: 13px; }

.actions { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; }

.link { color: #185fa5; text-decoration: none; font-size: 14px; margin-right: 10px; }
.linkbtn {
  background: none; border: 0; color: #185fa5; font-size: 14px;
  padding: 0; cursor: pointer; text-decoration: none;
}
.linkbtn.danger { color: #c0392b; }
.inline { display: inline; }

/* ---------- 提示 ---------- */
.flash { border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 12px; }
.flash.ok { background: #eaf6ec; color: #1e7a34; border: 1px solid #b7e0c0; }
.flash.bad { background: #fdecec; color: #a32d2d; border: 1px solid #f2b8b8; }
/* 列表被 limit 截断时的提示（B4）—— 不说的话用户会以为单子丢了 */
.flash.warn { background: #fff6e6; color: #8a5a00; border: 1px solid #ffe0a3; }

/* ---------- 表格 ---------- */
.tabs { display: flex; gap: 6px; margin-bottom: 12px; flex-wrap: wrap; }
.tabs a {
  padding: 7px 14px; border-radius: 999px; text-decoration: none;
  font-size: 14px; background: #fff; border: 1px solid #d3d7dd; color: #4a5160;
}
.tabs a.on { background: #185fa5; border-color: #185fa5; color: #fff; }

.meta { font-size: 13px; color: #7a8290; margin-bottom: 8px; }
code { background: #f2f4f7; padding: 2px 6px; border-radius: 4px; font-size: 12px; }

.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative; }
/* 宽表在手机上看不全 → 右上角给个「可左右滑」的角标（JS 检测到溢出才加 has-scroll） */
.tablewrap.has-scroll::after {
  content: '↔ 可左右滑动';
  position: sticky; right: 0; float: right; top: 0;
  font-size: 11px; color: #9aa1ad; background: #f7f9fc;
  padding: 2px 6px; border-radius: 4px; pointer-events: none;
}
table { border-collapse: collapse; width: 100%; font-size: 14px; min-width: 620px; }
th, td { padding: 9px 10px; border-bottom: 1px solid #eceff3; text-align: left; vertical-align: top; }
th { background: #f7f9fc; font-weight: 500; color: #4a5160; white-space: nowrap; }
td.num, th.num { text-align: right; white-space: nowrap; }
tbody tr:active { background: #f5f9ff; }
.nowrap { white-space: nowrap; }
.ellip { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.empty { padding: 30px 10px; text-align: center; color: #7a8290; font-size: 14px; }

/* 页面顶部返回条 */
.page-back {
  display: inline-flex; align-items: center; gap: 6px;
  color: #185fa5; font-size: 14px; text-decoration: none;
  margin-bottom: 10px; padding: 4px 0;
}
.page-back:hover { text-decoration: underline; }

/* 售后维修列表：固定列宽，避免操作列被挤掉 */
.repair-list { table-layout: fixed; }
.repair-list .col-no { width: 120px; }
.repair-list .col-cust { width: 170px; }
.repair-list .col-prod { width: 220px; }
.repair-list .col-status { width: 90px; }
.repair-list .col-next { width: 130px; }
.repair-list .col-time { width: 105px; }
.repair-list .col-actions { width: 130px; min-width: 130px; }
.repair-list .col-actions .btn.sm { margin-right: 6px; }
.repair-list .col-actions .btn.sm:last-child { margin-right: 0; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; line-height: 1.6; background: #eef2f7; color: #42506b; }
.badge.customer { background: #e8f1fd; color: #185fa5; }
.badge.supplier { background: #fdf0e3; color: #96590f; }
.badge.both { background: #ede7fa; color: #5b3fa8; }
.badge.ok { background: #eaf6ec; color: #1e7a34; }
.badge.off { background: #f0f1f3; color: #7a8290; }
.badge.warn { background: #fdf3e3; color: #96590f; }

/* ---------- 阶段 3：任务协同 ---------- */
.h3 { margin: 0 0 10px; font-size: 15px; font-weight: 500; }
.badge.run { background: #e8f1fd; color: #185fa5; }
.red { color: #c0392b; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 14px; }
.stat {
  position: relative; overflow: hidden;
  display: block; text-align: center; padding: 14px 8px 12px; text-decoration: none;
  background: #fff; border: 1px solid #e3e6eb; border-radius: 12px; color: #1f2329;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  transition: transform .16s, box-shadow .16s, border-color .16s;
}
.stat:hover { transform: translateY(-2px); box-shadow: 0 8px 18px rgba(16, 24, 40, .10); }
.stat::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: #c8d2df;
}
.stat b {
  display: block; font-size: 25px; font-weight: 700; line-height: 1.25;
  font-variant-numeric: tabular-nums; letter-spacing: -.5px;
}
.stat span { display: block; font-size: 12px; color: #7a8290; margin-top: 2px; }
.stat.warn b { color: #c0392b; }
.stat.warn::before { background: #e05252; }
/* 首页四种颜色：蓝=今天、红=逾期、琥珀=未完成、绿=已完成 */
.stat.c-blue::before { background: #2f6fed; }
.stat.c-blue b { color: #1d4ed8; }
.stat.c-amber::before { background: #f59e0b; }
.stat.c-amber b { color: #b45309; }
.stat.c-green::before { background: #10b981; }
.stat.c-green b { color: #047857; }
.stat.c-gray::before { background: #cbd5e1; }
.stat.c-gray b { color: #475569; }

table.kv { min-width: 0; }
table.kv th {
  width: 88px; background: none; color: #7a8290; font-weight: 400;
  padding: 6px 10px 6px 0; white-space: nowrap;
}
table.kv td { padding: 6px 0; border-bottom: 1px solid #f2f4f7; }

/* 维修进度条：照 EXE 的横向时间轴（ui/widgets/repair_flow_widget.py::_create_timeline_step）
   圆点 28px + 段间连线 3px；已完成 ✓ 绿 #10B981、当前 蓝 #3B82F6、未做 灰 #E5E7EB */
.stepbar {
  display: flex; justify-content: space-between; position: relative;
  margin: 18px 0 20px; padding: 0 6px;
}
.step {
  flex: 1 1 0; position: relative;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; padding: 0 4px;
}
.step b {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%; border: 2px solid transparent;
  background: #E5E7EB; color: #6B7280;
  font-size: 14px; font-weight: 700; position: relative; z-index: 1;
}
.step span { margin-top: 8px; font-size: 12px; font-weight: 600; }
.step::after {
  content: ''; position: absolute; top: 13px;
  left: calc(50% + 16px); right: calc(-50% + 16px);
  height: 3px; background: #E5E7EB; border-radius: 2px; z-index: 0;
}
.step:last-child::after { display: none; }

.step.done b { background: #10B981; border-color: #10B981; color: #fff; }
.step.done span { color: #10B981; font-weight: 700; }
.step.done::after { background: #10B981; }

.step.cur b {
  background: #3B82F6; border-color: #93C5FD; color: #fff;
  animation: stepPulse 1.6s ease-in-out infinite;
}
.step.cur span { color: #3B82F6; font-weight: 700; }

.step.todo b { background: #E5E7EB; border-color: #E5E7EB; color: #6B7280; }
.step.todo span { color: #9CA3AF; }

@keyframes stepPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, .28); }
  50% { box-shadow: 0 0 0 8px rgba(59, 130, 246, 0); }
}

/* 详情页：整条走绿色主题，白字加粗 */
.stepbar.green {
  padding: 14px 12px 12px; border-radius: 12px;
  background: linear-gradient(135deg, #13b583, #0e7a4f);
  box-shadow: 0 4px 14px rgba(16, 185, 129, .22);
}
.stepbar.green .step b {
  background: #fff; border-color: #fff; color: #0e7a4f; font-weight: 700;
}
.stepbar.green .step.cur b { animation: none; box-shadow: 0 0 0 3px rgba(255, 255, 255, .55); }
.stepbar.green .step.todo b {
  background: rgba(255, 255, 255, .26); border-color: rgba(255, 255, 255, .5); color: #fff;
}
.stepbar.green .step span { color: #fff; font-weight: 700; }
.stepbar.green .step.todo span { color: rgba(255, 255, 255, .85); font-weight: 600; }
.stepbar.green .step::after { background: rgba(255, 255, 255, .35); }
.stepbar.green .step.done::after { background: #fff; }

@media (max-width: 600px) {
  .stepbar { padding: 0; margin: 14px 0 16px; }
  .stepbar.green { padding: 12px 8px 10px; }
  .step b { width: 24px; height: 24px; font-size: 12px; }
  .step span { font-size: 11px; margin-top: 6px; }
  .step::after { top: 11px; left: calc(50% + 14px); right: calc(-50% + 14px); }
}

.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.timeline li { display: flex; gap: 10px; padding: 0 0 14px; position: relative; }
.timeline li:not(:last-child)::before {
  content: ''; position: absolute; left: 4px; top: 14px; bottom: 0;
  width: 1px; background: #e3e6eb;
}
.timeline .dot {
  flex: 0 0 auto; width: 9px; height: 9px; border-radius: 50%;
  background: #c3cad4; margin-top: 7px;
}
.timeline .body { flex: 1 1 auto; min-width: 0; }
.timeline .txt { font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.timeline .meta { font-size: 12px; color: #9aa1ad; margin: 2px 0 0; }

.item {
  border: 1px solid #e3e6eb; border-radius: 10px; padding: 12px;
  margin-bottom: 12px; background: #fbfcfd;
}
.item-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.item-head b { font-size: 14px; font-weight: 500; color: #42506b; }

.inline-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-top: 10px; }
.inline-form .field { flex: 1 1 160px; margin-bottom: 0; }

/* ---------- 阶段 6D：考勤自助（手机打卡） ---------- */
.punchbar { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.punchbtn {
  display: block; width: 100%; padding: 16px 10px; border: 0; border-radius: 12px;
  background: #1e7a34; color: #fff; font-size: 17px; font-weight: 500;
  text-align: center; line-height: 1.4; white-space: normal;
}
.punchbtn small { display: block; font-size: 12px; font-weight: 400; opacity: .9; margin-top: 3px; }
.punchbtn.out { background: #185fa5; }
.punchbtn[disabled] { background: #eef1f5; color: #9aa1ad; }
.punchbtn[disabled] small { opacity: 1; }

/* ---------- 登录（科技感：深蓝底 + 玻璃卡片）---------- */
.login {
  position: relative; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 40px 16px calc(40px + env(safe-area-inset-bottom));
  overflow: hidden;
}
/* 背景：深蓝渐变 + 三个缓慢漂移的光斑（青/蓝/靛） */
.login::before {
  content: ''; position: fixed; inset: -20% -20%; z-index: -2;
  background:
    radial-gradient(38% 30% at 18% 22%, rgba(56, 189, 248, .26), transparent 60%),
    radial-gradient(32% 26% at 82% 16%, rgba(99, 102, 241, .24), transparent 62%),
    radial-gradient(46% 36% at 62% 94%, rgba(37, 99, 235, .32), transparent 66%),
    linear-gradient(160deg, #0a1730 0%, #102c58 46%, #0b1e3f 100%);
  animation: loginDrift 26s ease-in-out infinite alternate;
}
/* 网格纹理：科技感主要来自这层，线要细、边缘要淡出，别抢主体 */
.login::after {
  content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
  background-size: 34px 34px, 34px 34px;
  -webkit-mask-image: radial-gradient(72% 62% at 50% 40%, #000 0%, transparent 100%);
  mask-image: radial-gradient(72% 62% at 50% 40%, #000 0%, transparent 100%);
}
@keyframes loginDrift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(-3%, 2%, 0) scale(1.08); }
}

/* 卡片：毛玻璃 + 顶部一道渐变高光 */
.login .card {
  position: relative; width: 100%; max-width: 372px; overflow: hidden;
  padding: 26px 24px 24px; margin-bottom: 0;
  background: rgba(255, 255, 255, .94);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 16px;
  box-shadow: 0 24px 60px rgba(3, 18, 46, .45), 0 2px 6px rgba(3, 18, 46, .2);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
}
.login .card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px;
  /* 顶部这道高光做成「条码」样式：不等宽的色块，呼应公司条码主业 */
  background: repeating-linear-gradient(90deg,
    #22d3ee 0 7px, transparent 7px 11px,
    #2f6fed 11px 22px, transparent 22px 25px,
    #6366f1 25px 29px, transparent 29px 34px,
    #22d3ee 34px 38px, transparent 38px 43px,
    #2f6fed 43px 56px, transparent 56px 60px);
}
/* 品牌区：宽屏在左（logo + 协作插画 + 条码），窄屏只留 logo */
.login-brand { width: 100%; max-width: 430px; text-align: center; }
.login-ill { margin: 6px auto 0; max-width: 420px; }
.login-ill svg { display: block; width: 100%; height: auto; }
.login-slogan {
  margin: 16px 0 0; font-size: 13px; letter-spacing: 3px;
  color: rgba(255, 255, 255, .74);
}
/* 条码上那道来回扫的亮线 */
.ill-scan { animation: illScan 3.6s ease-in-out infinite; }
@keyframes illScan {
  0%, 100% { transform: translateX(0); opacity: .95; }
  50%      { transform: translateX(116px); opacity: .3; }
}

.login h2 { margin: 0 0 4px; font-size: 19px; font-weight: 600; letter-spacing: .5px; color: #12203a; }
.login p { margin: 0 0 18px; font-size: 12.5px; letter-spacing: .3px; color: #7a8290; }
.login .field { flex: none; margin-bottom: 14px; }
.login .field label { font-size: 12px; color: #6b7480; letter-spacing: .3px; }
.login input {
  background: #f5f7fb; border: 1px solid #e2e7ef; border-radius: 10px; padding: 11px 12px;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.login input:focus {
  background: #fff; border-color: #2f6fed;
  box-shadow: 0 0 0 3px rgba(47, 111, 237, .14);
}
.login button {
  width: 100%; margin-top: 8px; padding: 12px 18px;
  font-weight: 600; letter-spacing: 2px; border-radius: 10px; border: 0; color: #fff;
  background: linear-gradient(135deg, #2f6fed 0%, #1e4fd8 55%, #4338ca 100%);
  box-shadow: 0 10px 24px rgba(47, 111, 237, .35), inset 0 1px 0 rgba(255, 255, 255, .22);
  position: relative; overflow: hidden;
  transition: transform .15s, box-shadow .2s;
}
.login button:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(47, 111, 237, .45), inset 0 1px 0 rgba(255, 255, 255, .22);
}
.login button:active { transform: translateY(0); }
/* 按钮上一道缓慢扫过的光 */
.login button::after {
  content: ''; position: absolute; top: 0; left: -60%; width: 45%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .38), transparent);
  transform: skewX(-20deg);
  animation: loginSheen 5.5s ease-in-out infinite;
}
@keyframes loginSheen { 0%, 72% { left: -60%; } 88%, 100% { left: 120%; } }
.login .err { background: #fdecec; color: #a32d2d; border: 1px solid #f2b8b8;
             border-radius: 10px; padding: 9px 12px; font-size: 14px; margin-bottom: 14px; }
.err { background: #fdecec; color: #a32d2d; border: 1px solid #f2b8b8;
       border-radius: 8px; padding: 9px 12px; font-size: 14px; margin-bottom: 14px; }
/* 窄屏：只留 logo，插画和 slogan 收起来（手机上没地方放，也省流量） */
@media (max-width: 899px) {
  .login-ill, .login-slogan { display: none; }
  .login-brand { max-width: 372px; }
  .login-logo { width: 148px; height: 82px; }
}
/* 宽屏：左品牌区 + 右登录卡 */
@media (min-width: 900px) {
  .login {
    flex-direction: row; align-items: center; justify-content: center; gap: 54px;
  }
  .login-brand { text-align: left; }
  .login-brand .login-logo { margin-left: 0; }
  .login-ill { margin-left: 0; }
}
/* 关掉动画：系统开了「减弱动态效果」就别晃 */
@media (prefers-reduced-motion: reduce) {
  .login::before, .login button::after, .ill-scan { animation: none; }
}
.note { font-size: 12px; color: #9aa1ad; margin-top: 14px; line-height: 1.7; }

@media (max-width: 600px) {
  body { font-size: 14px; }
  /* 底部留出 iPhone 手势条的安全区，最后一个按钮不会被系统条盖住 */
  .wrap { padding: 10px 10px calc(30px + env(safe-area-inset-bottom, 0px)); }
  .grid { grid-template-columns: 1fr 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat b { font-size: 19px; }
  .tile { padding: 14px 12px; }
  .row2 { gap: 0; }
  .row2 .field { flex: 1 1 100%; }

  /* ---- 手机端触控目标：手指点得到，别让用户戳第二下 ---- */
  button, .btn { min-height: 44px; padding: 11px 16px; }
  .btn.sm { min-height: 38px; padding: 8px 14px; font-size: 14px; }
  /* 文字型按钮原本 padding:0，手机上几乎是「点不到」 */
  .linkbtn { display: inline-flex; align-items: center; min-height: 38px; padding: 0 6px; }
  .tabs a { display: inline-flex; align-items: center; min-height: 40px; padding: 9px 15px; }
  /* 表单：窄屏一列一个，输入框宽度才够打字 */
  .field { flex: 1 1 100%; }
  .field label.check { min-height: 40px; }
  input[type=checkbox], input[type=radio] { width: 20px; height: 20px; flex: 0 0 auto; }
  /* 一排按钮在手机上各占一块，别挤成一条 */
  .actions > button, .actions > .btn { flex: 1 1 45%; }
  th, td { padding: 8px 8px; }
  table { font-size: 13px; }
}

/* ---------- 维修报告（打印） ---------- */
.rep-title { text-align: center; font-size: 19px; letter-spacing: 1px; margin-bottom: 18px; }
.rep-sec { border-left: 4px solid #185fa5; padding-left: 9px; margin-top: 18px; }
.rep-body { font-size: 14px; line-height: 1.9; color: #1f2937; word-break: break-all; }
.offscreen { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- 管家婆名称对照：智能匹配建议 ---------- */
.btn.primary { background: #0c6b3f; }
.btn.primary:hover { background: #095533; }
.bad { color: #a32d2d; }   /* 页面里「还有 N 条没填」这类警示文字 */
.sug { display: flex; align-items: center; gap: 6px; margin: 2px 0; font-size: 13px; }
.sugname { flex: 1 1 auto; word-break: break-all; }
.score {
  flex: 0 0 auto; padding: 1px 6px; border-radius: 4px; font-size: 12px;
  font-weight: 600; cursor: help;
}
.score.hi  { background: #eaf6ec; color: #1e7a34; border: 1px solid #b7e0c0; }
.score.mid { background: #fff6e6; color: #8a5a00; border: 1px solid #ffe0a3; }
.score.lo  { background: #f1f2f4; color: #6b7280; border: 1px solid #dfe2e6; }

@media print {
  .topbar, .nav, .banner, .no-print, .actions { display: none !important; }
  body { background: #fff; }
  .wrap { padding: 0; max-width: none; }
  .card { border: none; box-shadow: none; padding: 0; }
  .rep-sec { break-after: avoid; }
  .card, .rep-body, table.kv { break-inside: auto; }
}

/* ---- 管家婆收件箱：卡片式单据（手机上比宽表好读，也比嵌套表格小得多）---- */
.gjp-doc {
  border: 1px solid #e3e6eb; border-radius: 10px; padding: 12px;
  margin-bottom: 10px; background: #fbfcfd;
}
.gjp-doc-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gjp-doc-head b { font-size: 14px; font-weight: 500; color: #42506b; word-break: break-all; }
.gjp-doc-meta { font-size: 13px; color: #5b6472; margin-top: 4px; }
.gjp-doc-brief {
  font-size: 13px; color: #7a8290; margin-top: 4px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.gjp-doc-ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.gjp-lines { margin-top: 10px; border-top: 1px dashed #dfe3e9; padding-top: 8px; }
.gjp-line { padding: 8px 0; border-bottom: 1px solid #f0f2f5; }
.gjp-line:last-of-type { border-bottom: 0; }
.gjp-line-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.gjp-line-head b { font-size: 13px; font-weight: 500; }
.gjp-line-meta { font-size: 12px; color: #7a8290; margin-top: 2px; }
.gjp-line-sn, .gjp-ref-sn {
  font-size: 12px; color: #42506b; margin-top: 3px;
  word-break: break-all; background: #f2f4f7; padding: 3px 6px; border-radius: 4px;
}
.pager { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }

/* ---- 管家婆单据引用选择器（v56.6.1 单向引用）---- */
.gjp-ref { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.gjp-ref > span { font-size:13px; color:#2b3240; }
.gjp-ref-panel { margin-top:8px; border:1px solid #e3e6ec; border-radius:8px;
                 padding:8px; background:#fafbfc; }
.gjp-ref-kw { width:100%; }
.gjp-ref-item { padding:6px 8px; border-radius:6px; cursor:pointer;
                font-size:13px; line-height:1.6; }
/* 引用选择器：候选行做成小卡片，手机上不用横向滚着找「引用」按钮 */
.gjp-ref-card {
  border: 1px solid #e3e6eb; border-radius: 8px; padding: 10px;
  margin-bottom: 8px; background: #fbfcfd;
}
.gjp-ref-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gjp-ref-head b { font-size: 13px; font-weight: 500; color: #42506b; word-break: break-all; }
.gjp-ref-meta { font-size: 12px; color: #7a8290; margin-top: 3px; }
.gjp-ref-pick { margin-top: 8px; width: 100%; }
.gjp-ref-item:hover { background:#eef2f7; }
.gjp-lines-tbl { width:100%; margin-top:4px; font-size:12px;
                 border-left:2px solid #e3e6ec; }
.gjp-lines-tbl th { background:#fafbfc; color:#7a8494; font-weight:500; }

/* ---- 每日任务（固定必做，网页版 v56.6.2）---- */
/* 桌面左右分栏；窄屏自动堆成一列，见下面 media */
.daily-head { display:flex; align-items:flex-start; justify-content:space-between;
              gap:12px; flex-wrap:wrap; }
.daily-head-actions { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.daily-grid { display:grid; grid-template-columns: 1.15fr 1fr; gap:14px; align-items:start; }
.daily-bar { height:8px; background:#eceff3; border-radius:4px; overflow:hidden;
             margin:8px 0 10px; }
.daily-bar.sm { height:6px; margin:4px 0 6px; }
.daily-bar > i { display:block; height:100%; background:#2f6fed; border-radius:4px; }
.daily-list { display:flex; flex-direction:column; gap:8px; }
.daily-row { display:flex; align-items:center; justify-content:space-between;
             gap:10px; border:1px solid #e3e6eb; border-radius:8px;
             padding:10px; background:#fbfcfd; }
.daily-row.done { opacity:.72; }
.daily-row-main { min-width:0; flex:1 1 auto; }
.daily-row-title { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.daily-row-title b { font-size:14px; font-weight:500; }
.daily-row-meta { font-size:12px; color:#7a8290; margin-top:3px; }
.daily-row-act { flex:0 0 auto; }
.daily-board { display:flex; flex-direction:column; gap:10px; }
.daily-board-row { border:1px solid #e3e6eb; border-radius:8px; padding:8px 10px;
                   background:#fbfcfd; }
.daily-board-head { display:flex; justify-content:space-between; align-items:center;
                    font-size:13px; gap:8px; }
.daily-board-open { font-size:12px; color:#b45309; margin-top:2px; }
.daily-board-open.ok { color:#059669; }
.daily-tips { margin:0; padding-left:18px; font-size:13px; color:#5b6472; line-height:1.8; }
.btn.ok { background:#059669; border-color:#059669; color:#fff; }
.btn.ok:hover { background:#047857; }
.stat.ok b { color:#059669; }

/* ---- 任务详情：协作人 chip（手机上 × 要戳得中）---- */
.collab-chips { display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 10px; }
.collab-chip { display:inline-flex; align-items:center; gap:4px; padding:5px 6px 5px 11px;
               border:1px solid #dfe3e9; border-radius:16px; background:#f7f9fb;
               font-size:13px; color:#2b3240; }
.collab-chip .linkbtn { min-height:28px; min-width:28px; justify-content:center;
                        font-size:16px; line-height:1; border-radius:50%; }
.collab-add { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }

@media (max-width: 760px) {
  .daily-grid { grid-template-columns: 1fr; }
  .daily-row { flex-direction: column; align-items: stretch; }
  .daily-row-act { text-align: right; }
  .daily-row-act .btn { width: 100%; }
  .collab-chip { padding: 8px 8px 8px 13px; }
  .collab-chip .linkbtn { min-height: 34px; min-width: 34px; }
}

/* ---- 登录页（企顺办公协作系统）---- */
/* logo：白色玻璃底托 —— 不管企业 logo 是深色还是浅色，放白底上都看得清 */
.login-logo {
  width: 168px; height: 92px; margin: 0 auto 20px; padding: 10px 14px;
  border-radius: 18px; background: rgba(255, 255, 255, .96);
  border: 1px solid rgba(255, 255, 255, .85);
  box-shadow: 0 14px 34px rgba(3, 18, 46, .38), 0 0 0 6px rgba(255, 255, 255, .07);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.login-logo-img { display: block; width: 100%; height: 100%; object-fit: contain; }
.login-logo-text { color: #2f6fed; font-size: 20px; font-weight: 600; letter-spacing: 2px; }
.field.check { margin: 2px 0 12px; }
label.check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px;
              color: #5b6472; cursor: pointer; }
label.check input[type=checkbox] { width: 18px; height: 18px; margin: 0; accent-color: #2f6fed; }

@media (max-width: 600px) {
  .login { padding: 28px 14px calc(28px + env(safe-area-inset-bottom)); }
  .login .card { padding: 22px 18px 20px; }
  .login-logo, .login-logo.has-img { width: 150px; height: 82px; margin-bottom: 16px; }
}

/* 使用说明页：一张卡一段，标题带蓝色竖条，正文用列表，手机上也不挤 */
.help-card { padding: 14px 16px; }
.help-h {
  margin: 0 0 8px; font-size: 15px; font-weight: 500; color: #185fa5;
  border-left: 3px solid #185fa5; padding-left: 8px;
}
.help-ul { margin: 0; padding-left: 20px; }
.help-ul li { margin: 6px 0; font-size: 14px; line-height: 1.7; color: #40485a; }
.help-ul code { background: #f2f4f7; padding: 1px 5px; border-radius: 3px; font-size: 13px; }

/* ===== 新建工作协同：EXE 同款表格界面 ===== */
.memo-head { padding: 12px 14px; }
.memo-title {
  display: block; width: 100%; text-align: center;
  font-size: 22px; font-weight: 500; color: #185fa5;
  border: 0; background: transparent; padding: 4px 0;
}
.memo-title:focus { outline: none; border-bottom: 1px solid #185fa5; }
.memo-meta { display: flex; gap: 20px; font-size: 13px; color: #6b7280; margin-top: 6px; }

.memo-table { min-width: 760px; }
.memo-table th, .memo-table td { padding: 6px; vertical-align: top; }
.memo-table .c-no { width: 46px; }
.memo-table .c-date { width: 130px; }
.memo-table .c-task { width: 34%; }
.memo-table .c-assign { width: 26%; }
.memo-table .c-review { width: 74px; }
.memo-table .c-remark { width: 18%; }
.memo-table textarea { width: 100%; min-height: 56px; }
.memo-table input[type=text], .memo-table input[type=date] { width: 100%; }
.memo-row.sel { background: #eef4fb; }
.rev { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; white-space: nowrap; }

.plan-btn { font-size: 13px; }
.plan-sum { margin-top: 4px; }
.plan-line { font-size: 12px; color: #374151; line-height: 1.5; }

.memo-rowbtns { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.memo-stats { margin-left: auto; font-size: 13px; color: #6b7280; }
.memo-foot { display: flex; align-items: center; gap: 8px; margin: 14px 0; }
.memo-foot .spacer { flex: 1; }

.plan-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; padding: 12px;
}
.plan-dlg {
  background: #fff; border-radius: 10px; padding: 14px 16px;
  width: 100%; max-width: 620px; max-height: 88vh; overflow: auto;
}
.chip-row {
  display: flex; align-items: center; gap: 8px; margin: 6px 0;
  padding: 4px 0; border-bottom: 1px solid #f0f2f5;
}
.chip-idx { color: #6b7280; font-size: 13px; min-width: 16px; text-align: center; }
.chip-row select, .chip-row input { flex: 2; min-width: 0; }
.chip-row .linkbtn { flex: 0 0 auto; }

@media (max-width: 600px) {
  .memo-title { font-size: 19px; }
  .memo-meta { gap: 12px; font-size: 12px; flex-wrap: wrap; }
  .chip-row { flex-wrap: wrap; }
  .chip-row select, .chip-row input { flex: 1 1 100%; }
  .memo-foot { flex-wrap: wrap; }
}

@media print {
  .topbar, nav.nav, .banner, .memo-rowbtns, .memo-foot,
  .plan-mask, .plan-btn { display: none !important; }
  .wrap { max-width: none; padding: 0; }
  .card { border: 0; padding: 0; box-shadow: none; }
  .memo-table { min-width: 0; width: 100%; }
  .memo-title { color: #000; }
}

/* ---- 新建维修单（收件登记）：照桌面端 scan_widget 的五块分组 ---- */
.repair-new .rn-head {
  display: flex; gap: 10px 26px; flex-wrap: wrap; align-items: baseline;
  padding: 10px 14px; margin-bottom: 16px;
  border: 1px solid #e3e7ec; border-radius: 8px; background: #f8fafc;
}
.repair-new .rn-head span { font-size: 12px; color: #7a8290; margin-right: 6px; }
.repair-new .rn-head b { font-size: 17px; color: #185fa5; font-weight: 600; }
.repair-new .rn-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 14px;
}
.repair-new .rn-box {
  border: 1px solid #e3e7ec; border-radius: 8px; padding: 12px 14px 2px; background: #fff;
}
.repair-new .rn-box > h3 {
  margin: 0 0 10px; font-size: 14px; font-weight: 600; color: #42506b;
}
.repair-new .rn-chk { display: flex; flex-wrap: wrap; gap: 2px 16px; }
.repair-new .rn-chk label {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 14px; color: #1f2329; min-height: 34px;
}
.repair-new .rn-info {
  font-size: 12px; color: #5b6472; line-height: 1.7; min-height: 34px;
  background: #f8fafc; border: 1px dashed #dbe2ea; border-radius: 6px; padding: 6px 8px;
}
@media (max-width: 600px) {
  .repair-new .rn-grid { grid-template-columns: 1fr; }
  .repair-new .rn-chk label { min-height: 40px; flex: 1 1 45%; }
}

/* ---- 任务详情：审核横幅（待审核蓝条）+ 主执行人徽章 ---- */
.flash.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.collab-chip.main { background: #dbeafe; border-color: #bfdbfe; color: #1e3a8a; font-weight: 600; }

/* ---- 任务凭证（附件）---- */
.att-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.att-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
           padding: 8px 10px; border: 1px solid #e3e7ec; border-radius: 8px; background: #fbfcfd; }
.att-name { font-size: 14px; color: #1f2329; font-weight: 600; word-break: break-all; }
.att-row .dim { font-size: 12px; }
@media (max-width: 600px) {
  .att-row { flex-direction: column; align-items: stretch; }
  .att-row .btn.sm { width: 100%; min-height: 40px; }
}

/* ---- 维修单照片（收件拍故障照 / 发回前拍修复照）---- */
.att-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.att-form input[type=file] { flex: 1 1 220px; min-height: 38px; }
.att-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; }
.att-cell { border: 1px solid #e3e7ec; border-radius: 8px; padding: 8px; background: #fbfcfd; }
.att-thumb {
  display: flex; align-items: center; justify-content: center; text-decoration: none;
  height: 92px; border-radius: 6px; overflow: hidden; background: #eef2f7;
}
.att-thumb img { width: 100%; height: 100%; object-fit: cover; }
.att-doc { font-size: 13px; color: #7a8290; }
.att-cap { margin-top: 6px; font-size: 12px; line-height: 1.45; }
.att-cap .att-name { display: block; color: #1f2329; word-break: break-all; }
.att-cap .dim { display: block; }
.att-cell form { margin-top: 4px; }

/* ---- 待办批量操作（勾选后一次挪期/完成/转交）---- */
.cbox { width: 36px; text-align: center; }
.cbox input, .sel { width: 16px; height: 16px; }
.batchbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-top: 10px; padding: 10px 12px;
  border: 1px solid #e3e7ec; border-radius: 8px; background: #f8fafc;
}
.batchbar .dim { font-size: 13px; }
.batchbar #selN { color: #185fa5; font-size: 15px; }
.bsel { min-height: 34px; padding: 4px 8px; border-radius: 8px; }

/* ---- 首页今日待办（就地打勾完成）---- */
.hometodo { list-style: none; margin: 12px 0 0; padding: 0; }
.hometodo li {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0; border-top: 1px solid #eef1f5;
}
.hometodo li:first-child { border-top: 0; }
.ht-dot { flex: 0 0 auto; width: 8px; height: 8px; border-radius: 50%; background: #c8cfd8; }
.ht-dot.doing { background: #185fa5; }
.ht-dot.submitted { background: #7c3aed; }
.ht-dot.done { background: #16a34a; }
.ht-title {
  flex: 1 1 auto; min-width: 0; font-size: 14px; color: #1f2329; text-decoration: none;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.hometodo .linkbtn { flex: 0 0 auto; white-space: nowrap; }

/* ---- 维修单列表：月度统计条 ---- */
.rstat {
  display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline;
  margin-top: 10px; padding-top: 10px; border-top: 1px dashed #e3e7ec;
  font-size: 13px; color: #5b6472;
}
.rstat b { font-size: 17px; color: #185fa5; font-weight: 700; margin-right: 4px; }
.rstat .dim { font-size: 12px; align-self: center; }
@media (max-width: 600px) {
  .rstat b { font-size: 15px; }
  .rstat { gap: 4px 14px; }
}
@media (max-width: 600px) {
  .att-grid { grid-template-columns: 1fr 1fr; }
  .att-form input[type=file] { min-height: 44px; }
  .att-form .btn { min-height: 44px; }
  .batchbar .btn.sm { min-height: 40px; }
  .bsel { min-height: 40px; }
  .cbox input, .sel { width: 20px; height: 20px; }
}

/* ---- 不干胶平方速算 ---- */
.tool-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.tool-head .h2 { margin: 0 0 10px; }
.tool-more {
  flex: 0 0 auto; font-size: 12px; color: #7c3aed; text-decoration: none;
  padding: 5px 12px; border: 1px solid #ddd6fe; border-radius: 999px; background: #f5f3ff;
  white-space: nowrap;
}
.tool-more:hover { background: #ede9fe; }

.area-tool { border-color: #e6e9f0; }
.area-tool .area-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px;
}
.area-tool .field { margin-bottom: 10px; }
.area-tool .field label { font-size: 12px; color: #6b7480; }
/* 注意：必须写成 .field label.area-label，否则被上面
   .area-tool .field label（权重更高）把 color/font-size 覆盖回去，字会变灰变小 */
.area-tool .field label.area-label {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 32px;
  background: #185fa5; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .2px;
  padding: 5px 10px; border-radius: 6px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.area-tool .field label.area-label .dim { color: #fff; opacity: 1; font-weight: 500; margin: 0 3px; }
@media (max-width: 600px) {
  .area-tool .field label.area-label { font-size: 12px; padding: 4px 8px; min-height: 30px; }
}
.area-tool input { border-radius: 10px; background: #fbfcfe; }
.area-tool input:focus {
  border-color: #7c3aed; box-shadow: 0 0 0 3px rgba(124, 58, 237, .12);
}
.area-tool .area-gaprow { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.area-tool .area-gaprow input { flex: 1 1 72px; min-width: 72px; }
.area-tool .gapbtn {
  padding: 6px 12px; min-height: 34px; font-size: 13px; border-radius: 999px;
}
.area-tool .area-result {
  margin-top: 14px; padding: 18px 16px 16px; border-radius: 14px; text-align: center;
  background: linear-gradient(180deg, #f4f8ff 0%, #eaf2fd 100%);
  border: 1px solid #d9e6f8;
}
.area-tool .area-result.alt {
  background: linear-gradient(180deg, #faf5ff 0%, #f2eaff 100%);
  border: 1px solid #e4d7fb;
}
.area-tool .area-big {
  font-size: 44px; font-weight: 800; line-height: 1.05; letter-spacing: -1px;
  color: #185fa5;
}
/* 渐变数字：浏览器不支持 background-clip:text 时退回上面的纯色 */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .area-tool .area-big {
    background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
  .area-tool .area-result.alt .area-big {
    background: linear-gradient(135deg, #7c3aed 0%, #c026d3 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
  }
}
.area-tool .area-big small {
  font-size: 16px; margin-left: 4px; color: #5b6472;
  -webkit-text-fill-color: #5b6472; font-weight: 500; letter-spacing: 0;
}
.area-tool .area-formula {
  margin: 6px 0 12px; font-size: 14px; color: #42506b; word-break: break-all;
}
.area-tool .area-kv {
  width: 100%; max-width: 420px; margin: 0 auto 12px;
  border-collapse: collapse; font-size: 13px;
}
.area-tool .area-kv th { text-align: right; width: 40%; color: #7a8290; font-weight: 400; padding: 3px 8px; }
.area-tool .area-kv td { text-align: left; padding: 3px 8px; color: #1f2329; }
.area-tool .area-result .actions { justify-content: center; margin-top: 0; }
@media (max-width: 600px) {
  .area-tool .area-grid { grid-template-columns: 1fr 1fr; }
  .area-tool .area-big { font-size: 36px; }
  .area-tool .gapbtn { min-height: 38px; }
  .area-tool .area-kv { max-width: none; }
}

/* ---- 首页：顶部欢迎条 ---- */
.hero {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: space-between; gap: 12px 16px;
  flex-wrap: wrap;
  padding: 18px 18px 18px 20px; margin-bottom: 14px;
  border-radius: 14px;
  background: linear-gradient(120deg, #123a72 0%, #185fa5 46%, #2563eb 100%);
  box-shadow: 0 10px 26px rgba(18, 58, 114, .22);
}
.hero::before {
  content: ''; position: absolute; right: -30px; top: -60px;
  width: 190px; height: 190px; border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .22), rgba(255, 255, 255, 0) 70%);
}
/* 右侧那排竖条：呼应公司条码主业，纯装饰 */
.hero-deco {
  position: absolute; right: 14px; bottom: 0; width: 120px; height: 46px;
  opacity: .26; pointer-events: none;
  background: repeating-linear-gradient(90deg,
    #fff 0 3px, transparent 3px 7px,
    #fff 7px 12px, transparent 12px 14px,
    #fff 14px 17px, transparent 17px 22px);
  -webkit-mask-image: linear-gradient(to top, #000, transparent);
  mask-image: linear-gradient(to top, #000, transparent);
}
.hero-txt { position: relative; min-width: 0; }
.hero-hi { font-size: 20px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.hero-sub { margin-top: 4px; font-size: 13px; color: rgba(255, 255, 255, .82); }
.hero-sub b { color: #fff; font-weight: 600; }
.hero-sub b.hot { color: #ffd166; }
.hero-dot { margin: 0 6px; opacity: .6; }
.hero-ops { position: relative; display: flex; gap: 8px; flex-wrap: wrap; }
.hero-btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 38px; padding: 8px 16px; border-radius: 999px;
  font-size: 14px; text-decoration: none; white-space: nowrap;
  background: #fff; color: #185fa5; font-weight: 600;
  box-shadow: 0 4px 12px rgba(4, 26, 56, .18);
  transition: transform .16s, box-shadow .16s;
}
.hero-btn:hover { transform: translateY(-1px); box-shadow: 0 8px 18px rgba(4, 26, 56, .26); }
.hero-btn.ghost {
  background: rgba(255, 255, 255, .16); color: #fff;
  border: 1px solid rgba(255, 255, 255, .45); box-shadow: none;
}
.hero-btn.ghost:hover { background: rgba(255, 255, 255, .26); }
@media (max-width: 600px) {
  .hero { padding: 16px 14px; }
  .hero-hi { font-size: 18px; }
  .hero-ops { width: 100%; }
  .hero-btn { flex: 1 1 45%; }
  .hero-deco { width: 84px; height: 34px; }
}
@media (prefers-reduced-motion: reduce) {
  .fav-item:hover, .fav-item:hover .fav-icon, .stat:hover, .hero-btn:hover { transform: none; }
}

/* 首页打卡：密码框别占满宽，两个大按钮并排 */
.punchmini .field { flex: 1 1 100%; margin-bottom: 10px; max-width: 320px; }
.punchmini .actions { margin-top: 12px; }

/* 首页底部：数据库路径 / 读写模式，低调一点 */
.sysfoot {
  margin: 18px 0 0; padding: 0 4px;
  font-size: 12px; color: #9aa1ad; text-align: center; line-height: 1.8;
  word-break: break-all;
}
.sysfoot code { background: #f2f4f7; }

/* ---------- 任务详情：物流类多行快递（对齐 EXE v56.5.28） ---------- */
.exp-table { width: 100%; border-collapse: collapse; min-width: 0; margin-bottom: 10px; }
.exp-table th {
  background: #2f6fed; color: #fff; font-weight: 700; font-size: 13px;
  padding: 7px 8px; white-space: nowrap; border-bottom: none;
}
.exp-table td { padding: 6px 8px; border-bottom: 1px solid #eceff3; vertical-align: middle; }
.exp-table input { width: 100%; padding: 7px 8px; font-size: 13px; }
.exp-table tbody tr:hover { background: #f7f9ff; }
.btn.tiny { padding: 3px 8px; font-size: 13px; line-height: 1.4; }
.btn.danger { background: #fff; color: #c0392b; border: 1px solid #e6c3be; }
.btn.danger:hover { background: #fdf1ef; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
@media (max-width: 600px) {
  .exp-table th, .exp-table td { padding: 5px 6px; font-size: 13px; }
  .exp-table input { padding: 8px; }
}

/* ---------- 物流列表：勾选列 + 批量同步条 ---------- */
.ckcol { width: 34px; text-align: center; padding-left: 0 !important; padding-right: 0 !important; }
.ckcol input { width: 16px; height: 16px; cursor: pointer; }
/* 长单位 / 商品名截断，避免表格被撑变形 */
.logi-table td[data-label="客户 / 执行人"],
.logi-table td[data-label="产品"] {
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
@media (max-width: 600px) {
  .ckcol { width: 40px; }
  .ckcol input { width: 20px; height: 20px; }
}

/* ---------- 手机上宽表转卡片（物流 12 列 / 维修 7 列都挤不下） ---------- */
@media (max-width: 600px) {
  .logi-table thead, .repair-list thead { display: none; }
  .logi-table, .repair-list,
  .logi-table tbody, .repair-list tbody,
  .logi-table tr, .repair-list tr,
  .logi-table td, .repair-list td { display: block; width: 100% !important; }
  .logi-table tr, .repair-list tr {
    border: 1px solid #e5e7eb; border-radius: 10px;
    margin: 0 8px 10px; padding: 10px 12px; width: auto !important; background: #fff;
  }
  .logi-table td, .repair-list td {
    display: flex; justify-content: space-between; align-items: baseline;
    gap: 10px; border-bottom: none; padding: 5px 0; text-align: left;
  }
  .logi-table td + td, .repair-list td + td { border-top: 1px dashed #f0f2f5; }
  .logi-table td::before, .repair-list td::before {
    content: attr(data-label); flex: 0 0 88px;
    color: #6b7280; font-size: 13px;
  }
  .logi-table td.ckcol, .repair-list td.ckcol { justify-content: flex-start; }
  .logi-table td.ckcol::before, .repair-list td.ckcol::before {
    flex: 0 0 auto; margin-right: 8px;
  }
  .logi-table .empty, .repair-list .empty { padding: 6px 0; }
}

/* ---------- 单据查询：来源/过账小标签 + 日期范围快捷 + 手机卡片 ---------- */
.tag { display: inline-block; padding: 1px 7px; border-radius: 10px;
  font-size: 12px; line-height: 1.6; white-space: nowrap; }
.tag.gjp { background: #e8f1ff; color: #1d4ed8; border: 1px solid #c5dbff; }
.tag.local { background: #f2f4f7; color: #4a5160; border: 1px solid #dfe3e8; }
.tag.ok { background: #eaf6ec; color: #1e7a34; border: 1px solid #b7e0c0; }
.tag.warn { background: #fff6e6; color: #8a5a00; border: 1px solid #ffe0a3; }
.rangeq { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.btn.sm.on { background: #2f6fed; color: #fff; border-color: #2f6fed; }
.btn.disabled { opacity: .55; cursor: not-allowed; }

/* 表头蓝底白字 */
.q-table thead th {
  background: #185fa5;
  color: #fff;
  font-weight: 600;
  position: relative;
  white-space: nowrap;
  border-bottom: none;
}
.q-table thead th.colset { background: #185fa5; }

/* 序号列 */
.q-table .col-idx {
  width: 50px;
  min-width: 50px;
  text-align: center;
  white-space: nowrap;
}

/* 选中行蓝色 */
.q-table tbody tr.selected,
.q-table tbody tr.selected:hover { background: #dbeafe; }
.q-table tbody tr.selected td { border-bottom-color: #bfdbfe; }

/* 分页 */
.qpager {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  margin: 10px 0;
  padding: 8px 10px;
  background: #f7f9fc;
  border: 1px solid #e6e9f0;
  border-radius: 8px;
}
.qpager-info { font-size: 13px; color: #4a5160; }
.qpager-btns { display: flex; gap: 6px; }
.qpager-btns button:disabled {
  opacity: .5; cursor: not-allowed; background: #f4f6f9; color: #9aa1ad;
  border-color: #e3e6eb;
}

/* 列表页：单元格过长截断，双击看详情 */
.q-table { table-layout: auto; min-width: max-content; }
.q-table td {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 220px;
}
.q-table td.colset, .q-table td.col-idx { max-width: none; white-space: nowrap; }
.q-table td .tag {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}
.q-table td .mono {
  display: inline-block; max-width: 100%;
  overflow: hidden; text-overflow: ellipsis; vertical-align: middle;
}

/* 列宽拖拽条（auto 布局下仍可拖，但主要起提示作用） */
.q-resizer {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 10;
}
.q-resizer:hover { background: rgba(255,255,255,.35); }

/* 单据查询列最小宽度 */
.q-table .col-doc_no { min-width: 140px; }
.q-table .col-doc_date { min-width: 95px; }
.q-table .col-partner_name { min-width: 130px; }
.q-table .col-product_name { min-width: 140px; }
.q-table .col-spec { min-width: 90px; }
.q-table .col-qty, .q-table .col-price, .q-table .col-amount { min-width: 70px; }
.q-table .col-serials { min-width: 130px; }
.q-table .col-gjp_doc_no { min-width: 130px; }
.q-table .col-audit_status { min-width: 75px; }
.q-table .col-_source { min-width: 65px; }

/* 表格横向滚动条更明显 */
.tablewrap { overflow-x: auto; -webkit-overflow-scrolling: touch; position: relative;
  border: 1px solid #e5e7eb; border-radius: 8px; }
.tablewrap::-webkit-scrollbar { height: 10px; }
.tablewrap::-webkit-scrollbar-track { background: #f1f5f9; }
.tablewrap::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 5px; }
.tablewrap::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* 详情弹窗 */
.q-detail-grid {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 10px 14px;
  font-size: 14px;
}
.q-detail-grid .k { color: #6b7280; text-align: right; }
.q-detail-grid .v { color: #111827; word-break: break-all; }
.q-detail-grid .v .tag { white-space: nowrap; }
.q-detail-grid .v .dim { color: #9aa1ad; }

@media (max-width: 600px) {
  .q-table thead { display: none; }
  .q-table, .q-table tbody, .q-table tr, .q-table td { display: block; width: 100% !important; }
  .q-table tr { border: 1px solid #e5e7eb; border-radius: 10px;
    margin: 0 8px 10px; padding: 10px 12px; width: auto !important; background: #fff; }
  .q-table td { display: flex; justify-content: space-between; align-items: baseline;
    gap: 10px; border-bottom: none; padding: 5px 0; text-align: left; }
  .q-table td + td { border-top: 1px dashed #f0f2f5; }
  .q-table td::before { content: attr(data-label); flex: 0 0 84px; color: #6b7280; font-size: 13px; }
  .q-table td.ellip { max-width: none; white-space: normal; }
  /* 手机端不需要拖拽 */
  .q-resizer { display: none; }
}

/* ---------- 单据查询：列设置按钮 + 弹窗 ---------- */
.colset {
  width: 36px;
  min-width: 36px;
  text-align: center;
  padding: 0 !important;
  vertical-align: middle;
}
.colset-btn {
  width: 28px; height: 28px; border-radius: 6px;
  border: 1px solid #d0d5dd; background: #fff; color: #4b5563;
  cursor: pointer; font-size: 15px; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
}
.colset-btn:hover { background: #f5f7ff; border-color: #2f6fed; color: #2f6fed; }
.q-table .col-hide { display: none !important; }

/* 弹窗 */
.modal {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.45); display: none;
  align-items: center; justify-content: center;
  padding: 16px;
}
.modal-card {
  background: #fff; border-radius: 12px;
  width: 100%; max-width: 360px;
  box-shadow: 0 10px 40px rgba(0,0,0,.2);
  display: flex; flex-direction: column; max-height: 80vh;
}
.modal-head {
  padding: 14px 16px; border-bottom: 1px solid #f0f2f5;
  display: flex; justify-content: space-between; align-items: center;
}
.modal-head h3 { margin: 0; font-size: 16px; }
.modal-close {
  width: 28px; height: 28px; border: none; background: transparent;
  font-size: 22px; color: #6b7280; cursor: pointer;
}
.modal-body {
  padding: 12px 16px; overflow-y: auto;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px;
}
.ckrow {
  display: flex; align-items: center; gap: 6px;
  font-size: 14px; color: #374151; cursor: pointer;
  padding: 6px; border-radius: 6px;
}
.ckrow:hover { background: #f7f9ff; }
.ckrow input { width: 16px; height: 16px; cursor: pointer; }
.modal-foot {
  padding: 12px 16px; border-top: 1px solid #f0f2f5;
  display: flex; justify-content: flex-end; gap: 10px;
}

@media (max-width: 600px) {
  .colset { width: 42px; min-width: 42px; }
  .colset-btn { width: 32px; height: 32px; }
  .modal-card { max-width: 92vw; }
  .modal-body { grid-template-columns: 1fr; }
}

/* ===== 不干胶尺寸预览（首页 / /tools/area 共用） =====
   图是等比画的：几何与 SVG 都在 web/label_preview_util.py 里生成，
   这里只管长相。SVG 里的 class 也是那边写死的，改样式别改那边。 */
.lp-card { border-color: #e6e9f0; }
.lp-card .lp-tag {
  display: inline-block; padding: 1px 8px; border-radius: 10px;
  font-size: 11px; background: #eef2ff; color: #4338ca;
  border: 1px solid #dbe0ff; margin-top: 2px; white-space: nowrap;
}
.lp-card .lp-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0 10px; margin-top: 10px;
}
.lp-card .field { margin-bottom: 8px; }
.lp-card .field label.lp-label { font-size: 12px; color: #6b7480; }
/* 首屏长/宽/横排/竖排标签：蓝底白字按钮，参照 area-label */
.lp-card .field label.lp-qlabel {
  display: flex; align-items: center; justify-content: center;
  width: 100%; min-height: 32px;
  background: #185fa5; color: #fff;
  font-size: 13px; font-weight: 700; letter-spacing: .2px;
  padding: 5px 10px; border-radius: 6px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.lp-card input, .lp-card select { border-radius: 10px; background: #fbfcfe; }
.lp-presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 2px; }
.lp-preset {
  padding: 5px 10px; border-radius: 999px; border: 1px solid #dfe3e8;
  background: #fff; color: #4a5160; font-size: 12px; cursor: pointer; min-height: 30px;
}
.lp-preset:hover { border-color: #185fa5; color: #185fa5; background: #f2f7ff; }
.lp-canvas {
  margin: 12px 0 8px; background: #f7f9fc; border: 1px solid #e6e9f0;
  border-radius: 12px; padding: 6px; overflow: hidden;
}
.lp-svg { display: block; width: 100%; height: auto; }
.lp-info { font-size: 13px; color: #374151; margin: 0; line-height: 1.7; }

/* SVG 内部 */
.lp-svg .lp-bg { fill: #fff; stroke: #e6e9f0; stroke-width: 1; }
/* 底纸：明显灰底，与白标签形成清晰对比 */
.lp-svg .lp-backing { fill: #d8dbe0; stroke: #94a3b8; stroke-width: 1; }
.lp-svg .lp-ref { fill: none; stroke: #b9c0cc; stroke-width: 1.2; stroke-dasharray: 6 4; }
.lp-svg .lp-ref-t { fill: #98a0ad; font-size: 11px; }
/* 标签本体：白色填充 + 黑色边框（9-23 按用户要求改成真实不干胶的样子） */
.lp-svg .lp-label { fill: #ffffff; stroke: none; }
.lp-svg .lp-edge { fill: none; stroke: #111827; stroke-width: 1.8; }
.lp-svg .lp-dim { stroke: #64748b; stroke-width: 1.2; }
.lp-svg .lp-diml { stroke: #cbd5e1; stroke-width: 1; }
.lp-svg .lp-dimt { fill: #475569; font-size: 12px; text-anchor: middle; font-weight: 600; }
.lp-svg .lp-arrow { fill: #64748b; }
.lp-svg .lp-scale { fill: #aab2bf; font-size: 11px; text-anchor: end; }
.lp-svg .lp-empty { fill: #9aa1ad; font-size: 14px; text-anchor: middle; }

@media (max-width: 600px) {
  .lp-card .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-preset { min-height: 38px; font-size: 13px; padding: 6px 12px; }
  .lp-card input, .lp-card select { min-height: 38px; }
}

@media (max-width: 600px) {
  /* 窄屏 SVG 整体被缩到 ~0.6 倍，标注字跟着变小 —— 这里单独放大回来，
     只动字号，不动图形，比例还是真实的 */
  .lp-svg .lp-dimt { font-size: 17px; }
  .lp-svg .lp-scale { font-size: 15px; }
  .lp-svg .lp-ref-t { font-size: 15px; }
  .lp-canvas { padding: 4px; }
}

/* 出纸方向红色箭头 */
.lp-svg .lp-feed { fill: #dc2626; stroke: #b91c1c; stroke-width: 0.5; }
.lp-svg .lp-feed-t { fill: #fff; text-anchor: middle; dominant-baseline: middle; }

/* ===== 不干胶尺寸预览 · 左图右参数（确定按钮 / 图标按钮组） ===== */
.lp-wrap { display: flex; gap: 14px; align-items: flex-start; }
.lp-left { flex: 1 1 auto; min-width: 0; }
.lp-side { flex: 0 0 248px; width: 248px; }
.lp-side .lp-grid { grid-template-columns: 1fr 1fr; }
.lp-side .field { margin-bottom: 8px; }
.lp-card .lp-lbtitle { display: block; margin-bottom: 4px; }
.lp-err { color: #c0392b; margin: 4px 0 0; }

/* 图标按钮组：形状 / 出纸方向 */
.lp-ico { display: flex; gap: 6px; }
.lp-icobtn {
  flex: 1 1 0; min-width: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px;
  padding: 7px 2px 6px; border: 1px solid #dfe3e8; border-radius: 10px;
  background: #fff; color: #6b7480; font-size: 11px; line-height: 1.2;
  cursor: pointer; text-align: center;
}
.lp-icobtn:hover { border-color: #185fa5; color: #185fa5; background: #f2f7ff; }
.lp-icobtn svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
}
.lp-icobtn.on { border-color: #2563eb; background: #eff6ff; color: #1d4ed8; }
.lp-ico5 .lp-icobtn { padding: 7px 1px 6px; font-size: 10px; }
.lp-ico5 .lp-icobtn svg { width: 18px; height: 18px; }

/* 折叠按钮：更多设置 / 收起设置 */
.lp-toggle {
  width: 100%;
  margin: 10px 0 4px;
  background: #f4f6f9;
  border: 1px dashed #c4cbd5;
  color: #4b5563;
  font-size: 13px;
  padding: 8px 12px;
  text-align: center;
  cursor: pointer;
}
.lp-toggle:hover { background: #eef2f7; border-color: #185fa5; color: #185fa5; }
.lp-toggle span { display: inline-block; margin-left: 4px; font-size: 10px; }
.lp-more { padding-top: 4px; }

/* 确定按钮：改了参数还没点 → 变橙色提醒 */
.lp-go { width: 100%; margin-top: 12px; }
.lp-go.pending { background: #d97706; border-color: #d97706; color: #fff; }
.lp-go.pending:hover { background: #b45309; }
.lp-tip { font-size: 11px; margin: 6px 0 0; }

@media (max-width: 760px) {
  .lp-wrap { flex-direction: column; }
  .lp-side { flex: 1 1 auto; width: auto; }
  .lp-side .lp-grid { grid-template-columns: 1fr 1fr; }
  .lp-icobtn { min-height: 44px; font-size: 12px; }
  .lp-ico5 .lp-icobtn { font-size: 11px; }
}
