/* ===== Cohesive customer app (single-page shell) ===== */
.air-app {
  margin: 0;
  min-height: 100vh;
  background: #f2f3f1;
  padding: calc(52px + env(safe-area-inset-top)) 0 calc(74px + env(safe-area-inset-bottom));
  color: #0a0f14;
  -webkit-font-smoothing: antialiased;
}
.app-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  box-sizing: border-box;
  height: calc(52px + env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(10, 15, 20, 0.08);
  display: flex;
  align-items: center;
  padding: env(safe-area-inset-top) 16px 0;
  z-index: 30;
}
.app-topbar .app-logo { width: 62px; }
.app-topbar .app-title { flex: 1; text-align: center; font-size: 16px; font-weight: 600; }
.app-topbar .app-brand-mark { width: 26px; height: 26px; border-radius: 8px; display: inline-block; vertical-align: middle; }
.app-topbar .app-topbar-action { width: 62px; text-align: right; color: #167d89; font-size: 14px; font-weight: 500; cursor: pointer; min-height: 20px; }
.app-main { box-sizing: border-box; width: 100%; max-width: 460px; margin: 0 auto; padding: 12px 16px 0; }
.app-view[hidden] { display: none; }
.app-empty { text-align: center; color: #5f6b6f; font-size: 14px; padding: 34px 12px; }
.demo-label { margin: 0 0 10px; padding: 7px 10px; border-radius: 9px; background: #fff6e6; border: 1px solid #f2d79a; color: #854f0b; text-align: center; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }

.feed-head { display: flex; align-items: baseline; justify-content: space-between; margin: 4px 2px 12px; }
.feed-head .fh-total { font-size: 13px; color: #5f6b6f; }
.scan-receipt { box-sizing:border-box; width:100%; display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:10px; margin-bottom:10px; padding:12px 13px; border:1px solid #b9d9d5; border-radius:15px; color:#0a0f14; background:linear-gradient(135deg,#f3fbf9,#fff); text-align:left; cursor:pointer; }
.scan-receipt > span { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:#fff; background:#167d70; font-size:17px; }
.scan-receipt strong,.scan-receipt small { display:block; }
.scan-receipt strong { font-size:13px; }
.scan-receipt small { margin-top:2px; color:#687a7d; font-size:10px; line-height:1.35; }
.scan-receipt em { color:#167d70; font-size:20px; font-style:normal; font-weight:800; }
.app-search { display: flex; align-items: center; gap: 8px; background: #fff; border: 1px solid rgba(10, 15, 20, 0.08); border-radius: 12px; padding: 9px 12px; margin-bottom: 12px; }
.app-search input { border: none; outline: none; background: none; font-size: 14px; width: 100%; color: #0a0f14; }
.feed-row { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid rgba(10, 15, 20, 0.08); border-radius: 16px; padding: 12px 14px; margin-bottom: 10px; cursor: pointer; text-align: left; width: 100%; }
.feed-av { width: 42px; height: 42px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.feed-body { flex: 1; min-width: 0; }
.feed-name { margin: 0; font-size: 15px; font-weight: 600; }
.feed-imported { display:inline-block; margin-left:6px; padding:2px 5px; border-radius:99px; color:#52676a; background:#e8eeec; vertical-align:2px; font-size:7px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.feed-sub { margin: 2px 0 0; font-size: 12px; color: #5f6b6f; }
.feed-total { font-size: 15px; font-weight: 700; }

.detail-card { background: #fff; border: 1px solid rgba(10, 15, 20, 0.08); border-radius: 18px; padding: 18px 16px; }
.detail-head { text-align: center; margin-bottom: 10px; }
.detail-head .dh-av { width: 48px; height: 48px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; margin-bottom: 8px; }
.detail-head h2 { margin: 0; font-size: 17px; font-weight: 600; }
.detail-head p { margin: 2px 0 0; font-size: 12px; color: #8b9498; }
.detail-line { display: flex; justify-content: space-between; padding: 7px 0; font-size: 14px; }
.detail-line small { color: #8b9498; font-size: 11px; display: block; }
.detail-totals { border-top: 1px solid rgba(10, 15, 20, 0.1); margin-top: 6px; padding-top: 8px; }
.detail-totals .dt { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; color: #5f6b6f; }
.detail-totals .dt.grand { font-size: 16px; font-weight: 700; color: #0a0f14; padding-top: 6px; }
.detail-card .receipt-wallet { margin-top: 16px; }

.app-notice {
  position: fixed;
  top: calc(64px + env(safe-area-inset-top));
  left: 50%;
  z-index: 100;
  width: min(360px, calc(100% - 28px));
  padding: 12px 15px;
  transform: translateX(-50%);
  border: 1px solid #9cd8c0;
  border-radius: 13px;
  color: #0f6e56;
  background: #e8f8f0;
  box-shadow: 0 12px 32px rgba(10, 15, 20, 0.16);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}
.app-notice.error { border-color: #efb6b6; color: #8e1b1b; background: #fff1f1; }

.profile-card { background: #fff; border: 1px solid rgba(10, 15, 20, 0.08); border-radius: 18px; padding: 22px 16px; text-align: center; }
.profile-av { width: 64px; height: 64px; border-radius: 50%; background: #e1f5ee; color: #0f6e56; display: inline-flex; align-items: center; justify-content: center; font-size: 26px; margin-bottom: 12px; }
.profile-card h2 { margin: 0 0 2px; font-size: 18px; }
.profile-btn { display: block; width: 100%; box-sizing: border-box; background: #0a0f14; color: #fff; border: none; border-radius: 12px; padding: 12px; font-size: 14px; font-weight: 600; margin-top: 8px; text-decoration: none; text-align: center; cursor: pointer; }
.profile-btn.light { background: #fff; color: #0a0f14; border: 1px solid rgba(10, 15, 20, 0.15); }
.profile-btn.disabled { opacity: 0.55; cursor: not-allowed; }
.profile-note { font-size: 12px; color: #5f6b6f; margin-top: 16px; line-height: 1.5; }

.app-tabbar { position: fixed; bottom: 0; left: 0; right: 0; background: rgba(255, 255, 255, 0.94); backdrop-filter: blur(12px); border-top: 1px solid rgba(10, 15, 20, 0.08); display: flex; justify-content: space-around; padding: 8px 0 max(8px, env(safe-area-inset-bottom)); z-index: 30; }
.app-tabbar button { background: none; border: none; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; color: #9aa2a6; cursor: pointer; }
.app-tabbar button.active { color: #0a0f14; font-weight: 600; }
.app-tabbar .tab-ico { font-size: 19px; line-height: 1; }
.app-tabbar .tab-label { display:flex; align-items:center; gap:4px; }
.app-tabbar .tab-count { min-width:16px; height:16px; display:inline-grid; place-items:center; padding:0 4px; border-radius:99px; color:#fff; background:#167d70; font-size:9px; font-style:normal; font-weight:800; }
.app-tabbar .tab-count[hidden] { display: none; }

/* Purchase activity, customer cases, and privacy controls */
.activity-intro { margin: 2px 2px 14px; }
.activity-intro strong { font-size: 16px; }
.activity-intro p { margin: 4px 0 0; color: #5f6b6f; font-size: 12px; line-height: 1.45; }
.case-card { box-sizing: border-box; width: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; margin-bottom: 10px; padding: 13px; border: 1px solid rgba(10,15,20,.09); border-radius: 16px; background: #fff; color: #0a0f14; text-align: left; cursor: pointer; }
.case-card.is-unread { border-color: #7bc8c0; box-shadow: inset 3px 0 #167d89; }
.case-mark { width: 32px; height: 32px; display: grid; place-items: center; border-radius: 10px; background: #edf8f8; color: #116b74; font-weight: 800; }
.case-card-copy { min-width: 0; }
.case-card-copy strong, .case-card-copy small { display: block; }
.case-card-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.case-card-copy small { margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #697579; font-size: 11px; }
.case-status { padding: 5px 7px; border-radius: 99px; background: #edf0ee; color: #536064; font-size: 9px; font-weight: 800; white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.case-status.status-needs_information { background: #fff0d6; color: #854f0b; }
.case-status.status-approved, .case-status.status-refunded, .case-status.status-exchanged, .case-status.status-resolved { background: #e1f5ee; color: #0f6e56; }
.case-status.status-denied { background: #fff1f1; color: #8e1b1b; }
.case-status.status-refund_pending { background: #e6f1fb; color: #0c447c; }
.case-kicker { display: block; margin: 0 0 5px; color: #167d70; font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.case-detail { padding: 18px 16px; border: 1px solid rgba(10,15,20,.08); border-radius: 18px; background: #fff; }
.case-detail > header { padding-bottom: 14px; border-bottom: 1px solid rgba(10,15,20,.09); }
.case-detail h2 { margin: 0; font-size: 19px; }
.case-detail > header p { margin: 4px 0 0; color: #5f6b6f; font-size: 12px; }
.case-requested { display: block; margin-top: 6px; color: #455055; font-size: 10px; font-weight: 700; text-transform: capitalize; }
.case-guidance, .case-evidence { margin-top: 14px; padding: 12px; border: 1px solid #b9d9dc; border-radius: 13px; background: #f2faf8; }
.case-guidance strong, .case-evidence strong { display: block; font-size: 12px; }
.case-guidance p, .case-evidence p { margin: 4px 0 0; color: #50656a; font-size: 11px; line-height: 1.45; }
.case-evidence span, .case-evidence small { display: block; margin-top: 4px; font-size: 12px; }
.case-items { display: grid; gap: 6px; margin-top: 14px; }
.case-items > strong { font-size: 12px; }
.case-items span { display: flex; justify-content: space-between; gap: 10px; padding: 9px 10px; border-radius: 10px; background: #f5f6f4; font-size: 12px; }
.case-items em { font-style: normal; font-weight: 700; }
.case-timeline { position: relative; display: grid; gap: 0; margin: 18px 0; padding: 0; list-style: none; }
.case-event { position: relative; display: grid; grid-template-columns: 16px minmax(0,1fr); gap: 9px; padding-bottom: 17px; }
.case-event:not(:last-child)::before { content: ""; position: absolute; top: 11px; bottom: -2px; left: 5px; width: 1px; background: #d8dfdc; }
.case-event-dot { position: relative; z-index: 1; width: 11px; height: 11px; margin-top: 3px; border: 3px solid #fff; border-radius: 50%; background: #167d89; box-shadow: 0 0 0 1px #8ccbc5; }
.case-event.from-customer .case-event-dot { background: #7d878b; box-shadow: 0 0 0 1px #b9c0c2; }
.case-event strong, .case-event small { display: block; }
.case-event strong { font-size: 12px; }
.case-event small { margin-top: 2px; color: #7a8589; font-size: 10px; }
.case-event p { margin: 5px 0 0; color: #384449; font-size: 12px; line-height: 1.45; white-space: pre-wrap; }
.case-event em { display: inline-block; margin-top: 5px; color: #0f6e56; font-size: 10px; font-style: normal; font-weight: 800; }
.case-reply { display: grid; gap: 7px; padding-top: 14px; border-top: 1px solid rgba(10,15,20,.09); }
.case-reply label { font-size: 12px; font-weight: 800; }
.case-reply textarea { box-sizing: border-box; width: 100%; min-height: 92px; resize: vertical; padding: 11px; border: 1px solid rgba(10,15,20,.16); border-radius: 11px; font: inherit; font-size: 13px; }
.case-reply button { padding: 11px; border: none; border-radius: 11px; background: #0a0f14; color: #fff; font-weight: 700; cursor: pointer; }
.case-reply p { min-height: 15px; margin: 0; color: #a32d2d; font-size: 11px; }
.case-closed-note { margin: 14px 0 0; padding: 11px; border-radius: 11px; background: #f2f3f1; color: #5f6b6f; font-size: 11px; }
.case-detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.case-detail-actions button { padding: 9px 10px; border: 1px solid rgba(10,15,20,.14); border-radius: 9px; background: #fff; color: #0a0f14; font-size: 11px; font-weight: 700; cursor: pointer; }
.case-detail-actions .danger-link { color: #8e1b1b; }
.receipt-help { box-sizing: border-box; width: 100%; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 10px; margin-top: 16px; padding: 12px; border: 1px solid rgba(10,15,20,.12); border-radius: 13px; background: #fff; color: #0a0f14; text-align: left; cursor: pointer; }
.receipt-help > span { width: 29px; height: 29px; display: grid; place-items: center; border-radius: 50%; background: #edf8f8; color: #116b74; font-weight: 900; }
.receipt-help strong, .receipt-help small { display: block; }
.receipt-help strong { font-size: 12px; }
.receipt-help small { margin-top: 2px; color: #697579; font-size: 10px; line-height: 1.35; }
.receipt-help em { color: #167d89; font-size: 22px; font-style: normal; }
.receipt-activity { display: grid; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(10,15,20,.09); }
.receipt-activity > strong { font-size: 12px; }
.receipt-activity > div { display: grid; grid-template-columns: auto minmax(0,1fr); gap: 8px; }
.receipt-activity > div > span { width: 8px; height: 8px; margin-top: 4px; border-radius: 50%; background: #167d89; }
.receipt-activity p { margin: 0; }
.receipt-activity b, .receipt-activity small { display: block; }
.receipt-activity b { font-size: 11px; }
.receipt-activity small { margin-top: 1px; color: #7a8589; font-size: 9px; line-height: 1.4; }
.help-overlay { box-sizing: border-box; position: fixed; inset: 0; z-index: 90; display: flex; align-items: flex-end; justify-content: center; padding: 14px; background: rgba(10,15,20,.65); backdrop-filter: blur(6px); }
.help-sheet { box-sizing: border-box; position: relative; width: 100%; max-width: 460px; max-height: 92vh; overflow-y: auto; padding: 22px 17px 18px; border-radius: 24px; background: #fff; box-shadow: 0 18px 70px rgba(0,0,0,.3); }
.help-sheet h2 { margin: 0 38px 14px 0; font-size: 20px; }
.help-close { position: absolute; top: 13px; right: 13px; width: 34px; height: 34px; border: none; border-radius: 50%; background: #edf0ee; font-size: 24px; cursor: pointer; }
.help-sheet > label { display: grid; gap: 5px; margin-top: 11px; color: #455055; font-size: 11px; font-weight: 800; }
.help-sheet select, .help-sheet textarea { box-sizing: border-box; width: 100%; padding: 11px; border: 1px solid rgba(10,15,20,.16); border-radius: 11px; background: #fff; color: #0a0f14; font: inherit; font-size: 13px; font-weight: 500; }
.help-sheet textarea { min-height: 98px; resize: vertical; }
.help-items { display: grid; gap: 7px; margin: 12px 0 0; padding: 11px; border: 1px solid rgba(10,15,20,.12); border-radius: 12px; }
.help-items[hidden] { display: none; }
.help-items legend { padding: 0 4px; font-size: 11px; font-weight: 800; }
.help-item { display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 8px; font-size: 12px; }
.help-item input { width: 18px; height: 18px; accent-color: #167d89; }
.help-item em { font-style: normal; font-weight: 700; }
.help-boundary { padding: 10px; border-radius: 10px; background: #f2faf8; color: #50656a; font-size: 10px; line-height: 1.45; }
.help-submit { width: 100%; padding: 12px; border: none; border-radius: 12px; background: #0a0f14; color: #fff; font-weight: 800; cursor: pointer; }
.help-submit:disabled { opacity: .6; }
.help-status { min-height: 15px; margin: 6px 0 0; color: #a32d2d; font-size: 11px; }
.import-receipt-lead { margin:-5px 0 12px; color:#607174; font-size:11px; line-height:1.5; }
.receipt-photo-picker { display:grid !important; grid-template-columns:auto minmax(0,1fr); align-items:center; gap:10px !important; padding:12px; border:1px dashed #9fc9c2; border-radius:13px; color:#214b48 !important; background:#f5fbf9; cursor:pointer; }
.receipt-photo-picker input { position:absolute; width:1px; height:1px; opacity:0; }
.receipt-photo-picker > span { width:36px; height:36px; display:grid; place-items:center; border-radius:11px; color:#fff; background:#167d70; font-size:17px; }
.receipt-photo-picker strong,.receipt-photo-picker small { display:block; }
.receipt-photo-picker strong { font-size:12px; }
.receipt-photo-picker small { margin-top:2px; color:#6e8183; font-size:9px; font-weight:500; }
.receipt-photo-preview { width:100%; max-height:220px; margin-top:10px; object-fit:contain; border:1px solid rgba(10,15,20,.1); border-radius:12px; background:#f2f3f1; }
.receipt-editor { margin-top:10px; padding:12px; border:1px solid rgba(10,15,20,.1); border-radius:15px; background:#f4f6f4; }
.receipt-editor-heading { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:9px; }
.receipt-editor-heading strong { font-size:12px; }
.receipt-editor-heading span { color:#6e7d80; font-size:9px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.receipt-editor-stage { position:relative; max-width:100%; margin:0 auto; overflow:hidden; border-radius:10px; background:#172020; box-shadow:0 6px 22px rgba(10,15,20,.18); touch-action:none; }
.receipt-editor-canvas { display:block; width:100%; height:100%; transition:filter .2s; }
.receipt-crop-box { box-sizing:border-box; position:absolute; border:2px solid #46e7c1; background:rgba(70,231,193,.04); box-shadow:0 0 0 999px rgba(3,9,12,.55); cursor:move; touch-action:none; }
.receipt-crop-box::before,.receipt-crop-box::after { content:""; position:absolute; pointer-events:none; }
.receipt-crop-box::before { left:33.33%; top:0; bottom:0; width:33.33%; border-left:1px solid rgba(255,255,255,.25); border-right:1px solid rgba(255,255,255,.25); }
.receipt-crop-box::after { top:33.33%; left:0; right:0; height:33.33%; border-top:1px solid rgba(255,255,255,.25); border-bottom:1px solid rgba(255,255,255,.25); }
.receipt-crop-box i { position:absolute; z-index:2; width:22px; height:22px; border:3px solid #46e7c1; background:#fff; border-radius:50%; box-shadow:0 2px 8px rgba(0,0,0,.25); touch-action:none; }
.receipt-crop-box [data-crop-handle="tl"] { left:-12px; top:-12px; cursor:nwse-resize; }
.receipt-crop-box [data-crop-handle="tr"] { right:-12px; top:-12px; cursor:nesw-resize; }
.receipt-crop-box [data-crop-handle="bl"] { left:-12px; bottom:-12px; cursor:nesw-resize; }
.receipt-crop-box [data-crop-handle="br"] { right:-12px; bottom:-12px; cursor:nwse-resize; }
.receipt-editor-controls { display:grid; grid-template-columns:auto minmax(108px,1fr) minmax(108px,1fr); align-items:end; gap:7px; margin-top:10px; }
.receipt-editor-controls > button,.receipt-editor-controls select { box-sizing:border-box; width:100%; min-height:38px; border:1px solid rgba(10,15,20,.14); border-radius:10px; background:#fff; color:#182326; font-size:10px; font-weight:750; }
.receipt-editor-controls > label { display:grid; gap:3px; color:#67777a; font-size:8px; font-weight:800; text-transform:uppercase; }
.receipt-editor-controls .receipt-read-button { border-color:#0a0f14; background:#0a0f14; color:#fff; }
.receipt-editor-note { margin:8px 0 0; color:#637477; font-size:9px; line-height:1.45; }
.scan-needs-review { padding:7px; border:1px solid #e5bc62; border-radius:11px; background:#fff9e9; }
.scan-needs-review::after { content:"Please confirm"; color:#8a5b00; font-size:8px; font-weight:750; }
.scan-learning-consent { grid-template-columns:auto minmax(0,1fr) !important; align-items:start; gap:9px !important; margin:13px 0 !important; padding:11px; border:1px solid #cbded9; border-radius:12px; background:#f4faf8; }
.scan-learning-consent input { width:19px; height:19px; margin:1px 0 0; accent-color:#167d89; }
.scan-learning-consent strong,.scan-learning-consent small { display:block; }
.scan-learning-consent strong { color:#234b47; font-size:10px; }
.scan-learning-consent small { margin-top:3px; color:#6d7f81; font-size:8px; font-weight:500; line-height:1.45; }
.import-receipt-grid { display:grid; grid-template-columns:1fr 1fr; gap:9px; margin-top:11px; }
.import-receipt-grid label { display:grid; gap:5px; color:#455055; font-size:10px; font-weight:800; }
.import-receipt-grid label.full { grid-column:1/-1; }
.import-receipt-grid label > small { color:#829093; font-size:8px; font-weight:500; }
.import-receipt-grid input,.import-receipt-grid select,.import-receipt-grid textarea { box-sizing:border-box; width:100%; padding:10px; border:1px solid rgba(10,15,20,.16); border-radius:10px; color:#0a0f14; background:#fff; font:inherit; font-size:12px; font-weight:500; }
.import-receipt-grid textarea { min-height:74px; resize:vertical; }
.import-receipt-boundary { padding:10px; border:1px solid #ead9a4; border-radius:10px; color:#665722; background:#fff9e9; font-size:9px; line-height:1.5; }
.import-receipt-boundary strong { display:block; margin-bottom:2px; }
.imported-receipt-notice,.imported-recommendation-slot { margin-top:15px; padding:13px; border-radius:13px; }
.imported-receipt-notice { border:1px solid #cddbd8; background:#f5f8f7; }
.imported-recommendation-slot { border:1px dashed #c9d9d5; background:#fbfcfb; }
.imported-receipt-notice span,.imported-recommendation-slot span { display:block; color:#607477; font-size:8px; font-weight:850; letter-spacing:.08em; }
.imported-receipt-notice strong,.imported-recommendation-slot strong { display:block; margin-top:5px; font-size:12px; }
.imported-receipt-notice p,.imported-recommendation-slot p { margin:4px 0 0; color:#65777a; font-size:10px; line-height:1.45; }
.privacy-card { margin-top: 12px; padding: 18px 16px; border: 1px solid rgba(10,15,20,.08); border-radius: 18px; background: #fff; }
.privacy-head h2 { margin: 0; font-size: 17px; }
.privacy-head p { margin: 4px 0 12px; color: #5f6b6f; font-size: 11px; }
.preference-list { display: grid; }
.preference-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid rgba(10,15,20,.08); }
.preference-row strong, .preference-row small { display: block; }
.preference-row strong { font-size: 12px; }
.preference-row small { margin-top: 2px; color: #7a8589; font-size: 10px; line-height: 1.35; }
.preference-row input { width: 21px; height: 21px; flex: 0 0 auto; accent-color: #167d89; }
.preference-status { min-height: 15px; margin: 5px 0 0; color: #0f6e56; font-size: 10px; }
.export-link { margin-top: 8px; }
:where(.case-card,.receipt-help,.help-submit,.case-reply button,.case-detail-actions button,.preference-row input):focus-visible { outline: 3px solid rgba(22,125,137,.35); outline-offset: 2px; }

@media (max-width:380px) {
  .import-receipt-grid { grid-template-columns:1fr; }
  .import-receipt-grid label.full { grid-column:auto; }
  .receipt-editor-controls { grid-template-columns:1fr 1fr; }
  .receipt-editor-controls .receipt-read-button { grid-column:1/-1; }
}

/* Live order tray */
.order-tray { display: grid; gap: 8px; margin-bottom: 12px; }
.order-tray-head { display: flex; align-items: baseline; justify-content: space-between; padding: 0 2px 2px; }
.order-tray-head strong { font-size: 14px; }
.order-tray-head span { color: #0f6e56; font-size: 12px; font-weight: 600; }
.order-cancelled-card { box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; width: 100%; padding: 12px; border: 1px solid #efb6b6; border-radius: 16px; background: #fff1f1; color: #0a0f14; }
.order-cancelled-icon { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; background: #b42318; color: #fff; font-size: 22px; line-height: 1; }
.order-cancelled-copy { min-width: 0; }
.order-cancelled-copy strong, .order-cancelled-copy span, .order-cancelled-copy small, .order-cancelled-copy em { display: block; }
.order-cancelled-copy strong { font-size: 13px; }
.order-cancelled-copy span, .order-cancelled-copy small { margin-top: 2px; color: #6f5151; font-size: 11px; line-height: 1.35; }
.order-cancelled-copy em { margin-top: 5px; color: #8e1b1b; font-size: 11px; font-style: normal; font-weight: 800; }
.order-cancelled-dismiss { padding: 7px 8px; border: 1px solid rgba(180, 35, 24, 0.25); border-radius: 9px; background: #fff; color: #8e1b1b; font-size: 10px; font-weight: 700; cursor: pointer; }
.order-card { box-sizing: border-box; display: grid; grid-template-columns: auto minmax(0, 1fr) max-content; align-items: center; gap: 10px; width: 100%; min-width: 0; max-width: 100%; min-height: 68px; overflow: hidden; border-radius: 16px; padding: 11px 12px; }
.order-card.preparing { background: #fff6e6; border: 1px solid #f2d79a; }
.order-card.ready { background: #e7f7ef; border: 1px solid #a9e0c4; }
.order-card .ob-text { flex: 1; min-width: 0; }
.order-card .ob-text strong { display: block; font-size: 14px; color: #0a0f14; }
.order-card .ob-text small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; color: #5f6b6f; }
.ob-spinner { width: 20px; height: 20px; border: 2.5px solid #e6cf8c; border-top-color: #b8860b; border-radius: 50%; animation: ob-spin 0.9s linear infinite; flex-shrink: 0; }
@keyframes ob-spin { to { transform: rotate(360deg); } }
.order-card .ob-icon { width: 28px; height: 28px; border-radius: 50%; background: #12808c; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; flex-shrink: 0; }
.ob-action-slot { width: auto; min-width: 0; text-align: right; }
.ob-waiting { color: #854f0b; font-size: 11px; font-weight: 600; }
.ob-show { width: auto; min-width: 72px; white-space: nowrap; background: #0a0f14; color: #fff; border: none; border-radius: 9px; padding: 8px 9px; font-size: 11px; font-weight: 700; cursor: pointer; }
.order-summary-button { box-sizing: border-box; width: 100%; min-height: 68px; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid #b9d9dc; border-radius: 16px; background: #edf8f8; color: #0a0f14; text-align: left; cursor: pointer; }
.order-summary-icon { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: #167d89; color: #fff; font-size: 16px; }
.order-summary-copy { min-width: 0; flex: 1; }
.order-summary-copy strong, .order-summary-copy small { display: block; }
.order-summary-copy strong { font-size: 14px; }
.order-summary-copy small { margin-top: 2px; color: #456267; font-size: 12px; }
.order-summary-arrow { color: #167d89; font-size: 26px; line-height: 1; }
.orders-overlay { box-sizing: border-box; position: fixed; inset: 0; z-index: 70; display: flex; align-items: flex-end; justify-content: center; padding: 16px; background: rgba(10, 15, 20, 0.55); backdrop-filter: blur(5px); }
.orders-sheet { box-sizing: border-box; width: 100%; min-width: 0; max-width: 460px; max-height: min(76vh, 640px); overflow: hidden; border-radius: 24px; background: #f5f6f4; box-shadow: 0 18px 60px rgba(0, 0, 0, 0.28); }
.orders-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 12px; background: #fff; border-bottom: 1px solid rgba(10, 15, 20, 0.08); }
.orders-sheet-head h2 { margin: 0; font-size: 18px; }
.orders-sheet-head p { margin: 3px 0 0; color: #5f6b6f; font-size: 12px; }
.orders-sheet-close { width: 34px; height: 34px; border: none; border-radius: 50%; background: #edf0ee; color: #0a0f14; font-size: 24px; line-height: 1; cursor: pointer; }
.orders-scroll-hint { margin: 0; padding: 8px 16px 0; color: #758084; font-size: 11px; }
.orders-sheet-list { box-sizing: border-box; display: grid; gap: 9px; width: 100%; min-width: 0; max-height: min(42vh, 300px); overflow-x: hidden; overflow-y: scroll; scrollbar-gutter: stable; scrollbar-width: thin; scrollbar-color: #167d89 #dfe7e5; padding: 10px 12px 14px; overscroll-behavior: contain; }
.orders-sheet-list::-webkit-scrollbar { width: 8px; }
.orders-sheet-list::-webkit-scrollbar-track { background: #dfe7e5; border-radius: 99px; }
.orders-sheet-list::-webkit-scrollbar-thumb { background: #167d89; border: 2px solid #dfe7e5; border-radius: 99px; }
.pickup-overlay { box-sizing: border-box; position: fixed; inset: 0; z-index: 80; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(10, 15, 20, 0.68); backdrop-filter: blur(6px); }
.pickup-pass { box-sizing: border-box; position: relative; width: 100%; max-width: 380px; max-height: 88vh; overflow-y: auto; border-radius: 26px; padding: 24px 18px 18px; background: #fff; text-align: center; box-shadow: 0 18px 70px rgba(0, 0, 0, 0.3); }
.pickup-close { position: absolute; top: 12px; right: 12px; width: 34px; height: 34px; border: none; border-radius: 50%; background: #edf0ee; color: #0a0f14; font-size: 24px; cursor: pointer; }
.pickup-ready-mark { width: 54px; height: 54px; display: grid; place-items: center; margin: 0 auto 10px; border-radius: 50%; background: #12808c; color: #fff; font-size: 28px; }
.pickup-ready-label { margin: 0 0 5px; color: #0f6e56; font-size: 12px; font-weight: 800; letter-spacing: 0.12em; }
.pickup-pass h2 { margin: 0; font-size: 20px; }
.pickup-instruction { margin: 5px 0 14px; color: #5f6b6f; font-size: 13px; }
.pickup-order-number { margin: 0 0 14px; padding: 12px; border-radius: 14px; background: #e7f7ef; }
.pickup-order-number small, .pickup-order-number strong { display: block; }
.pickup-order-number small { color: #5f6b6f; font-size: 10px; letter-spacing: 0.12em; }
.pickup-order-number strong { margin-top: 2px; font-size: 25px; letter-spacing: 0.05em; }
.pickup-receipt { padding: 12px; border: 1px solid rgba(10, 15, 20, 0.1); border-radius: 14px; text-align: left; }
.pickup-line, .pickup-total { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 13px; }
.pickup-line span { color: #455055; }
.pickup-total { margin-top: 6px; padding-top: 10px; border-top: 1px solid rgba(10, 15, 20, 0.1); font-size: 16px; }
.pickup-no-items { margin: 0 0 8px; color: #5f6b6f; font-size: 12px; line-height: 1.4; }
.pickup-verification, .pickup-mode-card { margin-top: 14px; padding: 13px; border: 1px solid rgba(18, 128, 140, 0.22); border-radius: 14px; background: #f2faf8; text-align: left; }
.pickup-mode-card.open { border-color: #b8dfcf; background: #f2faf7; }
.pickup-mode-card.staff { border-color: #ead9aa; background: #fffaf0; }
.pickup-verify-title { margin: 0; color: #0a0f14; font-size: 13px; font-weight: 800; }
.pickup-verify-copy { margin: 4px 0 10px; color: #5f6b6f; font-size: 11px; line-height: 1.4; }
.pickup-simulate { width: 100%; margin-bottom: 8px; padding: 9px; border: 1px solid #167d89; border-radius: 10px; background: #fff; color: #116b74; font-size: 11px; font-weight: 700; cursor: pointer; }
.pickup-simulate:disabled { opacity: 0.65; }
.pickup-code-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 7px; }
.pickup-code-input { box-sizing: border-box; width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid rgba(10, 15, 20, 0.16); border-radius: 10px; background: #fff; color: #0a0f14; font-size: 13px; letter-spacing: 0.08em; }
.pickup-code-submit { padding: 9px 12px; border: none; border-radius: 10px; background: #167d89; color: #fff; font-size: 11px; font-weight: 700; cursor: pointer; }
.pickup-code-submit:disabled { opacity: 0.6; }
.pickup-proof-status { min-height: 16px; margin: 7px 0 0; color: #a32d2d; font-size: 11px; }
.pickup-proof-status.verified { color: #0f6e56; font-weight: 700; }
.pickup-complete { width: 100%; margin-top: 14px; padding: 12px; border: none; border-radius: 12px; background: #0a0f14; color: #fff; font-size: 13px; font-weight: 700; cursor: pointer; }
.pickup-complete:disabled { opacity: 0.55; }
.pickup-note { margin: 7px 0 0; color: #8b9498; font-size: 11px; }
.pickup-loading { margin: 40px 0; color: #5f6b6f; }
.pickup-success { padding: 42px 10px 32px; text-align: center; }
.pickup-success h2 { margin: 0; font-size: 23px; }
.pickup-success p:last-child { margin: 8px auto 0; max-width: 260px; color: #5f6b6f; font-size: 13px; line-height: 1.45; }
.receipt-cancellation { display: grid; gap: 4px; margin-top: 16px; padding: 14px; border: 1px solid #efb6b6; border-radius: 14px; background: #fff1f1; text-align: left; }
.receipt-cancellation strong { color: #8e1b1b; font-size: 14px; }
.receipt-cancellation span, .receipt-cancellation small { color: #6f5151; font-size: 12px; }
.receipt-cancellation em { margin-top: 4px; color: #8e1b1b; font-size: 12px; font-style: normal; font-weight: 800; }
@media (max-width: 370px) {
  .app-main { padding-inline: 11px; }
  .app-tabbar button { font-size: 10px; }
  .case-card { grid-template-columns: auto minmax(0,1fr); }
  .case-status { grid-column: 2; justify-self: start; }
  .orders-overlay { padding: 10px; }
  .orders-sheet-list { padding-inline: 8px; }
  .order-card { grid-template-columns: 24px minmax(0, 1fr) max-content; gap: 8px; padding-inline: 9px; }
  .order-card .ob-icon { width: 24px; height: 24px; font-size: 14px; }
  .ob-show { min-width: 66px; padding-inline: 7px; font-size: 10px; }
  .order-cancelled-card { grid-template-columns: auto minmax(0, 1fr); }
  .order-cancelled-dismiss { grid-column: 2; justify-self: start; }
}
@media (prefers-reduced-motion: reduce) { .ob-spinner { animation: none; } }

/* Redeem "tap the device" screen */
.redeem-overlay { position: fixed; inset: 0; background: rgba(10, 15, 20, 0.78); backdrop-filter: blur(6px); display: flex; align-items: center; justify-content: center; z-index: 60; padding: 20px; }
.redeem-sheet { background: #fff; border-radius: 26px; padding: 30px 24px 20px; max-width: 320px; width: 100%; text-align: center; }
.redeem-sheet h2 { margin: 4px 0 6px; font-size: 20px; font-weight: 700; }
.redeem-lead { font-size: 14px; color: #5f6b6f; line-height: 1.5; margin: 0 0 14px; }
.redeem-offer { background: #f2faf8; border: 1px dashed rgba(18, 128, 140, 0.5); border-radius: 12px; padding: 10px; font-size: 14px; font-weight: 600; color: #0f6e56; margin-bottom: 12px; }
.redeem-code { font-size: 12px; color: #8b9498; margin: 0 0 18px; }
.redeem-code strong { font-family: ui-monospace, monospace; letter-spacing: 1px; color: #0a0f14; }
.redeem-merchant-note { margin:0 0 14px; padding:9px; border-radius:10px; color:#5f6b6f; background:#f4f6f5; font-size:10px; line-height:1.45; }
.redeem-go { width: 100%; background: #167d89; color: #fff; border: none; border-radius: 12px; padding: 13px; font-size: 15px; font-weight: 600; cursor: pointer; }
.redeem-go:disabled { opacity: 0.6; }
.redeem-cancel { width: 100%; background: none; border: none; color: #8b9498; font-size: 13px; padding: 12px 0 2px; cursor: pointer; }
.redeem-rings { position: relative; width: 96px; height: 96px; margin: 0 auto 14px; display: flex; align-items: center; justify-content: center; }
.redeem-rings span { position: absolute; border: 2px solid #27c9b6; border-radius: 50%; opacity: 0; animation: redeem-pulse 1.8s ease-out infinite; }
.redeem-rings span:nth-child(1) { width: 40px; height: 40px; animation-delay: 0s; }
.redeem-rings span:nth-child(2) { width: 66px; height: 66px; animation-delay: 0.3s; }
.redeem-rings span:nth-child(3) { width: 92px; height: 92px; animation-delay: 0.6s; }
.redeem-rings em { font-size: 30px; color: #12808c; }
@keyframes redeem-pulse { 0% { opacity: 0.7; transform: scale(0.6); } 100% { opacity: 0; transform: scale(1.1); } }
.redeem-done { width: 64px; height: 64px; border-radius: 50%; background: #e1f5ee; color: #0f6e56; display: flex; align-items: center; justify-content: center; font-size: 32px; margin: 0 auto 12px; }
@media (prefers-reduced-motion: reduce) { .redeem-rings span { animation: none; opacity: 0.3; } }

/* Email sign-in */
.email-form { display: grid; gap: 8px; margin: 6px 0 0; }
.email-form input { width: 100%; box-sizing: border-box; border: 1px solid rgba(10, 15, 20, 0.15); border-radius: 12px; padding: 12px; font-size: 15px; }
.email-error { color: #a32d2d; font-size: 12px; margin: 2px 0 0; }
.prototype-code-note { margin: 10px 0 2px; padding: 10px; border-radius: 10px; background: #fff6e6; color: #854f0b; font-size: 13px; }
.prototype-code-note strong { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 18px; letter-spacing: 0.18em; }
.or-sep { display: flex; align-items: center; gap: 10px; color: #9aa2a6; font-size: 12px; margin: 14px 0 10px; }
.or-sep::before, .or-sep::after { content: ""; flex: 1; height: 1px; background: rgba(10, 15, 20, 0.1); }

/* Tapyme customer app shell — coupon wallet + bottom nav. */
.app-page {
  background: #f6f7f5;
  min-height: 100vh;
  margin: 0;
  padding-bottom: 82px;
  -webkit-font-smoothing: antialiased;
}
.app-shell {
  max-width: 460px;
  margin: 0 auto;
  padding: 22px 16px 0;
}
.app-head h1 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 10px 0 4px;
  color: #0a0f14;
}
.app-sub {
  color: #5f6b6f;
  font-size: 13px;
  line-height: 1.5;
  margin: 0;
}

.offer-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}
.offer-card {
  background: #fff;
  border: 1px solid rgba(10, 15, 20, 0.1);
  border-radius: 16px;
  padding: 14px 15px;
}
.offer-card.is-spent { opacity: 0.55; }
.offer-top { display: flex; align-items: center; gap: 12px; }
.offer-ico {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #e1f5ee;
  color: #0f6e56;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.offer-card-visual {
  width: 62px;
  height: 46px;
  flex: 0 0 62px;
  object-fit: cover;
  border: 1px solid rgba(10, 15, 20, 0.08);
  border-radius: 11px;
  background: #edf2f0;
}
.offer-body { flex: 1; min-width: 0; }
.offer-title { margin: 0; font-size: 15px; font-weight: 600; color: #0a0f14; }
.offer-merchant { margin: 2px 0 0; font-size: 12px; color: #5f6b6f; }
.offer-badge {
  font-size: 11px;
  color: #0f6e56;
  background: #e1f5ee;
  padding: 4px 8px;
  border-radius: 8px;
  white-space: nowrap;
}
.offer-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed rgba(10, 15, 20, 0.15);
}
.offer-code {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 14px;
  letter-spacing: 1px;
  font-weight: 600;
  color: #0a0f14;
}
.offer-use {
  background: #167d89;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.offer-use:disabled { opacity: 0.6; }
.offer-error { color: #a32d2d; font-size: 12px; margin-left: 8px; }
.offer-empty { color: #5f6b6f; font-size: 14px; text-align: center; padding: 36px 14px; }

.app-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid rgba(10, 15, 20, 0.1);
  display: flex;
  justify-content: space-around;
  padding: 8px 0 max(8px, env(safe-area-inset-bottom));
  z-index: 20;
}
.app-nav a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 11px;
  color: #8b9498;
  text-decoration: none;
}
.app-nav a.active { color: #0a0f14; font-weight: 600; }
.nav-ico { font-size: 19px; line-height: 1; }

/* Offer slot on the receipt page */
.receipt-offer {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 14px 0 4px;
  padding: 12px 13px;
  border: 1px dashed rgba(18, 128, 140, 0.5);
  border-radius: 14px;
  background: #f2faf8;
}
.receipt-offer .offer-mark {
  width: 40px;
  height: 40px;
  border-radius: 11px;
  background: #e1f5ee;
  color: #0f6e56;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.receipt-offer .offer-visual {
  width: 76px;
  height: 56px;
  flex: 0 0 76px;
  object-fit: cover;
  align-self: center;
  border: 1px solid rgba(10, 15, 20, 0.08);
  border-radius: 11px;
  background: #e8efed;
}
.receipt-offer .offer-copy { flex: 1; min-width: 120px; }
.receipt-offer .offer-copy strong { display: block; font-size: 13px; color: #0a0f14; }
.receipt-offer .offer-copy small { display:block; margin-top:2px; font-size: 11px; color: #5f6b6f; line-height:1.35; }
.receipt-offer .offer-copy .offer-source { margin:0 0 3px; color:#167d70; font-size:9px; font-weight:750; letter-spacing:.04em; text-transform:uppercase; }
.receipt-offer .offer-copy .offer-detail { display:-webkit-box; overflow:hidden; -webkit-box-orient:vertical; -webkit-line-clamp:2; }
.receipt-offer .offer-copy .offer-terms { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.receipt-offer .offer-save {
  background: #167d89;
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}
.offer-saved-note { flex-basis: 100%; font-size: 11px; color: #0f6e56; margin-top: 4px; }
.offer-saved-note a { color: #167d89; }

@media (max-width: 390px) {
  .receipt-offer { gap:8px; padding:10px; }
  .receipt-offer .offer-visual { width:58px; height:48px; flex-basis:58px; }
  .receipt-offer .offer-copy { min-width:0; }
  .receipt-offer .offer-save { margin-left:auto; padding:7px 9px; font-size:11px; }
}

/* Paper-receipt scan: on-device reading + structured item rows */
.scan-status { margin: 10px 0 0; padding: 9px 11px; border-radius: 10px; font-size: 12.5px; font-weight: 600; }
.scan-status.working { background: #fff6e6; border: 1px solid #f2d79a; color: #854f0b; }
.scan-status.done { background: #e7f7ef; border: 1px solid #a9e0c4; color: #0f6e56; }
.scan-status.failed { background: #fdeeee; border: 1px solid #f3c1c1; color: #a32d2d; }
.import-items-block { margin-top: 14px; }
.import-items-head { margin: 0 0 8px; font-size: 13px; font-weight: 600; color: #0a0f14; }
.import-items-head small { color: #8b9498; font-weight: 500; }
.import-item-row { display: grid; grid-template-columns: 1fr 64px 92px 34px; gap: 6px; margin-bottom: 6px; }
.import-item-row input { box-sizing: border-box; width: 100%; border: 1px solid rgba(10, 15, 20, 0.15); border-radius: 10px; padding: 9px 10px; font-size: 14px; }
.ii-remove { border: none; background: #f2f3f1; border-radius: 10px; color: #8b9498; font-size: 17px; cursor: pointer; }
.ii-remove:hover { background: #fdeeee; color: #a32d2d; }
.import-add-item { background: none; border: 1px dashed rgba(18, 128, 140, 0.5); color: #167d89; border-radius: 10px; padding: 9px; width: 100%; font-size: 13px; font-weight: 600; cursor: pointer; }

/* Appointment Calendar */
.appointment-calendar { margin-top: 12px; }
.appointment-label { margin: 0 0 10px; font-size: 12px; font-weight: 600; color: #0a0f14; }
.calendar-dates { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.calendar-date-btn { padding: 10px 6px; background: #fff; border: 1.5px solid #dfe7e5; border-radius: 10px; cursor: pointer; font-size: 11px; font-weight: 600; text-align: center; color: #0a0f14; transition: all .15s ease; }
.calendar-date-btn:hover { border-color: #167d89; background: #f0fffe; }
.calendar-date-btn.active { background: #167d89; color: #fff; border-color: #167d89; }
.calendar-date-btn strong { display: block; font-size: 16px; }
.calendar-date-btn small { display: block; margin-top: 2px; color: #789093; font-weight: 500; }
.calendar-date-btn.active small { color: #fff; }
.calendar-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.calendar-time-btn { padding: 11px 8px; background: #fff; border: 1.5px solid #dfe7e5; border-radius: 10px; cursor: pointer; font-size: 12px; font-weight: 600; color: #0a0f14; transition: all .15s ease; }
.calendar-time-btn:hover { border-color: #167d89; background: #f0fffe; }
.calendar-time-btn.selected { background: #0f6e56; color: #fff; border-color: #0f6e56; }
.calendar-empty { padding: 20px; text-align: center; color: #8b9498; font-size: 13px; border: 1px solid #dfe7e5; border-radius: 10px; }


/* Return/exchange booking calendar (customer) */
.cal-heading { font-size: 13px; font-weight: 600; color: #0a0f14; margin: 8px 0; }
.booking-cal { display: grid; gap: 12px; }
.cal-dates { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.cal-date { flex: 0 0 auto; width: 56px; border: 1px solid rgba(10, 15, 20, 0.15); border-radius: 14px; background: #fff; padding: 8px 0; display: flex; flex-direction: column; align-items: center; gap: 1px; cursor: pointer; }
.cal-date small { font-size: 11px; color: #8b9498; text-transform: uppercase; letter-spacing: 0.04em; }
.cal-date strong { font-size: 18px; color: #0a0f14; line-height: 1.1; }
.cal-date span { font-size: 10px; color: #8b9498; }
.cal-date.active { background: #0a0f14; border-color: #0a0f14; }
.cal-date.active small, .cal-date.active strong, .cal-date.active span { color: #fff; }
.cal-times { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.cal-time { border: 1px solid rgba(10, 15, 20, 0.15); border-radius: 10px; background: #fff; padding: 10px 4px; font-size: 13px; font-weight: 600; color: #0a0f14; cursor: pointer; }
.cal-time.selected { background: #167d89; border-color: #167d89; color: #fff; }
.cal-note { font-size: 13px; color: #5f6b6f; background: #f2f3f1; border-radius: 10px; padding: 12px; margin: 0; line-height: 1.5; }
.cal-blocked { font-size: 13px; color: #8a4b12; background: #fff4e5; border: 1px solid #f2d29a; border-radius: 10px; padding: 12px; margin: 0; line-height: 1.5; }
.cal-loading { font-size: 13px; color: #8b9498; padding: 10px 0; margin: 0; }

/* Booked return/exchange visit on the customer case */
.case-appointment { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px; border: 1px solid #bfe0e2; border-left: 4px solid #167d89; border-radius: 14px; background: #eef7f7; }
.case-appointment .ca-ico { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px; background: #167d89; color: #fff; display: grid; place-items: center; font-size: 17px; }
.case-appointment .ca-body { display: grid; gap: 2px; }
.case-appointment .ca-body strong { font-size: 13px; color: #0a0f14; }
.case-appointment .ca-body > span { font-size: 15px; font-weight: 700; color: #0c5a63; }
.case-appointment .ca-body small { font-size: 11.5px; color: #5f6b6f; margin-top: 2px; }

/* "View original receipt" link */
.detail-original { display: flex; align-items: center; justify-content: center; gap: 6px; margin: 12px 0 2px; padding: 11px; border: 1px solid rgba(10,15,20,.14); border-radius: 12px; background: #fff; color: #167d89; font-size: 13px; font-weight: 600; text-decoration: none; }
.detail-original:hover { border-color: #167d89; background: #f2faf9; }

/* ===== Interactive design pass ===== */

/* View entry: soft fade + rise on every tab/detail switch */
.view-enter { animation: view-in 0.28s cubic-bezier(0.2, 0.8, 0.3, 1); }
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Universal press feedback — the whole app responds to touch */
.press, .feed-row, .scan-receipt, .case-card, .offer-card, .profile-btn, .detail-original,
.offer-use, .help-submit, .cal-time, .cal-date, .order-summary-button {
  transition: transform 0.12s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.press:active, .feed-row:active, .scan-receipt:active, .case-card:active, .profile-btn:active,
.offer-use:active, .help-submit:active, .cal-time:active, .cal-date:active, .order-summary-button:active {
  transform: scale(0.975);
}
.feed-row:hover { border-color: rgba(18, 128, 140, 0.35); box-shadow: 0 6px 18px -10px rgba(10, 15, 20, 0.25); }

/* Month summary hero */
.month-hero { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-bottom: 12px; padding: 16px 18px; border-radius: 20px; color: #eafcf7;
  background: linear-gradient(120deg, #0f4d54 0%, #167d89 55%, #1fa08f 100%);
  box-shadow: 0 14px 30px -16px rgba(15, 77, 84, 0.55); }
.month-hero .mh-copy { display: grid; gap: 2px; min-width: 0; }
.month-hero small { font-size: 11px; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: #a8e6da; }
.month-hero strong { font-size: 28px; letter-spacing: -0.02em; line-height: 1.1; }
.month-hero span { font-size: 12px; color: #cdeee7; }
.month-hero .mh-glyph { font-size: 34px; filter: drop-shadow(0 6px 10px rgba(0,0,0,0.25)); }

/* Feed rows: staggered entrance + chevron */
.feed-list .feed-row { animation: row-in 0.34s cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }
.feed-list .feed-row:nth-child(1) { animation-delay: 0.02s; }
.feed-list .feed-row:nth-child(2) { animation-delay: 0.06s; }
.feed-list .feed-row:nth-child(3) { animation-delay: 0.1s; }
.feed-list .feed-row:nth-child(4) { animation-delay: 0.14s; }
.feed-list .feed-row:nth-child(5) { animation-delay: 0.18s; }
.feed-list .feed-row:nth-child(n+6) { animation-delay: 0.22s; }
@keyframes row-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.feed-chevron { color: #c3cccc; font-size: 18px; margin-left: 2px; }

/* Friendlier empty states */
.app-empty .empty-glyph { display: block; font-size: 40px; margin-bottom: 8px; }

/* Skeleton first paint */
.skeleton-list { display: grid; gap: 10px; padding-top: 4px; }
.skeleton-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px;
  border: 1px solid rgba(10, 15, 20, 0.06); border-radius: 16px; background: #fff; }
.sk-av, .sk-lines i, .sk-amt { background: linear-gradient(90deg, #eef0ef 25%, #f7f8f7 50%, #eef0ef 75%);
  background-size: 200% 100%; animation: shimmer 1.2s linear infinite; border-radius: 8px; }
.sk-av { width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0; }
.sk-lines { flex: 1; display: grid; gap: 7px; }
.sk-lines i { height: 12px; width: 60%; }
.sk-lines i:last-child { width: 38%; height: 10px; }
.sk-amt { width: 52px; height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Tab bar: soft active pill */
.app-tabbar button { position: relative; padding: 7px 14px; border-radius: 14px; transition: color 0.15s ease; }
.app-tabbar button.active { background: #eaf4f3; }
.app-tabbar button.active .tab-ico { transform: translateY(-1px) scale(1.08); }
.app-tabbar .tab-ico { transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1); }
.app-tabbar button:active { transform: scale(0.94); }

@media (prefers-reduced-motion: reduce) {
  .view-enter, .feed-list .feed-row { animation: none; }
  .sk-av, .sk-lines i, .sk-amt { animation: none; }
}
