/* ═══════════════════════════════════════════════════
   ui-form.css — Shared mobile form page styles
   Used by every form page (customer groups, etc.)
   ═══════════════════════════════════════════════════ */

/* form/view header — white to match the global app bar */
.ord-app-bar {
  background: #fff;
  border-bottom: 1px solid var(--app-border);
  box-shadow: 0 2px 12px rgba(15,23,42,0.06);
}
.ord-app-bar .app-bar-icon { background: transparent; color: #475569; border-radius: 11px; }
.ord-app-bar .app-bar-icon:hover, .ord-app-bar .app-bar-icon:active { background: #f1f5f9; color: #0f172a; }
.ord-app-bar .app-bar-title { color: #0f172a; }

.form-page-title {
  font-size: 20px; font-weight: 800; color: #0f172a;
  padding: 6px 16px 18px;
}

.seg-wrap { padding: 0 16px 18px; }
.seg-ctrl {
  display: inline-flex;
  background: #f1f5f9; border-radius: 10px; padding: 3px; gap: 2px;
}
.seg-btn {
  padding: 6px 18px; border: none; border-radius: 8px;
  font-size: 13px; font-weight: 600; cursor: pointer;
  background: transparent; color: #64748b;
  transition: all 0.18s;
}
.seg-btn.active {
  background: #fff; color: #0f172a;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

.form-section { padding: 0 16px; }
.form-section .form-floating { margin-bottom: 14px; }

.form-floating > .form-control,
.form-floating > .form-select {
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  box-shadow: none;
  padding-left: 14px;
}
.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
  border-color: #1a56db;
  box-shadow: 0 0 0 3px rgba(26,86,219,0.10);
}
.form-floating > label {
  padding-left: 14px;
  color: #94a3b8;
  font-size: 13px;
}
.form-floating > .form-control:not(:placeholder-shown) ~ label,
.form-floating > .form-control:focus ~ label { color: #1a56db; }
.form-floating textarea.form-control { height: 96px; padding-top: 22px; resize: none; }

.char-hint {
  font-size: 11px; color: #94a3b8; text-align: right;
  margin-top: 4px; padding-right: 4px;
}
.char-hint.warn { color: #f59e0b; }
.char-hint.err  { color: #dc2626; }

.section-label {
  font-size: 11px; font-weight: 700; color: #94a3b8;
  text-transform: uppercase; letter-spacing: 0.7px;
  padding: 20px 16px 10px;
}

.setting-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 14px; padding: 14px 0; border-bottom: 1px solid #f1f5f9;
  margin-bottom: 6px;
}
.setting-title { font-size: 14px; font-weight: 600; color: #0f172a; }
.setting-sub   { font-size: 12px; color: #94a3b8; margin-top: 2px; line-height: 1.4; }

.tog { position: relative; display: inline-block; width: 48px; height: 28px; flex-shrink: 0; cursor: pointer; }
.tog input { opacity: 0; width: 0; height: 0; }
.tog-track {
  position: absolute; inset: 0;
  background: #e2e8f0; border-radius: 28px;
  transition: background 0.2s;
}
.tog-knob {
  position: absolute; top: 3px; left: 3px;
  width: 22px; height: 22px; background: #fff;
  border-radius: 50%; box-shadow: 0 1px 4px rgba(0,0,0,0.18);
  transition: transform 0.2s;
}
.tog input:checked + .tog-track { background: #1a56db; }
.tog input:checked + .tog-track .tog-knob { transform: translateX(20px); }

.lang-pane { display: none; }
.lang-pane.active { display: block; }

.form-floating.has-error > .form-control { border-color: #dc2626; }
.field-error { font-size: 11px; color: #dc2626; margin-top: 4px; padding-left: 4px; display: none; }

/* ── Success snackbar ── */
.form-snack {
  position: fixed;
  bottom: calc(68px + env(safe-area-inset-bottom, 0px) + 8px);
  left: 50%; transform: translateX(-50%) translateY(16px);
  width: calc(100% - 32px); max-width: 398px;
  background: #0f172a; color: #fff; border-radius: 12px;
  padding: 13px 14px; display: flex; align-items: center; gap: 10px;
  opacity: 0; transition: opacity 0.22s, transform 0.22s;
  z-index: 32; pointer-events: none;
}
.form-snack.show {
  opacity: 1; transform: translateX(-50%) translateY(0); pointer-events: auto;
}
.form-snack-msg { flex: 1; font-size: 13px; font-weight: 500; }
.form-snack-act {
  background: rgba(255,255,255,0.18); color: #fff;
  border: none; border-radius: 8px;
  padding: 6px 12px; font-size: 12px; font-weight: 700;
  cursor: pointer; flex-shrink: 0; white-space: nowrap;
}
.form-snack-act:active { background: rgba(255,255,255,0.30); }

@keyframes spin { to { transform: rotate(360deg); } }

/* ── Order settings: reward/commission action buttons + affiliate autocomplete ── */
.os-act-btn {
  flex-shrink: 0; padding: 8px 16px; border-radius: 10px;
  border: none; background: #1a56db; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.os-act-btn.rm { background: #fee2e2; color: #dc2626; }
.os-act-btn:disabled { opacity: .4; cursor: default; }
.os-ac-list {
  position: absolute; right: 0; top: 100%; z-index: 40;
  min-width: 220px; max-height: 200px; overflow-y: auto;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 12px;
  box-shadow: 0 8px 24px rgba(15,23,42,.12);
}
.os-ac-item {
  padding: 11px 14px; font-size: 13px; font-weight: 600; color: #0f172a;
  cursor: pointer; border-bottom: 1px solid #f8fafc;
}
.os-ac-item:last-child { border-bottom: none; }
.os-ac-item:active { background: #eff6ff; }

/* ── Custom fields (account + address) ── */
.cf-check-row {
  display: flex; align-items: center; gap: 10px; padding: 9px 2px;
  font-size: 13px; color: #0f172a; cursor: pointer;
}
.cf-check-row input { width: 17px; height: 17px; accent-color: #1a56db; flex-shrink: 0; }

/* ── Pick rows + qty stepper (returns form) ── */
.pick-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 13px 2px; border-bottom: 1px solid #f1f5f9; }
.pick-row:last-child { border-bottom: none; }
.pick-lbl { font-size: 13px; color: #64748b; font-weight: 600; flex-shrink: 0; }
.pick-val { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #0f172a; text-align: right; min-width: 0; }
.pick-val.empty { color: #94a3b8; font-weight: 500; }
/* Tabler core ships an `.empty` empty-state component (flex column, centered, 1rem padding).
   Our `empty` is a value-placeholder modifier — re-assert layout inside our components. */
.pick-val.empty,
.addr-val .empty {
  display: inline-flex; flex-direction: row; align-items: center;
  justify-content: flex-end; height: auto; padding: 0; text-align: right;
}
.pick-val i { color: #cbd5e1; font-size: 16px; flex-shrink: 0; }
.qty-step { display: flex; align-items: center; gap: 2px; background: #f1f5f9; border-radius: 10px; padding: 3px; }
.qty-btn { width: 30px; height: 30px; border: none; background: none; color: #1a56db; font-size: 16px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.qty-btn:active { opacity: .6; }
.qty-num { min-width: 30px; text-align: center; font-size: 14px; font-weight: 700; color: #0f172a; }

/* ── History "load older" button ── */
.hist-more-btn {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; padding: 11px 0; margin-top: 4px;
  border: 1.5px dashed #e2e8f0; border-radius: 12px;
  background: transparent; color: #1a56db;
  font-size: 13px; font-weight: 700; cursor: pointer;
}
.hist-more-btn:active { background: #f8fafc; }
.hist-more-btn:disabled { opacity: .5; cursor: default; }

/* ── Extension tabs card (existing orders) ── */
.ext-tab-block { padding: 14px 16px; border-bottom: 1px solid #f1f5f9; overflow-x: auto; }
.ext-tab-block:last-child { border-bottom: none; }
.ext-tab-title {
  font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 10px;
  display: flex; align-items: center; gap: 6px;
}
.ext-tab-content { font-size: 13px; }
.ext-tab-content table { width: 100%; border-collapse: collapse; font-size: 12px; }
.ext-tab-content td, .ext-tab-content th { padding: 6px 8px; border: 1px solid #f1f5f9; }

/* ── Refresh button in save bar (order form — mirrors default template's outline refresh) ── */
.btn-refresh-bar {
  width: 48px; height: 48px; flex-shrink: 0;
  background: #fff; color: #1a56db;
  border: 1.5px solid #1a56db; border-radius: 12px;
  font-size: 20px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.btn-refresh-bar:active { background: #eff6ff; }
.btn-refresh-bar:disabled { opacity: .6; cursor: default; }

/* ── Multi-step form: section cards ── */
.section-card  { background: #fff; border-radius: 16px; margin: 0 16px 10px; padding: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.05); }
.section-title { font-size: 11px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }

/* ── Custom field (non-floating label) ── */
.field-row   { margin-bottom: 14px; }
.field-row:last-child { margin-bottom: 0; }
.field-label { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 5px; display: flex; align-items: center; gap: 4px; }
.field-label .req { color: #dc2626; }
.field-input { width: 100%; padding: 12px 14px; border: 1.5px solid #e2e8f0; border-radius: 12px; font-size: 14px; color: #0f172a; background: #f8fafc; outline: none; -webkit-appearance: none; box-sizing: border-box; }
.field-input:focus    { border-color: #1a56db; background: #fff; }
.field-input.readonly { background: #f1f5f9; color: #64748b; cursor: default; }
.field-input.is-error { border-color: #dc2626; background: #fff1f2; }
.field-hint  { font-size: 11px; color: #94a3b8; margin-top: 3px; }

/* ── Autocomplete wrapper ── */
.ac-wrap { position: relative; }

/* ── Balance box ── */
.bal-box       { background: #f8fafc; border-radius: 12px; padding: 10px 14px; margin-top: 6px; display: none; }
.bal-box.show  { display: block; }
.bal-box-label { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .5px; margin-bottom: 6px; }
.bal-box-name  { font-size: 15px; font-weight: 800; color: #0f172a; margin-bottom: 3px; }
.bal-box-val   { font-size: 12px; color: #64748b; margin-top: 3px; }
.bal-box-val span { font-weight: 700; color: #059669; }

/* ── Flow arrow (transfer direction indicator) ── */
.flow-arrow      { display: flex; align-items: center; justify-content: center; padding: 8px 0; }
.flow-arrow-line { flex: 1; height: 1px; background: #e2e8f0; }
.flow-arrow-icon { width: 32px; height: 32px; border-radius: 10px; background: #eff6ff; color: #1a56db; display: flex; align-items: center; justify-content: center; font-size: 16px; margin: 0 8px; flex-shrink: 0; }

/* ── Review step ── */
.review-card         { background: #f8fafc; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.review-row          { display: flex; justify-content: space-between; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid #e2e8f0; }
.review-row:last-child { border-bottom: none; }
.review-key          { font-size: 12px; color: #64748b; font-weight: 600; }
.review-val          { font-size: 13px; font-weight: 700; color: #0f172a; text-align: right; max-width: 60%; }
.review-amount-row   { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: #eff6ff; border-radius: 14px; margin-top: 8px; }
.review-amount-label { font-size: 13px; font-weight: 700; color: #1a56db; }
.review-amount-val   { font-size: 18px; font-weight: 800; color: #1a56db; }
.post-bal-grid       { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.post-bal-from       { background: #fff1f2; border-radius: 12px; padding: 12px; }
.post-bal-to         { background: #f0fdf4; border-radius: 12px; padding: 12px; }
.post-bal-label      { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .4px; margin-bottom: 4px; }
.post-bal-name       { font-size: 12px; font-weight: 700; color: #0f172a; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.post-bal-val.from-val { font-size: 14px; font-weight: 800; color: #dc2626; }
.post-bal-val.to-val   { font-size: 14px; font-weight: 800; color: #16a34a; }

/* ── Form warning/error alert banner ── */
.form-alert      { background: #fff7ed; border: 1.5px solid #fed7aa; border-radius: 12px; padding: 12px 14px; margin: 0 16px 10px; font-size: 12px; color: #c2410c; display: none; }
.form-alert.show { display: block; }

/* ── Success modal overlay ── */
.success-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.success-overlay.show { opacity: 1; pointer-events: auto; }
.success-modal   { background: #fff; border-radius: 20px; width: 100%; max-width: 360px; padding: 32px 24px 24px; text-align: center; transform: scale(.92) translateY(12px); transition: transform .2s, opacity .2s; box-shadow: 0 20px 60px rgba(0,0,0,.18); }
.success-overlay.show .success-modal { transform: scale(1) translateY(0); }
.success-icon    { width: 68px; height: 68px; border-radius: 50%; background: #dcfce7; color: #16a34a; display: flex; align-items: center; justify-content: center; font-size: 34px; margin: 0 auto 18px; }
.success-title   { font-size: 18px; font-weight: 800; color: #0f172a; margin-bottom: 6px; }
.success-sub     { font-size: 13px; color: #94a3b8; line-height: 1.6; margin-bottom: 24px; }
.success-actions { display: flex; gap: 10px; }
.success-actions .btn-list { flex: 1; height: 46px; border-radius: 12px; border: none; background: linear-gradient(135deg,#0f172a,#334155); font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }
.success-actions .btn-more { flex: 1; height: 46px; border-radius: 12px; border: none; background: linear-gradient(135deg,#1a56db,#7c3aed); font-size: 14px; font-weight: 700; color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 6px; }

/* ═══════════════════════════════════════════════════
   Order / Sale form — shared across sale, return,
   purchase, subscription form pages
   ═══════════════════════════════════════════════════ */

/* ── Floating Label ── */
.fl-wrap { position: relative; }
.fl-inp {
  width: 100%; height: 52px;
  padding: 20px 12px 7px;
  border: 1.5px solid #e2e8f0; border-radius: 12px;
  font-size: 14px; color: #0f172a;
  background: #f8fafc; outline: none;
  box-sizing: border-box; -webkit-appearance: none;
  transition: border-color .15s;
}
.fl-inp:focus { border-color: #1a56db; background: #fff; }
.fl-inp.has-act { padding-right: 44px; }
.fl-lbl {
  position: absolute; left: 13px; top: 16px;
  font-size: 14px; color: #94a3b8;
  pointer-events: none; transition: .15s; white-space: nowrap;
}
.fl-inp.has-val ~ .fl-lbl,
.fl-inp:focus ~ .fl-lbl {
  top: 7px; font-size: 10px;
  font-weight: 700; color: #64748b; letter-spacing: .3px;
}
.fl-act {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  width: 30px; height: 30px; border-radius: 9px;
  background: #eff6ff; border: none; color: #1a56db;
  font-size: 14px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.fl-act:active { background: #dbeafe; }
/* wide action button (icon + text) inside a floating-label input, e.g. "Load" on the returns form */
.fl-inp.has-act-wide { padding-right: 96px; }
.fl-act-wide {
  position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  height: 36px; padding: 0 14px; border-radius: 10px;
  background: #1a56db; border: none; color: #fff;
  font-size: 13px; font-weight: 700; cursor: pointer;
  display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.fl-act-wide i { font-size: 15px; }
.fl-act-wide:active { opacity: .85; }
.fl-act-wide:disabled { opacity: .5; cursor: default; }

/* ── Invoice / Date two-column row ── */
.inv-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 0 12px; }

/* ── Section card ── */
.sc { background: #fff; border-radius: 16px; padding: 14px 16px; margin-bottom: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.sc-title { font-size: 10px; font-weight: 700; color: #94a3b8; text-transform: uppercase; letter-spacing: .9px; margin-bottom: 12px; display: flex; align-items: center; gap: 5px; }
.sc-title i { font-size: 13px; }

/* ── Input Group (search bar + icon button) ── */
.ig { display: flex; align-items: center; border: 1.5px solid #e2e8f0; border-radius: 12px; background: #f8fafc; overflow: hidden; transition: border-color .15s; }
.ig:focus-within { border-color: #1a56db; background: #fff; }
.ig-inp { flex: 1; border: none; background: transparent; outline: none; padding: 11px 12px; font-size: 14px; color: #0f172a; min-width: 0; font-family: inherit; }
.ig-inp::placeholder { color: #cbd5e1; }
.ig-btn { flex-shrink: 0; width: 46px; height: 44px; border: none; border-left: 1px solid #e2e8f0; background: #fff; color: #475569; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 17px; }
.ig-btn:active { background: #f1f5f9; color: #1a56db; }

/* ── Autocomplete dropdown ── */
.ac-drop { position: absolute; top: calc(100% + 4px); left: 0; right: 0; background: #fff; border: 1.5px solid #e2e8f0; border-radius: 14px; z-index: 60; box-shadow: 0 8px 24px rgba(0,0,0,.13); overflow: hidden; display: none; }
.ac-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; cursor: pointer; border-bottom: 1px solid #f8fafc; }
.ac-item:last-child { border-bottom: none; }
.ac-item:active { background: #f8fafc; }
.ac-av { width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.ac-item-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.ac-item-sub { font-size: 11px; color: #94a3b8; margin-top: 1px; }

/* ── Customer selected card ── */
.cust-row { display: flex; align-items: flex-start; gap: 12px; padding-bottom: 12px; }
.cust-av-lg { width: 48px; height: 48px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 18px; font-weight: 700; flex-shrink: 0; }
.cust-pinfo { flex: 1; min-width: 0; cursor: pointer; }
.cust-fullname { font-size: 15px; font-weight: 700; color: #0f172a; }
.cust-sub-email { font-size: 12px; color: #64748b; margin-top: 3px; display: flex; align-items: center; gap: 4px; }
.cust-sub-email i { font-size: 12px; color: #94a3b8; }
.cust-grp-chip { display: inline-flex; align-items: center; padding: 2px 10px; border-radius: 20px; font-size: 11px; font-weight: 700; background: #eff6ff; color: #1a56db; margin-top: 5px; }
.btn-cust-chg { flex-shrink: 0; padding: 6px 13px; border: 1.5px solid #e2e8f0; border-radius: 20px; background: #fff; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; }
.btn-cust-chg:active { background: #f1f5f9; }
.cust-edit-row { display: flex; align-items: center; gap: 8px; padding: 11px 0 0; border-top: 1px solid #f8fafc; color: #475569; font-size: 13px; font-weight: 500; cursor: pointer; }
.cust-edit-row i:last-child { margin-left: auto; color: #cbd5e1; font-size: 15px; }
.cust-edit-row:active { color: #1a56db; }

/* ── Sheet floating labels ── */
.sfl-wrap { position: relative; margin-bottom: 14px; }
.sfl-inp { width: 100%; padding: 22px 14px 8px; border: 1.5px solid #e2e8f0; border-radius: 12px; font-size: 14px; color: #0f172a; background: #f8fafc; outline: none; font-family: inherit; transition: .15s; -webkit-appearance: none; }
.sfl-inp:focus { border-color: #1a56db; background: #fff; }
.sfl-lbl { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); font-size: 14px; color: #94a3b8; pointer-events: none; transition: all .15s; line-height: 1; }
.sfl-inp:focus ~ .sfl-lbl,
.sfl-inp.has-val ~ .sfl-lbl,
.sfl-inp:not(:placeholder-shown) ~ .sfl-lbl { top: 11px; transform: none; font-size: 10px; font-weight: 700; color: #1a56db; letter-spacing: .5px; text-transform: uppercase; }

/* ── Selectable group / category chips ── */
.grp-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.grp-chip { padding: 7px 14px; border: 1.5px solid #e2e8f0; border-radius: 20px; background: #f8fafc; color: #475569; font-size: 12px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: all .15s; }
.grp-chip.sel { border-color: #1a56db; background: #eff6ff; color: #1a56db; }

/* ── Change-entity search dialog ── */
.cm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.5); z-index: 800; display: flex; align-items: center; justify-content: center; padding: 20px 16px; opacity: 0; pointer-events: none; transition: opacity .2s; }
.cm-overlay.show { opacity: 1; pointer-events: auto; }
.cm-dialog { background: #fff; border-radius: 20px; width: 100%; max-width: 398px; overflow: hidden; max-height: 82dvh; display: flex; flex-direction: column; transform: scale(.95); transition: transform .2s; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.cm-overlay.show .cm-dialog { transform: scale(1); }
.cm-hd { padding: 16px 18px 14px; border-bottom: 1px solid #f1f5f9; display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.cm-hd-ico { width: 36px; height: 36px; border-radius: 10px; background: #eff6ff; display: flex; align-items: center; justify-content: center; color: #1a56db; font-size: 18px; flex-shrink: 0; }
.cm-title { font-size: 16px; font-weight: 800; color: #0f172a; flex: 1; }
.cm-close { width: 34px; height: 34px; border-radius: 10px; border: none; background: #f1f5f9; color: #64748b; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 17px; flex-shrink: 0; }
.cm-body { flex: 1; overflow-y: auto; padding: 14px 18px; }
.cm-search-row { display: flex; align-items: center; gap: 8px; background: #f1f5f9; border-radius: 12px; padding: 10px 13px; margin-bottom: 12px; }
.cm-search-row i { font-size: 16px; color: #94a3b8; flex-shrink: 0; }
.cm-search-inp { flex: 1; border: none; background: transparent; font-size: 14px; color: #0f172a; outline: none; font-family: inherit; }
.cm-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1.5px solid #f1f5f9; border-radius: 14px; cursor: pointer; margin-bottom: 8px; transition: all .15s; }
.cm-item:last-child { margin-bottom: 0; }
.cm-item:active { border-color: #1a56db; background: #f8faff; }
.cm-av { width: 40px; height: 40px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; font-weight: 700; flex-shrink: 0; }
.cm-item-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.cm-item-sub { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.cm-empty { text-align: center; padding: 24px 0; color: #94a3b8; font-size: 13px; }
.cm-empty i { font-size: 28px; display: block; margin-bottom: 8px; opacity: .5; }
.cm-foot { padding: 12px 18px; border-top: 1px solid #f1f5f9; display: flex; gap: 10px; flex-shrink: 0; }
.cm-foot-add { flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px; height: 44px; border: 1.5px dashed #cbd5e1; border-radius: 12px; background: transparent; color: #64748b; font-size: 13px; font-weight: 600; cursor: pointer; }
.cm-foot-cancel { padding: 0 18px; height: 44px; background: #f1f5f9; color: #475569; border: none; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }

/* ── Product item cards (.pi) ─────────────────────────────── */
.pi { display: flex; align-items: flex-start; gap: 10px; padding: 12px 0; border-bottom: 1px solid #f8fafc; }
.pi:last-child { border-bottom: none; }
.pi-ico { width: 44px; height: 44px; border-radius: 12px; background: linear-gradient(135deg,#7c3aed,#1a56db); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 21px; flex-shrink: 0; margin-top: 2px; }
.pi-body { flex: 1; min-width: 0; }
.pi-name { font-size: 13px; font-weight: 700; color: #0f172a; }
.pi-opts { font-size: 11px; color: #64748b; margin-top: 3px; line-height: 1.6; }
.pi-each { font-size: 11px; color: #94a3b8; margin-top: 3px; }
.pi-right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex-shrink: 0; }
.pi-bot { display: flex; align-items: center; gap: 6px; }
.qc { display: flex; align-items: center; background: #f1f5f9; border-radius: 10px; overflow: hidden; }
.qb { width: 30px; height: 30px; border: none; background: transparent; font-size: 18px; font-weight: 700; color: #1a56db; cursor: pointer; display: flex; align-items: center; justify-content: center; line-height: 1; }
.qb:active { background: #dbeafe; }
.qn { min-width: 24px; text-align: center; font-size: 12px; font-weight: 700; color: #0f172a; }
.pi-tot { font-size: 13px; font-weight: 800; color: #0f172a; }
.pi-del { width: 26px; height: 26px; border: none; background: #fff1f2; border-radius: 8px; color: #dc2626; font-size: 13px; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.pi-empty { padding: 24px 0; text-align: center; color: #94a3b8; }
.pi-empty i { font-size: 36px; display: block; margin-bottom: 8px; opacity: .4; }
.pi-empty p { font-size: 12px; margin: 0; }
.add-prd-btn { display: flex; align-items: center; gap: 8px; width: 100%; padding: 11px 0; border: none; background: transparent; color: #1a56db; font-size: 13px; font-weight: 700; cursor: pointer; border-top: 1px solid #f8fafc; margin-top: 6px; }

/* ── Product Picker Panel (.fm-panel) ─────────────────────── */
.fm-overlay { position: fixed; inset: 0; background: rgba(15,23,42,.4); z-index: 900; opacity: 0; transition: opacity .28s; pointer-events: none; }
.fm-overlay.show { opacity: 1; pointer-events: auto; }
.fm-panel { position: fixed; top: 0; right: 0; bottom: 0; width: 100%; max-width: 430px; background: #f8fafc; z-index: 901; display: flex; flex-direction: column; transform: translateX(100%); transition: transform .3s cubic-bezier(.32,0,.67,0); }
@media (max-width: 430px) { .fm-panel { left: 0; } }
.fm-panel.show { transform: translateX(0); }
.fm-header { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid #e2e8f0; background: #fff; flex-shrink: 0; }
.fm-header-title { flex: 1; font-size: 15px; font-weight: 700; color: #0f172a; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fm-icon-btn { width: 36px; height: 36px; border: none; background: #f1f5f9; border-radius: 10px; color: #475569; font-size: 18px; cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.fm-breadcrumb { display: flex; align-items: center; gap: 4px; padding: 8px 16px; background: #fff; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; overflow-x: auto; }
.fm-crumb { border: none; background: transparent; font-size: 12px; color: #94a3b8; cursor: pointer; padding: 0; white-space: nowrap; }
.fm-crumb.cur { color: #0f172a; font-weight: 600; cursor: default; }
.fm-crumb-sep { font-size: 12px; color: #cbd5e1; }
.fm-search { padding: 10px 14px; background: #fff; border-bottom: 1px solid #f1f5f9; flex-shrink: 0; }
.fm-search-row { display: flex; align-items: center; gap: 8px; background: #f1f5f9; border-radius: 12px; padding: 9px 13px; }
.fm-search-row i { font-size: 16px; color: #94a3b8; flex-shrink: 0; }
.fm-search-input { flex: 1; border: none; background: transparent; font-size: 14px; color: #0f172a; outline: none; font-family: inherit; }
.fm-search-clr { width: 22px; height: 22px; border: none; background: #cbd5e1; border-radius: 50%; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0; }
.fm-body { flex: 1; overflow-y: auto; padding: 12px 14px; }
.fm-body-loader { text-align: center; padding: 32px 0; color: #94a3b8; font-size: 13px; }
.fm-body-loader i { font-size: 28px; display: block; margin-bottom: 8px; }

/* product grid tiles */
.pm-prd-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pm-prd-tile { background: #fff; border: 1.5px solid #f1f5f9; border-radius: 14px; padding: 14px 12px; cursor: pointer; transition: all .15s; }
.pm-prd-tile:active { border-color: #1a56db; background: #f8faff; }
.pm-prd-thumb { width: 40px; height: 40px; border-radius: 10px; background: linear-gradient(135deg,#7c3aed,#1a56db); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 20px; margin-bottom: 8px; }
.pm-prd-name { font-size: 12px; font-weight: 700; color: #0f172a; line-height: 1.4; margin-bottom: 4px; }
.pm-prd-price { font-size: 11px; color: #1a56db; font-weight: 600; }

/* product options view */
.pm-opt-card { display: flex; gap: 12px; padding: 14px; background: #fff; border-radius: 14px; border: 1.5px solid #e2e8f0; margin-bottom: 14px; }
.pm-opt-ico { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg,#7c3aed,#1a56db); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 24px; flex-shrink: 0; }
.pm-opt-pname { font-size: 14px; font-weight: 700; color: #0f172a; }
.pm-opt-model { font-size: 11px; color: #94a3b8; margin-top: 2px; }
.pm-opt-base { font-size: 12px; color: #1a56db; font-weight: 600; margin-top: 4px; }
.pm-qty-row { display: flex; align-items: center; justify-content: space-between; padding: 12px 0; border-bottom: 1px solid #f1f5f9; margin-bottom: 4px; }
.pm-qty-lbl { font-size: 13px; font-weight: 700; color: #0f172a; }
.pm-qty-ctrl { display: flex; align-items: center; background: #f1f5f9; border-radius: 12px; overflow: hidden; }
.pm-qb { width: 36px; height: 36px; border: none; background: transparent; font-size: 20px; font-weight: 700; color: #1a56db; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.pm-qb:active { background: #dbeafe; }
.pm-qn { min-width: 32px; text-align: center; font-size: 14px; font-weight: 700; color: #0f172a; }
/* Plain typed-quantity input used in place of the -/+ stepper (sell/invoice
   product sheet). Styled to match the other native numeric inputs. */
/* Compact typed quantity field (replaces the -/+ stepper). Sized for 1-4 digits:
   the row is a flex container, so flex:0 0 auto + an explicit width stop the
   input from stretching to fill the row. Extra specificity (.pm-qty-row prefix)
   beats the admin theme's generic input/.form-control width rules. */
.pm-qty-row .pm-qty-input { flex: 0 0 auto; width: 76px; max-width: 76px; min-width: 0; height: 40px; box-sizing: border-box; border: 1.5px solid #e2e8f0; border-radius: 12px; padding: 8px 10px; font-size: 14px; font-weight: 700; color: #0f172a; text-align: center; background: #fff; font-family: inherit; }
.pm-qty-row .pm-qty-input:focus { outline: none; border-color: #1a56db; box-shadow: 0 0 0 3px rgba(26, 86, 219, .12); }

/* option groups */
.opt-group { margin-bottom: 14px; }
.opt-label { font-size: 12px; font-weight: 700; color: #475569; margin-bottom: 8px; }
.opt-req { color: #dc2626; margin-left: 2px; }
.opt-sel-wrap select.opt-select { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 13px; color: #0f172a; background: #fff; outline: none; font-family: inherit; }
.opt-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.opt-chip { padding: 6px 13px; border: 1.5px solid #e2e8f0; border-radius: 20px; font-size: 12px; font-weight: 600; color: #475569; background: #fff; cursor: pointer; transition: all .15s; }
.opt-chip.sel { border-color: #1a56db; color: #1a56db; background: #eff6ff; }
.opt-input { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 13px; color: #0f172a; background: #fff; outline: none; font-family: inherit; box-sizing: border-box; }
.opt-input:focus { border-color: #1a56db; }
.opt-textarea { width: 100%; padding: 10px 12px; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 13px; color: #0f172a; background: #fff; outline: none; font-family: inherit; box-sizing: border-box; resize: vertical; line-height: 1.5; }
.opt-textarea:focus { border-color: #1a56db; }
.opt-file-wrap { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.opt-file-inp { display: none; }
.opt-file-btn { display: inline-flex; align-items: center; gap: 6px; padding: 9px 16px; background: #f1f5f9; border: 1.5px solid #e2e8f0; border-radius: 10px; font-size: 13px; font-weight: 600; color: #475569; cursor: pointer; white-space: nowrap; }
.opt-file-btn:active { background: #e2e8f0; }
.opt-file-name { font-size: 12px; color: #94a3b8; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-empty { text-align: center; padding: 32px 0; color: #94a3b8; }
.pm-empty i { font-size: 36px; display: block; margin-bottom: 10px; opacity: .4; }
.pm-empty-title { font-size: 14px; font-weight: 700; color: #0f172a; margin-bottom: 4px; }
.pm-empty-sub { font-size: 12px; }

/* panel inline error banner */
.pm-error { display: flex; align-items: center; gap: 8px; padding: 10px 14px; background: #fef2f2; border-bottom: 1px solid #fecaca; color: #dc2626; font-size: 13px; font-weight: 600; flex-shrink: 0; }
.pm-error i { font-size: 18px; flex-shrink: 0; }

/* panel footer */
.pm-footer { display: flex; gap: 10px; padding: 12px 14px; border-top: 1px solid #e2e8f0; background: #fff; flex-shrink: 0; }
.pm-footer-cancel { flex: 1; height: 44px; border: 1.5px solid #e2e8f0; border-radius: 12px; background: transparent; color: #475569; font-size: 14px; font-weight: 600; cursor: pointer; }
.pm-footer-add { flex: 2; height: 44px; border: none; border-radius: 12px; background: #1a56db; color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 7px; transition: background .15s; }
.pm-footer-add:disabled { background: #94a3b8; cursor: not-allowed; }

/* ═══════════════════════════════════════════════
   Part 3 — Addresses & Methods
   ═══════════════════════════════════════════════ */

/* address/method row */
.fr { display:flex; align-items:center; min-height:46px; border-bottom:1px solid #f8fafc; gap:10px; }
.fr:last-child, .fr.nb { border-bottom:none; }
.fl { font-size:13px; font-weight:500; color:#475569; flex-shrink:0; min-width:80px; }
.addr-fr { cursor:pointer; -webkit-tap-highlight-color:transparent; }
.addr-fr:active { background:#f8fafc; border-radius:8px; }
.addr-val { flex:1; display:flex; justify-content:flex-end; align-items:center; gap:5px; padding:10px 0; min-width:0; }
.addr-val span { font-size:13px; color:#0f172a; text-align:right; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width:200px; }
.addr-val span.empty { color:#cbd5e1; }
.addr-val .ti { color:#cbd5e1; font-size:15px; flex-shrink:0; }

/* method select (right-aligned, no border) */
.method-sel { flex:1; border:none; outline:none; font-size:13px; color:#0f172a; background:transparent; text-align:right; padding:10px 0; min-width:0; font-family:inherit; cursor:pointer; -webkit-appearance:none; appearance:none; direction:rtl; }
.method-sel option { direction:ltr; }

/* "same as shipping" toggle row */
.addr-same-row { display:flex; align-items:center; gap:12px; padding:14px 0; border-bottom:1px solid #f1f5f9; margin-bottom:14px; cursor:pointer; -webkit-tap-highlight-color:transparent; }
.addr-same-row:active { background:#fafafa; }
.addr-same-icon { width:36px; height:36px; border-radius:50%; background:#eff6ff; display:flex; align-items:center; justify-content:center; color:#1a56db; font-size:17px; flex-shrink:0; }
.addr-same-body { flex:1; }
.addr-same-title { font-size:13px; font-weight:600; color:#0f172a; }
.addr-same-sub { font-size:12px; color:#94a3b8; margin-top:1px; }
.addr-same-chk { width:22px; height:22px; border-radius:50%; border:2px solid #e2e8f0; display:flex; align-items:center; justify-content:center; flex-shrink:0; transition:border-color .15s,background .15s; }
.addr-same-chk.on { border-color:#1a56db; background:#1a56db; }
.addr-same-chk i { font-size:13px; color:#fff; display:none; }
.addr-same-chk.on i { display:block; }

/* select inside floating-label wrapper */
.sfl-wrap select.sfl-inp { padding-top:22px; -webkit-appearance:none; appearance:none; }
.sfl-wrap .addr-sel-lbl { top:8px; transform:none; font-size:10px; font-weight:700; color:#1a56db; letter-spacing:.5px; text-transform:uppercase; pointer-events:none; }

/* ── Address sheet — sa-card list view ── */
.sa-card { display:flex; align-items:flex-start; gap:10px; padding:11px 13px; border:1.5px solid #e2e8f0; border-radius:12px; cursor:pointer; margin-bottom:8px; transition:border-color .15s,background .15s; -webkit-tap-highlight-color:transparent; }
.sa-card.sel { border-color:#1a56db; background:#eff6ff; }
.sa-card:active { background:#f8fafc; }
.sa-radio { width:18px; height:18px; border-radius:50%; border:2px solid #e2e8f0; display:flex; align-items:center; justify-content:center; flex-shrink:0; margin-top:2px; transition:background .15s,border-color .15s; font-size:10px; color:transparent; }
.sa-card.sel .sa-radio { background:#1a56db; border-color:#1a56db; color:#fff; }
.sa-body { flex:1; min-width:0; }
.sa-label { font-size:13px; font-weight:600; color:#0f172a; }
.sa-text { font-size:12px; color:#64748b; line-height:1.5; margin-top:2px; }
.sa-edit { width:28px; height:28px; border:none; background:transparent; color:#94a3b8; font-size:15px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; border-radius:6px; padding:0; }
.sa-edit:active { background:#e2e8f0; }
.addr-add-row { display:flex; align-items:center; gap:8px; padding:12px 2px 4px; color:#1a56db; font-size:13px; font-weight:700; cursor:pointer; border-top:1px solid #f1f5f9; margin-top:4px; -webkit-tap-highlight-color:transparent; }
.addr-back-btn { width:28px; height:28px; border:none; background:#f1f5f9; border-radius:8px; color:#475569; font-size:16px; cursor:pointer; display:flex; align-items:center; justify-content:center; flex-shrink:0; padding:0; }

/* ── Totals rows ── */
.tr { display:flex; justify-content:space-between; align-items:center; padding:9px 0; border-bottom:1px solid #f8fafc; font-size:13px; }
.tr:last-child { border-bottom:none; }
.tr .tl { color:#64748b; }
.tr .tv { font-weight:600; color:#0f172a; }
.tr.grand { padding:13px 0; }
.tr.grand .tl { font-size:14px; font-weight:700; color:#0f172a; }
.tr.grand .tv { font-size:17px; font-weight:800; color:#1a56db; }

/* ── Action list / action row ── */
.action-list { margin-top:12px; box-shadow:0 1px 4px rgba(0,0,0,.06); border-radius:16px; overflow:hidden; }
.ar { display:flex; align-items:center; gap:13px; background:#fff; padding:14px 16px; cursor:pointer; border-bottom:1px solid #f1f5f9; -webkit-tap-highlight-color:transparent; }
.ar:last-child { border-bottom:none; }
.ar:active { background:#f8fafc; }
.ar.disabled { opacity:.35; pointer-events:none; cursor:default; }
.ar-ico { width:38px; height:38px; border-radius:11px; background:#f1f5f9; display:flex; align-items:center; justify-content:center; font-size:19px; color:#475569; flex-shrink:0; }
.ar-ico.blue { background:#eff6ff; color:#1a56db; }
.ar-ico.green { background:#f0fdf4; color:#16a34a; }
.ar-ico.orange { background:#fff7ed; color:#ea580c; }
.ar-body { flex:1; min-width:0; }
.ar-title { font-size:14px; font-weight:700; color:#0f172a; }
.ar-sub { font-size:12px; color:#94a3b8; margin-top:2px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.ar-sub.live { color:#475569; }
.ar-chev { font-size:16px; color:#cbd5e1; flex-shrink:0; }

/* ── Order History sheet ── */
.hist-add-form { background:#f8fafc; border-radius:14px; padding:14px; margin-bottom:14px; border:1.5px solid #f1f5f9; }
.hs-chips { display:flex; gap:7px; overflow-x:auto; padding:2px 1px; scrollbar-width:none; -webkit-overflow-scrolling:touch; }
.hs-chips::-webkit-scrollbar { display:none; }
.hs-chip { flex-shrink:0; padding:6px 13px; border-radius:20px; font-size:12px; font-weight:700; cursor:pointer; background:#f1f5f9; color:#64748b; transition:.15s; display:flex; align-items:center; gap:5px; user-select:none; border:none; }
.hs-chip .hs-dot { width:7px; height:7px; border-radius:50%; background:#94a3b8; flex-shrink:0; transition:.15s; }
.hs-chip.active { color:#fff; }
.hs-chip.active .hs-dot { background:rgba(255,255,255,.5); }
.hist-divider { display:flex; align-items:center; gap:8px; margin:14px 0 10px; color:#94a3b8; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.8px; }
.hist-divider::before, .hist-divider::after { content:''; flex:1; height:1px; background:#f1f5f9; }
.hist-empty { text-align:center; padding:20px 0; color:#94a3b8; }
.hist-empty i { font-size:26px; display:block; margin-bottom:6px; opacity:.4; }
.hist-empty p { font-size:12px; margin:0; }
.hist-entry { display:flex; gap:10px; padding:11px 0; position:relative; }
.hist-entry:not(:last-child)::after { content:''; position:absolute; left:5px; top:22px; bottom:-2px; width:2px; background:#f1f5f9; z-index:0; }
.hist-dot { width:12px; height:12px; border-radius:50%; flex-shrink:0; margin-top:2px; border:2px solid #fff; box-shadow:0 0 0 2px #e2e8f0; position:relative; z-index:1; background:#94a3b8; }
.hist-body { flex:1; min-width:0; }
.hist-row1 { display:flex; align-items:center; gap:6px; flex-wrap:wrap; }
.hist-sbadge { font-size:10px; font-weight:800; padding:2px 9px; border-radius:20px; color:#fff; flex-shrink:0; }
.hist-notified { font-size:10px; font-weight:700; background:#eff6ff; color:#1a56db; padding:1px 7px; border-radius:20px; display:flex; align-items:center; gap:3px; }
.hist-time { font-size:11px; color:#94a3b8; flex:1; text-align:right; white-space:nowrap; }
.hist-comment { font-size:12px; color:#64748b; margin-top:5px; line-height:1.5; }


/* ── Sheet field rows (Order Settings sheet) ── */
.sf-row { display:flex; align-items:center; padding:11px 0; border-bottom:1px solid #f8fafc; gap:10px; }
.sf-row:last-child, .sf-row.nb { border-bottom:none; }
.sf-lbl { font-size:13px; font-weight:500; color:#475569; flex-shrink:0; min-width:100px; }
.sf-val { flex:1; display:flex; justify-content:flex-end; }
.sf-sel { border:none; outline:none; font-size:14px; color:#0f172a; background:transparent; text-align:right; font-family:inherit; cursor:pointer; appearance:none; max-width:180px; }
.sf-num { border:none; outline:none; font-size:14px; color:#0f172a; background:transparent; text-align:right; font-family:inherit; max-width:80px; }
.sf-sep { font-size:10px; font-weight:700; color:#94a3b8; text-transform:uppercase; letter-spacing:.9px; padding:12px 0 6px; display:block; }
.sf-badge { display:inline-flex; align-items:center; gap:4px; padding:3px 10px; border-radius:20px; font-size:11px; font-weight:700; background:#eff6ff; color:#1a56db; }

/* ── Toggle switch ── */
.tgl-row { display:flex; align-items:center; justify-content:space-between; padding:11px 0; border-bottom:1px solid #f8fafc; }
.tgl-row.nb { border-bottom:none; }
.tgl-info { flex:1; min-width:0; }
.tgl-lbl { font-size:13px; font-weight:500; color:#475569; }
.tgl-sub { font-size:11px; color:#94a3b8; margin-top:2px; }
.tgl { position:relative; width:44px; height:26px; flex-shrink:0; }
.tgl input { opacity:0; width:0; height:0; position:absolute; }
.tgl-sl { position:absolute; inset:0; background:#e2e8f0; border-radius:13px; cursor:pointer; transition:.2s; }
.tgl-sl::before { content:''; position:absolute; width:20px; height:20px; left:3px; top:3px; background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.2); transition:.2s; }
.tgl input:checked + .tgl-sl { background:#1a56db; }
.tgl input:checked + .tgl-sl::before { transform:translateX(18px); }

/* ── Coupon applied pill ── */
.coupon-pill { display:flex; align-items:center; gap:6px; background:#f0fdf4; border:1.5px solid #86efac; border-radius:12px; padding:9px 12px; margin-top:10px; }
.coupon-pill i { font-size:16px; color:#16a34a; }
.coupon-pill span { flex:1; font-size:13px; font-weight:600; color:#15803d; }
.coupon-pill button { border:none; background:transparent; color:#64748b; cursor:pointer; font-size:16px; padding:0; line-height:1; }

/* ── Inline field validation (sale/returns form; mirrors stock's
      .is-invalid / .invalid-feedback pairing so every error key returned by
      the controller can be shown against its own field instead of a single
      transient toast) ── */
.fld-invalid { border-color: #ef4444 !important; }
.pick-row.fld-invalid { border-bottom-color: #ef4444 !important; }
.fld-err {
  display: none;
  font-size: 11px; font-weight: 600; color: #ef4444;
  padding: 3px 2px 0; line-height: 1.35;
}
.fld-err.show { display: block; }
.fld-err i { font-size: 12px; vertical-align: -1px; margin-right: 3px; }

/* Card-level error (validation failures with no single input to blame, e.g.
   the controller's `customer` / `order` keys) */
.card-err {
  display: none; align-items: flex-start; gap: 6px;
  margin: 0 16px 12px; padding: 9px 11px;
  background: #fef2f2; border: 1.5px solid #fecaca; border-radius: 10px;
  font-size: 12px; font-weight: 600; color: #b91c1c;
}
.card-err.show { display: flex; }
.card-err i { font-size: 14px; flex-shrink: 0; margin-top: 1px; }

/* External "open record" link shown next to a loaded order/customer/product */
.rec-link {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  border-radius: 8px; background: #eff6ff; color: #1a56db;
  text-decoration: none; font-size: 15px;
}
.rec-link:active { background: #dbeafe; }
