:root,
[data-theme="dark"] {
  --pink-light: #fadce0;
  --pink: #ed73b8;
  --purple-light: #c79efa;
  --purple: #9459eb;
  --bg-top: #1f0f33;
  --bg-bottom: #2e1447;
  --sidebar: rgba(26, 13, 41, 0.92);
  --card: rgba(255, 255, 255, 0.07);
  --card-45: rgba(255, 255, 255, 0.045);
  --card-60: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.12);
  --border-50: rgba(255, 255, 255, 0.06);
  --text: #fff;
  --text-secondary: rgba(255, 255, 255, 0.65);
  --text-muted: rgba(255, 255, 255, 0.42);
  --positive: #59d98c;
  --positive-bg: rgba(38, 89, 56, 0.85);
  --hover-bg: rgba(255, 255, 255, 0.04);
  --row-hover: rgba(255, 255, 255, 0.04);
  --glow-purple: rgba(148, 89, 235, 0.35);
  --glow-pink: rgba(237, 115, 184, 0.2);
  --sidebar-width: 260px;
  --content-px: 32px;
  --icon-size: 16px;
  --popover-bg: #2b163f;
}

[data-theme="light"] {
  --pink-light: #c43d8a;
  --pink: #d946a8;
  --purple-light: #7c3aed;
  --purple: #6d28d9;
  --bg-top: #f8f4fc;
  --bg-bottom: #ebe2f7;
  --sidebar: rgba(255, 255, 255, 0.94);
  --card: rgba(255, 255, 255, 0.82);
  --card-45: rgba(255, 255, 255, 0.72);
  --card-60: rgba(255, 255, 255, 0.78);
  --border: rgba(109, 40, 217, 0.14);
  --border-50: rgba(109, 40, 217, 0.08);
  --text: #1a0f33;
  --text-secondary: rgba(26, 15, 51, 0.68);
  --text-muted: rgba(26, 15, 51, 0.45);
  --positive: #15803d;
  --positive-bg: rgba(21, 128, 61, 0.12);
  --hover-bg: rgba(26, 15, 51, 0.05);
  --row-hover: rgba(109, 40, 217, 0.06);
  --glow-purple: rgba(148, 89, 235, 0.18);
  --glow-pink: rgba(237, 115, 184, 0.12);
  --popover-bg: #ffffff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  color: var(--text);
  background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

button, input, select { font: inherit; }

#app { min-height: 100vh; }

/* ——— Auth screens ——— */

.screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
}

.glow-purple {
  width: 420px;
  height: 420px;
  background: radial-gradient(circle, var(--glow-purple), transparent 70%);
  top: -80px;
  right: 15%;
}

.glow-pink {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, var(--glow-pink), transparent 70%);
  bottom: -80px;
  left: 10%;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  backdrop-filter: blur(12px);
}

.card-lg { border-radius: 20px; }

.btn-brand {
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  transition: opacity 0.15s, transform 0.15s;
}

.btn-brand:hover:not(:disabled) { opacity: 0.9; }
.btn-brand:active:not(:disabled) { opacity: 0.75; transform: scale(0.97); }
.btn-brand:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-ghost {
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 14px;
}

.btn-ghost:hover { color: var(--text); background: var(--hover-bg); }

.field {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}

.field-icon { color: var(--purple-light); width: 20px; text-align: center; flex-shrink: 0; }

.field input {
  flex: 1;
  border: 0;
  background: transparent;
  color: var(--text);
  outline: none;
  font-size: 14px;
}

.field input::placeholder { color: var(--text-muted); }

.login-card {
  width: min(440px, 100%);
  padding: 32px;
  position: relative;
  z-index: 1;
}

.login-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  position: relative;
  z-index: 1;
}

.logo-box {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-size: 28px;
  color: #fff;
}

.logo-title {
  font-size: 18px;
  font-weight: 700;
  margin: 12px 0 0;
  text-align: center;
}

.login-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.login-desc {
  font-size: 14px;
  color: var(--text-secondary);
  text-align: center;
  line-height: 1.45;
  margin: 0;
}

.login-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.center-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.text-secondary { color: var(--text-secondary); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--purple-light); }
.text-error { color: var(--pink-light); }

/* ——— App shell ——— */

.app-bg {
  min-height: 100vh;
  display: flex;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

.app-bg-glow-purple {
  position: absolute;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-purple), transparent 70%);
  filter: blur(60px);
  top: -180px;
  right: 120px;
  pointer-events: none;
}

.app-bg-glow-pink {
  position: absolute;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--glow-pink), transparent 70%);
  filter: blur(50px);
  bottom: -80px;
  left: -80px;
  pointer-events: none;
}

.app-shell {
  display: flex;
  min-height: 100vh;
  width: 100%;
  position: relative;
  z-index: 1;
}

/* ——— Sidebar ——— */

.sidebar {
  width: var(--sidebar-width);
  flex-shrink: 0;
  background: var(--sidebar);
  background-image: linear-gradient(180deg, rgba(148, 89, 235, 0.15), transparent 120px);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: width 0.22s ease, opacity 0.22s ease, border-color 0.22s ease;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  opacity: 0;
  border-right-color: transparent;
  pointer-events: none;
}

.topbar-leading {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.sidebar-toggle-btn {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--card);
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sidebar-toggle-btn:hover {
  background: var(--hover-bg);
  border-color: var(--border-50);
}

.sidebar-toggle-icon { --icon-size: 16px; }

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 20px 32px;
}

.sidebar-brand-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-size: 18px;
  flex-shrink: 0;
}

.sidebar-brand-text { line-height: 1.2; }
.sidebar-brand-name { font-size: 16px; font-weight: 700; }
.sidebar-brand-sub { font-size: 12px; font-weight: 500; color: var(--pink-light); }

.sidebar-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding: 0 24px 10px;
}

.sidebar-nav {
  flex: 1;
  padding: 0 12px;
  overflow-y: auto;
}

.nav-section { margin-bottom: 4px; }

.nav-item, .nav-subitem {
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-secondary);
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: background 0.12s;
}

.nav-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.nav-chevron {
  margin-left: auto;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  opacity: 0.6;
}

.nav-lock {
  font-size: 10px;
  opacity: 0.7;
  margin-left: auto;
  display: inline-flex;
  align-items: center;
}

.nav-item:hover:not(.locked), .nav-subitem:hover { background: var(--hover-bg); }

.nav-item.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(148, 89, 235, 0.35);
  border-color: rgba(237, 115, 184, 0.4);
}

.nav-item.verified {
  color: var(--positive);
}

.nav-item.verified.active {
  color: var(--positive);
  background: rgba(89, 217, 140, 0.14);
  border-color: rgba(89, 217, 140, 0.35);
}

.nav-item.verified .nav-icon-svg,
.nav-item.verified.active .nav-icon-svg {
  color: var(--positive);
}

.nav-item.locked { opacity: 0.45; cursor: not-allowed; }

.nav-icon {
  width: 20px;
  height: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-icon .icon,
.nav-icon .icon-sf-asset {
  width: 14px;
  height: 14px;
  --icon-size: 14px;
}

.nav-item:not(.active) .nav-icon-svg {
  color: var(--text-secondary);
}

.nav-item.active .nav-icon-svg {
  color: var(--pink-light);
}

.nav-subitems {
  margin-left: 22px;
  padding-left: 12px;
  border-left: 1px solid var(--border);
  margin-top: 2px;
}

.nav-subitem {
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 13px;
  border: 0;
}

.nav-subitem.active {
  color: var(--text);
  font-weight: 600;
  background: rgba(148, 89, 235, 0.25);
}

.nav-subitem.verified {
  color: var(--positive);
}

.nav-subitem.verified.active {
  color: var(--positive);
  background: rgba(89, 217, 140, 0.14);
  box-shadow: inset 0 0 0 1px rgba(89, 217, 140, 0.35);
}

.nav-verified-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--positive);
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(89, 217, 140, 0.2);
}

.nav-subitem-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

/* ——— Main area ——— */

.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100vh;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px var(--content-px);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}

.topbar-title {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.topbar-subtitle {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  font-size: 12px;
}

.topbar-crown { color: var(--pink-light); font-size: 11px; }

.content {
  flex: 1;
  padding: 8px 0 24px;
  overflow: auto;
}

.page-scroll {
  padding-bottom: 24px;
}

/* ——— Page header (Mac-style) ——— */

.page-header {
  padding: 8px var(--content-px) 16px;
}

.page-header-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.page-eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: var(--pink-light);
  margin-bottom: 8px;
}

.page-title {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.15;
}

.page-desc {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
  max-width: 720px;
}

.page-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.page-actions-top {
  display: flex;
  align-items: center;
  gap: 10px;
}

.stored-days-anchor {
  position: relative;
  display: flex;
  align-items: center;
  flex-shrink: 0;
  z-index: 30;
}

.page-action-hint {
  font-size: 11px;
  color: var(--text-muted);
  text-align: right;
  max-width: 220px;
}

/* ——— Filters ——— */

.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 10px 8px;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border);
  min-width: 0;
}

.filter-group-label {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.filter-group select,
.filter-group input {
  background: transparent;
  border: 0;
  color: var(--text);
  font-size: 13px;
  outline: none;
  min-width: 80px;
  padding: 2px 0;
}

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; }

.chip {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  border-radius: 999px;
  padding: 5px 11px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.12s;
}

.chip:hover { border-color: rgba(255,255,255,0.2); color: var(--text); }

.chip.active {
  color: #fff;
  border-color: transparent;
  background: rgba(148, 89, 235, 0.35);
  box-shadow: inset 0 0 0 1px rgba(237, 115, 184, 0.35);
}

/* ——— Banners & badges ——— */

.banner {
  margin: 0 var(--content-px) 12px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 13px;
}

.banner-error {
  color: var(--pink-light);
  background: var(--card);
  border: 1px solid var(--border);
}

.banner-warn, .banner-info {
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
}

.storage-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--card);
  border: 1px solid var(--border);
}

.storage-badge.ok { color: var(--positive); }
.storage-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--purple-light);
}

/* ——— Stats ——— */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 12px;
  margin: 0 var(--content-px) 16px;
}

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

.stat-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
}

.stat-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  word-break: break-word;
}

/* ——— Tables ——— */

.table-section {
  margin: 0 var(--content-px);
}

.table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-45);
}

table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.data-table th {
  padding: 10px 12px;
  text-align: left;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
  z-index: 1;
}

.data-table td {
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-50);
  color: var(--text-secondary);
  white-space: nowrap;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.data-table tbody tr:hover td { background: rgba(255,255,255,0.03); }
.data-table tbody tr:last-child td { border-bottom: 0; }

.table-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 8px;
}

/* ——— Placeholder ——— */

.dev-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 420px;
  gap: 16px;
  text-align: center;
  padding: 32px;
}

.dev-placeholder-icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.dev-placeholder-icon-svg { --icon-size: 48px; }

.dev-placeholder h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
}

.dev-placeholder p {
  margin: 0;
  font-size: 14px;
  color: var(--text-secondary);
}

.empty-state {
  margin: 0 var(--content-px);
  padding: 40px 24px;
  text-align: center;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}

.empty-state p { margin: 0 0 8px; }
.empty-state .text-muted { font-size: 13px; }

.json-box {
  margin: 0 var(--content-px);
  padding: 16px;
  overflow: auto;
  max-height: 50vh;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border);
}

/* ——— Settings ——— */

.settings-page {
  padding: 8px var(--content-px) 32px;
  max-width: 900px;
}

.settings-header { margin-bottom: 28px; }

.settings-grid {
  display: grid;
  gap: 16px;
}

.settings-card {
  padding: 20px;
  border-radius: 16px;
  background: var(--card);
  border: 1px solid var(--border);
}

.settings-card h2 {
  margin: 0 0 12px;
  font-size: 16px;
  font-weight: 600;
}

.profile-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.profile-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  font-size: 22px;
  flex-shrink: 0;
}

.profile-name { font-size: 18px; font-weight: 600; margin: 0 0 4px; }
.profile-role { font-size: 12px; font-weight: 500; color: var(--pink-light); }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.badge-ok { background: rgba(89, 217, 140, 0.18); color: var(--positive); }
.badge-warn { background: rgba(255, 180, 80, 0.18); color: #ffd699; }

.user-list { display: grid; gap: 10px; margin-top: 12px; }

.user-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--border-50);
}

.logout-link {
  border: 0;
  background: none;
  color: var(--pink-light);
  font-size: 14px;
  cursor: pointer;
  padding: 8px 0;
  margin-top: 12px;
}

.logout-link:hover { opacity: 0.85; }

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  color: var(--purple-light);
  word-break: break-all;
}

.loading-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: linear-gradient(135deg, var(--bg-top), var(--bg-bottom));
}

/* ——— Orders (Mac parity) ——— */

.orders-page {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.orders-page .page-header {
  padding-bottom: 4px;
}

.orders-page .widgets-section {
  margin-top: 6px;
}

.orders-page .categories-section {
  margin-top: 2px;
}

.orders-page .orders-feed-section {
  margin-top: 6px;
}

.orders-header {
  padding-bottom: 0;
  position: relative;
  z-index: 2;
  overflow: visible;
}

.orders-header-copy {
  flex: 1;
  min-width: 280px;
}

.page-eyebrow.text-only {
  gap: 0;
}

.page-eyebrow.text-only::before {
  display: none;
}

.storage-badge.text-only {
  gap: 8px;
  margin-top: 12px;
}

.storage-synced {
  color: var(--text-muted);
  font-size: 11px;
}

.orders-filter-scroll {
  margin-top: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  -webkit-overflow-scrolling: touch;
}

.orders-filter-bar {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-end;
  gap: 10px;
  min-width: max-content;
  margin-top: 0;
}

.orders-filter-bar .filter-group {
  flex: 0 0 auto;
  min-width: 108px;
  min-height: 56px;
  justify-content: flex-start;
}

.orders-filter-bar .filter-group select {
  min-width: 96px;
  max-width: 180px;
  appearance: none;
  padding-right: 18px;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%239b8ab8' d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.orders-filter-bar .filter-count {
  margin-left: auto;
}

.filter-group-vendor {
  position: relative;
  min-width: 108px;
  max-width: 180px;
}

.orders-filter-bar .filter-group-vendor .vendor-filter-btn {
  min-width: 96px;
  max-width: 180px;
  width: 100%;
  padding-right: 18px;
}

.vendor-picker-search {
  width: 100%;
  margin-bottom: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
}

.vendor-picker-search:focus {
  outline: none;
  border-color: var(--purple);
}

.vendor-picker-hint {
  padding: 10px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
}

.vendor-option.is-hidden {
  display: none;
}

.vendor-suggestion-empty {
  padding: 8px 10px;
  font-size: 12px;
  color: var(--text-muted);
}

.filter-static-value {
  display: block;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text);
  padding: 2px 0;
  word-break: break-word;
}

.filter-group-static {
  min-width: 120px;
  max-width: 180px;
}

.vendor-filter-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  min-height: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath fill='%239b8ab8' d='M2 3.5 5 6.5 8 3.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
}

.vendor-filter-value {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  word-break: normal;
  max-width: 100%;
  padding-right: 4px;
}

.vendor-filter-chevron {
  display: none;
}

.vendor-filter-menu {
  position: fixed;
  z-index: 300;
  min-width: 220px;
  max-width: 320px;
  max-height: min(280px, calc(100vh - 100px));
  overflow: auto;
  padding: 8px;
  border-radius: 12px;
  background: var(--popover-bg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}

.orders-filter-scroll.is-vendor-menu-open {
  overflow-y: visible;
}

.vendor-filter-clear {
  display: block;
  width: 100%;
  margin-bottom: 6px;
  padding: 8px 10px;
  border: 0;
  border-radius: 8px;
  background: rgba(148, 89, 235, 0.12);
  color: var(--purple-light);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
}

.vendor-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
}

.vendor-option:hover {
  background: var(--row-hover);
}

.vendor-option input {
  accent-color: var(--purple);
}

.mac-storage { margin-top: 12px; }

.widgets-section {
  padding: 0 var(--content-px) 20px;
  margin-top: 4px;
  position: relative;
  z-index: 0;
}

.widgets-section-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 12px;
}

.widgets-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

@media (max-width: 1100px) {
  .widgets-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .widgets-metrics {
    grid-template-columns: 1fr;
  }
}

.metric-card {
  padding: 14px 16px;
  border-radius: 12px;
  min-height: 78px;
}

.metric-card-btn {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--card);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}

.metric-card-btn:hover {
  border-color: var(--purple);
  background: rgba(148, 89, 235, 0.08);
}

.metric-card-btn:active {
  transform: scale(0.99);
}

.metric-card-btn:focus-visible {
  outline: 2px solid var(--purple);
  outline-offset: 2px;
}

.metric-card-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.metric-card-value {
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  word-break: break-word;
}

.metric-card-head {
  display: none;
}

.widgets-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

@media (max-width: 900px) {
  .widgets-panels {
    grid-template-columns: 1fr;
  }
}

.ranking-panel {
  padding: 16px;
  border-radius: 14px;
  min-height: 0;
}

.ranking-panel-head {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 12px;
}

.ranking-cols-head {
  display: grid;
  grid-template-columns: 22px 1fr 72px 88px;
  gap: 10px;
  padding: 0 8px 6px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.ranking-cols-head span:nth-child(n+3) {
  text-align: right;
}

.ranking-cols-spacer {
  display: block;
}

.ranking-panel-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
}

.ranking-panel-titles {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ranking-panel-sub {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.35;
}

.ranking-panel-icon {
  display: none;
}

.ranking-empty {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0;
}

.ranking-row {
  display: grid;
  grid-template-columns: 22px 1fr 72px 88px;
  gap: 10px;
  align-items: start;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  width: 100%;
  text-align: left;
  cursor: pointer;
  font: inherit;
}

.ranking-row:hover { background: var(--row-hover); }

.ranking-row.selected {
  background: rgba(148, 89, 235, 0.28);
  box-shadow: inset 0 0 0 1px rgba(237, 115, 184, 0.45);
}

.ranking-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--pink-light);
  background: rgba(237, 115, 184, 0.15);
  flex-shrink: 0;
}

.ranking-main { min-width: 0; }

.ranking-title {
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.ranking-sub {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 3px;
}

.ranking-val {
  font-size: 12px;
  font-weight: 600;
  text-align: right;
  align-self: start;
}

.ranking-sec {
  font-size: 11px;
  color: var(--purple-light);
  text-align: right;
  align-self: start;
  white-space: nowrap;
}

.orders-feed-section {
  padding: 0 var(--content-px) 24px;
  margin-top: 4px;
}

.orders-feed-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.orders-feed-title {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
}

.orders-load-more {
  border: 0;
  background: transparent;
  color: var(--purple-light);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  padding: 4px 0;
}

.orders-table-shell {
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-45);
  overflow: hidden;
}

.orders-table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.orders-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.orders-table th,
.orders-table td {
  padding: 8px 12px;
  font-size: 11px;
  vertical-align: middle;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.orders-table thead th {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.04);
  text-align: left;
  white-space: nowrap;
}

.orders-table tbody tr:last-child td {
  border-bottom: 0;
}

.orders-table .th-right,
.orders-table .col-price { text-align: right; }

.orders-table .th-center,
.orders-table .col-status { text-align: center; }

.orders-table .col-photo { width: 52px; text-align: center; }

.orders-table .mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-secondary);
}

.orders-table .muted { color: var(--text-muted); }

.orders-table .price { color: var(--purple-light); font-weight: 600; }

.order-photo {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  display: block;
}

.order-photo-ph {
  display: inline-block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}

.order-status {
  display: inline-block;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

.order-status.status-order { color: #59d98c; background: rgba(89, 217, 140, 0.15); }
.order-status.status-cancel { color: var(--pink-light); background: rgba(237, 115, 184, 0.15); }
.order-status.status-sale { color: var(--purple-light); background: rgba(148, 89, 235, 0.15); }

.orders-filter-bar { margin-top: 0; }

.filter-count {
  align-self: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 8px 4px 10px;
  white-space: nowrap;
}

.filter-reset {
  align-self: flex-end;
  flex: 0 0 auto;
  font-size: 12px;
  color: var(--purple-light);
  border: 0;
  background: transparent;
  cursor: pointer;
  padding: 8px 4px 10px;
  white-space: nowrap;
}

.filter-group-wide select[multiple] { min-width: 120px; max-height: 72px; }

.categories-section {
  padding: 0 var(--content-px) 20px;
}

.categories-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.category-card {
  flex: 0 0 180px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font: inherit;
}

.category-card.active {
  background: rgba(148, 89, 235, 0.28);
  border-color: rgba(237, 115, 184, 0.45);
}

.category-name { font-size: 12px; font-weight: 600; margin-bottom: 6px; line-height: 1.3; }
.category-orders { font-size: 11px; font-weight: 500; color: var(--purple-light); }
.category-sum { font-size: 11px; color: var(--text-muted); margin-top: 4px; }

.page-header-top-row {
  display: none;
}

.stored-days-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--popover-bg);
  color: var(--text-muted);
  cursor: pointer;
  display: grid;
  place-items: center;
  padding: 0;
  flex-shrink: 0;
}

.stored-days-icon { --icon-size: 16px; }

.stored-days-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: 300px;
  padding: 14px;
  border-radius: 14px;
  background: var(--popover-bg);
  border: 1px solid var(--border);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  z-index: 300;
  pointer-events: auto;
}

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

.stored-cal-title {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
}

.stored-cal-month {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-transform: capitalize;
}

.stored-cal-count {
  font-size: 11px;
  color: var(--text-muted);
}

.stored-cal-nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
}

.stored-cal-weekdays,
.stored-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.stored-cal-weekdays {
  margin-bottom: 6px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
}

.stored-cal-cell {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  font-size: 11px;
  color: var(--text-secondary);
  border-radius: 50%;
}

.stored-cal-cell.empty {
  visibility: hidden;
}

.stored-cal-cell.loaded {
  color: #fff;
  font-weight: 600;
  background: #3ecf7a;
  box-shadow: 0 0 0 2px rgba(62, 207, 122, 0.25);
}

.stored-cal-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--text-muted);
}

.stored-cal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #3ecf7a;
  flex-shrink: 0;
}

.topbar-minimal {
  justify-content: space-between;
}

.topbar-copy-hidden {
  display: none;
}

.region-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--card);
  color: var(--purple-light);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.region-back-btn {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 0;
  background: var(--card);
  color: var(--purple-light);
  cursor: pointer;
  font-size: 11px;
}

.load-more-btn { font-size: 12px; font-weight: 500; color: var(--purple-light); }

.hidden { display: none !important; }

@media (max-width: 900px) {
  .app-shell { flex-direction: column; }
  .app-shell.sidebar-collapsed .sidebar {
    width: 100%;
    max-height: 0;
    min-height: 0;
    opacity: 0;
    border-right: 0;
    border-bottom-color: transparent;
  }
  .sidebar {
    width: 100%;
    min-height: auto;
    max-height: 280px;
    transition: max-height 0.22s ease, opacity 0.22s ease;
  }
  .app-shell:not(.sidebar-collapsed) .sidebar {
    max-height: 280px;
    opacity: 1;
    pointer-events: auto;
  }
  .page-title { font-size: 24px; }
  --content-px: 20px;
}

/* ——— Icons (SF Symbols style) ——— */

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--icon-size, 16px);
  height: var(--icon-size, 16px);
  flex-shrink: 0;
  color: var(--text-secondary);
}

.icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.icon-sf-asset {
  background-color: currentColor;
  -webkit-mask-image: var(--icon-asset);
  mask-image: var(--icon-asset);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: center;
  mask-position: center;
  -webkit-mask-size: contain;
  mask-size: contain;
}

.icon-accent-pink-light { color: var(--pink-light); }
.icon-accent-purple-light { color: var(--purple-light); }
.icon-accent-muted { color: var(--text-muted); }
.icon-accent-white { color: #fff; }
.icon-accent-pink { color: var(--pink); }
.icon-accent-brand { color: var(--purple); }

.page-eyebrow-icon { --icon-size: 14px; }
.nav-icon-svg { --icon-size: 14px; }
.nav-lock-icon { --icon-size: 10px; }
.nav-chevron-icon { --icon-size: 10px; }
.sidebar-brand-icon-svg { --icon-size: 20px; }
.logo-icon { --icon-size: 30px; }
.field-icon-svg { --icon-size: 18px; }
.metric-icon { --icon-size: 14px; }
.ranking-panel-icon { --icon-size: 14px; }
.storage-badge-icon { --icon-size: 14px; }
.order-photo-icon { --icon-size: 18px; }
.topbar-crown-icon { --icon-size: 12px; }
.profile-avatar-icon { --icon-size: 22px; }
.state-icon { display: flex; justify-content: center; }
.state-icon-svg { --icon-size: 40px; }

/* ——— Theme ——— */

.theme-toggle-btn {
  border: 1px solid var(--border);
  background: var(--card);
  border-radius: 10px;
  padding: 7px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: inherit;
}

.theme-toggle-btn:hover { background: var(--hover-bg); }
.theme-toggle-icon { --icon-size: 16px; }

.theme-picker {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.theme-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-secondary);
  cursor: pointer;
  font: inherit;
}

.theme-option:hover { background: var(--hover-bg); }

.theme-option.active {
  border-color: rgba(237, 115, 184, 0.45);
  background: rgba(148, 89, 235, 0.2);
  color: var(--text);
}

[data-theme="light"] .theme-option.active {
  background: rgba(109, 40, 217, 0.1);
}

.theme-option-icon { --icon-size: 16px; }

/* ——— Home & Analytics dashboard ——— */

.home-page { padding-bottom: 24px; }
.home-header { padding: 8px var(--content-px) 24px; }
.home-section { padding: 0 var(--content-px) 28px; }
.home-section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-heading { margin: 0; font-size: 18px; font-weight: 600; }

.turnover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.turnover-card { padding: 18px; border-radius: 14px; min-height: 150px; }
.turnover-card-total { border-color: rgba(237, 115, 184, 0.35); box-shadow: inset 0 0 0 1px rgba(237, 115, 184, 0.2); }

.turnover-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}

.turnover-card-title { font-size: 14px; font-weight: 600; line-height: 1.3; }
.turnover-card-count {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 4px 8px;
  border-radius: 999px;
  background: var(--card);
  white-space: nowrap;
}

.turnover-card-value { font-size: 26px; font-weight: 700; margin-bottom: 10px; line-height: 1.1; }

.turnover-card-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }

.metric-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background: var(--card);
}

.metric-pill-label { font-size: 11px; font-weight: 600; color: var(--text-muted); }
.metric-pill-positive { background: rgba(38, 89, 56, 0.85); color: #59d98c; }
.metric-pill-negative { background: rgba(89, 31, 46, 0.85); color: var(--pink-light); }
[data-theme="light"] .metric-pill-positive { background: rgba(21, 128, 61, 0.12); color: #15803d; }
[data-theme="light"] .metric-pill-negative { background: rgba(196, 61, 138, 0.12); color: #c43d8a; }

.turnover-card-foot {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-muted);
}

.top-products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}

.top-product-card { padding: 16px; border-radius: 14px; min-height: 130px; }
.top-product-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.top-product-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--pink-light);
  background: rgba(237, 115, 184, 0.15);
  flex-shrink: 0;
}
.top-product-meta { flex: 1; min-width: 0; }
.top-product-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.top-product-sub { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.top-product-value { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.top-product-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 14px;
}
.section-title-icon { --icon-size: 14px; }

.dashboard-section { padding: 0 var(--content-px) 24px; }

.funnel-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
  gap: 12px;
}

.funnel-card { padding: 14px; border-radius: 12px; }
.funnel-card-head {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.funnel-icon { --icon-size: 11px; }
.funnel-card-value { font-size: 18px; font-weight: 600; }

.economics-banner { padding: 12px; margin: 0 var(--content-px) 16px; border-radius: 10px; }
.economics-banner-head { display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.economics-warning, .economics-hint { font-size: 11px; color: var(--text-muted); line-height: 1.45; }
.economics-hint { color: var(--purple-light); margin-top: 6px; }

.refresh-banner {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 var(--content-px) 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.orders-refresh-progress p {
  margin: 0;
  line-height: 1.5;
}
.orders-refresh-progress strong {
  color: var(--purple-light);
  font-weight: 700;
}

.analytics-table-wrap {
  overflow: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card-45);
  max-height: 520px;
}

.analytics-table th.num, .analytics-table td.num { text-align: right; }
.analytics-table .col-abc { width: 44px; }
.analytics-table .price { color: var(--purple-light); }
.analytics-table .metric-positive { color: #59d98c; }
.analytics-table .metric-negative { color: var(--pink-light); }

.abc-badge {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 11px;
  font-weight: 700;
}
.abc-a { color: var(--pink); background: rgba(237, 115, 184, 0.2); }
.abc-b { color: var(--purple-light); background: rgba(199, 158, 250, 0.2); }
.abc-c { color: var(--purple); background: rgba(148, 89, 235, 0.2); }

.roadmap-card { padding: 20px; border-radius: 16px; }
.roadmap-row {
  display: grid;
  grid-template-columns: 28px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 6px 0;
}
.roadmap-step {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  border: 1px solid var(--border);
}
.roadmap-step.done { border: 0; background: linear-gradient(135deg, var(--pink), var(--purple)); color: #fff; }
.roadmap-title { font-size: 14px; color: var(--text-secondary); }
.roadmap-title.done { color: var(--text); font-weight: 500; }
.roadmap-badge { font-size: 11px; font-weight: 600; color: var(--pink-light); }

.empty-turnover-card {
  padding: 28px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}
.empty-turnover-card h3 { margin: 0; font-size: 16px; font-weight: 600; }
.empty-turnover-card p { margin: 0; font-size: 13px; color: var(--text-muted); }
.empty-turnover-icon { --icon-size: 32px; }

.analytics-filter-bar { flex-wrap: wrap; }

.heatmap-filter-bar {
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 8px;
  margin-top: 10px;
  padding-bottom: 0;
}

.heatmap-filter-bar .filter-group-compact {
  padding: 3px 8px 4px;
  gap: 1px;
  border-radius: 8px;
  min-height: 0;
  flex: 0 0 auto;
}

.heatmap-filter-bar .filter-group-label {
  font-size: 9px;
  line-height: 1.1;
  letter-spacing: 0.04em;
}

.heatmap-filter-bar .filter-group select {
  font-size: 12px;
  line-height: 1.2;
  padding: 0;
  min-width: 64px;
  max-width: 140px;
}

.heatmap-filter-bar .filter-group-hours .filter-hours-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.heatmap-filter-bar .filter-hours-sep {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1;
}

.heatmap-filter-bar .filter-group-hours select {
  min-width: 44px;
  max-width: 52px;
}

/* ——— Order heatmap ——— */

.heatmap-page { padding-bottom: 24px; }

.heatmap-widgets-section {
  margin: 0 var(--content-px) 16px;
}

.heatmap-widgets-section .widgets-metrics {
  margin-bottom: 0;
}

.heatmap-top-line {
  margin: 10px 0 0;
  font-size: 13px;
  padding: 0 2px;
}

.heatmap-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  padding: 0 var(--content-px) 20px;
}
.heatmap-summary-card { padding: 16px; border-radius: 12px; position: relative; overflow: hidden; }
.heatmap-summary-card::before {
  content: '';
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 3px;
  background: linear-gradient(135deg, var(--pink), var(--purple));
  border-radius: 999px;
}
.heatmap-summary-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.heatmap-summary-icon { --icon-size: 12px; }
.heatmap-summary-value { font-size: 20px; font-weight: 700; }
.heatmap-summary-sub { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }

.heatmap-section { margin: 0 var(--content-px) 20px; padding: 18px; border-radius: 14px; }
.heatmap-section-head h3 { margin: 0 0 4px; font-size: 16px; }
.heatmap-msk {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--hover-bg);
  margin-left: 6px;
}
.heatmap-scroll { overflow: auto; margin-top: 12px; }
.heatmap-row { display: flex; gap: 4px; margin-bottom: 4px; align-items: stretch; min-width: max-content; }
.heatmap-day-label { width: 36px; flex-shrink: 0; font-size: 11px; font-weight: 600; display: flex; align-items: center; }
.heatmap-hour-label, .heatmap-total-label { width: 34px; flex-shrink: 0; font-size: 10px; color: var(--text-muted); text-align: center; }
.heatmap-cell {
  width: 34px;
  min-width: 34px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 6px;
  border: 1px solid transparent;
  font-size: 10px;
  font-weight: 600;
  display: grid;
  place-items: center;
  padding: 0 2px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.heatmap-total-cell { background: var(--card-60); color: var(--text-secondary); }

/* Кол-во — чуть шире для 4+ знаков */
.heatmap-metric-count .heatmap-cell,
.heatmap-metric-count .heatmap-hour-label,
.heatmap-metric-count .heatmap-total-label {
  width: 42px;
  min-width: 42px;
}

/* Сумма — шире под ₽ */
.heatmap-metric-sum .heatmap-cell,
.heatmap-metric-sum .heatmap-hour-label,
.heatmap-metric-sum .heatmap-total-label {
  width: 68px;
  min-width: 68px;
  height: 32px;
  font-size: 9px;
}
.heatmap-metric-sum .heatmap-total-cell {
  width: 82px;
  min-width: 82px;
}

/* Средний чек — ещё шире под копейки */
.heatmap-metric-avg .heatmap-cell,
.heatmap-metric-avg .heatmap-hour-label,
.heatmap-metric-avg .heatmap-total-label {
  width: 76px;
  min-width: 76px;
  height: 32px;
  font-size: 8px;
  letter-spacing: -0.02em;
}
.heatmap-metric-avg .heatmap-total-cell {
  width: 88px;
  min-width: 88px;
}
.heatmap-metric-sum .heatmap-day-label,
.heatmap-metric-avg .heatmap-day-label {
  width: 44px;
}

.heatmap-share-section { margin: 0 var(--content-px) 20px; padding: 16px; border-radius: 14px; }
.share-bars { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.share-bar-row { display: grid; grid-template-columns: minmax(100px, 180px) 1fr auto; gap: 10px; align-items: center; }
.share-bar-name { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.share-bar-track { height: 8px; background: var(--card-60); border-radius: 999px; overflow: hidden; }
.share-bar-fill { height: 100%; border-radius: 999px; min-width: 2px; }
.share-bar-meta { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

.multi-stats-row { display: flex; flex-wrap: wrap; gap: 16px; font-size: 13px; color: var(--text-secondary); margin: 8px 0 12px; }
.multi-order-row { cursor: pointer; }
.multi-order-row:hover td { background: var(--row-hover); }

.weekly-chart { display: flex; align-items: flex-end; gap: 8px; height: 120px; margin-top: 12px; }
.weekly-bar-wrap { flex: 1; min-width: 36px; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.weekly-bar { width: 100%; border-radius: 6px 6px 2px 2px; min-height: 8px; }
.weekly-label { font-size: 10px; color: var(--text-muted); }

.heatmap-matrix-section { margin: 0 var(--content-px) 20px; padding: 18px; border-radius: 14px; }
.matrix-section-head { margin-bottom: 12px; }
.matrix-subtitle { margin: 4px 0 0; font-size: 12px; }

.matrix-filters { margin-bottom: 14px; }
.matrix-filters-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.matrix-filters-summary {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  min-width: 0;
}
.matrix-filters-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--purple) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--purple) 35%, transparent);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.matrix-filters-hint { font-size: 12px; }
.matrix-filters-body {
  margin-top: 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--card-60);
  border: 1px solid var(--border);
}
.matrix-filters-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 10px;
}
.matrix-filters-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}
.matrix-article-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 6px;
  max-height: 220px;
  overflow: auto;
  padding-right: 4px;
}
.matrix-article-row {
  display: grid;
  grid-template-columns: 18px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.matrix-article-row:hover {
  border-color: color-mix(in srgb, var(--purple) 40%, var(--border));
}
.matrix-article-row.active {
  border-color: var(--purple);
  background: color-mix(in srgb, var(--purple) 12%, var(--card));
}
.matrix-article-row input {
  width: 14px;
  height: 14px;
  accent-color: var(--purple);
}
.matrix-article-row-name {
  font-size: 12px;
  color: var(--text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.matrix-article-row-meta {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  font-variant-numeric: tabular-nums;
}
.matrix-article-empty { padding: 12px; }

.matrix-legend {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}
.matrix-legend-label { font-size: 11px; color: var(--text-muted); }
.matrix-legend-bar {
  width: 140px;
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg,
    rgb(199, 31, 26) 0%,
    rgb(235, 56, 36) 16%,
    rgb(250, 122, 31) 32%,
    rgb(252, 194, 41) 48%,
    rgb(245, 235, 71) 62%,
    rgb(158, 219, 87) 76%,
    rgb(71, 184, 92) 90%,
    rgb(26, 133, 71) 100%);
}

.btn-compact { padding: 6px 12px; font-size: 12px; min-height: 0; }
.matrix-scroll {
  overflow: auto;
  max-height: 480px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--popover-bg);
}
table.matrix-table {
  width: max-content;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--popover-bg);
}
table.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 3;
  background: var(--popover-bg) !important;
  box-shadow: 0 1px 0 var(--border);
  padding: 10px 8px;
  font-size: 10px;
  font-weight: 600;
  color: var(--text-muted);
  text-align: center;
  vertical-align: bottom;
}
table.matrix-table tbody td {
  padding: 0;
  border-bottom: 1px solid var(--border-50);
  vertical-align: middle;
  background: var(--popover-bg);
}
table.matrix-table tbody tr:hover .matrix-region-col,
table.matrix-table tbody tr:hover .matrix-region-share-col,
table.matrix-table tbody tr:hover .matrix-total-col {
  background: color-mix(in srgb, var(--popover-bg) 88%, var(--purple) 12%) !important;
}
table.matrix-table .matrix-region-col {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 200px;
  min-width: 200px;
  max-width: 200px;
  background: var(--popover-bg) !important;
  padding: 10px 12px !important;
  font-size: 12px;
  font-weight: 500;
  color: var(--text);
  text-align: left;
  line-height: 1.3;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
table.matrix-table thead .matrix-region-col {
  z-index: 7;
  left: 0;
  text-align: left;
}
.matrix-region-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}
table.matrix-table .matrix-region-share-col {
  position: sticky;
  left: 200px;
  z-index: 4;
  min-width: 72px;
  width: 72px;
  padding: 8px 6px !important;
  text-align: center;
  background: var(--popover-bg) !important;
  box-shadow: 2px 0 6px rgba(0, 0, 0, 0.12);
}
table.matrix-table thead .matrix-region-share-col {
  z-index: 6;
  left: 200px;
}
.matrix-article-col {
  min-width: 104px;
  width: 104px;
  max-width: 104px;
}
.matrix-article-head {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  white-space: normal;
  font-size: 10px;
  line-height: 1.25;
  color: var(--text-secondary);
  min-height: 2.5em;
}
.matrix-article-sub {
  display: block;
  margin-top: 4px;
  font-size: 9px;
  color: var(--purple-light);
  font-weight: 600;
}
.matrix-data-cell {
  min-width: 104px;
  width: 104px;
  padding: 3px !important;
  text-align: center;
  background: transparent !important;
}
.matrix-cell-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 8px 6px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.matrix-data-empty .matrix-cell-inner {
  background: rgba(46, 41, 56, 0.85);
  color: var(--text-muted);
}
.matrix-data-cell .matrix-cell-share {
  display: block;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}
.matrix-data-cell .matrix-cell-count {
  display: block;
  margin-top: 2px;
  font-size: 10px;
  opacity: 0.9;
}
.matrix-region-share-col .matrix-cell-share,
.matrix-region-share-col .matrix-cell-count {
  display: block;
  line-height: 1.2;
}
.matrix-region-share-col .matrix-cell-share {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
}
.matrix-region-share-col .matrix-cell-count {
  margin-top: 2px;
  font-size: 10px;
  color: var(--text-muted);
}
.matrix-total-col {
  min-width: 56px;
  width: 56px;
  padding: 10px 8px !important;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  background: var(--popover-bg) !important;
  position: sticky;
  right: 0;
  z-index: 4;
  box-shadow: -2px 0 6px rgba(0, 0, 0, 0.18);
}
table.matrix-table thead .matrix-total-col {
  z-index: 6;
  background: var(--popover-bg) !important;
}
.matrix-empty { margin-top: 12px; font-size: 13px; }

.heatmap-status-detail {
  margin: 0 var(--content-px) 16px;
  padding: 16px;
  border-radius: 14px;
}
.heatmap-status-detail-head { margin-bottom: 12px; }
.heatmap-status-detail-sub { margin: 4px 0 0; font-size: 12px; }
.heatmap-status-detail-table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--popover-bg);
}
.heatmap-status-detail-header,
.heatmap-status-detail-row {
  display: grid;
  grid-template-columns: minmax(180px, 1.5fr) minmax(150px, 1fr) 88px 112px;
  column-gap: 12px;
  align-items: center;
  padding: 0 14px;
}
.heatmap-status-detail-header {
  min-height: 42px;
  border-bottom: 1px solid var(--border);
  background: var(--popover-bg);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
}
.heatmap-status-detail-header span {
  padding: 10px 0;
  white-space: nowrap;
}
.heatmap-status-detail-scroll {
  overflow: auto;
  max-height: 320px;
}
.heatmap-status-detail-row {
  min-height: 42px;
  border-bottom: 1px solid var(--border-50);
  font-size: 12px;
  color: var(--text-secondary);
}
.heatmap-status-detail-row:last-child {
  border-bottom: 0;
}
.heatmap-status-detail-row:hover {
  background: var(--row-hover);
}
.heatmap-status-detail-row span {
  padding: 10px 0;
  min-width: 0;
}
.status-detail-col-product {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-weight: 500;
}
.status-detail-col-region {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.status-detail-col-qty,
.status-detail-col-sum {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.status-detail-col-sum.price {
  color: var(--text);
  font-weight: 600;
}
.compact-table th, .compact-table td { font-size: 12px; padding: 6px 8px; }

.multi-order-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.multi-order-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.55);
}
.multi-order-modal-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  width: 100%;
  max-height: 80vh;
  overflow: auto;
  padding: 20px;
}
.multi-order-modal.hidden { display: none !important; }

.maintenance-screen {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--bg);
}
.maintenance-card {
  max-width: 480px;
  width: 100%;
  padding: 36px 32px;
  text-align: center;
  border-radius: 20px;
}
.maintenance-icon { margin-bottom: 16px; }
.maintenance-icon-svg { --icon-size: 42px; }
.maintenance-card h1 {
  margin: 0 0 12px;
  font-size: 24px;
}
.maintenance-card p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}
.maintenance-hint { margin-top: 14px !important; font-size: 13px; }

/* ——— Warehouse page ——— */
.warehouse-page { padding-bottom: 24px; }
.warehouse-page-header {
  padding-top: 18px;
}
.warehouse-page-header .page-header-row {
  margin-bottom: 14px;
  align-items: center;
}
.warehouse-page-title {
  margin: 0;
}
.warehouse-page-header .page-actions {
  padding-top: 6px;
}
.warehouse-filter-bar { margin-top: 4px; }
.warehouse-filter-bar input[type="text"] {
  min-width: 88px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text);
  font-size: 12px;
}
.warehouse-widgets-section,
.warehouse-detail-section,
.warehouse-shipment-section {
  margin: 0 var(--content-px) 18px;
  padding: 16px;
  border-radius: 14px;
}
.warehouse-widgets-metrics {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
}
.warehouse-widget-btn.metric-card-active {
  border-color: var(--purple);
  background: rgba(148, 89, 235, 0.14);
  box-shadow: inset 0 0 0 1px rgba(148, 89, 235, 0.35);
}
.metric-tone-green .metric-card-value { color: #59d98c; }
.metric-tone-purple .metric-card-value { color: var(--purple-light); }
.metric-tone-pink .metric-card-value { color: var(--pink-light); }
.metric-tone-orange .metric-card-value { color: #ffb347; }
.metric-tone-muted .metric-card-value { color: var(--text-secondary); }
.warehouse-detail-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.warehouse-detail-sub { margin: 4px 0 0; font-size: 12px; }
.warehouse-detail-table-wrap {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  background: var(--popover-bg);
}
.warehouse-detail-table-scroll {
  overflow: auto;
  max-height: min(70vh, 720px);
  border-radius: 12px;
}
.warehouse-detail-table-scroll .warehouse-detail-table-wrap {
  border: 0;
  border-radius: 0;
}
.warehouse-detail-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--popover-bg);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  box-shadow: 0 1px 0 var(--border);
}
.warehouse-detail-row {
  display: grid;
  align-items: center;
  column-gap: 12px;
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-50);
  font-size: 12px;
}
.warehouse-detail-block:last-child .warehouse-detail-row:last-child,
.warehouse-detail-block:last-child .warehouse-breakdown .warehouse-detail-row:last-child {
  border-bottom: 0;
}
.warehouse-grid-products,
.warehouse-detail-header.warehouse-grid-products {
  grid-template-columns: 32px 44px minmax(220px, 1.8fr) repeat(5, minmax(58px, 76px));
}
.warehouse-grid-products-breakdown {
  grid-template-columns: 32px 44px minmax(220px, 1.8fr) repeat(5, minmax(58px, 76px));
  background: rgba(148, 89, 235, 0.05);
  border-left: 3px solid rgba(148, 89, 235, 0.28);
  padding-left: 18px;
}
.warehouse-grid-warehouses,
.warehouse-detail-header.warehouse-grid-warehouses,
.warehouse-grid-warehouses-breakdown {
  grid-template-columns: 32px minmax(200px, 1.5fr) minmax(110px, 1fr) repeat(5, minmax(58px, 76px));
}
.warehouse-grid-warehouses-breakdown {
  background: rgba(89, 217, 140, 0.04);
  border-left: 3px solid rgba(89, 217, 140, 0.22);
}
.warehouse-grid-shipment,
.warehouse-detail-header.warehouse-grid-shipment {
  grid-template-columns: 44px minmax(220px, 1.8fr) repeat(4, minmax(58px, 76px));
}
.warehouse-product-main {
  min-height: 56px;
  background: rgba(255, 255, 255, 0.015);
}
.warehouse-detail-block.is-open > .warehouse-warehouse-toggle,
.warehouse-detail-block.is-open > .warehouse-product-toggle {
  background: rgba(148, 89, 235, 0.08);
}
.wh-col-name {
  min-width: 0;
  overflow: hidden;
}
.wh-col-name-with-photo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.wh-col-name-text {
  min-width: 0;
  overflow: hidden;
}
.wh-col-name-with-photo .order-photo,
.wh-col-name-with-photo .order-photo-ph {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.warehouse-line-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-50);
}
.warehouse-line-icon-svg { --icon-size: 16px; }
.warehouse-product-toggle,
.warehouse-warehouse-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
}
.warehouse-product-toggle:hover,
.warehouse-product-toggle.open,
.warehouse-warehouse-toggle:hover,
.warehouse-warehouse-toggle.open {
  background: var(--row-hover);
}
.warehouse-breakdown {
  border-top: 1px solid var(--border-50);
}
.warehouse-product-code {
  display: block;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}
.warehouse-product-title {
  display: block;
  font-size: 11px;
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
}
.wh-col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.wh-col-photo {
  display: flex;
  align-items: center;
  justify-content: center;
}
.wh-col-photo .order-photo,
.wh-col-photo .order-photo-ph {
  width: 40px;
  height: 40px;
}
.wh-col-expand {
  display: flex;
  align-items: center;
  justify-content: center;
}
.warehouse-qty { font-weight: 600; }
.warehouse-qty-green { color: #59d98c; }
.warehouse-qty-purple { color: var(--purple-light); }
.warehouse-qty-pink { color: var(--pink-light); }
.warehouse-qty-orange { color: #ffb347; }
.warehouse-detail-row.highlight { background: rgba(255, 179, 71, 0.07); }
.warehouse-detail-empty { margin: 8px 0 0; font-size: 12px; }
.warehouse-shipment-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.warehouse-shipment-widgets { margin-bottom: 10px; }
.warehouse-stat-card { pointer-events: none; }
.warehouse-shipment-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: var(--text-secondary);
}
.warehouse-chevron { --icon-size: 12px; }
.warehouse-view-toggle .chip { min-width: 108px; }

/* Storage page */
.storage-page { padding-bottom: 24px; }
.storage-page-header {
  padding: 0 var(--content-px) 12px;
}
.storage-page-header .page-header-row {
  margin-bottom: 14px;
  align-items: center;
}
.storage-page-title { margin: 0; }
.storage-page-desc { margin: 6px 0 0; }
.storage-page-header .page-actions { padding-top: 6px; }
.storage-filter-wrap { display: flex; flex-direction: column; gap: 8px; }
.storage-filter-primary {
  padding-bottom: 0;
}
.storage-filter-bar .filter-group-vendor .vendor-filter-btn { min-width: 140px; }
.storage-filter-reset { align-self: center; }
.storage-widgets-section,
.storage-categories-section,
.storage-vendors-section {
  margin: 0 var(--content-px) 18px;
  padding: 16px;
  border-radius: 14px;
}
.storage-widgets-metrics {
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  margin-bottom: 16px;
}
.storage-regions-section { margin-top: 4px; }
.storage-drilldown-hint {
  margin: 6px 0 10px;
  font-size: 11px;
}
.storage-regions-scroll { margin-top: 4px; }
.storage-regions-list,
.storage-region-products-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}
.storage-region-row,
.storage-region-product-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  width: 100%;
  padding: 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.storage-region-row.active {
  border-color: rgba(200, 120, 255, 0.45);
  background: rgba(120, 80, 200, 0.12);
}
.storage-region-row:hover { background: rgba(255, 255, 255, 0.04); }
.storage-region-rank {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--pink-light);
  background: rgba(255, 120, 180, 0.15);
  flex-shrink: 0;
}
.storage-region-main { flex: 1; min-width: 0; }
.storage-region-name,
.storage-product-code {
  display: block;
  font-weight: 600;
  line-height: 1.3;
}
.storage-region-meta,
.storage-product-sub {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.storage-region-cost,
.storage-region-product-cost {
  text-align: right;
  font-weight: 700;
  color: var(--purple-light);
  white-space: nowrap;
}
.storage-region-product-cost span { display: block; }
.storage-region-products-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 10px;
}
.storage-region-back {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}
.storage-region-product-row { cursor: default; }
.storage-region-product-photo .order-photo,
.storage-region-product-photo .order-photo-ph {
  width: 40px;
  height: 40px;
}
.storage-product-warehouse {
  display: block;
  font-size: 11px;
  color: var(--pink-light);
  margin-top: 2px;
}
.storage-categories-row {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.storage-category-chip {
  min-width: 180px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--card);
  text-align: left;
  color: inherit;
  cursor: pointer;
}
.storage-category-chip.active {
  border-color: rgba(200, 120, 255, 0.45);
  background: rgba(120, 80, 200, 0.12);
}
.storage-category-name {
  display: block;
  font-size: 12px;
  font-weight: 600;
}
.storage-category-rows {
  display: block;
  font-size: 11px;
  color: var(--purple-light);
  margin-top: 4px;
}
.storage-category-cost {
  display: block;
  font-size: 11px;
  margin-top: 2px;
}
.storage-vendors-meta { margin-bottom: 10px; font-size: 12px; }
.storage-vendors-table-wrap { overflow: auto; }
.storage-vendors-row {
  display: grid;
  grid-template-columns: 28px 44px minmax(120px, 1.2fr) minmax(100px, 1fr) repeat(3, 72px) minmax(90px, 0.8fr);
  gap: 8px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.storage-vendors-header {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 600;
}
.storage-vendors-header.storage-vendors-row { border-bottom-width: 2px; }
.sv-col-num,
.sv-col-cost { text-align: right; font-variant-numeric: tabular-nums; }
.sv-col-photo { display: flex; justify-content: center; }
.sv-col-photo .order-photo,
.sv-col-photo .order-photo-ph { width: 36px; height: 36px; }
.storage-detail-empty { margin: 8px 0 0; font-size: 12px; }

/* Локализация */
.localization-page { padding-bottom: 24px; }
.localization-page-header .page-header-row {
  align-items: flex-start;
  gap: 16px;
}
.localization-page-header .page-actions { padding-top: 0; }
.loc-filter-bar { flex-wrap: wrap; align-items: flex-end; }
.loc-period-hint { font-size: 12px; align-self: center; margin-left: 4px; }
.loc-filter-reset { align-self: center; }
.loc-loading { padding: 0 var(--content-px); }
.loc-widgets-section { padding: 0 var(--content-px) 8px; }
.loc-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}
.loc-widget-card { min-height: 72px; }
.loc-highlights-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}
.loc-highlight {
  padding: 12px 14px;
  border: 1px solid var(--border);
}
.loc-highlight-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 8px;
}
.loc-highlight-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  align-items: center;
  padding: 6px 0;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.loc-highlight-row:first-of-type { border-top: none; padding-top: 0; }
.loc-highlight-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.loc-highlight-pct { font-weight: 700; font-variant-numeric: tabular-nums; }
.loc-highlight-meta { font-size: 11px; }
.loc-table-section { padding: 12px var(--content-px) 0; }
.loc-table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.loc-table-meta { font-size: 12px; }
.loc-table .col-rank {
  color: var(--pink-light);
  font-weight: 700;
  font-size: 11px;
}
.loc-table .col-product { min-width: 180px; }
.loc-product-main { font-weight: 600; font-size: 12px; }
.loc-product-sub,
.loc-product-tags {
  font-size: 11px;
  line-height: 1.35;
  margin-top: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}
.loc-table .col-pct,
.loc-table .col-local,
.loc-table .col-nonlocal,
.loc-table .col-total,
.loc-table .col-sum {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.loc-table .col-local { color: #59d98c; font-weight: 600; }
.loc-table .col-nonlocal { color: var(--pink-light); font-weight: 600; }
.loc-pct-high { color: #59d98c; font-weight: 700; }
.loc-pct-mid { color: #ffb347; font-weight: 700; }
.loc-pct-low { color: var(--pink-light); font-weight: 700; }
.loc-pct-muted { color: var(--text-muted); }
.loc-wh-table .col-wh-name { font-weight: 600; }
.loc-wh-table .col-wh-region { font-size: 11px; }
.loc-sort-th { padding: 0; text-align: right; }
.loc-sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  width: 100%;
  padding: 8px 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.loc-sort-btn:hover { color: var(--text-primary); }
.loc-sort-btn.active { color: var(--purple-light); }
.loc-sort-arrow { font-size: 10px; opacity: 0.9; }
.loc-total-filter-th { position: relative; }
.loc-th-split {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 0;
}
.loc-total-filter-btn {
  padding: 8px 4px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  min-width: 22px;
}
.loc-total-filter-btn:hover,
.loc-total-filter-btn.active { color: var(--pink-light); }
.loc-min-total-menu {
  position: fixed;
  z-index: 1200;
  min-width: 188px;
  max-width: 220px;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--popover-bg);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  pointer-events: auto;
}
.loc-min-total-menu.hidden { display: none; }
.loc-min-total-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--border);
}
.loc-min-total-presets {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.loc-min-total-opt {
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--popover-bg) 88%, var(--purple) 12%);
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  text-align: center;
}
.loc-min-total-opt-all {
  width: 100%;
  margin-bottom: 6px;
  text-align: center;
}
.loc-min-total-opt:hover {
  border-color: var(--purple-light);
  color: var(--text-primary);
  background: color-mix(in srgb, var(--popover-bg) 78%, var(--purple) 22%);
}
.loc-min-total-opt.active {
  border-color: var(--purple-light);
  color: var(--purple-light);
  background: color-mix(in srgb, var(--popover-bg) 70%, var(--purple) 30%);
  box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.2);
}
.loc-min-total-custom {
  display: block;
  border-top: 1px solid var(--border);
  padding-top: 8px;
}
.loc-min-total-custom-label {
  display: block;
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.loc-min-total-custom-row {
  display: flex;
  gap: 6px;
  margin-top: 0;
}
.loc-min-total-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--popover-bg) 92%, #000 8%);
  color: var(--text-primary);
  font-size: 12px;
}
.loc-min-total-apply {
  padding: 7px 12px;
  font-size: 11px;
  white-space: nowrap;
}

/* Склейки */
.glues-page { padding-bottom: 24px; }
.glues-page-header .page-header-row {
  align-items: flex-start;
  gap: 16px;
}
.glues-page-header .page-actions { padding-top: 0; }
.glues-filter-bar { flex-wrap: wrap; align-items: flex-end; }
.glues-meta-hint { font-size: 12px; align-self: center; margin-left: 4px; }
.glues-filter-reset { align-self: center; }
.glues-loading { padding: 0 var(--content-px); }
.glues-widgets-section { padding: 0 var(--content-px) 8px; }
.glues-widgets-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.glues-widget-btn {
  min-height: 72px;
  text-align: left;
}
.glues-widget-static {
  min-height: 72px;
  cursor: default;
}
.glues-widget-btn.metric-card-active {
  border-color: color-mix(in srgb, var(--purple-light) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--purple-light) 28%, transparent);
  background: color-mix(in srgb, var(--purple) 14%, var(--card-bg));
}
.glues-widget-btn.metric-tone-green.metric-card-active {
  border-color: color-mix(in srgb, #59d98c 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, #59d98c 28%, transparent);
  background: color-mix(in srgb, #59d98c 10%, var(--card-bg));
}
.glues-widget-btn.metric-tone-pink.metric-card-active {
  border-color: color-mix(in srgb, var(--pink-light) 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--pink-light) 28%, transparent);
  background: color-mix(in srgb, var(--pink-light) 10%, var(--card-bg));
}
.glues-widget-btn.metric-tone-orange.metric-card-active {
  border-color: color-mix(in srgb, #ffb347 55%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, #ffb347 28%, transparent);
  background: color-mix(in srgb, #ffb347 10%, var(--card-bg));
}
.glues-list-section { padding: 8px var(--content-px) 0; }
.glues-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.glues-list-meta { font-size: 12px; }
.glues-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
}
.glue-card {
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.glue-card:hover { border-color: color-mix(in srgb, var(--purple-light) 35%, var(--border)); }
.glue-card-expanded { border-color: color-mix(in srgb, var(--purple-light) 45%, var(--border)); }
.glue-card-head {
  padding: 12px 14px 0;
}
.glue-card-category {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.3;
}
.glue-card-main { min-width: 0; }
.glue-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.glue-card-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.glue-card-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
}
.glue-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}
.glue-badge-type {
  color: var(--purple-light);
  background: color-mix(in srgb, var(--purple) 22%, transparent);
}
.glue-badge-muted {
  color: var(--text-muted);
  background: var(--card-bg);
  border: 1px solid var(--border);
  font-weight: 600;
}
.glue-badge-warn {
  color: #ffb347;
  background: color-mix(in srgb, #ffb347 16%, transparent);
  border: 1px solid color-mix(in srgb, #ffb347 35%, transparent);
}
.glue-badge-icon { width: 12px; height: 12px; }
.glue-card-eyebrow {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
  line-height: 1.3;
}
.glue-card-title {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.glue-card-imt {
  margin-top: 6px;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--text-muted);
}
.glue-count-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--pink-light);
  background: color-mix(in srgb, var(--pink-light) 12%, transparent);
}
.glue-count-over {
  color: #ffb347;
  background: color-mix(in srgb, #ffb347 14%, transparent);
}
.glue-chevron { display: inline-flex; opacity: 0.8; transition: transform 0.15s ease; }
.glue-chevron-up { transform: rotate(180deg); }
.glue-chevron-icon { width: 14px; height: 14px; }
.glue-card-products {
  padding: 0 14px 14px;
  border-top: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  background: color-mix(in srgb, var(--card-bg) 88%, var(--purple) 12%);
}
.glue-products-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin: 12px 0 10px;
}
.glue-products-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.glue-collapse-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--purple-light) 24%, var(--border));
  background: color-mix(in srgb, var(--card-bg) 90%, var(--purple) 10%);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.glue-collapse-btn:hover {
  color: var(--text-primary);
  border-color: color-mix(in srgb, var(--purple-light) 45%, var(--border));
  background: color-mix(in srgb, var(--purple) 14%, var(--card-bg));
}
.glue-collapse-btn:focus-visible {
  outline: 2px solid var(--purple-light);
  outline-offset: 2px;
}
.glue-collapse-icon {
  display: inline-flex;
  line-height: 0;
}
.glue-collapse-icon-svg {
  width: 12px;
  height: 12px;
}
.glue-products-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.glue-products-count {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  padding: 2px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--purple) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--purple-light) 18%, transparent);
}
.glue-products-open {
  cursor: pointer;
  color: var(--pink-light);
  background: color-mix(in srgb, var(--pink-light) 12%, transparent);
  border-color: color-mix(in srgb, var(--pink-light) 35%, transparent);
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease;
}
.glue-products-open:hover {
  background: color-mix(in srgb, var(--pink-light) 18%, transparent);
  border-color: color-mix(in srgb, var(--pink-light) 55%, transparent);
  transform: translateY(-1px);
}
.glue-products-open:focus-visible {
  outline: 2px solid var(--pink-light);
  outline-offset: 2px;
}
.glue-products-hint {
  margin-top: 8px;
  font-size: 11px;
}
.glue-products-scroll {
  position: relative;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: color-mix(in srgb, var(--purple-light) 35%, transparent) transparent;
  mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
  -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 18px), transparent);
}
.glue-products-scroll::-webkit-scrollbar { height: 4px; }
.glue-products-scroll::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: color-mix(in srgb, var(--purple-light) 35%, transparent);
}
.glue-products-track {
  display: flex;
  flex-wrap: nowrap;
  align-items: stretch;
  gap: 0;
  width: max-content;
  min-width: 100%;
  padding-bottom: 2px;
}
.glue-product-sep {
  flex: 0 0 1px;
  align-self: stretch;
  width: 1px;
  margin: 8px 4px;
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--purple-light) 35%, transparent) 20%,
    color-mix(in srgb, var(--purple-light) 35%, transparent) 80%,
    transparent
  );
}
.glue-product-tile {
  flex: 0 0 156px;
  width: 156px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 7px 9px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--card-bg) 92%, var(--purple) 8%);
  border: 1px solid color-mix(in srgb, var(--purple-light) 18%, var(--border));
  box-shadow: 0 1px 0 color-mix(in srgb, #fff 4%, transparent);
}
.glue-products-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.glue-product-thumb {
  position: relative;
  aspect-ratio: 1;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--purple-light) 16%, var(--border));
  background: var(--card-bg);
  transition: border-color 0.15s ease, transform 0.12s ease;
}
.glue-product-thumb:hover {
  border-color: color-mix(in srgb, var(--purple-light) 45%, var(--border));
  transform: translateY(-1px);
}
.glue-product-thumb .glue-product-photo,
.glue-product-thumb .glue-product-photo-ph {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 0;
  object-fit: cover;
}
.glue-product-thumb .glue-product-photo-ph {
  display: flex;
  align-items: center;
  justify-content: center;
}
.glue-product-thumb .glue-product-photo-icon {
  width: 22px;
  height: 22px;
}
.glue-product-thumb-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px;
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #fff;
  line-height: 1.25;
  background: color-mix(in srgb, #120818 72%, transparent);
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
  word-break: break-word;
}
.glue-product-thumb:hover .glue-product-thumb-label,
.glue-product-thumb:focus-within .glue-product-thumb-label {
  opacity: 1;
}
.glue-product-more {
  flex: 0 0 84px;
  width: 84px;
  min-height: 52px;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  padding: 8px 6px;
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--pink-light) 45%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pink-light) 10%, var(--card-bg)),
    color-mix(in srgb, var(--purple) 8%, var(--card-bg))
  );
  color: inherit;
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, transform 0.12s ease, box-shadow 0.15s ease;
}
.glue-product-more:hover {
  border-color: color-mix(in srgb, var(--pink-light) 70%, var(--border));
  background: linear-gradient(
    180deg,
    color-mix(in srgb, var(--pink-light) 16%, var(--card-bg)),
    color-mix(in srgb, var(--purple) 12%, var(--card-bg))
  );
  box-shadow: 0 4px 14px color-mix(in srgb, var(--pink-light) 12%, transparent);
  transform: translateY(-1px);
}
.glue-product-more:active {
  transform: translateY(0);
}
.glue-product-more:focus-visible {
  outline: 2px solid var(--pink-light);
  outline-offset: 2px;
}
.glue-more-value {
  font-size: 16px;
  font-weight: 800;
  color: var(--pink-light);
  line-height: 1;
}
.glue-more-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.glue-more-icon {
  display: inline-flex;
  margin-top: 2px;
  opacity: 0.85;
}
.glue-more-icon-svg {
  width: 12px;
  height: 12px;
}
.glue-product-photo {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.glue-product-photo-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.glue-product-photo-icon { width: 14px; height: 14px; opacity: 0.7; }
.glue-product-copy {
  min-width: 0;
  flex: 1;
}
.glue-product-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  line-height: 1.25;
}
.glues-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  padding: 8px 2px;
  align-self: center;
  cursor: pointer;
  user-select: none;
}
.glues-toggle input { accent-color: var(--purple-light); }
.filter-group-search { min-width: 180px; max-width: 240px; }
.glues-search-input {
  width: 100%;
  min-width: 0;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-primary);
  font-size: 12px;
}
.glues-empty-section { padding: 24px var(--content-px); }
.glue-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 32px 20px;
}
.glue-empty-icon {
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  background: color-mix(in srgb, var(--purple) 18%, transparent);
  margin-bottom: 4px;
}
.glue-empty-icon-svg { width: 28px; height: 28px; }

/* Products page */
.products-page { padding-bottom: 24px; }
.products-page-header .page-header-row {
  align-items: flex-start;
  gap: 16px;
}
.products-page-header .page-actions { padding-top: 0; }
.products-filter-bar { flex-wrap: wrap; align-items: flex-end; }
.products-filter-reset { align-self: center; }
.products-loading { padding: 0 var(--content-px); }
.products-summary {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  padding: 0 var(--content-px) 12px;
}
.products-summary-card {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--card-bg);
}
.products-summary-card.active {
  border-color: color-mix(in srgb, var(--purple-light) 55%, var(--border));
  background: color-mix(in srgb, var(--purple) 10%, var(--card-bg));
}
.products-summary-label {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.products-summary-value {
  font-size: 18px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.products-table-section { padding: 8px var(--content-px) 0; }
.products-table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.products-table-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}
.products-table-wrap { overflow: auto; }
.products-table { min-width: 1100px; }
.products-table th,
.products-table td {
  vertical-align: middle;
  font-size: 12px;
}
.products-table .col-photo { width: 56px; }
.products-table .col-vendor { min-width: 110px; font-weight: 600; }
.products-table .col-nmid { width: 90px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.products-table .col-barcodes { min-width: 120px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; }
.products-table .col-category { min-width: 120px; }
.products-table .col-tags { min-width: 100px; color: var(--purple-light); font-size: 11px; }
.products-table .col-title { min-width: 180px; max-width: 280px; }
.products-table .col-brand { min-width: 90px; }
.products-table .col-sizes { width: 64px; text-align: right; }
.products-table .col-updated { width: 90px; }
.products-photo {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: cover;
  background: rgba(255,255,255,0.06);
  display: block;
}
.products-photo-ph {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.products-photo-icon { --icon-size: 18px; }
.products-empty-filter { margin: 12px var(--content-px); }
