/* Store Ops 2.0 base: tokens, type and shared controls.
   Zero-saturation charcoal. Violet (--so-acc / --so-facc) is used ONLY for the
   active navigation item. Status colours only as text, thin borders and dots. */

:root,
:root[data-admin-theme='dark'] {
  --so-frame: #0b0b0b;
  --so-panel: #141414;
  --so-card: #1a1a1a;
  --so-card2: #222222;
  --so-raise: #2b2b2b;
  --so-line: rgba(255, 255, 255, 0.08);
  --so-line2: rgba(255, 255, 255, 0.14);
  --so-ink: #ededed;
  --so-ink2: #a8a8a8;
  --so-ink3: #8c8c8c;
  --so-acc: #c38cff;
  --so-onacc: #14091f;
  --so-fink: #ededed;
  --so-fink2: #9c9c9c;
  --so-fitem: #171717;
  --so-fon: #1f1f1f;
  --so-facc: #c9a0ff;
  --so-fline: rgba(255, 255, 255, 0.1);
  --so-red: #ff6b81;
  --so-reds: rgba(255, 107, 129, 0.14);
  --so-amber: #ffb547;
  --so-ambers: rgba(255, 181, 71, 0.14);
  --so-mint: #5ee0a6;
  --so-mints: rgba(94, 224, 166, 0.13);
  --so-cyan: #4fd8f0;
  --so-cyans: rgba(79, 216, 240, 0.14);
  --so-orange: #e8925a;
  --so-danger-fill: #dc2643;
  --so-sh1: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px -10px rgba(0, 0, 0, 0.85);
  --so-sh2: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 30px 60px -24px rgba(0, 0, 0, 0.9), 0 2px 8px rgba(0, 0, 0, 0.4);
  --so-scrim: rgba(0, 0, 0, 0.62);
  --so-font: 'Geist', Inter, system-ui, sans-serif;
  --so-mono: 'Geist Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --so-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --so-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

  --admin-bg: var(--so-frame);
  --admin-surface: var(--so-panel);
  --admin-surface-strong: var(--so-card);
  --admin-surface-soft: var(--so-card2);
  --admin-border: var(--so-line2);
  --admin-text: var(--so-ink);
  --admin-muted: var(--so-ink2);
  --admin-shadow: none;
  --admin-accent-primary: var(--so-ink);
  --admin-accent-secondary: var(--so-ink2);
  --admin-accent-tertiary: var(--so-red);
  --admin-accent-quaternary: var(--so-ink);
  --admin-on-accent: var(--so-panel);
  --admin-success: var(--so-mint);
  --admin-warning: var(--so-amber);
  --admin-danger: var(--so-red);
  --admin-info: var(--so-cyan);
}

:root[data-admin-theme='light'] {
  /* The frame (sidebar, top bar) stays dark graphite; panels go light. */
  --so-frame: #262626;
  --so-panel: #f2f2f2;
  --so-card: #ffffff;
  --so-card2: #f6f6f6;
  --so-raise: #e9e9e9;
  --so-line: rgba(0, 0, 0, 0.08);
  --so-line2: rgba(0, 0, 0, 0.15);
  --so-ink: #161616;
  --so-ink2: #525252;
  --so-ink3: #6b6b6b;
  --so-acc: #8a3ee6;
  --so-onacc: #ffffff;
  --so-fink: #efefef;
  --so-fink2: #a6a6a6;
  --so-fitem: #2f2f2f;
  --so-fon: #3a3a3a;
  --so-facc: #d2adff;
  --so-fline: rgba(255, 255, 255, 0.12);
  --so-red: #d42a48;
  --so-reds: rgba(212, 42, 72, 0.1);
  --so-amber: #a86400;
  --so-ambers: rgba(214, 140, 20, 0.13);
  --so-mint: #0e8f5b;
  --so-mints: rgba(14, 143, 91, 0.1);
  --so-cyan: #08819a;
  --so-cyans: rgba(8, 129, 154, 0.1);
  --so-orange: #b4541a;
  --so-sh1: 0 1px 2px rgba(24, 20, 34, 0.06), 0 8px 20px -12px rgba(24, 20, 34, 0.25);
  --so-sh2: 0 30px 60px -28px rgba(24, 20, 34, 0.45), 0 2px 8px rgba(24, 20, 34, 0.08);
  --so-scrim: rgba(0, 0, 0, 0.42);

  --admin-bg: var(--so-frame);
  --admin-surface: var(--so-panel);
  --admin-surface-strong: var(--so-card);
  --admin-surface-soft: var(--so-card2);
  --admin-border: var(--so-line2);
  --admin-text: var(--so-ink);
  --admin-muted: var(--so-ink2);
  --admin-shadow: none;
  --admin-accent-primary: var(--so-ink);
  --admin-accent-secondary: var(--so-ink2);
  --admin-accent-tertiary: var(--so-red);
  --admin-accent-quaternary: var(--so-ink);
  --admin-on-accent: var(--so-panel);
  --admin-success: var(--so-mint);
  --admin-warning: var(--so-amber);
  --admin-danger: var(--so-red);
  --admin-info: var(--so-cyan);
}

/* Type: Geist everywhere the old CSS named Plus Jakarta Sans or Space Grotesk. */
body,
button,
input,
select,
textarea,
.admin-affiliate-head h4, .admin-modal-head h3,
.admin-dropoff-badge,
.admin-instant-badge,
.admin-invoice-detail-head h2,
.admin-invoice-dropzone strong,
.admin-label-option-card strong,
.admin-label-print-done strong,
.admin-label-sheet strong,
.admin-loader-panel h2, .admin-login-brand h1, .admin-topbar-brand h1, .admin-hero-copy h2, .admin-panel-head h3,
.admin-metric-card strong,
.admin-order-deadline,
.admin-order-deadline > small,
.admin-order-record-row td:first-child strong,
.admin-pick-item strong, .admin-scan-item strong,
.admin-preview-deadline strong,
.admin-preview-hero-copy strong,
.admin-preview-product strong,
.admin-preview-section-head strong,
.admin-print-station-card h3,
.admin-reprint-profile-avatar,
.admin-reprint-result-heading strong, .admin-reprint-selected-head strong,
.admin-returns-order-summary h3,
.admin-returns-progress > div > b,
.admin-returns-section-head h2, .admin-returns-history-head h2,
.admin-rotate-card h2,
.admin-scan-stock-alert strong,
.admin-scan-stock-alert-icon,
.admin-scanner-capture strong,
.admin-scanner-health-card strong,
.admin-scanner-status-card strong,
.admin-settings-brand strong,
.admin-settings-header h3,
.admin-settings-section-head h4,
.admin-sku-master-card h4,
.admin-sku-preview strong,
.admin-stock-action strong,
.admin-stock-adjust-head h2,
.admin-stock-adjust-page-minimal .admin-stock-action strong,
.admin-stock-adjust-page-minimal .admin-stock-empty strong,
.admin-stock-empty strong,
.admin-stock-history-mark,
.admin-stock-numbers strong,
.admin-stock-product-copy h3,
.admin-store-login-card strong,
.admin-store-page-title h1,
.admin-store-stat strong,
.admin-walkins-complete-card > strong,
.admin-walkins-complete-card h3,
.admin-walkins-empty strong,
.admin-walkins-grand-total strong,
.admin-walkins-invoice-customer,
.admin-walkins-invoice-dates span,
.admin-walkins-invoice-dates strong,
.admin-walkins-invoice-number h2,
.admin-walkins-invoice-page,
.admin-walkins-invoice-promise,
.admin-walkins-invoice-row,
.admin-walkins-invoice-shipping-cost,
.admin-walkins-invoice-table-head,
.admin-walkins-invoice-terms,
.admin-walkins-invoice-title-main > strong,
.admin-walkins-invoice-total,
.admin-walkins-invoice-total small,
.admin-walkins-summary-head strong,
.is-store-home .admin-store-home .admin-order-id,
body,
html[data-device="phone"] .admin-phone-deadline strong,
html[data-device="phone"] .admin-phone-qty,
html[data-device="phone"] .admin-store-home .admin-store-command .admin-store-stat strong,
html[data-device="phone"] .is-store-home .admin-store-home .admin-order-deadline,
html[data-device="phone"] .is-store-home .admin-store-home .admin-order-deadline > small,
html[data-device="phone"] .is-store-home .admin-store-home .admin-order-deadline > span {
  font-family: var(--so-font);
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: 'tnum' 0;
}

:root {
  --admin-heading-font: var(--so-font);
}

/* The old decorative backdrop washes are gone: flat charcoal only. */
.admin-backdrop {
  display: none !important;
}

a,
button {
  -webkit-tap-highlight-color: transparent;
}

:focus-visible {
  outline: 2px solid var(--so-ink2);
  outline-offset: 2px;
}

@keyframes so-rise { from { opacity: 0; transform: translate3d(0, 14px, 0) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes so-pop { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: none; } }
@keyframes so-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes so-sheet { from { transform: translate3d(0, 104%, 0); } to { transform: none; } }
@keyframes so-spin { to { transform: rotate(360deg); } }
@keyframes so-breathe { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
@keyframes so-pulse-red { 0%, 100% { border-color: rgba(255, 107, 129, 0.3); } 50% { border-color: rgba(255, 107, 129, 1); } }
@keyframes so-pulse-cyan { 0%, 100% { border-color: rgba(79, 216, 240, 0.3); } 50% { border-color: rgba(79, 216, 240, 1); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* One-time note about Settings > Language (redesign/lang-hint.js).
   Computers: bottom right, clear of the Printed toast (bottom centre).
   Phones: slides down from the top, clear of the dock and the toast. */
.so-lang-hint {
  position: fixed;
  right: 24px;
  bottom: 20px;
  z-index: 9100;
  display: flex;
  align-items: center;
  gap: 12px;
  width: min(420px, calc(100vw - 24px));
  box-sizing: border-box;
  padding: 10px 10px 10px 12px;
  border: 1px solid var(--so-line2);
  border-radius: 22px;
  background: var(--so-card);
  box-shadow: var(--so-sh2);
  color: var(--so-ink);
  font-family: var(--so-font);
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition: transform 0.7s var(--so-ease), opacity 0.4s var(--so-ease);
}

.so-lang-hint.is-visible {
  opacity: 1;
  transform: none;
}

.so-lang-hint-switch {
  display: flex;
  flex: 1;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.so-lang-hint-switch:hover .so-lang-hint-icon {
  background: var(--so-raise);
}

.so-lang-hint-icon {
  transition: background-color 0.25s;
  display: grid;
  flex: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--so-card2);
  color: var(--so-ink);
}

.so-lang-hint-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.so-lang-hint-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  margin: 0;
}

.so-lang-hint-copy strong {
  font-size: 13.5px;
  font-weight: 600;
  line-height: 1.3;
}

.so-lang-hint-copy span {
  text-wrap: balance;
  color: var(--so-ink2);
  font-size: 12.5px;
  line-height: 1.35;
}

.so-lang-hint-close {
  flex: none;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--so-line2);
  border-radius: 999px;
  background: transparent;
  color: var(--so-ink);
  font: 500 13px/1 var(--so-font);
  cursor: pointer;
  transition: background-color 0.25s, transform 0.35s var(--so-ease);
}

.so-lang-hint-close:hover {
  background: var(--so-card2);
}

.so-lang-hint-close:active {
  transform: scale(0.97);
}

html[data-device="phone"] .so-lang-hint {
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: 10px;
  bottom: auto;
  left: 10px;
  width: auto;
  transform: translate3d(0, -24px, 0);
}

html[data-device="phone"] .so-lang-hint.is-visible {
  transform: none;
}

html[data-device="phone"] .so-lang-hint-close {
  height: 44px;
}
