:root {
  --ink: #1a1a1a;
  --muted: #9ca3af;
  --accent: #f472b6;
  --accent-dark: #e85d75;
  --line: #f0f0f0;
  --bg: #f5f5f7;
  --card: #fff;
  --wkend: #ef4444;
  --nav-h: 52px;
  --header-h: 52px;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang TC", "Helvetica Neue", sans-serif;
  background: var(--bg); color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}
.hidden { display: none !important; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.5; }

/* 登入 */
.login-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.login-card { background: var(--card); border-radius: 20px; padding: 36px 28px; width: 100%; max-width: 380px; box-shadow: 0 4px 24px rgba(0,0,0,.06); }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
.login-hint { font-size: 12px; color: var(--muted); margin-top: 16px; text-align: center; }
.privacy-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 12px; color: var(--muted); margin: 12px 0 16px; line-height: 1.5; cursor: pointer; }
.privacy-consent input { margin-top: 3px; flex-shrink: 0; accent-color: var(--accent); }
.label { font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; display: block; }
.input { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; font-size: 15px; margin-bottom: 14px; background: #fafafa; }
.btn { width: 100%; padding: 14px; background: var(--accent-dark); color: #fff; border: none; border-radius: 12px; font-size: 15px; font-weight: 600; cursor: pointer; }
.btn-secondary { padding: 10px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; }
.text-btn { background: none; border: none; color: var(--accent-dark); font-size: 14px; font-weight: 600; cursor: pointer; }
.text-btn.danger { color: #dc2626; }
.textarea { resize: vertical; min-height: 72px; font-family: inherit; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.checkbox-label { display: flex; align-items: flex-start; gap: 8px; font-size: 13px; margin: 10px 0; cursor: pointer; }
.checkbox-label input { margin-top: 3px; }
.btn-small { width: auto; padding: 8px 14px; font-size: 13px; }

/* 手機 App Shell */
.mob-app {
  display: flex; flex-direction: column;
  min-height: 100vh; min-height: 100dvh;
  max-width: 480px; margin: 0 auto;
  background: var(--card);
  position: relative;
}
.mob-header {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; padding-top: max(8px, env(safe-area-inset-top));
  height: var(--header-h); border-bottom: 1px solid var(--line);
  background: var(--card); position: sticky; top: 0; z-index: 50;
  flex-shrink: 0;
}
.mob-header-back {
  background: none; border: none; font-size: 28px; line-height: 1;
  color: var(--ink); cursor: pointer; padding: 0 4px; flex-shrink: 0;
}
.mob-header-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; cursor: pointer; }
.mob-shop-avatar {
  width: 36px; height: 36px; border-radius: 10px; background: #fce7f3;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.mob-shop-name { font-size: 15px; font-weight: 700; color: var(--accent-dark); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mob-shop-id { font-size: 11px; color: var(--muted); }
.mob-header-title { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
.mob-header-actions { display: flex; gap: 4px; flex-shrink: 0; }
.mob-icon-btn {
  background: none; border: none; font-size: 20px; color: var(--ink);
  width: 36px; height: 36px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.mob-main { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 12px); }
body.mob-home .mob-main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 72px); }
.page { display: none; padding: 0 12px 16px; }
.page.active { display: block; }
.page-home { padding-top: 4px; }
.page-sub { padding-top: 8px; }
.page-overlay {
  position: fixed; inset: 0; z-index: 110; background: var(--bg);
  padding: 0; overflow-y: auto; padding-bottom: calc(var(--safe-b) + 16px);
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
}
.page-overlay.active { display: block; }
.overlay-toolbar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; background: var(--card); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 2;
  padding-top: max(12px, env(safe-area-inset-top));
}
.overlay-toolbar h2 { flex: 1; font-size: 17px; font-weight: 700; text-align: center; }
.overlay-close { background: none; border: none; font-size: 28px; color: var(--muted); cursor: pointer; line-height: 1; }
.overlay-sub { padding: 8px 16px 0; font-size: 12px; }

/* 底部六欄導覽（夯客風格） */
.mob-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px;
  display: flex; align-items: stretch;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: var(--card); border-top: 1px solid var(--line);
  z-index: 90;
}
.mob-nav-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; border: none; background: none; cursor: pointer;
  color: #9ca3af; font-size: 10px; font-weight: 600;
  padding: 6px 2px; position: relative;
  transition: color .15s;
}
.mob-nav-item.active { color: var(--accent-dark); }
.mob-nav-ico { font-size: 20px; line-height: 1; }
.mob-nav-label { line-height: 1.2; }
.mob-nav-badge {
  position: absolute; top: 4px; right: calc(50% - 22px);
  min-width: 16px; height: 16px; border-radius: 8px;
  background: #ef4444; color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; padding: 0 4px;
}
.mob-nav-dot {
  position: absolute; top: 6px; right: calc(50% - 18px);
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444;
}

/* ＋號快捷選單 */
.fab-speed-menu {
  position: fixed; inset: 0; z-index: 95;
  pointer-events: none; opacity: 0;
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
  transition: opacity .2s ease;
}
.fab-speed-menu.open { pointer-events: auto; opacity: 1; }
.fab-speed-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.22); }
.fab-speed-stack {
  position: absolute; right: 16px;
  bottom: calc(var(--nav-h) + var(--safe-b) + 72px);
  display: flex; flex-direction: column; align-items: flex-end; gap: 10px;
}
.fab-speed-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 16px 10px 12px;
  background: var(--card); border: none; border-radius: 24px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12);
  font-size: 14px; font-weight: 600; color: var(--accent-dark);
  cursor: pointer; white-space: nowrap;
  transform: translateY(8px); opacity: 0;
  transition: transform .2s ease, opacity .2s ease;
}
.fab-speed-menu.open .fab-speed-item { transform: translateY(0); opacity: 1; }
.fab-speed-menu.open .fab-speed-item:nth-child(1) { transition-delay: .03s; }
.fab-speed-menu.open .fab-speed-item:nth-child(2) { transition-delay: .06s; }
.fab-speed-menu.open .fab-speed-item:nth-child(3) { transition-delay: .09s; }
.fab-speed-menu.open .fab-speed-item:nth-child(4) { transition-delay: .12s; }
.fab-speed-item:active { transform: scale(0.97); }
.fab-speed-ico { font-size: 16px; }

/* 更多：格狀功能彈窗 */
.more-grid-sheet {
  position: fixed; inset: 0; z-index: 96;
  display: flex; align-items: flex-end; justify-content: center;
  pointer-events: none; opacity: 0;
  padding: 16px; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
  transition: opacity .22s ease;
}
.more-grid-sheet.open { pointer-events: auto; opacity: 1; }
.more-grid-backdrop {
  position: absolute; inset: 0; background: rgba(0,0,0,.35);
}
.more-grid-panel {
  position: relative; z-index: 1; width: 100%;
  background: var(--card); border-radius: 20px;
  padding: 16px 12px 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  transform: translateY(24px);
  transition: transform .28s cubic-bezier(.32,.72,0,1);
}
.more-grid-sheet.open .more-grid-panel { transform: translateY(0); }
.more-grid-section {
  display: grid; gap: 4px 8px; padding: 4px 0;
}
.more-grid-cols-2 { grid-template-columns: repeat(2, 1fr); }
.more-grid-cols-4 { grid-template-columns: repeat(4, 1fr); }
.more-grid-span-2 { grid-column: span 2; }
.more-grid-divider { height: 1px; background: var(--line); margin: 8px 4px; }
.more-grid-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; padding: 12px 4px; border: none; background: none;
  border-radius: 12px; cursor: pointer; min-height: 72px;
  font-size: 11px; font-weight: 600; color: var(--ink); text-align: center; line-height: 1.25;
}
.more-grid-item:active { background: #f9fafb; }
.more-grid-icon { font-size: 22px; line-height: 1; }
.more-grid-footer {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 12px;
}
.more-grid-foot-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 12px; border-radius: 14px; border: none; font-size: 14px; font-weight: 600;
  cursor: pointer;
}
.more-grid-foot-btn.manual { background: #eff6ff; color: #2563eb; }
.more-grid-foot-btn.tour { background: #fdf2f8; color: var(--accent-dark); }
.more-grid-item.hidden-feature { display: none !important; }

/* 全屏功能頁 Overlay */
.page-feature-overlay {
  position: fixed; inset: 0; z-index: 100;
  display: none; flex-direction: column;
  background: var(--bg);
  max-width: 480px; margin: 0 auto; left: 0; right: 0;
  overflow: hidden;
}
.page-feature-overlay.open { display: flex; }
#page-settings-form.open,
#page-booking-settings.open { z-index: 105; }

.hc-overlay-head {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--card); border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}
.hc-overlay-head h2 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; }
.hc-close {
  background: none; border: none; font-size: 28px; line-height: 1;
  color: var(--ink); cursor: pointer; padding: 0 4px; width: 36px;
}
.hc-head-spacer { width: 36px; flex-shrink: 0; }
.hc-head-tag {
  font-size: 11px; color: var(--muted); background: #f3f4f6;
  padding: 4px 8px; border-radius: 8px; flex-shrink: 0;
}
.hc-head-action {
  background: none; border: none; font-size: 20px; color: var(--ink);
  width: 36px; height: 36px; cursor: pointer;
}
.hc-overlay-body {
  flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 12px 16px calc(16px + var(--safe-b));
}

.hc-store-card {
  display: flex; align-items: center; gap: 12px;
  background: var(--card); border-radius: 14px; padding: 14px;
  margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.hc-store-icon {
  width: 44px; height: 44px; border-radius: 12px; background: #fce7f3;
  display: flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0;
  overflow: hidden;
}
.hc-store-info { flex: 1; min-width: 0; }
.hc-store-info strong { display: block; font-size: 16px; font-weight: 700; }
.hc-store-gear {
  background: none; border: none; font-size: 18px; color: var(--muted); cursor: pointer; padding: 8px;
}
.hc-search {
  width: 100%; padding: 12px 14px; border: none; border-radius: 12px;
  background: #f3f4f6; font-size: 15px; margin-bottom: 16px;
}
.hc-section-label {
  font-size: 12px; font-weight: 600; color: var(--muted);
  margin: 4px 4px 8px;
}
.hc-menu-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
}
.hc-menu-row {
  display: flex; align-items: center; gap: 12px; width: 100%;
  padding: 14px 14px; border: none; background: none; cursor: pointer; text-align: left;
  border-bottom: 1px solid var(--line);
}
.hc-menu-row:last-child { border-bottom: none; }
.hc-menu-row:active { background: #f9fafb; }
.hc-menu-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.hc-menu-icon.teal { background: #ccfbf1; }
.hc-menu-icon.pink { background: #fce7f3; }
.hc-menu-icon.green { background: #dcfce7; }
.hc-menu-icon.gray { background: #f3f4f6; }
.hc-menu-icon.orange { background: #ffedd5; }
.hc-menu-icon.blue { background: #dbeafe; }
.hc-menu-text { flex: 1; min-width: 0; }
.hc-menu-text strong { display: block; font-size: 15px; font-weight: 600; color: var(--ink); }
.hc-menu-text span { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }
.hc-menu-chevron { color: #d1d5db; font-size: 18px; flex-shrink: 0; }
.hc-tip-banner {
  background: #f5f3ff; border-radius: 12px; padding: 12px 14px;
  font-size: 13px; color: var(--muted); line-height: 1.5; margin-bottom: 12px;
}
.hc-back-cal { margin-top: 20px; width: 100%; }
.hc-quick-actions { display: flex; gap: 8px; margin-bottom: 12px; flex-wrap: nowrap; overflow-x: auto; }
.hc-quick-chip {
  display: inline-flex; align-items: center; gap: 6px;
  flex-shrink: 0;
  padding: 8px 12px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer;
}
.hc-quick-ico { font-size: 14px; }
.hc-stats-row { display: flex; gap: 8px; }
.hc-overlay-body .members-search:not(.hidden) { display: block; margin-bottom: 12px; }
.hc-menu-row.hidden-feature { display: none !important; }

/* FAB */
.mob-fab {
  position: fixed; bottom: calc(var(--nav-h) + var(--safe-b) + 12px);
  right: max(16px, calc(50% - 240px + 16px));
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent-dark); color: #fff; border: none;
  font-size: 32px; line-height: 1; cursor: pointer;
  box-shadow: 0 4px 16px rgba(232,93,117,.45); z-index: 88;
  display: flex; align-items: center; justify-content: center;
  transition: transform .2s;
}
body.fab-speed-open .mob-fab { transform: rotate(45deg); }
.mob-fab.hidden { display: none !important; }

.mob-tour-pill {
  position: fixed;
  right: 76px;
  bottom: calc(62px + env(safe-area-inset-bottom, 0px));
  z-index: 48;
  border: 1.5px solid #f9a8d4;
  background: #fff;
  color: #db2777;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 14px rgba(0,0,0,.08);
  cursor: pointer;
}
body.mob-home .mob-tour-pill { display: block; }
body:not(.mob-home) .mob-tour-pill { display: none; }

.hc-report-toolbar {
  padding: 10px 14px 6px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.hc-report-toolbar.hidden { display: none; }
.hc-report-range {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
  font-size: 13px;
  color: var(--muted);
}
.hc-report-range-val {
  background: #f3f4f6;
  border-radius: 8px;
  padding: 8px 10px;
  flex: 1;
  text-align: center;
}
.hc-report-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 6px;
}
.hc-report-chip {
  flex-shrink: 0;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
}
.hc-report-chip.active {
  border-color: #f472b6;
  color: #db2777;
  background: #fff5f9;
}
.hc-report-filter { margin-top: 8px; }
.hc-report-filter .input { margin: 0; font-size: 13px; }

.hc-cashflow-date-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.hc-cashflow-date {
  flex: 1;
  border: none;
  background: #f3f4f6;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.hc-cashflow-today {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  cursor: pointer;
}

.hc-kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding: 14px;
}
.hc-kpi-card {
  background: #fff;
  border-radius: 12px;
  padding: 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hc-kpi-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.hc-kpi-value { font-size: 22px; font-weight: 700; }
.hc-kpi-value.accent { color: #db2777; }
.hc-kpi-sub { font-size: 11px; color: var(--muted); margin-top: 4px; }

.hc-report-section {
  margin: 0 14px 16px;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
}
.hc-report-section h3 { font-size: 14px; margin: 0 0 10px; }
.hc-report-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}
.hc-report-row.total strong { color: #2563eb; }
.hc-report-hint {
  padding: 12px 16px 0;
  font-size: 12px;
  color: var(--muted);
}

.hc-rank-table { font-size: 13px; }
.hc-rank-head, .hc-rank-row {
  display: grid;
  grid-template-columns: 48px 1fr 56px;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
}
.hc-rank-head { color: var(--muted); font-size: 12px; }

.hc-placeholder-card {
  margin: 16px;
  padding: 24px 16px;
  background: #fff;
  border-radius: 12px;
  text-align: center;
}

.hc-choice-modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.hc-choice-modal.hidden { display: none; }
.hc-manual-panel { max-height: 85vh; display: flex; flex-direction: column; }
.hc-manual-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.hc-manual-head h3 { margin: 0; font-size: 17px; }
.hc-manual-body { overflow-y: auto; font-size: 14px; line-height: 1.55; }
.hc-manual-body section { margin-bottom: 16px; }
.hc-manual-body h4 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.hc-manual-body ol, .hc-manual-body ul { padding-left: 20px; margin: 0; }
.hc-manual-body li { margin-bottom: 6px; }
.hc-manual-body code { font-size: 12px; background: #f3f4f6; padding: 1px 5px; border-radius: 4px; }
.hc-manual-note { font-size: 12px; margin-top: 8px; }
.hc-choice-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.hc-choice-panel {
  position: relative;
  background: #fff;
  border-radius: 16px;
  padding: 20px 16px;
  width: min(360px, 100%);
  max-height: 90vh;
  overflow-y: auto;
}
.hc-choice-panel h3 { text-align: center; margin: 0 0 14px; font-size: 16px; }
.hc-choice-card {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 10px;
  background: #fff;
  cursor: pointer;
}
.hc-choice-card strong { display: block; margin-bottom: 6px; }
.hc-choice-formula { display: block; color: #db2777; font-size: 13px; margin-bottom: 6px; }
.hc-choice-icon { font-size: 22px; display: block; margin-bottom: 8px; }

.hc-svc-wrap { padding: 0 0 20px; }
.hc-svc-add {
  display: block;
  width: calc(100% - 28px);
  margin: 12px 14px;
  padding: 12px;
  border: none;
  background: transparent;
  color: #2563eb;
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}
.hc-svc-list { background: #fff; margin: 0 14px; border-radius: 12px; overflow: hidden; }
.hc-svc-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.hc-svc-del {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: none;
  background: #fee2e2;
  color: #dc2626;
  cursor: pointer;
  flex-shrink: 0;
}
.hc-svc-info { flex: 1; min-width: 0; }
.hc-svc-info strong { display: block; font-size: 15px; }
.hc-svc-edit { border: none; background: none; font-size: 16px; color: var(--muted); cursor: pointer; }

.hc-inv-tab {
  display: inline-block;
  margin: 12px 14px 8px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fce7f3;
  color: #db2777;
  font-size: 13px;
  font-weight: 600;
}
.hc-inv-list { padding: 0 14px 16px; }
.hc-inv-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  text-align: left;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
  cursor: pointer;
}
.hc-inv-card.warn { border: 1px solid #fecaca; }
.hc-inv-ico { font-size: 20px; color: #db2777; }
.hc-inv-stock { font-size: 12px; color: var(--muted); margin-top: 2px; }
.hc-inv-stock.neg { color: #dc2626; }

.hc-ob-add {
  display: block;
  width: calc(100% - 28px);
  margin: 12px 14px;
  padding: 12px;
  border: 1.5px solid #2563eb;
  border-radius: 10px;
  background: #fff;
  color: #2563eb;
  font-weight: 600;
  cursor: pointer;
}
.hc-ob-list { padding: 0 14px 16px; }
.hc-ob-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 8px;
}
.hc-ob-avatar {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.hc-ob-avatar.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  font-weight: 700;
}
.hc-ob-info { flex: 1; min-width: 0; }
.hc-ob-info strong { display: block; margin-bottom: 4px; }
.hc-ob-warn { display: block; color: #dc2626; font-size: 12px; margin-top: 4px; }
.hc-ob-edit { border: none; background: none; font-size: 18px; color: var(--muted); cursor: pointer; }

.hc-comm-card {
  display: flex;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  margin: 0 14px 10px;
  padding: 14px;
}
.hc-comm-avatar {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
}
.hc-comm-avatar.ph {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4f6;
  font-weight: 700;
}
.hc-comm-body { flex: 1; min-width: 0; }
.hc-comm-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.hc-comm-link {
  border: none;
  background: none;
  font-size: 12px;
  color: #db2777;
  cursor: pointer;
  padding: 0;
}
.hc-comm-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 13px;
}
.hc-comm-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  color: #2563eb;
  font-weight: 700;
}
.hc-staff-report-card {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

#recordsList .mob-segment.hidden,
#page-records .mob-segment.hidden { display: none; }


/* 月曆 Hotcake 風格 */
.mob-cal-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 0 12px; gap: 6px;
}
.mob-cal-toolbar { flex-wrap: wrap; }
.cal-nav-sm { padding: 4px 10px; font-size: 18px; border: none; background: none; cursor: pointer; color: var(--ink); }
.cal-month-btn {
  background: none; border: none; font-size: 16px; font-weight: 700;
  cursor: pointer; color: var(--ink); padding: 4px 0; flex: 1; text-align: center;
}
.cal-toolbar-right { display: flex; gap: 6px; flex-shrink: 0; }
.cal-pill {
  padding: 6px 10px; border: 1px solid var(--line); border-radius: 20px;
  background: var(--card); font-size: 12px; font-weight: 600; cursor: pointer; color: var(--ink);
}
.cal-pill-accent { border-color: var(--accent); color: var(--accent-dark); }
.schedule-filter-bar { padding: 0 0 10px; }
.schedule-filter-bar .input-inline { width: 100%; margin-bottom: 0; }
.mob-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  font-size: 11px; font-weight: 600; color: var(--muted);
  text-align: center; padding-bottom: 6px;
}
.mob-cal-weekdays .wkend { color: var(--wkend); }
.mob-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 2px; border-top: 1px solid var(--line);
}
.mob-cal-grid .cal-day {
  min-height: 72px; border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line); padding: 4px 3px;
  cursor: pointer; position: relative; background: var(--card);
  display: flex; flex-direction: column; align-items: stretch;
}
.mob-cal-grid .cal-day:nth-child(7n) { border-right: none; }
.mob-cal-grid .cal-day.pad { visibility: hidden; pointer-events: none; }
.mob-cal-grid .cal-day.wkend .cal-day-num { color: var(--wkend); }
.mob-cal-grid .cal-day.today .cal-day-num {
  background: var(--accent-dark); color: #fff;
  width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
}
.mob-cal-grid .cal-day.selected { background: #fff5f7; }
.cal-day-num { font-size: 13px; font-weight: 600; margin-bottom: 2px; align-self: flex-start; }
.cal-day-total { font-size: 9px; color: var(--muted); margin-bottom: 3px; }
.cal-day-apt {
  font-size: 9px; line-height: 1.3; padding: 2px 4px;
  background: #fce7f3; border-radius: 4px; margin-bottom: 2px;
  border-left: 3px solid var(--accent-dark);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  color: var(--ink); cursor: pointer;
}
.cal-day-apt::before { content: "● "; color: var(--accent-dark); font-size: 7px; }
.cal-day-more { font-size: 9px; color: var(--accent-dark); font-weight: 600; }
.cal-nav-hidden { position: absolute; left: -9999px; }

/* 週曆 */
.week-toolbar { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.week-toolbar .cal-title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; }
.cal-nav { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 8px 12px; cursor: pointer; }
.week-cal-grid { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 8px; }
.week-cal-inner { display: grid; grid-template-columns: 40px repeat(7, minmax(72px, 1fr)); min-width: 640px; }
.week-cal-head { font-size: 10px; font-weight: 700; text-align: center; padding: 6px 2px; color: var(--muted); border-bottom: 1px solid var(--line); }
.week-cal-head.today { color: var(--accent-dark); }
.week-cal-head .wk-date { display: block; font-size: 14px; color: var(--ink); margin-top: 2px; }
.week-cal-head.today .wk-date { background: var(--accent-dark); color: #fff; width: 24px; height: 24px; line-height: 24px; border-radius: 50%; margin: 2px auto 0; }
.week-time-label { font-size: 9px; color: var(--muted); text-align: right; padding: 4px 4px 0 0; border-right: 1px solid var(--line); }
.week-time-gutter { border-right: 1px solid var(--line); }
.week-day-col { position: relative; border-right: 1px solid #f3f4f6; cursor: pointer;
  background: repeating-linear-gradient(to bottom, transparent, transparent 47px, #f9fafb 47px, #f9fafb 48px); }
.week-day-col:last-child { border-right: none; }
.week-apt-block {
  position: absolute; left: 2px; right: 2px; border-radius: 6px; padding: 3px 5px;
  font-size: 9px; line-height: 1.3; color: #fff; cursor: pointer; overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,.12); z-index: 2;
}
.week-apt-block strong { display: block; font-size: 10px; }

/* Segmented / Tabs */
.mob-segment {
  display: flex; background: #f3f4f6; border-radius: 10px; padding: 3px; margin-bottom: 14px;
}
.mob-segment-3 .mob-segment-btn { font-size: 12px; padding: 8px 4px; }
.mob-segment-btn {
  flex: 1; padding: 9px 8px; border: none; border-radius: 8px;
  background: transparent; font-size: 13px; font-weight: 600;
  color: var(--muted); cursor: pointer;
}
.mob-segment-btn.active { background: #4b5563; color: #fff; }
.mob-tabs { display: flex; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.mob-tab {
  flex: 1; background: none; border: none; padding: 12px 8px;
  font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.mob-tab.active { color: var(--ink); border-bottom-color: var(--ink); }

/* 選單卡片 */
.mob-menu-card {
  background: var(--card); border-radius: 14px; overflow: hidden;
  border: 1px solid var(--line); margin-bottom: 12px;
}
.mob-menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; border-bottom: 1px solid var(--line);
  cursor: pointer; -webkit-user-select: none; user-select: none;
}
.mob-menu-item:last-child { border-bottom: none; }
.mob-menu-item:active { background: #fafafa; }
.mob-menu-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 18px; flex-shrink: 0;
}
.mob-menu-icon.pink { background: #fce7f3; }
.mob-menu-icon.teal { background: #ccfbf1; }
.mob-menu-icon.green { background: #dcfce7; }
.mob-menu-icon.purple { background: #ede9fe; }
.mob-menu-icon.gray { background: #f3f4f6; }
.mob-menu-text { flex: 1; font-size: 15px; font-weight: 500; }
.mob-menu-body { flex: 1; min-width: 0; }
.mob-menu-body strong { display: block; font-size: 15px; margin-bottom: 2px; }
.mob-menu-body span { font-size: 12px; }
.mob-menu-chevron { color: #d1d5db; font-size: 18px; }

/* 列表卡片 */
.mob-list { }
.mob-empty { text-align: center; padding: 48px 16px; }
.record-card, .deposit-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
}
.record-card:active, .deposit-card:active { background: #fafafa; }
.record-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 6px; }
.record-time { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.record-row { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #4b5563; margin-bottom: 4px; }
.deposit-card-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; }
.deposit-card-head strong { font-size: 15px; }
.deposit-actions { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }

/* 會員 */
.members-toolbar { margin-bottom: 12px; }
.members-search { margin-bottom: 0; }
.members-stats { display: flex; gap: 8px; margin-bottom: 14px; flex-wrap: wrap; }
.members-stat { background: #f9fafb; border-radius: 10px; padding: 10px 14px; min-width: 100px; }
.members-stat .num { font-size: 20px; font-weight: 700; }
.members-stat .lbl { font-size: 11px; color: var(--muted); }
.member-card {
  display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 14px; margin-bottom: 10px;
}
.member-card.clickable { cursor: pointer; }
.member-avatar {
  width: 44px; height: 44px; border-radius: 50%; background: #f3f4f6;
  display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; color: var(--muted);
}
.member-name { font-weight: 700; font-size: 15px; }
.member-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.member-tag { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: #f3f4f6; color: var(--muted); }
.member-tag.line { background: #dcfce7; color: #166534; }
.member-tag.visits { background: #fce7f3; color: var(--accent-dark); }
.member-tag.new { background: #fce7f3; color: var(--accent-dark); }

/* 設定 */
.mob-settings .settings-group { border: none; border-radius: 0; padding: 16px; margin-bottom: 0; background: var(--card); }
.mob-settings .settings-group.hidden { display: none; }
.mob-save-btn { margin: 16px 0; }
.settings-group legend { font-weight: 700; font-size: 15px; padding: 0 0 12px; }
.brand-upload-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 8px 0; }
.brand-preview { border: 1px dashed var(--line); border-radius: 12px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: #fafafa; margin-bottom: 8px; }
.brand-preview img { width: 100%; height: 100%; object-fit: cover; }
.logo-preview { width: 72px; height: 72px; font-size: 24px; }
.cover-preview { width: 100%; height: 64px; font-size: 12px; }
.field-hint { font-size: 12px; color: var(--muted); margin: -8px 0 12px; }

/* 開通健檢 */
.setup-checklist { padding: 0 16px 16px; }
.setup-item { display: grid; grid-template-columns: 32px 1fr auto; gap: 10px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.setup-item strong { display: block; font-size: 13px; margin-bottom: 2px; }
.setup-item span { font-size: 12px; color: var(--muted); }

/* 試算表容量 */
.storage-panel { padding: 0 16px 24px; margin-top: 8px; }
.storage-panel h3 { font-size: 15px; margin-bottom: 6px; }
.storage-hint { font-size: 12px; margin-bottom: 12px; }
.storage-status-box { margin-bottom: 16px; }
.storage-row { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 6px; font-size: 12px; }
.storage-row.warn { border-color: #fed7aa; background: #fff7ed; }
.storage-row strong { font-size: 13px; }
.storage-form-row { margin-bottom: 8px; }
.storage-divider { border: none; border-top: 1px solid var(--line); margin: 16px 0; }
.btn-danger-outline { border: 1px solid #fecaca; color: #dc2626; background: #fff; }

/* 團隊管理 */
.team-list { padding: 0 16px 16px; }
.team-invite-form { padding: 0 16px 16px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.team-invite-form h3, .team-bind-section h3 { font-size: 15px; margin-bottom: 10px; }
.team-user-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.team-user-card.inactive { opacity: 0.6; }
.team-user-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 4px; }
.team-user-meta { font-size: 12px; color: var(--muted); }
.team-user-actions { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.team-user-actions button { font-size: 11px; padding: 4px 10px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; cursor: pointer; }
.team-bind-section { padding: 16px; margin-top: 8px; border-top: 1px solid var(--line); }
.invite-result { margin-top: 10px; padding: 10px; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 10px; font-size: 12px; word-break: break-all; }
.invite-result.hidden { display: none; }
.role-owner-only { display: block; }
body.is-staff .role-owner-only { display: none !important; }
body.is-staff .role-owner { display: none !important; }
.hidden-feature { display: none !important; }
.btn-line { background: #06c755; color: #fff; border: none; }
.btn-line.btn-small { font-size: 13px; padding: 10px 14px; }

/* 美睫師 */
.designers-admin-list { padding: 0 16px 16px; }
.designer-admin-card { display: flex; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; margin-bottom: 12px; }
.designer-admin-avatar { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.designer-admin-avatar.placeholder { background: #fce7f3; color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.designer-admin-fields { flex: 1; min-width: 0; }

.hc-head-save {
  border: none; background: none; color: #db2777; font-size: 22px; font-weight: 700; cursor: pointer; padding: 4px 8px;
}
.hc-designers-wrap { padding: 0 14px 20px; }
.hc-designers-card {
  background: #fff; border-radius: 14px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.hc-designers-add {
  display: block; width: 100%; border: none; border-bottom: 1px solid #f3f4f6;
  background: #fff; color: #2563eb; font-weight: 600; font-size: 15px;
  padding: 14px 16px; text-align: left; cursor: pointer;
}
.hc-designers-empty { padding: 16px; text-align: center; }
.hc-designers-row {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px;
  border-bottom: 1px solid #f3f4f6;
}
.hc-designers-row.dragging { opacity: .45; }
.hc-designers-row.drag-over { background: #f9fafb; }
.hc-designers-del {
  width: 22px; height: 22px; border-radius: 50%; border: none;
  background: #fee2e2; color: #dc2626; font-size: 16px; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.hc-designers-avatar {
  width: 40px; height: 40px; border-radius: 10px; object-fit: cover; flex-shrink: 0;
}
.hc-designers-avatar.ph {
  display: flex; align-items: center; justify-content: center;
  background: #f3f4f6; font-weight: 700; font-size: 16px;
}
.hc-designers-name { flex: 1; font-weight: 600; font-size: 15px; min-width: 0; }
.hc-designers-edit, .hc-designers-drag {
  border: none; background: none; color: #9ca3af; font-size: 18px; cursor: pointer; padding: 4px;
}
.hc-action-sheet {
  position: fixed; inset: 0; z-index: 220; display: flex; align-items: center; justify-content: center; padding: 24px;
}
.hc-action-sheet.hidden { display: none; }
.hc-action-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.hc-action-panel {
  position: relative; background: #fff; border-radius: 14px; width: min(320px, 100%); overflow: hidden;
}
.hc-action-item {
  display: block; width: 100%; border: none; background: #fff; padding: 16px; font-size: 16px;
  text-align: center; cursor: pointer; border-bottom: 1px solid #f3f4f6;
}
.hc-action-item:last-child { border-bottom: none; }
.hc-designer-edit-body { padding: 16px 14px 32px; background: #f3f4f6; min-height: calc(100vh - 56px); }
.hc-de-avatar-wrap { display: flex; justify-content: center; margin-bottom: 16px; }
.hc-de-avatar-btn { position: relative; cursor: pointer; }
.hc-de-avatar-img {
  width: 88px; height: 88px; border-radius: 14px; object-fit: cover; display: block;
}
.hc-de-avatar-img.ph {
  display: flex; align-items: center; justify-content: center;
  background: #e5e7eb; font-size: 28px; font-weight: 700;
}
.hc-de-cam {
  position: absolute; right: -4px; bottom: -4px; width: 28px; height: 28px;
  border-radius: 50%; background: #fff; border: 1px solid #e5e7eb;
  display: flex; align-items: center; justify-content: center; font-size: 14px;
}
.hc-de-card {
  background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px;
}
.hc-de-opt { font-size: 11px; color: #9ca3af; font-weight: 400; }
.hc-de-colors { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.hc-de-color {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent;
  cursor: pointer; color: #fff; font-size: 14px; font-weight: 700; padding: 0;
}
.hc-de-color.active { border-color: #111; box-shadow: 0 0 0 2px #fff inset; }
.hc-de-bio { min-height: 100px; resize: vertical; }
.hc-de-count { text-align: right; font-size: 12px; color: #9ca3af; margin-top: 6px; }
.hc-de-advanced-toggle {
  display: block; margin: 8px auto 12px; border: 1px solid #bfdbfe; background: #eff6ff;
  color: #2563eb; border-radius: 999px; padding: 8px 16px; font-size: 13px; cursor: pointer;
}
.hc-de-delete {
  display: block; width: 100%; margin-top: 20px; border: none; background: none;
  color: #dc2626; font-size: 15px; cursor: pointer; padding: 12px;
}
#page-designer-edit.active { z-index: 120; }
.save-msg { font-size: 12px; margin-top: 4px; }

/* 儀表板 */
.dash-period { display: flex; gap: 8px; margin: 12px 16px 16px; }
.dash-period-btn { padding: 8px 16px; border: 1px solid var(--line); background: var(--card); border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.dash-period-btn.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.dash-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; padding: 0 16px; margin-bottom: 20px; }
.dash-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.dash-card .label { margin-bottom: 4px; font-size: 11px; }
.dash-card .value { font-size: 18px; font-weight: 700; }
.dash-card .sub { font-size: 11px; color: var(--muted); margin-top: 2px; }
.dash-card.warn { border-color: #fed7aa; background: #fff7ed; }
.dash-section { padding: 0 16px 20px; }
.dash-section h3 { font-size: 15px; margin-bottom: 10px; }
.dash-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.pending-row, .inventory-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; font-size: 13px; }
.pending-actions { display: flex; gap: 6px; flex-wrap: wrap; flex-shrink: 0; }
.pending-main { flex: 1; min-width: 0; }
.danger-btn { color: #dc2626 !important; border-color: #fecaca !important; }
.inventory-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.inventory-table th, .inventory-table td { border: 1px solid var(--line); padding: 8px 6px; text-align: left; }
.inventory-table input { width: 60px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; }
.inventory-actions { display: flex; gap: 4px; flex-wrap: wrap; }
.inventory-actions button { padding: 3px 8px; font-size: 11px; border: 1px solid var(--line); background: var(--card); border-radius: 6px; cursor: pointer; }
.inventory-low { color: #c2410c; font-weight: 600; }
.checkout-stats { display: grid; grid-template-columns: 1fr; gap: 16px; }
.checkout-donut { width: 120px; height: 120px; border-radius: 50%; margin: 0 auto; display: flex; align-items: center; justify-content: center; }
.checkout-donut-inner { width: 76px; height: 76px; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 10px; }
.checkout-donut-inner strong { font-size: 14px; }
.checkout-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.checkout-table th, .checkout-table td { padding: 8px; text-align: left; border-bottom: 1px solid var(--line); }
.checkout-swatch { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 4px; }

/* 行銷 */
.marketing-form { margin: 12px 16px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.marketing-tabs { display: flex; gap: 16px; margin: 0 16px 12px; border-bottom: 1px solid var(--line); }
.marketing-tab { background: none; border: none; padding: 10px 4px; font-size: 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.marketing-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.marketing-list { padding: 0 16px 16px; }
.marketing-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.marketing-card-head { display: flex; justify-content: space-between; margin-bottom: 6px; }
.marketing-channel { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: #dcfce7; color: #166534; }

/* 排程列 */
.schedule-row { display: grid; grid-template-columns: 72px 1fr; gap: 12px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 8px; }
.schedule-time { font-weight: 700; font-size: 14px; }
.schedule-status { font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 8px; background: #f3f4f6; color: var(--muted); margin-left: 6px; }
.schedule-row.clickable { cursor: pointer; }
.day-add-btn { width: 100%; margin-top: 8px; }

/* 全螢幕 Modal */
.modal-full { align-items: stretch; justify-content: stretch; }
.modal-full .fs-page {
  position: relative; background: var(--bg); width: 100%; max-width: 480px;
  margin: 0 auto; min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column; z-index: 1;
}
.fs-header {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top));
  background: var(--card); border-bottom: 1px solid var(--line); flex-shrink: 0;
}
.fs-header h3 { flex: 1; text-align: center; font-size: 17px; font-weight: 700; margin-right: 32px; }
.fs-close { background: none; border: none; font-size: 28px; line-height: 1; color: var(--ink); cursor: pointer; width: 32px; }
.fs-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 12px 14px 20px; }

/* 日期詳情 */
.day-fs-body { padding-bottom: 100px; }
.day-fs-footer {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  padding: 12px 14px; padding-bottom: max(12px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); z-index: 210;
}
.btn-outline-pink {
  padding: 14px; border: 2px solid var(--accent-dark); background: var(--card);
  color: var(--accent-dark); border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.btn-pink {
  padding: 14px; border: none; background: var(--accent-dark);
  color: #fff; border-radius: 12px; font-size: 15px; font-weight: 700; cursor: pointer;
}
.day-apt-card {
  position: relative; background: #fce7f3; border: 1px solid #fbcfe8;
  border-radius: 14px; padding: 14px 14px 14px 36px; margin-bottom: 12px; cursor: pointer;
}
.day-apt-card:active { opacity: .92; }
.day-apt-del {
  position: absolute; top: 10px; left: 10px; width: 22px; height: 22px;
  border-radius: 50%; border: none; background: #ef4444; color: #fff;
  font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.day-apt-time { font-size: 13px; color: #6b7280; margin-bottom: 6px; }
.day-apt-designer {
  display: inline-block; font-size: 11px; font-weight: 700; color: #7c3aed;
  background: #ede9fe; padding: 2px 8px; border-radius: 6px; margin-bottom: 8px;
}
.day-apt-name { font-size: 20px; font-weight: 700; margin-bottom: 4px; }
.day-apt-service { font-size: 14px; color: #6b7280; }
.day-empty { text-align: center; padding: 60px 20px; color: var(--muted); }

/* 預約詳情 */
.apt-fs-header { flex-direction: column; align-items: stretch; gap: 4px; padding-bottom: 8px; }
.apt-fs-meta { display: flex; justify-content: space-between; align-items: center; font-size: 11px; padding: 0 4px; }
.apt-short-id { background: #f3f4f6; padding: 2px 8px; border-radius: 6px; font-weight: 600; font-size: 11px; }
.apt-alert-banner {
  background: #fef2f2; color: #b91c1c; padding: 10px 16px; font-size: 13px; font-weight: 600;
  display: flex; align-items: center; gap: 6px; flex-shrink: 0;
}
.apt-alert-banner.hidden { display: none !important; }
.apt-fs-body { padding-bottom: 90px; }
.apt-customer-card {
  display: flex; gap: 12px; align-items: center; background: var(--card);
  border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.apt-customer-card .member-tags { margin-top: 6px; }
.member-tag.deposit-tag { background: #fff; border: 1px solid #fdba74; color: #ea580c; }
.apt-booking-card {
  background: var(--card); border-radius: 14px; padding: 16px; margin-bottom: 12px;
}
.apt-booking-brand { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.apt-booking-time { font-size: 18px; font-weight: 700; line-height: 1.4; margin-bottom: 6px; }
.apt-booking-summary { font-size: 13px; color: var(--muted); }
.apt-info-rows { background: var(--card); border-radius: 14px; overflow: hidden; margin-bottom: 12px; }
.apt-info-row {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px;
  border-bottom: 1px solid var(--line); cursor: pointer;
}
.apt-info-row:last-child { border-bottom: none; }
.apt-info-row:active { background: #fafafa; }
.apt-info-icon { font-size: 18px; width: 24px; text-align: center; flex-shrink: 0; }
.apt-info-body { flex: 1; min-width: 0; }
.apt-info-label { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.apt-info-value { font-size: 14px; font-weight: 600; }
.apt-info-value.warn { color: #dc2626; }
.apt-info-chevron { color: #d1d5db; font-size: 18px; }
.apt-notes-row {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.apt-checkout-panel {
  background: var(--card); border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.apt-fs-toolbar, .passport-fs-toolbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; display: flex; justify-content: space-around;
  padding: 8px 4px; padding-bottom: max(8px, env(safe-area-inset-bottom));
  background: var(--card); border-top: 1px solid var(--line); z-index: 210;
}
.apt-tool-btn {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  background: none; border: none; padding: 6px 8px; cursor: pointer; min-width: 56px;
}
.apt-tool-btn span { font-size: 20px; }
.apt-tool-btn small { font-size: 10px; color: var(--muted); font-weight: 600; }
.apt-tool-btn.danger small { color: #dc2626; }
.apt-tool-btn.disabled { opacity: .35; pointer-events: none; }
.apt-more-drawer { position: fixed; inset: 0; z-index: 220; max-width: 480px; margin: 0 auto; }
.apt-more-drawer.hidden { display: none !important; }
.apt-more-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.apt-more-sheet {
  position: absolute; bottom: 0; left: 0; right: 0; background: var(--card);
  border-radius: 20px 20px 0 0; padding: 20px 16px;
  padding-bottom: max(20px, env(safe-area-inset-bottom));
}
.apt-more-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px;
}
.apt-more-item {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  background: none; border: none; cursor: pointer; font-size: 11px; font-weight: 600; color: var(--ink);
}
.apt-more-item.disabled { opacity: .35; pointer-events: none; }
.apt-more-item span { font-size: 24px; }
.apt-more-arrival { margin-top: 4px; }

/* 會員護照 */
.apt-fs-header { flex-direction: row; align-items: center; }
.apt-fs-header .apt-fs-meta { flex: 1; margin-left: 4px; }
.passport-fs-page .passport-tabs {
  background: var(--card); padding: 0 14px; flex-shrink: 0;
  border-bottom: 1px solid var(--line);
}
.passport-fs-page .passport-tab { flex: 1; text-align: center; padding: 12px 8px; font-size: 14px; }
.passport-fs-page .passport-tab.active { color: var(--ink); border-bottom-color: var(--ink); }
.passport-fs-body { padding-bottom: 80px; background: var(--bg); }
.passport-profile-card {
  background: var(--card); border-radius: 14px; padding: 14px; margin-bottom: 12px;
}
.passport-profile-top { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 14px; }
.passport-wallet-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 0;
  border-top: 1px solid var(--line); padding-top: 12px;
}
.passport-wallet-item { text-align: center; border-right: 1px solid var(--line); padding: 4px 8px; }
.passport-wallet-item:last-child { border-right: none; }
.passport-wallet-item .num { font-size: 18px; font-weight: 700; }
.passport-wallet-item .lbl { font-size: 11px; color: var(--muted); }
.passport-section {
  background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 12px;
}
.passport-section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.passport-section-head h4 { font-size: 15px; font-weight: 700; }
.passport-kv { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 14px; }
.passport-kv:last-child { border-bottom: none; }
.passport-kv .k { color: var(--muted); }
.passport-apt-card {
  background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; cursor: pointer;
}
.passport-apt-card:active { background: #fafafa; }
.passport-apt-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.passport-status-badge {
  font-size: 11px; font-weight: 700; padding: 3px 10px; border-radius: 12px;
}
.passport-status-badge.waiting { background: #fce7f3; color: var(--accent-dark); }
.passport-status-badge.arrived { background: #ccfbf1; color: #0f766e; }
.passport-status-badge.done { background: #f3f4f6; color: var(--muted); }
.passport-apt-time { font-size: 17px; font-weight: 700; margin-bottom: 10px; }
.passport-apt-price { font-size: 17px; font-weight: 700; float: right; margin-top: -28px; }
.passport-apt-row { display: flex; gap: 8px; font-size: 13px; color: #4b5563; margin-bottom: 4px; }
.passport-bill-card {
  background: var(--card); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px;
}
.passport-bill-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 8px; }
.passport-bill-main { display: flex; justify-content: space-between; font-size: 18px; font-weight: 700; margin-bottom: 12px; }
.passport-bill-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 12px; }
.passport-bill-actions button {
  padding: 8px 14px; border-radius: 20px; border: 1px solid var(--line);
  background: var(--card); font-size: 13px; font-weight: 600; cursor: pointer;
}
.passport-bill-actions .btn-pink-sm {
  background: var(--accent-dark); color: #fff; border-color: var(--accent-dark);
}

/* Modal */
.modal { position: fixed; inset: 0; z-index: 200; display: flex; align-items: flex-end; justify-content: center; }
.modal.hidden { display: none !important; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.4); }
.modal-sheet {
  position: relative; background: var(--card); width: 100%; max-width: 480px;
  max-height: 92vh; max-height: 92dvh; border-radius: 20px 20px 0 0;
  overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 -8px 32px rgba(0,0,0,.15);
  padding-bottom: var(--safe-b);
}
.modal-header { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); flex-shrink: 0; }
.modal-close { background: none; border: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); padding: 0; }
.modal-meta { font-size: 12px; margin-bottom: 2px; }
.modal-header h3 { font-size: 17px; margin: 0; }
.modal-body { padding: 14px 16px 20px; overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.modal-sheet-wide { max-width: 480px; }
.apt-alerts { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.apt-alert { font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 10px; }
.apt-alert.warn { background: #fee2e2; color: #b91c1c; }
.apt-alert.info { background: #dbeafe; color: #1d4ed8; }
.apt-alert.ok { background: #dcfce7; color: #166534; }
.apt-customer { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.apt-customer-avatar { width: 48px; height: 48px; border-radius: 50%; background: #fce7f3; color: var(--accent-dark); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; }
.arrival-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 14px 0; }
.arrival-tab { padding: 9px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); font-size: 12px; font-weight: 600; cursor: pointer; text-align: center; }
.arrival-tab.active { background: #fce7f3; border-color: #f9a8d4; color: var(--accent-dark); }
.apt-detail-card { background: #fafafa; border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin-bottom: 12px; }
.apt-detail-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; border-bottom: 1px solid #eee; }
.apt-detail-row:last-child { border-bottom: none; }
.checkout-methods { margin: 10px 0; }
.checkout-method-row { display: grid; grid-template-columns: 1fr 90px; gap: 8px; align-items: center; margin-bottom: 6px; }
.checkout-method-row label { font-size: 13px; font-weight: 600; }
.checkout-method-row input { margin-bottom: 0; padding: 8px; }
.modal-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.modal-actions .btn, .modal-actions .btn-secondary { width: auto; flex: 1; min-width: 100px; }
.passport-tabs { display: flex; border-bottom: 1px solid var(--line); padding: 0 16px; }
.passport-tab { flex: 1; background: none; border: none; padding: 11px 6px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; }
.passport-tab.active { color: var(--accent-dark); border-bottom-color: #f9a8d4; }
.passport-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.passport-stat { background: #fafafa; border-radius: 10px; padding: 10px; text-align: center; }
.passport-stat .num { font-size: 18px; font-weight: 700; }
.passport-stat .lbl { font-size: 10px; color: var(--muted); }
.change-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.change-due { font-size: 16px; font-weight: 700; color: var(--accent-dark); }
#reportsQuickStats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 12px; }
#reportsQuickStats .dash-card { padding: 10px; }
#reportsQuickStats .dash-card .value { font-size: 15px; }
.nav-feature.hidden-feature { display: none !important; }
.dash-section.hidden-feature { display: none !important; }

/* Sync Engine 骨架屏 */
@keyframes sk-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.45; }
}
.sk-cal {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  grid-column: 1 / -1;
  padding: 8px 4px;
}
.sk-cell {
  aspect-ratio: 1;
  border-radius: 10px;
  background: linear-gradient(90deg, #ececf1 25%, #f5f5f7 50%, #ececf1 75%);
  background-size: 200% 100%;
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.sk-row {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.sk-avatar {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: #ececf1;
  flex-shrink: 0;
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.sk-lines { flex: 1; }
.sk-line {
  height: 12px;
  border-radius: 6px;
  background: #ececf1;
  margin-bottom: 8px;
  animation: sk-pulse 1.2s ease-in-out infinite;
}
.sk-line.short { width: 55%; margin-bottom: 0; }
.sk-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.sk-stat {
  height: 72px;
  border-radius: 12px;
  background: #ececf1;
  animation: sk-pulse 1.2s ease-in-out infinite;
}

@media (min-width: 481px) {
  body { background: #e5e7eb; }
  .mob-app { box-shadow: 0 0 40px rgba(0,0,0,.08); min-height: 100vh; }
}
