/* HEBELUXE / REBEAUTY — dark + champagne gold, light luxury. Plain CSS, no build step. */
:root{
  --bg:#141210; --bg2:#1d1a17; --card:#221e1b; --line:#3a332c;
  --gold:#c9a86a; --gold2:#e6cf9a; --ink:#f2ede4; --muted:#b8ad9d;
  --green:#7fc98f; --red:#e08a8a; --amber:#e6b866;
  --radius:14px;
}
*{box-sizing:border-box}
body{margin:0;font-family:Georgia,'Times New Roman',serif;background:var(--bg);color:var(--ink);line-height:1.6}
body.sans,button,input,select,textarea{font-family:-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,'PingFang SC','Microsoft YaHei',sans-serif}
a{color:var(--gold2)}
h1,h2,h3{line-height:1.25;margin:.2em 0 .5em}
p{margin:.4em 0}
.wrap{max-width:1080px;margin:0 auto;padding:0 20px}
.topbar{display:flex;justify-content:space-between;align-items:center;padding:16px 20px;max-width:1080px;margin:0 auto}
.brand{font-size:22px;font-weight:700;letter-spacing:.05em;color:var(--gold2);text-decoration:none}
.brand small{display:block;font-size:11px;letter-spacing:.3em;color:var(--muted)}
.btn{display:inline-block;background:var(--gold);color:#171310;border:0;border-radius:999px;padding:10px 22px;font-weight:700;cursor:pointer;text-decoration:none;font-size:15px}
.btn.ghost{background:transparent;color:var(--gold2);border:1px solid var(--gold)}
.btn.danger{background:transparent;color:var(--red);border:1px solid var(--red)}
.btn.go{background:var(--green);color:#12210f;border:0}
.btn.small{padding:6px 12px;font-size:13px}
.hero{padding:56px 0 40px;text-align:center}
.hero h1{font-size:44px;margin:.2em 0}
.hero .sub{color:var(--muted);font-size:18px}
.kicker{color:var(--gold);letter-spacing:.3em;font-size:12px;text-transform:uppercase}
.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(240px,1fr));gap:16px}
.card{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:18px}
.card h3{margin-top:0}
.price{color:var(--gold2);font-size:22px;font-weight:700}
.muted{color:var(--muted)} .small{font-size:13px}
section{padding:28px 0}
.flow{counter-reset:step;display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:12px;list-style:none;padding:0}
.flow li{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:14px}
.flow li b{color:var(--gold2)}
form label{display:block;margin:10px 0 4px;font-size:14px}
input,select,textarea{width:100%;background:#141210;color:var(--ink);border:1px solid var(--line);border-radius:10px;padding:10px 12px;font-size:15px}
input:focus,select:focus,textarea:focus{outline:2px solid var(--gold)}
.demo-badge{display:inline-block;background:#3a2f16;color:var(--gold2);border:1px solid var(--gold);border-radius:999px;padding:4px 12px;font-size:12px}
.pill{display:inline-block;border-radius:999px;padding:2px 10px;font-size:12px;background:#2c2822;border:1px solid var(--line)}
.pill.ok{color:var(--green);border-color:var(--green)} .pill.warn{color:var(--amber);border-color:var(--amber)} .pill.bad{color:var(--red);border-color:var(--red)}
table{width:100%;border-collapse:collapse;font-size:14px}
th,td{border-bottom:1px solid var(--line);padding:8px 6px;text-align:left;vertical-align:top}
th{color:var(--muted);font-weight:600;white-space:nowrap;font-size:13px} /* 问题 111: 所有列表标题一行显示，不折行；字略小一点才放得下 */
.tabs{display:flex;gap:8px;flex-wrap:wrap;margin:16px 0}
.tabs button{background:var(--card);color:var(--ink);border:1px solid var(--line);border-radius:999px;padding:8px 16px;cursor:pointer}
.tabs button.active{background:var(--gold);color:#171310;border-color:var(--gold);font-weight:700}
.stat-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:12px}
.stat{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px}
.stat .num{font-size:28px;color:var(--gold2);font-weight:700}
.stat .lbl{color:var(--muted);font-size:13px;display:flex;align-items:center;gap:6px}
.stat .lbl svg{width:16px;height:16px;flex:none;stroke:var(--gold2);fill:none;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
/* Problem 92: 数据整体看板 — 5 列 × 2 行（电脑），手机上 2 列。 */
.data-board{grid-template-columns:repeat(5,1fr)}
.data-board .stat .num{font-size:22px}
/* Problem 181 (r70): 业绩报表 — 当月高亮 + 合计行 */
#data-report-monthly tr.cur{background:#fff8e6}
#data-report-monthly tr.total td{background:#faf6ec;font-weight:700;border-top:2px solid #e5e0d3}
/* Problem 259: 业绩报表首列（月份 + 合计）也加米色底；当月高亮还在，
   只是首格底色换成米色（这条在合计行规则之后，同等权重下后者赢）。 */
#data-report-monthly tbody td:first-child{background:#f7ecd2;color:#5c4a1e}
/* Problem 257/260: 现金收入构成 / 每月办卡表的合计行，同业绩报表 */
#data-cash-breakdown tr.total td{font-weight:700;border-top:2px solid #e5e0d3}
#data-card-monthly tr.total td{background:#faf6ec;font-weight:700;border-top:2px solid #e5e0d3}
#data-card-monthly tr.total td:nth-child(1){background:#f7ecd2}
#data-card-monthly tr.total td:nth-child(3){background:#f5e3b8}
/* Problem 249: 产品分析两张表 — 合计行同业绩报表；销量榜 # 和商品名靠左，
   售出/销售额居中（效果图）。Problem 261: 月表转置后全部居中（包括项目列），
   合计列加粗。 */
#data-product-monthly tr.total td{background:#faf6ec;font-weight:700;border-top:2px solid #e5e0d3}
#data-product-monthly th,#data-product-monthly td{text-align:center}
#data-product-monthly td.total-col{font-weight:700}
#data-product-top5 th,#data-product-top5 td{text-align:center}
#data-product-top5 th:nth-child(2),#data-product-top5 td:nth-child(2){text-align:left}
.cmp-up{color:var(--green)}
.cmp-down{color:var(--red)}
.row{display:flex;gap:10px;flex-wrap:wrap;align-items:end}
.row>*{flex:1;min-width:140px}
footer{border-top:1px solid var(--line);padding:24px 0 48px;color:var(--muted);font-size:14px}
.notice{background:#2a241c;border:1px solid var(--gold);border-radius:10px;padding:12px 14px;margin:12px 0}
@media(max-width:640px){.hero h1{font-size:32px}}

/* ---- Landing redesign (2026-11-14): sticky header, offer hero, trust bar,
   stored-value box, FAQ, sticky mobile CTA. Dark + champagne gold kept. ---- */
.topbar.sticky{position:sticky;top:0;z-index:50;background:rgba(20,18,16,.92);backdrop-filter:blur(8px);border-bottom:1px solid var(--line)}
.mainnav{display:flex;gap:18px}
.mainnav a{color:var(--muted);text-decoration:none;font-size:14px}
.mainnav a:hover{color:var(--gold2)}
.header-actions{display:flex;align-items:center;gap:10px}
.lang-switch{display:flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:999px;padding:4px 10px;font-size:13px;color:var(--muted)}
.lang-switch button{background:none;border:0;color:var(--muted);cursor:pointer;font-size:13px;padding:2px 4px}
.lang-switch button.active{color:var(--gold2);font-weight:700}
.hero-new{padding:72px 0 48px}
.hero-new h1{font-size:52px}
.hero-new h1 .gold{color:var(--gold2)}
.offer-card{display:flex;flex-wrap:wrap;gap:20px;align-items:center;justify-content:center;background:var(--card);border:1px solid var(--gold);border-radius:var(--radius);padding:22px 26px;margin:28px auto;max-width:640px}
.offer-text{display:flex;flex-direction:column;gap:2px;text-align:left}
.offer-label{color:var(--gold);letter-spacing:.2em;font-size:12px;text-transform:uppercase}
.offer-price{font-size:40px;font-weight:700;color:var(--gold2);line-height:1.1}
.offer-per{font-size:16px;color:var(--muted);font-weight:400}
.offer-note{color:var(--muted);font-size:13px}
.btn.big{padding:14px 28px;font-size:16px}
/* Problem 161: appointment modal action row — only 取消预约 / 开单. */
.am-actions{margin-top:16px}
.am-bill{display:block;width:100%;padding:14px 0;font-size:17px;letter-spacing:4px;border-radius:10px}
.am-cancel{display:block;width:100%;background:#fff;color:#c0392b;border:1.5px solid #e0a49e;border-radius:10px;padding:11px 0;font-size:15px;margin-top:10px}
.am-mark{display:block;margin:12px auto 0;background:none;border:0;color:#8a8a8a;font-size:13px;text-decoration:underline;cursor:pointer}
.am-billed-note{margin-top:16px;padding:11px 12px;background:#eef6ee;border-radius:8px;color:#2e7d32;font-size:14px}
.micro{color:var(--muted);font-size:13px;letter-spacing:.04em}
.trustbar{border-top:1px solid var(--line);border-bottom:1px solid var(--line);background:var(--bg2)}
.trust-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:10px;padding:18px 20px;color:var(--gold2);font-size:14px}
.value-box{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px}
.value-tiers{list-style:none;padding:0;margin:14px 0}
.value-tiers li{padding:10px 0;border-bottom:1px solid var(--line)}
.value-tiers li:last-child{border-bottom:0}
.value-tiers strong{color:var(--gold2)}
.ritual{margin-top:28px}
.ritual-grid{grid-template-columns:repeat(auto-fit,minmax(220px,1fr))}
.faq-list details{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px;margin-bottom:12px}
.faq-list summary{cursor:pointer;font-weight:700;color:var(--gold2)}
.faq-list summary::-webkit-details-marker{color:var(--gold)}
.faq-list details p{color:var(--muted);margin:.6em 0 0}
.sticky-cta{display:none}
@media(max-width:760px){
  .mainnav{display:none}
  .hero-new{padding:48px 0 36px}
  .hero-new h1{font-size:32px}
  .offer-card{flex-direction:column;text-align:center}
  .offer-text{text-align:center}
  .sticky-cta{display:block;position:fixed;left:0;right:0;bottom:0;z-index:60;padding:10px 16px calc(10px + env(safe-area-inset-bottom));background:rgba(20,18,16,.95);border-top:1px solid var(--line);text-align:center}
  .sticky-cta .btn{width:100%}
  footer{padding-bottom:96px}
}

/* ---- Hero media + small language toggle (2026-11-14) ---- */
.hero-new{position:relative;overflow:hidden;text-align:left;padding:96px 0 72px}
.hero-media{position:absolute;inset:0;z-index:0}
.hero-media img,.hero-media video{position:absolute;inset:0;width:100%;height:100%;object-fit:cover;object-position:70% center}
.hero-media .hero-img{animation:hero-drift 26s ease-in-out infinite alternate}
.hero-media .hero-video{animation:hero-drift 26s ease-in-out infinite alternate}
@keyframes hero-drift{from{transform:scale(1)}to{transform:scale(1.08)}}
.hero-shade{position:absolute;inset:0;background:linear-gradient(90deg,rgba(20,18,16,.94) 0%,rgba(20,18,16,.82) 42%,rgba(20,18,16,.38) 68%,rgba(20,18,16,.18) 100%)}
.hero-content{position:relative;z-index:2;max-width:640px}
.hero-content .offer-card{margin-left:0}
.hero-content .offer-text{text-align:left}
/* Small elegant language toggle: plain letters, no boxes. */
.lang-switch{display:flex;align-items:center;gap:8px;border:0;background:none;padding:0;font-size:12px;letter-spacing:.14em;color:var(--muted)}
.lang-switch button{background:none;border:0;color:var(--muted);cursor:pointer;font-size:12px;letter-spacing:.14em;padding:2px 0}
.lang-switch button:hover{color:var(--ink)}
.lang-switch button.active{color:var(--gold2);font-weight:700;text-decoration:underline;text-underline-offset:4px}
.lang-switch span{opacity:.45}
.topbar{flex-wrap:wrap;gap:10px 16px}
.header-actions{gap:14px}
@media(max-width:640px){
  .hero-new{padding:64px 0 48px}
  .hero-shade{background:linear-gradient(90deg,rgba(20,18,16,.93) 0%,rgba(20,18,16,.78) 60%,rgba(20,18,16,.55) 100%)}
  .hero-media img,.hero-media video{object-position:78% center}
  .mainnav{gap:12px}
}
@media(prefers-reduced-motion:reduce){
  .hero-media .hero-img,.hero-media .hero-video{animation:none}
}

/* ---- About section (2026-11-14, SEO/GEO) ---- */
.about-box{background:var(--card);border:1px solid var(--line);border-radius:var(--radius);padding:28px}
.about-box p{color:var(--muted)}
.about-box p:first-child{color:var(--gold)}

/* ---- Admin v2 (2026-11-14): appointment day grid, 新客 badge, status colors ---- */
.appt-grid td:first-child{color:var(--muted);white-space:nowrap}
.appt{border-radius:10px;padding:10px 12px;margin:6px 0;border:1px solid var(--line);background:var(--bg2)}
.appt.appt-new{border-color:#5b8fd6;background:#1b2740}
.appt.appt-done{border-color:var(--green);background:#1d2f22}
.appt.appt-missed{border-color:var(--amber);background:#2e2617}
.appt.appt-cancelled{opacity:.55;text-decoration:line-through}
/* Problem 55: a blocked slot (占用） — grey, no client/service. */
.appt.appt-block{border-color:#8a8378;background:#3a352d;color:var(--ink)}
.appt .btn{margin:4px 4px 0 0}
.badge-new{display:inline-block;background:#2f6fd0;color:#fff;border-radius:999px;padding:1px 9px;font-size:12px;font-weight:700;vertical-align:1px}

/* ---- Admin v3 (round 2, 2026-11-14): month board, modal, member search, flash ---- */
.month-board{overflow-x:auto}
/* 横向滚动容器（问题 97）：商品列表在手机上列多放不下，包一层横向滚动，
   操作列（编辑/下架/删除）滑一下就能点到，不会被挤出屏幕。 */
.table-scroll{overflow-x:auto;-webkit-overflow-scrolling:touch}
/* 库存管理产品列表（问题 96）：行距收紧，行高比别处表格矮一半左右。 */
#product-list td,#product-list th{padding:4px 6px}
.month-board table{min-width:900px}
.month-board th,.month-board td{min-width:88px;vertical-align:top}
.month-board th.today-col,.month-board td.today-col{background:#2a241c}
.month-board td.slot{cursor:pointer}
.month-board td.slot:hover{background:var(--bg2)}
.month-board .appt{margin:2px 0;padding:6px 8px;font-size:13px;line-height:1.4;border:none}
/* v4 (round 3): first (time) column stays visible while scrolling sideways on a phone */
.month-board th:first-child,.month-board td:first-child{position:sticky;left:0;background:var(--bg);z-index:2;min-width:64px}
.month-board th:first-child{z-index:3}
/* v4 (round 3): cashier search input + confirm button on one row */
.search-row{display:flex;gap:8px;align-items:flex-start}
.search-row .search-input{flex:1;min-width:0}
.search-row .btn{flex:0 0 auto;white-space:nowrap;margin-top:0}
.search-row .search-results{margin-top:4px}
.modal{position:fixed;inset:0;background:rgba(0,0,0,.6);display:flex;align-items:flex-start;justify-content:center;padding:40px 16px;z-index:50;overflow-y:auto}
.modal-card{background:var(--bg);border:1px solid var(--line);border-radius:var(--radius);padding:20px;max-width:860px;width:100%}
.search-results{border:1px solid var(--line);border-radius:8px;margin-top:4px;max-height:240px;overflow-y:auto;background:var(--bg2)}
/* Problem 238: an empty results dropdown shows nothing — no pale strip. */
.search-results:empty{display:none}
.search-result{padding:8px 12px;cursor:pointer}
.search-result:hover{background:var(--card)}
.flash{outline:2px solid var(--gold);outline-offset:4px;border-radius:8px}
/* login password eye toggle */
.pw-wrap{position:relative}
.pw-wrap input{padding-right:44px}
.pw-eye{position:absolute;right:8px;top:50%;transform:translateY(-50%);background:transparent;border:none;cursor:pointer;font-size:18px;line-height:1;padding:6px;color:var(--gold)}

/* ---- Admin v5 (round 4, 2026-11-14) ---- */
/* Two-column layouts: billing (left = pick list, right = bill) and
   card-open (left = card kinds/cards, right = card content + pay). */
.bill-cols{display:grid;grid-template-columns:minmax(280px,5fr) 7fr;gap:16px;align-items:start}
@media (max-width:760px){.bill-cols{grid-template-columns:1fr}}
.bill-left h4{margin:14px 0 6px;font-size:14px;color:var(--gold2)}
.bill-cat-tabs{display:flex;gap:6px;flex-wrap:wrap;margin-bottom:8px}
.pick-card{border:1px solid var(--line);border-radius:10px;padding:10px 12px;margin:8px 0;cursor:pointer;background:var(--bg2)}
.pick-card:hover{border-color:var(--gold)}
.pick-card.selected{border-color:var(--gold);outline:1px solid var(--gold);background:#2a241c}
.pick-row{display:flex;align-items:center;gap:8px;padding:6px 0;border-bottom:1px solid var(--line)}
/* Card-open (problem 19): prominent payable + success banner */
.co-payable{font-size:26px;font-weight:700;margin:18px 0 4px}
.co-payable b{color:var(--gold2)}
.co-success{background:rgba(127,201,143,.12);border:1px solid var(--green);border-radius:10px;padding:12px 14px;margin:0 0 14px}
.co-success b{font-size:18px}
.btn:disabled{opacity:.45;cursor:not-allowed}
/* Receipt printing (problem 20): only the receipt area prints */
@media print{
  body *{visibility:hidden}
  #bill-receipt, #bill-receipt *{visibility:visible}
  #bill-receipt{position:absolute;left:0;top:0;width:100%;background:#fff;color:#000}
  .no-print{display:none !important}
}
/* Appointment board: visible + in every free slot (faint, obvious on hover/touch) */
.slot-plus{display:flex;align-items:center;justify-content:center;min-height:34px;font-size:22px;line-height:1;color:var(--muted);opacity:.35;user-select:none}
.month-board td.slot:hover .slot-plus{opacity:1;color:var(--gold)}
.month-board td.slot:active .slot-plus{opacity:1;color:var(--gold)}
/* Problem 62: compact week board — a booked block fills its cell.
   Scoped to #appt-board only; the month board (#appt-month-grid,
   problem 138) has its own rules below, and the phone day view is
   untouched. Problem 252: hourly rows — 13 rows 9:00–21:00.
   Problem 262: blocks are positioned by time — div layout (one column
   per day, position:relative; blocks absolute: top = (start − 9:00) /
   60 × 40px, height = duration / 60 × 40px; overlapping blocks share
   the width). Row height 40px, 13 rows = 520px. Empty hour slots show
   a + only on hover (the slot itself is the click target, so it works
   on phones too). Problem 251 is void: the header is two lines again
   (date / weekday). Problem 243: the board + the summary still fit one
   1280×800 screen; block text 11px. */
#appt-board{min-width:900px}
#appt-board .wb-head,#appt-board .wb-body{display:grid;grid-template-columns:64px repeat(7,minmax(88px,1fr))}
#appt-board .wb-head-time,#appt-board .wb-head-day{padding:2px 4px;font-size:12px}
#appt-board .wb-head-day{text-align:center}
#appt-board .wb-gutter{position:relative;height:520px}
#appt-board .wb-gutter span{position:absolute;left:0;right:0;text-align:center;font-size:12px;transform:translateY(-50%)}
#appt-board .wb-day{position:relative;height:520px;border-right:1px solid #eee7d8;background:repeating-linear-gradient(to bottom,transparent 0,transparent 39px,#eee7d8 39px,#eee7d8 40px)}
#appt-board .wb-day:last-child{border-right:none}
/* Problem 268: 今天那一列底色改浅（接近白底的淡米黄 #fdf8ea），那一列
   的小时线加深到 #e0cfa1，线看得见；表头今天那格仍是 #f5e7bd。 */
#appt-board .wb-day.today-col{background-color:#fdf8ea;background-image:repeating-linear-gradient(to bottom,transparent 0,transparent 39px,#e0cfa1 39px,#e0cfa1 40px)}
#appt-board .wb-day.today-col-strong{background-color:#fdf8ea}
#appt-board .wb-slot{position:absolute;left:0;right:0;height:40px;cursor:pointer}
#appt-board .wb-slot .slot-plus{opacity:0;pointer-events:none;min-height:40px;font-size:15px}
#appt-board .wb-slot:hover .slot-plus{opacity:1;color:var(--gold)}
#appt-board .wb-blk{position:absolute;pointer-events:none}
#appt-board .wb-blk .appt{position:absolute;top:0;bottom:0;left:2px;right:2px;pointer-events:auto;margin:0;padding:1px 5px;font-size:11px;line-height:1.25;overflow:hidden}
/* Problem 234: week summary under the board — fixed layout so the day
   columns line up with the board above: first column 64px like the board
   time gutter, 7 day columns share the rest (min-width 88px like the
   board), table min-width 900px like the board. Problem 250: no date
   header row (the board header already shows the dates); 11px text,
   20px rows. Problem 243: margin 8px so the summary stays on the same
   screen as the board. */
.week-summary{table-layout:fixed;width:100%;min-width:900px}
.week-summary th,.week-summary td{padding:0 6px;font-size:11px;height:20px;min-width:88px}
.week-summary th:first-child,.week-summary td.week-sum-label{width:64px;min-width:64px}
/* Problem 263: 预约顶栏重排 — 一行：‹ › 箭头夹着标题 + 今天，日期框，
   spacer 把新增预约和分段按钮顶到最右边，全部 32px 高、13px 字、8px
   间距。单独一个 .appt-topbar 规则，不用 .row（.row 的 flex:1 会把子
   元素撑开）。手机上自动换行。 */
.appt-topbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.appt-topbar > div{display:flex;align-items:center;gap:8px}
.appt-topbar .btn.small{height:32px;box-sizing:border-box}
.appt-topbar .btn.small.arrow{padding:6px 10px}
.appt-topbar .appt-nav-title{font-weight:700;font-size:15px;white-space:nowrap}
.appt-topbar #appt-jump{width:140px;height:32px;border-radius:999px;font-size:13px;padding:0 10px;box-sizing:border-box}
.appt-topbar .appt-spacer{flex:1}
.appt-topbar .seg{display:flex;border:1px solid #c9a227;border-radius:999px;overflow:hidden;height:32px;box-sizing:border-box}
.appt-topbar .seg button{border:0;background:transparent;color:#8a6d1a;font-size:13px;font-weight:700;padding:6px 14px;cursor:pointer}
.appt-topbar .seg button + button{border-left:1px solid #c9a227}
.appt-topbar .seg button.on{background:#c9a227;color:#171310}
/* Problem 264: 电脑天视图 — 跟 262 周看板一样的定位布局、只一列：
   13 个小时行 9:00–21:00，每小时 40px；约块按开始时间定位、按时长占格；
   重叠的约按列并排；空小时 + hover 才出现（点格子约那一小时）。板子
   max-width 520px 靠左（271：右边空着，不特意占版面）；那一列不留底色（白底 + 小时线）。手机仍走
   renderDayHours（.day-hours），列表视图不动。 */
#appt-day-list .day-board{max-width:520px;margin:0;border:1px solid #e5e0d3;border-radius:8px;overflow:hidden}
#appt-day-list .db-head,#appt-day-list .db-body{display:grid;grid-template-columns:56px 1fr}
#appt-day-list .db-head{border-bottom:1px solid #e5e0d3}
#appt-day-list .db-head-time,#appt-day-list .db-head-day{padding:4px 2px;font-size:13px;background:#f7ecd2;color:#5c4a1e}
#appt-day-list .db-head-day{text-align:center}
#appt-day-list .db-head-time{font-weight:600;text-align:center} /* Problem 270: 时间标题居中 */
#appt-day-list .db-gutter{position:relative;height:520px;background:#faf6ec;border-right:1px solid #e5e0d3;color:#8a7f6d;font-weight:600}
#appt-day-list .db-gutter span{position:absolute;left:0;right:0;text-align:center;font-size:12px;transform:translateY(-50%)}
#appt-day-list .db-day{position:relative;height:520px;background:repeating-linear-gradient(to bottom,transparent 0,transparent 39px,#eee7d8 39px,#eee7d8 40px)}
#appt-day-list .db-slot{position:absolute;left:0;right:0;height:40px;cursor:pointer}
#appt-day-list .db-slot .slot-plus{opacity:0;pointer-events:none;min-height:40px;font-size:15px}
#appt-day-list .db-slot:hover .slot-plus{opacity:1;color:var(--gold)}
#appt-day-list .db-blk{position:absolute;pointer-events:none}
#appt-day-list .db-blk .appt{position:absolute;top:0;bottom:0;left:2px;right:2px;pointer-events:auto;margin:0;padding:2px 8px;font-size:13px;line-height:1.5;overflow:hidden}
/* Problem 138 (r47): month view is a horizontal time board like the week
   view — time column + 30 narrow (~84px) day columns, 4-line appointment
   cards. The wrap scrolls sideways (and vertically, so the date header
   sticks); the time column sticks on the left. Day headers are two lines
   (day number / weekday); the + in the header adds an appointment. */
#appt-month-wrap{max-height:560px;overflow-y:auto}
#appt-month-grid{table-layout:fixed;transform-origin:top left}
#appt-month-grid th,#appt-month-grid td{min-width:84px;width:84px;vertical-align:top}
#appt-month-grid th:first-child,#appt-month-grid td:first-child{min-width:56px;width:56px}
#appt-month-grid thead th{position:sticky;top:0;z-index:3;padding:4px 2px}
#appt-month-grid thead th:first-child{z-index:4}
#appt-month-grid thead tr.board-head th{background:#f7ecd2;color:#5c4a1e;text-align:center}
#appt-month-grid td.board-time{background:#f7ecd2;color:#5c4a1e;font-weight:600;text-align:center;font-size:12px}
#appt-month-grid td{height:88px;padding:1px 4px}
#appt-month-grid td.slot{cursor:pointer}
#appt-month-grid td.slot:hover{background:var(--bg2)}
#appt-month-grid td.appt-cell{position:relative;padding:0}
#appt-month-grid td.appt-cell .appt{position:absolute;top:0;left:0;right:0;bottom:0;margin:0;padding:3px 5px;font-size:11px;line-height:1.4;overflow:hidden;word-break:break-all}
#appt-month-grid td.appt-cell-multi{padding:0}
#appt-month-grid td.appt-cell-multi .appt{margin:0;padding:3px 5px;font-size:11px;line-height:1.4;word-break:break-all}
#appt-month-grid .m-day-num{font-size:15px;font-weight:800;line-height:1.2}
#appt-month-grid .m-day-num .m-day-plus{color:var(--gold);font-size:13px;font-weight:400;cursor:pointer;float:right}
#appt-month-grid .m-day-wd{font-size:11px;color:#8a7a52;font-weight:400;line-height:1.2}
/* Stocktake: mismatch rows highlight red */
tr.stocktake-mismatch{background:#2a1e1e}
tr.stocktake-mismatch .stocktake-diff{color:#e08a8a;font-weight:700}
/* Order blocks: one table per order, header line on top */
.order-block{margin-bottom:18px}
/* Problem 54: the order-list header row gets a light-gold background so
   the header stands apart from the rows (admin gold title style). */
.order-head th{background:#f7ecd2;color:#5c4a1e}
/* Problems 106/107/111: every other list table uses the same light-gold
   header (add class="list-head" to the thead tr); a table too wide for the
   screen scrolls sideways instead of wrapping its headers (see
   .table-scroll and .order-block below). */
.list-head th{background:#f7ecd2;color:#5c4a1e}
/* Problem 162: the member list header sticks while scrolling down, so the
   column meanings stay visible (same pattern as #appt-month-grid thead). */
/* Problem 169 (r62): the sticky rule alone did NOT work — the table sits in
   .table-scroll (overflow-x:auto) with no constrained height, so the PAGE
   scrolled and the header scrolled away with it. The wrapper itself must be
   the scroll box: max-height + overflow-y:auto, mirroring #appt-month-wrap.
   Do not remove this rule — the header only sticks inside this box. */
#member-list-scroll{max-height:560px;overflow-y:auto}
#member-list-view thead th{position:sticky;top:0;z-index:3}
/* Problem 111: an order block scrolls sideways when its 9-column table
   does not fit — the headers stay on one line instead of wrapping. */
.order-block{overflow-x:auto}
/* Problems 99/100: the batch bar under a list — 已选 N 项 + 批量上架/下架. */
.batch-bar{margin-top:12px;background:var(--bg2);border:1px solid var(--line);border-radius:8px;padding:10px 12px;font-size:14px}
/* Problem 99: per-row kind icon in the card list — 次卡 orange, 充值卡
   blue, 定制卡 purple (approved mockup). */
.pkg-kind-icon{display:inline-block;width:26px;height:26px;border-radius:6px;text-align:center;line-height:26px;font-size:13px;font-weight:700;color:#fff;vertical-align:middle;margin-right:6px}
.pkg-kind-icon.pkg-session{background:#e8913a}
.pkg-kind-icon.pkg-stored{background:#4a90d9}
.pkg-kind-icon.pkg-custom{background:#8e6cc0}
/* Problems 100/101/103: the little pencil after a sort number — click it
   to edit the number directly (prompt, same pattern as the member-date
   and custom-card-rename edits). */
.sort-pencil{color:var(--gold2);cursor:pointer;margin-left:4px;font-size:13px}
/* Problems 101/102: 上架 is a GREEN OUTLINE button now, never a solid
   green fill (the owner rejected the solid green as too loud); 下架 stays
   the red-outline .danger button. */
.btn.go-o{background:transparent;color:var(--green);border:1px solid var(--green)}
/* Problem 109: the small kind badge under an order item's name — 服务
   gold outline, 产品 green outline, 开卡 blue outline (approved mockup). */
.order-kind-tag{display:inline-block;font-size:11px;border:1px solid #c9a24b;color:#a97f2e;border-radius:4px;padding:1px 6px;margin-top:3px}
.order-kind-tag.order-kind-product{border-color:#9ec49f;color:#2e7d32}
.order-kind-tag.order-kind-card{border-color:#7aa5d2;color:#2f6fb2}
/* Problem 101: the 累计销量 column is center-aligned (header and cells
   both carry .prod-sales-col). */
.prod-sales-col{text-align:center}
/* Problem 108: the week board's time column (first column) and date
   header row (first row) get the same light-gold background as the list
   headers, so rows and columns are easy to follow. */
#appt-board .wb-head-time,#appt-board .wb-head-day{background:#f7ecd2;color:#5c4a1e}
#appt-board .wb-head-time{font-weight:600;text-align:center} /* Problem 270: 时间标题居中 */
#appt-board .wb-gutter{background:#f7ecd2;color:#5c4a1e;font-weight:600}
/* Problem 52: a voided order stays in the list, greyed, for audit. */
.order-block.order-voided{opacity:.65}
.order-detail{background:var(--bg2);border:1px solid var(--line);border-radius:10px;padding:10px 14px;margin-top:8px}
.order-detail p{margin:6px 0}

/* ---- Admin light theme (problem 21, 2026-11-14): the admin is white bg +
   black text; the landing page (index.html) keeps the dark + gold theme.
   Everything below is scoped under body.admin, so the landing page is
   untouched. Gold stays as the accent: section titles, active tabs,
   category chips and highlighted numbers keep the gold treatment. ---- */
body.admin{
  --bg:#ffffff; --bg2:#faf8f3; --card:#ffffff; --line:#e3dccd;
  --gold:#c9a86a; --gold2:#8a6d2f; --ink:#1c1813; --muted:#6f6558;
  --green:#2e7d46; --red:#c0392b; --amber:#9a6b12;
}
body.admin input,body.admin select,body.admin textarea{background:#fff;color:var(--ink)}
body.admin input::placeholder,body.admin textarea::placeholder{color:#a39a8b}
body.admin .demo-badge{background:#f7ecd4;color:var(--gold2)}
body.admin .pill{background:#f5f1ea}
body.admin .notice{background:#fdf6e3}
body.admin .appt.appt-new{border-color:#5b8fd6;background:#e8f0fe}
body.admin .appt.appt-done{border-color:var(--green);background:#e6f4ea}
body.admin .appt.appt-missed{border-color:var(--amber);background:#fef3e2}
body.admin .appt.appt-block{border-color:#9a8f7a;background:#eceae6;color:#5c564a}
body.admin .month-board th.today-col,body.admin .month-board td.today-col{background:#f6ecd7}
body.admin .pick-card.selected{background:#f7ecd4}
body.admin tr.stocktake-mismatch{background:#fdecea}
body.admin tr.stocktake-mismatch .stocktake-diff{color:#c0392b}
body.admin .slot-plus{opacity:.55}
body.admin .pw-eye{color:var(--gold2)}
body.admin .search-result:hover{background:#f3ede1}
body.admin .topbar.sticky{background:rgba(255,255,255,.95)}
/* Problem 243: the admin chrome is tightened (admin only — the landing
   page keeps its own spacing) so the week board + summary fit one
   1280×800 screen: slimmer topbar, smaller brand, tighter nav tabs. */
body.admin .topbar{padding:10px 20px}
body.admin .brand{font-size:19px}
body.admin .tabs{margin:10px 0}
body.admin .tabs button{padding:6px 14px}
/* Problem 131: the red 需进货 row background is gone (too loud) — the
   需进货 pill is the indicator now. The inv-reorder class stays on the
   row as a hook, but carries no background. */
/* ---- Member detail layout (problem 21): stat cards for the key numbers,
   one card per remaining card, gold-backed section titles ---- */
.sec-title{background:var(--gold);color:#171310;border-radius:8px;padding:6px 12px;font-size:16px;margin:22px 0 12px}
.md-stats .stat .num{font-size:22px}
.md-stats .stat .sub{color:var(--muted);font-size:13px;margin-top:4px}
.md-card-name{font-weight:700;font-size:13px}
.md-card-num{font-size:18px;font-weight:700;color:var(--gold2);margin:2px 0}
.md-card .md-line{color:var(--muted);font-size:11px;margin-top:2px}
/* ---- Member-detail cards (problem 23): look more like a real card
   (name, remaining sessions, remaining amount, expiry); a used-up card
   is grey with a 已用完 badge ---- */
.md-card-top{display:flex;justify-content:space-between;align-items:center;gap:8px}
.md-card-amount{font-size:15px;font-weight:700;margin:2px 0 4px}
.md-used-badge{background:#8a8378;color:#fff;border-radius:999px;font-size:12px;padding:2px 8px;white-space:nowrap}
body.admin .md-card-used{background:#efefec;border-style:dashed}
body.admin .md-card-used .md-card-name,body.admin .md-card-used .md-card-num,body.admin .md-card-used .md-card-amount{color:#8a8378}
body.admin .md-card-used .md-line{color:#a39a8b}
/* Problem 76: a card with sessions left is clickable to bill from it. */
body.admin .md-card-billable{cursor:pointer}
body.admin .md-card-billable:hover{border-color:var(--gold)}
/* ---- Compact 补单 toggle (problems 46/47, 2026-11-15): deliberately small
   and quiet — a 12px label + a 28×16 switch, no gold, no big block. The
   owner asked for it to take little space and not steal the eye. ---- */
.mini-toggle-row{display:flex;align-items:center;gap:6px;margin:2px 0}
.mini-toggle-label{font-size:12px;color:var(--muted)}
.mini-toggle{display:inline-flex;cursor:pointer}
.mini-toggle input{position:absolute;opacity:0;width:0;height:0}
.mini-toggle-track{display:inline-block;width:28px;height:16px;border-radius:999px;background:#d8d2c6;position:relative;transition:background .15s}
.mini-toggle-track::after{content:'';position:absolute;top:2px;left:2px;width:12px;height:12px;border-radius:50%;background:#fff;box-shadow:0 1px 2px rgba(0,0,0,.25);transition:left .15s}
.mini-toggle input:checked + .mini-toggle-track{background:#b49b57}
.mini-toggle input:checked + .mini-toggle-track::after{left:14px}
.mini-toggle input:focus-visible + .mini-toggle-track{outline:2px solid #b49b57;outline-offset:2px}
#bill-backfill-date,#co-backfill-date{width:140px;font-size:13px;padding:4px 6px}
/* ---- Billing line controls (problem 47): plain uncircled +/- and a
   text-style 删除 — no round bordered buttons. ---- */
.qty-btn{background:none;border:0;color:var(--gold2);font-size:16px;font-weight:700;cursor:pointer;padding:0 4px;line-height:1}
.qty-btn:hover{color:var(--ink)}
.link-btn{background:none;border:0;color:#c0392b;font-size:13px;cursor:pointer;padding:0;text-decoration:underline;text-underline-offset:2px}
.link-btn:hover{color:#96281b}

/* ---- Admin mobile (problems 32/35/36, 2026-11-15): phone-width layouts.
   jsdom does not apply CSS, so the headless tests check these rules as
   text and verify the DOM the rules switch between. ---- */
#member-cards{display:none}
.member-card{margin-bottom:12px}
.member-card-top{display:flex;gap:8px;align-items:center;margin-bottom:6px}
.member-card-row{font-size:14px;margin:2px 0}
.member-card-row .muted{margin-right:6px}
.member-card-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:10px}
/* Problem 94: 手机预约看板/列表切换 — 日视图没有电脑入口，切换按钮默认
   藏起来；手机上（下面 760px 块里）显示成两个胶囊按钮。 */
.appt-view-toggle{display:none}
@media(max-width:760px){
  /* Member list (problem 32): cards instead of the 8-column table.
     Problem 245: the old selector (#member-list-view>table) never matched
     — the table sits inside #member-list-scroll, not directly under the
     view — so phones kept showing the squeezed 11-column table and the
     cards never appeared. Hiding the scroll wrapper hides the table. */
  #member-list-scroll{display:none}
  #member-cards{display:block}
  /* Product catalog (problem 35): hide 累计销量 and 排序 columns */
  .prod-sales-col,.prod-sort-col{display:none}
  /* Problems 100/103: same as products — the service and card lists hide
     their 排序 column on a phone (the pencil edit is web-only). */
  .svc-sort-col,.pkg-sort-col{display:none}
  /* Product catalog (problem 70): hide the unit (瓶） and the 分类 column
     on a phone — stock shows just the number; the 分类 filter stays. */
  .prod-unit,.prod-cat-col{display:none}
  /* Problem 131: inventory 规格/价格 columns are desktop-only, same
     pattern as the product catalog's mobile-hidden columns. */
  .inv-spec-col,.inv-price-col{display:none}
  /* Problem 124: mobile billing SERVICE rows show only the name + price —
     the "80 分钟 · 功效护肤" sub-line (duration + category) is hidden.
     Service rows only ([data-bill-svc]); product rows keep their spec
     (problem 126 puts it inline instead). */
  .svc-row[data-bill-svc] .meta{display:none}
  /* Problem 126: mobile billing PRODUCT rows are one product per row,
     name + spec + price all on one line (name 14, spec 12, price 16).
     The name/spec wrapper (.svc-text) goes inline on a phone. */
  .svc-row[data-bill-prod] .svc-text{display:flex;align-items:baseline}
  .svc-row[data-bill-prod] .name{font-size:14px;white-space:nowrap}
  .svc-row[data-bill-prod] .meta{font-size:12px;color:#888;margin:0 0 0 5px;white-space:nowrap}
  .svc-row[data-bill-prod] .price{font-size:16px}
  /* Product catalog (problem 97): 操作列的三个按钮在手机上竖着排，每
     个都是整块可点的目标，列变窄、表不再把操作列挤出屏幕；横向滚动
     容器（.table-scroll）兜底，再宽也滑一下就能点到。 */
  #product-catalog td:last-child .btn{display:block;margin:3px 0;min-width:52px;text-align:center}
  /* Appointment board (problem 36): hide the 天｜周｜月 view switch on a
     phone — the board itself defaults to the single-day view in JS.
     Problem 263: the switch is one .seg now, not two buttons. */
  .appt-topbar .seg{display:none}
  /* Day timeline (problem 69): one day as a vertical 9:30–20:00 axis —
     21 half-hour rows, time on the left, booking or + on the right.
     Rows stay short so the whole day fits with little scrolling. */
  .day-timeline{margin:8px 0}
  .day-slot{display:flex;gap:8px;align-items:flex-start;padding:1px 0;border-bottom:1px solid var(--line)}
  .day-slot-time{flex:0 0 44px;font-size:12px;line-height:1.4;color:var(--muted);padding-top:2px;white-space:nowrap}
  .day-slot-body{flex:1;min-width:0}
  .day-slot-body .slot-plus{min-height:18px;font-size:15px;justify-content:flex-start;padding-left:2px;opacity:.7}
  .day-slot-body .appt{margin:0 0 2px;padding:2px 6px;font-size:12px;line-height:1.3}
  /* Problem 243: 手机一天视图 — 一天按小时分行（9:00–20:00 共 12 行），
     一屏放下；预约一行字，备注一行小字；空行只剩小时和一个 +。 */
  .day-hours{margin:8px 0}
  .day-hour{display:flex;gap:8px;align-items:flex-start;padding:5px 0;border-bottom:1px solid var(--line);min-height:44px}
  .day-hour-time{flex:0 0 44px;font-size:12px;line-height:1.4;color:var(--muted);padding-top:4px;white-space:nowrap}
  .day-hour-body{flex:1;min-width:0}
  .day-hour-body .slot-plus{min-height:18px;font-size:15px;justify-content:flex-start;padding-left:2px;opacity:.7}
  .day-hour-body .appt{margin:0 0 2px;padding:5px 8px;font-size:13px;line-height:1.45}
  /* Problem 94: 手机预约看板/列表切换 — 电脑上日视图没有入口，按钮默认
     藏起来（外面一条 .appt-view-toggle{display:none}）；手机上显示成
     两个胶囊按钮。 */
  .appt-view-toggle{display:flex;gap:8px;margin:0 0 14px}
  .appt-view-toggle button{flex:1;font-size:14px;padding:9px 0;border:1px solid var(--line);border-radius:999px;background:#fff;color:#222}
  .appt-view-toggle button.on{background:var(--gold);border-color:var(--gold);color:#fff;font-weight:600}
  /* Problem 94: 手机预约列表 — 只列当天约了的客人，按时间排；时间一列
     加粗定宽，没时间的行显示“时间未定”。 */
  .appt-list-row{display:flex;gap:10px;align-items:flex-start;padding:12px 2px;border-bottom:1px solid var(--line);cursor:pointer}
  .appt-list-row:last-child{border-bottom:0}
  .appt-list-time{flex:0 0 52px;font-weight:700;font-size:14px;padding-top:1px}
  .appt-list-time.untimed{font-size:12px;font-weight:400;color:var(--muted)}
  .appt-list-body{font-size:13px;line-height:1.6;min-width:0}
  .appt-list-who{font-weight:600;font-size:14px}
  .appt-list-svc{color:#555}
  /* Problem 92: 数据整体看板在手机上 2 列。 */
  .data-board{grid-template-columns:repeat(2,1fr)}
  /* Problem 244: the three overview quick actions are one short row on a
     phone — icon + text side by side, ~50px tall — so the 经营数据 cards
     are visible on open. .row>* min-width:140px would push the third
     button onto its own row, so min-width:0 here; desktop untouched. */
  .ob-actions{flex-wrap:nowrap;gap:8px}
  .ob-actions .btn{flex:1 1 0;min-width:0;flex-direction:row;justify-content:center;gap:6px;padding:12px 0;font-size:14px}
  .ob-actions .btn svg{width:20px;height:20px}
}

/* ---- r41 (problems 112–123, 2026-11-17) ---- */
/* Problem 121: member list 编号/姓名/操作 are plain blue text links now,
   no pill/oval buttons. Problem 130: the underline is gone too. */
.link-text{background:none;border:0;color:#2f6fb2;font-size:14px;cursor:pointer;padding:0}
.link-text:hover{color:#1d4f86}
/* Problem 286: 删除 is the same text link in grey, never blue. */
.link-text.del{color:#999}
.link-text.del:hover{color:#999}
/* Problem 286: inventory 充足 / 需进货 are plain colored text, no pill. */
.inv-ok{color:var(--green)}
.inv-low{color:var(--red)}
/* Problem 123: compact cashier member-pick — one row 搜索会员 + input +
   确认， next row 散客 + input, no explanatory labels. */
/* Problem 238: the member-pick box has no card frame — no border, no card
   background; padding stays so it lines up with the page. */
#cashier-member-box.compact{padding:12px 16px;border:none;background:transparent}
#cashier-member-box.compact .search-row{align-items:center}
#cashier-member-box.compact .search-row + .search-row{margin-top:8px}
#cashier-member-box.compact .search-row label{font-weight:700;white-space:nowrap}
#cashier-member-box.compact .search-row>input{flex:1;min-width:0}
/* Problem 127: the confirmed-member line gets the same light-gold
   background as the billing right panel, so it stands out at a glance. */
#cs-member{background:#f8f2e4;border-radius:8px;padding:8px 12px}
#cs-member p{margin:0}
/* Problem 130: member list — toolbar labels sit inline with their
   controls (搜索 + box on one line, 汇总时段 + dropdown on one line). */
.field-inline{display:flex;align-items:center;gap:6px}
.field-inline label{white-space:nowrap;margin:0}
.field-inline input,.field-inline select{flex:1;min-width:0}
/* Problem 130: the three 累计 headers sort on click. The arrow is grey
   ↕ when the column is not sorting, gold ↓/↑ when it is. */
#member-list-view th.sortable{cursor:pointer;white-space:nowrap}
#member-list-view th.sortable .arrow{color:#999;font-size:12px;margin-left:2px}
#member-list-view th.sortable .arrow.on{color:#c9a86a;font-weight:700}
/* Problem 284: the inline source dropdowns are gone (problem 149's rule
   removed); the 来源 column is plain text now. *//* Problem 237: 会员表文字上下左右居中；列宽按 colgroup 固定分配；操作列不换行（详情 开单放一行）。*/
#member-list-scroll table{table-layout:fixed}
#member-list th,#member-list td{text-align:left;vertical-align:middle}
#member-list td:last-child{white-space:nowrap}
#member-list td.member-cycle{white-space:nowrap}
/* Problem 122: billing — toolbar row, two-column catalog split (vertical
   category list + one-per-row items), light-gold right billing panel. */
.bill-toolbar{display:flex;align-items:center;gap:8px;margin-bottom:10px;flex-wrap:wrap}
.bill-kind-seg{display:inline-flex;border:1px solid var(--line);border-radius:999px;overflow:hidden}
.bill-kind-seg button{background:transparent;border:0;padding:6px 14px;font-size:14px;cursor:pointer;color:var(--muted)}
.bill-kind-seg button.on{background:var(--gold);color:#fff;font-weight:700}
#bill-search{flex:1;min-width:140px}
.catalog-split{display:grid;grid-template-columns:110px 1fr;gap:12px;align-items:start}
@media (max-width:760px){.catalog-split{grid-template-columns:86px 1fr}}
/* The billing category list is vertical; #co-kind-tabs (card-open) keeps
   the old horizontal chip row from .bill-cat-tabs. */
#bill-cat-tabs{display:flex;flex-direction:column;gap:2px;margin-bottom:0}
.cat-item{padding:7px 10px;border-radius:6px;font-size:14px;cursor:pointer;color:var(--ink)}
.cat-item:hover{background:var(--bg2)}
.cat-item.active{background:var(--gold);color:#fff;font-weight:700}
.svc-list{display:flex;flex-direction:column;gap:8px}
.svc-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);border-radius:8px;padding:10px 12px;background:#fff;position:relative;cursor:pointer}
.svc-row:hover{border-color:var(--gold)}
.svc-row.selected{border-color:var(--gold);box-shadow:0 0 0 1px var(--gold)}
.svc-row .picked{position:absolute;top:-9px;right:10px;background:var(--gold);color:#fff;font-size:11px;padding:1px 8px;border-radius:999px}
.svc-row .name{font-weight:700;font-size:14px}
.svc-row .meta{color:var(--muted);font-size:12px;margin-top:2px}
.svc-row .price{color:var(--gold2);font-weight:700;font-size:17px;white-space:nowrap}
#cs-billing .bill-right{background:#f8f2e4;border-radius:10px;padding:12px}
#cs-consume .bill-right{background:#f8f2e4;border-radius:10px;padding:12px;color:#222}
/* Problem 239: the 常用服务 category row carries a small 设置 button on
   the right (gold when the row is active, gold-brown otherwise); the picker
   itself is an overlay modal, never on the page. */
.cat-item .cat-set{float:right;font-size:12px;color:#8a6d2f;background:none;border:0;cursor:pointer;padding:2px 4px}
.cat-item.active .cat-set{color:#fff}
.freq-pick-list{display:grid;grid-template-columns:1fr 1fr;gap:6px 24px;margin-top:14px}
.freq-pick{display:flex;gap:8px;align-items:center;padding:6px 0;cursor:pointer}
/* Problem 242 (C 方案）: board status text only — billed → 已开单 (green,
   bold), otherwise 待确认 (blue). The note under the service line is one
   small truncated line. */
.appt-st-done{color:var(--green);font-weight:700}
.appt-st-todo{color:#5b8fd6}
.appt-note{display:block;font-size:11px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
#co-detail{background:#f8f2e4;border-radius:10px;padding:12px}
/* Problem 277: card-open right panel, one line per fact — name + amount
   on one row, the contents on one muted line, pay method on one row. */
#co-detail .co-line-item{display:flex;justify-content:space-between;align-items:baseline;gap:12px;margin-bottom:4px}
#co-detail .co-line-name{font-weight:700;font-size:16px}
#co-detail .co-line-amt{font-weight:700;font-size:17px;white-space:nowrap}
#co-detail .co-detail-line{color:#8a7f6d;font-size:13px;margin:0 0 14px}
#co-detail .co-pay-row{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
/* Problem 144: stored-value tab — 10 columns, compact one-line rows. */
#tab-packages table.pkg-compact{font-size:13px}
#tab-packages table.pkg-compact th,#tab-packages table.pkg-compact td{padding:6px 8px;white-space:nowrap}
/* Problem 129 (consume tab): plain text rows, NO boxes — the owner's
   rule. A section label is small grey text; a card name is a bold row
   (click it to deduct once); a multi-item card lists its items below in
   smaller plain text. The right detail is simple rows, not a table. */
.consume-sec{font-size:13px;color:#999;margin:10px 0 4px}
.consume-sec:first-child{margin-top:0}
.consume-card{font-weight:700;font-size:15px;padding:8px 10px;cursor:pointer;color:#222;background:#f8f2e4;border-radius:8px;margin:0 0 6px}
.consume-card .rest{font-weight:400;font-size:13px;color:#888;margin-left:8px}
.consume-card-head{font-weight:700;font-size:15px;padding:8px 10px;color:#222;background:#f8f2e4;border-radius:8px;margin:0 0 6px}
.consume-card-head .rest{font-weight:400;font-size:13px;color:#888;margin-left:8px}
.consume-item{font-size:13px;color:#555;padding:5px 0 5px 18px;cursor:pointer;margin:0}
#cs-consume .d-row{display:flex;justify-content:space-between;font-size:14px;padding:8px 0;border-bottom:1px solid #e8dfc8;color:#222}
#cs-consume .d-row .deduct{color:#c0392b}
#cs-consume .d-total{display:flex;justify-content:space-between;font-size:16px;font-weight:700;padding:10px 0;color:#222}
/* Problem 132: qty stepper in the consume right detail — − [N] + per
   grouped line (mockup modelled on the owner's Youzan reference).
   Problem 142: the billing table reuses the same stepper, so the rules
   are scoped to both #cs-consume and #bill-items. */
#cs-consume .qty-step,#bill-items .qty-step{display:inline-flex;align-items:center;border:1px solid #d8cdb2;border-radius:6px;overflow:hidden;background:#fff}
#cs-consume .qty-step button,#bill-items .qty-step button{width:30px;height:30px;border:none;background:#fff;font-size:17px;cursor:pointer;color:#333;padding:0}
#cs-consume .qty-step button:hover,#bill-items .qty-step button:hover{background:#f8f2e4}
#cs-consume .qty-step .n,#bill-items .qty-step .n{width:36px;text-align:center;font-size:15px;border-left:1px solid #e5ddcb;border-right:1px solid #e5ddcb;line-height:30px}
/* Problem 140: consume right header — left-aligned bold title with 清空
   on the right; margin 0 so its first row aligns with the left column's
   first row (the 次卡 heading). */
.consume-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 4px;padding:0}
.consume-head b{font-size:15px;color:#222}
/* Problem 129: stored-value mode — the 默认账户 card on top (reference
   fig 3 style: dark blue card, balance / principal / bonus). */
.consume-acct{background:linear-gradient(135deg,#3a4668,#2c3550);color:#fff;border-radius:12px;padding:14px 16px;margin-bottom:12px}
.consume-acct-t{font-size:15px;font-weight:700;display:flex;justify-content:space-between;align-items:center}
.consume-acct-bal{font-size:20px;font-weight:700;margin:8px 0 4px}
.consume-acct-bal small{font-size:13px;font-weight:400;color:#cdd3e8}
.consume-acct-split{font-size:13px;color:#cdd3e8}
/* Problem 122: card-open tiles — brown-gold gradient cards, one kind per
   tab; the create tile starts a fresh custom card. Problem 139: tiles
   shrunk to 3 columns so ~6 fit per screen. */
.co-tiles{display:grid;grid-template-columns:1fr 1fr 1fr;gap:12px}
@media (max-width:760px){.co-tiles{grid-template-columns:1fr}}
.co-tile{border-radius:10px;padding:12px 12px 0;color:#fff;background:linear-gradient(135deg,#d69a55,#a5732f);overflow:hidden;cursor:pointer}
.co-tile:hover{filter:brightness(1.05)}
.co-tile.selected{outline:2px solid #8a6d2f;outline-offset:2px}
.co-tile-top{display:flex;justify-content:space-between;align-items:flex-start;gap:8px}
.co-tile-name{font-size:15px;font-weight:700}
.co-tile-times{font-size:12px;opacity:.95;white-space:nowrap}
.co-tile-price{font-size:20px;font-weight:700;margin-top:8px}
.co-tile-sub{font-size:12px;opacity:.92;margin-top:6px;line-height:1.5}
.co-tile-foot{margin:8px -12px 0;padding:7px 12px;background:rgba(0,0,0,.18);display:flex;justify-content:space-between;align-items:center;font-size:12px}
.co-badge{border:1px solid rgba(255,255,255,.85);border-radius:4px;padding:1px 7px;font-size:11px}
.co-create-tile{border:2px dashed var(--gold);background:#f7ecd2;border-radius:10px;min-height:88px;display:flex;align-items:center;justify-content:center;color:var(--gold2);font-size:17px;font-weight:700;cursor:pointer;margin-bottom:12px}
.co-create-tile:hover{background:#f3e3bd}
/* Problem 115: week board — centered date headers, today column deeper
   gold. Problem 152 (r53): Sat/Sun HEADERS only get the soft-pink
   #f6ddd8 (the r41 pink); the r51 gray whole columns are gone, body cells
   are back to normal. The pink rules are id-qualified so they beat the
   board-head gold (lines 242/297); the today rule below is id-qualified
   too and sits after them, so a today that falls on a weekend still shows
   gold (same specificity, later rule wins). */
#appt-month-grid thead tr.board-head th.weekend-head,
#appt-board .wb-head-day.weekend-head{background:#f6ddd8}
#appt-month-grid thead tr.board-head th.today-col-strong,
#appt-board .wb-head-day.today-col-strong{background:#f5e7bd}
body.admin .month-board th.today-col-strong,body.admin .month-board td.today-col-strong{background:#f5e7bd}
/* Problem 114: member detail — header row with 修改资料， 4 big gold
   stats, compact info table, collapsed dead cards, journal/ledger tabs. */
.md-head{display:flex;justify-content:space-between;align-items:flex-start;gap:12px}
.md-head h3{margin:0 0 4px}
.md-head .btn{flex:0 0 auto}
/* Problem 279: circular member avatars — gold initials circle when
   there is no photo; a photo fills the circle (object-fit: cover). */
.md-head-left{display:flex;gap:14px;align-items:center;min-width:0}
.avatar{display:inline-flex;align-items:center;justify-content:center;border-radius:24%;overflow:hidden;background:linear-gradient(135deg,#d9b96a,#b98a2f);color:#fff;font-weight:700;flex:none}
.avatar.lg{width:72px;height:72px;font-size:30px}
.avatar.sm{width:32px;height:32px;font-size:14px}
.avatar img{width:100%;height:100%;object-fit:cover;display:block}
.avatar-btn{position:relative;flex:none;cursor:pointer;padding:0;border:0;background:none}
.avatar-cam{position:absolute;right:-2px;bottom:-2px;width:24px;height:24px;border-radius:50%;background:#b98a2f;color:#fff;font-size:13px;display:flex;align-items:center;justify-content:center;border:2px solid #fff}
.member-name{display:flex;align-items:center;gap:6px}
.md-stats{grid-template-columns:repeat(4,1fr)}
@media (max-width:760px){.md-stats{grid-template-columns:repeat(2,1fr)}} /* problem 180: 4 stat cards, 2×2 on mobile */
.md-stats .stat{border:1px solid var(--gold);border-radius:10px;padding:6px 8px}
.md-stats .stat .num{font-size:19px;color:var(--gold2)}
.md-stats .stat .lbl{font-size:12px}
.info-table{border-collapse:collapse;margin:16px 0 0}
.info-table td{border-bottom:1px solid var(--line);padding:8px 10px 8px 0;font-size:14px}
.info-table td.k{color:var(--muted);width:110px;white-space:nowrap}
/* Problem 289: two-column info grid + 备注 row (replaces .info-table on
   the member detail); the .info-table rules above stay for nothing now. */
.md-info-grid{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--line)}
.md-info-cell{padding:7px 2px;border-bottom:1px solid var(--line);font-size:14px}
.md-info-cell:nth-child(odd){padding-right:10px}
.md-info-cell .k,.md-info-note .k{color:var(--muted);margin-right:6px}
.md-info-note{padding:7px 2px;border-bottom:1px solid var(--line);font-size:14px}
.md-notes-text{line-height:1.6}
#md-notes-input{display:block;width:100%;box-sizing:border-box;margin-top:6px;font:inherit;padding:6px 8px;border:1px solid var(--line);border-radius:8px}
/* Problem 289: 剩余卡项 — light-gold section background, cards stay
   white; two cards per row on mobile (desktop keeps the .grid auto-fill). */
.md-cards-wrap{background:#faf6ec;border-radius:10px;padding:8px}
@media (max-width:760px){.md-cards{grid-template-columns:repeat(2,minmax(0,1fr))}}
.md-card-btns{display:flex;align-items:center;flex-wrap:wrap;gap:4px;margin-top:6px}
.md-card-more{display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-top:6px;padding-top:6px;border-top:1px dashed #e3d9c2}
/* Problem 289: compact latest-3 journal list above the tabs. */
.md-journal-mini{border-top:1px solid var(--line)}
.md-journal-row{display:flex;align-items:center;gap:4px;padding:7px 2px;border-bottom:1px solid var(--line);font-size:14px}
.md-journal-row .spacer{flex:1}
.md-journal-row .more{color:var(--gold2);font-size:12px}
.md-dead{margin-top:14px}
.md-dead-toggle{cursor:pointer;padding:8px 0;font-size:14px}
.md-dead-body{margin-top:8px}
.md-tabs{display:flex;gap:4px;margin:22px 0 12px;border-bottom:1px solid var(--line)}
.md-tabs button{background:none;border:0;border-bottom:2px solid transparent;padding:6px 12px;font-size:15px;cursor:pointer;color:var(--muted)}
.md-tabs button.active{color:var(--gold2);font-weight:700;border-bottom-color:var(--gold)}
.journal-table th,.journal-table td{font-size:13px}
/* Problem 113 (r42): journal photo previews inside the form — file name
   (+ thumbnail when one can be made) with 下载 / ×. Photos never show
   in the journal table itself. */
.j-photo{display:inline-flex;align-items:center;gap:6px;border:1px solid var(--line);border-radius:8px;padding:4px 6px;margin:0 6px 6px 0;font-size:12px}
.j-photo-thumb{width:44px;height:44px;object-fit:cover;border-radius:6px}
.j-photo-name{max-width:140px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
/* Problem 119: receipt — dashed separators, bare-number rows, big bold 实付. */
.rcpt-sep{border-top:1px dashed #999;margin:10px 0;text-align:center;color:#555;font-size:12px}
.rcpt-sep b{background:#fff;padding:0 8px;font-size:13px;color:#111}
.rcpt-row{display:flex;justify-content:space-between;gap:8px;padding:1px 0}
.rcpt-row .k{color:#333}
.rcpt-row .v{text-align:right}
.rcpt-item-no{font-weight:700;font-size:14px;margin:2px 0 4px}
.rcpt-item-detail{font-size:13px;color:#333}
/* Problem 201: sequence numbers in a fixed-width span (sized for two
   digits) + gold 赠送 badge; the detail rows indent by the same 1.2em so
   their first character lines up with the item name's first character. */
.rcpt-item-detail{padding-left:1.2em}
.rcpt-seq{display:inline-block;width:1.2em}
.rcpt-gift{display:inline-block;background:#f7ecd2;color:#8a6d2f;border:1px solid #c9a86a;border-radius:10px;font-size:11px;line-height:1;padding:3px 7px;margin-left:6px;vertical-align:1px}
/* Problem 135: the receipt modal is a narrow slip (420px); other modals keep 860px */
#bill-confirm-modal .modal-card{max-width:420px}
/* Problem 151: tier gift list — one row per gift (kind + item + qty + 删除）; the item picker takes the space, kind and qty stay narrow. */
.tier-gift-row{display:flex;gap:8px;align-items:center;margin-bottom:8px}
.tier-gift-row select[data-gift-kind]{flex:0 0 104px}
.tier-gift-row select[data-gift-ref]{flex:1;min-width:0}
.tier-gift-row input[data-gift-qty]{flex:0 0 56px;width:56px}
.tier-gift-row .btn{flex:0 0 auto}
/* Problem 153a: card-list toolbar — tabs on the left, 状态 + 管理分类 +
   ＋ 添加卡项 on the right, all on one row at one font size (the 状态
   select is 14px with compact padding, like the member-list 来源 select). */
.pkg-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap;margin-top:12px}
.pkg-toolbar .tabs{margin:0}
.pkg-toolbar-right{display:flex;align-items:center;gap:8px}
.pkg-toolbar-right label{margin:0;font-size:14px;white-space:nowrap}
.pkg-toolbar-right select{width:auto;font-size:14px;padding:2px 4px}
/* Problem 137: receipt 3-column rows (消费明细/数量/金额) — 数量 centered, 金额 right */
.rcpt-cols{display:grid;grid-template-columns:1fr 52px 64px;font-size:14px;padding:2px 0;text-align:left}
.rcpt-item-name{font-size:16px}
.rcpt-cols-head{font-weight:700;border-bottom:1px solid #ddd;padding-bottom:5px;margin-bottom:5px}
.rcpt-cols .rcpt-c2{text-align:center}
.rcpt-cols .rcpt-c3{text-align:right}
.rcpt-pay{display:flex;justify-content:space-between;align-items:baseline;margin:8px 0 2px}
.rcpt-pay .k{font-size:20px;font-weight:800}
.rcpt-pay .v{font-size:26px;font-weight:800}
.rcpt-foot{text-align:center;color:#555;font-size:13px;margin-top:10px}
/* Problem 166: member custom tags (profile.tags). Color is derived at
   render time from the prefix: 不… = pink "don't do", the rest = gold
   skin. Same palette as the admin (gold #f7ecd2 is the list-header
   background; the pink is a soft alert tint). */
.tag{display:inline-flex;align-items:center;gap:4px;font-size:13px;line-height:1;padding:6px 10px;border-radius:999px;margin:2px 4px 2px 0;white-space:nowrap;vertical-align:middle}
.tag.skin{background:#f7ecd2;color:#7a5c14;border:1px solid #e3cf9a}
.tag.avoid{background:#fdeeee;color:#a33;border:1px solid #f0c4c4}
.tag .tag-x{cursor:pointer;opacity:.55;line-height:1}
.tag .tag-x:hover{opacity:1}
.mtags{margin-top:4px}
.mtags .tag{font-size:11px;padding:3px 8px}
/* Problem 247 (B 方案）: list tags sit on the same line as the name and
   truncate to one line — one member is one row. The table name cell is
   left-aligned with ellipsis; the mobile card top row clips the same way.
   The detail page tag editor is untouched. */
#member-list td.member-name{text-align:left;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mtags-inline{white-space:nowrap}
.mtags-inline .tag{font-size:11px;padding:3px 8px}
.member-card-top .mtags-inline{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis}
.tag-add{display:inline-flex;align-items:center;gap:4px;font-size:13px;padding:5px 10px;border-radius:999px;border:1px dashed #c9a86a;color:#8a6d2f;background:#fff;vertical-align:middle}
.tag-add input{border:0;outline:0;font-size:13px;width:120px;padding:0;background:transparent}
.care-alert{border:1px solid #f0c4c4;background:#fdf3f3;border-radius:8px;padding:10px 12px;margin:10px 0}
.care-alert .care-title{font-size:13px;font-weight:700;color:#a33;margin-bottom:6px}
/* Problem 167: duplicate member name warning in the member modal.
   Red #a33 matches the 166 avoid-tag red — no new main color. */
.dup-warn{color:#a33;font-size:13px;font-weight:700;margin-top:8px}
/* Problem 166 follow-up: the "+" in the tag row is a real button now,
   and a pill turns into an editable input when clicked. */
.tag-add-btn{border:0;background:transparent;color:#8a6d2f;font-size:15px;font-weight:700;line-height:1;padding:0 2px;cursor:pointer}
.tag-edit-input{font-size:13px;padding:5px 10px;border-radius:999px;border:1px solid #c9a86a;outline:none;width:110px;vertical-align:middle;background:#fff}
.tag[data-tag-edit]{cursor:pointer}
/* Problem 166 (tag picker): gold buttons, no purple. */
#tag-picker-modal .modal-card{max-width:480px}
#tag-picker-search{width:100%}
#tag-picker-list .tag{cursor:pointer}
#tag-picker-list .tag.tag-on{outline:2px solid #c9a86a}

/* ---- r92 (problems 209–231, 2026-12-03) ---- */
/* Problem 217: overview quick actions — three gold buttons in a row, each
   with a small line icon on top (mockup: pencil / card / person-plus). */
.ob-actions{display:flex;gap:16px}
.ob-actions .btn{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;padding:16px 0 14px;font-size:17px;border-radius:12px}
.ob-actions .btn svg{width:30px;height:30px}
/* Problem 217: the overview month picker — gold-bordered like the mockup. */
#ob-month{border:1px solid #c9a86a;color:#8a6d2f;border-radius:8px;padding:6px 10px;font-size:14px;background:#fff}
/* Problem 223: member list header strip — 4 numbers as small text +
   the points rule on one beige row (mockup). */
.member-summary-strip{display:flex;gap:26px;align-items:baseline;flex-wrap:wrap;margin-top:14px;padding:12px 16px;background:#fbf8f1;border:1px solid #e3ddcf;border-radius:10px}
.member-summary-strip .ms-stat{font-size:15px;color:#666}
.member-summary-strip .ms-stat b{font-size:20px;color:#8a6d2f;margin-left:6px}
.member-summary-strip .ms-points{font-size:13px;color:#888;margin-left:auto}
/* Problem 222: week board daily summary — 4 rows × 7 columns under the
   board; label column left-aligned, day columns centered. */
.week-summary{margin-top:8px}
.week-summary th,.week-summary td{text-align:center}
.week-summary td.week-sum-label{text-align:left;font-weight:700;color:#5c4a1e;white-space:nowrap}
/* Problem 212: void confirmation modal — key/value rows, red warning box,
   required reason (red asterisk). */
.void-kv{font-size:14px;line-height:2;margin:0 0 10px}
.void-kv b{display:inline-block;width:70px;color:#666;font-weight:400}
.void-warn{background:#fdf3f0;border:1px solid #f0d5cf;border-radius:8px;color:#8a3b2e;font-size:13px;line-height:1.7;padding:10px 12px;margin:0 0 14px}
.void-req{color:#c0392b}
#void-reason{width:100%;box-sizing:border-box;border:1px solid #c0392b;border-radius:6px}
#void-confirm:disabled{background:#e6b8b1;border-color:#e6b8b1;cursor:not-allowed}
/* Problem 214: walk-in journal view — the journal text under its order. */
.wj-view-box{margin:8px 0 0;padding:10px 12px;background:#fbf8f1;border:1px solid #e3ddcf;border-radius:8px;font-size:13px;line-height:1.7}
/* Problem 228: 按月办卡 table — tighter rows, name columns wider with
   slightly smaller names (mockup: 13.5px). */
.card-monthly-table td,.card-monthly-table th{padding:6px 8px}
.card-monthly-table td:nth-child(4),.card-monthly-table td:nth-child(6){font-size:13.5px;width:26%}
/* Problem 260: 每月办卡表三列底色区分，都是加粗 — 月份 #f7ecd2（跟表头
   同色）、办卡总数 #faf6ec、总金额 #f5e3b8；合计行那三格同色；列间竖线。
   Problem 267: 前三列（月份/办卡总数/总金额）居中（表头 + 每月行 + 合计
   行），后面四列（新会员办卡/金额/会员续卡/金额）保持左对齐。 */
.card-monthly-table td:nth-child(1){background:#f7ecd2;font-weight:700;text-align:center}
.card-monthly-table td:nth-child(2){background:#faf6ec;font-weight:700;text-align:center}
.card-monthly-table td:nth-child(3){background:#f5e3b8;font-weight:700;text-align:center}
.card-monthly-table th:nth-child(1),.card-monthly-table th:nth-child(2),.card-monthly-table th:nth-child(3){text-align:center}
.card-monthly-table th.grp,.card-monthly-table td.grp{border-right:1px solid #d8cfba}
.card-monthly-table .names{color:#8a7f6d;font-size:12px}
/* Problem 265: 耗卡统计表头排序 — 剩余未耗 / 耗卡率可点，箭头照会员列表。 */
#data-sec-usage th.sortable{cursor:pointer;white-space:nowrap}
#data-sec-usage th.sortable .arrow{color:#999;font-size:12px;margin-left:2px}
#data-sec-usage th.sortable .arrow.on{color:#c9a86a;font-weight:700}
/* Problem 231: 客户按月统计 — header and body cells centered. */
.cust-monthly-center th,.cust-monthly-center td{text-align:center}
