:root {
  --bg: #F9FAFB;
  --card: #FFFFFF;
  --text: #111827;
  --text-secondary: #6B7280;
  --text-muted: #9CA3AF;
  --border: #E5E7EB;
  --accent: #1F2937;
  --accent-hover: #111827;
  --danger: #DC2626;
  --success: #059669;
  --warning: #D97706;
  --info: #2563EB;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.06);
  --shadow-lg: 0 4px 24px rgba(0,0,0,0.08);
  --nav-height: 52px;
  --bottom-nav-height: 60px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

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

html {
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  letter-spacing: -0.01em;
}

/* ─── 通用组件 ────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 18px;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  letter-spacing: 0;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-outline { background: #fff; color: var(--text); border: 1px solid var(--border); }
.btn-outline:hover { background: var(--bg); }
.btn-sm { padding: 5px 12px; font-size: 12px; border-radius: 5px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: 0.4; pointer-events: none; }
.btn-xs { padding: 3px 10px; font-size: 11px; border-radius: 4px; }

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
  -webkit-appearance: none; margin: 0;
}
input[type="number"] { -moz-appearance: textfield; }

input, select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  outline: none;
  transition: border-color 0.15s;
  color: var(--text);
}
input:focus, select:focus, textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(31,41,55,0.08);
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
}
.badge-pending { background: #FEF3C7; color: #92400E; }
.badge-confirmed { background: #DBEAFE; color: #1E40AF; }
.badge-preparing { background: #FEF9C3; color: #854D0E; }
.badge-ready { background: #D1FAE5; color: #065F46; }
.badge-completed { background: #F3F4F6; color: #374151; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }

.modal-overlay {
  position: fixed; inset: 0; background: rgba(0,0,0,0.4);
  z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
}
.modal {
  background: #fff; border-radius: 12px 12px 0 0; width: 100%; max-width: 480px;
  max-height: 85vh; overflow-y: auto; padding: 24px 20px; animation: slideUp 0.25s ease;
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
.modal-title { font-size: 17px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

.tag {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500; margin-right: 4px;
}
.tag-primary { background: #F3F4F6; color: var(--accent); }

/* ─── 顶部导航 ────────────────────────────── */
.nav-header {
  position: sticky; top: 0; z-index: 100;
  background: var(--accent); color: #fff;
  height: var(--nav-height); display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
}
.nav-header h1 { font-size: 17px; font-weight: 600; letter-spacing: 0.02em; }
.nav-header .nav-actions { display: flex; gap: 8px; }
.nav-header .btn { background: rgba(255,255,255,0.12); color: #fff; font-size: 12px; padding: 6px 14px; border-radius: 6px; }

/* ─── 底部导航 ────────────────────────────── */
.bottom-nav {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  background: #fff; border-top: 1px solid var(--border);
  display: flex; height: calc(var(--bottom-nav-height) + var(--safe-bottom));
  padding-bottom: var(--safe-bottom);
}
.bottom-nav .nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-size: 11px; color: var(--text-muted); cursor: pointer; gap: 2px;
  transition: color 0.15s; font-weight: 500;
}
.bottom-nav .nav-item.active { color: var(--accent); }
.bottom-nav .nav-item svg { width: 22px; height: 22px; margin-bottom: 2px; }

/* ─── 分类标签 ────────────────────────────── */
.category-tabs {
  display: flex; gap: 6px; padding: 8px 16px; overflow-x: auto;
  scrollbar-width: none; -ms-overflow-style: none;
  position: sticky; top: calc(var(--nav-height) + 50px); z-index: 49;
  background: var(--bg);
}
.category-tabs::-webkit-scrollbar { display: none; }
.cat-tab {
  flex-shrink: 0; padding: 6px 14px; border-radius: 20px;
  font-size: 13px; font-weight: 500; cursor: pointer;
  background: #fff; color: var(--text-secondary); border: 1px solid var(--border);
  transition: all 0.15s;
}
.cat-tab.active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ─── 菜单卡片 ────────────────────────────── */
.menu-grid { padding: 0 16px 16px; display: flex; flex-direction: column; gap: 10px; }
.menu-item {
  background: #fff; border-radius: var(--radius); display: flex; align-items: center;
  padding: 12px; gap: 12px; cursor: pointer; transition: all 0.12s;
  position: relative; overflow: hidden; box-shadow: 0 1px 2px rgba(0,0,0,0.03);
}
.menu-item:active { background: #F9FAFB; }
.menu-item.unavailable { opacity: 0.4; pointer-events: none; }
.menu-item .item-img {
  width: 64px; height: 64px; border-radius: 6px;
  background: #F3F4F6; display: flex; align-items: center; justify-content: center;
  font-size: 20px; flex-shrink: 0; color: var(--text-muted);
}
.menu-item .item-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 6px; }
.menu-item .item-info { flex: 1; min-width: 0; }
.menu-item .item-name { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.menu-item .item-desc { font-size: 12px; color: var(--text-secondary); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.menu-item .item-price { font-size: 15px; font-weight: 600; color: var(--accent); }
.menu-item .item-price .yuan { font-size: 11px; font-weight: 500; }
.menu-item .add-btn {
  width: 30px; height: 30px; border-radius: 50%; border: none;
  background: var(--accent); color: #fff; font-size: 18px; font-weight: 400;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; transition: all 0.15s;
}
.menu-item .add-btn:active { transform: scale(0.9); background: var(--accent-hover); }
.menu-item .qty-ctl {
  display: flex; align-items: center; gap: 8px;
}
.menu-item .qty-ctl .qty { font-size: 14px; font-weight: 600; min-width: 18px; text-align: center; }
.menu-item .qty-ctl .qty-btn {
  width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border);
  background: #fff; color: var(--accent); font-size: 16px; font-weight: 400;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all 0.15s;
}
.menu-item .qty-ctl .qty-btn:active { background: var(--bg); }

/* ─── 购物车浮窗 ──────────────────────────── */
.cart-bar {
  position: fixed; bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 12px);
  left: 12px; right: 12px; z-index: 90;
  background: var(--accent); color: #fff; border-radius: 12px;
  padding: 12px 18px; display: flex; align-items: center; justify-content: space-between;
  box-shadow: 0 4px 16px rgba(0,0,0,0.15);
  cursor: pointer; transition: transform 0.15s;
}
.cart-bar:active { transform: scale(0.98); }
.cart-bar .cart-left { display: flex; align-items: center; gap: 10px; }
.cart-bar .cart-icon { font-size: 20px; position: relative; opacity: 0.85; }
.cart-bar .cart-count {
  position: absolute; top: -8px; right: -10px;
  background: #fff; color: var(--accent); width: 18px; height: 18px;
  border-radius: 50%; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.cart-bar .cart-total { font-size: 16px; font-weight: 600; }

/* ─── 订单筛选 ────────────────────────────── */
.order-filters {
  display: flex; gap: 6px; padding: 10px 16px;
  background: var(--bg);
  position: sticky; top: 0; z-index: 50;
}
.order-filter {
  flex: 1; padding: 7px 0; border-radius: 8px;
  border: 1px solid var(--border); background: #fff;
  font-size: 13px; font-weight: 500; cursor: pointer;
  color: var(--text-secondary); transition: all 0.15s;
  text-align: center;
}
.order-filter.active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ─── 公告弹窗 ────────────────────────────── */
#annContent { font-size: 14px; line-height: 1.7; color: var(--text-secondary); }
#annModal.modal-overlay {
  align-items: center;
  visibility: hidden; opacity: 0;
  transition: visibility 0s 0.25s, opacity 0.25s ease;
}
#annModal.modal-overlay.show {
  visibility: visible; opacity: 1;
  transition: visibility 0s, opacity 0.25s ease;
}
#annModal .modal {
  border-radius: var(--radius);
  transform: translateY(24px);
  transition: transform 0.25s ease;
}
#annModal.modal-overlay.show .modal {
  transform: translateY(0);
}

/* ─── 订单页 ──────────────────────────────── */
.page { padding: 16px 16px 100px; display: none; }
.page.active { display: block; }

.order-card {
  background: #fff; border-radius: var(--radius); padding: 16px;
  margin-bottom: 12px; box-shadow: var(--shadow);
}
.order-card .order-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.order-card .order-no { font-size: 13px; color: var(--text-secondary); font-weight: 600; }
.order-card .order-time { font-size: 12px; color: var(--text-muted); }
.order-card .order-items { font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; line-height: 1.7; }
.order-card .order-footer { display: flex; justify-content: space-between; align-items: center; }
.order-card .order-total { font-size: 15px; font-weight: 600; color: var(--accent); }
.order-card .order-table { font-size: 12px; color: var(--text-muted); }

/* ─── 订单进度条 ──────────────────────────── */
.order-progress {
  display: flex;
  align-items: flex-start;
  position: relative;
  padding-top: 16px;
  margin-bottom: 8px;
}
.prog-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.prog-step::before {
  content: '';
  position: absolute;
  top: 10px;
  right: 50%;
  width: 100%;
  height: 2px;
  background: var(--border);
}
.prog-step:first-child::before { display: none; }
.prog-step.completed::before { background: var(--accent); }
.prog-node {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  color: #fff;
  position: relative;
  z-index: 1;
  transition: background 0.3s, border-color 0.3s;
}
.prog-step.completed .prog-node { background: var(--accent); }
.prog-step.current .prog-node {
  background: #fff;
  border: 2px solid var(--accent);
  box-shadow: 0 0 0 3px rgba(31,41,55,0.08);
}
.prog-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 5px;
  white-space: nowrap;
  transition: color 0.3s;
}
.prog-step.completed .prog-label,
.prog-step.current .prog-label {
  color: var(--text);
  font-weight: 500;
}
.prog-flag {
  position: absolute;
  top: -10px;
  z-index: 2;
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid var(--accent);
}

.empty-state {
  text-align: center; padding: 60px 20px; color: var(--text-muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 12px; opacity: 0.3; }
.empty-state p { font-size: 14px; }

/* ─── 搜索 ────────────────────────────────── */
.search-bar {
  padding: 8px 16px; position: sticky; top: var(--nav-height); z-index: 50;
  background: var(--bg);
}
.search-bar input {
  border-radius: 20px; background: #fff; padding: 9px 14px;
  border: 1px solid var(--border); font-size: 14px;
}

/* ─── 下单弹窗 ────────────────────────────── */
.checkout-items { max-height: 280px; overflow-y: auto; margin-bottom: 16px; }
.checkout-item {
  display: flex; justify-content: space-between; align-items: center;
  padding: 8px 0; border-bottom: 1px solid var(--border);
  font-size: 14px;
}
.checkout-item .ci-name { flex: 1; }
.checkout-item .ci-qty { color: var(--text-muted); margin: 0 8px; }
.checkout-item .ci-price { color: var(--accent); font-weight: 600; }
.checkout-total { font-size: 17px; font-weight: 600; text-align: right; padding: 12px 0; }
.checkout-total span { color: var(--accent); }

.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; margin-bottom: 4px; color: var(--text-secondary); }

/* ─── Toast ───────────────────────────────── */
.toast {
  position: fixed; top: 72px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; padding: 10px 20px; border-radius: 8px;
  font-size: 13px; z-index: 2000; animation: fadeIn 0.25s ease;
  pointer-events: none; letter-spacing: 0;
}
@keyframes fadeIn { from { opacity: 0; transform: translateX(-50%) translateY(-8px); } to { opacity: 1; transform: translateX(-50%) translateY(0); } }

/* ─── 楼栋标签 ──────────────────────────── */
.bld-chip {
  display: inline-block; padding: 2px 8px; border-radius: 4px;
  font-size: 11px; font-weight: 500;
  background: #F3F4F6; color: var(--text-secondary);
  border: 1px solid var(--border);
  transition: all 0.12s;
  user-select: none;
}
.bld-chip.bld-active {
  background: var(--accent); color: #fff; border-color: var(--accent);
}

/* ═══════════════ 后台管理 ══════════════════ */
.admin-layout { display: flex; min-height: 100vh; }

.admin-sidebar {
  width: 220px; background: #111827; color: #fff; position: fixed;
  top: 0; bottom: 0; left: 0; padding: 20px 0; z-index: 200;
  display: flex; flex-direction: column;
}
.admin-sidebar .logo { padding: 0 20px 24px; font-size: 18px; font-weight: 700; border-bottom: 1px solid rgba(255,255,255,0.08); }
.admin-sidebar .nav { flex: 1; padding: 8px 0; }
.admin-sidebar .nav a {
  display: flex; align-items: center; gap: 10px; padding: 10px 20px;
  color: rgba(255,255,255,0.5); text-decoration: none; font-size: 13px; transition: all 0.12s;
}
.admin-sidebar .nav a:hover, .admin-sidebar .nav a.active { color: #fff; background: rgba(255,255,255,0.06); }

.admin-main { margin-left: 220px; flex: 1; padding: 24px; background: #F9FAFB; min-height: 100vh; }
.admin-main h2 { font-size: 20px; font-weight: 600; margin-bottom: 20px; }

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 24px; }
.stat-card {
  background: #fff; border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow);
}
.stat-card .stat-label { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.stat-card .stat-value { font-size: 26px; font-weight: 700; }
.stat-card .stat-value.dark { color: var(--accent); }
.stat-card .stat-value.green { color: var(--success); }
.stat-card .stat-value.blue { color: var(--info); }
.stat-card .stat-value.amber { color: var(--warning); }

.table-wrap { background: #fff; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { background: #F9FAFB; padding: 10px 14px; text-align: left; font-weight: 500; color: var(--text-secondary); font-size: 11px; border-bottom: 1px solid var(--border); text-transform: uppercase; letter-spacing: 0.03em; }
td { padding: 10px 14px; border-bottom: 1px solid var(--border); }
tr:last-child td { border-bottom: none; }

.order-status-bar {
  display: flex; gap: 3px;
}
.order-status-bar .step {
  padding: 3px 7px; border-radius: 3px; font-size: 10px;
  background: #F3F4F6; color: var(--text-muted);
}
.order-status-bar .step.active { background: var(--accent); color: #fff; }

.admin-section { display: none; }
.admin-section.active { display: block; }

/* ─── 移动端适配 ──────────────────────────── */
/* ═══════════════ 手机端适配 ══════════════════ */
@media (max-width: 768px) {
  /* Admin layout — switch to column */
  .admin-layout { display: block; }
  .admin-sidebar { display: none; }
  .admin-main { margin-left: 0; padding: 12px; padding-bottom: 30px; width: 100%; max-width: 100vw; }
  .admin-main h2 { font-size: 18px; margin-bottom: 14px; letter-spacing: 0; }


  /* Admin topbar */
  .admin-topbar { padding-bottom: 12px; }
  .admin-topbar .user-tag { font-size: 11px; padding: 3px 8px; }

  /* Mobile nav — sticky, scrollable */
  .admin-mobile-nav { display: none !important; }

  /* Dashboard stat cards */
  .stat-cards { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 18px; }
  .stat-card { padding: 14px 12px; }
  .stat-card .stat-label { font-size: 11px; }
  .stat-card .stat-value { font-size: 22px; }

  /* Tables — horizontal scroll */
  .table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius);
  }
  table { min-width: 580px; font-size: 12px; }
  th, td { padding: 8px 10px; }
  th { font-size: 10px; }
  td { white-space: nowrap; }
  /* action cell — keep buttons inline */
  td:last-child { white-space: nowrap; }

  /* Order progress bar — compact */
  .order-progress { padding-top: 10px; margin-bottom: 4px; }
  .prog-node { width: 16px; height: 16px; font-size: 9px; }
  .prog-label { font-size: 9px; margin-top: 4px; }
  .prog-flag { top: -8px; border-left-width: 4px; border-right-width: 4px; border-bottom-width: 6px; }

  /* Filters */
  #orderStatusFilter, #orderDateFilter {
    font-size: 13px; padding: 8px 10px; min-height: 38px;
  }

  /* Forms — larger touch targets, prevent iOS zoom */
  .form-group { margin-bottom: 12px; }
  .form-group label { font-size: 12px; }
  input, select, textarea { font-size: 16px; padding: 10px 12px; }
  input[type="date"] { min-height: 38px; }

  /* Buttons — 44px touch target minimum */
  .btn { min-height: 40px; font-size: 13px; }
  .btn-xs { min-height: 36px; padding: 6px 12px; font-size: 12px; border-radius: 4px; }
  .btn-sm { min-height: 36px; padding: 6px 14px; font-size: 12px; }

  /* Modals — full width */
  .modal-overlay { align-items: flex-end; }
  .modal {
    max-width: 100%; border-radius: 16px 16px 0 0;
    padding: 20px 16px 28px; max-height: 88vh;
  }
  .modal-title { font-size: 16px; margin-bottom: 16px; }

  /* User / admin list */
  .user-section { padding: 14px; }
  .user-row {
    flex-direction: column; align-items: flex-start; gap: 8px;
    padding: 10px 0;
  }
  .user-row .user-info { flex-wrap: wrap; gap: 6px; }

  /* Announcements table */
  #announcementsTable table { min-width: 500px; }

  /* Inline option editor */
  .oi-addgroup { flex-wrap: wrap; }
  .oi-ghead { flex-wrap: wrap; }
  .oi-val-addrow { flex-wrap: wrap; }

  /* Hide desktop-only columns */
  .hide-mobile { display: none !important; }

  /* Login page */
  .login-box { margin: 20px; padding: 28px 20px; }
  .login-box h2 { font-size: 20px; }
}

/* ─── 登录页 ──────────────────────────────── */
.login-page {
  display: flex; align-items: center; justify-content: center; min-height: 100vh;
  background: #F3F4F6;
}
.login-box {
  background: #fff; border-radius: 12px; padding: 36px; width: 100%; max-width: 360px;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06);
}
.login-box h2 { text-align: center; margin-bottom: 4px; font-size: 22px; font-weight: 600; }
.login-box .subtitle { text-align: center; color: var(--text-muted); font-size: 13px; margin-bottom: 24px; }

/* ─── 用户认证 ──────────────────────────────── */
.header-user {
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px 8px;
  border-radius: 4px; background: var(--bg);
}
.auth-tabs {
  display: flex; gap: 0; margin-bottom: 16px;
  border-radius: var(--radius); background: var(--bg); padding: 3px;
}
.auth-tab {
  flex: 1; text-align: center; padding: 8px; font-size: 14px; font-weight: 500;
  cursor: pointer; border-radius: 6px; color: var(--text-secondary);
  transition: all 0.2s;
}
.auth-tab.active {
  background: #fff; color: var(--text); box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

/* ─── 账户页 ──────────────────────────────── */
.account-page { padding: 8px 0; }
.account-header {
  padding: 20px 16px;
  background: #fff; border-radius: var(--radius); margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.account-name { font-size: 22px; font-weight: 600; margin-bottom: 4px; }
.account-sub { font-size: 13px; color: var(--text-secondary); }
.account-form {
  background: #fff; border-radius: var(--radius); padding: 16px;
  box-shadow: var(--shadow);
}

/* ─── 选项弹窗 ──────────────────────────────── */
.opt-group {
  margin-bottom: 14px;
}
.opt-group-name {
  font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 8px;
}
.opt-group-type {
  font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px;
}
.opt-required {
  font-size: 10px; font-weight: 600; color: var(--danger, #DC2626); margin-left: 6px;
  padding: 1px 6px; border-radius: 3px; background: rgba(220,38,38,0.1);
}
.opt-values { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-val {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 12px; border: 1px solid var(--border); border-radius: 6px;
  cursor: pointer; font-size: 13px; transition: all 0.15s;
  user-select: none;
}
.opt-val:has(input:checked) {
  border-color: var(--accent); background: var(--accent); color: #fff;
}
.opt-val:has(input:checked) .opt-val-price { color: rgba(255,255,255,0.75); }
.opt-val input { display: none; }
.opt-val-name { font-size: 13px; }
.opt-val-price { font-size: 11px; color: var(--text-muted); }
.item-has-opts {
  font-size: 10px; background: #EFF6FF; color: #1D4ED8; padding: 1px 6px;
  border-radius: 10px; margin-left: 6px; vertical-align: middle;
}
.ci-opts {
  font-size: 11px; color: var(--text-secondary); margin-top: 1px;
}

/* ─── Admin 选项编辑器 ──────────────────────────────── */
.opt-editor {
  background: #fff; border-radius: var(--radius); padding: 20px;
  box-shadow: var(--shadow);
}
.opt-editor-header {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
}
.opt-editor-header h3 { font-size: 16px; margin: 0; }
.opt-group-card {
  background: var(--bg); border: 1px solid var(--border); border-radius: 8px;
  padding: 12px; margin-bottom: 10px;
}
.opt-group-card-header {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px; margin-bottom: 8px;
}
.opt-group-card-name { font-weight: 600; }
.opt-group-card-type {
  font-size: 11px; background: #EFF6FF; color: #1D4ED8;
  padding: 1px 8px; border-radius: 10px;
}
.opt-group-card-values { padding-left: 8px; }
.opt-val-row {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 0; font-size: 13px;
}
.opt-val-row .btn { margin-left: auto; }
.opt-val-input, input.opt-val-price {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; background: #fff;
}
.opt-val-input { width: 100px; }
input.opt-val-price { width: 55px; }

/* ─── Inline option editor (inside add/edit modal) ── */
.oi-section {
  border-top: 1px solid var(--border); padding-top: 14px; margin-top: 8px;
}
.oi-section-head {
  font-size: 14px; font-weight: 600; color: var(--text); margin-bottom: 10px;
}
.oi-section-hint {
  font-size: 11px; font-weight: 400; color: var(--text-muted); margin-left: 6px;
}
.oi-empty {
  font-size: 12px; color: var(--text-muted); padding: 8px 0;
}
.oi-group {
  background: var(--bg); border: 1px solid var(--border); border-radius: 6px;
  padding: 10px; margin-bottom: 8px;
}
.oi-ghead {
  display: flex; align-items: center; gap: 6px; margin-bottom: 8px;
}
.oi-gname { font-size: 13px; font-weight: 600; }
.oi-gtype {
  font-size: 10px; background: #EFF6FF; color: #1D4ED8;
  padding: 0 6px; border-radius: 8px; line-height: 18px;
}
.oi-vals { padding-left: 4px; }
.oi-val {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; padding: 3px 0; color: var(--text);
}
.oi-val-p { font-size: 11px; color: var(--text-muted); }
.oi-val-addrow {
  display: flex; align-items: center; gap: 6px; margin-top: 6px;
  padding-top: 6px; border-top: 1px dashed var(--border);
}
.oi-val-input, .oi-val-price, .oi-addgroup select {
  padding: 4px 8px; border: 1px solid var(--border); border-radius: 4px;
  font-size: 12px; background: #fff; width: auto; max-width: 100%;
}
.oi-val-input { width: 80px; }
.oi-val-price { width: 50px; }
.oi-addgroup {
  display: flex; align-items: center; gap: 8px; margin-top: 4px;
}