* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  touch-action: pan-y;
}

button, a, label, input[type="checkbox"] {
  touch-action: manipulation;
}

:root {
  --accent:         #007AFF;
  --accent-dark:    #0062D6;
  --success:        #34C759;
  --danger:         #FF3B30;
  --warning:        #FF9500;
  --bg:             #F2F2F7;
  --surface:        #FFFFFF;
  --text:           #000000;
  --text-secondary: #8E8E93;
  --text-tertiary:  #C7C7CC;
  --separator:      #C6C6C8;
  --separator-light:#E5E5EA;
  --shadow-card:    0 2px 8px rgba(0,0,0,0.07);
  --shadow-modal:   0 -2px 40px rgba(0,0,0,0.12);
  --radius:         14px;
  --radius-sm:      10px;
  --radius-xs:      8px;
}

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'Helvetica Neue', sans-serif;
  font-size: 17px;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* ── Screens ── */
.screen {
  display: none;
  flex-direction: column;
  min-height: 100vh;
  padding-bottom: 88px;
  background: var(--bg);
}
.screen.active { display: flex; }

/* ── Header — iOS navigation bar ── */
.app-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  height: 52px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 0.5px solid var(--separator-light);
}
.app-header h1 {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}
.app-header .seller-name {
  font-size: 13px;
  color: var(--text-secondary);
  max-width: 90px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 0 8px;
}

/* Header nav buttons */
.header-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  padding: 0 10px;
  height: 44px;
  border-radius: 8px;
  font-size: 17px;
  font-weight: 400;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}
.header-btn:active { opacity: 0.5; }

.header-actions {
  display: flex;
  align-items: center;
  position: relative;
  z-index: 1;
}

/* ── Search screen — two-row header ── */
.app-header-search {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--surface);
  border-bottom: 0.5px solid var(--separator-light);
}
.search-nav {
  height: 52px;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.search-nav-brand {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--text);
}
.search-nav-accent { color: #7C3AED; }
.search-nav .seller-name {
  font-size: 15px;
  color: var(--text-secondary);
  font-weight: 400;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.search-nav-right {
  display: flex;
  align-items: center;
  gap: 2px;
}
.btn-logout {
  background: none;
  border: none;
  color: var(--danger);
  font-size: 15px;
  font-weight: 500;
  padding: 0 10px;
  min-height: 44px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  flex-shrink: 0;
}
.btn-logout:active { opacity: 0.5; }
.search-toolbar {
  height: 44px;
  padding: 0 8px;
  display: flex;
  align-items: center;
  gap: 2px;
  border-top: 0.5px solid var(--separator-light);
}
.toolbar-btn {
  background: transparent;
  border: none;
  color: var(--accent);
  padding: 0 10px;
  height: 36px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.toolbar-btn:active { opacity: 0.5; }

/* ── Toggle — iOS size ── */
.toggle-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  user-select: none;
  padding: 4px 8px;
}
.toggle-text {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
  white-space: nowrap;
}
.toggle-switch {
  position: relative;
  display: inline-flex;
  align-items: center;
}
.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.toggle-track {
  display: block;
  width: 51px;
  height: 31px;
  border-radius: 15.5px;
  background: var(--separator-light);
  transition: background 0.22s;
  position: relative;
}
.toggle-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.22);
  transition: transform 0.22s;
}
.toggle-switch input:checked + .toggle-track { background: var(--success); }
.toggle-switch input:checked + .toggle-track::after { transform: translateX(20px); }

/* ── Step dots — segment style ── */
.step-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 12px 0 4px;
}
.step-dot {
  width: 28px;
  height: 4px;
  border-radius: 2px;
  background: var(--separator-light);
  transition: background 0.2s;
}
.step-dot.active { background: var(--accent); }
.step-dot.done   { background: var(--success); }

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin: 10px 16px;
  box-shadow: var(--shadow-card);
}

/* ── PIN screen — light theme ── */
#screen-pin {
  background: #fff;
  align-items: center;
  justify-content: center;
  padding-bottom: 0;
  min-height: 100vh;
  min-height: 100dvh;
}
.pin-container {
  width: 100%;
  max-width: 360px;
  padding: 32px 24px 48px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.pin-logo {
  width: 76px;
  height: 76px;
  border-radius: 20px;
  background: #fff;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 11px;
  margin-bottom: 20px;
  font-size: 26px;
  font-weight: 900;
  color: #000;
  letter-spacing: -1px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 2px 14px rgba(124,58,237,0.22), 0 0 0 1.5px #E5E5EA;
}
.pin-logo::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 28px;
  background: #7C3AED;
}
.pin-logo-accent { color: #7C3AED; }
.pin-title {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  font-size: 32px;
  font-weight: 800;
  text-align: center;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}
.pin-title-accent { color: #7C3AED; }
.pin-subtitle {
  color: var(--text-secondary);
  font-size: 15px;
  text-align: center;
  margin-bottom: 28px;
  font-weight: 400;
}
.pin-dots {
  display: flex;
  gap: 20px;
  margin-bottom: 8px;
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--separator);
  background: transparent;
  transition: background 0.15s, border-color 0.15s;
}
.pin-dot.filled {
  background: var(--text);
  border-color: var(--text);
}
.pin-error {
  color: var(--danger);
  font-size: 15px;
  min-height: 22px;
  text-align: center;
  margin-bottom: 16px;
  font-weight: 500;
}
.pin-error.shake { animation: shake 0.4s ease; }
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-6px); }
  80%       { transform: translateX(6px); }
}

/* iOS-style numpad */
.numpad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  width: 100%;
}
.numpad-btn {
  height: 76px;
  border-radius: 20px;
  border: none;
  background: var(--bg);
  color: var(--text);
  font-size: 26px;
  font-weight: 400;
  cursor: pointer;
  touch-action: manipulation;
  transition: background 0.1s, transform 0.08s;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.numpad-btn:active {
  background: #D1D1D6;
  transform: scale(0.94);
}
.numpad-btn.clear-btn {
  font-size: 14px;
  font-weight: 600;
  background: transparent;
  color: var(--text-secondary);
}
.numpad-btn.back-btn {
  font-size: 22px;
  background: transparent;
}
.numpad-spacer { visibility: hidden; }

/* ── Chips ── */
.chips-wrap {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.chips-wrap::-webkit-scrollbar { display: none; }
.chip {
  flex-shrink: 0;
  height: 36px;
  padding: 0 16px;
  border-radius: 18px;
  border: 1.5px solid var(--separator-light);
  background: var(--surface);
  color: var(--text-secondary);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
  display: flex;
  align-items: center;
  font-family: inherit;
}
.chip.active {
  border-color: transparent;
  background: #000;
  color: #fff;
}

/* ── Search ── */
.search-wrap { padding: 8px 16px 0; }
.search-input {
  width: 100%;
  height: 44px;
  padding: 0 16px 0 40px;
  border: none;
  border-radius: 12px;
  font-size: 16px;
  background: var(--surface);
  color: var(--text);
  outline: none;
  font-family: inherit;
  box-shadow: var(--shadow-card);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='11' cy='11' r='7' stroke='%238E8E93' stroke-width='2'/%3E%3Cpath d='m16.5 16.5 4 4' stroke='%238E8E93' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 14px center;
  transition: box-shadow 0.2s;
}
.search-input:focus { box-shadow: 0 2px 14px rgba(0,0,0,0.11); }

/* ── Product list ── */
.product-list {
  padding: 8px 16px;
  flex: 1;
}
.product-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.1s, box-shadow 0.15s;
  box-shadow: var(--shadow-card);
  border: 2px solid transparent;
}
.product-card:active { transform: scale(0.99); }
.product-card.selected {
  border-color: var(--text);
  box-shadow: 0 4px 18px rgba(0,0,0,0.12);
}
.product-name {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 3px;
  letter-spacing: -0.2px;
}
.product-meta {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: 10px;
}
.sizes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 10px;
}
.size-badge {
  padding: 3px 8px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  background: #E8F8EC;
  color: #1A7A35;
}
.product-price {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.3px;
}
.empty-state {
  text-align: center;
  padding: 48px 16px;
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.6;
}

/* ── Size grid ── */
.size-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 0 16px;
}
.size-btn {
  height: 60px;
  border-radius: 14px;
  border: none;
  background: var(--surface);
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  font-family: inherit;
  box-shadow: var(--shadow-card);
}
.size-btn.available:active { transform: scale(0.94); }
.size-btn.selected {
  background: #000;
  color: #fff;
  box-shadow: 0 4px 16px rgba(0,0,0,0.22);
}
.size-btn:disabled {
  background: var(--surface);
  color: var(--text-tertiary);
  cursor: not-allowed;
  box-shadow: none;
  opacity: 0.45;
}

/* ── Form fields ── */
.form-group { margin: 0 16px 14px; }
.form-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.form-input {
  width: 100%;
  height: 54px;
  padding: 0 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  background: var(--surface);
  outline: none;
  transition: box-shadow 0.18s;
  font-family: inherit;
  box-shadow: var(--shadow-card);
}
.form-input:focus { box-shadow: 0 0 0 2.5px var(--accent); }
.form-textarea {
  width: 100%;
  padding: 14px 16px;
  border: none;
  border-radius: var(--radius);
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  outline: none;
  resize: none;
  min-height: 88px;
  transition: box-shadow 0.18s;
  font-family: inherit;
  box-shadow: var(--shadow-card);
}
.form-textarea:focus { box-shadow: 0 0 0 2.5px var(--accent); }

/* ── Summary rows ── */
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 12px 0;
  border-bottom: 0.5px solid var(--separator-light);
}
.summary-row:last-child { border-bottom: none; }
.summary-label {
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-right: 12px;
  font-size: 15px;
  font-weight: 400;
}
.summary-value {
  font-weight: 500;
  text-align: right;
  font-size: 15px;
}

/* ── Buttons — Revolut style ── */
.btn {
  display: block;
  width: calc(100% - 32px);
  margin: 8px 16px;
  height: 56px;
  border-radius: 14px;
  border: none;
  font-size: 17px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-align: center;
  font-family: inherit;
  letter-spacing: -0.2px;
}
.btn:active { transform: scale(0.98); opacity: 0.82; }
.btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.btn-primary  { background: #000; color: #fff; }
.btn-success  { background: var(--success); color: #fff; }
.btn-secondary {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}
.btn-ghost {
  background: transparent;
  color: var(--accent);
  font-weight: 500;
  font-size: 16px;
}
.btn-danger { background: var(--danger); color: #fff; }

/* ── Fixed bottom bar ── */
.bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 0.5px solid var(--separator-light);
  padding: 8px 0 12px;
  z-index: 50;
}

/* ── Success screen ── */
.success-icon {
  margin: 48px auto 16px;
  width: 80px;
  height: 80px;
  border-radius: 40px;
  background: var(--success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 34px;
  color: #fff;
  line-height: 1;
}
.success-title {
  font-size: 26px;
  font-weight: 800;
  text-align: center;
  color: var(--text);
  margin-bottom: 4px;
  letter-spacing: -0.5px;
}

/* ── History ── */
.history-list { padding: 8px 16px; }
.history-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 10px;
  font-size: 15px;
  box-shadow: var(--shadow-card);
}
.history-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}
.history-product-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.2px;
}
.history-price {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.2px;
}
.history-meta {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 14px;
}

/* ── Owner panel ── */
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
  padding: 20px 16px 8px;
}
.pending-card {
  background: var(--surface);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin: 0 16px 10px;
  font-size: 15px;
  box-shadow: var(--shadow-card);
}
.pending-card.manual {
  border-left: 3px solid var(--danger);
}
.pending-top {
  display: flex;
  justify-content: space-between;
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 4px;
  letter-spacing: -0.2px;
}
.pending-meta {
  color: var(--text-secondary);
  line-height: 1.6;
  font-size: 13px;
}
.result-banner {
  margin: 12px 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  text-align: center;
}
.result-banner.success { background: #E8F8EC; color: #1A7A35; }
.result-banner.error   { background: #FFF0EF; color: #C0392B; }

/* ── Loading overlay ── */
.loading-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(255,255,255,0.88);
  z-index: 999;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 16px;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.loading-overlay.visible { display: flex; }
.spinner {
  width: 36px;
  height: 36px;
  border: 3px solid var(--separator-light);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text {
  font-size: 15px;
  color: var(--text-secondary);
}

/* ── Product info block ── */
.product-info-block {
  margin: 16px 16px 8px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-card);
}
.product-info-title {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 2px;
  letter-spacing: -0.3px;
}
.product-info-sub {
  font-size: 13px;
  color: var(--text-secondary);
}

/* ── Section label ── */
.section-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 16px 16px 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.no-results {
  text-align: center;
  padding: 40px 16px;
  color: var(--text-secondary);
  font-size: 15px;
}

/* ── Manual sale ── */
.manual-badge {
  display: inline-block;
  background: #FFF0EF;
  color: var(--danger);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
}
.manual-sale-notice {
  margin: 16px 16px 0;
  padding: 14px 16px;
  background: #FFF0EF;
  color: #C0392B;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
}

#screen-search { padding-bottom: 140px; }

/* ── Toast ── */
.toast {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%) translateY(12px);
  background: rgba(0,0,0,0.84);
  color: #fff;
  padding: 12px 22px;
  border-radius: 24px;
  font-size: 15px;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s, transform 0.2s;
  z-index: 1001;
  font-weight: 500;
}
.toast.visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast.toast-error { background: var(--danger); }

/* ── Edit button ── */
.edit-btn {
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  font-size: 16px;
  border-radius: 8px;
  color: var(--text-secondary);
  min-height: 36px;
  min-width: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.edit-btn:active { background: var(--separator-light); }

/* ── Pending card layout ── */
.pending-card-inner {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.pending-check {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  flex-shrink: 0;
  accent-color: var(--text);
  cursor: pointer;
}
.pending-card-content {
  flex: 1;
  min-width: 0;
}

/* ── Pending status badge ── */
.pending-status-badge {
  display: inline-block;
  background: #FFF9E6;
  color: #8A6800;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  margin-top: 6px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── History card actions ── */
.history-card-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

/* ── Owner section title row ── */
.section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 16px 8px;
}
.section-title-text {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.select-all-btn {
  background: none;
  border: none;
  color: var(--accent);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  font-family: inherit;
}
.select-all-btn:active { opacity: 0.6; }

/* ── Modals — iOS bottom sheet ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.35);
  z-index: 800;
  align-items: flex-end;
  justify-content: center;
}
.modal-overlay.visible { display: flex; }

/* Alert-style modal (delete confirm) stays centered */
.modal-overlay.modal-alert {
  align-items: center;
  padding: 20px;
}
.modal-overlay.modal-alert .modal-card {
  border-radius: 16px;
  padding: 24px 20px 16px;
  max-width: 320px;
}

.modal-card {
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  padding: 24px 20px 40px;
  width: 100%;
  max-width: 600px;
  max-height: 92vh;
  overflow-y: auto;
  box-shadow: var(--shadow-modal);
}
.modal-title {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 20px;
  color: var(--text);
  letter-spacing: -0.4px;
  text-align: center;
}
.modal-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 0.5px solid var(--separator-light);
}
.modal-actions .btn {
  width: auto;
  flex: 1;
  margin: 0;
  height: 52px;
  font-size: 16px;
}

/* ── Edit modal catalog search ── */
.edit-search-input { font-size: 16px; font-weight: 400; height: 48px; }
.edit-search-results {
  border: none;
  border-radius: var(--radius-sm);
  overflow: hidden;
  max-height: 220px;
  overflow-y: auto;
  margin-top: 6px;
  box-shadow: var(--shadow-card);
}
.edit-search-item {
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 0.5px solid var(--separator-light);
  transition: background 0.1s;
  background: var(--surface);
}
.edit-search-item:last-child { border-bottom: none; }
.edit-search-item:active { background: var(--bg); }
.edit-search-name { font-size: 15px; font-weight: 500; color: var(--text); }
.edit-search-meta { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.edit-search-empty {
  padding: 16px;
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  background: var(--surface);
}
.edit-name-display {
  background: var(--bg);
  color: var(--text-secondary);
  cursor: default;
  pointer-events: none;
}
.edit-catalog-warning {
  background: #FFFBEB;
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #78350F;
  margin-top: 12px;
}
.edit-stock-warning {
  background: #FFF0EF;
  border-radius: var(--radius-xs);
  padding: 12px 16px;
  font-size: 14px;
  line-height: 1.4;
  color: #C0392B;
  margin-top: 4px;
}

/* ── Payment badge ── */
.payment-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 8px;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

/* ── History badges row ── */
.history-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

/* ── Pull-to-refresh ── */
.ptr-wrap {
  height: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  will-change: height;
}
.ptr-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 0;
  color: var(--text-secondary);
  font-size: 14px;
}
.ptr-arrow {
  display: inline-block;
  font-size: 18px;
  color: var(--accent);
  transition: transform 0.2s ease;
  line-height: 1;
}
.ptr-arrow.ptr-ready { transform: rotate(180deg); }
.ptr-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid var(--separator-light);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

/* ── Revenue summary ── */
.revenue-summary {
  margin: 8px 16px 4px;
  padding: 20px;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.revenue-total-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 14px;
}
.revenue-total-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.6px;
}
.revenue-total-amount {
  font-size: 30px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.8px;
}
.revenue-breakdown {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.revenue-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
}

/* ── Splash screen ── */
.splash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.splash.fade-out {
  opacity: 0;
  pointer-events: none;
}
.splash-icon {
  width: 110px;
  height: 110px;
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 8px 32px rgba(0,0,0,0.13), 0 0 0 0.5px rgba(0,0,0,0.07);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: splashPop 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}
@keyframes splashPop {
  from { transform: scale(0.72); opacity: 0; }
  to   { transform: scale(1);    opacity: 1; }
}
.splash-icon-top {
  height: 40px;
  background: #7C3AED;
}
.splash-icon-bottom {
  flex: 1;
  display: flex;
  align-items: flex-end;
  padding: 0 10px 8px;
  gap: 1px;
}
.splash-icon-s {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #000;
  line-height: 1;
  letter-spacing: -1px;
}
.splash-icon-p {
  font-family: 'DM Sans', -apple-system, sans-serif;
  font-size: 40px;
  font-weight: 900;
  color: #7C3AED;
  line-height: 1;
  letter-spacing: -1px;
}
