/* ===== CSS Variables ===== */
:root {
  --color-primary: #7B4B2A;
  --color-primary-light: #A0683E;
  --color-primary-dark: #5C3820;
  --color-accent: #C9A87C;
  --color-accent-light: #E8D5B7;
  --color-accent-dark: #B89163;
  --color-pink: #D4A5A5;
  --color-pink-light: #F0D9D9;

  --color-bg: #FAF7F2;
  --color-surface: #FFFFFF;
  --color-surface-alt: #F5F0E8;
  --color-text: #2D1B0E;
  --color-text-secondary: #6B5B4F;
  --color-text-muted: #9A8B7E;
  --color-border: #E8DFD4;
  --color-border-light: #F0EAE0;

  --color-success: #5A8A5A;
  --color-success-bg: #E8F0E8;
  --color-warning: #D4925A;
  --color-warning-bg: #FBF0E6;
  --color-danger: #C0584E;
  --color-danger-bg: #F8E8E6;
  --color-info: #5A7A9A;
  --color-info-bg: #E8EFF5;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 1px 3px rgba(45, 27, 14, 0.06);
  --shadow-md: 0 4px 12px rgba(45, 27, 14, 0.08);
  --shadow-lg: 0 8px 28px rgba(45, 27, 14, 0.12);

  --header-h: 60px;
  --bottom-nav-h: 60px;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
}

/* ===== Reset ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  background: var(--color-bg);
  color: var(--color-text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; cursor: pointer; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
input, textarea, select { font-family: inherit; font-size: inherit; }
svg { display: block; }
img { max-width: 100%; display: block; }

/* ===== Layout ===== */
#app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  height: var(--header-h);
}
.header-content {
  max-width: 1200px;
  margin: 0 auto;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  gap: 16px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.logo-icon { color: var(--color-primary); }
.logo-text {
  font-size: 17px;
  font-weight: 700;
  color: var(--color-primary);
  letter-spacing: 0.5px;
}
.nav-menu {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  justify-content: center;
}
.nav-item {
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-item:hover { background: var(--color-surface-alt); color: var(--color-text); }
.nav-item.active {
  background: var(--color-primary);
  color: #fff;
}
.header-add-btn { flex-shrink: 0; }

.app-main {
  flex: 1;
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 24px;
  padding-bottom: calc(var(--bottom-nav-h) + 24px);
}

.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: var(--bottom-nav-h);
  background: var(--color-surface);
  border-top: 1px solid var(--color-border);
  z-index: 100;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.bottom-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: var(--color-text-muted);
  transition: color 0.2s;
}
.bottom-nav-item.active { color: var(--color-primary); }
.bottom-nav-item .nav-label { font-size: 10px; font-weight: 500; }

/* ===== Buttons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s;
  white-space: nowrap;
  border: 1px solid transparent;
}
.btn:active { transform: scale(0.97); }
.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); }
.btn-outline {
  background: transparent;
  border-color: var(--color-border);
  color: var(--color-text-secondary);
}
.btn-outline:hover { border-color: var(--color-primary); color: var(--color-primary); }
.btn-danger {
  background: var(--color-danger);
  color: #fff;
}
.btn-danger:hover { opacity: 0.9; }
.btn-ghost {
  background: transparent;
  color: var(--color-text-secondary);
  padding: 6px 12px;
}
.btn-ghost:hover { background: var(--color-surface-alt); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-block { width: 100%; }
.btn-icon {
  padding: 8px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.btn-icon:hover { background: var(--color-surface-alt); color: var(--color-text); }

/* ===== Cards ===== */
.card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.card-clickable { cursor: pointer; }
.card-clickable:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }

/* ===== Page Title ===== */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  flex-wrap: wrap;
  gap: 12px;
}
.page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--color-text);
}
.page-subtitle {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 2px;
}
.page-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

/* ===== Stats Cards (Dashboard) ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
}
.stat-card .stat-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 12px;
}
.stat-card .stat-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
}
.stat-card .stat-label {
  font-size: 13px;
  color: var(--color-text-muted);
  margin-top: 6px;
}

/* ===== Dashboard Layout ===== */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.section-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
}
.section-card .section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--color-border-light);
}
.section-card .section-title {
  font-size: 15px;
  font-weight: 600;
}
.section-card .section-body { padding: 16px 20px; }

/* ===== Calendar ===== */
.calendar {
  width: 100%;
}
.calendar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.calendar-month {
  font-size: 16px;
  font-weight: 600;
}
.calendar-nav {
  display: flex;
  gap: 4px;
}
.calendar-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.calendar-day-name {
  text-align: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--color-text-muted);
  padding: 4px 0;
}
.calendar-day {
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  cursor: pointer;
  position: relative;
  transition: background 0.15s;
}
.calendar-day:hover { background: var(--color-surface-alt); }
.calendar-day.other-month { color: var(--color-border); }
.calendar-day.today {
  background: var(--color-accent-light);
  font-weight: 700;
  color: var(--color-primary);
}
.calendar-day.has-event::after {
  content: '';
  position: absolute;
  bottom: 3px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--color-pink);
}
.calendar-day.today.has-event::after { background: var(--color-primary); }
.calendar-day.selected {
  background: var(--color-primary);
  color: #fff;
}
.calendar-day.selected.has-event::after { background: #fff; }

/* ===== Order List Items ===== */
.event-list { display: flex; flex-direction: column; gap: 10px; }
.event-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: var(--radius-md);
  background: var(--color-surface-alt);
  cursor: pointer;
  transition: background 0.15s;
}
.event-item:hover { background: var(--color-accent-light); }
.event-date {
  flex-shrink: 0;
  width: 48px;
  text-align: center;
}
.event-date .day {
  font-size: 20px;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}
.event-date .month {
  font-size: 11px;
  color: var(--color-text-muted);
}
.event-info { flex: 1; min-width: 0; }
.event-info .event-couple {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
.event-info .event-venue {
  font-size: 12px;
  color: var(--color-text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.event-status {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
}

/* ===== Status Badges ===== */
.badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.badge-confirmed { background: var(--color-success-bg); color: var(--color-success); }
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-completed { background: var(--color-info-bg); color: var(--color-info); }
.badge-cancelled { background: var(--color-danger-bg); color: var(--color-danger); }

/* ===== Season Badges ===== */
.season-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 10px;
  font-weight: 600;
}
.season-all { background: var(--color-surface-alt); color: var(--color-text-secondary); }
.season-spring { background: #E8F5E9; color: #2E7D32; }
.season-summer { background: #FFF3E0; color: #E68A00; }
.season-autumn { background: #FBE9E7; color: #BF5B16; }
.temp-cold { background: #E3F2FD; color: #1976D2; }
.temp-hot { background: #FFEBEE; color: #D84315; }
.temp-both { background: #E8F5E9; color: #388E3C; }
.season-winter { background: #E3F2FD; color: #1976D2; }

/* ===== Orders Page ===== */
.toolbar {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.search-box {
  flex: 1;
  min-width: 200px;
  position: relative;
}
.search-box input {
  width: 100%;
  padding: 9px 12px 9px 36px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 13px;
  outline: none;
  transition: border-color 0.2s;
}
.search-box input:focus { border-color: var(--color-primary); }
.search-box svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--color-text-muted);
}
.filter-select {
  padding: 9px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 13px;
  color: var(--color-text-secondary);
  outline: none;
  cursor: pointer;
}

.orders-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.order-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.order-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
}
.order-card-body { padding: 14px 18px; }
.order-couple {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
}
.order-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 10px;
}
.order-meta-item {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  color: var(--color-text-secondary);
}
.order-meta-item svg { flex-shrink: 0; color: var(--color-text-muted); }
.order-price {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===== Empty State ===== */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--color-text-muted);
}
.empty-state svg {
  margin: 0 auto 16px;
  color: var(--color-border);
}
.empty-state .empty-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 4px;
}
.empty-state .empty-desc {
  font-size: 13px;
}

/* ===== Forms ===== */
.form-group {
  margin-bottom: 16px;
}
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.form-label .required { color: var(--color-danger); }
.form-input,
.form-textarea,
.form-select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  font-size: 14px;
  color: var(--color-text);
  outline: none;
  transition: border-color 0.2s;
}
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
  border-color: var(--color-primary);
}
.form-textarea {
  resize: vertical;
  min-height: 80px;
  font-family: var(--font);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 12px;
}
.form-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 4px;
}

/* ===== Order Actions Bar & Receipt ===== */
.order-actions-bar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--color-border-light);
}
.confirm-order-summary {
  text-align: center;
  margin-bottom: 18px;
  padding: 18px 16px 14px;
  background: var(--color-bg-secondary, #F7F3ED);
  border-radius: 10px;
}
.confirm-order-names {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}
.receipt-preset-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}
.receipt-chip {
  font-size: 12px;
  color: #B98A54;
  background: rgba(185, 138, 84, 0.1);
  padding: 5px 12px;
  border-radius: 14px;
  cursor: pointer;
  transition: background 0.15s;
}
.receipt-chip:hover {
  background: rgba(185, 138, 84, 0.22);
}
.receipt-preview-wrap {
  margin-top: 14px;
  max-height: 420px;
  overflow-y: auto;
  border: 1px solid var(--color-border-light);
  border-radius: 10px;
  background: #EFE9DF;
  padding: 12px;
  display: flex;
  justify-content: center;
}
.receipt-preview-wrap canvas {
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 6px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}
.settings-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  cursor: pointer;
}

/* ===== Modal ===== */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(45, 27, 14, 0.4);
  z-index: 200;
  align-items: flex-start;
  justify-content: center;
  padding: 20px;
  overflow-y: auto;
}
.modal-overlay.show { display: flex; }
.modal-content {
  background: var(--color-surface);
  border-radius: var(--radius-xl);
  max-width: 600px;
  width: 100%;
  margin: 40px auto;
  box-shadow: var(--shadow-lg);
  animation: modalSlideIn 0.25s ease;
}
@keyframes modalSlideIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  z-index: 1;
}
.modal-title {
  font-size: 17px;
  font-weight: 700;
}
.modal-close {
  padding: 6px;
  border-radius: var(--radius-sm);
  color: var(--color-text-muted);
}
.modal-close:hover { background: var(--color-surface-alt); }
.modal-body {
  padding: 20px 24px;
  max-height: 60vh;
  overflow-y: auto;
}
.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid var(--color-border-light);
  position: sticky;
  bottom: 0;
  background: var(--color-surface);
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}
.modal-confirm { max-width: 380px; }
.modal-confirm .modal-body { text-align: center; padding: 28px 24px; }
.modal-confirm-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--color-danger-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  color: var(--color-danger);
}
.modal-confirm-text {
  font-size: 15px;
  color: var(--color-text);
  margin-bottom: 8px;
}
.modal-confirm-desc {
  font-size: 13px;
  color: var(--color-text-muted);
}

/* ===== Toast ===== */
.toast-container {
  position: fixed;
  top: 70px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}
.toast {
  background: var(--color-text);
  color: #fff;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}
@keyframes toastIn {
  from { opacity: 0; transform: translateY(-10px); }
  to { opacity: 1; transform: translateY(0); }
}
.toast.success { background: var(--color-success); }
.toast.error { background: var(--color-danger); }

/* ===== Showcase / Gallery ===== */
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.case-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  cursor: pointer;
  transition: box-shadow 0.2s, transform 0.2s;
}
.case-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.case-image {
  width: 100%;
  aspect-ratio: 4/3;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-pink-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.case-image .case-image-placeholder {
  font-size: 48px;
  opacity: 0.4;
}
.case-image .case-season-badge {
  position: absolute;
  top: 10px;
  right: 10px;
}
.case-body { padding: 14px 16px; }
.case-venue {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 4px;
}
.case-couple {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 8px;
}
.case-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.case-tag {
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
  background: var(--color-accent-light);
  color: var(--color-primary);
}

/* ===== Case Detail / Presentation ===== */
.case-detail {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.case-detail-hero {
  width: 100%;
  aspect-ratio: 16/9;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-pink-light));
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.case-detail-hero .hero-placeholder { font-size: 80px; opacity: 0.3; }
.case-detail-body { padding: 24px; }
.case-detail-title {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 8px;
}
.case-detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 16px 0;
  padding: 16px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
}
.case-detail-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.case-detail-meta-item .label {
  font-size: 11px;
  color: var(--color-text-muted);
}
.case-detail-meta-item .value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
}
.case-detail-section {
  margin-top: 20px;
}
.case-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--color-text);
}
.case-detail-section p {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.case-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.case-highlight-tag {
  padding: 4px 12px;
  border-radius: 16px;
  font-size: 12px;
  font-weight: 500;
  background: var(--color-accent-light);
  color: var(--color-primary);
}

/* ===== Menu Page ===== */
.menu-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--color-border-light);
}
.menu-tab {
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-muted);
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: all 0.2s;
  cursor: pointer;
}
.menu-tab:hover { color: var(--color-text); }
.menu-tab.active {
  color: var(--color-primary);
  border-bottom-color: var(--color-primary);
  font-weight: 600;
}

.packages-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
/* ===== Package Drink Scope (whitelist checkboxes in package form) ===== */
.pkg-scope {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 12px;
  background: var(--color-surface-alt);
}
/* ===== Drink Category Manager (类别管理弹窗) ===== */
.cat-mgr-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}
.cat-mgr-icon {
  width: 52px;
  flex-shrink: 0;
  text-align: center;
  font-size: 16px;
}
.cat-mgr-label { flex: 1; min-width: 0; }
.cat-mgr-type { width: 110px; flex-shrink: 0; }
.cat-mgr-btn {
  flex-shrink: 0;
  color: var(--color-text-secondary);
}
.cat-mgr-btn[disabled] { opacity: 0.35; cursor: not-allowed; }
.cat-mgr-del:hover { color: var(--color-danger, #e5484d); }

.pkg-scope-hint {
  font-size: 12px;
  color: var(--color-text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}
.pkg-scope-actions {
  display: flex;
  gap: 8px;
  margin-bottom: 10px;
}
.pkg-scope-group { margin-bottom: 12px; }
.pkg-scope-group:last-child { margin-bottom: 0; }
.pkg-scope-group-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  margin-bottom: 6px;
}
.pkg-cat-limit-wrap {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 500;
  flex-shrink: 0;
}
.pkg-cat-limit {
  font-size: 12px;
  padding: 2px 6px;
  border: 1px solid var(--color-border, #e0d6cc);
  border-radius: 6px;
  background: var(--color-surface, #fff);
  color: inherit;
  cursor: pointer;
}
.pkg-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 6px;
}
.pkg-scope-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 13px;
  color: var(--color-text-secondary);
  transition: border-color 0.15s, background 0.15s;
  user-select: none;
}
.pkg-scope-item.checked {
  border-color: var(--color-accent);
  background: rgba(201, 168, 124, 0.15);
  color: var(--color-text);
}
.pkg-scope-item input {
  margin: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
}
.pkg-scope-icon { font-size: 14px; flex-shrink: 0; }
.pkg-scope-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.package-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.package-card:hover { box-shadow: var(--shadow-md); }
.package-card.featured {
  border-color: var(--color-accent);
  border-width: 2px;
}
.package-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-pink-light));
}
.package-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.package-price {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary);
  margin-top: 4px;
}
.package-price .unit { font-size: 13px; font-weight: 400; color: var(--color-text-muted); }
.package-body { padding: 14px 18px; }
.package-features {
  list-style: none;
  margin-bottom: 12px;
}
.package-features li {
  font-size: 13px;
  color: var(--color-text-secondary);
  padding: 4px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}
.package-features li::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
  flex-shrink: 0;
}
.package-actions {
  display: flex;
  gap: 8px;
  padding: 0 18px 14px;
}

.menu-items-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.menu-item-card {
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  transition: box-shadow 0.2s;
}
.menu-item-card:hover { box-shadow: var(--shadow-md); }
.menu-item-card { user-select: none; -webkit-user-select: none; }
.menu-item-drag-handle {
  flex-shrink: 0;
  width: 22px;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: grab;
  color: var(--color-text-muted);
  font-size: 16px;
  line-height: 1;
  touch-action: none;
  border-radius: 4px;
}
.menu-item-drag-handle:hover { color: var(--color-primary); background: rgba(0,0,0,0.04); }
.menu-item-drag-handle:active { cursor: grabbing; }
.menu-item-card.menu-item-dragging { opacity: 0.35; }
.menu-item-drop-target { outline: 2px dashed var(--color-primary); outline-offset: 2px; }
.menu-item-drag-placeholder {
  border: 2px dashed var(--color-primary);
  border-radius: var(--radius-md);
  background: rgba(180, 130, 80, 0.06);
}
.menu-item-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--color-accent-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.menu-item-info { flex: 1; min-width: 0; }
.menu-item-name {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}
/* 饮品标签小徽章（畅销/上新） */
.menu-item-tag {
  display: inline-block;
  vertical-align: 2px;
  padding: 1px 6px;
  margin-left: 4px;
  border-radius: 8px;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.4;
  color: #fff;
}
.menu-item-tag.hot { background: #C2542E; }
.menu-item-tag.new { background: #7A9B5C; }
.menu-item-desc {
  font-size: 11px;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.menu-item-price {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}
.menu-item-actions {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* ===== Settings Page ===== */
.settings-section {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  margin-bottom: 16px;
  overflow: hidden;
}
.settings-section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
  font-size: 15px;
  font-weight: 600;
}
.settings-section-body { padding: 18px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.settings-row:last-child { border-bottom: none; }
.settings-row-label {
  font-size: 14px;
  font-weight: 500;
}
.settings-row-desc {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-top: 2px;
}

/* ===== Order Detail ===== */
.order-detail {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.order-detail-header {
  padding: 24px;
  background: linear-gradient(135deg, var(--color-accent-light), var(--color-pink-light));
}
.order-detail-couple {
  font-size: 24px;
  font-weight: 700;
  color: var(--color-primary-dark);
}
.order-detail-date {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-top: 4px;
}
.order-detail-body { padding: 24px; }
.order-detail-section { margin-bottom: 24px; }
.order-detail-section h4 {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.order-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.order-detail-field .field-label {
  font-size: 12px;
  color: var(--color-text-muted);
  margin-bottom: 3px;
}
.order-detail-field .field-value {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text);
}
.order-detail-notes {
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 14px;
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
}
.order-detail-price-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  margin-top: 8px;
}
.order-detail-price-box .price-label {
  font-size: 14px;
  color: var(--color-text-secondary);
}
.order-detail-price-box .price-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===== Back Button ===== */
.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  color: var(--color-text-secondary);
  font-size: 13px;
  font-weight: 500;
  margin-bottom: 16px;
  transition: background 0.15s;
}
.back-btn:hover { background: var(--color-surface-alt); }

/* ===== Presentation Mode ===== */
.presentation-mode {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #1a1a1a;
  z-index: 500;
  display: flex;
  flex-direction: column;
  padding: 40px;
  overflow-y: auto;
}
.presentation-mode .presentation-close {
  position: fixed;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}
.presentation-mode .presentation-content {
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
  color: #fff;
}
.presentation-mode .presentation-title {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
  text-align: center;
}
.presentation-mode .presentation-subtitle {
  font-size: 16px;
  color: rgba(255,255,255,0.6);
  text-align: center;
  margin-bottom: 32px;
}

/* ===== Recipe Cards ===== */
.recipes-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.recipe-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border-light);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.recipe-card:hover { box-shadow: var(--shadow-md); }
.recipe-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border-light);
}
.recipe-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.recipe-badge {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(180, 130, 80, 0.12);
  color: #96694a;
  white-space: nowrap;
}
.recipe-badge-muted { background: rgba(0,0,0,0.05); color: var(--color-text-muted); }
.recipe-badge-warn { background: rgba(217, 119, 6, 0.14); color: #b45309; cursor: help; }
.recipe-actions {
  display: flex;
  gap: 6px;
}
.recipe-body { padding: 16px 18px; }
.recipe-section { margin-bottom: 14px; }
.recipe-section:last-child { margin-bottom: 0; }
.recipe-section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 4px;
}
.recipe-section-content {
  font-size: 13px;
  color: var(--color-text-secondary);
  line-height: 1.7;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

/* ===== Prep Checklist ===== */
.prep-date-alert {
  background: var(--color-warning-bg);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  color: var(--color-warning);
  margin-bottom: 12px;
  font-weight: 600;
}
.prep-checklist {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.prep-checklist-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prep-checklist-group-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--color-text);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border-light);
}
.prep-checklist-items {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.prep-checklist-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--color-surface-alt);
  border-radius: var(--radius-md);
  font-size: 13px;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
}
.prep-checklist-item:hover { background: var(--color-accent-light); }
.prep-checklist-item input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--color-primary);
  cursor: pointer;
}
.prep-checklist-item input[type="checkbox"]:checked + span {
  text-decoration: line-through;
  color: var(--color-text-muted);
}
.prep-checklist-warn {
  background: var(--color-danger-bg);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 12px;
  color: var(--color-danger);
}

/* ===== Drink Selection Panel (Workbench Order Form) ===== */
.drink-selection-panel {
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 14px;
  background: var(--color-surface-alt);
}
.drink-selection-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  flex-wrap: wrap;
  gap: 8px;
}
.drink-selection-count {
  font-size: 12px;
  color: var(--color-text-muted);
}
.drink-selection-count strong {
  color: var(--color-primary);
  font-size: 14px;
}
.drink-selection-group {
  margin-bottom: 12px;
}
.drink-selection-group:last-child { margin-bottom: 0; }
.drink-group-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.drink-pick-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.drink-pick-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--color-surface);
}
.drink-pick-item:hover { border-color: var(--color-primary); }
.drink-pick-item.selected {
  border-color: var(--color-primary);
  background: var(--color-accent-light);
}
.drink-pick-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
.drink-pick-icon { font-size: 16px; }
.drink-pick-name {
  font-size: 12px;
  font-weight: 500;
  color: var(--color-text);
  word-break: keep-all;
}
.drink-pick-name .dn-line {
  display: block;
}
.drink-pick-series {
  font-size: 10px;
  color: var(--color-text-muted);
}
.drink-pick-check {
  font-size: 14px;
  font-weight: 700;
  color: var(--color-primary);
}

/* ===== Extra Cups Options (Workbench) ===== */
.extra-cups-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.extra-cups-option {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 12px;
  border: 1.5px solid var(--color-border);
  border-radius: 50px;
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-secondary);
  cursor: pointer;
  transition: all 0.15s;
  background: var(--color-surface);
}
.extra-cups-option:hover { border-color: var(--color-primary); }
.extra-cups-option.selected {
  border-color: var(--color-primary);
  background: var(--color-accent-light);
  color: var(--color-primary);
}
.extra-cups-option input[type="radio"] {
  display: none;
}

/* ===== Drink Detail Tags (Order Detail) ===== */
.drink-detail-group {
  margin-bottom: 14px;
}
.drink-detail-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text);
  margin-bottom: 6px;
}
.drink-detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.drink-detail-tag {
  padding: 4px 10px;
  background: var(--color-accent-light);
  color: var(--color-primary);
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

/* ===== Menu Items Grouped Section ===== */
.menu-category-section {
  margin-bottom: 20px;
}
.menu-category-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--color-border-light);
}
.menu-series-group {
  margin-bottom: 14px;
}
.menu-series-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .header-content { padding: 0 12px; }
  .nav-menu, .header-add-btn { display: none; }
  .logo-text { font-size: 15px; }
  .app-main { padding: 16px 12px; padding-bottom: calc(var(--bottom-nav-h) + 20px); }
  .bottom-nav { display: flex; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }

  .dashboard-grid { grid-template-columns: 1fr; }

  .showcase-grid { grid-template-columns: 1fr; }
  .packages-grid { grid-template-columns: 1fr; }
  .menu-items-grid { grid-template-columns: 1fr; }

  .order-detail-grid { grid-template-columns: 1fr; }

  .form-row, .form-row-3 { grid-template-columns: 1fr; }

  .page-title { font-size: 18px; }
  .toolbar { flex-direction: column; align-items: stretch; }
  .search-box { min-width: auto; }

  .modal-content { margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
  .modal-overlay { align-items: flex-end; padding: 0; }
  .modal-body { max-height: 50vh; }

  .order-meta { gap: 10px; }
  .order-detail-header { padding: 18px; }
  .order-detail-couple { font-size: 20px; }
  .order-detail-body { padding: 18px; }
}

@media (max-width: 480px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .calendar-day { font-size: 11px; }
  .order-card-header { flex-direction: column; align-items: flex-start; gap: 8px; }
  .recipes-list { grid-template-columns: 1fr; }
  .drink-pick-list { gap: 4px; }
  .drink-pick-item { padding: 5px 8px; }
}

/* ===== Utility ===== */
.hidden { display: none !important; }
.text-center { text-align: center; }
.text-muted { color: var(--color-text-muted); }
.text-primary { color: var(--color-primary); }
.font-bold { font-weight: 700; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-8 { margin-bottom: 8px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.gap-16 { gap: 16px; }
.flex-wrap { flex-wrap: wrap; }

/* ===== Case Image Upload ===== */
.image-upload-area { display: flex; flex-direction: column; gap: 12px; }
.image-preview-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  transition: outline-color 0.15s, background 0.15s;
  outline: 2px solid transparent;
  outline-offset: 4px;
  border-radius: 8px;
  padding: 2px;
}
.image-preview-list.drop-active {
  outline-color: rgba(215, 168, 110, 0.4);
  background: rgba(215, 168, 110, 0.03);
}
.image-preview-item {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 10px;
  overflow: visible;
  box-shadow: 0 1px 8px rgba(0,0,0,0.1);
  background: #F5F0EB;
  transition: transform 0.15s ease, opacity 0.15s ease;
}
.image-preview-item > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  pointer-events: none;
}
.image-order-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  min-width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(215, 168, 110, 0.9);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  z-index: 3;
  pointer-events: none;
}
.image-preview-item.draggable { cursor: grab; }
.image-preview-item.draggable:active { cursor: grabbing; }
.image-preview-item.dragging { opacity: 0.2; transform: scale(0.88); }

/* Drop indicators — absolute positioned, no layout shift = no jitter */
.image-preview-item.drop-before::before,
.image-preview-item.drop-after::after {
  content: '';
  position: absolute;
  top: -4px;
  bottom: -4px;
  width: 5px;
  border-radius: 3px;
  background: #D7A86E;
  z-index: 10;
  box-shadow: 0 0 8px rgba(215, 168, 110, 0.6);
}
.image-preview-item.drop-before::before { left: -9px; }
.image-preview-item.drop-after::after { right: -9px; }

/* Drag handle hint */
.image-drag-handle {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-size: 14px;
  font-weight: bold;
  letter-spacing: -2px;
  background: rgba(0,0,0,0.5);
  padding: 0 6px;
  border-radius: 4px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
  z-index: 3;
}
.image-preview-item:hover .image-drag-handle { opacity: 0.7; }

/* Arrow buttons for reordering */
.image-arrow-btn {
  position: absolute;
  bottom: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 16px;
  font-weight: bold;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
  border: none;
  cursor: pointer;
  z-index: 4;
}
.image-arrow-left { left: 4px; }
.image-arrow-right { right: 4px; }
.image-preview-item:hover .image-arrow-btn { opacity: 1; }
.image-arrow-btn:hover:not(:disabled) {
  background: rgba(215, 168, 110, 0.95);
  transform: scale(1.15);
}
.image-arrow-btn:disabled { opacity: 0.25 !important; cursor: not-allowed; }

/* Preview button */
.image-preview-btn {
  position: absolute;
  top: 4px;
  right: 30px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 11px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  opacity: 0;
  border: none;
  cursor: pointer;
  z-index: 3;
}
.image-preview-item:hover .image-preview-btn { opacity: 1; }
.image-preview-btn:hover { background: rgba(215, 168, 110, 0.9); transform: scale(1.1); }

/* Remove button */
.image-remove-btn {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(0,0,0,0.6);
  color: #fff;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
  z-index: 3;
}
.image-remove-btn:hover { background: rgba(220,53,69,0.9); transform: scale(1.1); }

/* ===== Floating Drag Preview ===== */
.drag-float-preview {
  position: fixed;
  z-index: 99999;
  pointer-events: none;
  transform: translate(-50%, -50%);
  opacity: 0.85;
}
.drag-float-preview img {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.35);
  border: 3px solid #D7A86E;
}
.image-upload-btn {
  border: 2px dashed #D5C4B0;
  border-radius: 12px;
  padding: 24px;
  text-align: center;
  cursor: pointer;
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: #8B6F5E;
}
.image-upload-btn:hover { border-color: #D7A86E; background: #FFF8F0; color: #D7A86E; }
.upload-icon { font-size: 28px; }
.upload-hint { font-size: 12px; color: #B0A098; }

/* ===== Case Form Footer ===== */
.case-form-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  width: 100%;
}
.case-form-hint {
  font-size: 12px;
  color: #D7A86E;
  background: rgba(215, 168, 110, 0.1);
  padding: 6px 12px;
  border-radius: 6px;
}
.case-form-actions {
  display: flex;
  gap: 10px;
}

/* ===== Case Card Image ===== */
.case-image-photo { width: 100%; height: 100%; object-fit: cover; }
.case-image-count {
  position: absolute;
  bottom: 8px;
  right: 8px;
  padding: 3px 10px;
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-radius: 50px;
  font-size: 12px;
  backdrop-filter: blur(4px);
}

/* ===== Case Gallery ===== */
.case-gallery {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}
.case-gallery-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 0;
}
.case-gallery-slide.active { opacity: 1; z-index: 1; }
.case-gallery-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  cursor: zoom-in;
}
.gallery-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(0,0,0,0.4);
  color: #fff;
  font-size: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  z-index: 2;
}
.gallery-arrow:hover { background: rgba(0,0,0,0.7); }
.gallery-prev { left: 12px; }
.gallery-next { right: 12px; }
.gallery-dots {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 6px;
  z-index: 2;
}
.gallery-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.2s;
}
.gallery-dot.active { background: #fff; width: 24px; border-radius: 4px; }
.gallery-counter {
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.5);
  color: #fff;
  border-radius: 50px;
  font-size: 13px;
  z-index: 2;
}

/* ===== Image Viewer (Full Screen) ===== */
.image-viewer-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
  cursor: zoom-out;
}
.image-viewer-img {
  max-width: 92%;
  max-height: 88%;
  object-fit: contain;
  border-radius: 8px;
}
.image-viewer-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.15);
  color: #fff;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}
.image-viewer-close:hover { background: rgba(255,255,255,0.3); }

/* ===== Image Focus Badge ===== */
.image-focus-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  font-size: 13px;
  z-index: 2;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

/* ===== Crop Editor Modal ===== */
.crop-editor-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.75);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10001;
  animation: fadeIn 0.25s ease;
  padding: 20px;
}
.crop-editor-modal {
  background: #fff;
  border-radius: 16px;
  max-width: 900px;
  width: 100%;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}
.crop-editor-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid #F0E8E0;
  font-size: 16px;
  font-weight: 600;
  color: #3E2723;
}
.crop-editor-close {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #F5F0EB;
  border: none;
  font-size: 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.crop-editor-close:hover { background: #E8DDD3; }
.crop-editor-body {
  padding: 20px 24px;
  display: flex;
  gap: 24px;
}
.crop-editor-left {
  flex: 1;
  min-width: 0;
}
.crop-editor-right {
  width: 280px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.crop-editor-label {
  font-size: 13px;
  font-weight: 600;
  color: #6D4C41;
  margin-bottom: 8px;
}
.crop-editor-canvas {
  position: relative;
  width: 100%;
  border-radius: 10px;
  background: #1a1a1a;
  user-select: none;
  -webkit-user-select: none;
  overflow: hidden;
  isolation: isolate;
}
.crop-editor-canvas img {
  width: 100%;
  height: auto;
  display: block;
  pointer-events: none;
}
.crop-box {
  position: absolute;
  border: 2px solid #D7A86E;
  cursor: move;
  box-shadow: 0 0 0 9999px rgba(0,0,0,0.5);
  z-index: 2;
}
.crop-box-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(to right, rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.3) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.3) 1px, transparent 1px);
  background-size: 33.33% 100%, 66.66% 100%, 100% 33.33%, 100% 66.66%;
  background-repeat: no-repeat;
  background-position: 0 0, 0 0, 0 0, 0 0;
}
.crop-editor-hint {
  margin-top: 8px;
  font-size: 12px;
  color: #8D6E63;
  text-align: center;
}
.crop-preview-section { display: flex; flex-direction: column; gap: 6px; }
.crop-preview-label {
  font-size: 12px;
  font-weight: 600;
  color: #6D4C41;
  display: flex;
  align-items: center;
  gap: 6px;
}
.crop-preview-ratio {
  background: #F5E6D3;
  color: #8B6F5E;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
}
.crop-preview-crop {
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #E8DDD3;
}
.crop-preview-crop img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.crop-16-9 { aspect-ratio: 16/9; }
.crop-4-3 { aspect-ratio: 4/3; }
.crop-editor-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px;
  border-top: 1px solid #F0E8E0;
}

@media (max-width: 600px) {
  .image-preview-item { width: 80px; height: 80px; }
  .gallery-arrow { width: 32px; height: 32px; font-size: 20px; }
  .crop-editor-modal { max-width: 100%; border-radius: 12px; }
  .crop-editor-body { flex-direction: column; padding: 16px; gap: 16px; }
  .crop-editor-right { width: 100%; }
}

/* 案例排序按钮（case-order-ctrl 覆盖在图片区顶部左侧） */
.case-order-ctrl {
  position: absolute;
  top: 10px;
  left: 10px;
  display: flex;
  gap: 6px;
  z-index: 2;
}
.case-order-ctrl .order-btn {
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #8B6F5E;
  font-size: 18px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(44, 24, 16, 0.18);
  transition: all 0.2s;
  padding: 0 0 2px 0;
}
.case-order-ctrl .order-btn:hover:not(:disabled) { background: #D7A86E; color: #fff; transform: scale(1.08); }
.case-order-ctrl .order-btn:disabled { opacity: 0.35; cursor: default; }

/* ===== 订单饮品冷/热选择（代客下单面板） ===== */
.drink-pick-item.has-temp-choose {
  flex-wrap: wrap;
}
.drink-pick-item.has-temp-choose .drink-pick-name {
  flex: 1;
}
.drink-temp-choose {
  width: 100%;
  display: flex;
  gap: 6px;
  margin-top: 4px;
}
.dtc-btn {
  flex: 1;
  padding: 3px 0;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
  color: var(--color-text-secondary);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  line-height: 1.2;
}
.dtc-btn:hover { border-color: var(--color-primary); }
.dtc-btn.active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #fff;
}
.drink-pick-item.temp-pending .drink-temp-choose {
  border: 1px dashed var(--color-border);
  border-radius: 10px;
  padding: 2px;
}
.drink-pick-item:not(.selected) .drink-temp-choose { display: none; }

/* ===== 成本核算（20260916a）===== */
.rcp-ing-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  flex-wrap: wrap;
}
.rcp-ing-row select:first-child { flex: 1; min-width: 120px; }
.rcp-ing-unit {
  font-size: 13px;
  color: var(--color-text-muted);
  min-width: 26px;
  text-align: center;
}
.stock-stepper {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  padding: 2px;
  background: var(--color-surface);
}
.stock-stepper input {
  width: 46px;
  border: none;
  text-align: center;
  font-size: 14px;
  padding: 2px 0;
  background: transparent;
  -moz-appearance: textfield;
}
.stock-stepper input::-webkit-outer-spin-button,
.stock-stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.stepper-btn {
  width: 26px;
  height: 26px;
  border: none;
  border-radius: 8px;
  background: var(--color-surface-alt);
  color: var(--color-primary);
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  line-height: 1;
}
.stepper-btn:hover { background: var(--color-warning-bg); }
.calc-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-bottom: 1px solid var(--color-border-light);
}
.calc-row:last-child { border-bottom: none; }
.calc-row-name { flex: 1; font-size: 14px; }
.cost-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.cost-table th, .cost-table td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--color-border-light);
}
.cost-table th {
  color: var(--color-text-muted);
  font-weight: 600;
  font-size: 12px;
  background: var(--color-surface-alt);
}
.cost-stats-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--color-text-muted);
}
.cost-stats-row strong { color: var(--color-text); font-size: 14px; }
.ing-warn {
  background: var(--color-warning-bg);
  color: #9a6b2a;
  font-size: 13px;
  border-radius: 8px;
  padding: 8px 12px;
}
.ing-ok {
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 13px;
  border-radius: 8px;
  padding: 8px 12px;
}
.ing-warn-badge {
  display: inline-block;
  background: #FFF3D6;
  color: #9a6b2a;
  font-size: 11px;
  border-radius: 6px;
  padding: 1px 6px;
  margin-left: 4px;
}
.ing-cost {
  display: inline-block;
  background: var(--color-success-bg);
  color: var(--color-success);
  font-size: 12px;
  border-radius: 6px;
  padding: 1px 8px;
  margin-left: 8px;
  font-weight: 600;
}


/* ===== 推荐单生成器（20260921d）===== */
.rec-list-hint {
  background: #F7F3EC;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  color: #8B6F4E;
  margin-bottom: 14px;
  line-height: 1.6;
}
.rec-list { display: flex; flex-direction: column; gap: 10px; }
.rec-list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  background: var(--color-bg-card, #fff);
  border: 1px solid var(--color-border, #eee);
  border-radius: 12px;
  padding: 14px 16px;
}
.rec-list-main { flex: 1; min-width: 0; }
.rec-list-title { font-size: 14.5px; font-weight: 600; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rec-list-sub { font-size: 12.5px; color: var(--color-text-muted, #999); margin-top: 5px; }
.rec-list-note { font-size: 12.5px; color: #8B6F4E; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rec-list-actions { display: flex; gap: 6px; flex-shrink: 0; }
.rec-fixed-tags {
  font-size: 12.5px;
  color: #8B6F4E;
  background: #F7F3EC;
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  line-height: 1.9;
}
.rec-fixed-tag {
  display: inline-block;
  background: #fff;
  border: 1px solid #E3CBA4;
  border-radius: 999px;
  padding: 1px 10px;
  margin: 0 4px 2px 0;
}
.rec-reason-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.rec-reason-name {
  flex-shrink: 0;
  width: 128px;
  font-size: 13px;
  color: var(--color-text, #333);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rec-reason-row .form-input { flex: 1; }
