:root{--bg:#f6f7fb;--card:#fff;--line:#eceef5;--text:#111;--muted:#666;--pri:#2563eb;--red:#e53935}
body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}
a{color:var(--pri);text-decoration:none;font-weight:800}
.nav{background:#fff;border-bottom:1px solid var(--line);padding:10px 14px;display:flex;justify-content:center;position:sticky;top:0;z-index:10}
.nav-inner{display:flex;gap:18px;align-items:center;flex-wrap:wrap;justify-content:center;font-size:18px}
.brand{font-weight:900;font-size:22px}

.container{max-width:1100px;margin:0 auto;padding:14px}
.card{background:var(--card);border:1px solid var(--line);border-radius:14px;padding:14px;margin:12px 0}
.row{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.btn{border:1px solid #d7dbe7;background:#fff;border-radius:12px;padding:9px 12px;font-weight:900;cursor:pointer;display:inline-block}
.btn.primary{background:var(--pri);border-color:var(--pri);color:#fff}

input,select,textarea{border:1px solid #d7dbe7;border-radius:12px;padding:9px 10px;font-size:14px}
textarea{min-height:90px;width:100%;box-sizing:border-box}
.table{width:100%;border-collapse:separate;border-spacing:0}
.table th,.table td{padding:10px;border-bottom:1px solid var(--line);text-align:left;font-size:14px;vertical-align:top}
.table th{color:var(--muted);font-weight:800}
.badge{display:inline-block;padding:4px 8px;border-radius:999px;border:1px solid var(--line);font-size:12px;font-weight:900}
.badge.open{background:#e8fff0;border-color:#b7f0c7}
.badge.locked{background:#fff5e7;border-color:#ffe0b2}
.badge.done{background:#eef2ff;border-color:#c7d2fe}
.small{font-size:12px;color:var(--muted)}
code{background:#f3f4f6;padding:2px 6px;border-radius:8px}

/* ---- H5 Cart (购物车页) ---- */
.h5-cart .header{position:sticky;top:0;z-index:50;background:var(--card);border-bottom:1px solid var(--line)}
.h5-cart .h1{padding:12px 14px 10px 14px;font-weight:900;font-size:22px;text-align:center}
.banner{padding:8px 14px;background:#fff7e0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#7a5a00;font-size:13px;text-align:center}
.h5-cart .wrap{padding:10px 10px 20px 10px;max-width:900px;margin:0 auto}
.h5-cart .item{background:var(--card);border:1px solid var(--line);border-radius:16px;margin:8px 6px;padding:10px;display:flex;gap:10px;align-items:center}
.h5-cart .thumb{width:56px;height:56px;border-radius:12px;flex:0 0 56px;background:#f1f3f8;overflow:hidden;display:flex;align-items:center;justify-content:center}
.h5-cart .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.h5-cart .meta{flex:1;min-width:0}
.h5-cart .name{font-weight:900;font-size:16px;line-height:1.15;word-break:break-word}
.h5-cart .price{font-weight:900;color:var(--red);font-size:16px;white-space:nowrap}
.h5-cart .rowh5{display:flex;align-items:center;justify-content:space-between;gap:10px}
.h5-cart .qtybox{display:flex;align-items:center;gap:8px}
.h5-cart .qbtn{width:34px;height:34px;border-radius:10px;border:1px solid #d7dbe7;background:#fff;font-weight:900}
.h5-cart .qbtn:disabled{opacity:.35}
.h5-cart .qnum{min-width:32px;text-align:center;font-weight:900}
.h5-cart textarea{width:100%;border:1px solid #d7dbe7;border-radius:16px;padding:12px 12px;font-size:14px;box-sizing:border-box;margin-top:10px;min-height:84px}

/* 底部红条：只保留这一处合计 + 主按钮 */
.h5-cart .checkoutbar{position:fixed;left:0;right:0;bottom:56px;z-index:1000;background:var(--red);color:#fff;display:flex;align-items:center;justify-content:center;gap:14px;padding:12px 14px}
.h5-cart .checkoutbar .line{font-weight:800}
.h5-cart .checkoutbar .line b{font-weight:900}
.h5-cart .checkoutbar .go{background:#fff;color:var(--red);border:none;border-radius:24px;padding:10px 34px;font-size:16px;font-weight:900}

/* 底部 APP 导航 */
.h5-cart .tabbar{position:fixed;left:0;right:0;bottom:0;height:64px;background:#fff;border-top:1px solid var(--line);display:flex;z-index:1001}
.tabbar .tab{flex:1;background:transparent;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:800;color:#222;cursor:pointer;padding:0}
.tabbar .tab .ico{font-size:28px;line-height:1}
.tabbar .tab .txt{font-size:10px;line-height:12px;font-weight:700}
.tabbar .tab.active{color:var(--red)}

.h5-cart .tab{flex:1;background:transparent;border:none;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:800;color:#222}
.h5-cart .tab .ico{font-size:18px;line-height:18px}
.h5-cart .tab .txt{font-size:12px}
.h5-cart .tab.active{color:var(--red)}
.h5-cart .badge{display:inline-block;margin-left:6px;background:var(--red);color:#fff;border-radius:999px;padding:0 6px;font-size:10px;line-height:18px;vertical-align:middle}
.checkoutbar {
  padding: 16px 12px 20px;   /* 上下留白，和备注拉开 */
}

/* 核心按钮 */
.checkoutbar .go.full {
  display: block;
  width: 78%;
  height: 46px;
  margin: 0 auto;

  line-height: 46px;
  text-align: center;

  background: linear-gradient(#c8160f, #a90f09);
  color: #fff;
  font-size: 17px;
  font-weight: 600;

  border: none;
  border-radius: 999px;     /* 胶囊 */
}

/* 按压反馈，必须有 */
.checkoutbar .go.full:active {
  transform: scale(0.97);
  opacity: 0.9;
}

/* ===== Final two fixes (MENU header center + CART button) ===== */
.h5-menu .h1{justify-content:center !important;}
.h5-menu .title{width:100% !important;text-align:center;}
.h5-cart .h1{justify-content:center !important;}

    :root{--bg:#f6f7fb;--card:#fff;--line:#eceef5;--text:#111;--muted:#666}
    body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}
    .header{position:sticky;top:0;z-index:50;background:var(--card);border-bottom:1px solid var(--line)}
    .h1{padding:12px 14px 6px 14px;font-weight:900;font-size:20px;display:flex;align-items:center;justify-content:space-between;gap:10px}
    .banner{padding:8px 14px;background:#fff7e0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#7a5a00;font-size:13px;text-align:center}
    .wrap{padding:10px 10px 20px 10px;max-width:900px;margin:0 auto}
    .card{background:var(--card);border:1px solid var(--line);border-radius:14px;margin:8px 6px;padding:12px}
    .muted{color:var(--muted);font-size:12px}
    .title{font-size:20px;font-weight:900;text-align:center;letter-spacing:.3px;width:100%}
    .redline{height:3px;background:var(--red);opacity:.9}
    .tabbar{position:fixed;left:0;right:0;bottom:0;height:64px;background:var(--card);border-top:1px solid var(--line);display:flex;z-index:60}
    .tab{flex:1;border:0;background:transparent;padding:6px 0 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:800;color:#444}
    .tab .ico{font-size:18px;line-height:18px}
    .tab .txt{font-size:12px;line-height:12px}
    .tab.active{color:var(--red)}
    .badge{display:inline-block;margin-left:6px;background:var(--red);color:#fff;border-radius:999px;padding:1px 6px;font-size:11px;font-weight:900;vertical-align:middle}
    .wrap{padding-bottom:72px}
    
        :root{--red:#e53935;--bg:#f6f7fb;--card:#fff;--line:#eceef5;--text:#111;--muted:#666}
    body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}
    .header{position:sticky;top:0;z-index:50;background:var(--card);border-bottom:1px solid var(--line)}
    .h1{padding:14px 14px 12px 14px;font-weight:900;font-size:20px;display:flex;align-items:center;justify-content:center;gap:10px}
    .title{font-size:20px;font-weight:900;text-align:center;letter-spacing:.3px;width:100%}
    .redline{height:3px;background:var(--red);opacity:.9}
    .banner{padding:8px 14px;background:#fff7e0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#7a5a00;font-size:13px;text-align:center}
    .pill{font-size:12px;color:var(--muted)}
    .wrap{padding:10px 10px 72px 10px;max-width:900px;margin:0 auto}
    .section{margin-top:10px}
    .section-title{padding:10px 10px;font-weight:900;font-size:16px;word-break:break-word}
    .item{background:var(--card);border:1px solid var(--line);border-radius:14px;margin:8px 6px;padding:10px;display:flex;gap:10px;align-items:center}
    .thumb{width:64px;height:64px;border-radius:12px;flex:0 0 64px;background:#f1f2f6;border:1px solid var(--line);overflow:hidden;display:flex;align-items:center;justify-content:center}
    .thumb img{width:100%;height:100%;object-fit:cover;display:block}
    .meta{flex:1;min-width:0}
    .name{font-weight:900;font-size:16px;line-height:1.15;word-break:break-word}
    .price{font-weight:900;color:var(--red);font-size:16px;white-space:nowrap}
    .row{display:flex;align-items:center;justify-content:space-between;gap:10px}
    .qtybox{display:flex;align-items:center;gap:8px}
    .qbtn{width:34px;height:34px;border-radius:10px;border:1px solid #d7dbe7;background:#fff;font-weight:900}
    .qbtn:disabled{opacity:.35}
    .qnum{min-width:44px;text-align:center;font-weight:900}
    .bottom{position:fixed;left:0;right:0;bottom:0;z-index:60;background:var(--card);border-top:1px solid var(--line);padding:10px 12px;display:flex;gap:10px;align-items:center;justify-content:space-between}
    .cartbtn{flex:1;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:12px 14px;border-radius:14px;border:1px solid #d7dbe7;background:#fff;font-weight:900}
    .cartbtn strong{color:var(--red)}
    .btn.red{border-color:var(--red);color:var(--red)}
    /* modal */
    .modal{position:fixed;inset:0;background:rgba(0,0,0,.35);display:none;z-index:80}
    .sheet{position:absolute;left:0;right:0;bottom:0;background:#fff;border-radius:18px 18px 0 0;max-height:75vh;overflow:auto;padding:10px 12px}
    .sheet h3{margin:6px 6px 10px 6px}
    .cat{padding:12px 10px;border-bottom:1px solid var(--line);font-weight:800;word-break:break-word}
  
    .tabbar{position:fixed;left:0;right:0;bottom:0;height:64px;background:var(--card);border-top:1px solid var(--line);display:flex;z-index:60}
    .tab{flex:1;border:0;background:transparent;padding:6px 0 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:800;color:#444}
    .tab .ico{font-size:18px;line-height:18px}
    .tab .txt{font-size:12px;line-height:12px}
    .tab.active{color:var(--red)}
    .badge{display:inline-block;margin-left:6px;background:var(--red);color:#fff;border-radius:999px;padding:1px 6px;font-size:11px;font-weight:900;vertical-align:middle}
    .sheet{position:fixed;left:0;right:0;top:0;bottom:0;z-index:80}
    .sheet-mask{position:absolute;left:0;right:0;top:0;bottom:0;background:rgba(0,0,0,.35)}
    .sheet-panel{position:absolute;left:0;right:0;bottom:0;background:var(--card);border-radius:16px 16px 0 0;max-height:70vh;overflow:auto}
    .sheet-head{display:flex;align-items:center;justify-content:space-between;padding:12px 14px;border-bottom:1px solid var(--line)}
    .sheet-head .x{width:32px;height:32px;border-radius:10px;border:1px solid var(--line);background:#fff;font-size:18px}
    .sheet-list{padding:10px 14px}
    .sheet-item{padding:12px 12px;border:1px solid var(--line);border-radius:12px;margin-bottom:10px;font-weight:900}
        :root{--red:#e53935;--bg:#f6f7fb;--card:#fff;--line:#eceef5;--text:#111;--muted:#666}
    body{margin:0;font-family:system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,"PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}
    .header{position:sticky;top:0;z-index:50;background:var(--card);border-bottom:1px solid var(--line)}
    .h1{padding:12px 14px 6px 14px;font-weight:900;font-size:20px;display:flex;align-items:center;justify-content:center;gap:10px}
    .banner{padding:8px 14px;background:#fff7e0;border-top:1px solid var(--line);border-bottom:1px solid var(--line);color:#7a5a00;font-size:13px;text-align:center}
    .wrap{padding:10px 10px 20px 10px;max-width:900px;margin:0 auto}
    .item{background:var(--card);border:1px solid var(--line);border-radius:14px;margin:8px 6px;padding:10px;display:flex;gap:10px;align-items:center}
    .thumb{width:56px;height:56px;border-radius:12px;flex:0 0 56px;background:#f1f2f6;border:1px solid var(--line);overflow:hidden;display:flex;align-items:center;justify-content:center}
    .thumb img{width:100%;height:100%;object-fit:cover;display:block}
    .meta{flex:1;min-width:0}
    .name{font-weight:900;font-size:16px;line-height:1.15;word-break:break-word}
    .price{font-weight:900;color:var(--red);font-size:16px;white-space:nowrap}
    .row{display:flex;align-items:center;justify-content:space-between;gap:10px}
    .qtybox{display:flex;align-items:center;gap:8px}
    .qbtn{width:34px;height:34px;border-radius:10px;border:1px solid #d7dbe7;background:#fff;font-weight:900}
    .qbtn:disabled{opacity:.35}
    .qnum{min-width:44px;text-align:center;font-weight:900}
    textarea{width:100%;border:1px solid #d7dbe7;border-radius:14px;padding:12px 12px;font-size:14px;box-sizing:border-box;margin-top:10px}
    .actions{display:flex;gap:10px;flex-wrap:wrap;margin-top:12px}
    .btn.red{border-color:var(--red);color:var(--red)}
    .total{background:#fff;border:1px solid var(--line);border-radius:14px;margin:8px 6px;padding:12px;display:flex;justify-content:space-between;align-items:center;font-weight:900}
    .total strong{color:var(--red);font-size:18px}
    a{color:#6a1b9a;font-weight:900;text-decoration:none}
  
  .toast{position:fixed;left:50%;top:18%;transform:translateX(-50%);background:#1f2937;color:#fff;
    padding:14px 18px;border-radius:16px;box-shadow:0 12px 30px rgba(0,0,0,.18);display:none;z-index:90;
    min-width:240px;text-align:center;font-weight:900}
  .toast .sub{font-weight:700;opacity:.9;margin-top:6px;font-size:13px}
  .toast .ok{font-size:26px;line-height:1;margin-bottom:6px}

  .checkoutbar{position:fixed;left:0;right:0;bottom:0;z-index:80;background:var(--red);color:#fff;
    padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:12px}
  .checkoutbar .left{display:flex;flex-direction:column;gap:4px}
  .checkoutbar .meta{font-size:13px;font-weight:700;opacity:.95}
  .checkoutbar .sum{font-size:18px;font-weight:900}
  .checkoutbar .go{background:#fff;color:var(--red);border:0;border-radius:14px;
    padding:12px 18px;font-weight:900;font-size:16px;min-width:120px}
  .pagepad{padding-bottom:72px}
  .linkbar{display:flex;justify-content:space-between;gap:10px;margin-top:10px}
  .linkbar a{color:var(--muted);font-weight:800;text-decoration:none}

    .title{font-size:20px;font-weight:900;text-align:center;letter-spacing:.3px;width:100%}
    .redline{height:3px;background:var(--red);opacity:.9}
    .tabbar{position:fixed;left:0;right:0;bottom:0;height:64px;background:var(--card);border-top:1px solid var(--line);display:flex;z-index:60}
    .tab{flex:1;border:0;background:transparent;padding:6px 0 4px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:2px;font-weight:800;color:#444}
    .tab .ico{font-size:18px;line-height:18px}
    .tab .txt{font-size:12px;line-height:12px}
    .tab.active{color:var(--red)}
    .badge{display:inline-block;margin-left:6px;background:var(--red);color:#fff;border-radius:999px;padding:1px 6px;font-size:11px;font-weight:900;vertical-align:middle}
    .checkoutbar{bottom:56px}
    .pagepad{padding-bottom:140px}
    .checkoutbar{
  position: static !important;
  background: transparent !important;
}
.checkoutbar .go{
  background:#e53935 !important;
  color:#fff !important;
}
.h1{ justify-content:center !important; }
.title{ width:100% !important; text-align:center !important; }
/* ===== FINAL OVERRIDE: center the checkout button ===== */
.checkoutbar{
  width: 100% !important;              /* 关键：撑满 */
  display: flex !important;
  justify-content: center !important;  /* 关键：居中 */
  align-items: center !important;
}

.checkoutbar .go{
  display: block !important;           /* 防止 inline 影响 */
  margin: 0 auto !important;           /* 双保险：即使 flex 被干掉也能居中 */
}

/* ===== Admin Workbench Topbar (订单/桌台 + ☰抽屉菜单) ===== */
.admin .topbar{
  position: sticky;
  top: 0;
  z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--line);
  height: 56px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
}

.admin .hamburger{
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.admin .tabs{
  flex: 1;
  display: flex;
  gap: 10px;
  justify-content: center;
}

.admin .tab{
  flex: 0 0 auto; /* override global .tab {flex:1} from H5 */
  min-width: 0;
  height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  font-weight: 900;
  font-size: 14px;
  color: #333;
  background: #fff;
  padding: 0 12px;
}

.admin .tab.active{
  border-color: var(--pri);
  color: var(--pri);
  background: #eef2ff;
}

/* Drawer */
.admin .drawer{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: none;
  z-index: 80;
}
.admin .drawer.show{ display:flex; align-items:stretch; justify-content:flex-start; }

.admin .drawer-panel{
  width: 260px;
  height: 100%;
  background: #fff;
  padding: 12px;
  border-right: 1px solid var(--line);
  box-sizing: border-box;
}

.admin .drawer-panel a{
  display: block;
  padding: 12px 10px;
  border-radius: 12px;
  text-decoration: none;
  color: #333;
  font-weight: 800;
}

.admin .drawer-panel a:hover{ background: #f6f7fb; }
.admin .drawer-panel hr{ border:0; border-top:1px solid var(--line); margin:10px 0; }

/* Make container breathe under the sticky topbar */
.admin .container{ padding-top: 16px; }

/* ===== Admin Orders Workbench (Cards + Detail) ===== */
.wb-head .wb-title{font-size:20px;font-weight:900;margin-bottom:4px}

.workbench{display:flex;flex-direction:column;gap:16px}

.order-card{
  display:flex;
  background:var(--card);
  border:1px solid var(--line);
  border-radius:18px;
  min-height:120px;
  overflow:hidden;
}
.order-card.is-new{border-color:#ffb3b3}
.order-left{flex:2;padding:18px}
.table-no{font-size:26px;font-weight:900;margin-bottom:6px;display:flex;align-items:center;gap:8px}
.table-no .dot{color:var(--red);font-size:18px;line-height:1}
.order-left .meta{font-size:14px;color:var(--muted);font-weight:700}

.order-action{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:22px;
  font-weight:900;
  color:var(--red);
  border-left:1px solid var(--line);
  text-decoration:none;
}
.order-action:active{background:#fff3f3}

/* Detail page */
.wb-detail-head{display:flex;align-items:center;justify-content:space-between;gap:12px}
.wb-detail-title{font-size:20px;font-weight:900}
.order-detail-top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}
.note-line{margin-top:10px;padding:10px 12px;border:1px dashed var(--line);border-radius:12px;background:#fafbff}

.items{margin-top:12px;display:flex;flex-direction:column;gap:10px}
.items .it{display:flex;align-items:center;gap:10px;border-bottom:1px dashed var(--line);padding-bottom:8px}
.items .it:last-child{border-bottom:0;padding-bottom:0}
.items .qty{width:52px;font-weight:900}
.items .name{flex:1;min-width:0;font-weight:800}
.items .price{white-space:nowrap;font-weight:900}

.actions{margin-top:12px;display:flex;flex-wrap:wrap;gap:10px}
/* buttons are already styled in your css; ensure bigger tap area */
.actions .btn{padding:12px 14px}

/* ===== Admin Items Page v1 (layout only) ===== */
.items-page .card{padding:14px}

/* 新增区：两行紧凑（高频在第一行，低频在第二行） */
.items-page .new-item{
  display:grid;
  grid-template-columns: 180px 1fr 140px 120px auto;
  gap:10px;
  align-items:center;
}
.items-page .new-item .name{min-width:260px}
.items-page .new-item .price{max-width:140px}
.items-page .new-item .enabled{max-width:120px}
.items-page .new-item .btn.primary{padding:10px 16px;border-radius:14px}
.items-page .new-item input[type="text"],
.items-page .new-item input[type="number"],
.items-page .new-item select{
  width:100%;
  box-sizing:border-box;
}
.items-page .new-item .fullrow{
  grid-column: 1 / -1;
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.items-page .new-item .sort{max-width:120px;opacity:.75}
.items-page .hint{font-size:12px;color:var(--muted);font-weight:800}

/* 列表：每条菜 = 左看右改（抗长语言） */
.items-page .items-list{display:flex;flex-direction:column;gap:10px}
.items-page .item-card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:16px;
  padding:12px;
}
.items-page .item-row{
  display:grid;
  grid-template-columns: 360px 1fr;
  gap:14px;
  align-items:start;
}

/* 左侧：可读信息 */
.items-page .item-view{display:grid;grid-template-columns:52px 1fr;gap:10px;align-items:start}
.items-page .thumb{
  width:52px;height:52px;border-radius:12px;
  border:1px solid var(--line);
  background:#f1f3f8;
  overflow:hidden;
  display:flex;align-items:center;justify-content:center;
}
.items-page .thumb img{width:100%;height:100%;object-fit:cover;display:block}
.items-page .item-title{
  font-weight:900;
  line-height:1.15;
  word-break:break-word;
  display:-webkit-box;
  -webkit-line-clamp:2;      /* 西语/英语长文本：最多两行 */
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.items-page .item-meta{margin-top:6px;display:flex;flex-wrap:wrap;gap:8px 10px;color:var(--muted);font-size:12px;font-weight:800}
.items-page .price-tag{color:var(--red);font-weight:900;white-space:nowrap}
.items-page .mono{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace}
.items-page .pill{display:inline-block;padding:3px 8px;border-radius:999px;border:1px solid var(--line);background:#f7f8fc;font-size:12px;font-weight:900}

/* 右侧：编辑表单（两行网格 + 操作区） */
.items-page .item-edit{
  display:grid;
  grid-template-columns: 180px 1fr 140px;
  gap:10px;
  align-items:center;
}
.items-page .item-edit input,
.items-page .item-edit select{width:100%;box-sizing:border-box}
.items-page .item-edit .row2{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns: 1fr 140px 120px;
  gap:10px;
  align-items:center;
}
.items-page .item-edit .file{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.items-page .item-edit .actions2{
  grid-column:1 / -1;
  display:flex;
  justify-content:flex-end;
  gap:10px;
  align-items:center;
  margin-top:6px;
}
/* 隐藏技术字段：不删，只弱化/隐藏（功能不动） */
.items-page .image-url{display:none}

@media (max-width: 980px){
  .items-page .new-item{grid-template-columns:1fr 1fr}
  .items-page .new-item .btn.primary{grid-column:1 / -1;width:100%}
  .items-page .item-row{grid-template-columns:1fr}
  .items-page .item-edit{grid-template-columns:1fr}
  .items-page .item-edit .row2{grid-template-columns:1fr}
  .items-page .item-edit .actions2{justify-content:space-between}
}


/* ===== Phase1: category grouping + import bar ===== */
.admin .items-page .notice{
  background:#fff7e6;
  border:1px solid var(--line);
  padding:10px 12px;
  border-radius:14px;
  font-weight:800;
  margin-top:10px;
}
.admin .items-page .import-bar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  flex-wrap:wrap;
  margin-top:8px;
}
.admin .items-page .import-form{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
}
.admin .items-page .cat-header{
  margin:14px 0 8px 0;
  padding:10px 12px;
  border-radius:16px;
  background:linear-gradient(180deg,#ffffff,#fafbff);
  border:1px solid var(--line);
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
}
.admin .items-page .cat-title{
  font-size:16px;
  font-weight:900;
}
.admin .items-page .cat-sub{
  opacity:.75;
  white-space:nowrap;
}

/* ---- 订单页可读性增强（老人友好） ---- */
.order-items{
  margin-top:10px;
}
.order-item{
  font-size:18px;
  font-weight:800;
  line-height:1.45;
  margin:6px 0;
}
.order-item .price{
  font-weight:800;
  white-space:nowrap;
}
.order-note{
  margin-top:10px;
  font-size:14px;
  line-height:1.35;
  opacity:.85;
}


/* ===== Console (Unified) ===== */
.console-grid{
  display:grid;
  grid-template-columns:repeat(3, minmax(0, 1fr));
  gap:12px;
}

/* ===== Console cards (Vertical / POS-style) ===== */
.console-grid.v{ align-items:stretch; }

.tcardv{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:16px;
  padding:12px;
  box-shadow:0 1px 0 rgba(0,0,0,.02);
}
.tcardv.free{ border-color:#d7dbe8; }
.tcardv.occ{ border-color:var(--green, #16a34a); }
.tcardv.cool{ border-color:var(--red); }

.tcardv-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}
.tcardv-title{
  font-size:34px;
  font-weight:950;
  letter-spacing:.5px;
  line-height:1;
}
.tcardv-status{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  font-weight:900;
  white-space:nowrap;
}

.dot{ width:14px; height:14px; border-radius:50%; display:inline-block; }
.dot-gray{ background:#cbd5e1; }
.dot-green{ background:var(--green, #16a34a); }
.dot-red{ background:var(--red); }

.tcardv-mid{ margin-top:10px; min-height:34px; display:flex; align-items:center; }
.tcardv-line{ display:flex; align-items:center; gap:10px; flex-wrap:wrap; }
.mono{ font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; font-weight:900; }

.badge.ok{ background:#e8fff0; border-color:#b7f0c7; }
.badge.danger{ background:#fff3f3; border-color:#ffc7c7; }

.tcardv-actions{
  display:flex;
  gap:10px;
  margin-top:12px;
}
.btn.mini{
  padding:8px 10px;
  border-radius:12px;
  font-size:13px;
  font-weight:900;
  line-height:1;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:0;
  flex:1 1 0;
}
.btn.disabled{
  opacity:.35;
  pointer-events:none;
}
@media (max-width: 980px){
  .console-grid{grid-template-columns:repeat(2, minmax(0, 1fr));}
}
@media (max-width: 640px){
  .console-grid{grid-template-columns:repeat(1, minmax(0, 1fr));}
}

.tcard{
  background:var(--card);
  border:2px solid var(--line);
  border-radius:14px;
  padding:0;
  overflow:hidden;
  min-height:54px;
}
.tcard.occ{border-color:var(--red);}
.tcard.free{border-color:#d7dbe8;}

.tcard-row{
  display:flex;
  align-items:center;
  gap:0;
  min-height:54px;
}
.tno{
  flex:0 0 auto;
  min-width:56px;
  padding:0 14px;
  font-size:30px;
  font-weight:900;
  line-height:1;
}
.tsep{
  width:1px;
  align-self:stretch;
  background:var(--line);
}
.tact{
  flex:1 1 0;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:15px;
  font-weight:800;
  height:54px;
  border:0;
  background:transparent;
  cursor:pointer;
  color:var(--text);
}
.tact:active{transform:translateY(1px);}
.tact.open{color:var(--pri);}
.tact.reset{color:var(--red);}
.tact.disabled{
  opacity:.35;
  cursor:default;
}
.tact.disabled:active{transform:none;}

/* Modal */
.modal-overlay{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.38);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:50;
  padding:16px;
}
.modal{
  width:min(520px, 100%);
  background:#fff;
  border-radius:16px;
  border:1px solid var(--line);
  box-shadow:0 12px 36px rgba(0,0,0,.18);
  overflow:hidden;
}
.modal-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 14px 10px 14px;
  border-bottom:1px solid var(--line);
}
.modal-title{font-weight:900;font-size:18px;}
.modal-close{
  border:0;background:transparent;font-size:18px;cursor:pointer;
  width:34px;height:34px;border-radius:10px;
}
.modal-close:hover{background:#f2f4fb;}
.modal-body{padding:14px;}
.modal-section{margin-top:12px;}
.modal-section-title{font-weight:900;margin-bottom:8px;}
.modal-items .mi{
  display:flex;align-items:center;justify-content:space-between;
  padding:8px 0;border-bottom:1px dashed #e8ebf5;
}
.modal-items .mi:last-child{border-bottom:0;}
.modal-note{white-space:pre-wrap;word-break:break-word;}

.modal-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:14px;
}
.btn.ghost{
  background:#fff;
}
.btn.danger{
  background:#fff3f3;
}


/* Admin side drawer (console detail) */
.drawer-mask{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.35);
  z-index:1000;
}
.drawer{
  position:fixed;
  top:0;
  right:0;
  height:100vh;
  width:min(420px, 92vw);
  background:#fff;
  box-shadow:-8px 0 24px rgba(0,0,0,.18);
  z-index:1001;
  transform:translateX(102%);
  transition:transform .18s ease;
  display:flex;
  flex-direction:column;
}
.drawer.open{ transform:translateX(0); }

.drawer-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  padding:14px 14px 10px 14px;
  border-bottom:1px solid var(--line,#e8e8e8);
}
.drawer-title{
  font-size:18px;
  font-weight:800;
}
.drawer-meta{ margin-top:2px; color:#666; }

.drawer-close{
  border:0;
  background:transparent;
  font-size:18px;
  line-height:1;
  padding:6px 8px;
  border-radius:10px;
  cursor:pointer;
}
.drawer-close:hover{ background:#f3f4f6; }

.drawer-body{
  padding:12px 14px;
  overflow:auto;
  flex:1;
}
.drawer-note{
  border:1px solid var(--line,#e8e8e8);
  background:#f8fafc;
  border-radius:14px;
  padding:10px 12px;
  margin-bottom:12px;
}
.drawer-note-label{
  font-weight:700;
  margin-bottom:4px;
}
.drawer-section-title{
  font-weight:800;
  margin:8px 0 8px 0;
}
.drawer-items{ padding-bottom:10px; }

.drawer-table{
  border:1px solid var(--line,#e8e8e8);
  border-radius:14px;
  overflow:hidden;
}
.drawer-tr{
  display:grid;
  grid-template-columns: 1fr 64px 86px;
  gap:10px;
  padding:10px 12px;
  border-top:1px solid var(--line,#e8e8e8);
}
.drawer-tr.head{
  border-top:0;
  background:#f3f4f6;
  font-weight:800;
}
.drawer-tr .r{ text-align:right; }
.drawer-tr .name{ font-weight:650; }

.drawer-foot{
  border-top:1px solid var(--line,#e8e8e8);
  padding:12px 14px 14px 14px;
  background:#fff;
}
.drawer-total{
  display:flex;
  justify-content:space-between;
  align-items:center;
  font-size:18px;
  font-weight:900;
  margin-bottom:10px;
}
.drawer-actions{ display:flex; justify-content:flex-end; gap:10px; }



/* ===== Detail Drawer (Right Slide) ===== */
.detail-mask{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  display: none;
  z-index: 90;
}
.detail-mask.show{ display:block; }

.detail-drawer{
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: calc(100vw - 24px);
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line);
  box-shadow: -10px 0 30px rgba(0,0,0,.08);
  z-index: 100;
  display: flex;              /* keep in layout: never 0 size */
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
}
.detail-drawer.open{ transform: translateX(0); }

@media (max-width: 520px){
  .detail-drawer{ width: 100vw; max-width: 100vw; }
}


/* ===== Right Drawer (shared): Menu / Detail ===== */
.rd-mask{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.25);
  z-index: 9998;
}

.rd{
  position: fixed;
  top: 0;
  right: 0;
  width: 420px;
  max-width: 92vw;
  height: 100vh;
  background: #fff;
  border-left: 1px solid var(--line,#e8e8e8);
  box-shadow: -10px 0 30px rgba(0,0,0,.10);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s ease;
}
.rd.open{ transform: translateX(0); }

.rd-hd{
  display:flex;
  align-items:flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 14px 10px 14px;
  border-bottom: 1px solid var(--line,#e8e8e8);
}
.rd-title{ font-size: 18px; font-weight: 900; }
.rd-meta{ margin-top: 2px; color: #666; }
.rd-x{
  border: 0;
  background: transparent;
  font-size: 18px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 10px;
  cursor: pointer;
}
.rd-x:hover{ background: #f3f4f6; }

.rd-bd{ padding: 12px 14px; overflow: auto; flex: 1; }
.rd-ft{
  border-top: 1px solid var(--line,#e8e8e8);
  padding: 12px 14px 14px 14px;
  background: #fff;
}

.rd-menu{ display:flex; flex-direction: column; gap: 10px; }
.rd-link{
  display:block;
  padding: 10px 12px;
  border: 1px solid var(--line,#e8e8e8);
  border-radius: 12px;
  text-decoration: none;
  color: #111;
  font-weight: 900;
}
.rd-link:hover{ background: #f7f7f7; }
.rd-link.danger{ color: #d40000; border-color: #ffd1d1; }
.rd-hr{ border:none; border-top:1px solid var(--line,#e8e8e8); margin: 6px 0; }

.rd-note{
  border:1px solid var(--line,#e8e8e8);
  background:#f8fafc;
  border-radius: 14px;
  padding: 10px 12px;
  margin-bottom: 12px;
}
.rd-note-label{ font-weight: 800; margin-bottom: 4px; }
.rd-note-text{ color: #111; }

.rd-section-title{ font-weight: 900; margin: 8px 0; }

.rd-table{
  border:1px solid var(--line,#e8e8e8);
  border-radius: 14px;
  overflow: hidden;
}
.rd-tr{
  display:grid;
  grid-template-columns: 1fr 64px 86px;
  gap: 10px;
  padding: 10px 12px;
  border-top: 1px solid var(--line,#e8e8e8);
}
.rd-tr.head{ border-top:0; background:#f3f4f6; font-weight: 900; }
.rd-tr .r{ text-align:right; }
.rd-tr .name{ font-weight: 700; }

.rd-total{
  display:flex;
  justify-content: space-between;
  align-items: center;
  font-size: 18px;
  font-weight: 900;
  margin-bottom: 10px;
}
.rd-actions{ display:flex; justify-content: flex-end; gap: 10px; }

@media (max-width: 520px){
  .rd{ width: 100vw; max-width: 100vw; }
}


/* ===== Topbar "主控台" tab: match MESA style ===== */
.admin .tabs .tab{
  font-size: 28px;
  font-weight: 900;
  color: #000;
  padding: 6px 18px;
  border: 2px solid #000;
  border-radius: 8px;
  background: #fff;
  text-decoration: none;
  line-height: 1;
}


/* =======================================================================
   BUTTON SYSTEM (Normalized)
   - One base .btn (outline neutral)
   - Variants: .primary .outline .danger .ghost
   - Keeps legacy .btn.red working on H5
   ======================================================================= */

.btn{
  border:1px solid var(--line,#d7dbe7);
  background:#fff;
  color:inherit;
  border-radius:12px;
  padding:10px 12px;
  font-weight:900;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  cursor:pointer;
  -webkit-appearance:none;
  appearance:none;
}
.btn:active{transform:translateY(1px);}

/* Variants */
.btn.primary{
  background: var(--pri, #2563eb);
  border-color: var(--pri, #2563eb);
  color:#fff;
}
.btn.outline{
  background: transparent;
  border-color: var(--pri, #2563eb);
  color: var(--pri, #2563eb);
}
.btn.danger{
  background: transparent;
  border-color: var(--red, #e53935);
  color: var(--red, #e53935);
}
.btn.ghost{
  background: transparent;
  border-color: transparent;
  color: inherit;
}

/* Legacy keep: H5 uses .btn.red */
.btn.red{ border-color:var(--red, #e53935); color:var(--red, #e53935); }

/* =======================================================================
   Items page: Save/Delete (one line, same font, blue/red outline)
   HTML:
     <div class="actions2">
       <button class="btn outline" type="submit">保存</button>
       <a class="btn danger" href="...">删除</a>
     </div>
   If you don't want to touch HTML, this block also targets your current:
     <button class="btn">保存</button>
     <a class="btn danger">删除</a>
   ======================================================================= */

.items-page .item-edit .actions2{
  display:flex;
  justify-content:flex-end;
  align-items:center;
  gap:12px;
  margin-top:6px;
}

/* unify skeleton (button + a) */
.items-page .item-edit .actions2 .btn,
.items-page .item-edit .actions2 button.btn,
.items-page .item-edit .actions2 a.btn{
  min-width:96px;
  height:40px;
  padding:0 16px;
  font-size:18px;
  font-weight:900;
  line-height:1;
  border-radius:10px;
}

/* Save: blue outline (no fill) */
.items-page .item-edit .actions2 button.btn:not(.danger){
  background:transparent;
  border:2px solid var(--pri, #2563eb);
  color:var(--pri, #2563eb);
}

/* Delete: red outline (no fill) */
.items-page .item-edit .actions2 a.btn.danger{
  background:transparent;
  border:1.5px solid var(--red, #e53935);
  color:var(--red, #e53935);
}
/* === FIX: 解决底部固定导航(tabbar)遮挡最后一项，导致无法点触 === */
:root{
  --tabbar-h: 56px;
  --tabbar-safe-gap: 18px; /* 额外留白，防止不同机型/浏览器触控边缘问题 */
}

/* 菜单页/订单页主内容容器（以及所有使用 .wrap 的页面） */
.wrap{
  padding-bottom: calc(var(--tabbar-h) + var(--tabbar-safe-gap) + env(safe-area-inset-bottom));
}



/* prevent fixed tabbar from covering page content */
.has-tabbar{padding-bottom:78px}

/* === SAFE PATCH: tabbar cart badge only === */
.tabbar .ico-wrap {
  position: relative;
}

.tabbar .ico-wrap .badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 14px;
  height: 14px;
  padding: 0 3px;
  background: #e53935;
  color: #fff;
  font-size: 9px;
  line-height: 14px;
  font-weight: 600;
  border-radius: 999px;
  margin: 0;
}




/* ===== Admin Items Page v2 ===== */
.upload-mini{display:flex;align-items:center;gap:10px}
.filebtn{padding:8px 12px;border:1px solid #cfd7e3;border-radius:12px;background:#fff;cursor:pointer}
.filebtn input{display:none}
