/* ==========================================================================
   烘焙星球 POS · 设计规范
   主色：暖橙 #F5731F   背景：奶油暖白   风格：浅色系 / 大圆角 / 柔和阴影
   目标设备：安卓平板（横屏 1280×800 为设计基准）
   ========================================================================== */

:root {
  /* —— 主色（橙） —— */
  --c-primary: #f5731f;
  --c-primary-d: #de5f0d;
  --c-primary-l: #ff9a4d;
  --c-primary-50: #fff5ec;
  --c-primary-100: #ffe9d8;
  --c-primary-200: #ffd7b8;

  /* —— 中性 —— */
  --bg: #fdf7f1;
  --bg-top: #fffaf5;
  --card: #ffffff;
  --line: #f1e6da;
  --line-2: #e8dbcc;
  --t1: #33281f;
  --t2: #7c6b5b;
  --t3: #b0a193;

  /* —— 语义色 —— */
  --green: #17a568;
  --green-bg: #e9f8f0;
  --red: #e8503a;
  --red-bg: #fdedea;
  --blue: #3b82f6;
  --blue-bg: #eaf2fe;
  --purple: #8b5cf6;
  --purple-bg: #f2edfe;
  --amber: #f59e0b;
  --amber-bg: #fff5e0;

  /* —— 圆角 —— */
  --r-xs: 8px;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-xl: 24px;
  --r-full: 999px;

  /* —— 阴影 —— */
  --sh-xs: 0 1px 2px rgba(176, 116, 62, .06);
  --sh-sm: 0 1px 2px rgba(176, 116, 62, .05), 0 2px 8px rgba(176, 116, 62, .05);
  --sh-md: 0 4px 16px rgba(176, 116, 62, .09);
  --sh-lg: 0 12px 36px rgba(176, 116, 62, .15);
  --sh-primary: 0 6px 18px rgba(245, 115, 31, .3);

  /* —— 尺寸 —— */
  --sidebar-w: 88px;
  --topbar-h: 64px;
  --cart-w: 368px;

  --ease: cubic-bezier(.32, .72, 0, 1);
}

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

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

body {
  font-family: "PingFang SC", "HarmonyOS Sans SC", "Source Han Sans SC",
    "Microsoft YaHei", "Hiragino Sans GB", system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  color: var(--t1);
  background: var(--bg);
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

button {
  cursor: pointer;
}

/* 内联 SVG 默认尺寸：未显式指定时不再撑满容器 */
svg {
  width: 18px;
  height: 18px;
  flex: none;
}

::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #e6d7c7;
  border-radius: 99px;
}

::-webkit-scrollbar-thumb:hover {
  background: #d8c4ae;
}

.num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ==========================================================================
   1. 应用骨架
   ========================================================================== */
.app {
  display: flex;
  height: 100vh;
  width: 100vw;
  background: linear-gradient(170deg, var(--bg-top) 0%, var(--bg) 42%, #fbf1e7 100%);
}

/* —— 左侧导航 —— */
.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  background: #fffdfb;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 14px 0 10px;
  z-index: 20;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 14px;
}

.brand-logo {
  width: 46px;
  height: 46px;
  border-radius: 15px;
  background: linear-gradient(145deg, #ffa95e, var(--c-primary));
  box-shadow: 0 6px 14px rgba(245, 115, 31, .32);
  display: grid;
  place-items: center;
  font-size: 24px;
  line-height: 1;
}

.brand-name {
  font-size: 10px;
  font-weight: 600;
  color: var(--t2);
  letter-spacing: .5px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  width: 100%;
  padding: 0 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 9px 2px 8px;
  border-radius: var(--r-md);
  color: var(--t2);
  transition: background .18s var(--ease), color .18s var(--ease);
}

.nav-item svg {
  width: 21px;
  height: 21px;
  stroke-width: 1.9;
}

.nav-item span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .2px;
}

.nav-item:active {
  transform: scale(.96);
}

.nav-item.active {
  background: linear-gradient(150deg, var(--c-primary-50), #fff2e4);
  color: var(--c-primary-d);
  font-weight: 600;
}

.nav-item.active::before {
  content: "";
  position: absolute;
  left: -10px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 22px;
  border-radius: 0 3px 3px 0;
  background: var(--c-primary);
}

.nav-item.active span {
  font-weight: 600;
}

.nav-badge {
  position: absolute;
  top: 6px;
  right: 14px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 99px;
  background: var(--red);
  color: #fff;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
  line-height: 1;
  box-shadow: 0 0 0 2px #fffdfb;
}

.sidebar-foot {
  padding-top: 8px;
  border-top: 1px solid var(--line);
  width: 66px;
  display: flex;
  justify-content: center;
}

/* —— 主区 —— */
.main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  height: var(--topbar-h);
  flex: 0 0 var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 253, 251, .82);
  backdrop-filter: blur(12px);
  z-index: 15;
}

.topbar-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: .2px;
}

.topbar-sub {
  font-size: 12px;
  color: var(--t3);
  margin-top: 1px;
}

.topbar-spacer {
  flex: 1;
}

.top-pill {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border-radius: var(--r-full);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
}

.top-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: var(--green);
  box-shadow: 0 0 0 3px var(--green-bg);
}

.top-user {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 12px 0 5px;
  border-radius: var(--r-full);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--sh-xs);
}

.avatar {
  width: 30px;
  height: 30px;
  border-radius: 99px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, #ffa95e, var(--c-primary));
  flex: none;
}

.avatar.g2 {
  background: linear-gradient(145deg, #7fd3ac, #17a568);
}

.avatar.g3 {
  background: linear-gradient(145deg, #9db9f7, #4f7fe8);
}

.avatar.g4 {
  background: linear-gradient(145deg, #c9aaf9, #8b5cf6);
}

.avatar.g5 {
  background: linear-gradient(145deg, #f6c169, #e59a15);
}

.avatar-lg {
  width: 52px;
  height: 52px;
  font-size: 19px;
  border-radius: 18px;
}

/* —— 页面容器 —— */
.page {
  flex: 1;
  min-height: 0;
  padding: 16px 20px 20px;
  overflow-y: auto;
  animation: pageIn .3s var(--ease);
}

.page.no-pad {
  padding: 16px 20px 20px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

/* ==========================================================================
   2. 通用组件
   ========================================================================== */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-sm);
}

.card-pad {
  padding: 18px 20px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px 12px;
}

.card-head h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.card-title-bar {
  width: 3px;
  height: 15px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--c-primary-l), var(--c-primary));
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 600;
  transition: transform .12s var(--ease), box-shadow .2s, background .2s, opacity .2s;
  white-space: nowrap;
  user-select: none;
}

.btn svg {
  width: 17px;
  height: 17px;
  stroke-width: 2;
}

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

.btn-primary {
  background: linear-gradient(160deg, var(--c-primary-l), var(--c-primary));
  color: #fff;
  box-shadow: var(--sh-primary);
}

.btn-primary:active {
  background: linear-gradient(160deg, var(--c-primary), var(--c-primary-d));
}

.btn-ghost {
  background: #fff;
  color: var(--t2);
  border: 1px solid var(--line-2);
  box-shadow: var(--sh-xs);
}

.btn-ghost:hover {
  color: var(--c-primary);
  border-color: var(--c-primary-200);
  background: var(--c-primary-50);
}

.btn-soft {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
}

.btn-soft:hover {
  background: var(--c-primary-100);
}

.btn-danger-soft {
  background: var(--red-bg);
  color: var(--red);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
  border-radius: var(--r-md);
}

.btn-sm {
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  border-radius: var(--r-sm);
  font-weight: 500;
}

.btn-icon {
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: var(--r-sm);
  flex: none;
}

.btn[disabled] {
  opacity: .45;
  pointer-events: none;
}

.field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 42px;
  padding: 0 14px;
  border-radius: var(--r-md);
  background: #fff;
  border: 1px solid var(--line-2);
  transition: border-color .2s, box-shadow .2s;
}

.field:focus-within {
  border-color: var(--c-primary-l);
  box-shadow: 0 0 0 3px var(--c-primary-50);
}

.field svg {
  width: 17px;
  height: 17px;
  color: var(--t3);
  flex: none;
  stroke-width: 2;
}

.field input {
  flex: 1;
  min-width: 0;
}

.field input::placeholder {
  color: var(--t3);
}

.chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.chip {
  height: 36px;
  padding: 0 16px;
  border-radius: var(--r-full);
  background: #fff;
  border: 1px solid var(--line-2);
  color: var(--t2);
  font-size: 13px;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  transition: all .18s var(--ease);
}

.chip:active {
  transform: scale(.96);
}

.chip.active {
  background: linear-gradient(160deg, var(--c-primary-l), var(--c-primary));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--sh-primary);
  font-weight: 600;
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 22px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 11.5px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.tag-gray {
  background: #f6f1ea;
  color: var(--t2);
}

.tag-orange {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
}

.tag-green {
  background: var(--green-bg);
  color: var(--green);
}

.tag-red {
  background: var(--red-bg);
  color: var(--red);
}

.tag-blue {
  background: var(--blue-bg);
  color: var(--blue);
}

.tag-purple {
  background: var(--purple-bg);
  color: var(--purple);
}

.tag-amber {
  background: var(--amber-bg);
  color: #c47f05;
}

/* —— 表格 —— */
.table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.table th {
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: var(--t3);
  padding: 0 14px 10px;
  white-space: nowrap;
}

.table td {
  padding: 13px 14px;
  border-top: 1px solid var(--line);
  font-size: 13.5px;
  vertical-align: middle;
}

.table tbody tr {
  transition: background .15s;
}

.table tbody tr:hover {
  background: #fffaf5;
}

.table .t-right {
  text-align: right;
}

/* —— 统计卡 —— */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.stat {
  position: relative;
  padding: 16px 18px;
  border-radius: var(--r-lg);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--sh-sm);
  overflow: hidden;
}

.stat::after {
  content: "";
  position: absolute;
  right: -18px;
  top: -18px;
  width: 76px;
  height: 76px;
  border-radius: 99px;
  background: var(--c-primary-50);
  opacity: .75;
}

.stat.hl {
  background: linear-gradient(150deg, #ff9a4d, var(--c-primary) 72%);
  border-color: transparent;
  box-shadow: var(--sh-primary);
}

.stat.hl .stat-label,
.stat.hl .stat-value,
.stat.hl .stat-meta {
  color: #fff;
}

.stat.hl .stat-icon {
  background: rgba(255, 255, 255, .22);
  color: #fff;
}

.stat.hl::after {
  background: rgba(255, 255, 255, .12);
}

.stat-icon {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  background: var(--c-primary-50);
  color: var(--c-primary);
  margin-bottom: 12px;
}

.stat-icon svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.stat-label {
  position: relative;
  z-index: 1;
  font-size: 12.5px;
  color: var(--t2);
}

.stat-value {
  position: relative;
  z-index: 1;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -.4px;
  margin-top: 2px;
}

.stat-value small {
  font-size: 14px;
  font-weight: 600;
  margin-left: 2px;
}

.stat-meta {
  position: relative;
  z-index: 1;
  font-size: 11.5px;
  color: var(--t3);
  margin-top: 6px;
  display: flex;
  align-items: center;
  gap: 5px;
}

.up {
  color: var(--red);
  font-weight: 600;
}

.down {
  color: var(--green);
  font-weight: 600;
}

/* ==========================================================================
   3. 收银台
   ========================================================================== */
.pos-wrap {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 16px;
}

.pos-left {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.pos-toolbar {
  display: flex;
  gap: 10px;
  align-items: center;
}

.pos-toolbar .field {
  flex: 1;
}

.goods-grid {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 12px;
  padding: 2px 4px 4px 2px;
  align-content: start;
}

.goods-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 10px;
  box-shadow: var(--sh-xs);
  transition: transform .16s var(--ease), box-shadow .2s, border-color .2s;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.goods-card:active {
  transform: scale(.97);
  border-color: var(--c-primary-200);
  box-shadow: var(--sh-md);
}

.goods-thumb {
  position: relative;
  height: 84px;
  border-radius: var(--r-md);
  display: grid;
  place-items: center;
  font-size: 40px;
  line-height: 1;
  overflow: hidden;
}

.goods-thumb::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(120% 90% at 50% 0%, rgba(255, 255, 255, .55), transparent 62%);
}

.goods-card .name {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

.goods-card .sub {
  font-size: 11px;
  color: var(--t3);
  margin-top: -5px;
}

.goods-card .row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}

.price {
  color: var(--c-primary-d);
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -.2px;
}

.price i {
  font-style: normal;
  font-size: 11.5px;
  font-weight: 600;
  margin-right: 1px;
}

.stock {
  font-size: 11px;
  color: var(--t3);
}

.goods-card .add-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 99px;
  background: var(--c-primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  display: grid;
  place-items: center;
  box-shadow: 0 2px 6px rgba(245, 115, 31, .4);
}

.goods-card.out {
  opacity: .5;
}

.spec-dot {
  display: inline-block;
  font-size: 10px;
  font-weight: 600;
  color: var(--c-primary-d);
  background: var(--c-primary-50);
  padding: 1px 6px;
  border-radius: 99px;
  margin-left: 4px;
  vertical-align: 2px;
  line-height: 1.4;
}

.line-more {
  position: absolute;
  right: 6px;
  top: 6px;
  width: 22px;
  height: 22px;
  border-radius: 7px;
  color: var(--t3);
  font-size: 16px;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: all .14s;
}

.line-more:active {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
}

/* —— 购物车 —— */
.cart {
  width: var(--cart-w);
  flex: 0 0 var(--cart-w);
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--sh-md);
  overflow: hidden;
}

.cart-head {
  padding: 14px 16px 12px;
  border-bottom: 1px dashed var(--line-2);
}

.cart-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 11px;
}

.cart-title h3 {
  margin: 0;
  font-size: 15.5px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
}

.cart-title h3>span {
  white-space: nowrap;
}

.cart-title .count {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--c-primary-d);
  background: var(--c-primary-50);
  padding: 2px 8px;
  border-radius: 99px;
  white-space: nowrap;
  flex: none;
}

.seg {
  display: flex;
  gap: 4px;
  background: #f8f2eb;
  padding: 3px;
  border-radius: var(--r-md);
}

.seg button {
  flex: 1;
  height: 30px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--t2);
  transition: all .16s var(--ease);
}

.seg button.active {
  background: #fff;
  color: var(--c-primary-d);
  box-shadow: var(--sh-xs);
}

.cart-list {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 8px 10px;
}

.cart-line {
  position: relative;
  display: flex;
  gap: 10px;
  padding: 9px 6px;
  border-radius: var(--r-md);
  transition: background .15s;
  animation: lineIn .22s var(--ease);
}

@keyframes lineIn {
  from {
    opacity: 0;
    transform: translateX(10px);
  }
}

.cart-line:hover {
  background: #fffaf5;
}

.cart-thumb {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 23px;
  flex: none;
}

.cart-line-main {
  flex: 1;
  min-width: 0;
}

.cart-line-main .n {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-line-main .s {
  font-size: 11px;
  color: var(--t3);
  margin-top: 1px;
}

.cart-line-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 6px;
}

.stepper {
  display: flex;
  align-items: center;
  gap: 2px;
}

.stepper button {
  width: 24px;
  height: 24px;
  border-radius: 8px;
  background: var(--c-primary-50);
  color: var(--c-primary-d);
  display: grid;
  place-items: center;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  transition: all .14s;
}

.stepper button:active {
  background: var(--c-primary-100);
  transform: scale(.9);
}

.stepper .q {
  min-width: 26px;
  text-align: center;
  font-size: 13.5px;
  font-weight: 700;
}

.cart-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--t3);
  padding: 30px 0;
}

.cart-empty .ico {
  font-size: 46px;
  opacity: .55;
  filter: grayscale(.4);
}

.cart-empty p {
  margin: 0;
  font-size: 13px;
}

.cart-foot {
  border-top: 1px dashed var(--line-2);
  padding: 12px 16px 14px;
  background: linear-gradient(180deg, #fffdfb, #fff8f2);
}

.sum-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  color: var(--t2);
  padding: 3px 0;
}

.sum-line .v {
  font-weight: 600;
  color: var(--t1);
}

.sum-line.discount .v {
  color: var(--red);
}

.total-line {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin: 9px 0 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.total-line .lbl {
  font-size: 13px;
  color: var(--t2);
  font-weight: 600;
}

.total-line .amt {
  font-size: 30px;
  font-weight: 800;
  color: var(--c-primary-d);
  letter-spacing: -1px;
  line-height: 1;
}

.total-line .amt i {
  font-style: normal;
  font-size: 16px;
  font-weight: 700;
  margin-right: 1px;
}

.cart-actions {
  display: flex;
  gap: 8px;
}

.cart-actions .btn-primary {
  flex: 1;
}

/* ==========================================================================
   4. 会员
   ========================================================================== */
.member-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.member-card {
  position: relative;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--sh-sm);
  transition: transform .16s var(--ease), box-shadow .2s;
  overflow: hidden;
  text-align: left;
}

.member-card:active {
  transform: scale(.985);
  box-shadow: var(--sh-md);
}

.member-card::after {
  content: "";
  position: absolute;
  right: -30px;
  bottom: -40px;
  width: 110px;
  height: 110px;
  border-radius: 99px;
  background: var(--c-primary-50);
  opacity: .6;
}

.member-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
}

.member-name {
  font-size: 15px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 6px;
}

.member-phone {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
}

.member-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px dashed var(--line-2);
}

.member-stats .k {
  font-size: 11px;
  color: var(--t3);
}

.member-stats .v {
  font-size: 16px;
  font-weight: 700;
  margin-top: 1px;
}

.member-stats .v.o {
  color: var(--c-primary-d);
}

/* 会员等级徽章 */
.lv {
  height: 20px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  line-height: 1;
}

.lv-bronze {
  background: #fdf0e4;
  color: #ad6f34;
}

.lv-silver {
  background: #f0f2f5;
  color: #6b7684;
}

.lv-gold {
  background: #fff6dd;
  color: #c48c0a;
}

.lv-diamond {
  background: #eef2ff;
  color: #5267d6;
}

/* 会员详情抽屉 */
.drawer-mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 42, 28, .34);
  backdrop-filter: blur(2px);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s;
}

.drawer-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 470px;
  max-width: 88vw;
  background: var(--bg-top);
  box-shadow: -16px 0 44px rgba(120, 80, 44, .16);
  z-index: 101;
  transform: translateX(100%);
  transition: transform .32s var(--ease);
  display: flex;
  flex-direction: column;
}

.drawer.show {
  transform: none;
}

.drawer-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
}

.drawer-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 24px;
}

.drawer-foot {
  padding: 12px 18px;
  border-top: 1px solid var(--line);
  background: #fff;
  display: flex;
  gap: 9px;
}

/* 会员资料头部卡 */
.member-hero {
  position: relative;
  border-radius: var(--r-lg);
  padding: 18px;
  color: #fff;
  background: linear-gradient(140deg, #ffa653, var(--c-primary) 60%, #e2640f);
  box-shadow: var(--sh-primary);
  overflow: hidden;
}

.member-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -60px;
  width: 170px;
  height: 170px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .13);
}

.member-hero-b {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.member-hero .lbl {
  font-size: 11.5px;
  opacity: .85;
}

.member-hero .big {
  font-size: 27px;
  font-weight: 800;
  letter-spacing: -.6px;
}

.member-hero .big i {
  font-style: normal;
  font-size: 15px;
  margin-right: 2px;
}

.hero-cell {
  text-align: center;
  min-width: 74px;
}

.hero-cell .v {
  font-size: 17px;
  font-weight: 700;
}

/* 时间线 */
.timeline {
  position: relative;
  padding-left: 20px;
}

.timeline::before {
  content: "";
  position: absolute;
  left: 5px;
  top: 6px;
  bottom: 6px;
  width: 2px;
  background: linear-gradient(180deg, var(--c-primary-100), var(--line));
  border-radius: 2px;
}

.tl-item {
  position: relative;
  padding: 0 0 15px;
}

.tl-item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 5px;
  width: 9px;
  height: 9px;
  border-radius: 99px;
  background: #fff;
  border: 2.5px solid var(--c-primary-l);
}

.tl-item.in::before {
  border-color: var(--green);
}

.tl-item.out::before {
  border-color: var(--c-primary-l);
}

.tl-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.tl-t {
  font-size: 13.5px;
  font-weight: 600;
}

.tl-d {
  font-size: 11.5px;
  color: var(--t3);
  margin-top: 1px;
}

.tl-amt {
  font-size: 14px;
  font-weight: 700;
}

.tl-amt.plus {
  color: var(--green);
}

.tl-amt.minus {
  color: var(--c-primary-d);
}

/* ==========================================================================
   5. 数据看板
   ========================================================================== */
.dash-2col {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 14px;
}

.bars {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  height: 168px;
  padding: 8px 4px 0;
}

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

.bar {
  width: 100%;
  max-width: 42px;
  border-radius: 9px 9px 5px 5px;
  background: linear-gradient(180deg, #ffb877, var(--c-primary-l));
  transition: height .5s var(--ease);
  position: relative;
  min-height: 6px;
}

.bar.now {
  background: linear-gradient(180deg, var(--c-primary-l), var(--c-primary));
  box-shadow: 0 3px 10px rgba(245, 115, 31, .28);
}

.bar-x {
  font-size: 11px;
  color: var(--t3);
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}

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

.rank-no {
  width: 22px;
  height: 22px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  font-size: 11.5px;
  font-weight: 700;
  background: #f6f1ea;
  color: var(--t2);
  flex: none;
}

.rank-no.n1 {
  background: linear-gradient(150deg, #ffb877, var(--c-primary));
  color: #fff;
}

.rank-no.n2 {
  background: #ffd9b8;
  color: #b8620e;
}

.rank-no.n3 {
  background: #ffe8d4;
  color: #b8620e;
}

.rank-name {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.progress {
  height: 6px;
  border-radius: 99px;
  background: #f4ece3;
  overflow: hidden;
}

.progress i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--c-primary-l), var(--c-primary));
}

/* 支付方式占比 */
.pay-list {
  display: flex;
  flex-direction: column;
  gap: 13px;
  margin-top: 4px;
}

.pay-item .pl-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 6px;
}

.pay-item .pl-top b {
  font-weight: 600;
}

/* 甜甜圈图 */
.donut-wrap {
  display: flex;
  align-items: center;
  gap: 20px;
}

.donut {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  flex: none;
  position: relative;
  background: conic-gradient(var(--c-primary) 0 46%, #ffb877 46% 72%, #ffd9b8 72% 89%, #e9e1d8 89% 100%);
}

.donut::after {
  content: "";
  position: absolute;
  inset: 30px;
  border-radius: 50%;
  background: #fff;
  z-index: 1;
}

.donut-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 3;
  text-align: center;
  line-height: 1.15;
}

.donut-center .v {
  font-size: 17px;
  font-weight: 800;
  letter-spacing: -.3px;
}

.donut-center .k {
  font-size: 10px;
  color: var(--t3);
  margin-top: 1px;
}

.legend {
  display: flex;
  flex-direction: column;
  gap: 9px;
  flex: 1;
}

.legend-row {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
}

.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  flex: none;
}

.legend-row .lname {
  flex: 1;
  color: var(--t2);
}

.legend-row .lval {
  font-weight: 700;
}

/* ==========================================================================
   6. 商品管理
   ========================================================================== */
.goods-table-thumb {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 21px;
  flex: none;
}

.cell-goods {
  display: flex;
  align-items: center;
  gap: 11px;
}

.cell-goods .cn {
  font-weight: 600;
  font-size: 13.5px;
}

.cell-goods .cs {
  font-size: 11.5px;
  color: var(--t3);
}

.switch {
  width: 44px;
  height: 25px;
  border-radius: 99px;
  background: #e6dcd1;
  position: relative;
  transition: background .22s var(--ease);
  flex: none;
}

.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 19px;
  height: 19px;
  border-radius: 99px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .16);
  transition: transform .22s var(--ease);
}

.switch.on {
  background: linear-gradient(150deg, var(--c-primary-l), var(--c-primary));
}

.switch.on::after {
  transform: translateX(19px);
}

/* ==========================================================================
   7. 弹窗
   ========================================================================== */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(60, 42, 28, .4);
  backdrop-filter: blur(3px);
  z-index: 200;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .22s;
}

.modal-mask.show {
  opacity: 1;
  pointer-events: auto;
}

.modal {
  width: 480px;
  max-width: 92vw;
  max-height: 88vh;
  background: #fff;
  border-radius: var(--r-xl);
  box-shadow: var(--sh-lg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: scale(.94) translateY(10px);
  transition: transform .28s var(--ease);
}

.modal.show {
  transform: none;
}

.modal.wide {
  width: 760px;
}

.modal-head {
  padding: 18px 22px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.modal-head h3 {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.modal-head .sub {
  font-size: 12px;
  color: var(--t3);
  margin-top: 2px;
}

.modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2px 22px 18px;
}

.modal-foot {
  padding: 14px 22px 18px;
  display: flex;
  gap: 10px;
}

.modal-foot .btn {
  flex: 1;
}

.x-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--t3);
  background: #f7f2ec;
  flex: none;
  transition: all .16s;
}

.x-btn:hover {
  background: #efe7dd;
  color: var(--t1);
}

.x-btn svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
}

/* 表单 */
.form-row {
  margin-bottom: 14px;
}

.form-row label {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--t2);
  margin-bottom: 7px;
}

.form-row .field {
  height: 46px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* 支付方式选择 */
.pay-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.pay-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  border: 1.5px solid var(--line-2);
  background: #fff;
  transition: all .18s var(--ease);
  text-align: left;
  min-width: 0;
}

.pay-opt>div:last-child {
  flex: 1;
  min-width: 0;
}

.pay-opt .pi {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 19px;
  flex: none;
}

.pay-opt .pn {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-opt .pd {
  font-size: 11px;
  color: var(--t3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pay-opt.active {
  border-color: var(--c-primary);
  background: var(--c-primary-50);
  box-shadow: 0 0 0 3px var(--c-primary-50);
}

/* 顶部金额横条 */
.amount-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 20px;
  border-radius: var(--r-lg);
  background: linear-gradient(120deg, #fff6ee, #ffe9d8);
  border: 1px solid var(--c-primary-100);
}

.ab-lbl {
  font-size: 12px;
  color: var(--t2);
}

.ab-val {
  font-size: 34px;
  font-weight: 800;
  color: var(--c-primary-d);
  letter-spacing: -1.2px;
  line-height: 1.15;
}

.ab-val i {
  font-style: normal;
  font-size: 19px;
  margin-right: 2px;
}

.ab-side {
  text-align: right;
  font-size: 12.5px;
  color: var(--t2);
  line-height: 1.75;
  flex: none;
}

.ab-side b {
  font-weight: 700;
  color: var(--t1);
}

.ab-disc {
  color: var(--red);
}

.ab-disc b {
  color: var(--red);
}

/* 金额大输入 */
.amount-box {
  text-align: center;
  padding: 6px 0 14px;
}

.amount-box .lbl {
  font-size: 12.5px;
  color: var(--t3);
}

.amount-box .val {
  font-size: 42px;
  font-weight: 800;
  color: var(--c-primary-d);
  letter-spacing: -1.5px;
  line-height: 1.15;
}

.amount-box .val i {
  font-style: normal;
  font-size: 22px;
  margin-right: 2px;
}

.quick-cash {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}

.quick-cash button {
  height: 42px;
  border-radius: var(--r-sm);
  background: #f8f2eb;
  font-size: 14px;
  font-weight: 600;
  color: var(--t2);
  transition: all .16s;
}

.quick-cash button:active {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
}

.quick-cash button.active {
  background: linear-gradient(160deg, var(--c-primary-l), var(--c-primary));
  color: #fff;
  box-shadow: var(--sh-primary);
  font-weight: 700;
}

.change-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 11px 15px;
  border-radius: var(--r-md);
  background: var(--green-bg);
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}

/* 数字键盘 */
.keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.keypad button {
  height: 46px;
  border-radius: var(--r-md);
  background: #f8f2eb;
  font-size: 18px;
  font-weight: 600;
  transition: all .14s;
}

.keypad button:active {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
  transform: scale(.96);
}

/* Toast */
.toast {
  position: fixed;
  left: 50%;
  bottom: 46px;
  transform: translate(-50%, 20px);
  background: rgba(51, 40, 31, .93);
  color: #fff;
  padding: 11px 22px;
  border-radius: var(--r-full);
  font-size: 13.5px;
  font-weight: 600;
  z-index: 400;
  opacity: 0;
  pointer-events: none;
  transition: all .28s var(--ease);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* 空态 */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 54px 0;
  color: var(--t3);
}

.empty .ico {
  font-size: 44px;
  opacity: .5;
}

.empty p {
  margin: 0;
  font-size: 13px;
}

/* 布局辅助 */
.row-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.mb-14 {
  margin-bottom: 14px;
}

.mb-12 {
  margin-bottom: 12px;
}

.mt-14 {
  margin-top: 14px;
}

.gap-10 {
  display: flex;
  gap: 10px;
  align-items: center;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.scroll-y {
  overflow-y: auto;
  min-height: 0;
}

/* 小屏（<1100px）兜底：购物车变窄 */
@media (max-width: 1180px) {
  :root {
    --cart-w: 318px;
    --sidebar-w: 80px;
  }

  .goods-grid {
    grid-template-columns: repeat(auto-fill, minmax(126px, 1fr));
  }

  .stat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .dash-2col {
    grid-template-columns: 1fr;
  }
}

/* 窄屏（小平板 / 竖屏 / iPad 竖横）：购物车改成底部抽屉，让商品区占满宽度 */
@media (max-width: 1100px) {
  :root {
    --sidebar-w: 72px;
  }

  .pos-wrap {
    flex-direction: column;
    gap: 10px;
  }

  .pos-left {
    flex: 1;
    min-height: 0;
  }

  .cart {
    width: 100%;
    flex: 0 0 auto;
    max-height: 44vh;
    border-radius: var(--r-xl);
    box-shadow: 0 -6px 20px rgba(60, 40, 20, .10);
  }

  .goods-grid {
    grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  }
}

.fade-up {
  animation: fadeUp .34s var(--ease) both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
}

.stagger>* {
  animation: fadeUp .34s var(--ease) both;
}

.stagger>*:nth-child(1) {
  animation-delay: .02s;
}

.stagger>*:nth-child(2) {
  animation-delay: .05s;
}

.stagger>*:nth-child(3) {
  animation-delay: .08s;
}

.stagger>*:nth-child(4) {
  animation-delay: .11s;
}

.stagger>*:nth-child(5) {
  animation-delay: .14s;
}

.stagger>*:nth-child(6) {
  animation-delay: .17s;
}

.stagger>*:nth-child(7) {
  animation-delay: .2s;
}

.stagger>*:nth-child(8) {
  animation-delay: .23s;
}

/* ==========================================================================
   8. 登录页
   ========================================================================== */
.login-screen {
  position: fixed;
  inset: 0;
  z-index: 500;
  background: var(--bg);
  opacity: 1;
  visibility: visible;
  transition: opacity .4s var(--ease), visibility .4s;
}

.login-screen.hide {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.lgn-wrap {
  display: flex;
  height: 100%;
  width: 100%;
}

/* —— 左侧品牌区 —— */
.lgn-brand {
  width: 42%;
  flex: none;
  position: relative;
  overflow: hidden;
  padding: 46px 48px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background: linear-gradient(155deg, #ffb066, var(--c-primary) 52%, #d3560a);
}

.lgn-brand-deco {
  position: absolute;
  border-radius: 50%;
}

.lgn-brand-deco.d1 {
  width: 340px;
  height: 340px;
  right: -120px;
  top: -100px;
  background: rgba(255, 255, 255, .11);
}

.lgn-brand-deco.d2 {
  width: 230px;
  height: 230px;
  left: -90px;
  bottom: -80px;
  background: rgba(255, 255, 255, .08);
}

.lgn-brand-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.lgn-logo {
  width: 62px;
  height: 62px;
  border-radius: 20px;
  background: rgba(255, 255, 255, .2);
  display: grid;
  place-items: center;
  font-size: 32px;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .25);
}

.lgn-brand-name {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: .5px;
}

.lgn-brand-sub {
  font-size: 12.5px;
  opacity: .88;
  margin-top: 3px;
  letter-spacing: 1.2px;
}

.lgn-brand-mid {
  position: relative;
  z-index: 1;
}

.lgn-slogan {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.22;
  letter-spacing: -1.2px;
  text-shadow: 0 2px 12px rgba(150, 70, 10, .18);
}

.lgn-feats {
  margin-top: 30px;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.lgn-feat {
  display: flex;
  align-items: center;
  gap: 11px;
  font-size: 14px;
  font-weight: 500;
}

.lgn-feat i {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  color: #fff;
  flex: none;
  filter: drop-shadow(0 1px 3px rgba(140, 60, 0, .32));
}

.lgn-feat i svg {
  width: 19px;
  height: 19px;
  stroke-width: 2.4;
}

.lgn-brand-foot {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  opacity: .8;
}

/* —— 右侧表单区 —— */
.lgn-main {
  flex: 1;
  min-width: 0;
  display: grid;
  place-items: center;
  padding: 26px 40px;
  background: linear-gradient(170deg, #fffdfb, #fdf4ea);
  overflow-y: auto;
}

.lgn-card {
  width: 100%;
  max-width: 430px;
}

.lgn-head h2 {
  margin: 0;
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -.5px;
}

.lgn-head p {
  margin: 7px 0 0;
  font-size: 13px;
  color: var(--t2);
}

.lgn-tabs {
  display: flex;
  gap: 5px;
  padding: 5px;
  margin: 18px 0 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--sh-xs);
}

.lgn-tabs button {
  flex: 1;
  height: 42px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  color: var(--t2);
  transition: all .18s var(--ease);
}

.lgn-tabs button.active {
  background: linear-gradient(160deg, var(--c-primary-l), var(--c-primary));
  color: #fff;
  box-shadow: var(--sh-primary);
}

.field-lg {
  height: 54px;
  font-size: 15px;
  padding: 0 16px;
  border-radius: var(--r-md);
}

.lgn-prefix {
  font-size: 14px;
  font-weight: 600;
  color: var(--t2);
  padding-right: 10px;
  border-right: 1px solid var(--line-2);
  margin-right: 4px;
}

.code-btn {
  height: 38px;
  padding: 0 14px;
  border-radius: var(--r-sm);
  background: var(--c-primary-50);
  color: var(--c-primary-d);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex: none;
  transition: background .16s;
}

.code-btn:active {
  background: var(--c-primary-100);
}

.code-btn[disabled] {
  opacity: .55;
  pointer-events: none;
}

.lgn-submit {
  width: 100%;
  height: 54px;
  font-size: 16px;
  border-radius: var(--r-md);
  margin-top: 4px;
}

.lgn-err {
  margin: -4px 0 12px;
  font-size: 12.5px;
  color: var(--red);
  font-weight: 600;
}

.lgn-hint {
  display: flex;
  gap: 9px;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: var(--r-md);
  background: var(--c-primary-50);
  border: 1px dashed var(--c-primary-200);
  font-size: 12px;
  line-height: 1.8;
  color: #9c5410;
}

.lgn-hint b {
  color: #7d3f06;
}

.lgn-hint code {
  background: #fff;
  padding: 1px 6px;
  border-radius: 5px;
  font-weight: 700;
  color: var(--c-primary-d);
  font-size: 11.5px;
}

.lgn-switch {
  text-align: center;
  margin-top: 16px;
  font-size: 13px;
  color: var(--t3);
}

.lgn-switch a {
  color: var(--c-primary-d);
  font-weight: 600;
  cursor: pointer;
}

/* —— 店员选择 —— */
.lgn-staff {
  display: flex;
  gap: 10px;
}

.lgn-staff-card {
  flex: 1;
  min-width: 0;
  padding: 14px 6px;
  border-radius: var(--r-lg);
  border: 1.5px solid var(--line-2);
  background: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  transition: all .18s var(--ease);
}

.lgn-staff-card:active {
  transform: scale(.97);
}

.lgn-staff-card.active {
  border-color: var(--c-primary);
  background: var(--c-primary-50);
  box-shadow: 0 0 0 3px var(--c-primary-50);
}

.lgn-staff-name {
  font-size: 14px;
  font-weight: 700;
}

.lgn-staff-role {
  font-size: 11px;
  color: var(--t3);
}

.lgn-form .keypad {
  gap: 7px;
}

.lgn-form .keypad button {
  height: 44px;
  font-size: 17px;
}

.lgn-pin {
  display: flex;
  gap: 18px;
  justify-content: center;
  padding: 4px 0 0;
}

.lgn-pin i {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #f1e7db;
  border: 1px solid var(--line-2);
  transition: all .2s var(--ease);
}

.lgn-pin i.on {
  background: var(--c-primary);
  border-color: var(--c-primary);
  transform: scale(1.12);
  box-shadow: 0 0 0 4px var(--c-primary-50);
}

/* —— 顶栏身份切换 —— */
.top-user {
  cursor: pointer;
  transition: box-shadow .18s, border-color .18s;
}

.top-user:hover {
  border-color: var(--c-primary-200);
  box-shadow: var(--sh-sm);
}

.role-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 5px;
  margin-left: 5px;
  vertical-align: 1px;
}

.role-owner {
  background: var(--c-primary-50);
  color: var(--c-primary-d);
}

.role-staff {
  background: var(--blue-bg);
  color: var(--blue);
}

@media (max-width: 1000px) {
  .lgn-brand {
    display: none;
  }
}
