/* =========================================================
   WinERP · Windows 10 风格界面样式
   ========================================================= */
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: "Microsoft YaHei", "Segoe UI", "PingFang SC", sans-serif;
  font-size: 14px;
  color: #1a1a1a;
  overflow: hidden;
  user-select: none;
  background: #0b3d91;
}
input, select, textarea, button { font-family: inherit; }
input, textarea { user-select: text; }
[hidden] { display: none !important; }
button { cursor: pointer; }

/* ---------- 锁屏 ---------- */
#lock-screen {
  position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: 900;
  visibility: hidden; opacity: 0;
  transition: opacity .4s ease;
}
#lock-screen.show { visibility: visible; opacity: 1; }
#lock-bg {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0;
  background:
    radial-gradient(900px 620px at 18% 12%, rgba(0,150,255,.55), transparent 62%),
    radial-gradient(760px 540px at 82% 88%, rgba(160,80,255,.5), transparent 60%),
    radial-gradient(520px 420px at 72% 18%, rgba(0,255,210,.28), transparent 60%),
    linear-gradient(135deg, #05235e 0%, #0b3d91 48%, #1a56b8 100%);
}
.lock-center {
  position: absolute; left: 50%; top: 38%;
  transform: translate(-50%, -50%);
  text-align: center; color: #fff;
}
#lock-time {
  font-size: 78px; font-weight: 300; letter-spacing: 2px;
  text-shadow: 0 2px 14px rgba(0,0,0,.4);
}
#lock-date { font-size: 18px; margin-top: 10px; opacity: .92; text-shadow: 0 1px 8px rgba(0,0,0,.35); }
#lock-login {
  margin-top: 38px; width: 190px; height: 42px; border-radius: 21px;
  background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.55);
  color: #fff; font-size: 15px; letter-spacing: 4px; text-indent: 4px;
  backdrop-filter: blur(4px);
}
#lock-login:hover { background: rgba(255,255,255,.3); }
#lock-login:active { background: rgba(255,255,255,.42); }
.lock-login-card {
  margin: 32px auto 0; width: 300px;
  background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.35);
  border-radius: 10px; padding: 18px 18px 14px;
  display: grid; gap: 10px; backdrop-filter: blur(6px);
}
.lock-login-title { font-size: 14px; color: #fff; text-align: center; letter-spacing: 1px; }
.lock-login-card input {
  height: 36px; border-radius: 18px; border: 1px solid rgba(255,255,255,.45);
  background: rgba(255,255,255,.16); color: #fff; padding: 0 14px; font-size: 13px; width: 100%;
}
.lock-login-card input::placeholder { color: rgba(255,255,255,.75); }
.lock-login-card input:focus { outline: none; background: rgba(255,255,255,.26); }
.lock-login-card #lock-login {
  height: 38px; margin: 0; border-radius: 19px; border: none;
  background: #0078d7; color: #fff; font-size: 14px; letter-spacing: 3px; text-indent: 3px; width: 100%;
}
.lock-login-card #lock-login:hover { background: #006cbd; }
.lock-login-tip { font-size: 11px; color: rgba(255,255,255,.85); text-align: center; }

/* 小屏 / 低矮窗口时让锁屏内容保持可见 */
@media (max-height: 620px) {
  .lock-center { top: 50%; }
  #lock-time { font-size: 56px; }
  #lock-login { margin-top: 20px; }
  .lock-login-card { margin-top: 20px; }
}

/* ---------- 桌面 ---------- */
#desktop { position: fixed; top: 0; left: 0; right: 0; bottom: 0; }
#wallpaper { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 0; transition: background .6s ease; }
.wp0 {
  background:
    radial-gradient(900px 620px at 18% 12%, rgba(0,150,255,.5), transparent 62%),
    radial-gradient(760px 540px at 82% 88%, rgba(160,80,255,.42), transparent 60%),
    radial-gradient(520px 420px at 72% 18%, rgba(0,255,210,.24), transparent 60%),
    linear-gradient(135deg, #05235e 0%, #0b3d91 48%, #1a56b8 100%);
}
.wp1 {
  background:
    radial-gradient(860px 600px at 22% 18%, rgba(0,220,190,.5), transparent 60%),
    radial-gradient(700px 520px at 80% 84%, rgba(0,120,180,.45), transparent 62%),
    linear-gradient(135deg, #013c3a 0%, #00585a 50%, #00695c 100%);
}
.wp2 {
  background:
    radial-gradient(900px 640px at 78% 16%, rgba(220,120,255,.45), transparent 60%),
    radial-gradient(760px 540px at 16% 86%, rgba(90,60,220,.5), transparent 62%),
    linear-gradient(135deg, #250b5e 0%, #45239c 52%, #5e2a9e 100%);
}
.wp3 {
  background:
    radial-gradient(820px 560px at 30% 22%, rgba(80,120,220,.28), transparent 62%),
    radial-gradient(640px 480px at 82% 80%, rgba(120,80,180,.25), transparent 60%),
    linear-gradient(135deg, #101014 0%, #1b1b24 55%, #24242e 100%);
}

/* ---------- 桌面图标 ---------- */
#desktop-icons {
  position: absolute; top: 0; left: 0; right: 0; bottom: 48px; z-index: 1;
  padding: 10px 8px;
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 4px;
}
.d-icon {
  width: 82px; padding: 8px 3px 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border: 1px solid transparent; border-radius: 4px;
  cursor: default; outline: none;
}
.d-icon:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.28); }
.d-icon.selected { background: rgba(255,255,255,.22); border-color: rgba(255,255,255,.6); }
.d-icon .glyph { font-size: 34px; line-height: 1; filter: drop-shadow(0 2px 3px rgba(0,0,0,.45)); }
.d-icon .label {
  margin-top: 6px; color: #fff; font-size: 12px; line-height: 1.25;
  text-align: center; word-break: break-all;
  text-shadow: 0 1px 3px rgba(0,0,0,.8);
}

/* ---------- 窗口 ---------- */
#windows-layer { position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 10; pointer-events: none; }
.win {
  position: absolute; pointer-events: auto;
  background: #f7f8fa; border: 1px solid #c9c9c9; border-radius: 6px;
  box-shadow: 0 10px 30px rgba(0,0,0,.32), 0 2px 8px rgba(0,0,0,.2);
  display: flex; flex-direction: column; overflow: hidden;
  min-width: 420px; min-height: 300px;
}
.win.maximized {
  left: 0 !important; top: 0 !important;
  width: 100% !important; height: calc(100% - 48px) !important;
  border-radius: 0; border: none;
}
.win.minimized { display: none; }
.win-titlebar {
  height: 34px; flex: none;
  display: flex; align-items: center;
  background: #fff; border-bottom: 1px solid #e4e6e8;
  padding-left: 10px; cursor: default; touch-action: none;
}
.win-icon { font-size: 16px; margin-right: 8px; line-height: 1; }
.win-title-text { font-size: 13px; color: #222; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.win-btns { display: flex; height: 100%; margin-left: 8px; }
.win-btn {
  width: 46px; height: 100%; border: none; background: transparent;
  display: flex; align-items: center; justify-content: center; color: #333;
}
.win-btn svg { width: 12px; height: 12px; display: block; }
.win-btn:hover { background: #e6e6e6; }
.win-btn.win-close:hover { background: #e81123; }
.win-btn.win-close:hover svg { stroke: #fff; }
.win-body { flex: 1; overflow: auto; background: #fff; position: relative; }
.win-resize {
  position: absolute; right: 0; bottom: 0; width: 14px; height: 14px;
  cursor: nwse-resize; z-index: 5; touch-action: none;
}
.win-resize::after {
  content: ""; position: absolute; right: 3px; bottom: 3px;
  width: 7px; height: 7px; border-right: 2px solid #aab; border-bottom: 2px solid #aab; opacity: .7;
}

/* ---------- 任务栏 ---------- */
#taskbar {
  position: absolute; left: 0; right: 0; bottom: 0; height: 48px; z-index: 5000;
  background: rgba(24,24,28,.94);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; padding: 0 6px;
}
.task-start {
  width: 46px; height: 42px; border: none; border-radius: 4px;
  background: transparent; color: #fff; display: flex; align-items: center; justify-content: center;
}
.task-start:hover { background: rgba(255,255,255,.14); }
.task-search {
  width: 250px; height: 30px; margin-left: 8px; border: none; border-radius: 15px;
  background: rgba(255,255,255,.12); color: #d5d5d5; font-size: 13px; text-align: left;
  padding: 0 14px; display: flex; align-items: center; gap: 8px;
}
.task-search:hover { background: rgba(255,255,255,.2); }
.task-apps { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.task-btn {
  width: 46px; height: 40px; border: none; border-radius: 4px; background: transparent;
  color: #fff; font-size: 18px; position: relative;
  display: flex; align-items: center; justify-content: center;
}
.task-btn:hover { background: rgba(255,255,255,.14); }
.task-btn.active::after {
  content: ""; position: absolute; left: 9px; right: 9px; bottom: 1px; height: 3px;
  border-radius: 2px; background: #4cc2ff;
}
.task-btn.running::after {
  content: ""; position: absolute; left: 50%; bottom: 2px; width: 9px; height: 2px;
  transform: translateX(-50%); border-radius: 1px; background: rgba(255,255,255,.45);
}
.task-btn.active.running::after { left: 9px; right: 9px; width: auto; transform: none; background: #4cc2ff; }
.task-tray { display: flex; align-items: center; gap: 9px; color: #fff; font-size: 13px; padding: 0 6px 0 4px; }
.tray-icon { font-size: 14px; opacity: .9; }
.task-clock { text-align: right; line-height: 1.25; font-size: 12px; }
.task-clock div:first-child { font-size: 12px; }
.task-showdesk {
  width: 4px; height: 100%; border: none; padding: 0; margin-left: 10px;
  background: rgba(255,255,255,.35);
}
.task-showdesk:hover { background: rgba(255,255,255,.7); }

/* ---------- 开始菜单 ---------- */
#start-menu {
  position: absolute; left: 4px; bottom: 52px; z-index: 5001;
  width: 600px; max-width: calc(100vw - 12px);
  background: rgba(247,248,250,.98);
  border-radius: 8px; box-shadow: 0 14px 40px rgba(0,0,0,.4);
  padding: 14px 16px 10px;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 14px;
  max-height: calc(100vh - 70px);
}
.start-title { font-size: 12px; color: #767676; margin-bottom: 8px; }
#start-list { max-height: 360px; overflow: auto; }
.start-item {
  display: flex; align-items: center; gap: 12px;
  padding: 9px 10px; border-radius: 4px; font-size: 13px; color: #222;
  border: none; background: transparent; width: 100%; text-align: left;
}
.start-item:hover { background: #e8f2fb; }
.start-item .si-icon { font-size: 20px; width: 24px; text-align: center; }
#start-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.start-tile {
  border: none; border-radius: 4px; color: #fff; font-size: 12px; text-align: left;
  padding: 10px; min-height: 64px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.start-tile .st-icon { font-size: 22px; }
.start-tile:hover { filter: brightness(1.12); }
.start-foot {
  grid-column: 1 / -1;
  display: flex; justify-content: space-between; align-items: center;
  border-top: 1px solid #e3e5e8; margin-top: 8px; padding-top: 10px;
}
.start-user { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #333; }
.start-user .avatar {
  width: 30px; height: 30px; border-radius: 50%; background: #0078d7; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 16px;
}
.start-power button {
  width: 38px; height: 34px; border: none; border-radius: 4px; background: transparent;
  font-size: 20px; color: #444; display: flex; align-items: center; justify-content: center;
}
.start-power button:hover { background: #e6e6e6; }

/* ---------- 右键菜单 ---------- */
#context-menu {
  position: absolute; z-index: 5002; min-width: 190px;
  background: #fff; border: 1px solid #d4d4d4; border-radius: 4px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25); padding: 4px 0;
}
.ctx-item {
  display: block; width: 100%; text-align: left; border: none; background: transparent;
  padding: 9px 18px; font-size: 13px; color: #222;
}
.ctx-item:hover { background: #e8f2fb; }
.ctx-sep { height: 1px; background: #e8e8e8; margin: 4px 8px; }

/* ---------- 通知 ---------- */
#notifications {
  position: absolute; right: 12px; bottom: 58px; z-index: 5003;
  display: flex; flex-direction: column; gap: 8px; align-items: flex-end;
}
.toast {
  background: rgba(32,32,38,.94); color: #fff; font-size: 13px;
  padding: 11px 16px; border-radius: 6px; min-width: 230px; max-width: 360px;
  box-shadow: 0 6px 20px rgba(0,0,0,.35);
  border-left: 4px solid #0078d7;
  animation: toast-in .22s ease;
  transition: opacity .25s, transform .25s;
}
.toast.success { border-left-color: #6ccb5f; }
.toast.error { border-left-color: #e81123; }
.toast.out { opacity: 0; transform: translateY(8px); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* =========================================================
   通用控件
   ========================================================= */
.toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; border-bottom: 1px solid #ececec; flex-wrap: wrap;
}
.toolbar .spacer { flex: 1; }
.toolbar h2 { font-size: 15px; font-weight: 500; color: #222; margin-right: 6px; }
.search-box {
  height: 30px; width: 230px; border: 1px solid #cfcfcf; border-radius: 3px;
  padding: 0 10px 0 30px; font-size: 13px; position: relative;
}
.search-wrap { position: relative; }
.search-wrap::before {
  content: "🔍"; position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12px; opacity: .7;
}
.search-box:focus { border-color: #0078d7; outline: none; box-shadow: 0 0 0 2px rgba(0,120,215,.18); }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 14px; border: 1px solid #c9c9c9; border-radius: 3px;
  background: #fff; color: #333; font-size: 13px; white-space: nowrap;
}
.btn:hover { border-color: #0078d7; color: #0078d7; }
.btn-primary { background: #0078d7; border-color: #0078d7; color: #fff; }
.btn-primary:hover { background: #006cbd; border-color: #006cbd; color: #fff; }
.btn-danger { background: #e81123; border-color: #e81123; color: #fff; }
.btn-danger:hover { background: #cf0f1f; border-color: #cf0f1f; color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-block { display: flex; width: 100%; }
.icon-btn {
  border: none; background: none; color: #0078d7; font-size: 13px; padding: 2px 6px;
}
.icon-btn:hover { text-decoration: underline; }
.icon-btn.danger { color: #d13438; }

/* ---------- 表格 ---------- */
.table-wrap { padding: 4px 14px 14px; overflow-x: auto; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; padding: 9px 10px; background: #f3f4f6; color: #555;
  font-weight: 500; border-bottom: 1px solid #e2e4e7; white-space: nowrap;
  position: sticky; top: 0; z-index: 1;
}
.tbl td { padding: 8px 10px; border-bottom: 1px solid #f0f1f3; vertical-align: middle; }
.tbl tbody tr:hover td { background: #f4f9fd; }
.empty { text-align: center; color: #999; padding: 30px 0; font-size: 13px; }

/* ---------- 徽章 ---------- */
.badge {
  display: inline-block; padding: 2px 9px; border-radius: 10px;
  font-size: 12px; white-space: nowrap;
}
.b-blue { background: #e3f0fb; color: #0b5cab; }
.b-green { background: #e4f5e3; color: #1c7a1c; }
.b-orange { background: #fdf0df; color: #b4680a; }
.b-red { background: #fde8e8; color: #c3222e; }
.b-gray { background: #efefef; color: #666; }
.b-purple { background: #eee8f8; color: #6a3fb5; }

/* ---------- 表单 ---------- */
.form-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px;
  padding: 14px;
}
.form-grid .span2 { grid-column: span 2; }
.form-field { display: flex; flex-direction: column; gap: 4px; }
.form-field label { font-size: 12px; color: #666; }
.form-field input, .form-field select {
  height: 30px; border: 1px solid #ccc; border-radius: 3px; padding: 0 9px; font-size: 13px;
  width: 100%;
}
.form-field input:focus, .form-field select:focus {
  border-color: #0078d7; outline: none; box-shadow: 0 0 0 2px rgba(0,120,215,.16);
}
.color-rows { display: flex; flex-direction: column; gap: 6px; margin-bottom: 6px; }
.color-head { display: flex; gap: 8px; font-size: 11px; color: #888; margin-bottom: 4px; padding: 0 2px; }
.color-head span:nth-child(1) { flex: 1; }
.color-head span:nth-child(2) { flex: 0 0 100px; }
.color-head span:nth-child(3) { flex: 0 0 24px; }
.color-row { display: flex; align-items: center; gap: 8px; }
.cr-name { flex: 1 1 auto; min-width: 0; height: 32px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; font-size: 13px; }
.cr-qty { flex: 0 0 100px; width: 100px; height: 32px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; font-size: 13px; text-align: right; }
.cr-size { flex: 1 1 auto; min-width: 0; height: 32px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; font-size: 13px; }
.cr-sprice { flex: 0 0 100px; width: 100px; height: 32px; box-sizing: border-box; border: 1px solid #ccc; border-radius: 4px; padding: 0 10px; font-size: 13px; text-align: right; }
.cr-name:focus, .cr-qty:focus, .cr-size:focus, .cr-sprice:focus { border-color: #0078d7; outline: none; }
.cr-del { flex: 0 0 24px; width: 24px; height: 32px; border: none; background: none; color: #d13438; font-size: 16px; cursor: pointer; padding: 0; line-height: 1; }
.form-hint { font-size: 12px; color: #999; }

/* ---------- 弹窗 ---------- */
.app-modal {
  position: absolute; top: 0; left: 0; right: 0; bottom: 0; z-index: 60;
  background: rgba(0,0,0,.38);
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
}
.app-modal-box {
  background: #fff; border-radius: 6px; box-shadow: 0 12px 34px rgba(0,0,0,.35);
  max-width: 96%; max-height: 94%; display: flex; flex-direction: column;
  overflow: hidden;
}
.app-modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 11px 14px; border-bottom: 1px solid #ececec; font-size: 14px; font-weight: 500;
}
.app-modal-x { border: none; background: none; font-size: 16px; color: #888; padding: 2px 6px; }
.app-modal-x:hover { color: #e81123; }
.app-modal-body { overflow: auto; padding: 2px 0; flex: 1 1 auto; min-height: 0; }
.app-modal-foot {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 11px 14px; border-top: 1px solid #ececec;
}

/* ---------- KPI 卡片 ---------- */
.kpi-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px; padding: 14px 14px 4px;
}
.kpi {
  border: 1px solid #ececec; border-radius: 6px; padding: 12px 14px;
  background: linear-gradient(180deg, #fbfcfd, #f6f8fa);
}
.kpi .kpi-label { font-size: 12px; color: #767676; }
.kpi .kpi-value { font-size: 21px; font-weight: 500; margin-top: 5px; color: #111; font-variant-numeric: tabular-nums; }
.kpi .kpi-sub { font-size: 12px; color: #9a9a9a; margin-top: 3px; }

/* ---------- 面板与图表 ---------- */
.panel {
  border: 1px solid #ececec; border-radius: 6px; overflow: hidden;
  display: flex; flex-direction: column;
}
.panel-head {
  padding: 9px 13px; font-size: 13px; font-weight: 500; color: #333;
  border-bottom: 1px solid #ececec; background: #fafbfc;
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.panel-head .form-hint { font-weight: 400; }
.panel-body { padding: 10px; flex: 1; }
.dash-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 12px; padding: 12px 14px 14px;
}
.chart-svg { width: 100%; height: auto; display: block; }
.g-line { stroke: #e7e9ec; stroke-width: 1; }
.g-text { fill: #8a8f98; font-size: 11px; }
.line-stroke { fill: none; stroke: #0078d7; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.area-fill { fill: rgba(0,120,215,.10); }
.dot { fill: #0078d7; }
.chart-legend {
  display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;
  font-size: 12px; color: #555; margin-top: 6px;
}
.legend-dot { width: 10px; height: 10px; border-radius: 2px; display: inline-block; margin-right: 5px; vertical-align: -1px; }
.donut-wrap { display: flex; align-items: center; gap: 16px; }
.donut-legend { font-size: 12px; color: #444; display: grid; gap: 6px; flex: 1; min-width: 0; }
.donut-legend .row { display: flex; align-items: center; gap: 7px; min-width: 0; }
.donut-legend .row .name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.donut-legend .row .val { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.donut-legend .ldot { width: 10px; height: 10px; border-radius: 2px; flex: none; }

/* ---------- 业务模块专用 ---------- */
.po-lines { padding: 0 14px; }
.po-line {
  display: grid; grid-template-columns: 1fr 90px 124px 64px 86px 28px;
  gap: 8px; align-items: center; margin-bottom: 8px;
}
.po-line select, .po-line input {
  height: 30px; border: 1px solid #ccc; border-radius: 3px; padding: 0 8px; font-size: 13px; width: 100%;
}
.po-line input:focus, .po-line select:focus { border-color: #0078d7; outline: none; }
.po-line .ln-del { border: none; background: none; color: #d13438; font-size: 16px; }
.po-total { text-align: right; padding: 8px 14px 4px; font-size: 13px; color: #555; }
.po-total b { color: #c3222e; font-size: 15px; }
.po-actions { display: flex; justify-content: flex-end; padding: 8px 14px 12px; gap: 8px; }
.stock-low { color: #c3222e; font-weight: 500; }
.stock-ok { color: #1c7a1c; }
.num-cell { font-variant-numeric: tabular-nums; }

/* ---------- 内部聊天 ---------- */
.chat-wrap { display: flex; height: 100%; }
.chat-login { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; }
.chat-login-card { width: 350px; border: 1px solid #ececec; border-radius: 8px; padding: 22px; display: grid; gap: 12px; background: #fcfdfd; }
.chat-login-title { font-size: 18px; font-weight: 500; text-align: center; }
.chat-login-sub { font-size: 12px; color: #888; text-align: center; margin-top: -6px; }
.chat-warn { font-size: 12px; color: #c3222e; background: #fdeaea; border-radius: 4px; padding: 8px 10px; line-height: 1.5; }
.chat-main { display: flex; width: 100%; min-width: 0; }
.chat-side {
  width: 216px; flex: none; border-right: 1px solid #ececec;
  display: flex; flex-direction: column; background: #fafbfc; min-height: 0;
}
.chat-me { display: flex; align-items: center; gap: 9px; padding: 10px 12px; border-bottom: 1px solid #ececec; }
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%; background: #0078d7; color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none;
}
.chat-me-info { flex: 1; min-width: 0; }
.chat-me-name { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-me-dept { font-size: 11px; color: #999; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-logout { border: none; background: none; font-size: 15px; color: #999; padding: 4px 6px; }
.chat-logout:hover { color: #e81123; }
.chat-side-title { font-size: 12px; color: #8a8a8a; padding: 12px 12px 5px; }
.chat-rooms { overflow: auto; flex: none; max-height: 42%; }
.chat-room {
  display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; background: transparent; text-align: left;
  padding: 8px 12px; font-size: 13px; color: #333;
}
.chat-room:hover { background: #f0f4f8; }
.chat-room.active { background: #e3f0fb; color: #0b5cab; }
.chat-room .cr-icon { font-size: 15px; flex: none; }
.chat-room .cr-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-room .cr-tag { font-size: 10px; color: #0b5cab; background: #e3f0fb; border-radius: 8px; padding: 1px 6px; flex: none; }
.chat-unread {
  flex: none; min-width: 18px; height: 18px; border-radius: 9px; background: #e81123; color: #fff;
  font-size: 11px; display: flex; align-items: center; justify-content: center; padding: 0 5px;
}
.chat-newroom {
  margin: 6px 10px; height: 30px; border: 1px dashed #b9c3cc; border-radius: 4px;
  background: transparent; color: #0b5cab; font-size: 13px;
}
.chat-newroom:hover { background: #eef6fd; border-color: #0078d7; }
.chat-online { flex: 1; overflow: auto; padding-bottom: 10px; }
.on-item { display: flex; align-items: center; gap: 7px; padding: 4px 12px; font-size: 12px; color: #555; }
.on-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ccb5f; flex: none; }
.on-dept { margin-left: auto; font-size: 11px; color: #aaa; white-space: nowrap; }
.chat-right { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.chat-head {
  padding: 10px 14px; border-bottom: 1px solid #ececec;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 14px; font-weight: 500;
}
.chat-head-info { font-size: 12px; color: #999; font-weight: 400; }
.chat-msgs { flex: 1; overflow: auto; padding: 12px 14px; }
.chat-msg { margin-bottom: 10px; }
.chat-msg .cm-name { font-size: 12px; color: #8a8a8a; margin-bottom: 3px; }
.chat-msg .cm-bubble {
  display: inline-block; background: #f2f4f6; border-radius: 8px;
  padding: 7px 11px; font-size: 13px; line-height: 1.5;
  white-space: pre-wrap; word-break: break-word; max-width: 80%;
}
.chat-msg.mine { text-align: right; }
.chat-msg.mine .cm-bubble { background: #d9ecfc; text-align: left; }
.chat-msg.system { text-align: center; font-size: 12px; color: #999; margin: 8px 0; }
.chat-input { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #ececec; }
.chat-input textarea {
  flex: 1; height: 62px; resize: none; border: 1px solid #ccc; border-radius: 6px;
  padding: 8px 10px; font-size: 13px; line-height: 1.5;
}
.chat-input textarea:focus { border-color: #0078d7; outline: none; box-shadow: 0 0 0 2px rgba(0,120,215,.16); }
.chat-input button { width: 76px; }

/* ---------- 公告 ---------- */
.ann-bar {
  display: flex; align-items: center; gap: 12px; margin: 10px 14px 0;
  padding: 8px 12px; background: #fff8e6; border: 1px solid #f3e2b8; border-radius: 6px; flex-wrap: wrap;
}
.ann-bar-tag { font-size: 12px; color: #a97408; font-weight: 500; flex: none; }
.ann-bar-item {
  border: none; background: none; color: #0b5cab; font-size: 13px; padding: 0; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px;
}
.ann-bar-item:hover { text-decoration: underline; }
.ann-list { padding: 12px 14px; display: grid; gap: 12px; }
.ann-item { border: 1px solid #ececec; border-radius: 6px; padding: 12px 14px; background: #fff; }
.ann-item-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.ann-item-title { font-size: 14px; font-weight: 500; flex: 1; }
.ann-item-meta { font-size: 12px; color: #999; white-space: nowrap; }
.ann-item-body { font-size: 13px; color: #444; line-height: 1.65; white-space: pre-wrap; }

/* ---------- 库存预警横幅 ---------- */
.warn-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 12px 14px 0; padding: 9px 12px;
  background: #fdf0df; border: 1px solid #f0d29a; border-radius: 4px;
  color: #9c4a00; font-size: 13px;
}
.warn-bar .btn-sm { margin-left: auto; }
.warn-bar-exp { background: #fdeaea; border-color: #f0c4c8; color: #b4041d; }
.panel-head-count {
  margin-left: 8px; padding: 1px 8px; border-radius: 9px;
  background: #e81123; color: #fff; font-size: 11px; font-weight: 600;
}

/* ---------- POS 收银台 ---------- */
.pos-wrap { display: flex; height: 100%; }
.pos-left { flex: 1; display: flex; flex-direction: column; min-width: 0; border-right: 1px solid #ececec; }
.pos-grid {
  flex: 1; overflow: auto; padding: 10px 12px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; align-content: start;
}
.pos-pcard {
  border: 1px solid #e2e4e7; border-radius: 6px; background: #fff; padding: 10px;
  text-align: left; display: flex; flex-direction: column; gap: 4px;
}
.pos-pcard:hover { border-color: #0078d7; box-shadow: 0 1px 6px rgba(0,120,215,.15); }
.pos-pcard:disabled { opacity: .45; cursor: not-allowed; }
.pos-pname { font-size: 13px; color: #333; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-pprice { font-size: 15px; font-weight: 500; color: #c3222e; }
.pos-pstock { font-size: 11px; color: #999; }
.pos-right { width: 320px; flex: none; display: flex; flex-direction: column; }
.pos-cart-head { padding: 10px 12px; border-bottom: 1px solid #ececec; font-size: 13px; font-weight: 500; }
.pos-cart { flex: 1; overflow: auto; padding: 8px 12px; }
.pos-crow { display: flex; align-items: center; gap: 8px; padding: 7px 0; border-bottom: 1px dashed #eee; }
.pos-cname { flex: 1; font-size: 13px; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pos-cprice { font-size: 13px; color: #c3222e; }
.pos-cqty { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.pos-q {
  width: 22px; height: 22px; border: 1px solid #ccc; border-radius: 3px;
  background: #fff; font-size: 13px; line-height: 1; padding: 0;
}
.pos-q:hover { border-color: #0078d7; color: #0078d7; }
.pos-del { color: #d13438; }
.pos-pay { border-top: 1px solid #ececec; padding: 10px 12px; display: grid; gap: 8px; }
.pos-member { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.pos-member select { flex: 1; height: 30px; border: 1px solid #ccc; border-radius: 3px; padding: 0 8px; font-size: 13px; }
.pos-total { font-size: 14px; }
.pos-total b { font-size: 20px; color: #c3222e; }

/* ---------- 收款设置 / 收款码 ---------- */
.pm-hasqr { color: #1c7a1c; font-size: 13px; }
.pm-noqr { color: #b4680a; font-size: 13px; }
.pm-qr-row { display: flex; align-items: center; gap: 10px; }
.pm-preview { width: 96px; height: 96px; border: 1px solid #e2e4e7; border-radius: 6px; object-fit: contain; background: #fff; }
.crop-box { position: relative; width: 360px; max-width: 100%; height: 300px; margin: 0 auto; background: #f2f2f2; border: 1px solid #ddd; border-radius: 4px; overflow: hidden; touch-action: none; }
.crop-box img { position: absolute; max-width: none; user-select: none; -webkit-user-drag: none; }
.crop-sel { position: absolute; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.55); cursor: move; touch-action: none; box-sizing: border-box; }
.crop-handle { position: absolute; right: -8px; bottom: -8px; width: 18px; height: 18px; border-radius: 50%; background: #0078d7; border: 2px solid #fff; cursor: nwse-resize; }
.crop-info { position: absolute; top: -24px; left: 0; font-size: 11px; color: #fff; text-shadow: 0 0 3px #000; white-space: nowrap; }
.crop-preview-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; font-size: 12px; color: #666; }
.crop-preview-row canvas { border: 1px solid #ddd; border-radius: 4px; background: #fff; }
.paycode-grid { display: flex; flex-wrap: wrap; gap: 12px; padding: 14px; }
.paycode-card { border: 1px solid #e2e4e7; border-radius: 8px; padding: 12px; min-width: 220px; flex: 1; background: #fff; }
.paycode-qr { text-align: center; }
.paycode-qr img { width: 200px; height: 200px; object-fit: contain; border: 1px solid #f0f0f0; border-radius: 6px; margin-top: 8px; }
.paycode-empty { padding: 40px 0; color: #b4680a; font-size: 13px; }
.paycode-name { font-size: 14px; font-weight: 500; margin-bottom: 4px; }
.paycode-bank .paycode-row { font-size: 13px; color: #444; margin-top: 6px; }
.paycode-bank .paycode-no { font-size: 16px; font-weight: 500; letter-spacing: 1px; color: #1a1a1a; }
.paycode-remark { color: #999; font-size: 12px; }

/* ---------- 商品颜色 / 尺码变体 ---------- */
.pname { font-weight: 500; }
.pchips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 3px; }
.chip { font-size: 11px; padding: 1px 6px; border-radius: 8px; white-space: nowrap; }
.chip-color { background: #eef1f5; color: #333; border: 1px solid #d5dae0; }
.chip-size { background: #e7f3fc; color: #0b5cab; border: 1px solid #bfd9f0; }
.pvars { margin-top: 2px; display: flex; flex-direction: column; gap: 1px; }
.pvarbc { font-size: 11px; color: #666; }
.var-panel {
  margin-top: 8px; border: 1px solid #dbe7f2; border-radius: 6px;
  background: #f7fafd; padding: 10px 12px;
}
.var-panel-head { font-size: 13px; font-weight: 600; color: #0b5cab; margin-bottom: 8px; }
.var-expand-row td { background: #fbfdff; padding: 4px 10px 12px; }
.var-expand-row .var-panel { margin: 4px 0 0; }
.var-panel .tbl th { position: static; }
.pos-chips { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 2px; }
.pos-chip {
  font-size: 11px; padding: 1px 6px; border-radius: 8px;
  background: #eef6fd; border: 1px solid #bcd9f0; color: #0b5cab; cursor: pointer;
}
.pos-chip:hover { background: #dceefc; }
.attr-quick { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.attr-chip {
  font-size: 11px; padding: 2px 9px; border-radius: 8px;
  border: 1px solid #bcd9f0; background: #eef6fd; color: #0b5cab; cursor: pointer;
}
.attr-chip:hover { background: #dceefc; }

/* ---------- 标签打印预览 ---------- */
.label-preview {
  border: 1px dashed #bbb; border-radius: 4px; padding: 6px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; background: #fff; margin: 0 auto;
}
.label-preview .lb-barcode svg { width: 100%; height: auto; display: block; }
.lb-num { font-size: 13px; font-weight: 700; letter-spacing: 1px; }
.lb-color { font-size: 11px; color: #333; }
.lb-jobs { margin-top: 10px; border: 1px solid #e2e4e7; border-radius: 6px; padding: 8px 10px; background: #fafbfc; }
.lb-jobs-title { font-size: 12px; color: #666; margin-bottom: 6px; font-weight: 600; }
.lb-job-row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.lb-job-row:last-child { margin-bottom: 0; }
.lb-job-label { font-size: 12px; color: #333; min-width: 64px; }
.lb-job-bc { font-size: 11px; color: #888; flex: 1; font-family: Consolas, monospace; }
.lb-job-qty { width: 76px; height: 28px; border: 1px solid #ccc; border-radius: 3px; padding: 0 8px; font-size: 13px; }
.lb-job-qty:focus { border-color: #0078d7; outline: none; }
.cnt-input { width: 90px; height: 28px; border: 1px solid #ccc; border-radius: 3px; padding: 0 8px; font-size: 13px; }
.cnt-input:focus { border-color: #0078d7; outline: none; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px 10px; max-height: 320px; overflow: auto; }
.perm-item { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #333; cursor: pointer; padding: 4px 6px; border: 1px solid #ececec; border-radius: 4px; }
.perm-item:hover { background: #f4f9fd; }
.perm-ic { font-size: 15px; }

/* ---------- 销售单小票预览 ---------- */
.receipt-preview {
  border: 1px dashed #bbb; border-radius: 4px; background: #fff;
  padding: 10px; width: 240px; margin: 0 auto; font-size: 11px;
}
.receipt-preview .r-company { text-align: center; font-size: 14px; font-weight: 700; }
.receipt-preview .r-title { text-align: center; font-size: 12px; margin: 2px 0 6px; }
.receipt-preview .r-meta { font-size: 11px; line-height: 1.5; color: #333; }
.receipt-preview .r-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-top: 4px; }
.receipt-preview .r-table th { border-bottom: 1px solid #999; text-align: left; padding: 2px 0; }
.receipt-preview .r-table td { padding: 2px 0; vertical-align: top; }
.receipt-preview .r-table .rq, .receipt-preview .r-table .rm { text-align: right; white-space: nowrap; }
.receipt-preview .r-total { text-align: right; font-size: 13px; font-weight: 700; margin-top: 4px; }
.receipt-preview .r-status { text-align: center; font-size: 12px; font-weight: 700; margin-top: 6px; }
.receipt-preview .r-foot { text-align: center; font-size: 11px; margin-top: 8px; }
.receipt-preview .r-pay { margin-top: 6px; border-top: 1px dashed #999; padding-top: 4px; }
.receipt-preview .r-pay-title { font-size: 12px; font-weight: 700; margin-bottom: 3px; }
.receipt-preview .r-pay-qr { text-align: center; margin-top: 4px; }
.receipt-preview .r-pay-qr img { width: 90px; height: 90px; object-fit: contain; }
.receipt-preview .r-pay-bank .r-pay-row { font-size: 11px; line-height: 1.45; }
.receipt-preview .r-pay-bank .r-pay-no { font-weight: 700; }
.receipt-preview .r-pay-name { font-size: 12px; font-weight: 700; margin-top: 3px; }
.receipt-preview .r-pay-empty { font-size: 10px; color: #999; margin: 3px 0; }

/* ---------- 扫码查询（巴枪 / 手机） ---------- */
.scan-wrap { display: flex; flex-direction: column; height: 100%; padding: 14px 16px; box-sizing: border-box; }
.scan-head { display: flex; flex-direction: column; gap: 3px; }
.scan-title { font-size: 18px; font-weight: 600; color: #1a1a1a; }
.scan-hint { font-size: 12px; color: #888; }
.scan-bar { display: flex; gap: 8px; margin: 12px 0 6px; flex-wrap: wrap; }
.scan-input {
  flex: 1 1 260px; min-width: 200px; height: 40px; font-size: 18px; letter-spacing: 1px;
  border: 1px solid #b8b8b8; border-radius: 4px; padding: 0 12px; background: #fff;
}
.scan-input:focus { border-color: #0078d7; outline: none; box-shadow: 0 0 0 2px rgba(0,120,215,.18); }
.scan-file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.scan-bar .btn { height: 40px; font-size: 14px; }
.scan-status { font-size: 12px; color: #666; min-height: 18px; margin: 4px 0 8px; }
.scan-scanning { color: #0b5cab; }
.scan-err { color: #c3222e; }
.scan-result { flex: 1; overflow: auto; }
.scan-empty { text-align: center; color: #aaa; padding: 46px 10px; font-size: 13px; }
.scan-notfound {
  padding: 18px; text-align: center; color: #c3222e; background: #fdeaea;
  border: 1px solid #f5c6cb; border-radius: 6px; font-size: 14px;
}
.scan-fuzzy { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.scan-fitem {
  text-align: left; padding: 10px 12px; border: 1px solid #cfd8e0; border-radius: 5px;
  background: #fff; font-size: 13px; cursor: pointer;
}
.scan-fitem:hover { border-color: #0078d7; background: #f4f9fd; }
.scan-card { border: 1px solid #e2e4e7; border-radius: 6px; overflow: hidden; background: #fff; }
.scan-card-head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 14px; background: linear-gradient(135deg, #f5f9ff, #eef4fb);
  border-bottom: 1px solid #e2e4e7;
}
.scan-card-name { font-size: 17px; font-weight: 600; color: #111; }
.scan-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px 14px; padding: 14px;
}
.scan-field { display: flex; flex-direction: column; gap: 3px; }
.scan-field .k { font-size: 11px; color: #888; }
.scan-field .v { font-size: 14px; color: #222; word-break: break-all; }
.scan-stock { font-size: 16px; font-weight: 700; }
.scan-vars { padding: 0 14px 14px; }
.scan-vars-title { font-size: 12px; color: #666; margin-bottom: 6px; font-weight: 600; }
.scan-var-hit td { background: #fff6de !important; }
.scan-actions { display: flex; gap: 8px; padding: 0 14px 14px; flex-wrap: wrap; }
.scan-history { margin-top: 14px; border-top: 1px dashed #e0e0e0; padding-top: 10px; }
.scan-history-title { font-size: 12px; color: #888; margin-bottom: 6px; }
.scan-hchips { display: flex; flex-wrap: wrap; gap: 6px; }
.scan-hchip {
  font-size: 12px; padding: 4px 10px; border: 1px solid #cfd8e0; border-radius: 12px;
  background: #f7f9fb; color: #0b5cab; cursor: pointer; font-family: Consolas, monospace;
}
.scan-hchip:hover { background: #e8f1fb; }
.scan-hchip-fail { color: #b3541e; }
.scan-hchip .t { color: #999; margin-left: 6px; font-family: inherit; }

/* ---------- 商品分类管理 ---------- */
.cat-head, .cat-row {
  display: grid; grid-template-columns: 1.1fr 1.4fr 1.4fr 74px 52px;
  gap: 6px; align-items: center;
}
.cat-head { font-size: 11px; color: #888; padding: 2px 0 6px; }
.cat-row { margin-bottom: 6px; }
.cat-row input {
  height: 28px; border: 1px solid #ccc; border-radius: 3px;
  padding: 0 8px; font-size: 12px; width: 100%; box-sizing: border-box;
}
.cat-row input:focus { border-color: #0078d7; outline: none; }
.cat-count { font-size: 11px; color: #666; white-space: nowrap; }
.cat-rows { max-height: 300px; overflow: auto; padding-right: 2px; }

/* ---------- 蓝牙无线标签打印 ---------- */
.bt-panel { margin-top: 12px; border: 1px solid #d5e4f2; border-radius: 6px; background: #f7fbff; padding: 10px 12px; }
.bt-head { font-size: 13px; font-weight: 700; color: #0b5cab; margin-bottom: 8px; }
.bt-warn {
  font-size: 12px; color: #b4680a; background: #fdf3e2; border: 1px solid #f0ddbb;
  border-radius: 4px; padding: 8px 10px; line-height: 1.7; margin-bottom: 8px;
}
.bt-row { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; flex-wrap: wrap; }
.bt-row label { font-size: 12px; color: #666; width: 64px; flex: none; }
.bt-row select, .bt-row input {
  height: 28px; border: 1px solid #ccc; border-radius: 3px;
  font-size: 12px; padding: 0 8px; flex: 1; min-width: 120px;
}
.bt-status { font-size: 12px; color: #666; margin: 4px 0 8px; line-height: 1.5; }
.bt-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.bt-img { margin-top: 8px; }
.bt-hint { font-size: 11px; color: #999; margin-top: 8px; line-height: 1.6; }

/* ---------- 待办中心 ---------- */
.todo-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 12px; padding: 14px;
}
.todo-card {
  border: 1px solid #e2e4e7; border-top: 3px solid var(--tc); border-radius: 8px;
  padding: 14px; text-align: left; background: #fff; cursor: pointer;
  display: flex; flex-direction: column; gap: 6px;
}
.todo-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,.08); border-color: var(--tc); }
.todo-icon { font-size: 22px; }
.todo-title { font-size: 13px; color: #333; font-weight: 600; }
.todo-count { font-size: 26px; font-weight: 700; color: var(--tc); font-variant-numeric: tabular-nums; }
.todo-go { font-size: 12px; color: #0b5cab; }

/* ---------- 拣货单 ---------- */
.pick-sales .tbl { margin-top: 4px; }
.pick-check { display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }

/* ---------- 报销凭证图片 ---------- */
.ex-upload-row { display: flex; align-items: center; gap: 8px; }
.ex-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.ex-img { position: relative; }
.ex-img img { width: 64px; height: 64px; object-fit: cover; border: 1px solid #ddd; border-radius: 4px; cursor: zoom-in; display: block; }
.ex-img-del {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px;
  border-radius: 50%; border: 1px solid #ccc; background: #fff; color: #d13438;
  font-size: 11px; line-height: 1; cursor: pointer; padding: 0;
}
.ex-thumb { width: 44px; height: 44px; object-fit: cover; border: 1px solid #e0e0e0; border-radius: 4px; margin-right: 4px; cursor: zoom-in; vertical-align: middle; }
.ex-detail-imgs { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 14px 14px; }
.ex-detail-imgs img { width: 120px; height: 120px; object-fit: cover; border: 1px solid #e0e0e0; border-radius: 6px; cursor: zoom-in; }

/* 窄屏时窗口内的网格退化为单列 */
@media (max-width: 720px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .span2 { grid-column: span 1; }
  .task-search { display: none; }
}

/* 窄屏设备：窗口自适应宽度，避免超出屏幕 */
@media (max-width: 640px) {
  .win { min-width: 0; }
  .d-icon { width: 72px; }
}

/* ---------- 手机端优化 ---------- */
@media (max-width: 760px) {
  .app-modal-box { max-width: calc(100vw - 28px); }
  .pos-wrap { flex-direction: column; }
  .pos-left { border-right: none; flex: 1 1 auto; min-height: 0; }
  .pos-right {
    width: 100%; flex: 0 0 auto; max-height: 46%;
    border-top: 2px solid #0078d7;
  }
  .pos-cart { max-height: 170px; }
  .pos-grid { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); }
  .pos-pcard { padding: 8px; }
  .win-body { -webkit-overflow-scrolling: touch; }
  .d-icon .label { font-size: 11px; }
}
