/* ==========================================================================
   Tans网络科技 · iOS 风格极简实用设计系统 (Apple HIG Grouped UI)
   特点：系统磨砂导航、分组白卡、发丝分割线、原生拨杆开关、GPU 合成 60fps 流畅反馈
   ========================================================================== */

:root {
  --ios-bg: #F2F2F7;
  --ios-card: #FFFFFF;
  --ios-elevated: #FFFFFF;
  --ios-fill: rgba(118, 118, 128, 0.12);
  --ios-fill-strong: rgba(118, 118, 128, 0.2);
  --ios-sep: rgba(60, 60, 67, 0.12);
  --ios-sep-soft: rgba(60, 60, 67, 0.08);

  --ios-label: #1C1C1E;
  --ios-secondary: #6C6C70;
  --ios-tertiary: #8E8E93;

  --ios-blue: #007AFF;
  --ios-blue-hover: #0066D6;
  --ios-blue-tint: rgba(0, 122, 255, 0.1);

  --ios-green: #34C759;
  --ios-green-ink: #198737;
  --ios-green-tint: rgba(52, 199, 89, 0.13);

  --ios-orange: #FF9500;
  --ios-orange-ink: #B25E00;
  --ios-orange-tint: rgba(255, 149, 0, 0.14);

  --ios-red: #FF3B30;
  --ios-red-ink: #C92A22;
  --ios-red-tint: rgba(255, 59, 48, 0.12);

  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 18px;
  --r-pill: 999px;

  --ease-ios: cubic-bezier(0.32, 0.72, 0, 1);
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.03), 0 6px 20px rgba(0, 0, 0, 0.028);
  --shadow-seg: 0 1px 3px rgba(0, 0, 0, 0.09), 0 1px 1px rgba(0, 0, 0, 0.04);
  --shadow-sheet: 0 24px 60px rgba(0, 0, 0, 0.18);

  --font-ios: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--ios-bg);
  color: var(--ios-label);
  font-family: var(--font-ios);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.num, .price, .order-no, time {
  font-variant-numeric: tabular-nums;
}

a {
  color: var(--ios-blue);
  text-decoration: none;
}

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

button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--ios-blue);
  outline-offset: 2px;
}

.hidden {
  display: none !important;
}

/* ==================== iOS 磨砂毛玻璃顶栏 ==================== */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(242, 242, 247, 0.78);
  backdrop-filter: saturate(180%) blur(24px);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 0.5px solid var(--ios-sep);
}

.topbar-inner {
  max-width: 1220px;
  margin: 0 auto;
  padding: 0 22px;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

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

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: linear-gradient(180deg, #1A8CFF 0%, #007AFF 100%);
  color: #FFFFFF;
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 122, 255, 0.25);
}

.brand-title {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--ios-label);
  letter-spacing: -0.02em;
}

/* iOS 原生分段控件 (Segmented Control) */
.ios-segment {
  display: inline-flex;
  align-items: center;
  background: var(--ios-fill);
  padding: 3px;
  border-radius: 10px;
  gap: 2px;
}

.ios-segment-btn {
  background: transparent;
  border: none;
  color: var(--ios-secondary);
  padding: 5px 16px;
  border-radius: 7.5px;
  cursor: pointer;
  font-weight: 500;
  font-size: 13.5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background-color 0.2s var(--ease-ios), color 0.2s var(--ease-ios), box-shadow 0.2s var(--ease-ios), transform 0.12s var(--ease-ios);
}

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

.ios-segment-btn.active {
  background: #FFFFFF;
  color: var(--ios-label);
  font-weight: 600;
  box-shadow: var(--shadow-seg);
}

.nav-badge {
  background: var(--ios-blue);
  color: #FFFFFF;
  font-size: 11px;
  font-weight: 700;
  padding: 0 6px;
  min-width: 18px;
  height: 18px;
  border-radius: var(--r-pill);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-badge.orange {
  background: var(--ios-orange);
}

.user-area {
  display: flex;
  align-items: center;
  gap: 8px;
}

.wx-chip {
  background: rgba(255, 255, 255, 0.85);
  border: 0.5px solid var(--ios-sep);
  color: var(--ios-secondary);
  padding: 5px 12px;
  border-radius: var(--r-pill);
  font-size: 12.5px;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.12s var(--ease-ios);
}

.wx-chip:hover {
  background: #FFFFFF;
  color: var(--ios-label);
}

.wx-chip:active {
  transform: scale(0.96);
}

.user-pill {
  font-size: 13px;
  color: var(--ios-label);
  font-weight: 600;
  padding: 4px 8px;
}

/* ==================== 页面主容器 ==================== */
.page-shell {
  max-width: 1220px;
  margin: 0 auto;
  padding: 24px 22px 48px;
}

.hall-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(370px, 0.96fr);
  gap: 22px;
  align-items: start;
}

.workbench-grid {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

/* ==================== iOS 纯白圆角卡片 ==================== */
.ios-card {
  background: var(--ios-card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  padding: 22px 24px;
}

.ios-card.compact {
  padding: 16px;
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.card-title {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--ios-label);
  letter-spacing: -0.02em;
}

.card-caption {
  font-size: 12.5px;
  color: var(--ios-secondary);
}

/* ==================== 分类切换胶囊 ==================== */
.cat-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.cat-pill {
  background: var(--ios-fill);
  border: none;
  color: var(--ios-secondary);
  padding: 6px 13px;
  border-radius: var(--r-pill);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.16s var(--ease-ios), color 0.16s var(--ease-ios), transform 0.12s var(--ease-ios);
}

.cat-pill:hover {
  background: var(--ios-fill-strong);
  color: var(--ios-label);
}

.cat-pill:active {
  transform: scale(0.95);
}

.cat-pill.active {
  background: var(--ios-blue);
  color: #FFFFFF;
  font-weight: 600;
}

/* ==================== iOS 分组菜单列表 (Inset Grouped) ==================== */
.ios-list {
  border-radius: var(--r-md);
  background: var(--ios-bg);
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.menu-row {
  background: #FFFFFF;
  border-radius: 12px;
  padding: 14px 16px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1.5px solid transparent;
  transition: border-color 0.18s var(--ease-ios), background-color 0.18s var(--ease-ios), transform 0.12s var(--ease-ios);
}

.menu-row:hover {
  background: #FAFBFD;
}

.menu-row:active {
  transform: scale(0.985);
}

.menu-row.selected {
  border-color: var(--ios-blue);
  background: #F4F9FF;
}

.menu-title {
  margin: 0;
  font-size: 15px;
  font-weight: 650;
  color: var(--ios-label);
  line-height: 1.35;
}

.menu-sub {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--ios-secondary);
}

.menu-meta {
  display: flex;
  gap: 6px;
  margin-top: 7px;
  flex-wrap: wrap;
}

.meta-chip {
  font-size: 11.5px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--ios-bg);
  color: var(--ios-secondary);
  font-weight: 500;
}

.menu-row.selected .meta-chip {
  background: var(--ios-blue-tint);
  color: var(--ios-blue);
}

.menu-price {
  font-size: 21px;
  font-weight: 700;
  color: var(--ios-label);
  flex-shrink: 0;
  letter-spacing: -0.02em;
}

.menu-price small {
  font-size: 13px;
  font-weight: 600;
  margin-right: 1px;
}

/* ==================== iOS 极简表单输入框 ==================== */
.field-block {
  margin-bottom: 16px;
}

.field-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 600;
  color: var(--ios-secondary);
  margin-bottom: 6px;
}

.ios-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--ios-bg);
  color: var(--ios-label);
  font-size: 14px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.ios-input:focus {
  background: #FFFFFF;
  border-color: var(--ios-blue);
  box-shadow: 0 0 0 3.5px rgba(0, 122, 255, 0.15);
  outline: none;
}

textarea.ios-input {
  resize: vertical;
  min-height: 98px;
  line-height: 1.55;
}

.quick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.quick-tag {
  background: var(--ios-bg);
  border: none;
  color: var(--ios-label);
  font-size: 12px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  cursor: pointer;
  transition: background-color 0.12s ease, color 0.12s ease, transform 0.1s ease;
}

.quick-tag:hover {
  background: var(--ios-blue-tint);
  color: var(--ios-blue);
}

.quick-tag:active {
  transform: scale(0.94);
}

.attach-strip {
  margin-top: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--ios-bg);
  border: 1px dashed rgba(60, 60, 67, 0.22);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.attach-strip:hover, .attach-strip.dragover {
  border-color: var(--ios-blue);
  background: var(--ios-blue-tint);
}

.picked-files {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.picked-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--ios-blue-tint);
  color: var(--ios-blue);
  padding: 4px 10px;
  border-radius: var(--r-pill);
  font-size: 12px;
  font-weight: 500;
}

.picked-chip button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  padding: 0 2px;
  font-size: 15px;
  line-height: 1;
}

.date-quick-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.date-pill {
  background: var(--ios-bg);
  border: 1px solid transparent;
  color: var(--ios-label);
  padding: 7px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  font-weight: 500;
  transition: all 0.14s var(--ease-ios);
}

.date-pill:active {
  transform: scale(0.95);
}

.date-pill.active {
  background: var(--ios-blue-tint);
  border-color: var(--ios-blue);
  color: var(--ios-blue);
  font-weight: 600;
}

/* 结算方式二选一 */
.pay-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.pay-mode-card {
  border: 1.5px solid transparent;
  border-radius: 13px;
  padding: 12px 14px;
  cursor: pointer;
  background: var(--ios-bg);
  transition: all 0.16s var(--ease-ios);
}

.pay-mode-card:active {
  transform: scale(0.98);
}

.pay-mode-card.active {
  border-color: var(--ios-blue);
  background: #F4F9FF;
}

.pay-mode-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-weight: 650;
  font-size: 14px;
}

.pay-mode-desc {
  font-size: 12px;
  color: var(--ios-secondary);
  margin-top: 2px;
}

/* ==================== iOS 按钮系统 ==================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 16px;
  border-radius: 11px;
  border: none;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
  transition: background-color 0.15s ease, opacity 0.15s ease, transform 0.12s var(--ease-ios);
  white-space: nowrap;
}

.btn:active:not(:disabled) {
  transform: scale(0.965);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--ios-blue);
  color: #FFFFFF;
}

.btn-primary:hover:not(:disabled) {
  background: var(--ios-blue-hover);
}

.btn-dark {
  background: var(--ios-label);
  color: #FFFFFF;
}

.btn-dark:hover:not(:disabled) {
  background: #2C2C2E;
}

.btn-success {
  background: var(--ios-green);
  color: #FFFFFF;
}

.btn-success:hover:not(:disabled) {
  background: #28B44B;
}

.btn-orange {
  background: var(--ios-orange);
  color: #FFFFFF;
}

.btn-orange:hover:not(:disabled) {
  background: #E58600;
}

.btn-soft {
  background: var(--ios-fill);
  color: var(--ios-label);
}

.btn-soft:hover:not(:disabled) {
  background: var(--ios-fill-strong);
}

.btn-tint-blue {
  background: var(--ios-blue-tint);
  color: var(--ios-blue);
}

.btn-tint-blue:hover:not(:disabled) {
  background: rgba(0, 122, 255, 0.18);
}

.btn-danger-tint {
  background: var(--ios-red-tint);
  color: var(--ios-red-ink);
}

.btn-danger-tint:hover:not(:disabled) {
  background: rgba(255, 59, 48, 0.2);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 12.5px;
  border-radius: 9px;
}

.btn-lg-block {
  width: 100%;
  padding: 13px 20px;
  font-size: 15px;
  border-radius: 13px;
}

/* ==================== iOS 原生滑动拨杆开关 ==================== */
.ios-switch-wrap {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
  user-select: none;
  padding: 4px 10px 4px 12px;
  border-radius: var(--r-pill);
  background: var(--ios-bg);
}

.ios-switch-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ios-label);
}

.ios-switch {
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 999px;
  background: rgba(120, 120, 128, 0.32);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background-color 0.24s var(--ease-ios);
  flex-shrink: 0;
}

.ios-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #FFFFFF;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: transform 0.24s var(--ease-ios);
}

.ios-switch.on {
  background: var(--ios-green);
}

.ios-switch.on::after {
  transform: translateX(18px);
}

/* ==================== 语义徽章 ==================== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 9px;
  border-radius: var(--r-pill);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

.badge-blue { background: var(--ios-blue-tint); color: var(--ios-blue); }
.badge-orange { background: var(--ios-orange-tint); color: var(--ios-orange-ink); }
.badge-green { background: var(--ios-green-tint); color: var(--ios-green-ink); }
.badge-red { background: var(--ios-red-tint); color: var(--ios-red-ink); }
.badge-gray { background: var(--ios-fill); color: var(--ios-secondary); }

/* ==================== 左侧订单列表（平滑滚动） ==================== */
.queue-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: calc(100vh - 210px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
}

.queue-card {
  padding: 13px 15px;
  border-radius: 13px;
  border: 1.5px solid transparent;
  background: var(--ios-bg);
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.12s var(--ease-ios);
}

.queue-card:hover {
  background: #EAEAF0;
}

.queue-card:active {
  transform: scale(0.985);
}

.queue-card.active {
  background: #F0F7FF;
  border-color: var(--ios-blue);
}

.queue-card-title {
  margin: 5px 0 6px;
  font-size: 14px;
  font-weight: 650;
  color: var(--ios-label);
  line-height: 1.35;
}

.queue-card-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ios-secondary);
  gap: 6px;
}

/* ==================== 订单进度条与分组详情 ==================== */
.progress-track {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--ios-bg);
  border-radius: 13px;
  margin: 16px 0 18px;
  flex-wrap: wrap;
}

.track-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  color: var(--ios-tertiary);
  font-weight: 500;
}

.track-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(118, 118, 128, 0.2);
  color: var(--ios-secondary);
  font-size: 11px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.track-step.done { color: var(--ios-green-ink); }
.track-step.done .track-dot { background: var(--ios-green); color: #FFFFFF; }
.track-step.current { color: var(--ios-blue); font-weight: 650; }
.track-step.current .track-dot { background: var(--ios-blue); color: #FFFFFF; }

.track-line {
  flex: 1;
  min-width: 14px;
  height: 1.5px;
  background: var(--ios-sep);
}

.focus-banner {
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.focus-banner.orange { background: var(--ios-orange-tint); }
.focus-banner.green { background: var(--ios-green-tint); }
.focus-banner.calm { background: var(--ios-bg); }

.divider-block {
  padding-top: 18px;
  margin-top: 18px;
  border-top: 0.5px solid var(--ios-sep);
}

.block-heading {
  margin: 0 0 10px;
  font-size: 14.5px;
  font-weight: 700;
  color: var(--ios-label);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

/* 预览图与防盗水印 */
.preview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(175px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.preview-card {
  border-radius: 12px;
  overflow: hidden;
  background: var(--ios-bg);
  cursor: zoom-in;
  transition: transform 0.16s var(--ease-ios);
}

.preview-card:hover {
  transform: scale(1.015);
}

.preview-thumb {
  position: relative;
  height: 124px;
  background: #E5E5EA;
  overflow: hidden;
}

.preview-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
}

.watermark-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  display: flex;
  flex-wrap: wrap;
  align-content: space-around;
  justify-content: space-around;
}

.watermark-overlay span {
  transform: rotate(-22deg);
  font-size: 11px;
  font-weight: 700;
  color: rgba(28, 28, 30, 0.3);
  text-shadow: 0 1px 1px rgba(255, 255, 255, 0.85);
  white-space: nowrap;
  padding: 6px 10px;
  user-select: none;
}

/* 文件条目与拖拽粘贴区 */
.clean-files {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.clean-file-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  background: var(--ios-bg);
  flex-wrap: wrap;
}

.file-tag-ext {
  padding: 3px 7px;
  border-radius: 6px;
  background: #FFFFFF;
  color: var(--ios-label);
  font-size: 11px;
  font-weight: 700;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.paste-dropzone {
  border: 1.5px dashed rgba(60, 60, 67, 0.24);
  border-radius: 14px;
  background: var(--ios-bg);
  padding: 18px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease;
}

.paste-dropzone:hover, .paste-dropzone.dragover {
  border-color: var(--ios-blue);
  background: var(--ios-blue-tint);
}

.kbd-hint {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  background: #FFFFFF;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ios-label);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

/* iMessage 风格留言气泡 */
.chat-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: 12px;
}

.chat-item {
  padding: 9px 14px;
  border-radius: 16px;
  max-width: 82%;
  font-size: 13.5px;
}

.chat-item.admin {
  background: var(--ios-bg);
  color: var(--ios-label);
  align-self: flex-start;
  border-bottom-left-radius: 5px;
}

.chat-item.student {
  background: var(--ios-blue);
  color: #FFFFFF;
  align-self: flex-end;
  border-bottom-right-radius: 5px;
}

.chat-meta {
  font-size: 11px;
  opacity: 0.72;
  margin-bottom: 2px;
  display: flex;
  gap: 8px;
}

/* 管理后台指标胶囊条 */
.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.metric-pill {
  background: #FFFFFF;
  border-radius: 15px;
  padding: 14px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.metric-pill.warn {
  background: #FFF9EE;
}

.metric-num {
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
}

/* ==================== iOS 弹性缩放模态弹窗 ==================== */
@keyframes iosFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes iosSheetPop {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, 0.36);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  animation: iosFadeIn 0.16s ease-out;
}

.modal-card {
  background: #FFFFFF;
  border-radius: 20px;
  box-shadow: var(--shadow-sheet);
  width: 100%;
  max-width: 420px;
  overflow: hidden;
  animation: iosSheetPop 0.22s var(--ease-ios);
  will-change: transform, opacity;
}

.modal-card.cashier { max-width: 520px; }
.modal-card.wide { max-width: 820px; }

.modal-head {
  padding: 16px 20px;
  border-bottom: 0.5px solid var(--ios-sep);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-title {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
}

.modal-close {
  background: var(--ios-fill);
  border: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 17px;
  line-height: 1;
  color: var(--ios-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.modal-body {
  padding: 20px;
  max-height: 82vh;
  overflow-y: auto;
}

.cashier-grid {
  display: grid;
  grid-template-columns: 174px 1fr;
  gap: 16px;
  align-items: stretch;
}

.qr-frame {
  border-radius: 14px;
  padding: 10px;
  background: var(--ios-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.qr-frame img {
  width: 150px;
  height: 166px;
  object-fit: contain;
  border-radius: 8px;
}

.lightbox-stage {
  position: relative;
  background: #1C1C1E;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 260px;
}

.lightbox-stage img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  user-select: none;
  -webkit-user-drag: none;
}

/* iOS 灵动胶囊 Toast */
.toast-stack {
  position: fixed;
  top: 68px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(28, 28, 30, 0.9);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: #FFFFFF;
  padding: 9px 18px;
  border-radius: var(--r-pill);
  font-size: 13.5px;
  font-weight: 500;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.2);
  animation: iosSheetPop 0.2s var(--ease-ios);
}

.toast.success::before {
  content: "✓ ";
  color: var(--ios-green);
  font-weight: 700;
}

.toast.error::before {
  content: "! ";
  color: #FF6961;
  font-weight: 700;
}

.empty-state {
  text-align: center;
  padding: 44px 18px;
  color: var(--ios-secondary);
}

.empty-state h4 {
  margin: 0 0 6px;
  color: var(--ios-label);
  font-size: 15.5px;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

@media (max-width: 980px) {
  .hall-grid,
  .workbench-grid {
    grid-template-columns: 1fr;
  }
  .admin-metrics {
    grid-template-columns: repeat(2, 1fr);
  }
  .queue-list {
    max-height: 280px;
  }
}

@media (max-width: 600px) {
  .topbar-inner {
    padding: 8px 14px;
    height: auto;
    flex-wrap: wrap;
  }
  .page-shell {
    padding: 14px 14px 36px;
  }
  .ios-card {
    padding: 18px;
  }
  .pay-mode-switch,
  .cashier-grid {
    grid-template-columns: 1fr;
  }
}
