:root {
  --bg: #f5f5f5;
  --card-bg: #ffffff;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --border: #e0e0e0;
  --primary: #ee3c23;
  --primary-dark: #c92611;
  --primary-light: #fff0ee;
  --success: #07a35a;
  --success-light: #e8f9f0;
  --danger: #e63946;
  --shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  --radius: 12px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== 管理端样式 ===== */
.admin-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 20px;
}

.admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--primary);
}

.admin-header h1 {
  font-size: 22px;
  font-weight: 700;
}

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

.admin-header .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  font-weight: 700;
}

.admin-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 4px;
  box-shadow: var(--shadow);
}

.admin-tab {
  flex: 1;
  padding: 10px 20px;
  text-align: center;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  color: var(--text-secondary);
}

.admin-tab.active {
  background: var(--primary);
  color: white;
}

.tab-content {
  display: none;
}

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

/* 产品录入表单 */
.product-form {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  margin-bottom: 20px;
}

.form-row {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.form-group {
  flex: 1;
}

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

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--primary);
}

.form-group textarea {
  resize: vertical;
  min-height: 60px;
}

/* 尺码选择器 */
.size-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.size-chip {
  min-width: 56px;
  padding: 9px 14px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  background: #fff;
  text-align: center;
  cursor: pointer;
  transition: all 0.15s;
  user-select: none;
}

.size-chip .size-name {
  display: block;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.size-chip .size-left {
  display: block;
  font-size: 11px;
  color: var(--text-secondary);
  margin-top: 2px;
}

.size-chip.sold-out {
  opacity: 0.45;
  cursor: not-allowed;
  text-decoration: line-through;
}

.size-chip.selected {
  border-color: var(--primary);
  background: var(--primary);
  box-shadow: 0 2px 8px rgba(233, 57, 70, 0.25);
}

.size-chip.selected .size-name,
.size-chip.selected .size-left {
  color: #fff;
}

.file-upload {
  border: 2px dashed var(--border);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s;
  position: relative;
}

.file-upload:hover {
  border-color: var(--primary);
}

.file-upload input[type="file"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.file-upload .placeholder {
  color: var(--text-secondary);
  font-size: 14px;
}

.file-upload .preview-img {
  max-width: 100%;
  max-height: 200px;
  border-radius: 8px;
}

.btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
}

.btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text);
}

.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-danger {
  background: transparent;
  border: 1px solid var(--danger);
  color: var(--danger);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 13px;
}

/* 产品列表 */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.product-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.product-card .no-image {
  width: 100%;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #aaa;
  font-size: 14px;
}

.product-card .card-body {
  padding: 14px;
}

.product-card-inactive {
  opacity: 0.72;
  border: 1px dashed #94a3b8;
}

.product-inactive-label {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 10px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

.product-card h3 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stock-badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 8px;
}

.stock-badge.available {
  background: var(--success-light);
  color: var(--success);
}

.stock-badge.low {
  background: #fff8e1;
  color: #f57c00;
}

.stock-badge.out {
  background: #ffebee;
  color: var(--danger);
}

.card-actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

/* 二维码区域 */
.qr-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  text-align: center;
}

.qr-section h2 {
  font-size: 18px;
  margin-bottom: 16px;
}

.qr-display {
  display: inline-block;
  padding: 20px;
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 16px;
}

.qr-display img {
  width: 280px;
  height: 280px;
}

.qr-info {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 16px;
}

.qr-url {
  display: inline-block;
  padding: 8px 16px;
  background: #f5f5f5;
  border-radius: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  word-break: break-all;
  max-width: 400px;
}

/* 预约列表 */
.reservation-table {
  width: 100%;
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.reservation-table table {
  width: 100%;
  border-collapse: collapse;
}

.reservation-table th {
  background: #f8f8f8;
  padding: 12px 14px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  white-space: nowrap;
}

.reservation-table td {
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  font-size: 14px;
}

.status-badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.status-pending {
  background: #fff8e1;
  color: #f57c00;
}

.status-confirmed {
  background: var(--success-light);
  color: var(--success);
}

.status-cancelled {
  background: #ffebee;
  color: var(--danger);
}

.status-completed {
  background: #e3f2fd;
  color: #1976d2;
}

.status-no-show {
  background: #f3e8ff;
  color: #7e22ce;
}

.status-expired {
  background: #f1f5f9;
  color: #64748b;
}

/* Excel 批量回传 */
.batch-import-panel {
  margin: 0 0 16px;
  padding: 18px;
  background: #f8fbff;
  border: 1px solid #bfd7f2;
  border-radius: var(--radius);
}

.batch-import-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.batch-import-header h3 {
  margin: 0 0 5px;
  font-size: 16px;
}

.batch-import-header p,
.batch-import-hint {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}

.batch-import-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.batch-import-actions input[type="file"] {
  max-width: 300px;
  font-size: 13px;
}

.batch-import-summary,
.batch-import-success,
.batch-import-loading,
.batch-import-error {
  margin: 12px 0;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.5;
}

.batch-import-summary {
  background: #eaf4ff;
  color: #245f94;
}

.batch-import-success {
  background: var(--success-light);
  color: var(--success);
}

.batch-import-loading {
  color: var(--text-secondary);
}

.batch-import-error {
  background: #ffebee;
  color: var(--danger);
}

.batch-import-table-wrap {
  max-height: 260px;
  overflow: auto;
  margin: 12px 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
}

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

.batch-import-table th,
.batch-import-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  white-space: nowrap;
}

.batch-import-table th {
  position: sticky;
  top: 0;
  background: #f8f8f8;
  color: var(--text-secondary);
}

.batch-import-details {
  margin-top: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}

.batch-import-details ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

/* 设置区域 */
.settings-section {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
  max-width: 600px;
}

/* ===== 客户端样式 ===== */
.customer-container {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--card-bg);
  padding-bottom: 40px;
}

.customer-header {
  background: var(--primary);
  color: white;
  padding: 20px 16px;
  text-align: center;
}

.customer-header-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  max-width: 388px;
  margin: 0 auto;
  text-align: left;
}

.customer-header h1 {
  font-size: 20px;
  font-weight: 700;
}

.my-reservations-btn {
  flex-shrink: 0;
  padding: 7px 10px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.customer-header p {
  font-size: 13px;
  opacity: 0.9;
  margin-top: 4px;
}

.product-list {
  padding: 16px;
}

.customer-product-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}

.customer-product-card img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.customer-product-card .no-image {
  width: 100%;
  height: 220px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f0f0f0;
  color: #bbb;
  font-size: 16px;
}

.customer-product-card .card-body {
  padding: 14px;
}

.customer-product-card h2 {
  font-size: 17px;
  font-weight: 600;
  margin-bottom: 6px;
}

.customer-product-card .stock-info {
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.stock-bar {
  height: 6px;
  background: #f0f0f0;
  border-radius: 3px;
  overflow: hidden;
  margin-bottom: 12px;
}

.stock-bar-fill {
  height: 100%;
  border-radius: 3px;
  transition: width 0.3s;
}

.btn-reserve {
  width: 100%;
  padding: 12px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.btn-reserve:hover {
  background: var(--primary-dark);
}

.btn-reserve:disabled {
  background: #ccc;
  cursor: not-allowed;
}

/* 用户端预约清单：默认固定在屏幕底部，提交动作始终可见 */
.customer-container {
  padding-bottom: 120px;
}

.reservation-cart {
  position: fixed;
  right: max(4px, calc((100vw - 444px) / 2 + 4px));
  bottom: max(8px, env(safe-area-inset-bottom));
  left: max(4px, calc((100vw - 444px) / 2 + 4px));
  margin: 0;
  padding: 12px;
  border: 1px solid #a8c3d1;
  border-radius: 18px;
  background: #dceef5;
  box-shadow: 0 12px 30px rgba(58, 103, 124, 0.22);
  z-index: 50;
}

.reservation-cart-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 178px;
  gap: 12px;
  align-items: stretch;
}

.reservation-cart-toggle {
  min-width: 0;
  padding: 8px 8px 8px 6px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #173543;
  text-align: left;
  cursor: pointer;
}

.reservation-cart-label,
.reservation-cart-view {
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.reservation-cart-label {
  color: #4c7180;
  font-weight: 650;
  letter-spacing: 0.2px;
}

.reservation-cart-toggle strong {
  display: block;
  margin-top: 2px;
  color: #173543;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.32;
  letter-spacing: 0.05px;
}

.reservation-cart-view {
  margin-top: 4px;
  color: #245d76;
  font-weight: 700;
}

.reservation-cart-submit {
  display: flex;
  min-height: 68px;
  padding: 10px 14px;
  border: 0;
  justify-content: center;
  align-items: center;
  border-radius: 12px;
  background: #4f8ba6;
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  line-height: 1.35;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 5px 12px rgba(58, 118, 145, 0.25);
}

.reservation-cart-submit:active {
  background: #3c7089;
  transform: translateY(1px);
}

.reservation-cart-details {
  display: none;
  margin-top: 10px;
  padding: 12px 10px 0;
  border-top: 1px solid #a8c3d1;
  background: #f8fcfe;
  border-radius: 10px;
}

.reservation-cart.expanded .reservation-cart-details {
  display: block;
}

.reservation-cart-head,
.reservation-cart-item {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.reservation-cart-head {
  margin-bottom: 8px;
}

.reservation-cart-head strong {
  font-size: 15px;
}

.reservation-cart-items {
  max-height: min(220px, 30vh);
  overflow-y: auto;
}

.reservation-cart-item {
  padding: 9px 0;
  border-top: 1px solid var(--border);
  font-size: 13px;
}

.reservation-cart-item strong,
.reservation-cart-item span {
  display: block;
}

.reservation-cart-item span {
  margin-top: 2px;
  color: var(--text-secondary);
}

.cart-link-btn,
.cart-remove-btn {
  border: none;
  background: transparent;
  color: var(--primary);
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}

@media (max-width: 390px) {
  .reservation-cart {
    padding: 10px;
  }

  .reservation-cart-actions {
    grid-template-columns: minmax(0, 1fr) 156px;
    gap: 8px;
  }

  .reservation-cart-submit {
    padding: 10px 8px;
    font-size: 14px;
  }
}

.checkout-summary {
  max-height: 160px;
  overflow-y: auto;
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 8px;
  background: #f8f8f8;
}

.checkout-summary div {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 0;
  font-size: 13px;
}

/* 顾客自助查询、修改与取消预约 */
.my-reservations-modal {
  max-width: 390px;
  max-height: min(720px, calc(100vh - 32px));
  overflow-y: auto;
}

.modal-title-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.modal-title-row h2 {
  margin-bottom: 0;
  text-align: left;
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.my-reservations-query {
  display: flex;
  width: 100%;
  justify-content: center;
}

.my-reservations-result {
  margin-top: 16px;
}

.my-reservations-hint {
  margin-bottom: 10px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.5;
}

.my-reservations-loading,
.my-reservations-empty {
  padding: 22px 12px;
  border-radius: 8px;
  background: #f8f8f8;
  color: var(--text-secondary);
  font-size: 14px;
  text-align: center;
}

.my-reservation-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
}

.my-reservation-top,
.my-reservation-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.my-reservation-top strong {
  min-width: 0;
  font-size: 14px;
}

.my-reservation-info {
  display: grid;
  gap: 3px;
  margin-top: 8px;
  color: var(--text-secondary);
  font-size: 12px;
}

.my-reservation-actions {
  justify-content: flex-end;
  margin-top: 12px;
}

.edit-reservation-product {
  margin-bottom: 14px;
  padding: 10px;
  border-radius: 8px;
  background: #f8f8f8;
  font-size: 14px;
  font-weight: 600;
}

/* 预约弹窗 */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 20px;
}

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

.modal {
  background: white;
  border-radius: var(--radius);
  padding: 24px;
  width: 100%;
  max-width: 360px;
}

.modal h2 {
  font-size: 18px;
  margin-bottom: 16px;
  text-align: center;
}

.modal .form-group {
  margin-bottom: 14px;
}

.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 20px;
}

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

/* 预约成功页 */
.success-container {
  max-width: 420px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--card-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: var(--success);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: white;
  margin-bottom: 20px;
}

.success-container h1 {
  font-size: 22px;
  margin-bottom: 8px;
}

.success-container .subtitle {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 24px;
}

.reservation-code-box {
  border: 2px dashed var(--primary);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  width: 100%;
  margin-bottom: 20px;
}

.reservation-code-box .label {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 8px;
}

.reservation-code-box .code {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 2px;
}

.reservation-code-box .qr {
  margin-top: 16px;
}

.reservation-code-box .qr img {
  width: 200px;
  height: 200px;
}

.reservation-detail {
  width: 100%;
  background: #f8f8f8;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 20px;
}

.reservation-detail .row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid #eee;
  font-size: 14px;
}

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

.reservation-detail .row .key {
  color: var(--text-secondary);
}

.reservation-detail .row .val {
  font-weight: 500;
}

/* 空状态 */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-secondary);
}

.empty-state .icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.empty-state p {
  font-size: 15px;
}

/* ===== 顾客端品牌视觉系统：骨白、深炭、品牌红、柔梦蓝 ===== */
.customer-container {
  --customer-paper: #f7f6f3;
  --customer-card: #ffffff;
  --customer-ink: #171716;
  --customer-muted: #706f6b;
  --customer-line: #e5e2dc;
  --customer-red: #d3133a;
  --customer-red-dark: #a20f2d;
  --customer-selected: #dceef5;
  --customer-selected-ink: #245d76;
  max-width: 440px;
  background: var(--customer-paper);
  padding-bottom: 132px;
}

.customer-header {
  position: relative;
  padding: 24px 20px 22px;
  background: #fbfaf8;
  color: var(--customer-ink);
  text-align: left;
  border-bottom: 1px solid var(--customer-line);
}

.customer-header::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 10px;
  background: var(--customer-red);
}

.customer-header-title {
  max-width: none;
  padding-top: 7px;
}

.customer-header h1 {
  font-size: 22px;
  font-weight: 720;
  letter-spacing: -0.5px;
}

.customer-header p {
  margin-top: 5px;
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 500;
  opacity: 1;
}

.my-reservations-btn {
  min-height: 40px;
  padding: 8px 15px;
  border: 1px solid var(--customer-red);
  border-radius: 999px;
  background: var(--customer-red);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  box-shadow: 0 4px 10px rgba(211, 19, 58, 0.16);
}

.my-reservations-btn:active {
  background: var(--customer-red-dark);
  transform: translateY(1px);
}

.product-list {
  padding: 20px 16px 10px;
}

.customer-product-card {
  margin-bottom: 20px;
  border: 1px solid var(--customer-line);
  border-radius: 18px;
  background: var(--customer-card);
  box-shadow: 0 5px 16px rgba(28, 26, 23, 0.055);
}

.customer-product-card img,
.customer-product-card .no-image {
  height: 236px;
}

.customer-product-card .no-image {
  background: #eceae5;
  color: #8d8a84;
}

.customer-product-card .card-body {
  padding: 17px 16px 16px;
}

.customer-product-card h2 {
  margin-bottom: 7px;
  color: var(--customer-ink);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.2px;
}

.customer-product-card .stock-info {
  margin-bottom: 13px;
  color: var(--customer-muted);
  font-size: 13px;
}

.stock-bar {
  height: 4px;
  margin-bottom: 16px;
  background: #e9e7e2;
}

.stock-bar-fill {
  background: var(--customer-red) !important;
}

.btn-reserve {
  min-height: 50px;
  border-radius: 999px;
  background: var(--customer-red);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.1px;
}

.btn-reserve:hover,
.btn-reserve:active {
  background: var(--customer-red-dark);
}

.btn-reserve:disabled {
  background: #c9c7c2;
}

.reservation-window-notice {
  margin: 14px 16px 0;
  padding: 10px 12px;
  border: 1px solid #d9d5ce;
  border-radius: 10px;
  background: #f1efeb;
  color: #5f5c57;
  font-size: 13px;
}

/* 已选状态：低饱和石灰；主操作：品牌红 */
.reservation-cart {
  right: max(4px, calc((100vw - 460px) / 2 + 4px));
  left: max(4px, calc((100vw - 460px) / 2 + 4px));
  padding: 12px 14px;
  border: 1px solid #a8c3d1;
  border-radius: 20px;
  background: var(--customer-selected);
  box-shadow: 0 14px 34px rgba(42, 89, 108, 0.18);
}

.reservation-cart-actions {
  grid-template-columns: minmax(0, 1fr) 180px;
  gap: 14px;
}

.reservation-cart-toggle {
  padding: 9px 8px 9px 3px;
  color: #2f2d29;
}

.reservation-cart-label {
  color: #4c7180;
  font-size: 12px;
  font-weight: 650;
}

.reservation-cart-toggle strong {
  color: #173543;
  font-size: 18px;
  font-weight: 720;
}

.reservation-cart-view {
  color: var(--customer-selected-ink);
  font-weight: 700;
}

.reservation-cart-submit {
  min-height: 68px;
  border-radius: 999px;
  background: var(--customer-red);
  box-shadow: 0 7px 14px rgba(211, 19, 58, 0.22);
  font-size: 14px;
  font-weight: 720;
}

.reservation-cart-submit:active {
  background: var(--customer-red-dark);
}

.reservation-cart-details {
  border-top-color: #a8c3d1;
  background: rgba(255, 255, 255, 0.82);
}

.reservation-cart-item {
  border-top-color: #d8e6eb;
}

.cart-link-btn,
.cart-remove-btn {
  color: var(--customer-red);
  font-weight: 650;
}

/* 弹窗与查询页使用同一套轻量化卡片语言 */
.modal-overlay {
  background: rgba(21, 22, 22, 0.46);
  backdrop-filter: blur(3px);
}

.modal {
  border: 1px solid var(--customer-line);
  border-radius: 20px;
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.18);
}

/* 选择规格后：确认加入清单必须始终显示在取消上方 */
.reserve-modal-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 22px;
}

.reserve-confirm-btn,
.reserve-cancel-btn {
  display: flex;
  width: 100%;
  min-height: 52px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 720;
  cursor: pointer;
}

.reserve-confirm-btn {
  order: 1;
  border: 0;
  background: #d3133a;
  color: #ffffff;
  box-shadow: 0 6px 14px rgba(211, 19, 58, 0.22);
}

.reserve-confirm-btn:active {
  background: #a20f2d;
  transform: translateY(1px);
}

.reserve-cancel-btn {
  order: 2;
  border: 1px solid #d7d4ce;
  background: #ffffff;
  color: #5d5a55;
}

/* 确认预约弹窗：内容可滚动，提交操作始终停留在底部 */
.checkout-modal {
  display: flex;
  max-height: min(680px, calc(100vh - 24px));
  flex-direction: column;
  overflow-y: auto;
}

.checkout-modal .checkout-summary {
  flex: 0 1 auto;
  max-height: min(150px, 22vh);
}

.checkout-modal .form-group {
  flex: 0 0 auto;
}

.checkout-modal .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 1;
  margin: 16px -24px -24px;
  padding: 14px 24px calc(14px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--customer-line);
  background: #ffffff;
  box-shadow: 0 -6px 14px rgba(28, 26, 23, 0.06);
}

.checkout-modal .modal-actions .btn-primary {
  min-height: 48px;
}

.modal h2,
.modal-title-row h2 {
  color: var(--customer-ink);
  font-weight: 720;
  letter-spacing: -0.3px;
}

.modal .form-group input,
.modal .form-group textarea,
.modal .form-group select {
  border-color: #d8d5cf;
  border-radius: 10px;
  background: #fcfbf9;
}

.modal .form-group input:focus,
.modal .form-group textarea:focus {
  border-color: var(--customer-red);
  box-shadow: 0 0 0 3px rgba(211, 19, 58, 0.1);
}

.modal .btn-primary,
.my-reservations-query {
  background: var(--customer-red);
}

.modal .btn-primary:hover,
.my-reservations-query:hover {
  background: var(--customer-red-dark);
}

.checkout-summary,
.edit-reservation-product {
  border: 1px solid #dfdcd6;
  border-radius: 12px;
  background: #f3f1ed;
}

.my-reservation-card {
  border-color: var(--customer-line);
  border-radius: 14px;
  box-shadow: none;
}

/* 预约成功页：将内部唯一预约码作为顾客提货码展示 */
.success-container {
  position: relative;
  max-width: 440px;
  align-items: stretch;
  justify-content: flex-start;
  background: var(--customer-paper);
  padding: 34px 20px calc(28px + env(safe-area-inset-bottom));
  text-align: center;
}

.success-brand-mark {
  width: 54px;
  height: 5px;
  margin: 0 auto 24px;
  border-radius: 999px;
  background: var(--customer-red);
}

.success-icon {
  width: 58px;
  height: 58px;
  margin: 0 auto 14px;
  background: var(--customer-red);
  box-shadow: 0 8px 18px rgba(211, 19, 58, 0.2);
  font-size: 29px;
}

.success-eyebrow {
  margin: 0 0 5px;
  color: var(--customer-muted);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.4px;
}

.success-container h1 {
  color: var(--customer-ink);
  font-size: 25px;
  font-weight: 740;
  letter-spacing: -0.5px;
}

.success-container .subtitle {
  margin: 8px 0 18px;
  color: var(--customer-muted);
  font-size: 14px;
  line-height: 1.65;
}

.success-share-note {
  display: grid;
  gap: 3px;
  margin: 0 0 16px;
  padding: 13px 14px;
  border: 1px solid #d8d5cf;
  border-radius: 14px;
  background: #ffffff;
  text-align: left;
}

.success-share-note strong {
  color: var(--customer-ink);
  font-size: 14px;
}

.success-share-note span {
  color: var(--customer-muted);
  font-size: 12px;
  line-height: 1.55;
}

.pickup-code-list {
  display: grid;
  gap: 10px;
  width: 100%;
}

.pickup-code-card {
  padding: 15px;
  border: 1px solid #d9d5ce;
  border-radius: 16px;
  background: #ffffff;
  text-align: left;
  box-shadow: 0 5px 14px rgba(28, 26, 23, 0.04);
}

.pickup-code-card-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--customer-muted);
  font-size: 12px;
  font-weight: 650;
}

.pickup-code-status {
  color: var(--customer-red);
}

.pickup-code {
  display: block;
  margin: 7px 0 6px;
  color: var(--customer-ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 23px;
  font-weight: 750;
  letter-spacing: 1.2px;
  line-height: 1.2;
}

.pickup-product {
  color: var(--customer-muted);
  font-size: 13px;
  line-height: 1.45;
}

.success-container .reservation-detail {
  margin: 14px 0 0;
  border: 1px solid #e1ded8;
  border-radius: 14px;
  background: #f1efeb;
  text-align: left;
}

.success-container .reservation-detail .row {
  border-bottom-color: #dfdcd6;
}

.success-status {
  color: var(--customer-red);
}

.success-query-hint {
  margin: 14px 2px 16px;
  color: var(--customer-muted);
  font-size: 12px;
  line-height: 1.55;
  text-align: left;
}

.success-back-btn {
  display: flex;
  min-height: 58px;
  width: 100%;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: #d3133a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.1px;
  box-shadow: 0 8px 18px rgba(211, 19, 58, 0.25);
}

/* 顾客端关键确认动作使用独立组件，避免被通用按钮与弹窗样式覆盖。 */
.checkout-action-area {
  position: sticky;
  bottom: 0;
  z-index: 3;
  display: grid;
  gap: 10px;
  margin: 16px -24px -24px;
  padding: 14px 24px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid #e5e2dc;
  background: #ffffff;
  box-shadow: 0 -8px 18px rgba(28, 26, 23, 0.08);
}

.checkout-confirm-action,
.my-reservations-confirm-action {
  display: flex;
  width: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  background: #d3133a;
  color: #ffffff;
  font-size: 16px;
  font-weight: 750;
  letter-spacing: 0.1px;
  cursor: pointer;
  box-shadow: 0 7px 16px rgba(211, 19, 58, 0.24);
}

.checkout-confirm-action:active,
.my-reservations-confirm-action:active,
.success-back-btn:active {
  background: #a20f2d;
  transform: translateY(1px);
}

.checkout-back-action,
.legacy-lookup-action {
  display: flex;
  width: 100%;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid #d7d4ce;
  border-radius: 12px;
  background: #ffffff;
  color: #5d5a55;
  font-size: 14px;
  font-weight: 650;
  cursor: pointer;
}

.my-reservations-confirm-action {
  margin-top: 18px;
}

.legacy-lookup-action {
  margin-top: 10px;
}

.my-reservations-modal {
  display: flex;
  max-height: min(720px, calc(100vh - 32px));
  flex-direction: column;
}

.my-reservations-modal #my-reservations-search {
  flex: 0 0 auto;
}

/* 响应式 */
@media (max-width: 768px) {
  .admin-container {
    padding: 12px;
  }

  .form-row {
    flex-direction: column;
  }

  .reservation-table {
    overflow-x: auto;
  }

  .admin-header h1 {
    font-size: 18px;
  }
}

/* 每日上货：来源切换 */
.daily-source-switch {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
}

.daily-source-btn {
  flex: 1;
  padding: 12px 16px;
  border-radius: 10px;
  border: 1.5px solid var(--border);
  background: #fff;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  color: var(--text);
  text-align: center;
  transition: all 0.15s ease;
}

.daily-source-btn span {
  display: block;
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
  color: var(--text-secondary);
}

.daily-source-btn:hover {
  border-color: var(--primary);
}

.daily-source-btn.active {
  border-color: var(--primary);
  background: var(--primary);
  color: #fff;
}

.daily-source-btn.active span {
  color: rgba(255, 255, 255, 0.85);
}

/* ===== 今日完整图册 ===== */
.album-entry {
  display: block;
  width: calc(100% - 32px);
  margin: 12px auto 4px;
  padding: 13px 16px;
  border: 2px dashed var(--primary);
  border-radius: 10px;
  background: #fff;
  color: var(--primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s ease;
}

.album-entry:hover {
  background: var(--primary-light);
}

.album-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: rgba(0, 0, 0, 0.92);
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.album-overlay.active {
  display: flex;
}

.album-viewer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.album-stage {
  flex: 1;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: none;
  background: #111;
}

.album-stage img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  display: block;
  transform-origin: center;
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  will-change: transform;
}

.album-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  background: #1a1a1a;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.album-hint {
  color: rgba(255, 255, 255, 0.55);
  font-size: 12px;
  flex-shrink: 0;
}

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

.album-actions .btn {
  font-size: 13px;
  padding: 8px 12px;
  white-space: nowrap;
}
