/* ==========================================================================
   Backstage Consignor — app styles
   ==========================================================================
   Built on the v2 design system. Tokens live in lib/tokens.css and are
   imported by index.html before this file. Anything that's used across
   the consignment app (seller and consignor) eventually moves to the
   shared design system; for now this is consignor-specific.
   ========================================================================== */

* { box-sizing: border-box; margin: 0; padding: 0; }

html,
body {
  background: var(--bs-bg);
  color: var(--bs-text);
  font-family: var(--bs-font-sans);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}

body.app-body {
  min-height: 100vh;
  min-height: 100dvh;
  /* iOS safe areas — let the content breathe under the notch / home indicator */
  padding: env(safe-area-inset-top) env(safe-area-inset-right)
    env(safe-area-inset-bottom) env(safe-area-inset-left);
}

.app {
  position: relative;
  width: 100%;
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
}

/* ==========================================================================
   View transitions — only one .view is visible at a time
   ========================================================================== */

.view {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  padding: var(--bs-space-6);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--bs-t-base);
  /* Let a view scroll internally when its content is taller than the viewport
     (the shell is otherwise fixed-height for the native app). */
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.view--active {
  opacity: 1;
  pointer-events: auto;
}

/* ==========================================================================
   Typography helpers (matches v2 mockups)
   ========================================================================== */

.eyebrow {
  font-size: 11px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--bs-muted);
  font-weight: 700;
  margin-bottom: var(--bs-space-3);
}
.eyebrow--mint { color: var(--bs-mint); }

.display-1 {
  font-family: var(--bs-font-serif);
  font-size: 48px;
  font-weight: 400;
  letter-spacing: -0.025em;
  line-height: 1.05;
  color: var(--bs-text);
  margin-bottom: var(--bs-space-4);
  font-variation-settings: var(--bs-serif-soft);
}
.display-1 em {
  font-style: italic;
  color: var(--bs-mint);
  font-variation-settings: var(--bs-serif-accent);
}

.display-2 {
  font-family: var(--bs-font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  color: var(--bs-text);
  margin-bottom: var(--bs-space-3);
  font-variation-settings: var(--bs-serif-soft);
}
.display-2 em {
  font-style: italic;
  color: var(--bs-mint);
  font-variation-settings: var(--bs-serif-accent);
}

.display-sub {
  font-size: 16px;
  line-height: 1.55;
  color: var(--bs-muted);
  max-width: 480px;
  margin-bottom: var(--bs-space-8);
}
.display-sub code {
  font-family: var(--bs-font-mono);
  font-size: 0.92em;
  background: var(--bs-bg-2);
  padding: 1px 6px;
  border-radius: var(--bs-r-sm);
  color: var(--bs-text);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  font-family: var(--bs-font-sans);
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--bs-r-pill);
  border: 1px solid transparent;
  padding: 12px 20px;
  cursor: pointer;
  transition: transform var(--bs-t-fast), background var(--bs-t-fast),
    box-shadow var(--bs-t-fast), color var(--bs-t-fast);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--bs-space-2);
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn--primary {
  background: var(--bs-mint);
  color: var(--bs-mint-on);
  box-shadow: 0 8px 22px -8px var(--bs-mint-glow);
}
.btn--primary:hover { background: var(--bs-mint-deep); }

.btn--ghost {
  background: transparent;
  color: var(--bs-text);
  border-color: var(--bs-hairline-strong);
}
.btn--ghost:hover { background: var(--bs-bg-2); }

.btn--lg { font-size: 15px; padding: 14px 22px; }
.btn--xl { font-size: 16px; padding: 16px 28px; min-width: 220px; }

.back-link {
  background: transparent;
  border: none;
  color: var(--bs-muted);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  padding: var(--bs-space-2) var(--bs-space-3);
  margin-left: calc(-1 * var(--bs-space-3));
}
.back-link:hover { color: var(--bs-text); }

/* ==========================================================================
   Welcome view (Stage A)
   ========================================================================== */

.view--welcome { justify-content: center; align-items: stretch; }
.welcome-stack {
  margin: auto 0;
  max-width: 520px;
  width: 100%;
}
.welcome-brand {
  margin-bottom: var(--bs-space-12);
  display: flex;
  justify-content: flex-start;
}
.welcome-lockup {
  width: 240px;
  height: auto;
}

/* ==========================================================================
   Pair view (Stage B)
   ========================================================================== */

.view--pair { padding-top: var(--bs-space-3); }
.view-header {
  margin-bottom: var(--bs-space-8);
  display: flex;
  align-items: center;
}
.pair-stack {
  margin-top: var(--bs-space-6);
  max-width: 520px;
}
.pair-form {
  display: flex;
  flex-direction: column;
  gap: var(--bs-space-4);
}
.pair-input {
  font-family: var(--bs-font-mono);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-align: center;
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline-strong);
  border-radius: var(--bs-r-lg);
  color: var(--bs-text);
  padding: 22px 18px;
  width: 100%;
  text-transform: uppercase;
  caret-color: var(--bs-mint);
  outline: none;
  transition: border-color var(--bs-t-fast), box-shadow var(--bs-t-fast);
}
.pair-input::placeholder {
  color: var(--bs-soft);
  letter-spacing: 0.12em;
}
.pair-input:focus {
  border-color: var(--bs-mint);
  box-shadow: 0 0 0 3px var(--bs-mint-soft);
}
.pair-status {
  font-size: 14px;
  color: var(--bs-muted);
  min-height: 22px;
}
.pair-status--ok { color: var(--bs-mint); }
.pair-status--error { color: var(--bs-coral); }
.pair-status--saving { color: var(--bs-peach); }

/* ==========================================================================
   Paired view (Stage C)
   ========================================================================== */

.view--paired { justify-content: center; align-items: stretch; }
.paired-stack {
  margin: auto 0;
  max-width: 520px;
  width: 100%;
}
.paired-badge {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--bs-mint);
  color: var(--bs-mint-on);
  display: grid;
  place-items: center;
  margin-bottom: var(--bs-space-6);
  box-shadow: 0 8px 22px -8px var(--bs-mint-glow);
}
.paired-badge svg { width: 32px; height: 32px; }

.ship-card {
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline);
  border-radius: var(--bs-r-lg);
  padding: var(--bs-space-5) var(--bs-space-5);
  margin: var(--bs-space-6) 0 var(--bs-space-8);
}
.ship-card-eyebrow {
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  font-weight: 700;
  margin-bottom: var(--bs-space-2);
}
.ship-card-name {
  font-family: var(--bs-font-serif);
  font-size: 20px;
  font-weight: 500;
  color: var(--bs-text);
  margin-bottom: var(--bs-space-1);
  font-variation-settings: var(--bs-serif-soft);
}
.ship-card-address {
  font-size: 14px;
  color: var(--bs-muted);
  white-space: pre-wrap;
  line-height: 1.55;
}

/* ==========================================================================
   Home view (Stage D)
   ========================================================================== */

.home-header {
  display: flex;
  align-items: center;
  padding-bottom: var(--bs-space-6);
  margin-bottom: var(--bs-space-6);
  border-bottom: 1px solid var(--bs-hairline);
}
.home-lockup {
  width: 160px;
  height: auto;
  flex: 1;
}
.home-signout-btn {
  background: none;
  border: 1px solid var(--bs-hairline);
  color: var(--bs-text-dim, rgba(245,242,235,0.45));
  font-size: 12px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 999px;
  cursor: pointer;
  flex-shrink: 0;
}
.home-signout-btn:active { opacity: 0.7; }
.home-body { max-width: 720px; }

.pairings-list {
  display: flex;
  flex-direction: column;
  gap: var(--bs-space-4);
  margin: var(--bs-space-6) 0 var(--bs-space-8);
}
.pairing-card {
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline);
  border-radius: var(--bs-r-lg);
  padding: var(--bs-space-5);
}
.pairing-card-name {
  font-family: var(--bs-font-serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--bs-text);
  margin-bottom: var(--bs-space-2);
  font-variation-settings: var(--bs-serif-soft);
}
.pairing-card-meta {
  font-size: 13px;
  color: var(--bs-muted);
  display: flex;
  flex-wrap: wrap;
  gap: var(--bs-space-3);
}
.pairing-card-meta-item {
  display: inline-flex;
  align-items: center;
  gap: var(--bs-space-1);
}
.pairing-card-meta-key {
  color: var(--bs-soft);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 10px;
  font-weight: 700;
}

.pairings-empty {
  background: var(--bs-bg-card);
  border: 1px dashed var(--bs-hairline-strong);
  border-radius: var(--bs-r-lg);
  padding: var(--bs-space-8) var(--bs-space-5);
  text-align: center;
  color: var(--bs-muted);
  font-size: 14px;
  margin: var(--bs-space-6) 0;
}

/* ==========================================================================
   Toast (positions itself near the top, fades in/out)
   ========================================================================== */

.toast-container {
  position: fixed;
  top: max(env(safe-area-inset-top), 16px);
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--bs-space-2);
  pointer-events: none;
  z-index: 1000;
}
.toast {
  background: var(--bs-bg-elev);
  color: var(--bs-text);
  border: 1px solid var(--bs-hairline-strong);
  border-radius: var(--bs-r-pill);
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: var(--bs-shadow-card);
  pointer-events: auto;
  animation: toast-in var(--bs-t-base);
}
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===========================================================================
   Shows view (Phase C C.3)
   =========================================================================== */

.home-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 24px;
}

.shows-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.shows-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.shows-loading {
  font-size: 13px;
  color: var(--bs-muted);
  font-style: italic;
  padding: 12px 0;
}

.shows-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shows-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0;
}

.shows-section-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.show-row {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 14px;
  overflow: hidden;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.show-row:hover {
  border-color: var(--bs-hairline-strong);
}

.show-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
a.show-row-link:hover {
  background: var(--bs-elev);
}

.show-row-main {
  flex: 1;
  min-width: 0;
}

.show-row-when {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-text);
  font-variant-numeric: tabular-nums;
}

.show-row-seller {
  font-size: 13px;
  color: var(--bs-muted);
  margin-top: 2px;
}

.show-row-notes {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin: 6px 0 0;
  line-height: 1.45;
}

.show-row-status {
  flex-shrink: 0;
}

.show-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.show-status--live {
  background: var(--bs-coral-soft, rgba(244, 124, 124, 0.18));
  color: var(--bs-coral, #f47c7c);
  animation: livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}
.show-status--scheduled {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}
.show-status--confirmed {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}
.show-status--needs-confirm {
  background: var(--bs-gold-soft, rgba(242, 201, 94, 0.18));
  color: var(--bs-gold, #f2c95e);
}
.show-status--declined {
  background: rgba(244, 124, 124, 0.14);
  color: var(--bs-coral, #f47c7c);
}
.show-status--ended,
.show-status--cancelled {
  background: var(--bs-elev);
  color: var(--bs-muted);
}

.shows-empty {
  margin-top: 32px;
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed var(--bs-hairline);
  border-radius: 16px;
}

.shows-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--bs-text);
  margin: 0 0 6px;
}

.shows-empty-sub {
  font-size: 13px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

/* The view-header back-link is shared with the pair view; if it isn't
   already styled in your tokens, this gives it a sane default. */
.view--shows .view-header {
  padding: 16px 20px 0;
}

/* ===========================================================================
   Shipments view (Phase C C.4)
   =========================================================================== */

.shipments-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.shipments-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.shipments-loading {
  font-size: 13px;
  color: var(--bs-muted);
  font-style: italic;
  padding: 12px 0;
}

.shipments-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shipments-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0;
}

.shipments-section-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.shipment-row {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.shipment-row:hover {
  border-color: var(--bs-hairline-strong);
}

.shipment-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.shipment-row-head-main {
  flex: 1;
  min-width: 0;
}

.shipment-row-seller {
  font-size: 14px;
  font-weight: 700;
  color: var(--bs-text);
}

.shipment-row-meta {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shipment-row-meta-sep {
  opacity: 0.5;
}

.shipment-row-status {
  flex-shrink: 0;
}

.shipment-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.shipment-status--drafted {
  background: var(--bs-elev);
  color: var(--bs-muted);
  border: 1px dashed var(--bs-hairline-strong);
}
.shipment-status--submitted {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}
.shipment-status--partly {
  background: var(--bs-gold-soft, rgba(242, 201, 94, 0.18));
  color: var(--bs-gold, #f2c95e);
}
.shipment-status--arrived,
.shipment-status--inventoried {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}
.shipment-status--live {
  background: var(--bs-coral-soft, rgba(244, 124, 124, 0.18));
  color: var(--bs-coral, #f47c7c);
  animation: livePulse 1.6s ease-in-out infinite;
}
.shipment-status--completed,
.shipment-status--cancelled {
  background: var(--bs-elev);
  color: var(--bs-muted);
}

.shipment-row-notes {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

.shipment-row-intake {
  font-size: 12.5px;
  color: var(--bs-text);
  margin: 0;
  line-height: 1.5;
  padding: 8px 10px;
  background: var(--bs-elev);
  border-radius: 8px;
}
.shipment-row-intake-label {
  font-weight: 700;
  color: var(--bs-muted);
  margin-right: 4px;
}

.shipment-row-packages {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shipment-row-pkg {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--bs-muted);
}

.shipment-row-pkg-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--bs-hairline-strong);
  flex-shrink: 0;
}

.shipment-row-pkg--arrived .shipment-row-pkg-dot {
  background: var(--bs-mint, #5fe6a4);
}

.shipment-row-pkg-label {
  flex: 1;
  min-width: 0;
  color: var(--bs-text);
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.shipment-row-pkg-status {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 2px 7px;
  border-radius: 999px;
  background: var(--bs-elev);
  color: var(--bs-muted);
  flex-shrink: 0;
}
.shipment-row-pkg--arrived .shipment-row-pkg-status {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}

.shipments-empty {
  margin-top: 32px;
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed var(--bs-hairline);
  border-radius: 16px;
}

.shipments-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--bs-text);
  margin: 0 0 6px;
}

.shipments-empty-sub {
  font-size: 13px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

.view--shipments .view-header {
  padding: 16px 20px 0;
}

/* ===========================================================================
   Live — "Watch the show" banner (web portal)
   =========================================================================== */

.live-watch {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  margin: 4px 0 16px;
  border: 1px solid rgba(95, 230, 164, 0.35);
  border-radius: 12px;
  background: rgba(95, 230, 164, 0.08);
}
.live-watch-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--bs-text);
}
.live-watch-dot {
  color: #ff5a5a;
  animation: live-watch-pulse 1.4s ease-in-out infinite;
}
@keyframes live-watch-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.live-watch-btn {
  white-space: nowrap;
}

/* Seller cards on Home are tappable → open the per-seller summary. */
.pairing-card {
  cursor: pointer;
  transition: border-color 120ms ease, transform 80ms ease;
}
.pairing-card:hover {
  border-color: var(--bs-mint, #5fe6a4);
}
.pairing-card:active {
  transform: scale(0.99);
}

/* Sold report — Print / Save-as-PDF button + print layout */
.sold-print-btn {
  align-self: flex-start;
  margin: 4px 0 8px;
  padding: 8px 14px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: var(--bs-text);
  background: transparent;
  border: 1px solid var(--bs-hairline, rgba(255, 255, 255, 0.18));
  border-radius: 10px;
  cursor: pointer;
}
.sold-print-btn:hover {
  border-color: var(--bs-mint, #5fe6a4);
}

/* Per-seller hub */
.hub-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 4px 0 20px;
  color: var(--bs-muted);
  font-size: 14px;
}
.hub-meta-key {
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 11px;
  color: var(--bs-muted);
  margin-right: 4px;
}
.hub-ship {
  margin-top: 24px;
  padding: 16px;
  border: 1px solid var(--bs-hairline, rgba(255, 255, 255, 0.12));
  border-radius: 14px;
}
.hub-ship-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bs-muted);
  margin-bottom: 6px;
}
.hub-ship-name { font-weight: 600; color: var(--bs-text); }
.hub-ship-address { color: var(--bs-muted); font-size: 14px; margin-top: 2px; white-space: pre-line; }

@media print {
  html, body, .app {
    background: #fff !important;
    color: #000 !important;
    height: auto !important;
    overflow: visible !important;
  }
  .view { display: none !important; }
  .view--active {
    display: flex !important;
    position: static !important;
    inset: auto !important;
    opacity: 1 !important;
    height: auto !important;
    overflow: visible !important;
    padding: 0 !important;
  }
  .view-header, .back-link, .sold-print-btn { display: none !important; }
  .view--active, .view--active * { color: #000 !important; }
}

/* ===========================================================================
   New Shipment form (Phase C C.4b)
   =========================================================================== */

.shipments-new-btn {
  margin-top: 24px;
  align-self: stretch;
}

.new-shipment-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.new-shipment-form {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-row {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.form-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
}

.form-help {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin: 4px 0 0;
}

.form-input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 12px 14px;
  background: var(--bs-card);
  color: var(--bs-text);
  border: 1px solid var(--bs-hairline);
  border-radius: 10px;
  outline: none;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.form-input:focus {
  border-color: var(--bs-mint, #5fe6a4);
  background: var(--bs-elev);
}
.form-input--narrow {
  max-width: 120px;
}

.form-textarea {
  min-height: 88px;
  resize: vertical;
  line-height: 1.5;
}

.form-status {
  font-size: 13px;
  color: var(--bs-muted);
  min-height: 18px;
  margin: 0;
}
.form-status--ok {
  color: var(--bs-mint, #5fe6a4);
}
.form-status--error {
  color: var(--bs-coral, #f47c7c);
}
.form-status--saving {
  color: var(--bs-muted);
  font-style: italic;
}

.package-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.package-row {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.package-row-head {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-muted);
}

.package-row-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.package-row-input {
  font-size: 14px;
  padding: 10px 12px;
}

.view--new-shipment .view-header {
  padding: 16px 20px 0;
}

/* ===========================================================================
   Shipment screenshots (Phase C C.4c)
   =========================================================================== */

/* --- Picker on each new-shipment package row -------------------------- */

.package-row-shot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 84px;
  margin-top: 6px;
  border: 1px dashed var(--bs-hairline-strong);
  border-radius: 10px;
  background: var(--bs-elev);
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.package-row-shot:hover {
  border-color: var(--bs-mint, #5fe6a4);
}
.package-row-shot--set {
  border-style: solid;
  border-color: var(--bs-hairline);
  padding: 0;
}

.package-row-shot-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}

.package-row-shot-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 12px 14px;
  color: var(--bs-muted);
  text-align: center;
}

.package-row-shot-icon {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
}

.package-row-shot-text {
  font-size: 12.5px;
  letter-spacing: 0.02em;
}

.package-row-shot-preview {
  display: block;
  width: 100%;
  height: 100%;
  max-height: 200px;
  object-fit: cover;
}

.package-row-shot-replace {
  position: absolute;
  bottom: 6px;
  right: 8px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(0, 0, 0, 0.55);
  color: #fff;
  padding: 4px 9px;
  border-radius: 999px;
}

.package-row-shot-status {
  position: absolute;
  top: 6px;
  left: 8px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(15, 14, 12, 0.7);
  color: #fff;
  pointer-events: none;
}
.package-row-shot-status:empty {
  display: none;
}
.package-row-shot-status--saving {
  background: rgba(95, 230, 164, 0.85);
  color: var(--bs-bg, #0F0E0C);
  font-weight: 700;
}
.package-row-shot-status--error {
  background: rgba(244, 124, 124, 0.92);
  color: #fff;
  font-weight: 700;
}

/* --- Thumbnail on each Shipments-view package row -------------------- */

.shipment-row-pkg-thumb {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: var(--bs-elev);
  border: 1px solid var(--bs-hairline);
  padding: 0;
  margin-left: 4px;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.shipment-row-pkg-thumb:hover {
  border-color: var(--bs-mint, #5fe6a4);
}

.shipment-row-pkg-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shipment-row-pkg-thumb-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--bs-hairline-strong);
  border-top-color: var(--bs-mint, #5fe6a4);
  border-radius: 50%;
  animation: shotSpin 0.9s linear infinite;
}
@keyframes shotSpin {
  to { transform: rotate(360deg); }
}

.shipment-row-pkg-thumb--err {
  border-color: var(--bs-coral, #f47c7c);
}
.shipment-row-pkg-thumb-broken {
  font-size: 12px;
  color: var(--bs-coral, #f47c7c);
}

/* --- Fullscreen overlay ---------------------------------------------- */

.shot-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(15, 14, 12, 0.92);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.shot-overlay--active {
  display: flex;
  animation: shotOverlayIn 160ms ease;
}
@keyframes shotOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.shot-overlay-img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.shot-overlay-close {
  position: absolute;
  top: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.shot-overlay-close:hover {
  background: rgba(255, 255, 255, 0.22);
}

/* ===========================================================================
   Terms view (Phase C C.5)
   =========================================================================== */

.terms-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.terms-loading,
.terms-error,
.terms-empty {
  font-size: 13px;
  color: var(--bs-muted);
  font-style: italic;
  padding: 12px 0;
}
.terms-error { color: var(--bs-coral, #f47c7c); font-style: normal; }

.terms-pending {
  margin-top: 24px;
  padding: 18px 18px 16px;
  background: var(--bs-gold-soft, rgba(242, 201, 94, 0.15));
  border: 1px solid var(--bs-gold, #f2c95e);
  border-radius: 14px;
}

.terms-pending-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.terms-pending-eyebrow {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-gold, #f2c95e);
}

.terms-pending-deadline {
  font-size: 11px;
  color: var(--bs-muted);
  font-variant-numeric: tabular-nums;
}

.terms-pending-title {
  font-size: 18px;
  font-weight: 600;
  color: var(--bs-text);
  margin: 0 0 12px;
  line-height: 1.3;
}

.terms-pending-fields {
  list-style: none;
  margin: 0 0 14px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.terms-pending-field {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding: 10px 12px;
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.4;
}
@media (min-width: 480px) {
  .terms-pending-field {
    grid-template-columns: 1fr auto auto auto;
    align-items: center;
    gap: 10px;
  }
}

.terms-pending-field-key {
  font-weight: 700;
  color: var(--bs-text);
}
.terms-pending-field-old {
  color: var(--bs-muted);
  text-decoration: line-through;
}
.terms-pending-field-arrow {
  color: var(--bs-muted);
}
.terms-pending-field-new {
  color: var(--bs-mint, #5fe6a4);
  font-weight: 600;
}

.terms-pending-foot {
  margin: 10px 0 0;
  font-size: 12px;
  color: var(--bs-muted);
  font-style: italic;
}

/* Contract groups */

.terms-contract {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.terms-group {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 14px;
  padding: 14px 16px 12px;
}

.terms-group-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0 0 8px;
}

.terms-group-note {
  font-size: 12px;
  color: var(--bs-muted);
  line-height: 1.5;
  margin: 0 0 10px;
}

.terms-group-rows {
  list-style: none;
  margin: 0;
  padding: 0;
}

.terms-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--bs-hairline);
  font-size: 13px;
  line-height: 1.45;
}
.terms-row:first-child {
  border-top: none;
  padding-top: 4px;
}

.terms-row-key {
  flex-shrink: 0;
  width: 38%;
  max-width: 220px;
  color: var(--bs-muted);
}

.terms-row-val {
  flex: 1;
  color: var(--bs-text);
  text-align: right;
}

/* Change log */

.terms-log {
  margin-top: 32px;
  padding-top: 16px;
  border-top: 1px solid var(--bs-hairline);
}

.terms-log-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0 0 10px;
}

.terms-log-items {
  list-style: none;
  margin: 0;
  padding: 0;
}

.terms-log-item {
  padding: 10px 0;
  border-top: 1px solid var(--bs-hairline);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.terms-log-item:first-child {
  border-top: none;
}

.terms-log-when {
  font-size: 11px;
  color: var(--bs-muted);
  font-variant-numeric: tabular-nums;
}

.terms-log-what {
  font-size: 13px;
  color: var(--bs-text);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.terms-log-field {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
  font-weight: 600;
  background: var(--bs-elev);
  border: 1px solid var(--bs-hairline);
  border-radius: 4px;
  padding: 1px 6px;
}

.terms-log-from {
  color: var(--bs-muted);
  font-style: italic;
}
.terms-log-arrow {
  color: var(--bs-muted);
}
.terms-log-to {
  color: var(--bs-text);
  font-weight: 600;
}

.terms-log-empty {
  font-size: 12.5px;
  color: var(--bs-muted);
  font-style: italic;
  padding: 6px 0;
}

.view--terms .view-header {
  padding: 16px 20px 0;
}

/* ===========================================================================
   Earnings view (Phase C C.6)
   =========================================================================== */

.earnings-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 20px 32px;
  max-width: 720px;
  margin: 0 auto;
}

.earnings-totals {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.earnings-total {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 14px;
  padding: 14px 16px;
}

.earnings-total-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-muted);
}

.earnings-total-val {
  font-family: var(--bs-serif, Georgia, serif);
  font-size: 28px;
  font-weight: 500;
  color: var(--bs-text);
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.earnings-total--received .earnings-total-val {
  color: var(--bs-mint, #5fe6a4);
}
.earnings-total--pending .earnings-total-val {
  color: var(--bs-gold, #f2c95e);
}

.earnings-list {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.earnings-loading {
  font-size: 13px;
  color: var(--bs-muted);
  font-style: italic;
  padding: 12px 0;
}

.earnings-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.earnings-section-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0;
}

.earnings-section-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payout-row {
  background: var(--bs-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 14px;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.payout-row-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.payout-row-head-main {
  flex: 1;
  min-width: 0;
}

.payout-row-amount {
  font-family: var(--bs-serif, Georgia, serif);
  font-size: 24px;
  font-weight: 500;
  color: var(--bs-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.payout-row-meta {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin-top: 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.payout-row-meta-sep {
  opacity: 0.5;
}

.payout-row-ref {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 11.5px;
}

.payout-row-pill-shot {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
}

.payout-status {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border-radius: 999px;
  white-space: nowrap;
}
.payout-status--awaiting {
  background: var(--bs-gold-soft, rgba(242, 201, 94, 0.18));
  color: var(--bs-gold, #f2c95e);
}
.payout-status--received {
  background: var(--bs-mint-soft, rgba(95, 230, 164, 0.16));
  color: var(--bs-mint, #5fe6a4);
}
.payout-status--disputed {
  background: var(--bs-coral-soft, rgba(244, 124, 124, 0.18));
  color: var(--bs-coral, #f47c7c);
}

.payout-row-shot {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  background: var(--bs-elev);
  border: 1px solid var(--bs-hairline);
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}
.payout-row-shot:hover {
  border-color: var(--bs-mint, #5fe6a4);
}
.payout-row-shot--placeholder {
  cursor: default;
}
.payout-row-shot--placeholder:hover {
  border-color: var(--bs-hairline);
}

.payout-row-shot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.payout-row-shot-spinner {
  width: 12px;
  height: 12px;
  border: 2px solid var(--bs-hairline-strong);
  border-top-color: var(--bs-mint, #5fe6a4);
  border-radius: 50%;
  animation: shotSpin 0.9s linear infinite;
}

.payout-row-shot-placeholder-text {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--bs-muted);
  text-align: center;
  line-height: 1.1;
  padding: 0 2px;
}

.payout-row-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.payout-row-dispute {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.payout-row-dispute-input {
  font-size: 13.5px;
}

.payout-row-dispute-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.payout-row-dispute-note {
  margin: 0;
  padding: 8px 10px;
  background: var(--bs-coral-soft, rgba(244, 124, 124, 0.12));
  border: 1px solid rgba(244, 124, 124, 0.45);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--bs-text);
  line-height: 1.5;
}

.payout-row-dispute-note-label {
  font-weight: 700;
  color: var(--bs-coral, #f47c7c);
  margin-right: 4px;
}

.btn--sm {
  padding: 6px 12px;
  font-size: 13px;
}

.earnings-empty {
  margin-top: 32px;
  text-align: center;
  padding: 32px 16px;
  border: 1px dashed var(--bs-hairline);
  border-radius: 16px;
}

.earnings-empty-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--bs-text);
  margin: 0 0 6px;
}

.earnings-empty-sub {
  font-size: 13px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

.view--earnings .view-header {
  padding: 16px 20px 0;
}

/* ===========================================================================
   Show confirm/decline (Phase C — A)
   =========================================================================== */

.show-row-actions {
  padding: 8px 16px 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid var(--bs-hairline);
}

.show-row-decline {
  padding: 0 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-top: 1px solid var(--bs-hairline);
}

.show-row-decline-input {
  font-size: 13.5px;
}

.show-row-decline-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.show-row-decline-note {
  margin: 0;
  padding: 8px 16px 12px;
  font-size: 12.5px;
  color: var(--bs-muted);
  line-height: 1.5;
  border-top: 1px solid var(--bs-hairline);
}
.show-row-decline-note-label {
  font-weight: 700;
  color: var(--bs-coral, #f47c7c);
  margin-right: 4px;
}

/* =====================================================================
   Earnings report — aggregated per-seller summary (Phase 2 parity).
   ===================================================================== */
.earnings-report {
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline);
  border-radius: var(--bs-r-lg);
  padding: 16px;
  margin-top: 4px;
}
.earnings-report-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.earnings-report-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0;
}
.earnings-report-sub {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--bs-muted);
}
.report-copy-btn {
  flex: none;
  background: var(--bs-bg-elev);
  color: var(--bs-text);
  border: 1px solid var(--bs-hairline-strong);
  border-radius: var(--bs-r-pill);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
}
.report-copy-btn:hover { border-color: var(--bs-mint); color: var(--bs-mint); }

.report-hero {
  text-align: center;
  padding: 6px 0 14px;
}
.report-hero-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-muted);
}
.report-hero-val {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 38px;
  font-weight: 500;
  color: var(--bs-mint, #5fe6a4);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.report-hero-sub {
  font-size: 12px;
  color: var(--bs-muted);
  margin-top: 2px;
}
.report-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}
.report-split-cell {
  background: var(--bs-bg-2);
  border: 1px solid var(--bs-hairline);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.report-split-label {
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bs-muted);
}
.report-split-val {
  font-size: 18px;
  font-weight: 600;
  color: var(--bs-text);
  font-variant-numeric: tabular-nums;
}
.report-by-seller-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 0 0 10px;
}
.report-seller-card {
  background: var(--bs-bg-2);
  border: 1px solid var(--bs-hairline);
  border-radius: 12px;
  padding: 12px 14px;
  margin-bottom: 10px;
}
.report-seller-card:last-child { margin-bottom: 0; }
.report-seller-name {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--bs-text);
  margin: 0 0 8px;
}
.report-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 3px 0;
  font-size: 13px;
}
.report-row-k { color: var(--bs-muted); }
.report-row-v {
  color: var(--bs-text);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* =====================================================================
   Live sales view (Phase 3) — realtime capture feed.
   ===================================================================== */
.live-stack { padding: 0 4px; }
.live-eyebrow-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.live-conn {
  font-size: 12px;
  line-height: 1;
  color: var(--bs-muted);
}
.live-conn[data-state="live"] {
  color: var(--bs-mint, #5fe6a4);
  animation: live-pulse 1.6s ease-in-out infinite;
}
.live-conn[data-state="off"] { color: var(--bs-coral, #f47c7c); }
@keyframes live-pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.live-track {
  margin: 12px 0 4px;
}
.live-track-row {
  display: flex;
  gap: 8px;
  align-items: center;
}
.live-track-row .form-input {
  flex: 1;
  min-width: 0;
}
.live-track-row .btn {
  flex: none;
}
.live-track-status {
  margin: 6px 2px 0;
  font-size: 12px;
  color: var(--bs-muted);
  min-height: 1em;
}

.live-hero {
  background: linear-gradient(160deg, var(--bs-mint-soft, rgba(95,230,164,0.14)), transparent);
  border: 1px solid var(--bs-mint-glow, rgba(95,230,164,0.40));
  border-radius: var(--bs-r-lg);
  padding: 18px 16px;
  text-align: center;
  margin: 12px 0 16px;
}
.live-hero-label {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-muted);
}
.live-hero-val {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 42px;
  font-weight: 500;
  color: var(--bs-mint, #5fe6a4);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.live-hero-sub {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin-top: 2px;
}

.live-sellers {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.live-seller-card {
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline);
  border-radius: 12px;
  padding: 12px 14px;
}
.live-seller-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.live-seller-name {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--bs-text);
}
.live-seller-split {
  font-size: 11px;
  font-weight: 700;
  color: var(--bs-muted);
}
.live-seller-cut {
  font-size: 22px;
  font-weight: 600;
  color: var(--bs-mint, #5fe6a4);
  margin-top: 4px;
  font-variant-numeric: tabular-nums;
}
.live-seller-sub {
  font-size: 12px;
  color: var(--bs-muted);
  margin-top: 1px;
}

.live-feed-title {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bs-muted);
  margin: 18px 0 8px;
}
.live-feed {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.live-loading { color: var(--bs-muted); font-size: 13px; padding: 8px 2px; }
.live-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--bs-bg-2);
  border: 1px solid var(--bs-hairline);
  border-radius: 10px;
  padding: 10px 12px;
}
.live-item--new { animation: live-flash 1.2s ease-out; }
@keyframes live-flash {
  0% { background: var(--bs-mint-soft, rgba(95,230,164,0.14)); border-color: var(--bs-mint-glow, rgba(95,230,164,0.40)); }
  100% { background: var(--bs-bg-2); border-color: var(--bs-hairline); }
}
.live-item-main { min-width: 0; flex: 1; }
.live-item-title {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--bs-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.live-item-meta {
  font-size: 11.5px;
  color: var(--bs-muted);
  margin-top: 2px;
  display: flex;
  align-items: center;
  gap: 4px;
}
.live-item-tag {
  background: var(--bs-mint-soft, rgba(95,230,164,0.14));
  color: var(--bs-mint, #5fe6a4);
  border-radius: var(--bs-r-pill);
  padding: 1px 8px;
  font-weight: 700;
}
.live-item-nums {
  flex: none;
  text-align: right;
  display: flex;
  flex-direction: column;
}
.live-item-cut {
  font-size: 15px;
  font-weight: 700;
  color: var(--bs-mint, #5fe6a4);
  font-variant-numeric: tabular-nums;
}
.live-item-price {
  font-size: 11px;
  color: var(--bs-muted);
  font-variant-numeric: tabular-nums;
}

.live-empty {
  text-align: center;
  padding: 28px 12px;
}
.live-empty-title {
  font-size: 15px;
  color: var(--bs-text);
  margin: 0 0 6px;
}
.live-empty-sub {
  font-size: 13px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

/* =====================================================================
   Contract sign banner (clickwrap e-signature).
   ===================================================================== */
.sign-banner {
  background: linear-gradient(160deg, rgba(242, 201, 94, 0.16), transparent);
  border: 1px solid rgba(242, 201, 94, 0.45);
  border-radius: var(--bs-r-lg);
  padding: 16px;
  margin: 4px 0 18px;
}
.sign-banner.signed {
  background: linear-gradient(160deg, var(--bs-mint-soft, rgba(95, 230, 164, 0.14)), transparent);
  border-color: var(--bs-mint-glow, rgba(95, 230, 164, 0.4));
}
.sign-eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--bs-gold, #f2c95e);
}
.sign-banner.signed .sign-eyebrow {
  color: var(--bs-mint, #5fe6a4);
}
.sign-title {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 18px;
  color: var(--bs-text);
  margin: 6px 0 4px;
}
.sign-sub {
  font-size: 12.5px;
  color: var(--bs-muted);
  margin: 0 0 12px;
  line-height: 1.5;
}
.sign-name-input {
  width: 100%;
  box-sizing: border-box;
  margin-bottom: 10px;
}
.sign-banner .btn {
  width: 100%;
}

/* =====================================================================
   Sold report (Phase 3) — item-level, grouped by show.
   ===================================================================== */
.sold-stack { padding: 0 4px; }
.sold-loading { color: var(--bs-muted); font-size: 13px; padding: 12px 2px; }
.sold-totals { margin: 12px 0 8px; }
.sold-shows {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sold-show {
  background: var(--bs-bg-card);
  border: 1px solid var(--bs-hairline);
  border-radius: var(--bs-r-lg);
  padding: 14px;
}
.sold-show-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}
.sold-show-title {
  font-family: var(--bs-font-serif, Georgia, serif);
  font-size: 15px;
  font-weight: 500;
  color: var(--bs-text);
}
.sold-show-when {
  font-size: 12px;
  color: var(--bs-muted);
}
.sold-show-totals {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 4px 0 10px;
}
.sold-show-cut {
  font-size: 20px;
  font-weight: 600;
  color: var(--bs-mint, #5fe6a4);
  font-variant-numeric: tabular-nums;
}
.sold-show-sub {
  font-size: 12px;
  color: var(--bs-muted);
}
.sold-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sold-empty {
  text-align: center;
  padding: 28px 12px;
}
.sold-empty-title {
  font-size: 15px;
  color: var(--bs-text);
  margin: 0 0 6px;
}
.sold-empty-sub {
  font-size: 13px;
  color: var(--bs-muted);
  margin: 0;
  line-height: 1.5;
}

/* ===================================================================
   Logistics additions — return-receive + damage/unsold reports
   (mirrors the Lite dashboards; uses design tokens from tokens.css)
   =================================================================== */
.cx-muted { color: var(--bs-muted); font-size: 13px; }
.cx-field-label { display: block; font-size: 12px; font-weight: 700; color: var(--bs-muted); margin: var(--bs-space-3) 0 var(--bs-space-1); }
.cx-input {
  width: 100%; box-sizing: border-box; background: var(--bs-bg-2); color: var(--bs-text);
  border: 1px solid var(--bs-hairline); border-radius: var(--bs-r-sm);
  font: inherit; font-size: 15px; padding: 10px 12px;
}
.cx-input[type="file"] { padding: 8px; font-size: 13px; }
.cx-btn {
  appearance: none; border: 1px solid var(--bs-hairline); background: var(--bs-bg-elev);
  color: var(--bs-text); border-radius: var(--bs-r-pill); font: inherit; font-weight: 700;
  padding: 9px 16px; cursor: pointer; transition: opacity var(--bs-t-fast);
}
.cx-btn:disabled { opacity: .5; }
.cx-btn--primary { background: var(--bs-emerald); color: var(--bs-emerald-on); border-color: transparent; }
.cx-btn--sm { font-size: 13px; padding: 7px 13px; }

.shipment-row-dir {
  display: inline-block; margin-left: 6px; font-size: 11px; font-weight: 700;
  color: var(--bs-gold); background: var(--bs-gold-soft); border-radius: var(--bs-r-pill);
  padding: 2px 8px; vertical-align: middle;
}
.shipment-row-track { margin: 4px 0 0; font-size: 12.5px; color: var(--bs-muted); }
.shipment-row-receive { margin-top: var(--bs-space-3); }
.shipment-receive-form { margin-top: var(--bs-space-2); padding: var(--bs-space-3); background: var(--bs-bg-2); border: 1px solid var(--bs-hairline); border-radius: var(--bs-r-md); }
.shipment-receive-actions { margin-top: var(--bs-space-3); }

.cx-damage-block { margin-top: var(--bs-space-6); }
.cx-damage-list { list-style: none; margin: 0; padding: 0; }
.cx-damage-item { padding: var(--bs-space-3) 0; border-top: 1px solid var(--bs-hairline); }
.cx-damage-item:first-child { border-top: none; }
.cx-damage-item-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cx-damage-item-title { font-weight: 700; }
.cx-damage-item-meta { font-size: 12px; color: var(--bs-muted); margin-top: 2px; }
.cx-damage-thumbs { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.shipment-status-pill {
  font-size: 11px; font-weight: 700; color: var(--bs-peach); background: var(--bs-peach-soft);
  border-radius: var(--bs-r-pill); padding: 2px 9px; white-space: nowrap;
}
.cx-damage-report { margin-top: var(--bs-space-4); }
.cx-damage-report > summary { cursor: pointer; padding: var(--bs-space-2) 0; }
.cx-damage-form { margin-top: var(--bs-space-2); }
.cx-damage-form-actions { margin-top: var(--bs-space-3); }
