/* 配色和草图一致（Owner 看过、说"很直观"的那一套）。
   底 #F3EFE6 · 字 #1D1B17 · 面板 #FFFDF8 · 线 #8F8775 · 红 #9A1B12 · 黄 #7A4B00 · 绿 #1D6B37 */
:root {
  --bg: #F3EFE6; --ink: #1D1B17; --panel: #FFFDF8; --line: #DCD5C7; --edge: #8F8775;
  --mute: #5C574E; --mute2: #716A5F; --chip: #E6DFD1; --soft: #F1ECE2;
  --red: #9A1B12; --redbg: #FDECEA; --amber: #7A4B00; --amberbg: #FFF0C7; --green: #1D6B37; --greenbg: #E4F2E7;
}
* { box-sizing: border-box; }
body {
  margin: 0; display: flex; min-height: 100vh; background: var(--bg); color: var(--ink);
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif; font-size: 15px;
}

/* 左边侧边栏 · 右边显示区（D-005） */
.side {
  width: 220px; flex-shrink: 0; background: var(--panel); border-right: 1px solid var(--line);
  padding: 18px 12px; display: flex; flex-direction: column; gap: 18px;
}
.brand { display: flex; flex-direction: column; gap: 2px; padding: 0 12px; }
.brand-name { font-size: 18px; font-weight: 900; letter-spacing: 1px; }
.brand-who { font-size: 13px; color: var(--mute); }
.menu { display: flex; flex-direction: column; gap: 2px; }
.menu-item {
  display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 6px 12px;
  border-radius: 8px; color: var(--ink); text-decoration: none;
}
.menu-item:hover { background: var(--soft); }
.menu-item.on { background: var(--ink); color: #fff; }
.menu-label { font-size: 15px; font-weight: 700; flex-grow: 1; }
.menu-hint { font-size: 12px; color: var(--mute2); }
.menu-item.on .menu-hint { color: #D8D2C6; }
.chip { min-width: 24px; padding: 1px 8px; border-radius: 999px; background: var(--chip); font-size: 14px; font-weight: 700; text-align: center; }
/* 侧边栏下半截：客人名单（D-081） */
.sidecust { display: flex; flex-direction: column; min-height: 0; flex: 1 1 auto;
            border-top: 1px solid var(--line); padding-top: 12px; }
.sidecust-head { display: flex; align-items: center; gap: 8px; padding: 0 12px 8px; }
.sidecust-head b { font-size: 13px; color: var(--mute); }
.sidecust-head input { flex: 1 1 auto; min-width: 0; min-height: 32px; padding: 4px 8px; font-size: 13px; border-radius: 6px; }
.sidecust-list { overflow-y: auto; padding: 0 4px 4px; display: flex; flex-direction: column; gap: 1px; }
.sidecust-list .cust { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 7px;
                       color: var(--ink); text-decoration: none; font-size: 14px; }
.sidecust-list .cust:hover { background: var(--soft); }
.sidecust-list .cust.on { background: var(--ink); color: #fff; }
.sidecust-list .cno { font-family: 'Barlow Condensed', sans-serif; font-weight: 700; color: var(--mute); }
.sidecust-list .cust.on .cno { color: #D8D2C6; }
.sidecust-list .cnt { margin-left: auto; min-width: 22px; padding: 0 7px; border-radius: 999px; background: var(--chip);
                      font-size: 12px; font-weight: 700; text-align: center; color: var(--ink); }
.sidecust-list .cust.hide { display: none; }

.logout { margin-top: auto; padding: 0 12px; }
.logout button { width: 100%; height: 40px; border: 1.5px solid var(--edge); border-radius: 8px; background: transparent; font: inherit; cursor: pointer; }

.main { flex-grow: 1; min-width: 0; padding: 24px 16px 60px; }  /* 排满屏：电脑上表格宽一点才看得清（Owner 2026-09-23）*/
.main.plain { display: flex; align-items: center; justify-content: center; }

h1 { font-size: 24px; margin: 0 0 4px; }
.sub { color: var(--mute); font-size: 14px; margin: 0 0 20px; }
.flash { padding: 10px 14px; border-radius: 8px; background: var(--greenbg); color: var(--green); margin-bottom: 14px; font-weight: 700; }
.flash.error { background: var(--redbg); color: var(--red); }

/* 表格：一行一款 */
table { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
/* 像 Excel：横线竖线都画上，每一格看得清边 */
th, td { padding: 10px 12px; text-align: left; font-size: 14px; vertical-align: middle;
         border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); }
th:last-child, td:last-child { border-right: 0; }
th { background: var(--soft); font-size: 13px; color: var(--mute); font-weight: 700; white-space: nowrap; }
tbody tr:hover td { background: #FFFBEA; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { font-family: 'Barlow Condensed', sans-serif; font-size: 17px; font-weight: 700; text-align: right; }

/* 表单 */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; font-weight: 700; color: var(--mute); }
input, select, textarea { font: inherit; padding: 9px 11px; border: 1.5px solid var(--edge); border-radius: 8px; background: #fff; color: var(--ink); min-height: 42px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.hint { font-size: 12px; color: var(--mute2); font-weight: 500; }
button.primary { min-height: 48px; padding: 0 28px; border: 0; border-radius: 10px; background: var(--ink); color: #fff; font: inherit; font-size: 17px; font-weight: 900; cursor: pointer; }
button.ghost { min-height: 44px; padding: 0 18px; border: 1.5px solid var(--edge); border-radius: 10px; background: var(--panel); font: inherit; font-weight: 700; cursor: pointer; }
a.ghost { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1.5px solid var(--edge); border-radius: 10px; text-decoration: none; color: var(--ink); font-weight: 700; }
a.ghost.mini, button.mini { min-height: 32px; padding: 0 10px; font-size: 13px; border-radius: 8px; }
td a { color: var(--ink); font-weight: 700; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 900; }
.tag.red { background: var(--red); color: #fff; }
.tag.amber { background: var(--amber); color: #fff; }
.tag.grey { background: var(--chip); color: var(--ink); }

/* 登录 */
.login { width: 380px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 28px; }
.login h1 { text-align: center; margin-bottom: 18px; }
.login label { margin-bottom: 14px; }
.login button { width: 100%; }

/* 贴纸打印：A4 一版 40 个 40×30mm（D-047） */
@media print {
  body { background: #fff; display: block; }
  .side, .noprint { display: none !important; }
  .main { padding: 0; max-width: none; }
}
.sheet { display: grid; grid-template-columns: repeat(4, 48mm); gap: 2mm; }
.label {
  width: 48mm; height: 30mm; border: 0.2mm dashed #bbb; padding: 2mm;
  display: flex; align-items: center; gap: 2mm; page-break-inside: avoid;
}
.label svg { width: 22mm; height: 22mm; }
.label .who { display: flex; flex-direction: column; gap: 1mm; min-width: 0; }
.label .no { font-family: 'Barlow Condensed', sans-serif; font-size: 20pt; font-weight: 700; line-height: 1; }
.label .nm { font-size: 8pt; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.label .kind { font-size: 7pt; color: #666; }

/* 列表里的图：要够大才看得清（Owner 2026-09-22：跟单看了图才知道怎么做） */
.thumb { width: 104px; height: 104px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line); background: var(--soft); display: block; }
.thumb.big { width: 180px; height: 180px; }
@media (max-width: 760px) { .thumb { width: 84px; height: 84px; } .thumb.big { width: 140px; height: 140px; } }

/* ── 看货的两种看法（Owner 2026-09-22：图要大，但百来款不能拉成长卷）──
   列表：一行一款，图 140px，适合对数字
   图册：网格大图 260px，适合看款式（画图员、跟单认货靠它） */
.viewbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.viewbar .seg { display: flex; border: 1.5px solid var(--edge); border-radius: 10px; overflow: hidden; }
.viewbar .seg button { min-height: 40px; padding: 0 16px; border: 0; background: var(--panel); font: inherit; font-weight: 700; cursor: pointer; }
.viewbar .seg button.on { background: var(--ink); color: #fff; }
.viewbar .count { font-size: 13px; color: var(--mute); }

.thumb { width: 140px; height: 140px; object-fit: cover; border-radius: 8px; border: 1px solid var(--line);
         background: var(--soft); display: block; cursor: zoom-in; }
.thumb.big { width: 200px; height: 200px; }
.thumb.small { width: 64px; height: 64px; }
.pics { display: flex; flex-wrap: wrap; gap: 4px; align-items: flex-end; }
.pics .thumb { display: inline-block; }

.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.gcard { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; display: flex; flex-direction: column; }
.gcard img { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; display: block; background: var(--soft); cursor: zoom-in; }
.lightbox img { cursor: zoom-out; }
.gcard .gbody { padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.gcard .gtop { display: flex; align-items: baseline; gap: 8px; }
.gcard .gno { font-family: 'Barlow Condensed', sans-serif; font-size: 22px; font-weight: 700; }
.gcard .gname { font-weight: 700; }
.gcard .gline { font-size: 13px; color: var(--mute); }

/* 点图看大图（不用任何外部库） */
.lightbox { position: fixed; inset: 0; background: rgba(20,18,15,.88); display: none; align-items: center;
            justify-content: center; z-index: 99; padding: 24px; }
.lightbox.on { display: flex; }
.lightbox img { max-width: 92vw; max-height: 86vh; border-radius: 10px; background: #fff; }
.lightbox .cap { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 700; }

/* 翻页 */
.pager { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 20px 0 0; flex-wrap: wrap; }
.pager a, .pager span { min-height: 40px; min-width: 44px; padding: 0 12px; display: inline-flex; align-items: center;
                        justify-content: center; border: 1.5px solid var(--edge); border-radius: 8px;
                        text-decoration: none; color: var(--ink); font-weight: 700; background: var(--panel); }
.pager .on { background: var(--ink); color: #fff; border-color: var(--ink); }
.pager .gap { border: 0; background: transparent; min-width: auto; padding: 0 2px; }

@media (max-width: 760px) {
  .thumb { width: 96px; height: 96px; }
  .thumb.big { width: 150px; height: 150px; }
  .gallery { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
}
