/* ========== 大屏触控优化 - 基础重置 ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

body {
  /* Android 7.x WebView：优先系统黑体与 Roboto，再回退至 PingFang/雅黑 */
  font-family:
    Roboto,
    "Noto Sans SC",
    "Noto Sans CJK SC",
    "Droid Sans Fallback",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  background: var(--kiosk-page-bg);
  color: #333;
  display: flex;
  flex-direction: column;
  font-size: 18px; /* 基础字体放大 */
  -webkit-font-smoothing: antialiased;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

/* 寄存柜操作屏 — 间距 / 圆角 / 阴影 / 动效 / 字色（保持既有配色） */
:root {
  /* 间距 — 8px 网格 */
  --space-1: 8px;
  --space-2: 12px;
  --space-3: 16px;
  --space-4: 20px;
  --space-5: 24px;
  --space-6: 28px;
  --space-7: 32px;
  --space-8: 40px;

  /* 圆角层级 */
  --kiosk-radius-sm: 14px;
  --kiosk-radius-md: 18px;
  --kiosk-radius-lg: 22px;
  --radius-qrcode-card: 24px;
  --radius-modal-outer: 24px;
  --radius-btn-dialog: var(--kiosk-radius-sm);

  /* 整页主背景（与 body 一致，供 price-card 等同色块使用） */
  --kiosk-page-bg: linear-gradient(
    165deg,
    #fffbeb 0%,
    #fef3c7 38%,
    #fde68a 72%,
    #fcd34d 100%
  );

  /* 阴影 */
  --shadow-header: 0 4px 28px rgba(251, 191, 36, 0.14);
  --shadow-footer: 0 -6px 28px rgba(251, 191, 36, 0.12);
  --kiosk-card-bg: linear-gradient(
    168deg,
    rgba(255, 255, 255, 0.94) 0%,
    rgba(255, 255, 255, 0.78) 100%
  );
  --kiosk-card-border: 1px solid rgba(251, 191, 36, 0.32);
  --kiosk-card-shadow:
    0 10px 36px rgba(180, 83, 9, 0.08), 0 2px 12px rgba(251, 191, 36, 0.14);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.18);
  --shadow-modal-strong: 0 28px 72px rgba(0, 0, 0, 0.22);
  --shadow-panel: 0 4px 16px rgba(120, 53, 15, 0.08);
  --shadow-btn-amber: 0 6px 20px rgba(245, 158, 11, 0.38);
  --shadow-btn-amber-hover: 0 8px 24px rgba(245, 158, 11, 0.42);
  --shadow-btn-blue: 0 6px 20px rgba(59, 130, 246, 0.38);
  --shadow-btn-blue-hover: 0 8px 24px rgba(59, 130, 246, 0.42);
  --shadow-btn-orange: 0 6px 20px rgba(249, 115, 22, 0.38);
  --shadow-btn-orange-hover: 0 8px 24px rgba(249, 115, 22, 0.42);

  /* 奶油底上的次要字（对比度优于 #78716c / #a8a29e） */
  --text-muted: #5c5348;
  --text-subtle: #6d655f;

  /* 动效 — 触控反馈 */
  --ease-out: cubic-bezier(0.33, 1, 0.68, 1);
  --ease-press: cubic-bezier(0.2, 0, 0, 1);
  --duration-fast: 150ms;
  --duration-base: 180ms;
  --duration-slow: 200ms;

  /* 按钮层级：主屏 CTA > 弹窗内（统一弹窗内高度） */
  --btn-height-hero: 72px;
  --btn-height-dialog: 60px;
  --btn-font-dialog: 20px;
}

/* 线型图标笔画略统一（只作用于带 stroke 的图形，二维码纯 fill 不受影响） */
.header svg [stroke],
.main svg [stroke],
.modal-overlay svg [stroke] {
  stroke-width: 1.75;
}

/* ========== 顶部 90px ========== */
.header {
  height: 90px;
  min-height: 90px;
  position: relative;
  background: linear-gradient(
    180deg,
    rgba(255, 251, 235, 0.98) 0%,
    rgba(254, 243, 199, 0.96) 100%
  );
  flex-shrink: 0;
  border-bottom: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow-header);
}

.store-name {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 26px;
  font-weight: bold;
  font-weight: 700;
  color: #92400e;
  letter-spacing: 1px;
}

.current-time {
  position: absolute;
  left: calc(60% + 120px);
  top: 50%;
  transform: translateY(-50%);
  font-size: 32px;
  font-weight: bold;
  font-weight: 700;
  color: #92400e;
  font-variant-numeric: tabular-nums;
}

.network-signal {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-right {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
}

.header-right .network-signal {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  color: var(--text-muted);
  font-weight: 500;
}

.signal-icon {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 28px;
  margin-right: 15px;
}

.signal-bar {
  width: 8px;
  border-radius: 3px;
  transition:
    opacity var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out);
  opacity: 0.3;
  background: #d1d5db;
}

.signal-bar:nth-child(1) {
  height: 8px;
}
.signal-bar:nth-child(2) {
  height: 15px;
}
.signal-bar:nth-child(3) {
  height: 21px;
}
.signal-bar:nth-child(4) {
  height: 28px;
}

.signal-bar.active {
  opacity: 1;
  background: linear-gradient(180deg, #4ade80 0%, #22c55e 100%);
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
}

/* 格子管理按钮 - 正中间 */
.header-grid-btn {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  height: 60px;
  padding: 0 26px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: var(--kiosk-radius-md);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  box-shadow:
    0 6px 22px rgba(59, 130, 246, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  transition:
    transform var(--duration-fast) var(--ease-press),
    background var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
}

.header-grid-btn:active {
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.grid-btn.header-grid-btn:hover {
  transform: translate(-50%, -50%);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.header-grid-btn svg {
  width: 28px;
  height: 28px;
}

/* ========== 中间主体 - 自适应高度 ========== */
.main {
  flex: 1;
  display: flex;
  padding: var(--space-2) var(--space-3);
  overflow: hidden;
}

/* flex gap 在 Chrome 84 以下无效，用相邻兄弟外边距兼容 Android 7 WebView */
.main > * + * {
  margin-left: var(--space-3);
}

/* 左侧二维码区域（大屏触控：占列宽、二维码随视口放大） */
.qrcode-section {
  width: 42%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 6px 0 2px;
}

.qrcode-wrap {
  flex: 0 1 auto;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 80%;
  max-width: 100%;
  min-height: 80%;
  /* 旧 WebView 无 clamp：固定值 + calc(vmin) 近似流体（不依赖 min/max/clamp） */
  padding: 16px;
  padding: calc(14px + 0.45vmin) calc(14px + 0.45vmin);
  background: linear-gradient(145deg, #f59e0b 0%, #ea580c 52%, #d97706 100%);
  border-radius: var(--radius-qrcode-card);
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 44px rgba(217, 119, 6, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
  font-family:
    Roboto,
    "Noto Sans SC",
    "Noto Sans CJK SC",
    "Droid Sans Fallback",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "PingFang SC",
    "Hiragino Sans GB",
    "Microsoft YaHei",
    sans-serif;
}

.qrcode-wrap > * + * {
  margin-top: 14px;
}

.qrcode-title {
  margin-bottom: 15px;
  align-self: stretch;
  text-align: center;
  font-size: 26px;
  font-size: calc(22px + 0.45vmin);
  color: #fff;
  font-weight: bold;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1.25;
  text-shadow: 0 2px 4px rgba(120, 53, 15, 0.28);
}

/* 正方形区域：padding-bottom 技巧兼容无 aspect-ratio / min() 的旧 WebView */
.qrcode-placeholder {
  position: relative;
  width: 100%;
  max-width: 360px;
  height: 0;
  padding-bottom: 100%;
  /* margin: 0 auto; */
  overflow: hidden;
  background: #fff;
  border-radius: var(--kiosk-radius-md);
  flex-shrink: 0;
  box-shadow:
    inset 0 2px 8px rgba(0, 0, 0, 0.04),
    0 6px 20px rgba(0, 0, 0, 0.1);
}

.qrcode-placeholder svg,
.qrcode-placeholder img {
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  margin: auto;
  width: 88%;
  height: 88%;
  max-width: 88%;
  max-height: 88%;
  object-fit: contain;
  display: block;
}

.qrcode-tip {
  margin: 0;
  align-self: stretch;
  text-align: center;
  font-size: 18px;
  font-size: calc(16px + 0.28vmin);
  color: rgba(255, 255, 255, 0.96);
  font-weight: bold;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-shadow: 0 1px 3px rgba(120, 53, 15, 0.22);
}

.customer-phone {
  margin-top: 10px;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.8);
  font-weight: 500;
}

.customer-phone a {
  color: #f59e0b;
  text-decoration: none;
}

/* ========== 右侧信息区域 ========== */
.info-section {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.info-section > * + * {
  margin-top: var(--space-3);
}

/* 收费明细 */
.price-card {
  border-radius: var(--kiosk-radius-md);
  padding: var(--space-3) var(--space-4);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex-shrink: 0;
  margin-bottom: 12px;
  margin-bottom: calc(8px + 0.55vmin);
}

/* --- 3 行（公共场所：小/中/大柜）--- */
body.page-rows--3 .info-section .price-card {
  justify-content: flex-start;
  margin-bottom: 10px;
  margin-bottom: calc(6px + 0.4vmin);
}

body.page-rows--3 .info-section .flow-card.flow-card--guide {
  margin-top: calc(var(--space-3) + 10px);
  margin-top: calc(var(--space-3) + 0.85vmin);
}

/* --- 2 行（商务/酒吧）：收费行居中，多余空间给存取包指南图 --- */
body.page-rows--2 .info-section .price-card {
  margin-bottom: 10px;
  margin-bottom: calc(8px + 0.6vmin);
}

body.page-rows--2 .info-section .flow-card.flow-card--guide {
  flex: 1;
  min-height: 0;
}

/* --- 1 行（水上乐园/SPA）：同理，指南图吃掉空间；单行字号加大突出 --- */
body.page-rows--1 .info-section .price-card {
  margin-bottom: 12px;
  margin-bottom: calc(10px + 0.8vmin);
}

body.page-rows--1 .info-section .price-card .price-item .value {
  font-size: 28px;
}

body.page-rows--1 .info-section .flow-card.flow-card--guide {
  flex: 1;
  min-height: 0;
}

.price-card .price-item-group {
  flex: 1;
  overflow-y: auto;
}

.price-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  font-size: 18px;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.18);
  border-radius: var(--kiosk-radius-sm);
  margin-bottom: 6px;
  transition: background var(--duration-fast) var(--ease-out);
}

.price-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

/* 按尺寸区分的左侧彩色条 */
.price-item-small,
.price-item-1 {
  border-left: 4px solid #22c55e;
  background: rgba(34, 197, 94, 0.04);
}
.price-item-medium,
.price-item-2 {
  border-left: 4px solid #3b82f6;
  background: rgba(59, 130, 246, 0.04);
}
.price-item-large,
.price-item-3 {
  border-left: 4px solid #f59e0b;
  background: rgba(245, 158, 11, 0.04);
}

.price-item .label {
  color: var(--text-muted);
  font-weight: 500;
}

.price-item .value {
  font-weight: 700;
  color: #d97706;
  font-size: 24px;
  flex-shrink: 0;
  text-align: right;
}

.price-item-group {
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(251, 191, 36, 0.18);
}

.price-item-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.price-item-overtime {
  padding: 0 14px 8px;
  margin-bottom: 0;
  margin-top: -4px;
  border-left: none;
  background: none;
  border-radius: 0;
  border-bottom: none;
}

.price-item-overtime .label {
  visibility: hidden;
}

.price-item-overtime .value {
  color: #ef4444;
  font-weight: 600;
  font-size: 18px;
}

/* 剩余格子 */
.locker-status-card {
  background: var(--kiosk-card-bg);
  border: var(--kiosk-card-border);
  border-radius: var(--kiosk-radius-md);
  box-shadow: var(--kiosk-card-shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: var(--space-2) var(--space-5);
  flex-shrink: 0;
  margin-bottom: 12px;
}

.locker-status-title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 6px;
  color: #92400e;
  display: flex;
  align-items: center;
  gap: 8px;
}

.locker-status-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  border-radius: 2px;
}

.locker-total-count {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 6px;
  padding: 4px 1px;
}

.locker-total-count span:first-child {
  font-size: 32px;
  font-weight: 800;
  color: #d97706;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.locker-total-count .unit {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-muted);
  margin-left: 10px;
}

.locker-type {
  flex: 1;
  text-align: center;
  padding: 18px 12px;
  background: rgba(255, 255, 255, 0.5);
  border-radius: var(--kiosk-radius-sm);
  transition:
    transform var(--duration-fast) var(--ease-press),
    background var(--duration-base) var(--ease-out);
}

.locker-type:hover {
  transform: translateY(-3px);
  background: rgba(255, 255, 255, 0.7);
}

.locker-type-name {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 600;
}

.locker-type-count {
  font-size: 36px;
  font-weight: 800;
  color: #d97706;
  line-height: 1.2;
}

.locker-type-count .unit {
  font-size: 16px;
  font-weight: 600;
  color: var(--text-subtle);
  margin-left: 4px;
}

/* ========== 使用流程（存/取包 — 字号与价格区同级可读性） ========== */
.flow-card {
  flex: 0 1 auto;
  min-height: 0;
  background: var(--kiosk-card-bg);
  border: var(--kiosk-card-border);
  border-radius: var(--kiosk-radius-md);
  box-shadow: var(--kiosk-card-shadow);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: var(--space-3) var(--space-3);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  overflow: hidden;
}

/* 图示版流程（getAndputin.png），横图随容器宽度缩放 */
.flow-card--guide {
  padding: var(--space-2) var(--space-3);
}

.flow-guide-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  line-height: 0;
  border-radius: var(--kiosk-radius-sm);
  background: rgba(255, 255, 255, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-guide-img {
  display: block;
  width: 100%;
  max-width: 100%;
  max-height: 100%;
  height: auto;
  vertical-align: top;
  object-fit: contain;
}

.flow-compact {
  display: flex;
  flex-direction: column;
  width: 100%;
}

.flow-compact > * + * {
  margin-top: 10px;
}

.flow-compact-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
}

.flow-compact-badge {
  margin-top: 2px;
  padding: 5px 4px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: bold;
  font-weight: 800;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-align: center;
}

.flow-compact-badge--in {
  background: rgba(245, 158, 11, 0.22);
  color: #9a3412;
  border: 1px solid rgba(217, 119, 6, 0.35);
}

.flow-compact-badge--out {
  background: rgba(254, 243, 199, 0.85);
  color: #92400e;
  border: 1px solid rgba(180, 83, 9, 0.28);
}

/* 步骤正文：不小于 14px；flex gap 旧机无效，用子项外边距补偿 */
.flow-compact-track {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  align-content: flex-start;
  min-width: 0;
  margin: -4px -3px;
  font-size: 14px;
  font-size: calc(14px + 0.18vmin);
  line-height: 1.45;
  font-weight: bold;
  font-weight: 600;
  color: var(--text-muted);
}

.flow-compact-track > * {
  margin: 4px 3px;
}

.flow-compact-item {
  display: inline-flex;
  align-items: center;
}

.flow-compact-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  margin-right: 5px;
  padding: 0 5px;
  border-radius: 5px;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  font-weight: 800;
  font-style: normal;
  flex-shrink: 0;
  line-height: 1;
  box-shadow: 0 1px 2px rgba(120, 53, 15, 0.2);
}

.flow-compact-sep {
  color: #d97706;
  opacity: 0.65;
  font-weight: bold;
  font-weight: 700;
  font-size: 14px;
  font-size: calc(13px + 0.15vmin);
  line-height: 1;
  user-select: none;
  flex-shrink: 0;
}

.flow-title {
  font-size: 22px;
  font-weight: 700;
  color: #92400e;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.flow-title::before {
  content: "";
  width: 5px;
  height: 22px;
  background: linear-gradient(180deg, #f59e0b 0%, #d97706 100%);
  border-radius: 3px;
}

.flow-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-3);
  width: 100%;
  min-height: 0;
}

.flow-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.flow-row-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 700;
  color: #b45309;
  flex-shrink: 0;
  letter-spacing: 0.5px;
}

.flow-row-header svg {
  width: 16px;
  height: 16px;
  color: #d97706;
}

.flow-steps {
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.flow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex: 1;
  min-width: 0;
}

.flow-step-icon {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.95) 0%,
    rgba(255, 251, 235, 0.88) 100%
  );
  border: 1px solid rgba(251, 191, 36, 0.35);
  box-shadow: 0 2px 10px rgba(180, 83, 9, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.flow-step-icon svg {
  width: 22px;
  height: 22px;
  color: #d97706;
}

.flow-step-num {
  position: absolute;
  top: -5px;
  right: -5px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.flow-step-text {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 600;
  text-align: center;
  white-space: nowrap;
  line-height: 1.35;
}

.flow-arrow {
  width: 22px;
  height: 22px;
  color: #f59e0b;
  opacity: 0.85;
  flex-shrink: 0;
  margin-top: 12px;
}

.flow-h-divider {
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(245, 158, 11, 0.35) 50%,
    transparent 100%
  );
}

/* 超时规则 */
.overtime-section {
  background: rgba(254, 243, 199, 0.5);
  border-radius: 10px;
  padding: 14px 16px;
  margin-top: 12px;
}

.overtime-title {
  font-size: 16px;
  font-weight: 600;
  color: #92400e;
  margin-bottom: 8px;
  opacity: 0.9;
}

.overtime-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.overtime-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 0;
  font-size: 15px;
}

.overtime-label {
  color: var(--text-muted);
}

.overtime-value {
  font-weight: 600;
  color: #ef4444;
}

/* 取件码取包 */
.pickup-card {
  background: var(--kiosk-card-bg);
  border: var(--kiosk-card-border);
  border-radius: var(--kiosk-radius-md);
  /* box-shadow: var(--kiosk-card-shadow); */
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  height: 10%;
}

.pickup-main-btn {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f59e0b 0%, #ea580c 45%, #d97706 100%);
  border: none;
  border-radius: var(--kiosk-radius-md);
  font-size: 26px;
  font-weight: bold;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--duration-fast) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out);
  box-shadow:
    0 8px 28px rgba(245, 158, 11, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  letter-spacing: 3px;
}

.pickup-main-btn > * + * {
  margin-left: var(--space-3);
}

.pickup-main-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-btn-amber-hover);
}

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

.pickup-main-btn svg {
  width: 30px;
  height: 30px;
}

/* ========== 底部 80px ========== */
.footer {
  height: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  background: linear-gradient(
    0deg,
    rgba(255, 251, 235, 0.98) 0%,
    rgba(254, 243, 199, 0.96) 100%
  );
  flex-shrink: 0;
  border-top: 1px solid rgba(251, 191, 36, 0.28);
  box-shadow: var(--shadow-footer);
}

/* 图标按钮通用样式 - 触摸屏优化 */
.icon-btn {
  width: 72px;
  height: 72px;
  background: transparent;
  border: none;
  border-radius: 50%;
  color: rgba(180, 83, 9, 0.25);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    transform var(--duration-fast) var(--ease-press),
    color var(--duration-fast) var(--ease-out);
}

.icon-btn:active {
  transform: scale(0.88);
  color: rgba(180, 83, 9, 0.6);
}

.icon-btn svg {
  width: 42px;
  height: 42px;
}

.refresh-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 50%;
  color: rgba(146, 64, 14, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.12);
  font-size: 0;
  line-height: 0;
  transition:
    transform var(--duration-fast) var(--ease-press),
    color var(--duration-fast) var(--ease-out);
}

.refresh-btn:active {
  transform: scale(0.88);
  color: rgba(180, 83, 9, 0.6);
}

.refresh-btn svg {
  width: 32px;
  height: 32px;
}

.current-address {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-subtle);
  text-align: center;
  flex: 1;
  padding: 0 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.footer .admin-btn {
  width: 32px;
  height: 32px;
  padding: 0;
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 50%;
  color: rgba(146, 64, 14, 0.45);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 10px rgba(251, 191, 36, 0.12);
  font-size: 0;
  line-height: 0;
  transition:
    transform var(--duration-fast) var(--ease-press),
    color var(--duration-fast) var(--ease-out);
}

.footer .admin-btn:active {
  transform: scale(0.88);
  color: rgba(146, 64, 14, 0.65);
}

.footer .admin-btn svg {
  width: 32px;
  height: 32px;
}

/* 格子管理按钮 */
.grid-btn {
  height: 60px;
  padding: 0 24px;
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  border: none;
  border-radius: var(--kiosk-radius-md);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  box-shadow: var(--shadow-btn-blue);
  transition:
    transform var(--duration-fast) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out);
}

.grid-btn:hover {
  background: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.25) 0%,
    rgba(59, 130, 246, 0.15) 100%
  );
  border-color: rgba(59, 130, 246, 0.5);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.25);
}

.grid-btn:active {
  transform: scale(0.95);
}

.grid-btn svg {
  width: 28px;
  height: 28px;
}

/* ========== 弹窗样式 ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn var(--duration-base) var(--ease-out);
}

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

.modal-overlay.show {
  display: flex;
}

.modal-box {
  background: #fff;
  border-radius: var(--radius-modal-outer);
  padding: var(--space-7) 38px;
  min-width: 340px;
  max-width: 85%;
  text-align: center;
  box-shadow: var(--shadow-modal);
  animation: slideUp var(--duration-base) var(--ease-out);
}

@keyframes slideUp {
  from {
    transform: translateY(16px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.modal-content {
  font-size: 22px;
  color: #374151;
  margin-bottom: var(--space-6);
  line-height: 1.7;
  white-space: pre-line;
}

.modal-btn {
  flex: 1;
  height: var(--btn-height-dialog);
  min-height: var(--btn-height-dialog);
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  border: none;
  border-radius: var(--radius-btn-dialog);
  font-size: var(--btn-font-dialog);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out);
  box-shadow: var(--shadow-btn-amber);
}

.modal-btn:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-btn-amber-hover);
}

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

/* 选择弹窗样式 */
.choice-box {
  background: #fff;
  border-radius: var(--radius-modal-outer);
  padding: var(--space-7) 38px;
  min-width: 400px;
  text-align: center;
  box-shadow: var(--shadow-modal);
}

.choice-title {
  font-size: 22px;
  color: #1f2937;
  font-weight: 700;
  margin-bottom: var(--space-6);
}

.choice-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
}

.choice-btn {
  flex: 1;
  min-width: 150px;
  height: var(--btn-height-dialog);
  min-height: var(--btn-height-dialog);
  border: none;
  border-radius: var(--radius-btn-dialog);
  font-size: var(--btn-font-dialog);
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out);
}

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

.choice-btn-left {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  box-shadow: var(--shadow-btn-blue);
}

.choice-btn-left:hover {
  box-shadow: var(--shadow-btn-blue-hover);
}

.choice-btn-right {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  box-shadow: var(--shadow-btn-orange);
}

.choice-btn-right:hover {
  box-shadow: var(--shadow-btn-orange-hover);
}

/* 确认弹窗按钮 */
.confirm-buttons {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.modal-btn-cancel {
  flex: 1;
  height: var(--btn-height-dialog);
  min-height: var(--btn-height-dialog);
  background: #e5e7eb;
  color: #374151;
  box-shadow: none;
  font-size: var(--btn-font-dialog);
}

.modal-btn-cancel:hover {
  background: #d1d5db;
  box-shadow: none;
}

/* 密码取包弹窗 */
.modal-overlay#pickupOverlay {
  align-items: flex-start;
  padding-top: 12vh;
}

.pickup-dialog {
  background: #fff;
  border-radius: var(--radius-modal-outer);
  padding: 0;
  min-width: 480px;
  max-width: 88%;
  box-shadow: var(--shadow-modal-strong);
  animation: pickupSlideIn var(--duration-slow) var(--ease-out);
  overflow: hidden;
}

@keyframes pickupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-16px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.pickup-dialog-header {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  padding: var(--space-7) 36px var(--space-6);
  text-align: center;
}

.pickup-dialog-icon {
  width: 48px;
  height: 48px;
  color: #fff;
  margin-bottom: 12px;
}

.pickup-dialog-title {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 6px;
}

.pickup-dialog-subtitle {
  font-size: 15px;
  color: rgba(255, 255, 255, 0.8);
}

.pickup-dialog-body {
  padding: var(--space-6) 36px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.pickup-input-group {
  position: relative;
  display: flex;
  align-items: center;
}

.pickup-input-icon {
  position: absolute;
  left: 16px;
  width: 22px;
  height: 22px;
  color: #9ca3af;
  pointer-events: none;
}

.pickup-input {
  width: 100%;
  height: var(--btn-height-dialog);
  min-height: var(--btn-height-dialog);
  background: #f9fafb;
  border: 2px solid #e5e7eb;
  border-radius: var(--radius-btn-dialog);
  padding: 0 var(--space-4) 0 50px;
  font-size: var(--btn-font-dialog);
  color: #1f2937;
  outline: none;
  transition:
    border-color var(--duration-base) var(--ease-out),
    background var(--duration-base) var(--ease-out),
    box-shadow var(--duration-base) var(--ease-out);
  box-sizing: border-box;
}

.pickup-input:focus {
  border-color: #f59e0b;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.1);
}

.pickup-input::placeholder {
  color: #9ca3af;
}

.pickup-dialog-actions {
  padding: 0 36px var(--space-6);
  display: flex;
  gap: var(--space-3);
}

.pickup-btn {
  flex: 1;
  height: var(--btn-height-dialog);
  min-height: var(--btn-height-dialog);
  border: none;
  border-radius: var(--radius-btn-dialog);
  font-size: var(--btn-font-dialog);
  font-weight: 700;
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-press),
    box-shadow var(--duration-base) var(--ease-out);
}

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

.pickup-btn-cancel {
  background: #f3f4f6;
  color: #6b7280;
}

.pickup-btn-confirm {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: #fff;
  box-shadow: var(--shadow-btn-amber);
}

/* ========== 屏幕测试 ========== */
.screen-test {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0, 0, 0, 0.95);
  border-radius: 20px;
  padding: 28px 36px;
  min-width: 340px;
  z-index: 99999;
  display: none;
  color: #fff;
}

.screen-test.show {
  display: block;
  animation: fadeIn var(--duration-slow) var(--ease-out);
}

.screen-test-close {
  position: absolute;
  top: 10px;
  right: 14px;
  font-size: 28px;
  color: #666;
  cursor: pointer;
}

.screen-test-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 18px;
  text-align: center;
  color: #f59e0b;
}

.screen-test-item {
  padding: 10px 0;
  font-size: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

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

.screen-test-item span {
  font-weight: 700;
  color: #4ade80;
}

/* ========== 公共场所场景 ========== */
.place-container {
  display: none;
  width: 100%;
  height: 100%;
  flex-direction: column;
  padding: 28px;
}
.place-container.show {
  display: flex;
}

.cabinet-full-tip {
  display: none;
  justify-content: center;
  align-items: center;
  height: 72px;
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  border-radius: 14px;
  margin-bottom: 18px;
  box-shadow: 0 6px 24px rgba(239, 68, 68, 0.4);
  flex-shrink: 0;
}
.cabinet-full-tip.show {
  display: flex;
}
.cabinet-full-content {
  display: flex;
  align-items: center;
  gap: 14px;
}
.cabinet-full-icon {
  font-size: 36px;
  font-weight: bold;
  color: #fff;
}
.cabinet-full-text {
  font-size: 22px;
  font-weight: 700;
  color: #fff;
}

.free-count-section {
  text-align: center;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.free-count-number {
  font-size: 72px;
  font-weight: 800;
  color: #d97706;
  line-height: 1.2;
}
.free-count-label {
  font-size: 20px;
  color: var(--text-muted);
  font-weight: 600;
}

.locker-preview {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
  flex-shrink: 0;
}
.locker-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}
.locker-cell {
  width: 50px;
  height: 50px;
  border-radius: var(--space-1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  cursor: pointer;
  transition: transform var(--duration-fast) var(--ease-press);
}
.locker-cell:active {
  transform: scale(0.92);
}
.locker-cell.small {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}
.locker-cell.medium {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}
.locker-cell.large {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}
.locker-cell.empty {
  background: #d1d5db;
}
.locker-cell.occupied {
  background: linear-gradient(135deg, #fb923c 0%, #ea580c 100%);
}

.fee-rules {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #fff;
  border-radius: var(--kiosk-radius-md);
  box-shadow: var(--shadow-panel);
  flex-shrink: 0;
}
.fee-rule {
  display: flex;
  align-items: center;
  padding: 10px 18px;
  border-radius: 10px;
  gap: 10px;
}
.fee-rule[data-type="small"] {
  background: linear-gradient(135deg, #4ade80 0%, #22c55e 100%);
}
.fee-rule[data-type="medium"] {
  background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
}
.fee-rule[data-type="large"] {
  background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
}
.fee-label {
  color: #fff;
  font-size: 17px;
  font-weight: 700;
}
.fee-price {
  color: rgba(255, 255, 255, 0.9);
  font-size: 15px;
}

/* ========== admin.html 样式 ========== */
.admin-container {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.admin-header {
  height: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: linear-gradient(
    180deg,
    rgba(30, 41, 59, 0.95) 0%,
    rgba(30, 41, 59, 0.98) 100%
  );
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.back-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.admin-title {
  flex: 1;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  margin-right: 50px;
}

.admin-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.admin-tab {
  flex: 1;
  padding: 20px;
  text-align: center;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.65);
  cursor: pointer;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
}

.admin-tab.active {
  color: #fff;
  border-bottom-color: #3b82f6;
}

.admin-content {
  flex: 1;
  padding: 22px;
  overflow-y: auto;
  background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

.tab-panel {
  display: none;
}

.tab-panel.active {
  display: block;
}

.info-card {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  padding: 22px;
  margin-bottom: 18px;
}

.info-card-title {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  color: #e2e8f0;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

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

.info-label {
  color: rgba(255, 255, 255, 0.65);
  font-size: 17px;
}

.info-value {
  font-size: 17px;
  color: #fff;
  font-weight: 500;
}

.btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 16px;
}

.admin-btn {
  padding: 14px 24px;
  border: none;
  border-radius: 10px;
  font-size: 17px;
  cursor: pointer;
  transition: all 0.15s ease;
  font-weight: 600;
}

.admin-btn:active {
  transform: scale(0.96);
}

.admin-btn.primary {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.admin-btn.danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}

.admin-btn.warning {
  background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(249, 115, 22, 0.35);
}

.admin-btn.secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.18);
}

.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.75);
}

.form-input,
.form-select {
  width: 100%;
  height: 52px;
  background: rgba(0, 0, 0, 0.35);
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 10px;
  padding: 0 16px;
  font-size: 17px;
  color: #fff;
  outline: none;
}

.form-input:focus,
.form-select:focus {
  border-color: #3b82f6;
}

.form-select option {
  background: #1e293b;
}

/* 格子管理网格 */
.locker-grid-admin {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  padding: 14px;
}

.locker-cell-admin {
  width: 90px;
  height: 90px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 14px;
  border: 4px solid #4caf50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}

.locker-cell-admin:active {
  transform: scale(0.95);
}

.locker-cell-admin.empty {
  border-color: #4caf50;
}
.locker-cell-admin.occupied {
  border-color: #ffa000;
}
.locker-cell-admin.disabled {
  border-color: #9e9e9e;
}
.locker-cell-admin.fault {
  border-color: #f44336;
}

.locker-cell-admin .box-no {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

.locker-cell-admin .status {
  font-size: 14px;
  font-weight: 600;
  margin-top: 4px;
}

.locker-cell-admin.empty .status {
  color: #4caf50;
}
.locker-cell-admin.occupied .status {
  color: #ffa000;
}
.locker-cell-admin.disabled .status {
  color: #9e9e9e;
}
.locker-cell-admin.fault .status {
  color: #f44336;
}

/* 图例 */
.legend {
  display: flex;
  gap: 22px;
  padding: 14px 18px;
  background: rgba(0, 0, 0, 0.25);
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 18px;
  border-radius: 12px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  color: rgba(255, 255, 255, 0.85);
}

.legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.legend-dot.empty {
  background: #4caf50;
}
.legend-dot.occupied {
  background: #ffa000;
}
.legend-dot.disabled {
  background: #9e9e9e;
}
.legend-dot.fault {
  background: #f44336;
}

/* 串口测试样式 */
.form-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.form-row .form-group {
  margin-bottom: 0;
}

.serial-log {
  background: rgba(0, 0, 0, 0.4);
  border-radius: 8px;
  padding: 14px;
  max-height: 260px;
  overflow-y: auto;
  font-family: "Consolas", "Monaco", monospace;
  font-size: 16px;
}

.log-item {
  padding: 8px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: rgba(255, 255, 255, 0.85);
}

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

.log-item.success {
  color: #4ade80;
}
.log-item.error {
  color: #f87171;
}
.log-item.info {
  color: #60a5fa;
}

.log-time {
  color: rgba(255, 255, 255, 0.45);
  margin-right: 8px;
  font-size: 14px;
}

/* ========== box-manage.html 样式 ========== */
.box-container {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: linear-gradient(135deg, #1a2a3a 0%, #0d1520 100%);
}

.box-header {
  height: 80px;
  min-height: 80px;
  display: flex;
  align-items: center;
  padding: 0 28px;
  background: rgba(0, 0, 0, 0.35);
  border-bottom: 2px solid rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

.back-btn {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.back-btn:active {
  background: rgba(255, 255, 255, 0.25);
}

.box-title {
  flex: 1;
  text-align: center;
  font-size: 26px;
  font-weight: 600;
  color: #fff;
  margin-right: 50px;
}

.box-legend {
  display: flex;
  gap: 22px;
  padding: 16px 20px;
  background: rgba(0, 0, 0, 0.25);
  justify-content: center;
  flex-wrap: wrap;
  border-bottom: 2px solid rgba(255, 255, 255, 0.06);
}

.box-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  color: rgba(255, 255, 255, 0.85);
}

.box-legend-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
}

.box-legend-dot.empty {
  background: #4caf50;
}
.box-legend-dot.occupied {
  background: #ffa000;
}
.box-legend-dot.disabled {
  background: #9e9e9e;
}
.box-legend-dot.fault {
  background: #f44336;
}

.box-grid-container {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

.box-grid-title {
  font-size: 18px;
  margin-bottom: 16px;
  color: rgba(255, 255, 255, 0.65);
  text-align: center;
}

.box-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.box-cell {
  width: 100px;
  height: 100px;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  border: 4px solid #4caf50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.1s;
  position: relative;
}

.box-cell:active {
  transform: scale(0.95);
}

.box-cell.empty {
  border-color: #4caf50;
}
.box-cell.occupied {
  border-color: #ffa000;
}
.box-cell.disabled {
  border-color: #9e9e9e;
}
.box-cell.fault {
  border-color: #f44336;
}

.box-cell .box-no {
  font-size: 28px;
  font-weight: bold;
  color: #333;
}

.box-cell .box-status {
  font-size: 15px;
  font-weight: 600;
  margin-top: 5px;
}

.box-cell.empty .box-status {
  color: #4caf50;
}
.box-cell.occupied .box-status {
  color: #ffa000;
}
.box-cell.disabled .box-status {
  color: #9e9e9e;
}
.box-cell.fault .box-status {
  color: #f44336;
}

.box-cell .status-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.box-cell.empty .status-dot {
  background: #4caf50;
}
.box-cell.occupied .status-dot {
  background: #ffa000;
}
.box-cell.disabled .status-dot {
  background: #9e9e9e;
}
.box-cell.fault .status-dot {
  background: #f44336;
}

.box-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 260px;
  color: rgba(255, 255, 255, 0.65);
}

.box-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(255, 255, 255, 0.2);
  border-top-color: #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 操作弹窗 */
.box-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.65);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.box-modal-overlay.show {
  display: flex;
}

.box-modal-box {
  background: #fff;
  border-radius: var(--radius-modal-outer);
  padding: var(--space-6);
  min-width: 360px;
  max-width: 90%;
}

.box-modal-title {
  font-size: 22px;
  font-weight: 600;
  color: #333;
  text-align: center;
  margin-bottom: 22px;
}

.box-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.box-action-btn {
  height: 56px;
  border: none;
  border-radius: 12px;
  font-size: 19px;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.1s;
  font-weight: 600;
}

.box-action-btn:active {
  opacity: 0.85;
}

.box-action-btn.unlock {
  background: #2196f3;
  box-shadow: 0 4px 14px rgba(33, 150, 243, 0.35);
}
.box-action-btn.enable {
  background: #4caf50;
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35);
}
.box-action-btn.disable {
  background: #f44336;
  box-shadow: 0 4px 14px rgba(244, 67, 54, 0.35);
}
.box-action-btn.fault {
  background: #ff9800;
  box-shadow: 0 4px 14px rgba(255, 152, 0, 0.35);
}
.box-action-btn.normal {
  background: #4caf50;
  box-shadow: 0 4px 14px rgba(76, 175, 80, 0.35);
}
.box-action-btn.clear {
  background: #2196f3;
  box-shadow: 0 4px 14px rgba(33, 150, 243, 0.35);
}
.box-action-btn.cancel {
  background: #9e9e9e;
  color: #333;
  box-shadow: 0 4px 14px rgba(158, 158, 158, 0.25);
}

/* ========== 公共组件样式 ========== */

/* 通用加载状态 */
.loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 200px;
  color: #999;
}

.loading-spinner {
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top-color: #f59e0b;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* 通用页面容器 */
.page-container {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

/* 通用页面头部 */
.page-header {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  background: #fff;
  border-bottom: 1px solid #e5e7eb;
}

.page-header .back-btn {
  width: 44px;
  height: 44px;
  background: none;
  border: none;
  font-size: 28px;
  color: #333;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
}

.page-header .back-btn:active {
  background: #f3f4f6;
}

.page-header .page-title {
  flex: 1;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  margin-right: 44px;
  color: #1f2937;
}

/* 通用按钮样式 */
.btn {
  height: 52px;
  border: none;
  border-radius: 10px;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn:active {
  opacity: 0.85;
  transform: scale(0.98);
}

.btn-primary {
  background: #f59e0b;
  color: #fff;
}
.btn-success {
  background: #10b981;
  color: #fff;
}
.btn-danger {
  background: #ef4444;
  color: #fff;
}
.btn-warning {
  background: #f59e0b;
  color: #fff;
}
.btn-info {
  background: #3b82f6;
  color: #fff;
}
.btn-secondary {
  background: #6b7280;
  color: #fff;
}
.btn-cancel {
  background: #e5e7eb;
  color: #374151;
}
