/* 订单管理系统后台 · 浅蓝青科技风
   严格对齐《设计图与原型/后台-全站设计稿集.html》 */

:root{
  --blue:#2563EB; --cyan:#06B6D4; --ink:#0b1733; --muted:#5b6b85;
  --bd:rgba(37,99,235,.20); --card:rgba(255,255,255,.72); --glow:rgba(37,99,235,.22);
  --line:rgba(15,23,42,.08); --bg1:#EAF1FF; --bg2:#DCE8FB;
}
*{ margin:0; padding:0; box-sizing:border-box; }
html,body{ height:100%; font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; color:var(--ink); }
body{ background:linear-gradient(135deg,var(--bg1),var(--bg2)); min-height:100vh; }
/* 网格背景 */
body::before{
  content:""; position:fixed; inset:0; pointer-events:none; z-index:0; opacity:.55;
  background-image:linear-gradient(rgba(20,35,70,.05) 1px,transparent 1px),linear-gradient(90deg,rgba(20,35,70,.05) 1px,transparent 1px);
  background-size:42px 42px;
}
.hide{ display:none !important; }

/* ===== 外壳 ===== */
.shell{ display:grid; grid-template-columns:232px 1fr; min-height:100vh; position:relative; z-index:1; }

/* ===== 侧边栏 ===== */
.sidebar{
  background:rgba(255,255,255,.68); backdrop-filter:blur(20px) saturate(150%);
  border-right:1px solid var(--line); padding:22px 14px; position:sticky; top:0; height:100vh; overflow-y:auto;
}
.logo{ display:flex; align-items:center; gap:11px; padding:0 8px 20px; }
.logo .mark{
  width:38px; height:38px; border-radius:11px; background:linear-gradient(135deg,var(--blue),var(--cyan));
  display:flex; align-items:center; justify-content:center; color:#fff; font-weight:800; box-shadow:0 6px 18px var(--glow);
}
.logo .name{ font-size:15px; font-weight:700; letter-spacing:.5px; }
.logo .name small{ display:block; font-size:11px; color:var(--muted); font-weight:400; letter-spacing:0; }
.nav-group{ margin-bottom:6px; }
.nav-group .g-title{ font-size:11px; color:#9aa6bb; padding:14px 10px 7px; letter-spacing:1px; }
.nav-item{
  display:flex; align-items:center; gap:9px; padding:9px 11px; border-radius:10px; cursor:pointer;
  font-size:13.5px; color:#3a4760; transition:.18s; margin-bottom:2px;
}
.nav-item:hover{ background:rgba(37,99,235,.08); color:var(--ink); }
.nav-item.on{ background:linear-gradient(135deg,var(--blue),var(--cyan)); color:#fff; font-weight:600; box-shadow:0 4px 14px var(--glow); }
.nav-item .dot{ width:5px; height:5px; border-radius:50%; background:currentColor; opacity:.45; }

/* ===== 顶部栏 ===== */
.topbar{
  position:sticky; top:0; z-index:20; display:flex; align-items:center; gap:14px; padding:13px 26px;
  background:rgba(255,255,255,.78); backdrop-filter:blur(16px); border-bottom:1px solid var(--line);
}
.crumb{ font-size:13px; color:var(--muted); }
.crumb b{ color:var(--ink); font-size:15px; display:block; }
.search{ margin-left:auto; display:flex; align-items:center; gap:7px; padding:8px 13px; border-radius:10px;
  background:rgba(15,23,42,.045); border:1px solid var(--line); color:#8492a8; font-size:13px; min-width:200px; }
.search input{ border:0; background:transparent; outline:none; font-family:inherit; font-size:13px; color:var(--ink); width:100%; }
.icon-btn{ width:34px; height:34px; border-radius:10px; background:rgba(15,23,42,.045); border:1px solid var(--line);
  display:flex; align-items:center; justify-content:center; cursor:pointer; color:#5b6b85; position:relative; flex:none; }
.icon-btn:hover{ background:#fff; color:var(--blue); }
.icon-btn .red{ position:absolute; top:6px; right:7px; width:6px; height:6px; border-radius:50%; background:#EF4444; }
.view-switch{ display:flex; background:rgba(15,23,42,.05); border:1px solid var(--line); border-radius:10px; padding:3px; }
.view-switch button{ border:0; background:transparent; padding:6px 12px; font-size:12.5px; color:#5b6b85; border-radius:8px; cursor:pointer; }
.view-switch button.on{ background:#fff; color:var(--ink); font-weight:600; box-shadow:0 2px 6px rgba(20,40,80,.08); }
.user-chip{ display:flex; align-items:center; gap:9px; font-size:13px; }
.avatar{ width:34px; height:34px; border-radius:50%; background:linear-gradient(135deg,var(--blue),var(--cyan));
  color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; font-weight:700; flex:none; }
.demo-badge{ position:fixed; right:18px; bottom:18px; z-index:60; font-size:11.5px; color:var(--blue);
  background:rgba(255,255,255,.8); border:1px solid var(--bd); padding:6px 12px; border-radius:999px; backdrop-filter:blur(8px); }

/* ===== 内容区 ===== */
.main{ padding:24px 26px 60px; }
.page-head{ display:flex; align-items:flex-end; gap:14px; margin-bottom:18px; }
.page-head h2{ font-size:21px; font-weight:700; }
.page-head .desc{ font-size:13px; color:var(--muted); margin-top:4px; }
.page-head .actions{ margin-left:auto; display:flex; gap:9px; }

.card{
  background:var(--card); backdrop-filter:blur(18px) saturate(140%);
  border:1px solid var(--bd); border-radius:16px; padding:20px; margin-bottom:16px;
  box-shadow:0 14px 40px rgba(20,40,80,.08), inset 0 1px 0 rgba(255,255,255,.6);
}
.card h3{ font-size:15px; font-weight:700; margin-bottom:14px; display:flex; align-items:center; gap:8px; }
.card h3 .sub{ font-size:12px; color:var(--muted); font-weight:400; }

/* 按钮 */
.btn{ padding:9px 16px; border-radius:10px; font-size:13.5px; cursor:pointer; border:1px solid var(--line);
  background:rgba(255,255,255,.75); color:var(--ink); font-weight:500; transition:.18s; }
.btn:hover{ background:#fff; box-shadow:0 3px 10px rgba(20,40,80,.08); }
.btn-primary{ background:linear-gradient(135deg,var(--blue),var(--cyan)); color:#fff; border:0; font-weight:600; box-shadow:0 6px 18px var(--glow); }
.btn-primary:hover{ background:linear-gradient(135deg,#1D4ED8,#0891B2); color:#fff;
  box-shadow:0 8px 22px var(--glow); transform:translateY(-1px); }
.btn-primary:active{ transform:translateY(0); box-shadow:0 4px 14px var(--glow); }
.btn-sm{ padding:6px 12px; font-size:12.5px; border-radius:8px; }
.btn-ghost{ background:transparent; color:var(--blue); border-color:var(--bd); }

/* 订单详情：右侧悬浮操作按钮（添加类操作集中于此；编辑类操作保持原位） */
.detail-fab{ position:fixed; right:18px; bottom:18px; z-index:72; display:flex; flex-direction:column; gap:12px; align-items:flex-end; }
.detail-fab .fab-item{
  padding:11px 16px; border:0; border-radius:14px; cursor:pointer; font-size:13.5px; font-weight:600; color:#fff;
  background:linear-gradient(135deg,var(--blue),var(--cyan)); box-shadow:0 8px 22px var(--glow);
  display:flex; align-items:center; gap:6px; transition:.18s; white-space:nowrap;
}
.detail-fab .fab-item:hover{ transform:translateY(-2px); box-shadow:0 12px 28px var(--glow); }
.detail-fab .fab-item:active{ transform:translateY(0); }

/* 筛选条 */
.filters{ display:flex; gap:10px; align-items:center; flex-wrap:wrap; margin-bottom:14px; }
.filters select, .filters input{
  padding:8px 12px; border-radius:9px; border:1px solid var(--line); background:rgba(255,255,255,.7);
  font-size:13px; color:var(--ink); outline:none; font-family:inherit;
}
.filters .grow{ flex:1; }

/* 表格 */
table{ width:100%; border-collapse:collapse; font-size:13.5px; }
th{ text-align:left; font-size:12px; color:#8492a8; font-weight:500; padding:11px 10px; border-bottom:1px solid var(--line); }
td{ padding:13px 10px; border-bottom:1px solid rgba(15,23,42,.05); }
tbody tr:hover{ background:rgba(37,99,235,.05); }
td.num{ font-weight:600; }
.muted{ color:#9aa6bb; }

/* 标签 */
.tag{ display:inline-block; padding:4px 10px; border-radius:7px; font-size:11.5px; font-weight:600; }
.tag.blue{ background:rgba(37,99,235,.12); color:#2563EB; }
.tag.cyan{ background:rgba(6,182,212,.14); color:#0891B2; }
.tag.orange{ background:rgba(245,158,11,.14); color:#D97706; }
.tag.gray{ background:rgba(100,116,139,.12); color:#64748B; }
.tag.red{ background:rgba(239,68,68,.12); color:#DC2626; }
.tag.green{ background:rgba(16,185,129,.14); color:#059669; }

/* 金额脱敏：成员视图下金额与应收统一显示为 —— */
.amt i{ display:none; font-style:normal; color:#9aa6bb; }
body.is-member .amt b{ display:none; }
body.is-member .amt i{ display:inline; }

/* KPI */
.kpi-grid{ display:grid; grid-template-columns:repeat(4,1fr); gap:14px; margin-bottom:16px; }
.kpi{
  background:var(--card); backdrop-filter:blur(18px) saturate(140%); border:1px solid var(--bd);
  border-radius:16px; padding:18px; box-shadow:0 12px 34px rgba(20,40,80,.07), inset 0 1px 0 rgba(255,255,255,.6);
}
.kpi .lab{ font-size:12.5px; color:var(--muted); display:flex; align-items:center; gap:7px; }
.kpi .ic{ width:26px; height:26px; border-radius:8px; background:linear-gradient(135deg,var(--blue),var(--cyan));
  color:#fff; display:flex; align-items:center; justify-content:center; font-size:13px; flex:none; }
.kpi .val{ font-size:30px; font-weight:800; margin:10px 0 4px; letter-spacing:-.5px; }
.kpi .trend{ font-size:12px; color:#0891B2; }
.kpi .trend.warn{ color:#D97706; }

/* 产能月历 */
.cal{ display:grid; grid-template-columns:repeat(7,1fr); gap:7px; }
.cal .hd{ text-align:center; font-size:11.5px; color:#8492a8; padding-bottom:4px; }
.cal .cell{
  background:rgba(255,255,255,.6); border:1px solid var(--line); border-radius:10px; padding:8px 7px; min-height:74px;
}
.cal .cell .d{ font-size:12px; color:#5b6b85; font-weight:600; }
.cal .cell .ev{ font-size:11px; margin-top:4px; padding:3px 5px; border-radius:5px; background:rgba(37,99,235,.12); color:#2563EB; }
.cal .cell .ev.full{ background:rgba(239,68,68,.14); color:#DC2626; }
.cal .cell.empty{ opacity:.45; }
.cal .cell.today{ border-color:var(--blue); box-shadow:0 0 0 2px rgba(37,99,235,.15); }

/* 时间轴（场次详情的执行节点） */
.timeline{ position:relative; padding-left:22px; }
.timeline::before{ content:""; position:absolute; left:6px; top:6px; bottom:6px; width:2px;
  background:linear-gradient(180deg,var(--blue),var(--cyan)); opacity:.35; }
.tl-item{ position:relative; margin-bottom:16px; }
.tl-item::before{ content:""; position:absolute; left:-20px; top:4px; width:10px; height:10px; border-radius:50%;
  background:linear-gradient(135deg,var(--blue),var(--cyan)); box-shadow:0 0 0 3px rgba(37,99,235,.15); }
.tl-item .t{ font-size:12px; color:var(--muted); }
.tl-item .n{ font-size:14px; font-weight:600; margin:3px 0; }
.tl-item .m{ font-size:12.5px; color:#3a4760; }

/* 表单 */
.form-grid{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.field{ margin-bottom:15px; }
.field label{ display:block; font-size:12.5px; color:#3a4760; margin-bottom:7px; }
.field input, .field textarea, .field select{
  width:100%; padding:11px 13px; border-radius:10px; font-size:13.5px; color:var(--ink);
  background:rgba(255,255,255,.7); border:1px solid var(--line); outline:none; font-family:inherit;
}
.field input:focus, .field textarea:focus, .field select:focus{ border-color:var(--blue); box-shadow:0 0 0 3px var(--glow); }
.hint{ font-size:12px; color:#D97706; background:rgba(245,158,11,.1); padding:8px 11px; border-radius:8px; margin-top:8px; }
.field.sec{ grid-column:1/3; margin:6px 0 2px; padding-top:12px; border-top:1px dashed var(--line); }
.field.sec span{ font-size:12px; font-weight:600; color:var(--blue); letter-spacing:.5px; }

/* 抽屉 / 弹窗 */
.mask{ position:fixed; inset:0; background:rgba(11,23,51,.35); backdrop-filter:blur(3px); z-index:70; display:flex; }
.drawer{
  margin-left:auto; width:520px; height:100%; background:rgba(255,255,255,.94); backdrop-filter:blur(20px);
  padding:22px; overflow-y:auto; box-shadow:-16px 0 50px rgba(20,40,80,.18);
}
.modal{
  margin:auto; width:820px; max-width:92%; background:rgba(255,255,255,.94); backdrop-filter:blur(20px);
  border-radius:18px; padding:24px; box-shadow:0 30px 70px rgba(20,40,80,.25); max-height:88vh; overflow-y:auto;
}
.mask-head{ display:flex; align-items:center; margin-bottom:18px; }
.mask-head h3{ font-size:17px; font-weight:700; }
.mask-head .x{ margin-left:auto; cursor:pointer; color:#8492a8; font-size:18px; }
.split{ display:grid; grid-template-columns:1fr 1fr; gap:16px; }
.parse-box{ background:rgba(255,255,255,.7); border:1px solid var(--bd); border-radius:12px; padding:14px; }
.parse-box h4{ font-size:13px; margin-bottom:10px; color:var(--blue); }
.toast{ position:fixed; top:18px; left:50%; transform:translateX(-50%); z-index:99; padding:10px 18px;
  border-radius:10px; background:rgba(11,23,51,.9); color:#fff; font-size:13px; }

/* 出库单图片预览（80mm 热敏纸风） */
.receipt{ width:320px; margin:0 auto; background:#fff; border:1px solid var(--line); border-radius:8px;
  padding:18px; font-size:12.5px; box-shadow:0 10px 30px rgba(20,40,80,.12); }
.receipt h4{ text-align:center; font-size:14px; margin-bottom:4px; }
.receipt .meta{ text-align:center; font-size:11px; color:#8492a8; margin-bottom:12px; }
.receipt table{ font-size:12px; }
.receipt td{ padding:6px 4px; }
.receipt .foot{ text-align:center; font-size:11px; color:#8492a8; margin-top:12px;
  border-top:1px dashed var(--line); padding-top:10px; }

/* ===== 登录 / 认证页（全屏）===== */
.auth{ display:grid; grid-template-columns:1.05fr 1fr; min-height:100vh; position:relative; overflow:hidden; z-index:1; }
.auth .orb{ position:absolute; border-radius:50%; filter:blur(95px); opacity:.5; }
.auth .orb.a{ width:520px; height:520px; top:-180px; right:-120px; background:var(--blue); }
.auth .orb.b{ width:440px; height:440px; bottom:-180px; left:-120px; background:var(--cyan); opacity:.32; }
.auth-banner{ position:relative; z-index:2; padding:64px 60px; display:flex; flex-direction:column; justify-content:center; }
.auth-banner .hero{ font-size:46px; line-height:1.22; font-weight:700; }
.auth-banner .hero em{ font-style:normal; color:var(--blue); }
.auth-banner .sub{ margin-top:20px; font-size:15px; line-height:1.7; color:var(--muted); max-width:430px; }
.auth-banner .feats{ margin-top:42px; display:flex; flex-direction:column; gap:18px; }
.auth-banner .feat{ display:flex; align-items:center; gap:14px; color:#33415a; font-size:14.5px; }
.auth-banner .feat .ic{ width:34px; height:34px; border-radius:9px; background:rgba(255,255,255,.7); border:1px solid var(--bd);
  display:flex; align-items:center; justify-content:center; color:var(--blue); flex:none; }
.auth-panel{ position:relative; z-index:2; display:flex; align-items:center; justify-content:center; padding:48px 56px; }
.auth-glass{ width:100%; max-width:400px; background:var(--card); backdrop-filter:blur(22px) saturate(150%);
  border:1px solid var(--bd); border-radius:22px; padding:38px 34px;
  box-shadow:0 24px 60px rgba(20,40,80,.12), inset 0 1px 0 rgba(255,255,255,.7); }
.seg{ display:flex; background:rgba(15,23,42,.05); border:1px solid var(--line); border-radius:11px; padding:4px; margin-bottom:22px; }
.seg button{ flex:1; border:0; background:transparent; color:#5b6b85; font-size:13.5px; padding:9px; border-radius:8px; cursor:pointer; font-family:inherit; }
.seg button.on{ background:#fff; color:var(--ink); font-weight:600; box-shadow:0 2px 8px rgba(20,40,80,.08); }
/* 两个 Tab 等高 —— 切换时整卡不伸缩、不晃动 */
.auth-form{ min-height:300px; }
.badge-demo{ display:inline-flex; align-items:center; gap:6px; font-size:11.5px; color:var(--blue);
  background:rgba(255,255,255,.6); border:1px solid var(--bd); padding:5px 11px; border-radius:999px; margin-bottom:18px; }
.panel-title{ font-size:22px; font-weight:700; color:var(--ink); margin-bottom:6px; }
.panel-sub{ font-size:13px; color:var(--muted); margin-bottom:22px; }
.row{ display:flex; align-items:center; justify-content:space-between; margin:6px 0 18px; font-size:12.5px; }
.row label{ display:flex; align-items:center; gap:7px; color:#3a4760; cursor:pointer; }
.foot, .auth-foot{ margin-top:20px; font-size:11.5px; color:#8a96ab; text-align:center; line-height:1.6; }
.qr{ text-align:center; padding:8px 0 4px; }
.qr .box{ width:178px; height:178px; margin:0 auto 16px; border-radius:16px;
  background:repeating-linear-gradient(0deg,#0b1020 0 8px,transparent 8px 16px),
             repeating-linear-gradient(90deg,#0b1020 0 8px,transparent 8px 16px);
  background-color:#fff; background-blend-mode:difference; border:1px solid var(--line); position:relative; overflow:hidden; }
.qr .box::after{ content:"扫码登录"; position:absolute; inset:0; display:flex; align-items:center; justify-content:center;
  color:#cfd6e6; font-size:13px; background:rgba(11,16,32,.55); }
.qr p{ font-size:13px; color:var(--muted); }
.err{ color:#DC2626; font-size:12.5px; margin-top:8px; min-height:16px; }

@media(max-width:900px){
  .shell{ grid-template-columns:1fr; } .sidebar{ display:none; }
  .auth{ grid-template-columns:1fr; } .auth-banner{ display:none; }
  .kpi-grid{ grid-template-columns:repeat(2,1fr); }
  .search{ display:none; }
}

/* ===== M5 · 打印：80×50mm 标签实物预览 ===== */
.label-preview{ position:relative; width:320px; height:200px; margin:4px auto 0; background:#fff;
  border:1px dashed #94A3B8; border-radius:6px; padding:10px 12px; box-shadow:0 6px 18px rgba(37,99,235,.08); }
.label-preview .lp-title{ font-size:14px; font-weight:700; line-height:1.2; margin-bottom:3px; max-width:180px; }
.label-preview .lp-row{ font-size:10.5px; color:#334155; line-height:1.45; max-width:180px;
  overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.label-preview .lp-sep{ font-size:10.5px; color:#2563EB; margin:4px 0 2px; max-width:180px; }
.label-preview .lp-seq{ position:absolute; left:12px; bottom:10px; font-size:13px; font-weight:700; color:#0F172A; }
.label-preview .lp-qr{ position:absolute; right:10px; top:10px; width:96px; height:96px; image-rendering:pixelated; }
.label-preview .lp-code{ position:absolute; right:12px; top:112px; font-size:9px; color:#64748B; letter-spacing:.3px; }
.row-fail{ background:rgba(239,68,68,.06); }
code{ background:rgba(37,99,235,.08); color:#2563EB; padding:1px 5px; border-radius:5px; font-size:12px; }

/* 客户详情：键值对 */
.kv{ display:grid; grid-template-columns:1fr 1fr; gap:14px 18px; margin-bottom:16px; }
.kv > div{ display:flex; flex-direction:column; gap:4px; }
.kv span{ font-size:11.5px; color:#8492a8; }
.kv b{ font-size:14px; font-weight:600; word-break:break-all; }
.tdot{ display:inline-block; margin-left:6px; font-size:11px; color:#2563EB; background:rgba(37,99,235,.1);
  padding:1px 7px; border-radius:6px; font-weight:500; }
.stat-row{ display:grid; grid-template-columns:repeat(3,1fr); gap:12px; margin:6px 0 4px; }
.stat{ background:rgba(255,255,255,.6); border:1px solid var(--line); border-radius:13px; padding:14px; text-align:center; }
.stat .v{ font-size:24px; font-weight:800; letter-spacing:-.5px; }
.stat .l{ font-size:12px; color:#8492a8; margin-top:4px; }
.nl-row{ display:flex; gap:8px; align-items:center; margin:8px 0; }
.nl-t{ width:48px; font-size:13px; color:var(--blue); font-weight:600; flex:0 0 auto; }
