/* ============================================================
   清欢渡酒馆 · 后台管理系统样式（新中式设计系统）
   ============================================================ */
:root {
  --ink: #232b29;
  --ink-light: #2f3a37;
  --red: #a84438;
  --red-light: #c25d4e;
  --red-dark: #8a352c;
  --gold: #c39f5c;
  --gold-light: #d9bd86;
  --jade: #5d7a63;
  --paper: #f6f1e8;
  --card: #fffdf8;
  --text-1: #2b2620;
  --text-2: #6b6257;
  --text-3: #9b9184;
  --text-disabled: #c4bbab;
  --border: #e8e0d2;
  --divider: #efe8d9;
  --shadow-card: 0 2rpx 12rpx rgba(0, 0, 0, 0.06);
  --shadow-float: 0 8px 28px rgba(35, 43, 41, 0.16);
  --radius: 12px;
  --radius-lg: 16px;
  --sidebar-w: 232px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC',
    'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  font-size: 14px;
  color: var(--text-1);
  background: var(--paper);
}

.hidden {
  display: none !important;
}

button {
  font-family: inherit;
  cursor: pointer;
}

input,
select,
textarea {
  font-family: inherit;
  font-size: 14px;
}

/* ================= 登录页 ================= */
.login {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 10%, rgba(195, 159, 92, 0.3) 0%, transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(168, 68, 56, 0.25) 0%, transparent 45%),
    linear-gradient(150deg, #2c3633 0%, #1c2422 100%);
}

.login-card {
  position: relative;
  width: 380px;
  background: rgba(255, 253, 248, 0.97);
  border-radius: 20px;
  border: 1px solid rgba(195, 159, 92, 0.4);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.35);
  padding: 44px 40px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.login-seal {
  width: 64px;
  height: 64px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(168, 68, 56, 0.35);
}

.login-brand {
  margin-top: 18px;
  font-size: 34px;
  font-weight: 700;
  letter-spacing: 10px;
  color: var(--ink);
  padding-left: 10px;
}

.login-sub {
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-3);
  letter-spacing: 2px;
}

.login-input {
  width: 100%;
  height: 46px;
  margin-top: 18px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fbf7ee;
  color: var(--text-1);
  outline: none;
  transition: border-color 0.2s;
}

.login-input:focus {
  border-color: var(--gold);
}

.login-btn {
  width: 100%;
  height: 48px;
  margin-top: 22px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 4px;
  transition: transform 0.15s, opacity 0.15s;
}

.login-btn:hover {
  opacity: 0.92;
}

.login-btn:active {
  transform: scale(0.98);
}

.login-hint {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-disabled);
}

/* ================= 主框架 ================= */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background:
    radial-gradient(circle at 100% 0%, rgba(195, 159, 92, 0.16) 0%, transparent 45%),
    linear-gradient(180deg, #2c3633 0%, #1e2624 100%);
  display: flex;
  flex-direction: column;
  z-index: 20;
}

.logo {
  display: flex;
  align-items: center;
  padding: 22px 20px;
  border-bottom: 1px solid rgba(195, 159, 92, 0.18);
}

.logo-seal {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text {
  margin-left: 12px;
  display: flex;
  flex-direction: column;
}

.logo-text b {
  font-size: 18px;
  color: var(--gold-light);
  letter-spacing: 3px;
}

.logo-text small {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 2px;
}

.nav {
  flex: 1;
  padding: 14px 12px;
  overflow-y: auto;
}

.nav-item {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 16px;
  margin-bottom: 4px;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.62);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.18s;
  user-select: none;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.9);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(168, 68, 56, 0.85), rgba(168, 68, 56, 0.55));
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px rgba(168, 68, 56, 0.3);
}

.nav-icon {
  width: 22px;
  margin-right: 10px;
  text-align: center;
  font-size: 16px;
}

.sidebar-foot {
  padding: 16px 20px;
  font-size: 11px;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.3);
  letter-spacing: 1px;
  border-top: 1px solid rgba(195, 159, 92, 0.14);
}

.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: 64px;
  background: var(--card);
  border-bottom: 1px solid var(--divider);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-1);
  position: relative;
  padding-left: 14px;
}

.topbar-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 4px;
  height: 18px;
  border-radius: 2px;
  background: linear-gradient(180deg, var(--red-light), var(--red-dark));
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13px;
  color: var(--text-2);
}

.shop-chip {
  color: #8a6a2f;
  background: rgba(195, 159, 92, 0.14);
  border-radius: 16px;
  padding: 4px 14px;
}

.logout {
  color: var(--text-3);
  cursor: pointer;
}

.logout:hover {
  color: var(--red);
}

.view {
  padding: 24px 28px 48px;
  flex: 1;
}

/* ================= 通用组件 ================= */
.card {
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
}

.card + .card {
  margin-top: 18px;
}

.card-title {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn {
  height: 34px;
  padding: 0 16px;
  border-radius: 17px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-2);
  font-size: 13px;
  transition: all 0.15s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn:hover {
  border-color: var(--gold);
  color: #8a6a2f;
}

.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  border: none;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(168, 68, 56, 0.25);
}

.btn-primary:hover {
  color: #fff;
  opacity: 0.92;
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  border: none;
  color: var(--ink);
  font-weight: 600;
}

.btn-gold:hover {
  color: var(--ink);
  opacity: 0.92;
}

.btn-sm {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
}

.btn-danger {
  color: var(--red);
  border-color: rgba(168, 68, 56, 0.35);
}

.btn-danger:hover {
  background: var(--red);
  color: #fff;
  border-color: var(--red);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.toolbar .spacer {
  flex: 1;
}

.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid #e8e2d6;
  margin-bottom: 16px;
}

.tab {
  appearance: none;
  border: none;
  background: none;
  padding: 10px 18px;
  font-size: 14px;
  color: #8a8378;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  font-family: inherit;
}

.tab:hover { color: #a84438; }

.tab.active {
  color: #a84438;
  font-weight: 600;
  border-bottom-color: #a84438;
}

.input,
.select,
.textarea {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbf7ee;
  color: var(--text-1);
  outline: none;
}

.textarea {
  height: auto;
  padding: 10px 12px;
  resize: vertical;
  min-height: 72px;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--gold);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th {
  text-align: left;
  padding: 10px 12px;
  background: #f4ede0;
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}

.table th:first-child {
  border-top-left-radius: 8px;
}

.table th:last-child {
  border-top-right-radius: 8px;
  text-align: right;
}

.table td {
  padding: 12px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-1);
  vertical-align: middle;
}

.table tr:last-child td {
  border-bottom: none;
}

.table tr:hover td {
  background: #fdfaf3;
}

.table .col-num,
.table .col-actions {
  text-align: right;
  white-space: nowrap;
}

.table .col-actions {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

/* ===== 会员管理 / 微信用户：原生表格通用排版（铺满 + 加宽列间隙，防止数字挤在一起） ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  table-layout: auto;
}

.table-wrap th {
  text-align: left;
  padding: 13px 22px;
  background: #f4ede0;
  color: var(--text-2);
  font-weight: 600;
  white-space: nowrap;
}

.table-wrap th:first-child {
  border-top-left-radius: 8px;
}

.table-wrap th:last-child {
  border-top-right-radius: 8px;
}

.table-wrap td {
  padding: 15px 22px;
  border-bottom: 1px solid var(--divider);
  color: var(--text-1);
  vertical-align: middle;
  white-space: nowrap;
}

.table-wrap tbody tr:last-child td {
  border-bottom: none;
}

.table-wrap tbody tr:hover td {
  background: #fdfaf3;
}

/* 详情页半宽双列表格（充值/消费）：列内边距收紧，避免横向滚动 */
.detail-grid2 .table-wrap th,
.detail-grid2 .table-wrap td {
  padding-top: 11px;
  padding-bottom: 11px;
  padding-left: 12px;
  padding-right: 12px;
}

.thumb {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f0e9db;
  vertical-align: middle;
}

.tag {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 4px;
  font-size: 12px;
  margin-right: 4px;
}

.tag-red {
  color: var(--red);
  background: rgba(168, 68, 56, 0.09);
}

.tag-gold {
  color: #8a6a2f;
  background: rgba(195, 159, 92, 0.15);
}

.tag-jade {
  color: var(--jade);
  background: rgba(93, 122, 99, 0.12);
}

.tag-gray {
  color: var(--text-3);
  background: #f0e9db;
}

.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 24px;
}

.switch input {
  display: none;
}

.switch-track {
  position: absolute;
  inset: 0;
  border-radius: 12px;
  background: #d8cfbe;
  transition: background 0.2s;
  cursor: pointer;
}

.switch-track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.switch input:checked + .switch-track {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
}

.switch input:checked + .switch-track::after {
  transform: translateX(18px);
}

.empty-state {
  padding: 60px 0;
  text-align: center;
  color: var(--text-3);
  font-size: 13px;
}

.empty-state .emoji {
  font-size: 44px;
  display: block;
  margin-bottom: 10px;
}

/* ================= 看板 ================= */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.stat-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  padding: 20px 22px;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  right: -20px;
  top: -20px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: 0.08;
}

.stat-card.t-red::after {
  background: var(--red);
}

.stat-card.t-gold::after {
  background: var(--gold);
}

.stat-card.t-jade::after {
  background: var(--jade);
}

.stat-card.t-ink::after {
  background: var(--ink);
}

.stat-label {
  font-size: 13px;
  color: var(--text-3);
}

.stat-value {
  margin-top: 10px;
  font-size: 30px;
  font-weight: 700;
  color: var(--text-1);
}

.stat-value .unit {
  font-size: 14px;
  font-weight: 400;
  color: var(--text-3);
  margin-left: 4px;
}

.stat-foot {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.dash-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 16px;
  margin-top: 18px;
}

.rank-list {
  display: flex;
  flex-direction: column;
}

.rank-item {
  display: flex;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--divider);
}

.rank-item:last-child {
  border-bottom: none;
}

.rank-no {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: #f0e9db;
  color: var(--text-3);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}

.rank-no.top {
  background: linear-gradient(135deg, var(--red-light), var(--red-dark));
  color: #fff;
}

.rank-name {
  flex: 1;
  min-width: 0;
}

.rank-name b {
  font-size: 13px;
  font-weight: 600;
  display: block;
}

.rank-name small {
  color: var(--text-3);
  font-size: 12px;
}

.rank-bar {
  width: 120px;
  height: 6px;
  border-radius: 3px;
  background: #f0e9db;
  margin: 0 12px;
  overflow: hidden;
}

.rank-bar i {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
}

.rank-num {
  width: 64px;
  text-align: right;
  font-size: 13px;
  font-weight: 600;
}

.chart-bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 180px;
  padding-top: 10px;
}

.chart-col {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
}

.chart-bar {
  width: 60%;
  max-width: 34px;
  border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, var(--red-light), var(--red-dark));
  min-height: 2px;
  transition: height 0.4s ease;
}

.chart-label {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-3);
}

.chart-value {
  font-size: 11px;
  color: var(--text-2);
  margin-bottom: 4px;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  margin-right: 6px;
}

.dot-idle {
  background: var(--jade);
}

.dot-using {
  background: var(--gold);
}

.dot-pending {
  background: var(--red, #a84438);
}

/* ================= 弹窗 ================= */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(20, 16, 10, 0.45);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s;
}

.modal {
  width: 520px;
  max-width: calc(100vw - 48px);
  max-height: 86vh;
  background: var(--card);
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  animation: popIn 0.22s cubic-bezier(0.2, 1.2, 0.4, 1);
}

.modal.wide {
  width: 720px;
}

/* 新订单大屏弹窗 */
.modal.modal-bigscreen {
  width: min(900px, 94vw) !important;
  font-size: 16px;
}
.modal.modal-bigscreen .modal-body {
  padding: 24px 28px;
}
.modal.modal-bigscreen .amt-row {
  font-size: 16px;
  padding: 10px 0;
}
.modal.modal-bigscreen .order-item-row {
  padding: 14px 0;
  font-size: 16px;
}
.modal.modal-bigscreen .order-item-row .thumb {
  width: 56px;
  height: 56px;
}
.modal.modal-bigscreen .modal-foot button {
  padding: 12px 28px;
  font-size: 15px;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
}

@keyframes popIn {
  from {
    transform: scale(0.94) translateY(10px);
    opacity: 0;
  }
}

.modal-head {
  padding: 20px 24px 14px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-close {
  border: none;
  background: none;
  font-size: 22px;
  color: var(--text-3);
  line-height: 1;
}

.modal-body {
  padding: 4px 24px 20px;
  overflow-y: auto;
}

.modal-foot {
  padding: 14px 24px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.form-row {
  display: flex;
  align-items: flex-start;
  margin-bottom: 14px;
}

.form-label {
  width: 96px;
  flex-shrink: 0;
  padding-top: 8px;
  font-size: 13px;
  color: var(--text-2);
}

.form-label .req {
  color: var(--red);
  margin-right: 3px;
}

.form-control {
  flex: 1;
  min-width: 0;
}

.form-control .input,
.form-control .select,
.form-control .textarea {
  width: 100%;
}

.form-tip {
  font-size: 12px;
  color: var(--text-3);
  margin-top: 4px;
}

.order-items {
  border: 1px solid var(--divider);
  border-radius: 10px;
  overflow: hidden;
}

.order-item-row {
  display: flex;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--divider);
  font-size: 13px;
}

.order-item-row:last-child {
  border-bottom: none;
}

.amt-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 13px;
  color: var(--text-2);
}

.amt-row.final {
  border-top: 1px dashed var(--border);
  margin-top: 8px;
  padding-top: 12px;
  font-weight: 700;
  color: var(--text-1);
  font-size: 15px;
}

.amt-row .cut {
  color: var(--red);
}

/* ================= Toast ================= */
.toast-root {
  position: fixed;
  top: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}

.toast {
  padding: 10px 22px;
  border-radius: 22px;
  background: rgba(35, 43, 41, 0.94);
  color: #fff;
  font-size: 13px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  animation: toastIn 0.25s;
}

.toast.success {
  background: rgba(93, 122, 99, 0.96);
}

.toast.error {
  background: rgba(168, 68, 56, 0.96);
}

@keyframes toastIn {
  from {
    transform: translateY(-12px);
    opacity: 0;
  }
}

.table-area-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-2);
  margin: 18px 0 10px;
}

.table-area-title:first-child {
  margin-top: 0;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 12px;
}

.table-cell {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  background: #fbf7ee;
}

.table-cell.using {
  border-color: rgba(195, 159, 92, 0.5);
  background: rgba(195, 159, 92, 0.08);
}

.table-cell h4 {
  font-size: 15px;
  margin-bottom: 4px;
}

.table-cell p {
  font-size: 12px;
  color: var(--text-3);
}

.table-cell .cell-actions {
  margin-top: 10px;
  display: flex;
  gap: 6px;
}

.table-cell .cell-actions .btn {
  white-space: nowrap;
  padding: 0 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1100px) {
  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .dash-row,
  .two-col {
    grid-template-columns: 1fr;
  }
}

/* 窄屏：侧栏收为顶部横向导航 */
@media (max-width: 900px) {
  .sidebar {
    position: static;
    width: auto;
    bottom: auto;
  }
  .logo,
  .sidebar-foot {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    padding: 8px 10px;
    gap: 2px;
  }
  .nav-item {
    white-space: nowrap;
    margin-bottom: 0;
    height: 40px;
    flex-shrink: 0;
  }
  .nav-icon {
    display: none;
  }
  .main {
    margin-left: 0;
  }
  .topbar {
    padding: 0 16px;
  }
  .view {
    padding: 16px;
  }
  .login-card {
    width: calc(100vw - 40px);
    padding: 36px 28px 28px;
  }
}

@media (max-width: 520px) {
  .stat-grid {
    grid-template-columns: 1fr;
  }
  .topbar-right .shop-chip,
  .topbar-right .topbar-admin {
    display: none;
  }
}

/* ================= 经营看板：趋势图 / 占比 / 时段 ================= */
.trend-svg {
  width: 100%;
  height: auto;
  display: block;
  margin-top: 6px;
}

/* ===== 数据统计：日期选择条 / 小时矩阵钻取 ===== */
.build-tag {
  display: block;
  margin-top: 10px;
  font-size: 11px;
  letter-spacing: .5px;
  color: rgba(255, 255, 255, .55);
  text-align: center;
}
.build-tag.top {
  display: inline-block;
  margin-top: 0;
  color: #a89880;
  background: #f3ede2;
  border-radius: 999px;
  padding: 2px 9px;
  font-size: 11px;
}
.update-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: linear-gradient(90deg, var(--gold-light), var(--gold));
  color: #3d2f1d;
  text-align: center;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  box-shadow: 0 2px 12px rgba(0, 0, 0, .25);
}
.update-bar u {
  text-decoration: underline;
  font-weight: 700;
}
.mday-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 4px 0 14px;
}
.mday-chip {
  border: 1px solid #e0d6c4;
  background: #fff;
  border-radius: 10px;
  padding: 6px 12px;
  cursor: pointer;
  text-align: center;
  min-width: 92px;
  line-height: 1.55;
  transition: border-color .12s, background .12s;
}
.mday-chip b {
  display: block;
  font-size: 13px;
  color: #3a3228;
}
.mday-chip small {
  color: #9a8f7d;
  font-size: 11px;
  white-space: nowrap;
}
.mday-chip:hover {
  border-color: #c39f5c;
}
.mday-chip.on {
  border-color: #a84438;
  background: #fdf0ef;
}
.mday-chip.on b {
  color: #a84438;
}
.mday-chip.zero {
  opacity: .55;
}
.mslot-end {
  font-size: 10px;
  color: #9a8f7d;
  font-weight: 400;
}
.matrix-table td.mcell {
  cursor: pointer;
}
.matrix-table td.mcell:hover {
  outline: 2px solid #c39f5c;
  outline-offset: -2px;
}
.matrix-table td.mcell.sel {
  outline: 2px solid #a84438;
  outline-offset: -2px;
}
.mdet-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 16px 0 8px;
  font-size: 14px;
}
.mdet-sum {
  font-size: 13px;
  color: #6b6357;
}
.mdet-sum b {
  color: #a84438;
}
.mdet-head .btn {
  margin-left: auto;
}
.mitems {
  font-size: 12px;
  color: #5d5448;
  line-height: 1.75;
}
.mitems small {
  color: #9a8f7d;
}
.mitems.mitem-hit {
  color: #a84438;
  font-weight: 600;
}
.mitems.mitem-hit::before {
  content: '● ';
  font-size: 10px;
}

.chart-legend {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  margin-left: 12px;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-2);
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-right: 5px;
}

.legend-swatch {
  display: inline-block;
  width: 12px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
}

/* ===== 存取酒：条目卡片 + 流水表（信息分层、铺满防重叠） ===== */
.wine-entry {
  border: 1px solid #ecdcc4;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 14px;
  background: #fffdf7;
}
.wine-entry.is-finished {
  border-color: #e8e4dc;
  background: #faf8f4;
}
.wine-entry__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.wine-entry__heading {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.wine-entry__name {
  font-size: 17px;
  font-weight: 700;
  white-space: nowrap;
}
.wine-entry__guest {
  font-size: 13px;
  color: #8b6914;
  white-space: nowrap;
}
.wine-entry__qty {
  display: inline-flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}
.wine-entry__qty b {
  font-size: 24px;
  font-weight: 800;
  color: #a84438;
  line-height: 1;
}
.wine-entry__qty span {
  font-size: 12px;
  color: #999;
}
.wine-entry__actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.wine-entry__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 6px 20px;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(201, 162, 89, 0.07);
  border-radius: 8px;
}
.wine-entry__meta div {
  font-size: 12.5px;
  color: #8a806d;
  line-height: 1.7;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.wine-entry__meta b {
  color: #5d5445;
  font-weight: 600;
}
.wine-entry__remark {
  margin-top: 8px;
  font-size: 12.5px;
  color: #9a907c;
}
.wine-logs {
  width: 100%;
  margin-top: 10px;
  font-size: 12.5px;
  table-layout: fixed;
  border-collapse: collapse;
}
.wine-logs th {
  text-align: left;
  padding: 7px 10px;
  color: #9a907c;
  font-weight: 600;
  border-bottom: 1px solid #eee5d3;
  white-space: nowrap;
}
.wine-logs td {
  padding: 7px 10px;
  border-bottom: 1px solid #f4efe3;
  vertical-align: top;
  word-break: break-word;
}
.wine-logs tr:last-child td { border-bottom: none; }
.wine-logs col.c-time   { width: 148px; }
.wine-logs col.c-op     { width: 68px; }
.wine-logs col.c-change { width: 84px; }
.wine-logs col.c-after  { width: 84px; }
.wine-logs col.c-who    { width: 110px; }
.wine-logs .num {
  font-weight: 600;
  white-space: nowrap;
}
.wine-logs .num.minus { color: #a84438; }
.wine-logs .num.plus  { color: #3d8b6e; }
.wine-logs .muted { color: #aaa; }
.wine-logs-empty {
  font-size: 12.5px;
  color: #bbb;
  padding: 10px 2px;
}

.legend-line {
  display: inline-block;
  width: 16px;
  height: 3px;
  border-radius: 2px;
  margin-right: 5px;
}

.delta {
  font-size: 12px;
  font-weight: 600;
  margin-left: 8px;
  padding: 1px 7px;
  border-radius: 10px;
  vertical-align: middle;
}

.delta.up {
  color: #2f7a52;
  background: rgba(93, 122, 99, 0.14);
}

.delta.down {
  color: var(--red);
  background: rgba(168, 68, 56, 0.1);
}

.share-bar {
  display: flex;
  width: 100%;
  height: 22px;
  border-radius: 6px;
  overflow: hidden;
  margin: 12px 0 14px;
  border: 1px solid var(--border);
}

.share-seg {
  display: block;
  height: 100%;
  transition: width 0.4s ease;
}

.pour-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.pour-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 8px;
  border-radius: 10px;
  background: #f3ede0;
}

.pour-box.gold {
  background: linear-gradient(135deg, rgba(195, 159, 92, 0.2), rgba(195, 159, 92, 0.08));
}

.pour-num {
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.1;
}

.pour-label {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
}

.hour-bars {
  height: 170px;
}

.chart-bar.hour {
  background: linear-gradient(180deg, var(--gold-light), var(--gold));
}

.chart-tip {
  margin: 12px 2px 0;
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.7;
}

/* ================= 订单设置 ================= */
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

@media (max-width: 1100px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* ================= 点单码弹窗 ================= */
.qr-modal {
  width: 360px;
  max-width: calc(100vw - 40px);
}

.qr-paper {
  display: inline-block;
  padding: 18px 22px 16px;
  background: #fff;
  border: 1px dashed var(--gold);
  border-radius: 12px;
}

.qr-img {
  width: 220px;
  height: 220px;
  display: block;
  margin: 0 auto;
}

.qr-brand {
  margin-top: 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--ink);
}

.qr-table {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-2);
}

.qr-tip {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

.qr-content {
  margin: 14px auto 6px;
  max-width: 280px;
  font-size: 11px;
  color: var(--text-3);
  font-family: ui-monospace, Menlo, Consolas, monospace;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.qr-scene {
  font-size: 11px;
  color: var(--text-3);
}

.qr-scene code {
  background: #f0e9db;
  padding: 1px 6px;
  border-radius: 4px;
  color: var(--ink);
}

.qr-modal .modal-foot .btn {
  text-decoration: none;
}
