/* ==========================================================
   泉水煲汤 · 点餐收银台  共用样式
   面向触摸屏：触摸目标 ≥ 44px，不依赖 hover，禁用误触选中
   ========================================================== */
:root {
    --c-primary: #e35d2b;
    --c-primary-dark: #c74a1c;
    --c-green: #2f8f5b;
    --c-red: #d64545;
    --c-line: #e4e6ea;
    --c-text: #1f2329;
    --c-sub: #6b7280;
    --c-bg: #f4f5f7;
    --radius: 10px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body { margin: 0; height: 100%; }

body {
    font-family: -apple-system, BlinkMacSystemFont, "Microsoft YaHei", "PingFang SC", sans-serif;
    font-size: 15px;
    color: var(--c-text);
    background: var(--c-bg);
    -webkit-user-select: none;
    user-select: none;
    overflow: hidden;
}

button { font-family: inherit; font-size: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, textarea { font-family: inherit; font-size: inherit; color: inherit; }
input:focus, textarea:focus { outline: none; }

/* ---------- 顶栏 ---------- */
.topbar {
    height: 60px;
    background: #fff;
    border-bottom: 1px solid var(--c-line);
    display: flex;
    align-items: center;
    padding: 0 20px;
    gap: 16px;
    flex-shrink: 0;
}
.topbar .brand { font-size: 19px; font-weight: 600; letter-spacing: .5px; }
.topbar .brand small { font-weight: 400; font-size: 13px; color: var(--c-sub); margin-left: 8px; }
.topbar .spacer { flex: 1; }
.cashier-name { font-size: 13px; color: var(--c-sub); white-space: nowrap; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--c-line);
    transition: transform .06s, background .15s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--c-primary); border-color: var(--c-primary); color: #fff; font-weight: 500; }
.btn-primary:active { background: var(--c-primary-dark); }
.btn-green { background: var(--c-green); border-color: var(--c-green); color: #fff; font-weight: 500; }
.btn-red { background: var(--c-red); border-color: var(--c-red); color: #fff; }
.btn-ghost { background: transparent; }

/* 顶栏按钮一色一功能：同一个按钮在所有页面都用同一个颜色 */
.btn-blue, .btn-teal, .btn-purple, .btn-purple-on, .btn-brown, .btn-gray, .btn-orange { color: #fff; font-weight: 500; }
.btn-blue { background: #2f7de1; border-color: #2f7de1; }         /* 水票充值 */
.btn-teal { background: #0f9b8e; border-color: #0f9b8e; }         /* 操作日志 */
.btn-purple { background: #7a5cf0; border-color: #7a5cf0; }       /* 菜品管理 */
.btn-purple-on { background: #5b3fd6; border-color: #5b3fd6; box-shadow: inset 0 0 0 3px rgba(255, 255, 255, .35); }
.btn-brown { background: #b45309; border-color: #b45309; }        /* 批量导入 */
.btn-gray { background: #5b6472; border-color: #5b6472; }         /* 刷新 */
.btn-outline-red { background: #fff; border-color: #efb9b9; color: var(--c-red); }  /* 退出 */
.btn-outline-red:active { background: #fdf0f0; }
.btn-orange { background: #e07b00; border-color: #e07b00; }        /* 会员查询 */
.btn-orange:active { background: #c76e00; }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn[data-busy="1"] { opacity: .6; pointer-events: none; }

/* ---------- 主区域 ---------- */
.layout { display: flex; height: calc(100% - 60px); }

/* ---------- 分类栏 ---------- */
.cats {
    width: 148px;
    background: #fff;
    border-right: 1px solid var(--c-line);
    overflow-y: auto;
    flex-shrink: 0;
    padding: 10px 0;
}
.cat {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 56px;
    padding: 8px 10px;
    text-align: center;
    color: var(--c-sub);
    position: relative;
    line-height: 1.35;
}
.cat.active { color: var(--c-primary); font-weight: 600; background: #fff7f3; }
.cat.active::before {
    content: "";
    position: absolute; left: 0; top: 12px; bottom: 12px; width: 4px;
    background: var(--c-primary); border-radius: 0 3px 3px 0;
}
.cat .dot {
    position: absolute; right: 10px; top: 10px;
    min-width: 18px; height: 18px; line-height: 18px;
    background: var(--c-primary); color: #fff;
    border-radius: 9px; font-size: 11px; text-align: center; padding: 0 4px;
}

/* ---------- 菜品区 ---------- */
.menu-col { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.dish-search {
    display: flex; align-items: center; gap: 8px;
    height: 54px; padding: 0 16px; flex-shrink: 0;
    background: #fff; border-bottom: 1px solid var(--c-line);
}
.dish-search-icon { font-size: 15px; opacity: .65; }
.dish-search input {
    flex: 1; min-width: 0; height: 36px; border: 1px solid var(--c-line);
    border-radius: 99px; padding: 0 14px; font-size: 15px; outline: none;
    background: #f7f8fa; color: var(--c-text);
}
.dish-search input:focus { border-color: var(--c-primary); background: #fff; }
.dish-search-clear {
    width: 28px; height: 28px; border: 0; border-radius: 50%;
    background: #eceff3; color: #666; font-size: 18px; line-height: 28px;
    cursor: pointer; padding: 0; flex-shrink: 0;
}
.search-summary { font-size: 13px; color: var(--c-sub); margin: 0 0 12px; }
.search-summary b { color: var(--c-primary); }
.dishes { flex: 1; overflow-y: auto; padding: 16px; }
.dish-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
}
.dish {
    background: #fff;
    border-radius: var(--radius);
    min-height: 218px;
    display: flex;
    flex-direction: column;
    position: relative;
    border: 1px solid var(--c-line);
    transition: transform .06s, box-shadow .15s;
    overflow: hidden;
}
.dish:active { transform: scale(.97); box-shadow: 0 4px 14px rgba(0,0,0,.08); }
/* 已加入购物车的菜品：绿色描边，一眼看出哪几样已经点了 */
.dish.selected {
    border-color: #2e9e5b;
    box-shadow: 0 0 0 2px rgba(46,158,91,.22);
}
.dish.selected .name { color: #1f7a45; }
.dish-image {
    height: 118px;
    background: #f2f3f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #9aa1ab;
    font-size: 13px;
    position: relative;
    overflow: hidden;
}
.dish-image img { width: 100%; height: 100%; object-fit: cover; }
.dish-info { padding: 12px 14px 14px; display: flex; flex: 1; flex-direction: column; justify-content: space-between; }
.dish-image-upload {
    position: absolute;
    right: 8px;
    bottom: 8px;
    min-height: 32px;
    padding: 0 10px;
    display: inline-flex;
    align-items: center;
    border-radius: 5px;
    background: rgba(31,35,41,.8);
    color: #fff;
    font-size: 12px;
    cursor: pointer;
    z-index: 2;
}
.dish-image-upload input { display: none; }
.dish .name { font-size: 16px; font-weight: 500; line-height: 1.4; }
.dish .desc { font-size: 12px; color: var(--c-sub); margin-top: 4px; line-height: 1.4;
    overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.dish .foot { display: flex; align-items: baseline; justify-content: space-between; margin-top: 8px; }
.dish .price { color: var(--c-primary); font-size: 19px; font-weight: 600; }
.dish .price small { font-size: 12px; font-weight: 400; }
.dish .spec-tag { font-size: 11px; color: var(--c-sub); border: 1px solid var(--c-line); border-radius: 4px; padding: 1px 5px; }
.dish .badge {
    position: absolute; top: 10px; right: 10px; z-index: 5;
    min-width: 22px; height: 22px; line-height: 22px;
    background: var(--c-primary); color: #fff;
    border-radius: 11px; font-size: 13px; font-weight: 700; text-align: center; padding: 0 7px;
    box-shadow: 0 2px 6px rgba(0,0,0,.22);
    border: 2px solid #fff;
    box-sizing: content-box;
}
.dish.soldout { opacity: .5; }
.dish.soldout::after {
    content: "已售罄";
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(255,255,255,.65);
    color: var(--c-red); font-weight: 600; font-size: 17px;
    border-radius: var(--radius);
}
.dish.soldout.managing::after { z-index: 1; pointer-events: none; }

/* ---------- 购物车 ---------- */
.cart {
    width: 340px;
    background: #fff;
    border-left: 1px solid var(--c-line);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.cart-head {
    height: 52px; display: flex; align-items: center; padding: 0 16px;
    border-bottom: 1px solid var(--c-line); font-weight: 500; gap: 10px;
}
.cart-head .clear { margin-left: auto; font-size: 13px; color: var(--c-sub); padding: 6px 8px; }
.cart-body { flex: 1; overflow-y: auto; padding: 6px 0; }
.cart-empty { text-align: center; color: #b8bcc4; padding: 60px 0; font-size: 14px; }
.cart-item { padding: 12px 16px; border-bottom: 1px solid #f2f3f5; }
.cart-item .row1 { display: flex; align-items: flex-start; gap: 8px; }
.cart-item .cname { flex: 1; font-size: 15px; line-height: 1.4; }
.cart-item .ctotal { font-size: 15px; font-weight: 600; color: var(--c-primary); }
.cart-item .spec { font-size: 12px; color: var(--c-sub); margin-top: 3px; }
.cart-item .row2 { display: flex; align-items: center; margin-top: 8px; gap: 10px; }
.stepper { display: flex; align-items: center; gap: 0; border: 1px solid var(--c-line); border-radius: 8px; overflow: hidden; }
.stepper button { width: 40px; height: 36px; font-size: 19px; color: var(--c-primary); background: #fff; }
.stepper button:active { background: #f6f7f9; }
.stepper .qty { min-width: 40px; text-align: center; font-size: 15px; }
.cart-item .del { margin-left: auto; font-size: 13px; color: var(--c-sub); padding: 6px 8px; }

.cart-foot { border-top: 1px solid var(--c-line); padding: 14px 16px 16px; }
.cart-foot .line { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.cart-foot .line .label { color: var(--c-sub); font-size: 14px; }
.cart-foot .line .amount { font-size: 27px; font-weight: 600; color: var(--c-primary); }
.cart-foot .line .amount small { font-size: 15px; }
.field { margin-bottom: 12px; }
.field label { display: block; font-size: 12px; color: var(--c-sub); margin-bottom: 5px; }
.field input, .field textarea {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--c-line); border-radius: 8px; background: #fafbfc;
    -webkit-user-select: text; user-select: text;
}
.field textarea { min-height: 60px; resize: none; }
.field select {
    width: 100%; min-height: 44px; padding: 10px 12px;
    border: 1px solid var(--c-line); border-radius: 8px; background: #fafbfc;
}

/* ---------- 桌号大按钮 / 取餐号（美团式叫号） ---------- */
.table-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.table-grid .tb {
    min-height: 56px; border-radius: var(--radius); background: #fff;
    border: 1px solid var(--c-line); font-size: 17px; font-weight: 500;
}
.table-grid .tb:active { transform: scale(.97); }
.table-grid .tb.active { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }

.pickup-bar {
    display: flex; align-items: center; gap: 8px; overflow-x: auto;
    padding: 5px 16px; background: #fff7f2; border-bottom: 1px solid #f2d8c9;
    font-size: 12px; color: var(--c-sub); flex-shrink: 0;
}
.pickup-bar .chip {
    min-width: 66px; padding: 4px 28px 4px 10px; border-radius: 999px;
    background: var(--c-primary); color: #fff; font-size: 15px; font-weight: 600;
    text-align: center; white-space: nowrap; line-height: 1.15;
    position: relative; display: inline-flex; align-items: center; justify-content: center;
}
.pickup-bar .chip small { display: block; font-size: 10px; font-weight: 400; opacity: .9; }
.pickup-bar .chip.done { background: #dfe3e8; color: #7b8390; }
.pickup-bar .chip-done {
    position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
    width: 22px; height: 22px; border-radius: 50%; border: 0;
    background: rgba(255,255,255,.25); color: #fff; font-size: 13px; line-height: 22px;
    padding: 0; cursor: pointer;
}
.pickup-bar .chip.done .chip-done { background: rgba(0,0,0,.08); color: #555; }
.pickup-bar .pickup-clear {
    margin-left: auto; flex-shrink: 0; height: 30px; padding: 0 12px;
    border: 1px solid #e3b79f; border-radius: 99px; background: #fff;
    color: #a34c22; font-size: 12px; cursor: pointer;
}
.pickup-bar .pickup-clear:hover { background: #fff1e8; }

/* ---------- 弹窗 ---------- */
/* 弹层必须「贴着屏幕」居中（position:fixed），不能用 absolute：
   absolute 是相对整张网页居中，页面一长弹层就被顶出屏幕，看起来像"点了没反应"。
   margin:auto 负责居中；弹层比屏幕还高时，从顶部开始、由 .mask 自己滚动。 */
.mask {
    position: fixed; inset: 0; background: rgba(0,0,0,.42);
    display: flex; z-index: 50; padding: 20px; overflow-y: auto;
}
.mask.hidden { display: none; }
.modal {
    background: #fff; border-radius: 14px; width: 460px; max-width: 100%;
    max-height: calc(100vh - 24px); display: flex; flex-direction: column; overflow: hidden;
    margin: auto;
}
.modal-head { padding: 18px 20px 12px; font-size: 17px; font-weight: 600; flex: 0 0 auto; }
.modal-body { padding: 0 20px 8px; overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.modal-foot { padding: 14px 20px 18px; display: flex; gap: 12px; flex: 0 0 auto; }
.modal-foot .btn { flex: 1; }
.spec-list { display: flex; flex-wrap: wrap; gap: 10px; }
.spec-opt {
    min-height: 44px; padding: 0 18px; display: flex; align-items: center;
    border: 1px solid var(--c-line); border-radius: 8px; background: #fafbfc;
}
.spec-opt.active { border-color: var(--c-primary); background: #fff7f3; color: var(--c-primary); font-weight: 500; }
.spec-opt .add { font-size: 12px; margin-left: 6px; opacity: .8; }

/* ---------- Toast ---------- */
.toast-wrap {
    position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
    z-index: 999; display: flex; flex-direction: column; gap: 8px; align-items: center;
    pointer-events: none;
}
.toast {
    background: rgba(31,35,41,.92); color: #fff;
    padding: 12px 22px; border-radius: 10px; font-size: 15px;
    max-width: 70vw; text-align: center; line-height: 1.5;
    animation: toastIn .16s ease-out;
}
.toast.ok { background: rgba(47,143,91,.95); }
.toast.err { background: rgba(214,69,69,.95); }
@keyframes toastIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* ---------- 收银台 ---------- */
.cashier-layout { display: flex; height: calc(100% - 60px); }
.order-list { width: 400px; background: #fff; border-right: 1px solid var(--c-line); display: flex; flex-direction: column; flex-shrink: 0; }
.order-list .hd { height: 50px; display: flex; align-items: center; padding: 0 16px; border-bottom: 1px solid var(--c-line); font-weight: 500; gap: 8px; }
.order-list .hd .count { color: var(--c-sub); font-size: 13px; font-weight: 400; }
.order-list .bd { flex: 1; overflow-y: auto; }
.oitem { padding: 14px 16px; border-bottom: 1px solid #f2f3f5; display: flex; align-items: center; gap: 12px; }
.oitem.active { background: #fff7f3; }
.oitem .no { font-size: 15px; font-weight: 500; }
.oitem .meta { font-size: 12px; color: var(--c-sub); margin-top: 4px; }
.oitem .amt { margin-left: auto; font-size: 18px; font-weight: 600; color: var(--c-primary); }
.oitem .st { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #f1f2f4; color: var(--c-sub); }
.oitem .st.paid { background: #e8f5ee; color: var(--c-green); }
.oitem .st.unpaid { background: #fdeee7; color: var(--c-primary); }

.checkout { flex: 1; padding: 20px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
/* 菜品多时付款/操作卡片固定在底部，避免按钮被滚动到屏幕外 */
.checkout > .card:last-child {
    position: sticky; bottom: 0; z-index: 3; flex-shrink: 0;
    background: #fff; box-shadow: 0 -10px 22px rgba(0,0,0,.10);
    padding: 12px 16px;
}
/* 收银台底部付款按钮：缩小字号，禁止换行，避免把底部区域撑高 */
.checkout .pay-actions { gap: 7px; flex-wrap: nowrap; }
.checkout .pay-actions .btn {
    flex: 1 1 0; min-width: 0; min-height: 40px; padding: 0 6px;
    font-size: 13.5px; line-height: 1.15; white-space: nowrap;
    letter-spacing: 0; overflow: hidden;
}
.card { background: #fff; border-radius: var(--radius); border: 1px solid var(--c-line); padding: 18px 20px; }
.card h3 { margin: 0 0 14px; font-size: 15px; font-weight: 600; color: var(--c-sub); }
.summary { display: flex; align-items: baseline; justify-content: space-between; }
.summary .big { font-size: 40px; font-weight: 600; color: var(--c-primary); }
.summary .big small { font-size: 18px; }
.big-drop { font-size: 15px; color: var(--c-sub); }
.item-lines { margin: 0; padding: 0; list-style: none; }
.item-lines li { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dashed #eef0f3; font-size: 14px; }
.item-lines li:last-child { border-bottom: none; }
.item-lines .n { color: var(--c-sub); margin-left: 8px; font-size: 12px; }

.scan-box { display: flex; gap: 12px; align-items: center; }
.scan-box input {
    flex: 1; height: 62px; padding: 0 18px; font-size: 20px; letter-spacing: 1px;
    border: 2px solid var(--c-primary); border-radius: 12px; background: #fffaf7;
    -webkit-user-select: text; user-select: text;
}
.scan-box input::placeholder { font-size: 15px; letter-spacing: 0; color: #b9bec7; }
.pay-actions { display: flex; gap: 12px; }
.pay-actions .btn { flex: 1; }
.hint { font-size: 12px; color: var(--c-sub); line-height: 1.6; }
.placeholder { flex: 1; display: flex; align-items: center; justify-content: center; color: #b8bcc4; }

/* ---------- 收银员登录 ---------- */
.login-page { display: flex; align-items: center; justify-content: center; overflow: auto; padding: 20px; }
.login-panel { width: 400px; max-width: 100%; background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius); padding: 36px; }
.login-brand { font-size: 26px; font-weight: 600; text-align: center; }
.login-subtitle { text-align: center; color: var(--c-sub); margin: 8px 0 30px; }
.login-panel label { display: block; color: var(--c-sub); font-size: 13px; margin: 16px 0 6px; }
.login-panel input { width: 100%; height: 48px; border: 1px solid var(--c-line); border-radius: 8px; padding: 0 12px; font-size: 16px; }
.login-panel input:focus { border-color: var(--c-primary); box-shadow: 0 0 0 3px rgba(227,93,43,.12); }
.login-panel .btn { margin-top: 18px; }
.login-error { min-height: 20px; color: var(--c-red); font-size: 13px; margin-top: 12px; }

/* ---------- 小票（打印用，80mm） ---------- */
@media print {
    body * { visibility: hidden; }
    #print-area, #print-area * { visibility: visible; }
    #print-area { position: absolute; left: 0; top: 0; width: 72mm; }
}
#print-area {
    position: fixed; left: -9999px; top: 0; width: 72mm;
    background: #fff; color: #000;
    font-family: "SimSun", "Microsoft YaHei", monospace; font-size: 12px; line-height: 1.5;
}
#print-area .p-center { text-align: center; }
#print-area .p-title { font-size: 16px; font-weight: bold; letter-spacing: 2px; }
#print-area .p-hr { border-top: 1px dashed #000; margin: 6px 0; }
#print-area .p-row { display: flex; justify-content: space-between; }
#print-area .p-it { display: flex; justify-content: space-between; }
#print-area .p-big { font-size: 15px; font-weight: bold; }
#print-area .p-note { text-align: center; margin-top: 6px; }

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #d8dbe0; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 原料库存 ---------- */
.stock-layout { display: flex; height: calc(100% - 60px); }
.stock-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.stock-toolbar {
    display: flex; align-items: center; gap: 12px; padding: 14px 18px;
    background: #fff; border-bottom: 1px solid var(--c-line); flex-shrink: 0;
}
.stock-toolbar input[type="text"] {
    width: 240px; height: 44px; padding: 0 14px;
    border: 1px solid var(--c-line); border-radius: 8px; background: #fafbfc;
    -webkit-user-select: text; user-select: text;
}
.stock-toolbar .spacer { flex: 1; }
.stock-stats { display: flex; gap: 20px; color: var(--c-sub); font-size: 13px; white-space: nowrap; }
.stock-stats b { color: var(--c-text); font-size: 17px; margin: 0 2px; }
.stock-stats .warn b { color: var(--c-red); }

.stock-list { flex: 1; overflow-y: auto; padding: 14px 18px; }
.stock-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.mcard {
    background: #fff; border: 1px solid var(--c-line); border-radius: var(--radius);
    padding: 12px 14px; display: flex; flex-direction: column; gap: 10px;
}
.mcard.warn { border-color: #f0c2c2; background: #fff9f9; }
.mcard .mhead { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.mcard .mname { font-size: 16px; font-weight: 500; }
.mcard .mremark {
    font-size: 12px; color: var(--c-sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.mcard .mqty { margin-left: auto; font-size: 23px; font-weight: 600; color: var(--c-primary); white-space: nowrap; }
.mcard .mprice { font-size: 13px; font-weight: 500; color: #c25e00; white-space: nowrap; }
.mcard .mprice small { font-size: 11px; font-weight: 400; color: var(--c-sub); }
.mcard .mqty small { font-size: 12px; font-weight: 400; color: var(--c-sub); margin-left: 2px; }
.mcard.warn .mqty { color: var(--c-red); }
.mcard .mtip { font-size: 12px; color: var(--c-red); }
.mcard .macts { display: flex; gap: 8px; }
.mcard .macts .btn { flex: 1; min-height: 40px; padding: 0 8px; font-size: 14px; }
.mcard .macts .btn-edit { flex: 0 0 56px; }

.stock-side {
    width: 380px; flex-shrink: 0; background: #fff;
    border-left: 1px solid var(--c-line); display: flex; flex-direction: column;
}
.stock-side .hd {
    height: 52px; display: flex; align-items: center; gap: 8px;
    padding: 0 16px; border-bottom: 1px solid var(--c-line); font-weight: 500; flex-shrink: 0;
}
.stock-side .hd .sub { font-size: 12px; color: var(--c-sub); font-weight: 400;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 130px; }
.stock-side .bd { flex: 1; overflow-y: auto; }
.rc { padding: 12px 16px; border-bottom: 1px solid #f2f3f5; }
.rc .r1 { display: flex; align-items: baseline; gap: 8px; }
.rc .rname { font-size: 14px; }
.rc .rtag { font-size: 11px; padding: 2px 6px; border-radius: 4px; background: #f1f2f4; color: var(--c-sub); }
.rc .rtag.in { background: #e8f5ee; color: var(--c-green); }
.rc .rtag.out { background: #fdeee7; color: var(--c-primary); }
.rc .rtag.check { background: #eef2fb; color: #3b5bdb; }
.rc .rnum { margin-left: auto; font-weight: 600; }
.rc .rnum.in { color: var(--c-green); }
.rc .rnum.out { color: var(--c-primary); }
.rc .rnum.zero { color: var(--c-sub); }
.rc .r2 { font-size: 12px; color: var(--c-sub); margin-top: 5px; line-height: 1.6; }
.rc .r2 .sep { margin: 0 6px; color: #d5d8dd; }
.empty-line { text-align: center; color: #b8bcc4; padding: 50px 16px; font-size: 14px; line-height: 1.8; }

/* 库存弹层的数字键盘 */
.qty-input {
    width: 100%; height: 64px; padding: 0 16px; font-size: 28px; font-weight: 600;
    text-align: right; color: var(--c-primary);
    border: 2px solid var(--c-primary); border-radius: 12px; background: #fffaf7;
    -webkit-user-select: text; user-select: text; letter-spacing: 1px;
}
.numpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 12px; }
.numpad .btn { min-height: 54px; font-size: 20px; background: #fafbfc; }
.qty-preview { margin-top: 12px; font-size: 13px; color: var(--c-sub); line-height: 1.7; }
.qty-preview b { color: var(--c-primary); font-size: 16px; margin: 0 2px; }
.qty-preview .bad { color: var(--c-red); }
.stock-form .row { display: flex; gap: 12px; }
.stock-form .row .field { flex: 1; }
.unit-chips { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.unit-chip {
    border: 1px solid var(--c-line); background: #fafbfc; color: #555;
    border-radius: 6px; padding: 3px 8px; font-size: 12px; cursor: pointer;
}
.unit-chip:hover { border-color: #e3b79f; color: var(--c-primary); }
.unit-hint { font-size: 11px; color: #999; margin-top: 5px; }

/* ---------- 库存查询清单 ---------- */
.stock-list-tools {
    display: flex; align-items: center; gap: 14px; margin-bottom: 10px;
}
.stock-list-tools input,
.stock-list-tools select {
    height: 36px; padding: 0 10px;
    border: 1px solid var(--c-line); border-radius: 8px; font-size: 14px;
}
.stock-list-tools input { width: 280px; }
.stock-list-tools select { width: 150px; background: #fff; }
.stock-list-tools span { color: var(--c-sub); font-size: 12px; }
.stock-table-wrap { max-height: 60vh; overflow: auto; border: 1px solid var(--c-line); border-radius: 8px; }
.stock-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.stock-table th {
    position: sticky; top: 0; z-index: 1; background: #fafbfc; color: #666;
    font-weight: 500; text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--c-line);
    white-space: nowrap;
}
.stock-table td { padding: 8px 10px; border-bottom: 1px solid #f2f3f5; white-space: nowrap; }
.stock-table tr:last-child td { border-bottom: 0; }
.stock-table tr:hover td { background: #fffaf7; }

/* ---------- 右上角设置菜单 ---------- */
.settings-wrap { position: relative; display: inline-flex; align-items: center; }
.settings-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 150px;
    padding: 6px;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 10px;
    box-shadow: 0 10px 28px rgba(0, 0, 0, .14);
    z-index: 3000;
}
.settings-menu.open { display: block; }
.settings-item {
    display: block;
    width: 100%;
    padding: 9px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--c-text);
    font-size: 14px;
    text-align: left;
    white-space: nowrap;
    cursor: pointer;
}
.settings-item:hover { background: #f4f1ff; color: #6b46e5; }
.settings-item.btn-purple-on { background: #ede8ff; color: #6b46e5; }

/* ---------- 套餐配菜选择 ---------- */
.pkg-head { display:flex; justify-content:space-between; align-items:center; margin-bottom:14px; }
.pkg-head .price { font-size:24px; font-weight:700; color:var(--c-primary); }
.pkg-sec { margin-bottom:16px; }
.pkg-sec-title { font-size:15px; font-weight:600; margin-bottom:8px; display:flex; justify-content:space-between; }
.pkg-sec-title small { font-weight:400; color:var(--c-sub); font-size:12px; }
.pkg-options { display:grid; grid-template-columns:repeat(3,1fr); gap:8px; }
@media (max-width: 900px) { .pkg-options { grid-template-columns:repeat(2,1fr); } }
.pkg-opt {
    border:1px solid var(--c-line); background:#fafbfc; border-radius:10px;
    padding:10px 12px; text-align:left; font-size:14px; cursor:pointer;
    display:flex; justify-content:space-between; align-items:center; gap:8px;
}
.pkg-opt:hover { border-color:#e3b79f; }
.pkg-opt.active { border-color:var(--c-primary); background:#fff7f3; color:var(--c-primary); }
.pkg-opt .check { font-size:13px; font-weight:600; }
.pkg-fixed { display:flex; flex-wrap:wrap; gap:8px; }
.pkg-fixed span { background:#f2f5f8; border-radius:99px; padding:6px 12px; font-size:13px; color:#555; }
.pkg-tip { font-size:12px; color:var(--c-sub); margin-top:6px; }


/* ---------- 常用备注 ---------- */
.remark-chips { display:flex; flex-wrap:wrap; gap:6px; max-height:112px; overflow-y:auto; padding-right:2px; }
.remark-chip {
    border:1px solid var(--c-line); background:#fafbfc; color:#555;
    border-radius:99px; padding:6px 10px; font-size:13px; cursor:pointer;
}
.remark-chip:hover { border-color:#e3b79f; }
.remark-chip.active { background:#fff1e8; border-color:var(--c-primary); color:var(--c-primary); font-weight:600; }

/* 收银台右上角「去点餐」：比普通操作按钮更醒目 */
.topbar .btn-go-order {
    min-height: 52px;
    padding: 0 28px;
    margin-left: 6px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 10px;
    white-space: nowrap;
    box-shadow: 0 6px 16px rgba(227, 93, 43, .28);
}
.topbar .btn-go-order:hover { background: var(--c-primary-dark, #c94f22); }

/* ---------- 批量入库 ---------- */
.batch-head, .batch-row {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 100px 110px 44px;
    gap: 8px;
    align-items: center;
}
.batch-head { font-size: 12px; color: var(--c-sub); margin-bottom: 6px; }
.batch-row { margin-bottom: 8px; }
.batch-row select, .batch-row input {
    height: 40px; border: 1px solid var(--c-line); border-radius: 8px;
    padding: 0 10px; font-size: 14px; background: #fff; min-width: 0;
}
.batch-row input { text-align: right; }
.batch-row .mat-cell { position: relative; min-width: 0; }
.batch-row .mat-cell input { width: 100%; text-align: left; }
.mat-suggest {
    display: none;
    position: absolute;
    left: 0; right: 0; top: calc(100% + 4px);
    z-index: 30;
    background: #fff;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0,0,0,.12);
    max-height: 220px;
    overflow-y: auto;
}
.mat-suggest-item {
    display: flex; justify-content: space-between; gap: 10px;
    padding: 8px 10px; font-size: 13px; cursor: pointer;
    border-bottom: 1px solid #f2f3f5;
}
.mat-suggest-item:last-child { border-bottom: 0; }
.mat-suggest-item:hover { background: #fff7f3; }
.mat-suggest-item .ms-name { color: #333; }
.mat-suggest-item .ms-sub { color: #999; font-size: 12px; white-space: nowrap; }
.batch-del {
    width: 36px; height: 36px; border: 0; border-radius: 8px;
    background: #fdecec; color: #c62828; font-size: 18px; cursor: pointer;
}
.batch-empty { color: var(--c-sub); font-size: 13px; padding: 8px 0; }

/* ---------- 扫码支付等待 ---------- */
.pay-spinner {
    width: 42px; height: 42px; margin: 0 auto;
    border: 4px solid #f1e4dc;
    border-top-color: var(--c-primary);
    border-radius: 50%;
    animation: pay-spin .8s linear infinite;
}
@keyframes pay-spin { to { transform: rotate(360deg); } }

/* ---------- 赠品自提手机号快速筛选 ---------- */
.gift-suggest {
    margin-top: 6px;
    border: 1px solid var(--c-line);
    border-radius: 8px;
    background: #fff;
    max-height: 220px;
    overflow-y: auto;
    box-shadow: 0 6px 18px rgba(0,0,0,.08);
}
.gift-suggest-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    cursor: pointer;
    font-size: 14px;
    border-bottom: 1px solid #f2f3f5;
}
.gift-suggest-item:last-child { border-bottom: 0; }
.gift-suggest-item:hover { background: #fff7f3; }
.gift-suggest-item .g-name { color: #333; }
.gift-suggest-item .g-phone { color: #888; letter-spacing: .5px; }
