*{box-sizing:border-box}
html{-webkit-text-size-adjust:100%}
body{margin:0;font-family:-apple-system,"PingFang SC","Microsoft YaHei","Noto Sans CJK SC",sans-serif;font-size:15px;color:#1d2129;background:#f3f4f6;line-height:1.5}
a{color:#1557d6;text-decoration:none}
header.top{background:#1f2937;color:#fff;padding:8px 12px;display:flex;align-items:center;gap:12px;flex-wrap:wrap;position:sticky;top:0;z-index:10}
header.top a{color:#e5e7eb}
header.top .brand{font-weight:700;color:#fff}
header.top nav{display:flex;gap:12px;flex-wrap:wrap;flex:1}
header.top .me{font-size:13px;color:#9ca3af;display:flex;gap:8px;align-items:center}
header.top form{display:inline}
header.top button{background:none;border:0;color:#9ca3af;padding:0;font-size:13px;cursor:pointer}
.badge-n{background:#dc2626;color:#fff;border-radius:9px;padding:0 6px;font-size:12px;margin-left:2px}
main{max-width:1100px;margin:0 auto;padding:12px}
h1{font-size:20px;margin:8px 0 12px}
h2{font-size:17px;margin:18px 0 8px}
.card{background:#fff;border-radius:8px;padding:12px;margin-bottom:12px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.flash{padding:10px 12px;border-radius:6px;margin-bottom:10px}
.flash.ok{background:#e7f6ec;color:#14532d}
.flash.error{background:#fdecec;color:#991b1b}
table{width:100%;border-collapse:collapse;background:#fff}
th,td{padding:7px 8px;border-bottom:1px solid #eef0f3;text-align:left;vertical-align:top}
th{background:#f8fafc;font-weight:600;font-size:13px;color:#4b5563;white-space:nowrap}
.tbl-wrap{overflow-x:auto;border-radius:8px;box-shadow:0 1px 2px rgba(0,0,0,.06);margin-bottom:12px}
label{display:block;font-size:13px;color:#4b5563;margin:8px 0 3px}
input[type=text],input[type=number],input[type=date],input[type=password],select,textarea{width:100%;padding:9px 10px;border:1px solid #d1d5db;border-radius:6px;font-size:16px;background:#fff;font-family:inherit}
textarea{min-height:64px}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(230px,1fr));gap:0 14px}
.btn{display:inline-block;padding:9px 16px;border-radius:6px;border:1px solid #d1d5db;background:#fff;color:#1d2129;font-size:15px;cursor:pointer;font-family:inherit}
.btn.primary{background:#1557d6;border-color:#1557d6;color:#fff}
.btn.danger{background:#dc2626;border-color:#dc2626;color:#fff}
.btn.ok{background:#15803d;border-color:#15803d;color:#fff}
.btn.big{width:100%;padding:13px;font-size:17px}
.btn.sm{padding:4px 10px;font-size:13px}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.muted{color:#6b7280;font-size:13px}
.red{color:#c00}
.st{display:inline-block;padding:1px 8px;border-radius:10px;font-size:12px;background:#e5e7eb;color:#374151;white-space:nowrap}
.st-submitted{background:#fef3c7;color:#92400e}.st-approved{background:#dbeafe;color:#1e40af}
.st-rejected{background:#fee2e2;color:#991b1b}.st-in_production{background:#e0e7ff;color:#3730a3}
.st-ready_to_ship{background:#dcfce7;color:#166534}.st-shipped{background:#d1fae5;color:#065f46}
.st-cancelled{background:#f3f4f6;color:#9ca3af;text-decoration:line-through}
.st-hold{background:#dc2626;color:#fff}
.u-late{color:#b91c1c;font-weight:600}.u-due_today{color:#c2410c;font-weight:600}.u-due_soon{color:#a16207}
.alert{padding:12px;border-radius:8px;margin-bottom:12px;font-weight:600}
.alert.red{background:#dc2626;color:#fff}
.alert.yellow{background:#fef3c7;color:#92400e}
.stages{display:grid;grid-template-columns:repeat(auto-fill,minmax(140px,1fr));gap:8px}
.stage{border:1px solid #e5e7eb;border-radius:8px;padding:8px;background:#fff}
.stage.done{background:#ecfdf5;border-color:#a7f3d0}
.stage .n{font-weight:700}
.bar{height:6px;background:#e5e7eb;border-radius:3px;overflow:hidden;margin:4px 0}
.bar i{display:block;height:100%;background:#2563eb}
.thumbs img{max-width:120px;max-height:120px;border-radius:4px;border:1px solid #e5e7eb;margin:2px}
.kv{display:grid;grid-template-columns:90px 1fr;gap:2px 10px;font-size:14px}
.kv dt{color:#6b7280}.kv dd{margin:0}
details summary{cursor:pointer;color:#1557d6;padding:4px 0}
.diff{font-size:13px}
@media (max-width:600px){main{padding:8px}.hide-sm{display:none}}
@media (max-width:600px){
 header.top{gap:6px;padding:6px 10px}
 header.top nav{flex-wrap:nowrap;overflow-x:auto;gap:14px;order:3;flex-basis:100%;white-space:nowrap;padding-bottom:2px}
 header.top .me{margin-left:auto;font-size:12px}
}
.stage.late{border-color:#fca5a5;background:#fef2f2}
/* ---------- V2.0：老人机式岗位页面（大按钮、大字、一步一操作） ---------- */
.big-actions{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px;margin:10px 0}
.big-btn{display:flex;align-items:center;justify-content:center;gap:8px;min-height:76px;padding:12px;border-radius:12px;
 background:#1557d6;color:#fff;font-size:22px;font-weight:700;border:0;cursor:pointer;text-align:center;width:100%;font-family:inherit}
.big-btn.green{background:#15803d}.big-btn.red{background:#dc2626}.big-btn.grey{background:#6b7280}
.big-btn .ico{font-size:28px}
a.big-btn{color:#fff}
.step{background:#fff;border-radius:12px;padding:14px;margin-bottom:12px;border-left:6px solid #1557d6}
.step h3{margin:0 0 10px;font-size:20px}
.step h3 .n{display:inline-block;width:32px;height:32px;line-height:32px;border-radius:16px;background:#1557d6;color:#fff;
 text-align:center;margin-right:8px;font-size:18px}
.qty-input{font-size:30px!important;padding:14px!important;text-align:center;font-weight:700}
.big-file{font-size:18px;padding:12px;border:2px dashed #9ca3af;border-radius:10px;width:100%;background:#f9fafb}
.choice{display:flex;gap:10px;flex-wrap:wrap}
.choice label{flex:1;min-width:120px;margin:0;display:flex;align-items:center;justify-content:center;gap:8px;min-height:64px;
 border:2px solid #d1d5db;border-radius:10px;font-size:20px;color:#111;background:#fff;cursor:pointer}
.choice input{width:22px;height:22px}
.choice label:has(input:checked){border-color:#1557d6;background:#eff6ff}
.spec-big{font-size:20px;line-height:1.6}
.spec-big b{color:#b91c1c}
.bars{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:8px}
.barbox{background:#fff;border-radius:8px;padding:8px 10px;border:1px solid #e5e7eb}
.barbox .t{display:flex;justify-content:space-between;font-weight:600}
.barbox .bar{height:10px}
.barbox .bar i.ok{background:#16a34a}
.kpi{display:grid;grid-template-columns:repeat(auto-fill,minmax(150px,1fr));gap:10px}
.kpi a,.kpi div.k{display:block;background:#fff;border-radius:10px;padding:12px;box-shadow:0 1px 2px rgba(0,0,0,.06);color:#1d2129}
.kpi .v{font-size:26px;font-weight:700}.kpi .l{color:#6b7280;font-size:13px}
.kpi .warn .v{color:#b91c1c}
.wall{display:grid;grid-template-columns:repeat(auto-fill,minmax(170px,1fr));gap:10px}
.wall .ph{background:#fff;border-radius:8px;overflow:hidden;box-shadow:0 1px 2px rgba(0,0,0,.08);font-size:12px}
.wall .ph img{width:100%;height:150px;object-fit:cover;display:block;background:#eee}
.wall .ph div{padding:6px 8px}
.badge-urgent{background:#dc2626;color:#fff;border-radius:4px;padding:0 6px;font-size:12px;font-weight:700}
.st-completed{background:#e5e7eb;color:#374151}
.money{font-variant-numeric:tabular-nums}
.tabs{display:flex;gap:6px;margin-bottom:10px;flex-wrap:wrap}.tabs a{padding:6px 12px;border-radius:16px;background:#fff;border:1px solid #d1d5db}
.tabs a.on{background:#1557d6;color:#fff;border-color:#1557d6}
fieldset{border:1px solid #e5e7eb;border-radius:8px;padding:8px 12px;margin:10px 0}
legend{font-weight:600;color:#374151;padding:0 6px}
.hint{background:#eff6ff;color:#1e3a8a;padding:8px 10px;border-radius:6px;font-size:14px;margin:6px 0}

/* 拍照控件 */
.pf-hidden{position:absolute;left:-9999px;width:1px;height:1px;opacity:0}
.pf-add{width:100%;font-size:24px}
.pf-info{font-size:20px;margin:8px 0;color:#374151}
.pf-list{display:flex;flex-wrap:wrap;gap:8px}
.pf-item{position:relative}
.pf-item img{width:96px;height:96px;object-fit:cover;border-radius:8px;border:1px solid #d1d5db}
.pf-item button{display:block;width:96px;margin-top:4px;font-size:16px;padding:6px 0;border-radius:6px;border:1px solid #d1d5db;background:#fff}

/* 二维码标签按钮：醒目的黄色 */
.big-btn.label-btn,a.big-btn.label-btn{background:#facc15;color:#111;border:3px solid #111;font-size:24px;font-weight:700}
.label-mini{display:inline-flex;align-items:center;gap:4px;padding:10px 14px;min-height:48px;border-radius:10px;background:#facc15;
  color:#111;border:2px solid #111;font-weight:700;font-size:17px;white-space:nowrap}
.label-preview{display:block;margin:8px auto;width:100%;max-width:300px;border:1px solid #d1d5db;box-shadow:0 2px 8px rgba(0,0,0,.12);
  image-rendering:pixelated;background:#fff}
.copies{display:flex;align-items:center;justify-content:center;gap:10px;margin:10px 0}
.copies button{width:64px;height:64px;font-size:32px;border-radius:12px;border:2px solid #111;background:#fff}
.copies input{width:90px;height:64px;font-size:30px;text-align:center}
