/* =========================================================
   注塑日报管理系统 · 后台管理 全局样式
   面向电脑端浏览器 (>=1280px)，专业、克制、高信息密度
   ========================================================= */

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  color: #1f2937;
  background: #f4f6f9;
  font-family: -apple-system, "Segoe UI", "Microsoft YaHei", "PingFang SC", "黑体", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { border: none; }
button { font-family: inherit; cursor: pointer; }

/* ---------- 色彩变量 ---------- */
:root {
  --sidebar-bg: #1e293b;
  --sidebar-hover: #273549;
  --content-bg: #f4f6f9;
  --card-bg: #ffffff;
  --card-border: #e7eaee;
  --text-main: #1f2937;
  --text-sub: #6b7280;
  --text-muted: #9aa1ab;
  --accent: #f07b26;
  --accent-hover: #d66a18;
  --accent-soft: #f3e3d2;
  --success: #16a34a;
  --warning: #eab308;
  --danger: #dc2626;
  --info: #2563eb;
  --shadow-card: 0 1px 2px rgba(16, 24, 40, .06);
  --radius: 6px;
  --topbar-h: 60px;
  --sidebar-w: 220px;
  --input-border: #d4d9e0;
  --danger-soft: #fdeceb;
}

/* =========================================================
   整体框架：侧边栏 + 主区(顶栏+内容)
   ========================================================= */
.app-shell { display: flex; min-height: 100vh; }
/* 兼容管理员页旧类名 */
.app { display: flex; min-height: 100vh; }

/* ---------- 侧边栏 ---------- */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: var(--sidebar-bg);
  color: #cbd5e1;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar::-webkit-scrollbar { width: 8px; }
.sidebar::-webkit-scrollbar-thumb { background: #334155; border-radius: 4px; }

.brand {
  display: flex; align-items: center; gap: 10px;
  padding: 18px 18px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.brand-logo {
  width: 34px; height: 34px; flex: 0 0 34px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
.brand-logo svg { width: 20px; height: 20px; }
.brand-title { color: #fff; font-size: 15px; font-weight: 600; line-height: 1.2; }
.brand-sub { font-size: 11px; color: #94a3b8; }

.menu { padding: 12px 10px; flex: 1; }
.menu-group {
  font-size: 11px; color: #64748b; text-transform: none;
  padding: 10px 12px 6px; letter-spacing: .5px;
}
.menu-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; margin-bottom: 2px;
  border-radius: 6px;
  color: #cbd5e1; font-size: 13.5px;
  border-left: 3px solid transparent;
  transition: background .15s, color .15s;
}
.menu-link svg { width: 17px; height: 17px; flex: 0 0 17px; color: #94a3b8; transition: color .15s; }
.menu-link:hover { background: var(--sidebar-hover); color: #fff; }
.menu-link:hover svg { color: #fff; }
.menu-link.active {
  background: var(--accent-soft);
  color: #b3530f;
  border-left-color: var(--accent);
  font-weight: 600;
}
.menu-link.active svg { color: var(--accent-hover); }

.sidebar-foot {
  padding: 14px 18px;
  font-size: 12px; color: #64748b;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 顶栏 */
.topbar {
  height: var(--topbar-h);
  background: var(--card-bg);
  border-bottom: 1px solid var(--card-border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px;
  position: sticky; top: 0; z-index: 20;
}
.page-title { font-size: 20px; font-weight: 600; color: var(--text-main); }
.page-breadcrumb { font-size: 12px; color: var(--text-muted); margin-left: 16px; }
.topbar-right { display: flex; align-items: center; gap: 16px; }
.topbar-date { font-size: 13px; color: var(--text-sub); display: flex; align-items: center; gap: 6px; }
.topbar-date svg { width: 15px; height: 15px; color: var(--text-muted); }
.user-box { display: flex; align-items: center; gap: 9px; }
.user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: #e8edf3; color: #475569;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 600;
}
.user-name { font-size: 13px; color: var(--text-main); }
.user-role { font-size: 11px; color: var(--text-muted); }

/* 内容区 */
.content { padding: 22px 24px 40px; flex: 1; }

/* =========================================================
   通用组件
   ========================================================= */
/* 工具条 */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar-spacer { flex: 1; }

/* 卡片 */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  margin-bottom: 18px;
}
.card-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px; border-bottom: 1px solid var(--card-border);
}
.card-title { font-size: 15px; font-weight: 700; color: var(--text-main); display: flex; align-items: center; gap: 8px; }
.card-title svg { width: 16px; height: 16px; color: var(--accent); }
.card-extra { font-size: 12px; color: var(--text-muted); font-weight: 400; }
.card-sub { font-size: 12px; color: var(--text-muted); font-weight: 400; margin-left: 8px; }
.card-body { padding: 18px; }

/* 概览统计卡 */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 18px; }
.stat-card {
  background: var(--card-bg); border: 1px solid var(--card-border);
  border-radius: var(--radius); box-shadow: var(--shadow-card);
  padding: 16px 18px; display: flex; align-items: center; gap: 14px;
}
.stat-icon {
  width: 44px; height: 44px; border-radius: 8px; flex: 0 0 44px;
  display: flex; align-items: center; justify-content: center;
}
.stat-icon svg { width: 22px; height: 22px; }
.stat-icon.orange { background: var(--accent-soft); color: var(--accent-hover); }
.stat-icon.green  { background: #e6f6ec; color: var(--success); }
.stat-icon.blue   { background: #e9effc; color: var(--info); }
.stat-icon.red    { background: #fdeceb; color: var(--danger); }
.stat-label { font-size: 12px; color: var(--text-sub); }
.stat-value { font-size: 24px; font-weight: 700; color: var(--text-main); line-height: 1.2; }
.stat-tip { font-size: 11px; color: var(--text-muted); }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 7px 14px; border-radius: 5px;
  font-size: 13px; font-weight: 500; line-height: 1.4;
  border: 1px solid transparent; transition: all .15s;
}
.btn svg { width: 15px; height: 15px; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-outline { background: #fff; border-color: #d4d9e0; color: var(--text-main); }
.btn-outline:hover { border-color: var(--accent); color: var(--accent-hover); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
/* 删除按钮：红色描边警示样式（危险操作） */
.btn-delete {
  background: #fff; border-color: #f3c0bd; color: var(--danger);
}
.btn-delete svg { color: var(--danger); }
.btn-delete:hover {
  background: #fdeceb; border-color: var(--danger); color: #b91c1c;
}
.btn-delete:hover svg { color: #b91c1c; }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { background: #f1f3f6; color: var(--text-main); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

/* 表单控件 */
.form-label { display: block; font-size: 13px; font-weight: 500; color: var(--text-main); margin-bottom: 6px; }
.form-label .req { color: var(--danger); margin-left: 2px; }
.control, .input, select, .select, textarea {
  width: 100%; padding: 7px 10px; font-size: 13px;
  border: 1px solid #d4d9e0; border-radius: 5px;
  background: #fff; color: var(--text-main); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.control:focus, .input:focus, select:focus, textarea:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(240, 123, 38, .12);
}
.control::placeholder, .input::placeholder { color: var(--text-muted); }
select { cursor: pointer; appearance: auto; }
textarea { resize: vertical; min-height: 80px; }

/* 筛选条 */
.filter-bar { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 16px; box-shadow: var(--shadow-card); }
.filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.filter-item { }
.filter-actions { display: flex; gap: 10px; }

/* 表格 */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table-wrap > .table { min-width: 720px; }
.table-wrap.tight > .table { min-width: 520px; }
.table-wrap.auto > .table { min-width: 0; width: 100%; }
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  background: #f3f5f8; color: #374151;
  font-weight: 600; text-align: left;
  padding: 10px 14px; border-bottom: 1px solid var(--card-border);
  white-space: nowrap; font-size: 13px;
}
.table tbody td {
  padding: 9px 14px; border-bottom: 1px solid #eef1f4;
  color: var(--text-main); vertical-align: middle;
}
.table tbody tr:hover { background: #f7fafc; }
.table tbody tr:nth-child(even) { background: #fcfcfd; }
.table tbody tr:nth-child(even):hover { background: #f4f8fb; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.table .ctr { text-align: center; }
.table .actions {
  white-space: nowrap; text-align: right;
  position: relative;
}
/* 操作列按钮组：编辑在前、删除在后 */
.row-actions { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.table .actions .row-actions .btn { margin-left: 0; }

/* ---------- 删除前确认气泡（纯样式占位） ---------- */
.confirm-pop {
  display: none;
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 50;
  width: 224px;
  background: #fff;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(16, 24, 40, .14);
  padding: 12px;
  text-align: left;
}
.confirm-pop.show { display: block; }
/* 指向按钮的小箭头 */
.confirm-pop::before,
.confirm-pop::after {
  content: ""; position: absolute;
  border-left: 7px solid transparent;
  border-right: 7px solid transparent;
}
.confirm-pop::before { top: -8px; right: 14px; border-bottom: 8px solid var(--card-border); }
.confirm-pop::after  { top: -6px; right: 15px; border-bottom: 7px solid #fff; }

.confirm-pop .cp-text {
  font-size: 13px; color: var(--text-main); font-weight: 600;
  display: flex; align-items: flex-start; gap: 7px; margin-bottom: 3px;
}
.confirm-pop .cp-text svg { width: 16px; height: 16px; flex: 0 0 16px; color: var(--danger); margin-top: 1px; }
.confirm-pop .cp-desc { font-size: 12px; color: var(--text-sub); line-height: 1.5; margin-bottom: 10px; }
.confirm-pop .cp-actions { display: flex; justify-content: flex-end; gap: 8px; }
.confirm-pop .cp-btn {
  min-width: 52px; padding: 4px 12px; border-radius: 5px;
  font-size: 12px; font-weight: 500; border: 1px solid transparent;
}
.confirm-pop .cp-cancel { background: #fff; border-color: #d4d9e0; color: var(--text-main); }
.confirm-pop .cp-cancel:hover { border-color: var(--accent); color: var(--accent-hover); }
.confirm-pop .cp-sure { background: var(--danger); color: #fff; }
.confirm-pop .cp-sure:hover { background: #b91c1c; }

/* 徽章 */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 2px 9px; border-radius: 10px; font-size: 12px; font-weight: 500; line-height: 1.6;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-green  { background: #e6f6ec; color: #15803d; }
.badge-yellow { background: #fdf6dd; color: #a16207; }
.badge-red    { background: #fdeceb; color: #b91c1c; }
.badge-blue   { background: #e9effc; color: #1d4ed8; }
.badge-gray   { background: #eef1f4; color: #475569; }
.badge-orange { background: var(--accent-soft); color: var(--accent-hover); }

/* 颜色色块 */
.swatch { display: inline-block; width: 30px; height: 18px; border-radius: 3px; border: 1px solid #e2e5ea; vertical-align: middle; margin-right: 7px; }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-muted); font-size: 13px; }
.empty svg { width: 40px; height: 40px; color: #d3d9e0; margin-bottom: 10px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding: 12px 0 2px; font-size: 13px; color: var(--text-sub); }
.pagination .page-btn {
  min-width: 30px; height: 30px; padding: 0 6px; border-radius: 5px;
  border: 1px solid #d4d9e0; background: #fff; color: var(--text-main);
  display: inline-flex; align-items: center; justify-content: center;
}
.pagination .page-btn:hover { border-color: var(--accent); color: var(--accent-hover); }
.pagination .page-btn.current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pagination .page-btn:disabled { opacity: .4; cursor: not-allowed; }

/* ---------- 登录页 ---------- */
.login-page {
  min-height: 100vh; display: flex;
  font-family: inherit;
}
.login-split { display: flex; width: 100%; min-height: 100vh; }
.login-brand {
  flex: 1; background: linear-gradient(140deg, #1e293b 0%, #0f172a 100%);
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; justify-content: center;
  padding: 60px; color: #e2e8f0;
}
.login-brand::before {
  content: ""; position: absolute; right: -120px; top: -120px;
  width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(240,123,38,.28), transparent 70%);
}
.login-logo {
  width:56px;height:56px;border-radius:12px;display:flex;align-items:center;justify-content:center;
  background:rgba(240,123,38,.15);color:#fb923c;margin-bottom:28px;position:relative;z-index:2;
}
.login-logo svg{width:30px;height:30px}
.login-brand h1{font-size:30px;font-weight:700;color:#fff;margin-bottom:10px;position:relative;z-index:2}
.login-tag{font-size:15px;color:#94a3b8;margin-bottom:44px;position:relative;z-index:2}
.login-features{list-style:none;display:flex;flex-direction:column;gap:18px;margin-bottom:52px;position:relative;z-index:2}
.login-features li{display:flex;gap:12px;align-items:center;font-size:14px;color:#cbd5e1}
.login-features svg{width:20px;height:20px;color:#fb923c;flex:none}
.login-copy{font-size:12px;color:#64748b;position:relative;z-index:2}

.login-form-wrap {
  width: 460px; flex: 0 0 460px;
  display: flex; align-items: center; justify-content: center;
  background: var(--content-bg); padding: 40px 34px;
}
.login-form { width: 100%; }
.login-form h2 { font-size: 22px; font-weight: 700; color: var(--text-main); margin-bottom: 6px; }
.login-sub { font-size: 13px; color: var(--text-sub); margin-bottom: 24px; }
.login-label { display:block;font-size:13px;font-weight:600;color:var(--text-main);margin-bottom:8px }
.login-error { display:flex;gap:8px;align-items:flex-start;background:#fef2f2;border:1px solid #fecaca;color:#b91c1c;border-radius:6px;padding:10px 12px;margin-bottom:18px;font-size:13px;line-height:1.5 }
.login-error[hidden]{display:none}
.login-error svg{width:16px;height:16px;flex:none;margin-top:1px}
.login-input{position:relative;margin-bottom:20px}
.login-input svg{position:absolute;left:12px;top:50%;transform:translateY(-50%);width:18px;height:18px;color:var(--text-muted);pointer-events:none}
.login-input input{width:100%;height:46px;border:1px solid var(--input-border);border-radius:6px;padding:0 12px 0 40px;font-size:14px;background:#fff;outline:none;transition:border-color .15s,box-shadow .15s}
.login-input input:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(240,123,38,.12)}
.btn-login{width:100%;height:48px;font-size:15px;border-radius:6px;justify-content:center;margin-top:4px}
.btn-login:disabled{opacity:.6;cursor:not-allowed}

/* 账号密码登录 */
.remember-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:18px}
.remember-label{display:inline-flex;align-items:center;gap:8px;font-size:13px;color:var(--text-main);cursor:pointer;user-select:none}
.remember-label input{position:absolute;opacity:0;width:0;height:0}
.remember-box{width:18px;height:18px;border:1.5px solid var(--input-border);border-radius:4px;display:inline-flex;align-items:center;justify-content:center;background:#fff;transition:border-color .15s,background .15s;flex:none}
.remember-box svg{width:12px;height:12px;color:#fff;opacity:0;transition:opacity .15s}
.remember-label input:checked + .remember-box{background:var(--accent);border-color:var(--accent)}
.remember-label input:checked + .remember-box svg{opacity:1}
.login-error.locked{background:#fffbeb;border-color:#fde68a;color:#92400e}

.login-tips{display:flex;gap:10px;margin-top:22px;padding:12px;background:#f8fafc;border:1px solid var(--card-border);border-radius:6px}
.login-tips svg{width:18px;height:18px;color:var(--info);flex:none;margin-top:1px}
.login-tips p{margin:0;font-size:12px;color:var(--text-sub);line-height:1.7}
@media (max-width:900px){
  .login-brand{display:none}
  .login-form-wrap{flex:1;width:auto}
}

/* 输入带图标 */
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--text-muted); }
.input-icon .input { padding-left: 38px; }

/* =========================================================
   产品模具管理 · 两级联动
   ========================================================= */
.split-detail { display: flex; gap: 18px; align-items: flex-start; }
.series-panel { width: 320px; flex: 0 0 320px; }
.mold-panel { flex: 1; min-width: 0; }

/* 产品模具页两列布局 */
.two-col { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 18px; align-items: start; }
.col-left { min-width: 0; }
.col-right { min-width: 0; }
.series-empty { padding:32px 16px;text-align:center;color:var(--text-muted);font-size:13px;line-height:1.7 }

.series-list { max-height: 520px; overflow-y: auto; }
.series-list::-webkit-scrollbar { width: 8px; }
.series-list::-webkit-scrollbar-thumb { background: #d6dbe2; border-radius: 4px; }
.series-item {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 14px; margin-bottom: 2px; border-radius: 6px;
  border-left: 3px solid transparent; cursor: pointer;
  color: var(--text-main); transition: background .12s;
}
.series-item:hover { background: #f3f5f8; }
.series-item.active { background: var(--accent-soft); border-left-color: var(--accent); font-weight: 600; color: #b3530f; }
.series-item .s-name { display: flex; align-items: center; gap: 8px; }
.series-item .s-name svg { width: 15px; height: 15px; color: var(--text-muted); }
.series-item.active .s-name svg { color: var(--accent-hover); }
.series-item .s-count { font-size: 12px; color: var(--text-muted); background: #eef1f4; border-radius: 9px; padding: 1px 9px; }
.series-item.active .s-count { background: #fff; color: #b3530f; }

/* 系列项操作：编辑 / 删除（图标按钮，风格与右侧卡片按钮统一） */
.series-item .s-right { display: flex; align-items: center; gap: 2px; position: relative; flex-shrink: 0; }
.s-act {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 5px; border: 1px solid transparent;
  background: transparent; color: var(--text-muted); cursor: pointer; padding: 0;
  transition: background .12s, color .12s, border-color .12s;
}
.s-act svg { width: 14px; height: 14px; }
.s-act-edit:hover { color: var(--text-main); background: #eef1f4; border-color: var(--card-border); }
.s-act-del { color: var(--danger); }
.s-act-del:hover { background: var(--danger-soft); border-color: #f3b4b4; }
.series-item .s-right .s-act { opacity: 0; }
.series-item:hover .s-right .s-act, .series-item.active .s-right .s-act { opacity: 1; }
.series-item .s-right .s-count { margin-right: 4px; }
/* 排版预览：首个系列默认展示操作与删除确认气泡 */
.series-item.s-preview .s-right .s-act { opacity: 1; }
.series-item .s-pop {
  display: none; position: absolute; top: 30px; right: 0; z-index: 30;
  width: 228px; background: #fff; border: 1px solid var(--card-border);
  border-radius: 8px; box-shadow: 0 8px 24px rgba(16,24,40,.16); padding: 12px;
}
.series-item .s-pop.show { display: block; }
.s-pop .sp-text { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--danger); margin-bottom: 5px; }
.s-pop .sp-text svg { width: 15px; height: 15px; }
.s-pop .sp-desc { font-size: 12px; color: var(--text-sub); line-height: 1.55; margin-bottom: 10px; }
.s-pop .sp-actions { display: flex; justify-content: flex-end; gap: 8px; }
.s-pop .sp-btn { height: 28px; padding: 0 12px; font-size: 12px; border-radius: 5px; cursor: pointer; border: 1px solid var(--card-border); background: #fff; color: var(--text-main); }
.s-pop .sp-cancel:hover { background: #f3f5f8; }
.s-pop .sp-sure { background: var(--danger); border-color: var(--danger); color: #fff; }
.s-pop .sp-sure:hover { background: #b91c1c; }

/* 模具网格 */
.mold-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.mold-item {
  border: 1px solid var(--card-border); border-radius: 6px; padding: 12px 14px;
  background: #fff; transition: border-color .12s, box-shadow .12s;
}
.mold-item:hover { border-color: var(--accent); box-shadow: var(--shadow-card); }
.mold-item .m-name { font-size: 14px; font-weight: 600; color: var(--text-main); margin-bottom: 8px; }
.mold-item .m-meta { font-size: 12px; color: var(--text-sub); display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.mold-item .m-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mold-item .row-actions { gap: 4px; flex-wrap: nowrap; }
.mold-item .btn-sm { padding: 3px 8px; font-size: 12px; }
.mold-item .btn-sm svg { width: 12px; height: 12px; margin-right: 2px; }

/* 开关 */
.switch { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--text-main); }
.switch input { display: none; }
.switch .track {
  width: 36px; height: 20px; border-radius: 10px; background: #d4d9e0; position: relative; transition: background .15s;
}
.switch .track::after {
  content: ""; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%;
  background: #fff; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2);
}
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { left: 18px; }

/* 导出卡片 */
.export-opt {
  display: flex; align-items: center; gap: 14px;
  border: 1px solid var(--card-border); border-radius: 8px; padding: 16px;
  margin-bottom: 12px; transition: border-color .12s, background .12s;
}
.export-opt:hover { border-color: var(--accent); }
.export-opt .opt-icon {
  width: 46px; height: 46px; flex: 0 0 46px; border-radius: 8px;
  background: #eef1f4; display: flex; align-items: center; justify-content: center; color: var(--text-sub);
}
.export-opt .opt-icon svg { width: 24px; height: 24px; }
.export-opt .opt-name { font-size: 15px; font-weight: 600; color: var(--text-main); }
.export-opt .opt-desc { font-size: 12px; color: var(--text-sub); margin-top: 2px; }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #cbd2da; border-radius: 5px; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 徽章别名 ============ */
.badge-success { background: #e6f6ec; color: #15803d; }
.badge-muted { background: #eef1f4; color: #475569; }

/* ============ 弹窗 Modal ============ */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15,23,42,.45);
  display: none; align-items: center; justify-content: center; z-index: 1000;
}
.modal-mask.show { display: flex; }
.modal {
  width: 460px; max-width: calc(100vw - 48px); background: #fff;
  border-radius: 10px; box-shadow: 0 20px 60px rgba(15,23,42,.25);
  overflow: hidden; animation: modalIn .18s ease-out;
}
.modal-title {
  text-align: center;
  font-size: 16px; font-weight: 600; color: var(--text-main);
  padding: 16px 20px 12px; margin: 0;
  border-bottom: 1px solid var(--card-border);
}
.modal-sm { width: 400px; }
@keyframes modalIn { from { opacity:0; transform: translateY(12px) scale(.98);} to {opacity:1; transform:none;} }
.modal-head {
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--card-border);
}
.modal-head span { font-size:15px;font-weight:600;color:var(--text-main); }
.modal-close { background:none;border:none;font-size:22px;line-height:1;color:var(--text-muted);cursor:pointer;padding:0 4px }
.modal-close:hover { color:var(--text-main); }
.modal-body { padding:20px; }
.modal-foot { display:flex;justify-content:flex-end;gap:10px;padding:14px 20px;border-top:1px solid var(--card-border);background:#fafbfc }

/* 弹窗内表单 */
.form-item { margin-bottom:16px }
.form-item:last-child { margin-bottom:0 }
.form-item label { display:block;font-size:13px;font-weight:600;color:var(--text-main);margin-bottom:7px }
.form-item label em { color:var(--danger);font-style:normal;margin-left:2px }
.form-item input, .form-item select { height:38px;font-size:13px }

/* 删除确认 */
.del-confirm { text-align:center }
.del-icon {
  width:48px;height:48px;border-radius:50%;background:#fdeceb;color:var(--danger);
  display:flex;align-items:center;justify-content:center;margin:0 auto 14px;
}
.del-icon svg { width:24px;height:24px }
.del-text { font-size:15px;font-weight:600;color:var(--text-main);margin-bottom:6px }
.del-desc { font-size:13px;color:var(--text-sub);line-height:1.6 }

/* 设备数量徽标 */
.dev-badge {
  display:inline-flex;align-items:center;gap:5px;font-size:12px;color:var(--text-sub);
  background:#f1f5f9;border-radius:5px;padding:3px 8px;
}
.dev-badge svg { width:13px;height:13px }
.mono { font-variant-numeric: tabular-nums; letter-spacing:.3px }

/* 空状态单元格 */
.empty-cell { text-align:center;color:var(--text-muted);padding:40px 12px!important;font-size:13px }

/* 颜色色样 */
.color-swatch {
  width:20px;height:20px;border-radius:4px;border:1px solid #d4d9e0;flex:none;display:inline-block;
}
.cell-flex { display:flex;align-items:center;gap:10px }

/* 查询页筛选栅格（5列） */
.filter-grid-5 { grid-template-columns: repeat(5, minmax(0,1fr)); }
.filter-grid-5 .filter-actions { grid-column: auto; }
.num { text-align:right; font-variant-numeric:tabular-nums }
.nowrap { white-space:nowrap }
.dash { color:#b8c0cc }

/* 空结果 */
.result-empty { padding:48px 20px;text-align:center;color:var(--text-muted) }
.result-empty > svg { width:46px;height:46px;color:#cbd2da;margin-bottom:14px }
.result-empty .re-title { font-size:15px;font-weight:600;color:var(--text-main);margin-bottom:8px }
.result-empty .re-desc { font-size:13px;line-height:1.8;color:var(--text-sub) }

/* 大弹窗与修正表单 */
.modal-lg { width:720px }
.edit-info {
  font-size:13px;color:var(--text-sub);background:#f8fafc;border:1px solid var(--card-border);
  border-radius:6px;padding:9px 12px;margin-bottom:18px;
}
.edit-grid { display:grid;grid-template-columns:1fr 1fr;gap:0 16px }

/* 导出页 */
.export-layout { display:grid;grid-template-columns:1.4fr 1fr;gap:20px;align-items:start }
.exp-grid { display:grid;grid-template-columns:1fr 1fr;gap:16px }
.exp-grid .form-item:last-child:nth-child(odd) { grid-column:1 / -1 }
.radio-card { display:block;cursor:pointer;margin-bottom:16px }
.radio-card input { position:absolute;opacity:0 }
.rc-box {
  display:flex;gap:12px;align-items:flex-start;border:1.5px solid var(--card-border);
  border-radius:8px;padding:14px;background:#fff;transition:.15s;
}
.rc-box > svg { width:30px;height:30px;color:var(--brand);flex-shrink:0;margin-top:2px }
.rc-box b { display:block;font-size:14px;color:var(--text-main);margin-bottom:4px }
.rc-box i { font-style:normal;font-size:12px;color:var(--text-sub);line-height:1.5 }
.radio-card input:checked + .rc-box { border-color:var(--brand);background:var(--brand-tint) }
.exp-note {
  display:flex;gap:8px;align-items:flex-start;font-size:12px;color:var(--text-sub);
  line-height:1.7;background:#f8fafc;border:1px solid var(--card-border);
  border-radius:6px;padding:10px 12px;margin-bottom:18px;
}
.exp-note svg { width:16px;height:16px;color:var(--brand);flex-shrink:0;margin-top:1px }
.btn-export { width:100%;justify-content:center;height:46px;font-size:15px }
.exp-btn-row { display:flex;gap:12px }
.exp-btn-row .btn { flex:1;justify-content:center;height:46px;font-size:15px }
.result-card-meta { font-size:12px;color:var(--text-sub);font-weight:400 }

/* 多选 chips / 复选下拉 */
.chip-row { display:flex;flex-wrap:wrap;gap:8px }
.pick-chip {
  border:1.5px solid var(--card-border);background:#fff;color:var(--text-main);
  border-radius:999px;padding:7px 16px;font-size:13px;cursor:pointer;transition:.15s
}
.pick-chip:hover { border-color:var(--accent) }
.pick-chip.active { background:var(--accent);border-color:var(--accent);color:#fff }
.ms { position:relative }
.ms-trigger {
  width:100%;min-height:40px;border:1px solid var(--input-border);border-radius:6px;
  background:#fff;padding:6px 32px 6px 10px;font-size:13px;color:var(--text-main);
  text-align:left;cursor:pointer;display:flex;flex-wrap:wrap;gap:6px;align-items:center
}
.ms-trigger::after {
  content:"";position:absolute;right:12px;top:50%;width:8px;height:8px;
  border-right:1.5px solid var(--text-sub);border-bottom:1.5px solid var(--text-sub);
  transform:translateY(-70%) rotate(45deg)
}
.ms-placeholder { color:var(--text-sub);font-size:13px }
.ms-tag {
  background:var(--accent-soft);color:var(--accent-hover);
  border-radius:4px;padding:2px 8px;font-size:12px
}
.ms-panel {
  display:none;position:absolute;z-index:60;left:0;right:0;top:calc(100% + 4px);
  max-height:260px;overflow:auto;background:#fff;border:1px solid var(--card-border);
  border-radius:8px;box-shadow:0 12px 32px rgba(15,23,42,.16);padding:6px
}
.ms-panel.open { display:block }
.ms-opt {
  display:flex;align-items:center;gap:8px;padding:8px 10px;border-radius:6px;
  font-size:13px;cursor:pointer
}
.ms-opt:hover { background:#f6f7f9 }
.ms-opt input { accent-color:var(--accent) }
.ms-search {
  width:100%;height:36px;border:1px solid var(--input-border);border-radius:6px;
  padding:0 10px;font-size:13px;margin-bottom:6px;outline:none
}
.ms-search:focus { border-color:var(--accent) }

/* ============ Toast ============ */
.toast-box { position:fixed;top:20px;left:50%;transform:translateX(-50%);z-index:2000;display:flex;flex-direction:column;gap:10px;align-items:center }
.toast {
  display:flex;align-items:center;gap:8px;background:#1e293b;color:#f1f5f9;
  padding:10px 16px;border-radius:8px;font-size:13px;box-shadow:0 8px 24px rgba(15,23,42,.25);
  opacity:0;transform:translateY(-8px);transition:opacity .2s,transform .2s;max-width:90vw;
}
.toast.show { opacity:1;transform:none }
.toast svg { width:16px;height:16px;flex:none }
.toast-success { background:#15803d }
.toast-error { background:#b91c1c }

/* 角色多选 */
.role-checks {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 6px;
}
.role-check {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: all .15s;
}
.role-check:hover {
  border-color: var(--primary);
  background: rgba(240,123,38,.04);
}
.role-check input {
  width: 16px;
  height: 16px;
  accent-color: var(--primary);
}
.role-check span {
  font-weight: 500;
  color: var(--text);
}
.role-check em {
  font-style: normal;
  font-size: 12px;
  color: var(--text-sub);
  margin-left: auto;
}

/* =========================================================
   响应式：平板与手机
   ========================================================= */
.nav-toggle { display:none; }
.nav-overlay {
  display:none; position:fixed; inset:0; z-index:60;
  background:rgba(15,23,42,.5);
}
.nav-overlay.show { display:block; }
.title-wrap { display:flex; align-items:baseline; min-width:0; }

@media (max-width: 1024px) {
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 860px) {
  /* 侧栏变抽屉 */
  .sidebar {
    position:fixed; top:0; left:0; z-index:70; height:100vh; height:100dvh;
    transform:translateX(-100%); transition:transform .25s ease;
    box-shadow:0 0 40px rgba(0,0,0,.3);
  }
  .sidebar.open { transform:translateX(0); }
  .nav-toggle {
    display:inline-flex; align-items:center; justify-content:center;
    width:38px; height:38px; border:1px solid var(--card-border);
    border-radius:8px; background:#fff; color:var(--text-main);
    margin-right:10px; flex:none;
  }
  .nav-toggle svg { width:20px; height:20px; }

  /* 顶栏 */
  .topbar { padding:0 12px; height:auto; min-height:56px; }
  .page-title { font-size:16px; }
  .page-breadcrumb { display:none; }
  .topbar-date { display:none; }
  .user-meta { display:none; }
  .topbar-right { gap:8px; }
  #btnLogout .btn-label, #btnLogout span { }
  .content { padding:14px 12px 32px; }

  /* 两列布局堆叠 */
  .two-col { grid-template-columns: minmax(0,1fr); gap:12px; }
  .series-list { max-height:300px; }

  /* 卡片间距 */
  .card { border-radius:8px; }

  /* 工作台统计 */
  .stat-grid { grid-template-columns: repeat(2, minmax(0,1fr)); gap:12px; }

  /* 弹窗全宽 */
  .modal { width:100%; max-width:calc(100vw - 24px); }
  .modal-lg, .modal-sm { width:100%; max-width:calc(100vw - 24px); }

  /* 导出页 */
  .exp-grid { grid-template-columns: minmax(0,1fr); }
  .exp-btn-row { flex-direction:column; }
  .exp-btn-row .btn { width:100%; }

  /* 多选下拉面板不超出屏幕 */
  .ms-panel {
    position:absolute; left:0; right:0; width:auto; max-width:none;
    max-height:60vh;
  }

  /* 表单控件全宽、字号防止 iOS 缩放 */
  .control, .form-item input, .form-item select, textarea {
    font-size:16px;
  }
}

/* 超小屏 */
@media (max-width: 420px) {
  .stat-grid { grid-template-columns: minmax(0,1fr); }
  .page-title { font-size:15px; }
  #btnLogout span { display:none; }
}

/* ========== 填报入口页 ========== */
.card-body-pad { padding: 22px; }
.entry-layout { max-width: 980px; }
.entry-card .card-head { flex-wrap: wrap; row-gap: 4px; }
.entry-body {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}
.entry-qr {
  border: 1px solid var(--border, #e7eaee);
  border-radius: 10px;
  padding: 16px;
  background: #fff;
  text-align: center;
}
.entry-qr img {
  width: 100%; height: auto; display: block;
  opacity: 0; transition: opacity .25s ease;
}
.entry-qr img.ready { opacity: 1; }
.entry-qr-loading {
  margin-top: -170px; color: var(--text-muted, #6b7280);
  font-size: 13px; min-height: 170px;
  display: flex; align-items: center; justify-content: center;
}
.entry-label {
  font-size: 13px; font-weight: 600; color: var(--text-main, #1f2937);
  margin-bottom: 8px;
}
.entry-url-row {
  display: flex; gap: 10px; margin-bottom: 16px;
}
.entry-url-row .control { flex: 1 1 auto; min-width: 0; background: #f8fafc; }
.entry-url-row .btn { flex: 0 0 auto; }
.entry-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.entry-notes {
  list-style: none; margin: 0; padding: 14px 16px;
  background: #f8fafc; border: 1px solid var(--border, #e7eaee);
  border-radius: 8px;
}
.entry-notes li {
  position: relative; padding-left: 16px;
  font-size: 13px; color: var(--text-muted, #6b7280);
  line-height: 1.9;
}
.entry-notes li::before {
  content: ''; position: absolute; left: 2px; top: 11px;
  width: 5px; height: 5px; border-radius: 50%; background: var(--accent, #f07b26);
}
.entry-toast {
  position: fixed; left: 50%; bottom: 40px; transform: translate(-50%, 12px);
  background: rgba(30,41,59,.94); color: #fff;
  font-size: 14px; padding: 10px 18px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: all .25s ease; z-index: 120;
}
.entry-toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 860px) {
  .entry-body { grid-template-columns: 1fr; gap: 20px; }
  .entry-qr { max-width: 300px; margin: 0 auto; width: 100%; }
  .entry-qr-loading { margin-top: -150px; min-height: 150px; }
}
.toast-info { background:#1e293b }
.paginator {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding: 14px 4px 2px; font-size: 13px; color: #6b7280;
}
.pg-ctrl { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.pg-btn {
  min-width: 30px; height: 30px; padding: 0 10px; font-size: 13px;
  border: 1px solid #d9dee5; border-radius: 6px; background: #fff; color: #1f2937;
  cursor: pointer; line-height: 1;
}
.pg-btn:hover:not(:disabled):not(.active) { border-color: var(--accent); color: var(--accent); }
.pg-btn.active { background: var(--accent); border-color: var(--accent); color: #fff; }
.pg-btn:disabled { opacity: .45; cursor: not-allowed; }
.pg-jump { display: inline-flex; align-items: center; gap: 4px; margin-left: 10px; color: #374151; }
.pg-jump-input {
  width: 56px; height: 30px; padding: 0 8px; text-align: center; font-size: 14px;
  border: 1px solid #d9dee5; border-radius: 6px;
}
.pg-jump-input:focus { outline: none; border-color: var(--accent); }
.table .actions { display: inline-flex; align-items: center; gap: 6px; }
/* ===== 产品模具管理 布局 ===== */
.molds-two { display: grid; grid-template-columns: 280px minmax(0,1fr); gap: 16px; align-items: start; }
.pm-right { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.pm-col { padding: 0; overflow: hidden; }
.pm-col-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--card-border); }
.pm-col-head .card-title { margin: 0; }
.pm-head-stack { display: block; }
.pm-head-stack .pm-head-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pm-head-stack .pm-drag-hint { display: block; margin: 3px 0 0; }
.pm-list { list-style: none; margin: 0; padding: 8px; max-height: 560px; overflow-y: auto; }
/* 产品系列：名称占满，编辑/删除+数量靠右，拉开避免误点 */
.pm-item { display: flex; align-items: center; justify-content: flex-start; gap: 6px; padding: 10px 12px; border-radius: 6px; cursor: pointer; font-size: 14px; color: var(--text-main); }
.pm-item:hover { background: #f3f5f8; }
.pm-item.active { background: #f3e3d2; color: #c2610f; font-weight: 600; }
.pm-item-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 10px; }
.pm-item-ops { display: inline-flex; align-items: center; gap: 1px; flex: none; }
.pm-op { background: none; border: none; font-size: 12px; color: var(--text-muted); cursor: pointer; padding: 2px 4px; white-space: nowrap; border-radius: 4px; }
.pm-op:hover { color: var(--primary); background: rgba(240,123,38,.08); }
.pm-op-danger:hover { color: var(--danger); background: rgba(220,38,38,.08); }
.pm-badge { flex: none; min-width: 24px; height: 22px; padding: 0 7px; border-radius: 11px; background: #eef1f5; color: var(--text-muted); font-size: 12px; line-height: 22px; text-align: center; margin-left: 2px; }
.pm-item.active .pm-badge { background: #ffffff; color: #c2610f; }
/* 产品款式：横排小卡片，紧凑，自带改名/删除 */
.pm-style-list { list-style: none; margin: 0; padding: 10px 12px; display: flex; flex-wrap: wrap; gap: 8px; max-height: 168px; overflow-y: auto; min-height: 56px; align-content: flex-start; }
.pm-style-chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid rgba(240,123,38,.35); border-radius: 6px; padding: 4px 10px; font-size: 12.5px; background: #f3e3d2; cursor: pointer; color: #c2610f; font-weight: 600; max-width: 100%; }
.pm-style-chip:hover { border-color: var(--primary); box-shadow: 0 0 0 1px rgba(240,123,38,.25) inset; }
.pm-style-chip.active { border-color: var(--primary); background: #f3e3d2; color: #c2610f; font-weight: 600; }
.pm-style-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 120px; }
.pm-style-ops { display: inline-flex; gap: 0; flex: none; }
.pm-style-op { background: none; border: none; font-size: 11px; color: var(--text-muted); cursor: pointer; padding: 1px 3px; border-radius: 3px; }
.pm-style-op:hover { color: var(--primary); background: rgba(240,123,38,.1); }
.pm-style-op-danger:hover { color: var(--danger); background: rgba(220,38,38,.1); }
.pm-empty { padding: 18px 16px; margin: 0; color: var(--text-muted); font-size: 13px; text-align: center; display: none; }
.pm-col .table-wrap { border: none; }
/* 模具列表：操作栏隔远、行距紧凑、序号内容垂直居中对齐 */
.pm-mold-table th, .pm-mold-table td { padding-top: 7px; padding-bottom: 7px; }
.pm-mold-table td { vertical-align: middle; }
.pm-mold-table tbody tr[draggable="true"] { cursor: grab; }
.pm-mold-table tbody tr.row-dragging { opacity: .45; background: #fff7ed; }
#product-list li.row-dragging { opacity: .45; background: #fff7ed; }
.pm-mold-table tbody tr.row-drag-target td { border-top: 2px solid var(--accent, #f07b26); }
.pm-drag-hint { font-size: 12px; font-weight: 400; color: #9ca3af; margin-left: 8px; }
.pm-mold-table th:last-child, .pm-mold-table td:last-child { padding-left: 18px; }
.pm-mold-table .cell-center { text-align: center; }
/* 弹窗：移除 hidden 后正常显示（覆盖基础 display:none） */

@media (max-width: 1100px) { .molds-two { grid-template-columns: 240px minmax(0,1fr); } }
@media (max-width: 860px) { .molds-two { grid-template-columns: 1fr; } }
.pm-style-card .modal-label2 { margin-top: 10px; display: block; }

/* 工作台：卡片右上角日期班次徽章 + 右下角班次切换按钮 */
.stat-card { position: relative; }
.scope-badge {
  position: absolute; top: 14px; right: 14px;
  background: #f3e3d2; color: #d66a18; font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
}
.shift-toggle { position: absolute; right: 12px; bottom: 12px; display: flex; gap: 5px; }
.shift-toggle button {
  border: 1.5px solid #cbd5e1; background: #fff; color: #1f2937;
  font-size: 12px; font-weight: 700; line-height: 1; padding: 5px 11px;
  border-radius: 999px; cursor: pointer; transition: color .15s, background .15s, border-color .15s;
}
.shift-toggle button:hover { border-color: #f07b26; color: #f07b26; }
.shift-toggle button.active { background: #f07b26; border-color: #f07b26; color: #fff; }

/* 工作台班次机台记录表：浅蓝表头 + 网格线 + 机台号红字 */
.table-scope { border: 1px solid #dfe5ec; }
.table-scope thead th { background: #d6e9f8; color: #1f2937; }
.table-scope th, .table-scope td { border: 1px solid #e7eaee; }
.table-scope tbody tr:nth-child(even) td { background: #fbfcfe; }
.m-red { color: #dc2626; font-weight: 600; }
.card-sub.scope-full { color: #1f2937; font-weight: 600; font-size: 13px; }

/* 产品模具管理：款式颜色列（每款式一列，单元格从颜色库选色） */
.pm-mold-table .sm-col { min-width: 108px; text-align: center; }
.pm-mold-table .sm-cell { padding: 4px 6px; }
.cell-color-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; min-height: 32px; padding: 4px 8px;
  border: 1px dashed #d6dbe3; border-radius: 6px; background: #fff;
  cursor: pointer; transition: border-color .15s, background .15s;
  font-size: 12.5px; color: var(--text-muted);
}
.cell-color-btn:hover { border-color: var(--primary); background: #fdf6ef; }
.cell-color-btn.has-color { border-style: solid; border-color: #e7eaee; color: var(--text-main); }
.cell-color-btn.has-color:hover { border-color: var(--primary); background: #fdf6ef; }
.color-dot { width: 14px; height: 14px; border-radius: 50%; flex: none; border: 1px solid rgba(31,41,55,.18); box-shadow: 0 0 0 1px rgba(255,255,255,.6) inset; }
.cell-color-label { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 110px; }
.cell-color-empty { font-size: 12px; color: #9ca3af; }

/* 颜色选择弹窗 */
.color-pick-sub { margin: 0 0 10px; font-size: 12.5px; color: var(--text-muted); }
.color-pick-list { max-height: 300px; overflow-y: auto; border: 1px solid #e7eaee; border-radius: 8px; padding: 4px; display: flex; flex-direction: column; gap: 2px; }
.color-pick-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 9px 12px; border: 1px solid transparent; border-radius: 6px;
  background: #fff; cursor: pointer; text-align: left; font-size: 13.5px; color: var(--text-main);
  transition: background .12s, border-color .12s;
}
.color-pick-item:hover { background: #fdf6ef; }
.color-pick-item.selected { border-color: var(--primary); background: #f3e3d2; font-weight: 600; }
.color-pick-name { font-weight: 600; }
.color-pick-none { margin: 0; padding: 18px 10px; text-align: center; color: var(--text-muted); font-size: 13px; }
@media (max-width: 860px) {
  .cell-color-btn { min-height: 40px; }
  .color-pick-item { padding: 11px 12px; }
}

/* =========================================================
   注塑订单（后台下单页）
   ========================================================= */
.inj-layout { display: grid; grid-template-columns: 250px 1fr; gap: 16px; align-items: start; }
.inj-side { position: sticky; top: 12px; max-height: calc(100vh - 90px); display: flex; flex-direction: column; }
.inj-list { overflow-y: auto; padding: 4px 8px 10px; }
.inj-order-item { padding: 9px 10px; border-radius: 6px; cursor: pointer; border: 1px solid transparent; }
.inj-order-item:hover { background: var(--content-bg); }
.inj-order-item.active { background: var(--accent-soft); border-color: rgba(240, 123, 38, .25); }
.inj-order-item .io-line1 { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: 13px; }
.inj-order-item .io-line1 b { color: var(--text-main); }
.inj-order-item .io-ops { display: flex; gap: 8px; flex: none; }
.inj-order-item .io-ops a { font-size: 12px; color: var(--info); }
.inj-order-item .io-ops a.io-del { color: var(--danger); }
.inj-order-item .io-line2 { margin-top: 2px; font-size: 12px; color: var(--text-sub); }
.inj-empty { text-align: center; color: var(--text-muted); font-size: 13px; padding: 28px 0; }

.inj-main { min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.inj-form { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; padding: 4px 16px 0; }
.inj-form .form-item label { display: block; font-size: 12.5px; color: var(--text-sub); margin-bottom: 5px; }
.inj-actions { display: flex; gap: 10px; padding: 14px 16px 16px; }
.inj-actions .btn { min-width: 92px; }

/* 订单号固定前缀 */
.prefix-wrap { position: relative; }
.prefix-wrap .prefix-tag {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--text-sub); font-size: 13.5px; font-weight: 600; pointer-events: none;
}
.prefix-wrap .input { padding-left: 54px; }
/* 颜色列色点 */
.color-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(16, 24, 40, .18); margin-right: 6px; vertical-align: -1.5px;
}

.inj-table th, .inj-table td { white-space: nowrap; }
.inj-table td { padding: 6px 8px; }
.inj-table .io-mold { font-weight: 600; color: var(--text-main); }
.inj-table .io-muted { color: var(--text-sub); }
.inj-table .io-color { font-size: 12.5px; }
.inj-table .io-auto { color: var(--text-main); font-weight: 600; }
.cell-input { width: 100%; min-width: 58px; border: 1px solid transparent; background: var(--content-bg); border-radius: 5px; padding: 5px 7px; font-size: 13px; color: var(--text-main); text-align: right; transition: border-color .15s, background .15s; }
select.cell-input, select.cell-select { text-align: left; cursor: pointer; }
.cell-input:hover { border-color: var(--input-border); }
.cell-input:focus { outline: none; border-color: var(--accent); background: #fff; }
.io-row-del { font-size: 12px; color: var(--danger); }
.inj-placeholder { text-align: center; color: var(--text-muted); padding: 34px 10px; font-size: 13px; }

/* 模具明细标题：产品/款式橙色加粗醒目 */
.inj-title-hl { font-size: 14px; font-weight: 700; color: var(--accent); margin-left: 10px; }
.inj-title-hl + .inj-title-hl { margin-left: 6px; }
.inj-remark .inj-textarea { width: 100%; min-height: 120px; resize: vertical; line-height: 1.6; }

@media (max-width: 1100px) {
  .inj-layout { grid-template-columns: 1fr; }
  .inj-side { position: static; max-height: 260px; }
  .inj-form { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 640px) {
  .inj-form { grid-template-columns: repeat(2, 1fr); }
  .inj-actions { flex-wrap: wrap; }
  .inj-actions .btn { min-width: calc(50% - 5px); }
}

/* 打印：公司抬头 + 订单区紧凑排版（9pt 级，参考 excel 9 号字体） */
.print-head { display: none; }
@media print {
  @page { size: A4 portrait; margin: 10mm 8mm; }
  .sidebar, .topbar, .inj-side, .inj-actions, #delModal, .nav-toggle, .nav-overlay,
  .inj-form-card, .io-row-del, .inj-table th:last-child, .inj-table td:last-child { display: none !important; }
  .app-shell { display: block; }
  .main, .content { padding: 0; margin: 0; }
  .inj-layout { display: block; }
  .card { box-shadow: none; border: 1px solid #bbb; border-radius: 4px; break-inside: avoid; margin-bottom: 8px; overflow: hidden; }
  .card-head { padding: 6px 10px 2px; }
  .card-title { font-size: 10.5pt; }
  .card-sub { font-size: 8.5pt; }
  body, .inj-table, .inj-textarea, .cell-input { font-size: 9pt; }
  .inj-table th, .inj-table td { padding: 3px 5px !important; white-space: nowrap; }
  .inj-table { min-width: 0 !important; }
  .cell-input { border: none; background: none; padding: 0; text-align: right; min-width: 0; }
  select.cell-input, select.cell-select { text-align: center; appearance: none; }
  .inj-table .io-color { font-size: 8.5pt; }
  .color-dot { width: 9px; height: 9px; margin-right: 3px; vertical-align: -1px; }
  .inj-title-hl { font-size: 10pt; }
  /* 备注完整显示 */
  .inj-remark { display: flex; flex-direction: column; }
  .inj-remark .inj-textarea { flex: 1; min-height: 84px; border: 1px solid #bbb; background: none; font-size: 9pt; }
  /* 公司抬头 */
  .print-head { display: block; text-align: center; margin-bottom: 8px; page-break-inside: avoid; }
  .print-head .print-company { font-size: 16pt; font-weight: 700; margin: 0 0 4px; letter-spacing: 2px; }
  .print-head .print-sub { font-size: 11pt; font-weight: 600; margin-bottom: 8px; }
  .print-head .print-meta { display: flex; flex-wrap: wrap; justify-content: space-between; text-align: left; font-size: 9pt; gap: 4px 18px; }
  .print-head .print-meta b { font-weight: 700; }
}
