:root {
  color-scheme: light;
  --color-primary: #2563eb;
  --color-primary-hover: #1d4ed8;
  --color-primary-light: #dbeafe;
  --color-primary-soft: #eff6ff;
  --color-accent: #f59e0b;
  --color-accent-hover: #d97706;
  --color-accent-light: #fef3c7;
  --color-success: #22c55e;
  --color-success-text: #16a34a;
  --color-success-light: #dcfce7;
  --color-danger: #ef4444;
  --color-danger-hover: #dc2626;
  --color-danger-light: #fee2e2;
  --color-bg: #f8fafc;
  --color-surface: #ffffff;
  --color-surface-soft: #f1f5f9;
  --color-text-primary: #0f172a;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-border: #e2e8f0;
  --color-border-soft: #eef2f7;
  --color-sidebar-active: #2563eb;
  --color-sidebar-active-bg: #eff6ff;
  --bg: var(--color-bg);
  --surface: var(--color-surface);
  --panel: var(--color-surface-soft);
  --line: var(--color-border);
  --line-strong: #cbd5e1;
  --ink: var(--color-text-primary);
  --muted: var(--color-text-secondary);
  --faint: var(--color-text-muted);
  --dark: #1e293b;
  --orange: var(--color-accent);
  --orange-strong: var(--color-accent-hover);
  --orange-soft: var(--color-accent-light);
  --green: var(--color-success);
  --green-soft: var(--color-success-light);
  --blue: var(--color-primary);
  --blue-soft: var(--color-primary-light);
  --violet-soft: #f5f7ff;
  --danger: var(--color-danger);
  --warning: var(--color-accent);
  --shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 32px rgba(15, 23, 42, 0.08);
  --topbar-height: 58px;
  --sidebar-width: 150px;
  font-family:
    Inter, "SF Pro Display", "Segoe UI", "PingFang SC", "Microsoft YaHei",
    Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

.visually-hidden,
[hidden] {
  display: none !important;
}

html {
  background: var(--bg);
}

body {
  min-width: 1180px;
  margin: 0;
  color: var(--ink);
  background: var(--bg);
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

button:focus {
  outline: none;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

select,
input {
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  outline: 0;
}

select:focus,
input:focus {
  border-color: rgba(244, 124, 47, 0.7);
  box-shadow: 0 0 0 3px rgba(244, 124, 47, 0.11);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: 20px;
  line-height: 1.2;
}

h2 {
  margin-bottom: 0;
  font-size: 15px;
  font-weight: 800;
}

h3 {
  margin-bottom: 8px;
  font-size: 14px;
}

.platform-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) auto;
  align-items: center;
  min-height: var(--topbar-height);
  padding: 0 16px 0 18px;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 16px rgba(21, 27, 36, 0.04);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.brand-logo-static,
.brand-logo-fallback {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 142px;
}

.brand-logo-official {
  display: block;
  width: 148px;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-logo-image {
  display: none;
}

.brand-lockup {
  position: relative;
}

.brand-collapse-trigger {
  position: absolute;
  inset: -8px -6px;
  z-index: 2;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  opacity: 0;
  cursor: pointer;
}

.brand-collapse-trigger:focus-visible {
  opacity: 1;
  outline: 2px solid rgba(37, 99, 235, 0.28);
  outline-offset: 2px;
}

.zeus-logo {
  position: relative;
  width: 38px;
  height: 38px;
  border: 2px solid #d6dce4;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, #ffffff 0 48%, transparent 49%),
    conic-gradient(from 225deg, #df2334 0 23%, #ffffff 24% 38%, #1f9a67 39% 44%, #ffffff 45% 100%);
}

.zeus-logo::before {
  position: absolute;
  inset: 8px 5px 7px 11px;
  display: block;
  content: "";
  background: #df2334;
  clip-path: polygon(60% 0, 100% 0, 44% 48%, 85% 48%, 0 100%, 35% 53%, 0 53%);
  transform: skewX(-10deg);
}

.brand-title {
  font-size: 18px;
  font-weight: 900;
  line-height: 1.05;
}

.brand-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.module-tabs,
.account-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.module-tab,
.soft-button,
.small-warm-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 14px;
  color: #596272;
  background: #f6f7fa;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.module-tab.icon-only {
  width: 28px;
  padding: 0;
}

.module-tab.active,
.small-warm-button {
  color: #ffffff;
  background: var(--orange);
}

.soft-button {
  background: #f6f6fb;
}

.small-warm-button {
  color: #9b5b18;
  background: #ffe3bd;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #596272;
  font-size: 12px;
  white-space: nowrap;
}

.avatar-dot {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 38% 35%, #ffd58f 0 18%, transparent 19%),
    linear-gradient(135deg, #b46a21, #f7b164);
}

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  z-index: 15;
  display: flex;
  flex-direction: column;
  height: calc(100vh - var(--topbar-height));
  padding: 24px 16px;
  background: #ffffff;
  border-right: 1px solid var(--line);
}

.side-nav {
  display: grid;
  gap: 11px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 31px;
  padding: 0 9px;
  color: #6c7480;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 13px;
  font-weight: 700;
}

.nav-item.active {
  color: #ffffff;
  background: var(--dark);
  box-shadow: 0 4px 10px rgba(41, 48, 57, 0.16);
}

.nav-item:not(.active):hover {
  color: var(--dark);
  background: #f5f7fa;
}

.nav-icon {
  display: grid;
  width: 18px;
  height: 18px;
  place-items: center;
  color: inherit;
  font-size: 13px;
}

.utility-nav {
  display: none;
}

.store-panel {
  display: none;
}

.main {
  min-width: 0;
  padding: 16px;
}

.page-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  margin-bottom: 12px;
}

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

.page-actions .search-box {
  display: none;
}

.main[data-view="overview"] .page-heading,
.main[data-view="dashboard"] .page-heading,
.main[data-view="stores"] .page-heading,
.main[data-view="products"] .page-heading,
.main[data-view="rules"] .page-heading,
.main[data-rule-wizard="true"] .page-heading {
  display: none;
}

.search-box,
.inline-search {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 30px;
  color: var(--faint);
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
}

.search-box {
  width: 430px;
  padding: 0 10px;
}

.inline-search {
  width: 150px;
  padding: 0 9px;
}

.search-box input,
.inline-search input {
  width: 100%;
  min-width: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
}

.inline-number {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 34px;
  padding: 0 10px;
  color: #687384;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.inline-number input {
  width: 62px;
  height: 26px;
  padding: 0 8px;
  border-radius: 5px;
}

.primary-button,
.secondary-button,
.ghost-button,
.icon-button,
.filter-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 14px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.primary-button {
  color: #ffffff;
  background: var(--orange);
  border: 1px solid var(--orange);
}

.primary-button:hover {
  background: var(--orange-strong);
}

.secondary-button,
.ghost-button,
.filter-button {
  color: #596272;
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.icon-button {
  width: 32px;
  min-width: 32px;
  padding: 0;
  color: #667085;
  background: #ffffff;
  border: 1px solid var(--line-strong);
}

.view {
  display: none;
}

.active-view {
  display: block;
}

.surface {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.overview-shell {
  min-height: calc(100vh - 140px);
  padding: 22px 18px;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
  margin-top: 20px;
}

.guide-card {
  position: relative;
  min-height: 154px;
  padding: 24px 20px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(90deg, #ffffff 0 56%, #f6f8fb 100%);
}

.guide-card h3 {
  margin-bottom: 20px;
  font-size: 13px;
}

.guide-card p {
  max-width: 260px;
  color: var(--muted);
  font-size: 12px;
}

.guide-card button {
  margin-top: 14px;
}

.guide-art {
  position: absolute;
  right: 25px;
  bottom: 0;
  width: 140px;
  height: 116px;
  opacity: 0.62;
}

.guide-art.store {
  background:
    linear-gradient(90deg, rgba(244, 124, 47, 0.26) 0 6px, transparent 6px 14px) 22px 22px / 20px 40px repeat-x,
    linear-gradient(#d9dee8, #eef1f6);
  clip-path: polygon(12% 42%, 42% 18%, 82% 42%, 82% 100%, 12% 100%);
}

.guide-art.rule {
  border-radius: 16px;
  background:
    linear-gradient(60deg, transparent 0 35%, rgba(244, 124, 47, 0.25) 36% 48%, transparent 49%),
    linear-gradient(135deg, #dbe2ed, #f4f6f9);
  clip-path: polygon(16% 0, 82% 0, 100% 100%, 0 100%);
}

.guide-art.product {
  background:
    radial-gradient(circle at 70% 32%, rgba(244, 124, 47, 0.28) 0 32%, transparent 33%),
    linear-gradient(135deg, #e4e9f1, #f4f6f9);
  clip-path: polygon(18% 10%, 90% 22%, 72% 100%, 0 82%);
}

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

.dashboard-toolbar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 58px;
  margin-bottom: 14px;
  padding: 12px 16px;
}

.dashboard-toolbar > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.dashboard-toolbar span,
.dashboard-total small {
  color: var(--muted);
  font-size: 12px;
}

.dashboard-toolbar select {
  min-width: 190px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.dashboard-toolbar-summary {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
  color: #5b6675;
  font-size: 12px;
  white-space: nowrap;
}

.dashboard-toolbar-summary strong {
  color: #101828;
  font-size: 13px;
}

.dashboard-toolbar-summary span {
  color: #667085;
}

.dashboard-total strong {
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.metric-card {
  min-height: 107px;
  padding: 22px 18px;
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric-card strong {
  display: block;
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
}

.metric-label {
  color: #343b46;
  font-size: 13px;
  font-weight: 800;
}

.metric-card small {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 12px;
}

.metric-orange {
  background: #fff0e3;
}

.metric-blue {
  background: #eaf7ff;
}

.metric-green {
  background: #eefbed;
}

.metric-gray {
  background: #f3f4fa;
}

.dashboard-board {
  display: grid;
  grid-template-columns: minmax(420px, 1.16fr) minmax(320px, 1fr) minmax(320px, 1fr);
  grid-template-areas:
    "events todo revenue"
    "events gap status";
  gap: 12px;
  align-items: stretch;
}

.chart-panel {
  min-height: 278px;
  padding: 18px;
}

.live-events {
  grid-area: events;
  min-height: 610px;
}

.dashboard-todo-panel {
  grid-area: todo;
}

.dashboard-revenue-panel {
  grid-area: revenue;
  overflow: visible;
}

.dashboard-gap-panel {
  grid-area: gap;
}

.dashboard-status-panel {
  grid-area: status;
}

.panel-title,
.table-page-head,
.modal-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-title {
  margin-bottom: 16px;
  position: relative;
}

.expand-button {
  width: 22px;
  height: 22px;
  color: var(--faint);
  background: transparent;
  border: 0;
}

.mini-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
}

.panel-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.mini-tabs button {
  min-height: 25px;
  padding: 0 12px;
  color: #7a8493;
  background: #f7f8fa;
  border: 0;
  border-radius: 3px;
  font-size: 12px;
}

.panel-tabs button {
  min-height: 25px;
  padding: 0 12px;
  color: #7a8493;
  background: #f7f8fa;
  border: 0;
  border-radius: 3px;
  font-size: 12px;
}

.mini-tabs button.active,
.panel-tabs button.active {
  color: var(--dark);
  background: #ffffff;
  box-shadow: 0 1px 5px rgba(21, 27, 36, 0.08);
}

.custom-date-range {
  display: none;
  align-items: center;
  gap: 6px;
  margin-left: 6px;
  color: var(--muted);
  font-size: 12px;
}

.custom-date-range.active {
  display: inline-flex;
}

.custom-date-range input {
  width: 128px;
  min-height: 25px;
  padding: 0 8px;
  font-size: 12px;
}

.priority-list,
.log-list {
  display: grid;
  gap: 9px;
}

.live-events .priority-list {
  display: block;
  position: relative;
  height: 500px;
  max-height: 500px;
  overflow: hidden;
  padding-right: 0;
  overscroll-behavior: contain;
  scroll-behavior: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.live-events .priority-list::-webkit-scrollbar {
  display: none;
}

.priority-scroll-track {
  display: grid;
  gap: 9px;
  animation: dashboard-event-loop var(--event-loop-duration, 60s) linear infinite;
  will-change: transform;
}

.priority-scroll-track.paused {
  animation-play-state: paused;
}

@keyframes dashboard-event-loop {
  from {
    transform: translateY(0);
  }
  to {
    transform: translateY(var(--event-loop-shift, -50%));
  }
}

.priority-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 9px 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
}

.dashboard-event-item {
  cursor: pointer;
}

.dashboard-event-item:hover .priority-title {
  color: var(--orange);
}

.priority-title {
  overflow: hidden;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-meta {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.priority-meta span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.priority-meta span:last-child {
  flex: 1;
}

.todo-grid {
  display: grid;
  align-content: center;
  min-height: 202px;
}

.todo-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.todo-card strong {
  color: var(--orange);
  font-size: 22px;
}

.todo-card span {
  color: var(--muted);
  font-size: 12px;
}

.trend-chart {
  display: grid;
  grid-template-columns: repeat(7, minmax(16px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 205px;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.trend-chart::-webkit-scrollbar {
  height: 6px;
}

.trend-chart::-webkit-scrollbar-thumb {
  background: #d4dae3;
  border-radius: 999px;
}

.trend-bar {
  display: grid;
  align-items: end;
  gap: 7px;
  min-width: 0;
  min-height: 190px;
  text-align: center;
}

.trend-chart.dense-chart {
  gap: 10px;
}

.trend-chart.dense-chart .trend-bar {
  min-width: 74px;
}

.bar-stack {
  display: grid;
  align-items: end;
  justify-self: center;
  width: min(100%, 46px);
  height: 150px;
  overflow: hidden;
  background: #f6e4d5;
  border-radius: 999px 999px 2px 2px;
}

.bar-value {
  background: var(--orange);
}

.trend-label {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.revenue-bar strong {
  color: var(--ink);
  font-size: 11px;
  line-height: 1.15;
  white-space: nowrap;
}

.revenue-bar small {
  color: var(--muted);
  font-size: 11px;
}

.donut-wrap {
  display: grid;
  min-height: 206px;
  place-items: center;
}

.donut {
  display: grid;
  width: 150px;
  height: 150px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#f47c2f 0 var(--owned), #2d3741 var(--owned) var(--warn), #55c89b var(--warn) var(--mid), #7c5cff var(--mid) var(--blue-stop), #3d8bff var(--blue-stop) 100%);
}

.donut::before {
  display: grid;
  width: 92px;
  height: 92px;
  place-items: center;
  content: attr(data-label);
  color: var(--ink);
  text-align: center;
  white-space: pre;
  background: #ffffff;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
}

.gap-summary {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
}

.gap-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 38px;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 0;
  color: #4d5562;
  text-align: left;
  background: transparent;
  border: 0;
  font-size: 12px;
  cursor: pointer;
}

.gap-row:hover span,
.gap-row:hover strong {
  color: var(--orange);
}

.gap-track {
  height: 9px;
  overflow: hidden;
  background: #f2f4f7;
  border-radius: 999px;
}

.gap-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.gap-track .ok {
  background: #55c89b;
}

.gap-track .warn {
  background: #f4b266;
}

.gap-track .danger {
  background: #f47c2f;
}

.gap-track .neutral {
  background: #8c96a5;
}

.status-bars {
  display: grid;
  min-height: 206px;
  align-content: center;
}

.status-percent-chart {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 8px;
  min-height: 174px;
}

.status-axis {
  display: grid;
  grid-template-rows: repeat(6, 1fr);
  height: 148px;
  color: #667080;
  font-size: 11px;
  text-align: right;
}

.status-plot {
  position: relative;
  min-width: 0;
  padding-bottom: 20px;
}

.status-grid-lines {
  position: absolute;
  inset: 0 0 20px;
  background: repeating-linear-gradient(
    to bottom,
    #dfe5ec 0,
    #dfe5ec 1px,
    transparent 1px,
    transparent 29.6px
  );
  border-bottom: 1px solid #8892a0;
}

.status-date-bars {
  position: relative;
  z-index: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(42px, 1fr);
  align-items: end;
  gap: 20px;
  height: 168px;
}

.status-day {
  display: grid;
  align-content: end;
  gap: 7px;
  min-width: 0;
  height: 100%;
  color: #687280;
  text-align: center;
  font-size: 11px;
}

.status-columns {
  display: inline-flex;
  align-items: end;
  justify-content: center;
  gap: 3px;
  height: 148px;
}

.status-columns i {
  display: block;
  width: 14px;
  min-height: 0;
  border-radius: 1px 1px 0 0;
}

.status-columns .lost,
.status-legend .lost {
  background: #ff3b45;
}

.status-columns .won,
.status-legend .won {
  background: #62c979;
}

.status-legend {
  display: flex;
  justify-content: center;
  gap: 12px;
  color: #2d3540;
  font-size: 12px;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.status-legend i {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}

.table-page-head {
  min-height: 34px;
  margin-bottom: 20px;
}

.table-page-head.actions-only {
  justify-content: flex-end;
}

.table-page-head span {
  margin-left: 70px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.full-table-page {
  min-height: calc(100vh - 112px);
  padding: 18px;
}

.filter-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  margin-bottom: 22px;
}

.filter-bar select {
  min-width: 118px;
  height: 30px;
  padding: 0 10px;
  color: #8b95a2;
  font-size: 12px;
}

.product-filter-bar {
  margin-bottom: 16px;
  padding: 0 2px;
}

#productStoreFilter {
  min-width: 170px;
}

.push-right {
  margin-left: auto;
}

.switch-inline {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #626b78;
  font-size: 12px;
  white-space: nowrap;
}

.switch-inline input {
  display: none;
}

.switch-inline span {
  position: relative;
  width: 34px;
  height: 18px;
  background: #dfe5ea;
  border-radius: 999px;
}

.switch-inline span::after {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 14px;
  height: 14px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(21, 27, 36, 0.16);
}

.switch-inline input:checked + span {
  background: #58c783;
}

.switch-inline input:checked + span::after {
  transform: translateX(16px);
}

.table-wrap {
  overflow: auto;
}

.product-table-wrap {
  max-height: calc(100vh - 268px);
  min-height: 430px;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

table {
  width: 100%;
  min-width: 1180px;
  border-collapse: collapse;
}

.product-table {
  min-width: 2040px;
}

.supply-table-wrap {
  max-height: calc(100vh - 284px);
  min-height: 430px;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.supply-table {
  min-width: 1360px;
  table-layout: fixed;
}

.supply-table th:nth-child(1),
.supply-table td:nth-child(1) {
  width: 360px;
}

.supply-table th:nth-child(2),
.supply-table td:nth-child(2) {
  width: 118px;
}

.supply-table th:nth-child(3),
.supply-table td:nth-child(3),
.supply-table th:nth-child(5),
.supply-table td:nth-child(5),
.supply-table th:nth-child(6),
.supply-table td:nth-child(6),
.supply-table th:nth-child(8),
.supply-table td:nth-child(8) {
  width: 104px;
}

.supply-table th:nth-child(4),
.supply-table td:nth-child(4),
.supply-table th:nth-child(9),
.supply-table td:nth-child(9),
.supply-table th:nth-child(10),
.supply-table td:nth-child(10) {
  width: 82px;
}

.supply-table th:nth-child(7),
.supply-table td:nth-child(7) {
  width: 250px;
}

.product-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 var(--line), 0 8px 12px rgba(16, 24, 40, 0.04);
}

.supply-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
  box-shadow: 0 1px 0 var(--line), 0 8px 12px rgba(16, 24, 40, 0.04);
}

.product-table thead th:first-child {
  z-index: 7;
}

.supply-table thead th:first-child {
  z-index: 7;
}

th,
td {
  padding: 11px 10px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

th {
  color: #687384;
  background: #f5f7fb;
  font-size: 12px;
  font-weight: 800;
}

td {
  color: #3d4654;
  font-size: 12px;
}

td strong {
  color: #182230;
}

.product-id,
.product-title-wrap {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.product-id {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  min-width: 132px;
  white-space: normal;
  line-height: 1.35;
}

.product-ref-main,
.product-ref-sub {
  display: block;
  white-space: nowrap;
}

.product-ref-main {
  color: #111827;
  font-weight: 800;
}

.product-ref-sub {
  color: #667085;
  font-size: 11px;
}

.product-title-wrap {
  max-width: 275px;
  white-space: normal;
  line-height: 1.55;
}

.tiny-muted,
.price-delta {
  color: var(--muted);
  font-size: 11px;
}

.price-up {
  color: #d65f20;
}

.price-down {
  color: #039855;
}

.product-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 260px;
}

.product-thumb {
  display: grid;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  overflow: hidden;
  place-items: center;
  color: var(--orange);
  background: var(--orange-soft);
  border-radius: 5px;
  font-weight: 900;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.product-title {
  max-width: 320px;
  overflow: hidden;
  color: #182230;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-title.title-link,
.product-title-wrap.title-link,
.supply-product-title-link {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.product-title.title-link:hover,
.product-title-wrap.title-link:hover,
.supply-product-title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.table-inline-select {
  width: 116px;
  height: 30px;
  padding: 0 8px;
  color: #344054;
  background: #ffffff;
  border: 1px solid #d9e0ea;
  border-radius: 6px;
  font-size: 12px;
}

.product-limit-readonly {
  display: grid;
  gap: 3px;
  min-width: 96px;
}

.product-limit-readonly strong {
  color: #182230;
  font-size: 12px;
}

.product-limit-readonly small {
  color: var(--muted);
  font-size: 11px;
}

.action-link:disabled {
  color: #b5bdc9;
  cursor: not-allowed;
}

.product-sub {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.status-pill,
.score-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 23px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.score-pill {
  color: #92400e;
  background: #fff0d5;
}

.status-pill.ok {
  color: #027a48;
  background: #dcfae6;
}

.status-pill.warn {
  color: #a15c11;
  background: #fff2d6;
}

.status-pill.danger {
  color: #b42318;
  background: #fee4e2;
}

.status-pill.neutral {
  color: #1c64b7;
  background: #e5f1ff;
}

.state-dot {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.state-dot::before {
  width: 7px;
  height: 7px;
  content: "";
  background: #ff3154;
  border-radius: 50%;
  box-shadow: 0 0 0 4px #ffe7ec;
}

.state-dot.ok::before {
  background: #31c277;
  box-shadow: 0 0 0 4px #e2f8eb;
}

.action-icons {
  display: inline-flex;
  gap: 8px;
  color: #9aa3ae;
}

.action-link {
  padding: 0;
  color: var(--orange);
  background: transparent;
  border: 0;
  font-weight: 800;
}

.table-sort {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  font: inherit;
  font-weight: 800;
}

.table-sort.active {
  color: var(--orange);
}

.product-table thead button[data-product-sort] {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  margin: 0;
  padding: 0;
  color: inherit;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: left;
  white-space: normal;
  cursor: pointer;
  appearance: none;
  background: transparent;
  border: 0;
}

.product-table thead button[data-product-sort]:hover,
.product-table thead button[data-product-sort].active {
  color: var(--orange);
}

.product-detail-view {
  padding: 0;
}

.product-detail-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 18px;
}

.product-detail-head.diagnostic-head {
  border: 1px solid #e2e8f0;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.product-detail-title {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.product-detail-title h2 {
  margin: 0;
  overflow: hidden;
  color: #111827;
  font-size: 18px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-detail-title p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.diagnostic-title-main {
  min-width: 0;
}

.detail-status-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.detail-status-tag,
.detail-action-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 9px;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.detail-status-tag.ok,
.detail-action-badge.ok {
  border-color: #bbf7d0;
  background: #dcfce7;
  color: #16a34a;
}

.detail-status-tag.warn,
.detail-action-badge.warn {
  border-color: #fed7aa;
  background: #fff7ed;
  color: #ea580c;
}

.detail-status-tag.danger,
.detail-action-badge.danger {
  border-color: #fecaca;
  background: #fee2e2;
  color: #dc2626;
}

.detail-status-tag.info,
.detail-action-badge.info {
  border-color: #bfdbfe;
  background: #dbeafe;
  color: #2563eb;
}

.detail-action-badge {
  min-width: 104px;
  min-height: 28px;
  font-size: 12px;
}

.product-thumb.large {
  flex-basis: 56px;
  width: 60px;
  height: 60px;
}

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

.detail-metric {
  min-height: 112px;
  padding: 16px;
}

.detail-metric span {
  display: block;
  color: #4d5562;
  font-size: 12px;
  font-weight: 800;
}

.detail-metric strong {
  display: block;
  margin-top: 10px;
  color: #111827;
  font-size: 22px;
  line-height: 1.15;
}

.detail-metric small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.product-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 12px;
}

.detail-panel {
  min-height: 220px;
  padding: 18px;
}

.detail-sales-panel,
.detail-log-panel {
  min-height: 0;
}

.detail-sales-panel,
.detail-log-panel {
  display: flex;
  height: 326px;
  flex-direction: column;
  overflow: hidden;
}

.detail-sales-panel {
  padding: 14px;
}

.detail-log-panel .detail-log-list {
  min-height: 0;
  flex: 1 1 auto;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
}

.detail-offer-panel,
.detail-report-panel {
  display: flex;
  height: 386px;
  flex-direction: column;
  overflow: hidden;
}

.detail-offer-panel .detail-offer-section:last-child {
  min-height: 0;
  flex: 1 1 auto;
}

.detail-offer-panel .detail-offer-list {
  min-height: 0;
  overflow-y: auto;
  padding-right: 4px;
}

.detail-report-panel .detail-report {
  flex: 1 1 auto;
  align-content: start;
}

.detail-panel .panel-title h2 {
  margin: 0;
  color: #111827;
  font-size: 15px;
}

.detail-panel .panel-title small {
  color: var(--muted);
  font-size: 12px;
}

.detail-offer-list,
.detail-log-list,
.detail-report,
.detail-offer-section {
  display: grid;
  gap: 8px;
}

.detail-offer-section + .detail-offer-section {
  margin-top: 12px;
}

.detail-offer-section h3 {
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
}

.detail-offer-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(150px, 0.8fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.detail-offer-row.competitor {
  grid-template-columns: 28px minmax(0, 1.25fr) minmax(150px, 0.75fr);
  padding: 8px 11px;
}

.detail-offer-row.own {
  border-color: #bfdbfe;
  background: #f8fbff;
  box-shadow: inset 3px 0 0 #2563eb;
}

.detail-offer-rank {
  display: inline-grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.detail-offer-row strong,
.detail-log-list strong {
  display: block;
  color: #111827;
  font-size: 13px;
}

.detail-offer-row small,
.detail-log-list span {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.detail-offer-row > span {
  color: #4d5562;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-offer-toggle {
  width: 100%;
  min-height: 32px;
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
}

.detail-offer-toggle:hover {
  color: #1d4ed8;
  background: #dbeafe;
}

.detail-empty-card {
  display: grid;
  gap: 6px;
  min-height: 76px;
  align-content: center;
  padding: 16px;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
}

.detail-empty-card.compact {
  min-height: 76px;
}

.detail-empty-card strong {
  color: #0f172a;
  font-size: 15px;
}

.detail-empty-card span {
  color: #64748b;
  font-size: 12px;
}

.detail-report {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-report div {
  padding: 12px;
  background: #f8fafc;
  border-radius: 7px;
}

.detail-report div.wide {
  grid-column: 1 / -1;
}

.detail-report span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-report strong {
  display: block;
  margin-top: 6px;
  color: #111827;
  font-size: 15px;
  line-height: 1.35;
}

.detail-action-text.ok {
  color: #16a34a;
}

.detail-action-text.warn {
  color: #ea580c;
}

.detail-action-text.danger {
  color: #dc2626;
}

.detail-action-text.info {
  color: #2563eb;
}

.detail-execution-result,
.detail-execution-empty {
  margin-top: 12px;
  padding: 14px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.detail-execution-empty {
  color: var(--muted);
  font-size: 12px;
}

.detail-execution-title {
  margin-bottom: 10px;
  color: #111827;
  font-size: 13px;
  font-weight: 800;
}

.detail-execution-change,
.detail-execution-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-execution-change strong {
  color: #111827;
  font-size: 13px;
}

.detail-execution-change i {
  color: #94a3b8;
  font-style: normal;
}

.detail-execution-meta {
  margin-top: 8px;
}

.detail-execution-reason {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.detail-field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-field-grid div {
  min-width: 0;
  padding: 12px;
  background: #f8fafc;
  border-radius: 7px;
}

.detail-field-grid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.detail-field-grid strong {
  display: block;
  margin-top: 6px;
  overflow: hidden;
  color: #111827;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mini-trend {
  display: grid;
  grid-template-columns: repeat(7, minmax(44px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 92px;
  overflow: visible;
  padding: 8px 0 0;
}

.detail-sales-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.detail-sales-summary div {
  min-width: 0;
  padding: 8px 10px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 8px;
}

.detail-sales-summary span {
  display: block;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.detail-sales-summary strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-more-panel,
.detail-log-list {
  grid-column: 1 / -1;
}

.detail-info-group {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

.detail-info-group + .detail-info-group {
  margin-top: 10px;
}

.detail-info-group summary {
  padding: 12px 14px;
  color: #0f172a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

.detail-info-group .detail-field-grid {
  padding: 0 14px 14px;
}

.mini-trend div {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 3px;
  min-width: 44px;
  opacity: 0.55;
}

.mini-trend div.has-value {
  opacity: 1;
}

.mini-trend i {
  display: block;
  width: 18px;
  background: var(--color-primary);
  border-radius: 999px 999px 2px 2px;
}

.mini-trend i.empty {
  background: #dbeafe;
}

.mini-trend span {
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.mini-trend strong {
  color: #0f172a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.1;
  white-space: nowrap;
}

.mini-trend small {
  color: #94a3b8;
  font-size: 11px;
  line-height: 1.1;
}

.detail-log-list > div {
  padding: 0;
}

.detail-log-card {
  display: grid;
  grid-template-columns: 72px 118px minmax(0, 1fr) minmax(92px, auto) auto;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding: 8px 12px !important;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
}

.detail-log-card-time {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
}

.detail-log-card-action {
  display: block;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.detail-log-card-reason,
.detail-log-card-price {
  display: block;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-log-card-price {
  color: #0f172a;
  font-weight: 700;
}

@media (max-width: 1180px) {
  .detail-metric-grid,
  .product-detail-grid {
    grid-template-columns: 1fr 1fr;
  }

  .product-detail-head.diagnostic-head {
    grid-template-columns: 1fr;
    align-items: flex-start;
  }
}

@media (max-width: 820px) {
  .detail-metric-grid,
  .product-detail-grid,
  .detail-report,
  .detail-field-grid {
    grid-template-columns: 1fr;
  }

  .product-detail-title {
    grid-template-columns: 1fr;
  }

  .detail-offer-row,
  .detail-log-card {
    grid-template-columns: 1fr;
  }

  .detail-offer-panel,
  .detail-report-panel,
  .detail-sales-panel,
  .detail-log-panel {
    height: auto;
    overflow: visible;
  }

  .detail-offer-panel .detail-offer-list,
  .detail-log-panel .detail-log-list {
    overflow: visible;
    padding-right: 0;
  }
}

.detail-log-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.detail-log-table th,
.detail-log-table td {
  padding: 10px 8px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.detail-log-table th {
  color: var(--muted);
  font-weight: 800;
  background: #f8fafc;
}

.detail-log-table td {
  color: #334155;
}

.detail-log-result {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  height: 22px;
  margin: 0 !important;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 11px !important;
  font-weight: 800;
  line-height: 1;
}

.detail-log-result.success {
  color: #16a34a;
  background: #dcfce7;
}

.detail-log-result.danger {
  color: #dc2626;
  background: #fee2e2;
}

.detail-log-result.neutral {
  color: #64748b;
  background: #f1f5f9;
}

.detail-log-result.processing {
  color: #2563eb;
  background: #eff6ff;
}

.product-detail-empty {
  padding: 18px;
}

.empty-state.small {
  min-height: 80px;
  font-size: 12px;
}

.task-progress {
  width: 120px;
  height: 7px;
  overflow: hidden;
  background: #eef1f5;
  border-radius: 999px;
}

.task-progress i {
  display: block;
  height: 100%;
  background: var(--orange);
  border-radius: inherit;
}

.user-center-shell {
  min-height: 420px;
}

.user-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.permission-list {
  display: grid;
  gap: 10px;
}

.permission-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 13px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.permission-item strong,
.permission-item small {
  display: block;
}

.permission-item small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
}

.brand-preview {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin: 18px 0;
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.brand-preview-logo {
  display: grid;
  height: 64px;
  place-items: center;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.brand-preview-logo img {
  max-width: 170px;
  max-height: 58px;
  object-fit: contain;
}

.brand-preview strong,
.brand-preview span {
  display: block;
}

.brand-preview span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.brand-preview-icon {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 8px;
}

.support-grid,
.module-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.support-card,
.module-card-grid article {
  display: grid;
  gap: 10px;
  min-height: 112px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.support-card strong,
.module-card-grid strong {
  color: #111827;
}

.support-card span,
.module-card-grid span,
.module-card-grid small {
  color: var(--muted);
  font-size: 12px;
}

.pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  min-height: 44px;
  color: #687384;
  font-size: 12px;
}

.pagination-row span:first-child {
  margin-right: auto;
}

.pagination-row button {
  min-width: 26px;
  height: 26px;
  color: #9aa3ae;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 5px;
}

.pagination-row .current {
  color: var(--orange);
  background: #fff2e8;
}

.store-management-view {
  padding: 0 0 18px;
}

.store-page-title {
  margin: 0 0 16px;
  color: #111827;
  font-size: 20px;
  font-weight: 900;
}

.store-management-card {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 150px);
  padding: 20px 24px 16px;
  border-color: #e4e7ec;
  box-shadow: none;
}

.store-filter-bar {
  gap: 10px;
  margin-bottom: 18px;
}

.store-filter-bar select {
  width: 116px;
  min-width: 116px;
  height: 34px;
  border-radius: 6px;
}

.store-search {
  width: 132px;
  height: 34px;
}

.auth-bind-button {
  min-width: 120px;
  height: 34px;
  margin-left: auto;
  padding: 0 16px;
}

.store-table-wrap {
  min-height: 430px;
}

.store-table {
  min-width: 1180px;
}

.store-table th,
.store-table td {
  height: 50px;
  text-align: center;
}

.store-table th {
  color: #7d8794;
  background: #f4f6fa;
}

.store-table tbody tr {
  background: #ffffff;
}

.store-name-cell {
  color: #4d5562;
  font-weight: 700;
}

.auth-actions {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.auth-info-button {
  height: 30px;
  padding: 0 12px;
  color: #ffffff;
  background: #1f2937;
  border: 0;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.auth-info-button:hover {
  background: #111827;
}

.auth-icon-button {
  display: inline-grid;
  width: 23px;
  height: 23px;
  place-items: center;
  color: #9aa3ae;
  background: transparent;
  border: 0;
  border-radius: 5px;
  font-size: 14px;
  line-height: 1;
}

.auth-icon-button:hover {
  color: var(--orange);
  background: #fff2e8;
}

.store-pagination {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.rule-list-stage {
  min-height: calc(100vh - 112px);
  padding: 18px;
}

.stockout-shell {
  min-height: calc(100vh - 112px);
  padding: 18px;
}

.stockout-shell .table-page-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
}

.stockout-page-head {
  align-items: flex-start;
  gap: 16px;
}

.stockout-top-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
}

.stockout-head-actions {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 10px;
  margin-left: 0;
  order: 2;
}

.stockout-account-count {
  color: #64748b;
  font-size: 12px;
  white-space: nowrap;
}

.stockout-head-actions .primary-button {
  height: 36px;
  padding: 0 16px;
}

.stockout-shell.full-table-page {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.stockout-toolbar {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: nowrap;
  align-items: center;
  gap: 10px;
  min-width: 0;
  margin: 0;
  order: 1;
}

.stockout-toolbar select,
.stockout-toolbar .secondary-button,
.stockout-toolbar .inline-search {
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
}

.stockout-toolbar select {
  min-width: 145px;
  padding: 0 34px 0 12px;
}

#stockoutStoreFilter {
  min-width: 190px;
}

#stockoutResetButton,
#stockoutSearchButton {
  min-width: 64px;
  padding: 0 14px;
}

.stockout-toolbar .inline-search {
  flex: 0 1 420px;
  max-width: 520px;
  min-width: 220px;
  padding: 0 12px;
  gap: 8px;
}

.stockout-toolbar .inline-search input {
  width: 100%;
  height: 34px;
  min-height: 0;
  padding: 0;
  border: 0;
  box-shadow: none;
  font-size: 12px;
  line-height: 36px;
}

.stockout-table-wrap {
  flex: 1;
  min-height: 0;
}

.stockout-table {
  width: 100%;
  min-width: 1520px;
  table-layout: fixed;
}

.stockout-table th,
.stockout-table td {
  vertical-align: middle;
}

.stockout-table th:nth-child(1),
.stockout-table td:nth-child(1) {
  width: 48px;
  text-align: center;
}

.stockout-table th:nth-child(2),
.stockout-table td:nth-child(2) {
  width: 96px;
  text-align: center;
}

.stockout-table th:nth-child(3),
.stockout-table td:nth-child(3) {
  width: 150px;
}

.stockout-table th:nth-child(4),
.stockout-table td:nth-child(4) {
  width: auto;
}

.stockout-table th:nth-child(5),
.stockout-table td:nth-child(5),
.stockout-table th:nth-child(6),
.stockout-table td:nth-child(6) {
  width: 200px;
}

.stockout-table th:nth-child(7),
.stockout-table td:nth-child(7),
.stockout-table th:nth-child(9),
.stockout-table td:nth-child(9) {
  width: 132px;
}

.stockout-table th:nth-child(8),
.stockout-table td:nth-child(8) {
  width: 112px;
}

.stockout-table th:nth-child(10),
.stockout-table td:nth-child(10) {
  width: 96px;
  text-align: center;
}

.stockout-product-info-cell .product-cell {
  max-width: 340px;
}

.stockout-product-info-cell .product-title-wrap {
  color: #2563eb;
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.stockout-product-refs {
  color: #64748b;
  font-size: 11px;
}

.stockout-multi-select {
  position: relative;
  width: 100%;
  font-size: 12px;
}

.stockout-multi-select summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  color: #1e293b;
  background: #ffffff;
  cursor: pointer;
  list-style: none;
}

.stockout-multi-select summary::-webkit-details-marker {
  display: none;
}

.stockout-multi-select summary::after {
  content: "⌄";
  color: #64748b;
  font-size: 12px;
}

.stockout-multi-select.is-disabled summary {
  color: #94a3b8;
  cursor: default;
}

.stockout-multi-menu,
.stockout-multi-empty {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  width: 220px;
  max-height: 240px;
  overflow: auto;
  padding: 8px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.14);
}

.stockout-multi-empty {
  color: #94a3b8;
}

.stockout-multi-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 4px 6px;
  border-radius: 6px;
  color: #334155;
}

.stockout-multi-option:hover {
  background: #f8fafc;
}

.stockout-multi-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-multi-option.is-all {
  border-bottom: 1px solid #e2e8f0;
  border-radius: 6px 6px 0 0;
  color: #2563eb;
  font-weight: 700;
}

.stockout-quantity-input {
  width: 74px;
  height: 34px;
  padding: 0 8px;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  text-align: center;
}

.stockout-money-cell {
  color: #0f172a;
  font-weight: 700;
  white-space: nowrap;
}

.stockout-action-cell {
  text-align: center;
}

.stockout-purchase-button {
  min-width: 64px;
  height: 32px;
  padding: 0 14px;
  border: 1px solid #2563eb;
  border-radius: 8px;
  color: #ffffff;
  background: #2563eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.stockout-purchase-button:hover:not(:disabled) {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

.stockout-purchase-button:disabled {
  color: #94a3b8;
  background: #f1f5f9;
  border-color: #dbe4f0;
  cursor: not-allowed;
}

#stockoutSearchButton {
  color: #2563eb;
  background: #ffffff;
  border-color: #bfdbfe;
}

#stockoutSearchButton:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

.stockout-account-dialog {
  width: min(640px, calc(100vw - 32px));
  border-radius: 16px;
}

.stockout-account-dialog .modal-card {
  width: 100%;
  max-width: 640px;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.stockout-account-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.stockout-account-heading p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.stockout-account-panel,
.stockout-account-import {
  display: grid;
  gap: 10px;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
}

.stockout-account-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #334155;
  font-size: 13px;
}

.stockout-account-panel-head span {
  color: #64748b;
  font-size: 12px;
}

.stockout-account-list {
  display: grid;
  gap: 8px;
  max-height: 180px;
  overflow: auto;
}

.stockout-account-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.stockout-account-item div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.stockout-account-item strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-account-item span {
  color: #64748b;
  font-size: 12px;
}

.stockout-account-item button {
  flex: 0 0 auto;
  height: 28px;
  padding: 0 10px;
  color: #dc2626;
  cursor: pointer;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 8px;
}

.stockout-account-empty {
  padding: 18px;
  color: #94a3b8;
  text-align: center;
  background: #ffffff;
  border: 1px dashed #cbd5e1;
  border-radius: 10px;
}

.stockout-account-import textarea {
  min-height: 104px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  resize: vertical;
}

.stockout-account-help {
  margin: 0;
  color: #64748b;
  font-size: 12px;
}

.stockout-account-error {
  padding: 8px 10px;
  color: #b91c1c;
  background: #fee2e2;
  border-radius: 8px;
  font-size: 12px;
}

.stockout-account-error.hidden {
  display: none;
}

.stockout-account-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.stockout-account-actions .primary-button,
.stockout-account-actions .secondary-button {
  height: 36px;
  padding: 0 16px;
}

.stockout-task-dialog {
  width: min(920px, calc(100vw - 32px));
  border-radius: 16px;
}

.stockout-task-card {
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.stockout-task-list {
  display: grid;
  gap: 10px;
  max-height: min(62vh, 620px);
  overflow: auto;
}

.stockout-task-empty {
  padding: 28px;
  color: #64748b;
  text-align: center;
  background: #f8fbff;
  border: 1px dashed #cbd5e1;
  border-radius: 12px;
}

.stockout-task-empty.is-error {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fecaca;
}

.stockout-task-item {
  display: grid;
  grid-template-columns: minmax(220px, 1.1fr) minmax(360px, 1.5fr);
  gap: 14px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

.stockout-task-main {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
}

.stockout-task-main > div {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.stockout-task-main strong,
.stockout-task-main p {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-task-main strong {
  color: #0f172a;
  font-size: 13px;
}

.stockout-task-main p {
  margin: 0;
  color: #334155;
  font-size: 12px;
}

.stockout-task-main .stockout-task-fail {
  color: #b91c1c;
}

.stockout-task-status {
  flex: 0 0 auto;
  padding: 3px 8px;
  color: #475569;
  background: #f1f5f9;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.stockout-task-status.is-pending {
  color: #1d4ed8;
  background: #dbeafe;
}

.stockout-task-status.is-waiting {
  color: #7c2d12;
  background: #ffedd5;
}

.stockout-task-status.is-running {
  color: #0f766e;
  background: #ccfbf1;
}

.stockout-task-status.is-manual {
  color: #9333ea;
  background: #f3e8ff;
}

.stockout-task-status.is-pay {
  color: #166534;
  background: #dcfce7;
}

.stockout-task-status.is-failed {
  color: #b91c1c;
  background: #fee2e2;
}

.stockout-task-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 12px;
  margin: 0;
}

.stockout-task-meta div {
  min-width: 0;
}

.stockout-task-meta dt {
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.stockout-task-meta dd {
  min-width: 0;
  margin: 3px 0 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stockout-purchase-dialog {
  width: min(560px, calc(100vw - 32px));
  border-radius: 16px;
}

.stockout-purchase-confirm-card {
  gap: 16px;
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.16);
}

.stockout-purchase-confirm-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.stockout-purchase-confirm-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 12px;
  background: #f8fbff;
  border: 1px solid #dbeafe;
  border-radius: 12px;
}

.stockout-purchase-confirm-list div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  min-height: 28px;
}

.stockout-purchase-confirm-list dt {
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
}

.stockout-purchase-confirm-list dd {
  min-width: 0;
  margin: 0;
  color: #0f172a;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
  overflow-wrap: anywhere;
  text-align: right;
}

.stockout-purchase-confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.stockout-purchase-confirm-actions .primary-button,
.stockout-purchase-confirm-actions .secondary-button {
  min-width: 96px;
  height: 36px;
  padding: 0 16px;
}

@media (max-width: 760px) {
  .stockout-top-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .stockout-toolbar {
    flex-wrap: wrap;
  }

  .stockout-head-actions {
    width: 100%;
    justify-content: space-between;
  }

  .stockout-account-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .stockout-task-item {
    grid-template-columns: 1fr;
  }

  .stockout-task-meta {
    grid-template-columns: 1fr 1fr;
  }

  .stockout-purchase-confirm-list div {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .stockout-purchase-confirm-list dd {
    text-align: left;
  }

  .stockout-purchase-confirm-actions {
    flex-direction: column-reverse;
  }

  .stockout-purchase-confirm-actions .primary-button,
  .stockout-purchase-confirm-actions .secondary-button {
    width: 100%;
  }
}

.rule-grid {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: calc(100vh - 220px);
}

.rule-card {
  width: 100%;
  padding: 16px;
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rule-card + .rule-card {
  margin-top: 10px;
}

.rule-card.active {
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(244, 124, 47, 0.1);
}

.rule-card h3 {
  margin: 0;
}

.rule-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}

.rule-card-head p {
  margin: 5px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rule-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  width: 100%;
}

.rule-summary-grid article {
  padding: 16px;
  background: #f8fafc;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rule-summary-grid span,
.rule-health span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.rule-summary-grid strong,
.rule-health strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 22px;
}

.rule-list {
  display: grid;
  gap: 12px;
  width: 100%;
}

.rule-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
}

.rule-stats span {
  padding: 5px 8px;
  background: #f8fafc;
  border-radius: 999px;
}

.rule-health {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.rule-health div {
  padding: 12px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.rule-card-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.danger-link {
  color: #d92d20;
}

.rule-empty,
.empty-state {
  display: grid;
  place-items: center;
  min-height: 180px;
  color: #4d5562;
  text-align: center;
}

.empty-illustration {
  width: 54px;
  height: 54px;
  margin: 0 auto 10px;
  background:
    linear-gradient(#ffe8d5, #ffe8d5) 12px 10px / 30px 42px no-repeat,
    radial-gradient(circle at 72% 70%, var(--orange) 0 11px, transparent 12px);
  opacity: 0.88;
}

.empty-action-state {
  gap: 10px;
  color: #64748b;
}

.empty-action-state > div,
.empty-action-state {
  align-content: center;
}

.empty-action-state strong {
  display: block;
  color: #0f172a;
  font-size: 15px;
  font-weight: 700;
}

.empty-action-state span {
  display: block;
  max-width: 460px;
  margin: 0 auto;
  color: #64748b;
  font-size: 12px;
  line-height: 1.7;
}

.empty-action-state .primary-button {
  width: fit-content;
  margin: 2px auto 0;
}

.rule-store-empty {
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 22px;
  border: 1px dashed #bfdbfe;
  border-radius: 12px;
  background: #f8fbff;
  text-align: center;
}

.rule-wizard {
  display: none;
  min-height: calc(100vh - 112px);
  padding: 18px 22px;
}

#rulesView.wizard-mode .rule-list-stage {
  display: none;
}

#rulesView.wizard-mode .rule-wizard {
  display: block;
}

.breadcrumb-line {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
}

.breadcrumb-line button {
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  font-size: 12px;
}

.breadcrumb-line button:hover {
  color: var(--orange);
}

.breadcrumb-line strong {
  color: #4d5562;
}

.wizard-steps {
  display: grid;
  grid-template-columns: auto minmax(160px, 440px) auto;
  justify-content: center;
  align-items: start;
  gap: 22px;
  margin: 28px auto 38px;
}

.wizard-step {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.wizard-step span {
  display: grid;
  width: 31px;
  height: 31px;
  place-items: center;
  color: #9aa3ae;
  background: #f1f3f7;
  border-radius: 50%;
}

.wizard-step.active span,
.wizard-step.done span {
  color: #ffffff;
  background: var(--orange);
}

.wizard-line {
  height: 2px;
  margin-top: 15px;
  background: #f1c8af;
}

.rule-step {
  display: none;
}

#rulesView[data-step="store"] .rule-step-store,
#rulesView[data-step="config"] .rule-step-config {
  display: block;
}

.rule-step-store {
  max-width: 500px;
  margin: 0 auto;
  text-align: center;
}

.rule-step-store p,
.rule-step-config p {
  color: var(--muted);
  font-size: 12px;
}

.rule-store-toolbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin: 18px 0 12px;
  color: var(--muted);
  font-size: 12px;
}

.rule-store-toolbar select {
  width: 112px;
  height: 28px;
  color: #687384;
}

.rule-store-toolbar button {
  width: 24px;
  height: 24px;
  color: var(--orange);
  background: #fff2e8;
  border: 0;
  border-radius: 6px;
}

.rule-store-list {
  display: grid;
  gap: 10px;
}

.rule-store-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 54px;
  padding: 8px 16px;
  color: #5d6674;
  text-align: left;
  border: 1px solid var(--orange);
  border-radius: 6px;
}

.rule-store-option strong,
.rule-store-option small {
  display: block;
}

.rule-store-option small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.rule-store-option input {
  accent-color: var(--orange);
}

.wizard-next {
  margin-top: 170px;
}

.rule-step-config {
  text-align: center;
}

.rule-config-layout {
  display: grid;
  grid-template-columns: minmax(560px, 0.95fr) minmax(420px, 0.85fr);
  gap: 32px;
  max-width: 1280px;
  margin: 32px auto 0;
  text-align: left;
}

.rule-form {
  display: grid;
  gap: 20px;
}

.rule-market-preview {
  min-height: 320px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.rule-price-ladder {
  display: grid;
  gap: 10px;
}

.rule-price-ladder div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px 12px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.rule-price-ladder div.active {
  border-color: var(--orange);
  box-shadow: inset 3px 0 0 var(--orange);
}

.rule-price-ladder div.is-note {
  grid-template-columns: minmax(0, 1fr);
}

.rule-price-ladder span,
.rule-price-ladder small {
  color: var(--muted);
  font-size: 12px;
}

.rule-price-ladder strong {
  color: #111827;
  font-size: 15px;
}

.rule-price-ladder div.is-note strong {
  font-size: 13px;
  line-height: 1.5;
}

.rule-price-ladder small {
  grid-column: 1 / -1;
}

.config-card,
.option-card {
  padding: 20px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.config-tabs {
  display: flex;
  gap: 32px;
  margin: -20px -20px 20px;
  padding: 18px 20px 0;
  border-bottom: 1px solid var(--line);
}

.config-tabs button {
  padding: 0 0 14px;
  color: #687384;
  background: transparent;
  border: 0;
  font-weight: 800;
}

.config-tabs button.active {
  color: var(--dark);
  border-bottom: 2px solid var(--orange);
}

.wide-field {
  display: grid;
  gap: 8px;
  color: #4d5562;
  font-size: 12px;
  font-weight: 800;
}

.wide-field input[type="text"] {
  width: 100%;
  height: 36px;
  padding: 0 12px;
}

.inline-rule {
  display: grid;
  grid-template-columns: auto minmax(170px, 1fr) auto minmax(130px, 1fr) auto;
  align-items: center;
  gap: 14px;
  margin: 14px 0;
  color: #4d5562;
  font-size: 12px;
}

.inline-rule input[type="text"],
.inline-rule input[type="number"] {
  height: 36px;
  padding: 0 12px;
  border-color: var(--orange);
}

.rule-unit-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  margin: 10px 0 14px 34px;
  color: #4d5562;
  font-size: 12px;
}

.rule-unit-row label,
.daily-unlimited {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
}

.rule-unit-row input,
.daily-unlimited input {
  accent-color: var(--orange);
}

.row-index {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  color: #9a6d47;
  background: #fff3e8;
  border-radius: 5px;
}

.range-field {
  display: grid;
  grid-template-columns: minmax(120px, 180px) auto;
  align-items: center;
  gap: 12px;
}

.range-field input[type="number"] {
  width: 180px;
  height: 36px;
  padding: 0 12px;
  border-color: var(--line-strong);
}

.range-field input[type="number"]:focus,
.inline-rule input[type="number"]:focus {
  border-color: rgba(244, 124, 47, 0.7);
}

.daily-limit-field {
  grid-template-columns: 120px auto auto;
}

.daily-limit-field input[type="number"] {
  width: 120px;
  height: 32px;
  padding: 0 10px;
}

.strong-rule-box {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  padding: 14px;
  background: #fffaf6;
  border: 1px solid #ffd7bd;
  border-radius: 8px;
}

.strong-rule-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.strong-rule-toggle input {
  accent-color: var(--orange);
}

.strong-rule-settings {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.strong-rule-settings label {
  display: grid;
  grid-template-columns: auto minmax(70px, 1fr) auto;
  align-items: center;
  gap: 8px;
  color: #4d5562;
  font-size: 12px;
  font-weight: 800;
}

.strong-rule-settings input {
  width: 100%;
  height: 32px;
  padding: 0 8px;
}

.strong-rule-settings input:disabled {
  color: #9aa3af;
  background: #f3f5f8;
}

.strong-rule-box p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

input[type="range"] {
  accent-color: var(--orange);
}

output {
  min-width: 58px;
  color: var(--orange);
  font-weight: 800;
}

.current-rule-text {
  padding-top: 14px;
  color: #687384;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.current-rule-text strong {
  color: var(--orange);
}

.rule-preview {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 12px;
  color: #4d5562;
  background: #fff7f0;
  border: 1px solid #ffd7bd;
  border-radius: 7px;
  font-size: 12px;
}

.rule-preview strong {
  color: #111827;
}

.advanced-toggle {
  grid-column: 1 / -1;
  justify-self: center;
  color: var(--orange);
  background: #ffffff;
  border: 0;
  font-weight: 800;
}

.advanced-rules {
  display: none;
  grid-column: 1 / -1;
  gap: 12px;
  padding: 18px 16px;
  background: #f7f8fa;
  border-radius: 8px;
}

.advanced-rules.open {
  display: grid;
}

.option-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px 22px;
  min-height: 46px;
  margin: 0;
  padding: 10px 14px;
  border: 0;
  border-radius: 6px;
  background: #fff;
  color: #626b78;
  font-size: 12px;
}

fieldset.option-card {
  min-inline-size: 0;
}

fieldset.option-card legend {
  float: left;
  width: 120px;
  margin: 0;
  padding: 0;
  color: var(--dark);
  font-weight: 900;
}

.time-range-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 4px;
}

.time-range-row input {
  width: 112px;
  height: 30px;
  padding: 0 8px;
}

.option-card strong {
  flex: 0 0 120px;
  color: var(--dark);
}

.option-card label {
  display: flex;
  align-items: center;
  gap: 9px;
  min-height: 28px;
  white-space: nowrap;
}

.option-card small {
  color: var(--muted);
}

.option-card input[type="radio"],
.option-card input[type="checkbox"] {
  accent-color: var(--orange);
}

.small-number {
  width: 74px;
  height: 30px;
  padding: 0 8px;
}

.hidden-native {
  display: none !important;
}

.deferred-giga-section {
  display: none !important;
}

.wizard-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: center;
  gap: 12px;
}

.price-ladder {
  display: grid;
  gap: 12px;
  align-content: start;
}

.price-ladder > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 45px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: #596272;
  font-size: 12px;
}

.price-ladder strong {
  color: #e65454;
  font-weight: 800;
}

.price-ladder .own-price {
  border-color: var(--orange);
}

.own-price em {
  padding: 2px 8px;
  color: var(--green);
  background: #effaf2;
  border: 1px solid #bbebc9;
  border-radius: 4px;
  font-style: normal;
}

.sync-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.supply-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-bottom: 14px;
}

.supply-toolbar select,
.supply-match-box input,
.supply-match-box select {
  height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #ffffff;
}

.supply-toolbar .search-box {
  min-width: 320px;
}

.supply-hint {
  color: var(--muted);
  font-size: 12px;
}

.supply-product-cell {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.supply-product-cell img {
  width: 34px;
  height: 34px;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f6f7f9;
}

.supply-product-cell strong,
.supply-product-cell span,
.supply-product-cell small {
  display: block;
}

.supply-product-cell strong {
  display: -webkit-box;
  overflow: hidden;
  line-height: 1.32;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.supply-product-cell span {
  max-width: 300px;
  overflow: hidden;
  color: #1f2937;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.supply-product-cell small {
  color: var(--muted);
  font-size: 12px;
}

.supply-match-box {
  display: flex;
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.supply-match-box input {
  width: 150px;
}

.supply-match-box select {
  width: 260px;
}

.supply-match-box.wide {
  min-width: 0;
}

.supply-match-box.wide input {
  width: 168px;
}

.small-orange-button {
  height: 32px;
  padding: 0 12px;
  color: #ffffff;
  background: var(--orange);
  border: 0;
  border-radius: 6px;
  font-weight: 800;
  cursor: pointer;
}

.matched-sku-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-width: 230px;
  margin-top: 7px;
}

.matched-sku-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding: 4px 6px;
  color: #334155;
  background: #f6f8fb;
  border: 1px solid var(--line);
  border-radius: 6px;
}

.matched-sku-chip strong {
  max-width: 104px;
  overflow: hidden;
  color: #111827;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matched-sku-chip small {
  max-width: 74px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.matched-sku-chip button {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  padding: 0;
  color: #7a8493;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 50%;
  cursor: pointer;
}

/* GIGA product table polish v82 */
#supplyView .table-page-head.actions-only {
  align-items: center;
  margin-bottom: 16px;
}

#supplyView .table-page-head.actions-only > div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

#supplyView .table-page-head.actions-only .primary-button,
#supplyView .table-page-head.actions-only .secondary-button {
  height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

#supplyView .table-page-head.actions-only .secondary-button {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
}

#supplyView .table-page-head.actions-only .secondary-button:hover {
  color: #1d4ed8;
  background: #f8fafc;
  border-color: #93c5fd;
}

#supplyView .supply-toolbar {
  gap: 12px;
  margin-bottom: 14px;
}

#supplyView .supply-toolbar select,
#supplyView .supply-toolbar .search-box {
  height: 38px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

#supplyView .supply-toolbar select {
  min-width: 180px;
  padding: 0 12px;
}

#supplyView .supply-toolbar .search-box {
  width: min(460px, 42vw);
  min-width: 360px;
}

#supplyView .supply-toolbar .search-box input {
  height: 36px;
}

#supplyView .supply-hint {
  margin-left: 4px;
  color: #64748b;
}

#supplyView .supply-table-wrap {
  overflow: auto;
  border-color: #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  scrollbar-color: #cbd5e1 #f8fafc;
  scrollbar-width: thin;
}

#supplyView .supply-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

#supplyView .supply-table-wrap::-webkit-scrollbar-track {
  background: #f8fafc;
}

#supplyView .supply-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

#supplyView .supply-table {
  min-width: 1420px;
  table-layout: fixed;
}

#supplyView .supply-table th,
#supplyView .supply-table td {
  border-bottom-color: #eef2f7;
}

#supplyView .supply-table th {
  height: 46px;
  padding: 0 12px;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
  vertical-align: middle;
}

#supplyView .supply-table td {
  height: 82px;
  padding: 12px;
  color: #334155;
  background: #ffffff;
}

#supplyView .supply-table tbody tr {
  position: relative;
}

#supplyView .supply-table tbody tr:hover td {
  background: #f8fafc;
}

#supplyView .supply-table tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 #2563eb, 4px 0 12px rgba(15, 23, 42, 0.04);
}

#supplyView .supply-table th:nth-child(1),
#supplyView .supply-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 380px;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.04);
}

#supplyView .supply-table thead th:nth-child(1) {
  z-index: 8;
}

#supplyView .supply-table th:nth-child(2),
#supplyView .supply-table td:nth-child(2) {
  width: 130px;
}

#supplyView .supply-table th:nth-child(3),
#supplyView .supply-table td:nth-child(3),
#supplyView .supply-table th:nth-child(4),
#supplyView .supply-table td:nth-child(4),
#supplyView .supply-table th:nth-child(5),
#supplyView .supply-table td:nth-child(5),
#supplyView .supply-table th:nth-child(6),
#supplyView .supply-table td:nth-child(6) {
  width: 112px;
}

#supplyView .supply-table th:nth-child(7),
#supplyView .supply-table td:nth-child(7) {
  width: 300px;
}

#supplyView .supply-table th:nth-child(8),
#supplyView .supply-table td:nth-child(8) {
  width: 98px;
}

#supplyView .supply-table th:nth-child(9),
#supplyView .supply-table td:nth-child(9) {
  position: sticky;
  right: 0;
  z-index: 5;
  width: 104px;
  box-shadow: -4px 0 12px rgba(15, 23, 42, 0.04);
}

#supplyView .supply-table thead th:nth-child(9) {
  z-index: 8;
}

#supplyView .supply-product-cell {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
}

#supplyView .supply-product-cell img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f8fafc;
  border-color: #e2e8f0;
  border-radius: 8px;
}

#supplyView .supply-product-cell strong {
  color: #0f172a;
  font-weight: 600;
  line-height: 1.38;
  -webkit-line-clamp: 2;
}

#supplyView .supply-product-title-link {
  display: -webkit-box;
  max-width: 300px;
  overflow: hidden;
  color: #2563eb;
  font-weight: 600;
  line-height: 1.38;
  text-decoration: none;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#supplyView .supply-product-title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

#supplyView .supply-product-cell span {
  max-width: 300px;
  color: #64748b;
  font-size: 12px;
}

#supplyView .supply-product-cell small,
#supplyView .price-delta {
  color: #64748b;
  font-size: 12px;
}

#supplyView td strong {
  color: #0f172a;
  font-weight: 600;
}

#supplyView td:nth-child(4) .price-delta {
  color: #16a34a;
}

#supplyView .supply-match-component {
  display: grid;
  gap: 8px;
  min-width: 0;
}

#supplyView .supply-match-box.wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
}

#supplyView .supply-match-box.wide input {
  width: 100%;
  height: 32px;
  min-width: 0;
  padding: 0 10px;
  border-color: #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
}

#supplyView .supply-match-box.wide input:hover {
  border-color: #94a3b8;
}

#supplyView .supply-match-box.wide input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#supplyView .supply-match-button {
  height: 32px;
  padding: 0;
  color: #ffffff;
  background: #2563eb;
  border: 0;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

#supplyView .supply-match-button:hover {
  background: #1d4ed8;
}

#supplyView .matched-sku-list {
  gap: 6px;
  max-width: 100%;
  margin-top: 0;
}

#supplyView .matched-sku-chip {
  max-width: 100%;
  padding: 4px 8px;
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
  border-radius: 999px;
}

#supplyView .matched-sku-chip strong {
  max-width: 112px;
  color: #1d4ed8;
  font-weight: 600;
}

#supplyView .matched-sku-chip small {
  max-width: 70px;
  color: #64748b;
}

#supplyView .matched-sku-chip button {
  width: 18px;
  height: 18px;
  color: #64748b;
  background: #ffffff;
  border-color: #bfdbfe;
}

#supplyView .matched-sku-chip button:hover {
  color: #ef4444;
  border-color: #fecaca;
}

#supplyView .matched-empty {
  display: inline-flex;
  width: max-content;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
}

#supplyView .supply-status-cell {
  display: grid;
  gap: 4px;
  align-content: center;
}

#supplyView .status-pill {
  display: inline-flex;
  width: max-content;
  min-width: 62px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

#supplyView .status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

#supplyView .status-pill.ok {
  color: #16a34a;
  background: #dcfce7;
}

#supplyView .status-pill.warn {
  color: #d97706;
  background: #fef3c7;
}

#supplyView .status-pill.danger {
  color: #dc2626;
  background: #fee2e2;
}

#supplyView .status-pill.neutral {
  color: #64748b;
  background: #f1f5f9;
}

#supplyView .row-actions {
  justify-content: center;
}

#supplyView .supply-sync-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 30px;
  padding: 0 8px;
  color: #2563eb;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 600;
}

#supplyView .supply-sync-link:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.giga-store-form {
  max-width: none;
}

.giga-store-form label {
  display: grid;
  gap: 8px;
}

.store-bind-form .giga-platform-logo {
  color: #f47c2f;
  letter-spacing: 0;
}

.store-bind-form .giga-platform-logo::before,
.store-bind-form .giga-platform-logo::after {
  display: none;
}

.sync-card,
.integration-card,
.log-item {
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.integration-form,
.form-section,
.form-grid {
  display: grid;
  gap: 14px;
}

.form-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.integration-form label,
.modal-content label,
.cdiscount-fields label,
.generic-store-fields label {
  display: grid;
  gap: 7px;
  color: #687384;
  font-size: 12px;
  font-weight: 800;
}

.integration-form input,
.integration-form select,
.modal-content input,
.modal-content select {
  min-height: 36px;
  padding: 0 10px;
}

.integration-status {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.automation-panel {
  display: grid;
  gap: 14px;
  margin-top: 14px;
  padding: 14px;
  background: #fbfcfe;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-head {
  margin-bottom: 0;
}

.compact-head h3 {
  margin: 0;
  color: #111827;
  font-size: 15px;
}

.compact-head p,
.automation-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.automation-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.automation-grid label {
  display: grid;
  gap: 7px;
  color: #4d5562;
  font-size: 12px;
  font-weight: 800;
}

.automation-grid label:has(input[type="checkbox"]) {
  grid-template-columns: auto 1fr;
  align-items: center;
}

.automation-grid input[type="checkbox"] {
  accent-color: var(--orange);
}

.automation-grid input[type="number"] {
  height: 36px;
  padding: 0 10px;
}

.modal {
  width: min(560px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 8px;
  box-shadow: 0 18px 50px rgba(21, 27, 36, 0.22);
}

.modal::backdrop {
  background: rgba(21, 27, 36, 0.28);
}

.modal-content {
  display: grid;
  gap: 14px;
  padding: 22px;
}

.modal-card {
  position: relative;
  display: grid;
  gap: 14px;
  width: 100%;
  padding: 22px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.16);
}

.modal-heading {
  min-height: 34px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.modal-heading h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 900;
}

.modal-heading button,
.modal-close {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  padding: 0;
  color: #5f6b7a;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  cursor: pointer;
}

.modal-heading button:hover,
.modal-close:hover {
  color: var(--ink);
  border-color: rgba(244, 124, 47, 0.5);
  box-shadow: 0 0 0 3px rgba(244, 124, 47, 0.08);
}

.modal-card label {
  display: grid;
  gap: 7px;
  color: #3b4654;
  font-size: 13px;
  font-weight: 800;
}

.modal-card input,
.modal-card select {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 6px;
}

.modal-card > .primary-button {
  width: 100%;
  height: 40px;
  margin-top: 4px;
  justify-content: center;
}

.store-modal {
  width: min(640px, calc(100vw - 40px));
}

.store-bind-form {
  position: relative;
  display: grid;
  gap: 16px;
  width: 100%;
  padding: 22px 26px 26px;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.store-bind-form .modal-breadcrumb {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 28px;
  color: #8a94a3;
  font-size: 12px;
  font-weight: 800;
}

.store-bind-form .breadcrumb-link {
  padding: 0;
  color: #4d5562;
  background: transparent;
  border: 0;
  font: inherit;
  cursor: pointer;
}

.store-bind-form .breadcrumb-link:hover {
  color: var(--orange);
}

.store-bind-form .bind-progress {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: start;
  gap: 18px;
  width: min(520px, 100%);
  margin: 6px auto 2px;
}

.store-bind-form .bind-step {
  display: grid;
  justify-items: center;
  gap: 8px;
  color: #687384;
  font-size: 12px;
  font-weight: 900;
}

.store-bind-form .bind-step span {
  display: grid;
  width: 32px;
  height: 32px;
  place-items: center;
  color: #ffffff;
  background: #f7c39e;
  border-radius: 50%;
}

.store-bind-form .bind-step span::before {
  content: "";
  width: 12px;
  height: 12px;
  border: 2px solid currentColor;
  border-radius: 3px;
  opacity: 0.9;
}

.store-bind-form .bind-step.active {
  color: #111827;
}

.store-bind-form .bind-step.active span {
  background: var(--orange);
}

.store-bind-form .bind-line {
  height: 2px;
  margin-top: 15px;
  background: #f1bf9a;
}

.store-bind-form .bind-title {
  display: grid;
  gap: 8px;
  margin-top: 10px;
  text-align: center;
}

.store-bind-form .bind-title h2 {
  margin: 0;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
}

.store-bind-form .bind-title p {
  margin: 0;
  color: #7a8493;
  font-size: 12px;
}

.store-bind-form .bind-platform-icons {
  display: grid;
  grid-template-columns: 74px 78px 74px;
  align-items: center;
  justify-content: center;
  margin: 10px 0 2px;
}

.store-bind-form .bind-platform-icons::before {
  grid-column: 2;
  content: "";
  height: 1px;
  background: repeating-linear-gradient(90deg, #cfd6df 0 4px, transparent 4px 8px);
}

.store-bind-form .platform-logo,
.store-bind-form .bind-key-icon {
  display: grid;
  width: 68px;
  height: 68px;
  place-items: center;
  border-radius: 50%;
}

.store-bind-form .platform-logo {
  position: relative;
  grid-column: 1;
  color: #26394c;
  background: #f7f8fa;
  font-size: 12px;
  font-weight: 900;
}

.store-bind-form .platform-logo::first-letter {
  color: #ee3c22;
}

.store-bind-form .platform-logo::before,
.store-bind-form .platform-logo::after {
  position: absolute;
  left: 18px;
  right: 18px;
  height: 1px;
  content: "";
}

.store-bind-form .platform-logo::before {
  bottom: 22px;
  background: #2b83c6;
}

.store-bind-form .platform-logo::after {
  right: 26px;
  bottom: 17px;
  left: 34px;
  background: #e4342f;
}

.store-bind-form .bind-key-icon {
  grid-column: 3;
  background: #dfe9ff;
  background-image: url("./assets/key-white.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 34px 34px;
}

.store-bind-form .cdiscount-fields,
.store-bind-form .generic-store-fields {
  display: grid;
  width: min(340px, 100%);
  gap: 14px;
  margin: 0 auto;
}

.store-bind-form .cdiscount-fields label,
.store-bind-form .generic-store-fields label {
  display: grid;
  gap: 7px;
  color: #687384;
  font-size: 12px;
  font-weight: 900;
}

.store-bind-form .cdiscount-fields input,
.store-bind-form .generic-store-fields input {
  width: 100%;
  height: 36px;
  padding: 0 12px;
  color: #111827;
  background: #ffffff;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  font-weight: 700;
}

.store-bind-form .bind-submit {
  width: min(340px, 100%);
  height: 40px;
  margin: 4px auto 0;
  justify-content: center;
}

.store-bind-form .modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
}

.bind-modal {
  width: 100vw;
  max-width: none;
  height: 100vh;
  max-height: none;
  margin: 0;
  border-radius: 0;
  box-shadow: none;
}

.bind-modal::backdrop {
  background: #ffffff;
}

.bind-content {
  min-height: 100vh;
  padding: 18px 0 42px;
  overflow: auto;
}

.bind-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  height: 32px;
  padding: 0 18px;
  color: #8a94a3;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}

.bind-breadcrumb button {
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.bind-breadcrumb .breadcrumb-link {
  cursor: pointer;
}

.bind-breadcrumb .breadcrumb-link:hover {
  color: #4d5562;
}

.bind-breadcrumb strong {
  color: #4d5562;
}

.bind-steps {
  display: grid;
  grid-template-columns: auto minmax(180px, 440px) auto;
  align-items: start;
  justify-content: center;
  gap: 24px;
  width: min(760px, 70vw);
  margin: 42px auto 34px;
}

.bind-step {
  display: grid;
  justify-items: center;
  gap: 10px;
  color: #687384;
  font-size: 12px;
  font-weight: 800;
}

.bind-step span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  color: #ffffff;
  background: #f7c39e;
  border-radius: 50%;
}

.bind-step.active span {
  background: var(--orange);
}

.bind-step.active {
  color: #111827;
}

.bind-line {
  height: 2px;
  margin-top: 17px;
  background: #f1bf9a;
}

.platform-picker {
  display: none;
}

.bind-title {
  text-align: center;
}

.bind-title h3 {
  margin-bottom: 12px;
  font-size: 23px;
}

.bind-title p,
.bind-help {
  color: #7a8493;
  font-size: 12px;
}

.bind-visual {
  display: grid;
  grid-template-columns: 74px 78px 74px;
  align-items: center;
  justify-content: center;
  margin: 26px 0;
}

.brand-node,
.key-node {
  display: grid;
  width: 72px;
  height: 72px;
  place-items: center;
  background: #f7f8fa;
  border-radius: 50%;
}

.key-node {
  background: #dfe9ff;
}

.bind-dash {
  height: 1px;
  background: repeating-linear-gradient(90deg, #cfd6df 0 4px, transparent 4px 8px);
}

.cdiscount-logo {
  position: relative;
  color: #26394c;
  font-weight: 900;
  font-size: 14px;
}

.cdiscount-logo b {
  color: #ee3c22;
}

.cdiscount-logo::before,
.cdiscount-logo::after {
  position: absolute;
  left: 0;
  right: 0;
  height: 1px;
  content: "";
}

.cdiscount-logo::before {
  bottom: -7px;
  background: #2b83c6;
}

.cdiscount-logo::after {
  bottom: -11px;
  left: 50%;
  background: #e4342f;
}

.key-icon {
  display: block;
  width: 46px;
  height: 46px;
  object-fit: contain;
  border-radius: 10px;
}

.bind-help {
  margin-bottom: 22px;
  text-align: center;
  font-weight: 800;
}

.bind-help strong {
  color: var(--orange);
}

.cdiscount-fields,
.generic-store-fields {
  display: grid;
  width: 324px;
  gap: 16px;
  margin: 0 auto;
}

.cdiscount-fields input,
.generic-store-fields input {
  height: 36px;
  border-radius: 6px;
}

.bind-submit {
  width: 324px;
  height: 39px;
  margin: 22px auto 0;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 100;
  max-width: 360px;
  padding: 12px 14px;
  color: #ffffff;
  pointer-events: none;
  background: #222831;
  border-radius: 6px;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

.date-popover {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 30;
  display: none;
  width: min(320px, calc(100vw - 32px));
  max-width: 320px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.12);
}

.date-popover.active {
  display: grid !important;
  gap: 12px;
}

.date-popover label {
  display: grid;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.date-popover input {
  height: 38px;
  padding: 0 10px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

.date-popover-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.chart-loading-state,
.chart-error-state {
  display: grid;
  place-items: center;
  min-height: 190px;
  color: #64748b;
  text-align: center;
}

.chart-error-state {
  gap: 10px;
  color: #dc2626;
}

/* SaaS theme refresh */
body {
  color: var(--color-text-primary);
  background: var(--color-bg);
}

select,
input,
textarea {
  color: var(--color-text-primary);
  background: var(--color-surface);
  border-color: var(--color-border);
  border-radius: 8px;
}

select:hover,
input:hover,
textarea:hover {
  border-color: #cbd5e1;
}

select:focus,
input:focus,
textarea:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.14);
}

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--color-primary);
}

.platform-header {
  background: rgba(255, 255, 255, 0.96);
  border-bottom-color: var(--color-border);
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

.module-tab,
.soft-button {
  color: #475569;
  background: #f1f5f9;
  border-color: transparent;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.module-tab:hover,
.soft-button:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.module-tab.active {
  color: #ffffff;
  background: var(--color-primary);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.small-warm-button {
  color: #92400e;
  background: var(--color-accent-light);
  border-color: #fde68a;
}

.small-warm-button:hover {
  color: #ffffff;
  background: var(--color-accent);
}

.sidebar {
  background: var(--color-surface);
  border-right-color: var(--color-border);
  box-shadow: 4px 0 24px rgba(15, 23, 42, 0.025);
}

.side-nav {
  gap: 8px;
}

.nav-item {
  min-height: 34px;
  color: #475569;
  border-radius: 8px;
  transition: color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.nav-item:not(.active):hover {
  color: var(--color-primary);
  background: var(--color-sidebar-active-bg);
}

.nav-item.active {
  color: #ffffff;
  background: var(--color-sidebar-active);
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.main {
  background: var(--color-bg);
}

.surface,
.chart-panel,
.full-table-page,
.rule-card,
.store-bind-shell,
.modal-content,
.modal-card,
.sync-card,
.integration-card,
.log-item,
.detail-metric {
  background: var(--color-surface);
  border-color: var(--color-border);
  border-radius: 12px;
  box-shadow: var(--shadow);
}

.surface:hover,
.metric-card:hover,
.rule-card:hover {
  box-shadow: var(--shadow-hover);
}

.overview-shell {
  background: linear-gradient(90deg, #ffffff 0 58%, #f8fafc 100%);
}

.primary-button,
.bind-submit {
  color: #ffffff;
  background: var(--color-primary);
  border-color: var(--color-primary);
  border-radius: 9px;
  transition: background-color 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.primary-button:hover,
.bind-submit:hover {
  background: var(--color-primary-hover);
  border-color: var(--color-primary-hover);
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.2);
}

.secondary-button,
.ghost-button,
.filter-button,
.icon-button {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
  border-radius: 9px;
  transition: color 0.16s ease, background-color 0.16s ease, border-color 0.16s ease;
}

.secondary-button:hover,
.ghost-button:hover,
.filter-button:hover,
.icon-button:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-color: #bfdbfe;
}

.small-orange-button,
.auth-bind-button {
  color: #ffffff;
  background: var(--color-accent);
  border-color: var(--color-accent);
  border-radius: 9px;
}

.small-orange-button:hover,
.auth-bind-button:hover {
  background: var(--color-accent-hover);
}

.auth-info-button {
  color: #ffffff;
  background: #1e293b;
  border-radius: 999px;
}

.auth-info-button:hover {
  background: var(--color-primary);
}

.metric-card {
  border: 1px solid var(--color-border-soft);
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.metric-card strong {
  color: var(--color-text-primary);
  letter-spacing: 0;
}

.metric-label {
  color: #334155;
}

.metric-card small {
  color: var(--color-text-secondary);
}

.metric-orange {
  background: #fff7ed;
}

.metric-blue {
  background: var(--color-primary-soft);
}

.metric-green {
  background: #f0fdf4;
}

.metric-gray {
  background: #f8fafc;
}

.dashboard-toolbar {
  border-radius: 12px;
}

.dashboard-toolbar-summary strong {
  color: var(--color-text-primary);
}

.dashboard-toolbar-summary span {
  color: var(--color-text-secondary);
}

.mini-tabs button,
.panel-tabs button {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid transparent;
  border-radius: 7px;
}

.mini-tabs button:hover,
.panel-tabs button:hover {
  color: var(--color-primary);
  background: var(--color-primary-soft);
}

.mini-tabs button.active,
.panel-tabs button.active {
  color: var(--color-primary);
  background: var(--color-primary-soft);
  border-color: #bfdbfe;
  box-shadow: none;
}

.product-table-wrap,
.supply-table-wrap,
.store-table-wrap {
  border-color: var(--color-border);
  border-radius: 12px;
  background: #ffffff;
}

th {
  color: #475569;
  background: var(--color-surface-soft);
  border-bottom-color: var(--color-border);
}

td {
  color: #334155;
  border-bottom-color: var(--color-border);
}

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:hover {
  background: #f8fafc;
}

td strong,
.product-ref-main,
.product-title,
.priority-title,
.supply-product-cell strong {
  color: var(--color-text-primary);
}

.product-ref-sub,
.tiny-muted,
.price-delta,
.priority-meta,
.supply-product-cell small,
.supply-hint {
  color: var(--color-text-secondary);
}

.product-thumb {
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 8px;
}

.table-inline-select {
  border-color: var(--color-border);
  border-radius: 8px;
}

.action-link {
  color: var(--color-primary);
}

.action-link:hover,
.dashboard-event-item:hover .priority-title,
.breadcrumb-line button:hover,
.table-sort.active,
.product-table thead button[data-product-sort]:hover,
.product-table thead button[data-product-sort].active {
  color: var(--color-primary-hover);
}

.danger-link {
  color: var(--color-danger-hover);
}

.score-pill {
  color: #b45309;
  background: var(--color-accent-light);
}

.status-pill.ok {
  color: var(--color-success-text);
  background: var(--color-success-light);
}

.status-pill.warn {
  color: #d97706;
  background: var(--color-accent-light);
}

.status-pill.danger {
  color: var(--color-danger-hover);
  background: var(--color-danger-light);
}

.status-pill.neutral {
  color: var(--color-text-secondary);
  background: var(--color-surface-soft);
}

.state-dot {
  color: #475569;
}

.state-dot::before {
  background: var(--color-danger);
  box-shadow: 0 0 0 4px var(--color-danger-light);
}

.state-dot.ok::before {
  background: var(--color-success);
  box-shadow: 0 0 0 4px var(--color-success-light);
}

.trend-chart {
  color: var(--color-text-secondary);
}

.bar-value,
.trend-chart .bar-value {
  background: var(--color-primary);
}

.trend-bar:nth-child(2n) .bar-value {
  background: var(--color-primary);
}

.status-columns .won,
.status-bars .won,
.status-bars i.ok {
  background: var(--color-success);
}

.status-columns .lost,
.status-bars .lost,
.status-bars i.danger {
  background: var(--color-danger);
}

.donut {
  filter: saturate(0.92);
}

.rule-card.active,
.rule-step-store-card.selected,
.selected-store-card {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.wizard-step.active span,
.wizard-step.done span {
  background: var(--color-primary);
}

.wizard-line {
  background: #bfdbfe;
}

.rule-stats span,
.matched-sku-chip,
.rule-summary-grid article,
.rule-health div {
  background: #f8fafc;
  border-color: var(--color-border);
}

.toast {
  background: #0f172a;
  border-radius: 10px;
  box-shadow: 0 16px 42px rgba(15, 23, 42, 0.18);
}

/* SaaS theme refinement v66 */
.platform-header {
  box-shadow: 0 2px 14px rgba(15, 23, 42, 0.035);
}

.module-tab,
.soft-button {
  color: #475569;
  background: #f8fafc;
  border-color: #eef2f7;
  box-shadow: none;
}

.module-tab:hover,
.soft-button:hover {
  color: var(--color-primary);
  background: #eff6ff;
  border-color: #dbeafe;
}

.module-tab.active {
  color: var(--color-primary-hover);
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: inset 0 -2px 0 var(--color-primary);
}

.sidebar {
  box-shadow: 3px 0 18px rgba(15, 23, 42, 0.018);
}

.nav-item {
  position: relative;
  min-height: 34px;
  color: #475569;
  font-weight: 700;
  box-shadow: none;
}

.nav-item::before {
  position: absolute;
  top: 8px;
  bottom: 8px;
  left: 0;
  width: 3px;
  content: "";
  background: transparent;
  border-radius: 999px;
}

.nav-item.active {
  color: var(--color-primary);
  background: #eff6ff;
  box-shadow: none;
}

.nav-item.active::before {
  background: var(--color-primary);
}

.nav-item:not(.active):hover {
  color: var(--color-primary);
  background: #f8fbff;
}

.surface,
.chart-panel,
.full-table-page,
.rule-card,
.store-bind-shell,
.modal-content,
.modal-card,
.sync-card,
.integration-card,
.log-item,
.detail-metric,
.metric-card {
  border-color: var(--color-border);
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

.surface:hover,
.metric-card:hover,
.rule-card:hover {
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.055);
}

.metric-card {
  position: relative;
  overflow: hidden;
  background: var(--color-surface);
  border: 1px solid var(--color-border-soft);
}

.metric-card::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 3px;
  content: "";
  background: transparent;
}

.metric-orange {
  background: #fffdf9;
}

.metric-orange::before {
  background: rgba(245, 158, 11, 0.72);
}

.metric-blue {
  background: #f8fbff;
}

.metric-blue::before {
  background: rgba(37, 99, 235, 0.58);
}

.metric-green {
  background: #fbfefc;
}

.metric-green::before {
  background: rgba(34, 197, 94, 0.62);
}

.metric-gray {
  background: #ffffff;
}

.metric-gray::before {
  background: rgba(100, 116, 139, 0.28);
}

.metric-card strong {
  color: #0f172a;
  font-weight: 800;
}

.metric-label {
  color: #1e293b;
  font-weight: 700;
}

.metric-card small {
  color: #64748b;
}

.dashboard-opponent-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  margin-left: 2px;
  padding: 0 7px;
  border: 1px solid #fed7aa;
  border-radius: 999px;
  background: #fff7ed;
  color: #ea580c;
  font: inherit;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.dashboard-opponent-count:hover {
  border-color: #fb923c;
  background: #ffedd5;
  color: #c2410c;
}

.dashboard-competitor-dialog {
  width: min(440px, calc(100vw - 32px));
  padding: 0;
  border: 0;
  border-radius: 16px;
  background: transparent;
  box-shadow: 0 24px 70px rgba(15, 23, 42, 0.16);
}

.dashboard-competitor-dialog::backdrop {
  background: rgba(15, 23, 42, 0.34);
}

.dashboard-competitor-card {
  padding: 20px;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
}

.dashboard-competitor-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.dashboard-competitor-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.dashboard-competitor-head p {
  margin: 5px 0 0;
  color: #64748b;
  font-size: 12px;
}

.dashboard-competitor-list {
  display: grid;
  gap: 8px;
  max-height: 360px;
  overflow: auto;
}

.dashboard-competitor-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid #e5eaf3;
  border-radius: 10px;
  background: #f8fafc;
}

.dashboard-competitor-row strong {
  min-width: 0;
  overflow: hidden;
  color: #0f172a;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-competitor-empty {
  flex: 0 0 auto;
  color: #64748b;
  font-size: 12px;
}

.dashboard-competitor-product-link {
  flex: 0 0 auto;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.dashboard-competitor-product-link:hover {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

.dashboard-competitor-empty {
  padding: 18px 12px;
  text-align: center;
}

.dashboard-toolbar,
.filter-bar,
.store-filter-bar,
.supply-toolbar,
.product-filter-bar {
  background: var(--color-surface);
  border-color: var(--color-border);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.025);
}

.todo-card strong {
  color: #f97316;
  font-weight: 800;
}

.todo-card .action-link {
  color: #ea580c;
}

.todo-card .action-link:hover {
  color: var(--color-primary);
}

.priority-item {
  border-bottom-color: var(--color-border-soft);
}

.dashboard-event-item {
  border-radius: 8px;
  transition: background-color 0.16s ease;
}

.dashboard-event-item:hover {
  background: #f8fafc;
}

.dashboard-event-item:hover .priority-title {
  color: var(--color-primary-hover);
}

.priority-title {
  color: #1e293b;
  font-weight: 600;
}

.priority-meta {
  color: #64748b;
}

.priority-meta span:first-child,
.priority-meta span:nth-child(2) {
  color: #94a3b8;
}

.score-pill {
  color: #b45309;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.trend-chart {
  color: #64748b;
}

.bar-stack {
  background: #dbeafe;
}

.bar-value,
.trend-chart .bar-value,
.trend-bar:nth-child(2n) .bar-value,
.revenue-bar .bar-value {
  background: var(--color-primary);
}

.trend-bar:hover .bar-value {
  background: var(--color-primary-hover);
}

.trend-label,
.revenue-bar small {
  color: #64748b;
}

.revenue-bar strong {
  color: #0f172a;
  font-weight: 700;
}

.status-grid-lines {
  background: repeating-linear-gradient(
    to bottom,
    #e2e8f0 0,
    #e2e8f0 1px,
    transparent 1px,
    transparent 29.6px
  );
  border-bottom-color: #cbd5e1;
}

.status-axis,
.status-day {
  color: #64748b;
}

.status-columns .lost,
.status-legend .lost {
  background: var(--color-danger);
}

.status-columns .won,
.status-legend .won {
  background: var(--color-success);
}

.gap-track .warn {
  background: var(--color-accent);
}

.gap-track .danger {
  background: var(--color-danger);
}

.gap-track .ok {
  background: var(--color-success);
}

th {
  color: #475569;
  background: #f1f5f9;
  border-bottom-color: var(--color-border);
  font-weight: 700;
}

td {
  color: #334155;
  border-bottom-color: var(--color-border-soft);
}

tbody tr:hover {
  background: #f8fafc;
}

.table-inline-select,
select,
input,
textarea {
  border-radius: 8px;
}

.status-pill.warn {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.status-pill.ok {
  color: #15803d;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
}

.status-pill.danger {
  color: #b91c1c;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.status-pill.neutral {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

/* SaaS final polish v68 */
.nav-item.active {
  color: #1d4ed8;
  background: #eff6ff;
  font-weight: 600;
  box-shadow: none;
}

.nav-item.active::before {
  background: #2563eb;
}

.nav-item:hover {
  color: #1d4ed8;
  background: #f8fbff;
}

.metric-gray {
  background: #fff;
}

.metric-gray::before {
  background: #2563eb;
}

.todo-card .action-link {
  color: #2563eb;
  font-weight: 600;
}

.todo-card .action-link:hover {
  color: #1d4ed8;
}

.live-events .score-pill {
  color: #ea580c;
  background: #fff7ed;
  border: 1px solid #fed7aa;
}

.bar-stack {
  background: #dbeafe;
}

.bar-value,
.trend-chart .bar-value,
.trend-bar:nth-child(2n) .bar-value,
.revenue-bar .bar-value {
  background: #2563eb;
}

.trend-bar:hover .bar-value,
.revenue-bar:hover .bar-value {
  background: #1d4ed8;
}

.mini-trend i {
  background: #2563eb;
}

.mini-trend i.empty {
  background: #dbeafe;
}

/* Dashboard visual refinement v69 */
.dashboard-gap-panel .gap-summary {
  width: 100%;
  gap: 12px;
  align-content: center;
  min-height: 190px;
}

.dashboard-gap-panel .gap-row {
  grid-template-columns: 120px minmax(0, 1fr) 76px;
  gap: 14px;
  padding: 7px 8px;
  color: #475569;
  border-radius: 10px;
  transition: background 0.15s ease, color 0.15s ease;
}

.dashboard-gap-panel .gap-row:hover {
  background: #f8fafc;
}

.dashboard-gap-panel .gap-row:hover span,
.dashboard-gap-panel .gap-row:hover strong {
  color: #1d4ed8;
}

.dashboard-gap-panel .gap-row.is-zero {
  opacity: 0.52;
}

.dashboard-gap-panel .gap-label {
  overflow: hidden;
  color: #475569;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 600;
}

.dashboard-gap-panel .gap-track {
  height: 10px;
  background: #eef2f7;
  border-radius: 999px;
}

.dashboard-gap-panel .gap-track i {
  border-radius: 999px;
}

.dashboard-gap-panel .gap-track .ok {
  background: #22c55e;
}

.dashboard-gap-panel .gap-track .warn {
  background: #f59e0b;
}

.dashboard-gap-panel .gap-track .danger {
  background: #ef4444;
}

.dashboard-gap-panel .gap-track .neutral {
  background: #94a3b8;
}

.dashboard-gap-panel .gap-row strong {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: baseline;
  justify-content: end;
  gap: 6px;
  color: #334155;
  text-align: right;
  font-size: 12px;
  font-weight: 700;
}

.dashboard-gap-panel .gap-row b {
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
}

.dashboard-gap-panel .gap-row em {
  color: #94a3b8;
  font-style: normal;
  font-weight: 600;
}

.dashboard-status-panel .status-bars {
  min-height: 206px;
}

.status-donut-card {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
  min-height: 206px;
  padding: 8px 10px 4px;
}

.status-donut {
  display: grid;
  width: 156px;
  height: 156px;
  place-items: center;
  border-radius: 50%;
  background: conic-gradient(#22c55e 0 var(--owned-rate), #e2e8f0 var(--owned-rate) 100%);
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.status-donut-core {
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  align-content: center;
  gap: 2px;
  color: #64748b;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.status-donut-core strong {
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.status-donut-core span {
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

.status-donut-detail {
  display: grid;
  gap: 12px;
}

.status-donut-detail div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #eef2f7;
}

.status-donut-detail span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
  font-size: 13px;
  font-weight: 600;
}

.status-donut-detail i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.status-donut-detail .won {
  background: #22c55e;
}

.status-donut-detail .lost {
  background: #cbd5e1;
}

.status-donut-detail .total {
  background: #2563eb;
}

.status-donut-detail strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.status-donut-detail small {
  justify-self: start;
  padding: 4px 9px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.status-donut-detail small.positive {
  color: #15803d;
  background: #f0fdf4;
  border-color: #bbf7d0;
}

.status-donut-detail small.negative {
  color: #b45309;
  background: #fffbeb;
  border-color: #fde68a;
}

/* Dashboard final alignment v70 */
.dashboard-gap-panel .gap-row {
  grid-template-columns: 120px minmax(0, 1fr) 92px;
}

.dashboard-gap-panel .gap-row strong {
  grid-template-columns: 38px 46px;
  gap: 8px;
  justify-content: end;
  font-variant-numeric: tabular-nums;
}

.dashboard-gap-panel .gap-row b,
.dashboard-gap-panel .gap-row em {
  display: block;
  text-align: right;
}

.status-donut-card {
  grid-template-columns: 154px minmax(0, 1fr);
  gap: 34px;
  padding: 12px 18px 6px 10px;
}

.status-donut {
  width: 144px;
  height: 144px;
}

.status-donut-core {
  width: 96px;
  height: 96px;
}

.status-donut-core strong {
  font-size: 26px;
}

.status-donut-detail {
  gap: 14px;
  padding-right: 4px;
}

.status-donut-detail div {
  grid-template-columns: 112px 64px;
  justify-content: start;
}

.status-donut-detail strong {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* Dashboard color semantics v71 */
.live-events .score-pill {
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  font-weight: 700;
}

.todo-card strong.is-zero {
  color: #94a3b8;
  font-weight: 700;
}

/* Store binding modal polish v72 */
dialog.store-bind-modal {
  width: min(480px, calc(100vw - 32px));
  max-width: 480px;
  padding: 0;
  overflow: visible;
  background: transparent;
  border: 0;
  border-radius: 16px;
  box-shadow: none;
}

dialog.store-bind-modal::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.store-bind-form {
  gap: 18px;
  width: min(480px, 100%);
  padding: 26px 34px 30px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.store-bind-form .modal-breadcrumb {
  color: #64748b;
  font-weight: 700;
}

.store-bind-form .breadcrumb-link {
  color: #334155;
}

.store-bind-form .breadcrumb-link:hover {
  color: #2563eb;
}

.store-bind-form .bind-progress {
  grid-template-columns: auto minmax(150px, 1fr) auto;
  width: min(420px, 100%);
  gap: 16px;
  margin: 8px auto 2px;
}

.store-bind-form .bind-step {
  color: #94a3b8;
  font-weight: 700;
}

.store-bind-form .bind-step span {
  width: 34px;
  height: 34px;
  color: #94a3b8;
  background: #f1f5f9;
}

.store-bind-form .bind-step:first-child {
  color: #1d4ed8;
}

.store-bind-form .bind-step:first-child span {
  color: #2563eb;
  background: #dbeafe;
}

.store-bind-form .bind-step.active {
  color: #1e293b;
}

.store-bind-form .bind-step.active span {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.store-bind-form .bind-line {
  height: 2px;
  margin-top: 16px;
  background: linear-gradient(90deg, #bfdbfe 0%, #2563eb 100%);
  border-radius: 999px;
}

.store-bind-form .bind-title {
  gap: 7px;
  margin-top: 8px;
}

.store-bind-form .bind-title h2 {
  color: #0f172a;
  font-size: 22px;
  font-weight: 800;
}

.store-bind-form .bind-title p {
  color: #64748b;
  font-size: 13px;
}

.store-bind-form .bind-platform-icons {
  grid-template-columns: 76px 82px 76px;
  margin: 8px 0 0;
}

.store-bind-form .bind-platform-icons::before {
  background: repeating-linear-gradient(90deg, #cbd5e1 0 4px, transparent 4px 8px);
}

.store-bind-form .platform-logo,
.store-bind-form .bind-key-icon {
  width: 68px;
  height: 68px;
}

.store-bind-form .platform-logo {
  color: #1e293b;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}

.store-bind-form .bind-key-icon {
  background-color: #eff6ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='36' height='36' viewBox='0 0 36 36' fill='none'%3E%3Cpath d='M22.8 3.8L8.4 19.3H16.5L13.2 32.2L27.9 16.3H19.7L22.8 3.8Z' fill='%23EF2B2D'/%3E%3Cpath d='M22.8 3.8L8.4 19.3H16.5L13.2 32.2L27.9 16.3H19.7L22.8 3.8Z' stroke='%23DC2626' stroke-width='1.6' stroke-linejoin='round'/%3E%3Cpath d='M18.3 8.9L11.5 16.3H18.1L16.4 23.2L23.2 15.4H16.8L18.3 8.9Z' fill='%23FF5A5F' fill-opacity='0.55'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 36px 36px;
  border: 1px solid #dbeafe;
}

.store-bind-form .cdiscount-fields,
.store-bind-form .generic-store-fields {
  width: min(380px, 100%);
  gap: 14px;
}

.store-bind-form .cdiscount-fields label,
.store-bind-form .generic-store-fields label {
  color: #475569;
  font-weight: 700;
}

.store-bind-form .cdiscount-fields input,
.store-bind-form .generic-store-fields input {
  height: 42px;
  padding: 0 13px;
  border-color: #cbd5e1;
  border-radius: 9px;
  font-weight: 650;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.store-bind-form .cdiscount-fields input:hover,
.store-bind-form .generic-store-fields input:hover {
  border-color: #94a3b8;
}

.store-bind-form .cdiscount-fields input:focus,
.store-bind-form .generic-store-fields input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.store-bind-form .bind-submit {
  width: min(380px, 100%);
  height: 46px;
  margin-top: 2px;
  background: #2563eb;
  border-color: #2563eb;
  border-radius: 10px;
}

.store-bind-form .bind-submit:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
  box-shadow: 0 10px 22px rgba(37, 99, 235, 0.22);
}

.store-bind-form .modal-close {
  top: 18px;
  right: 18px;
  width: 32px;
  height: 32px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  box-shadow: none;
}

.store-bind-form .modal-close:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
  box-shadow: none;
}

/* Product table refinement v75 */
#productsView .full-table-page {
  background: #ffffff;
  border-color: #e2e8f0;
}

#productsView .table-page-head {
  align-items: center;
  margin-bottom: 16px;
}

#productsView .table-page-head > div {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

#productsView .product-bulk-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

#productsView .bulk-rule-select {
  width: 178px;
  height: 36px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
  font-size: 12px;
  padding: 0 30px 0 10px;
}

#productsView .bulk-rule-select:hover,
#productsView .bulk-rule-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productsView .bulk-rule-button {
  height: 36px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  white-space: nowrap;
}

#bulkToggleAuto {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
}

#productsView .product-toolbar {
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}

#productsView .product-toolbar > .secondary-button,
#productSearchButton {
  min-height: 36px;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
}

#productsView .product-toolbar select,
#productsView .product-toolbar input,
#productsView .product-toolbar .inline-search {
  height: 36px;
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
  border-radius: 8px;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#productsView .product-toolbar select {
  line-height: 36px;
}

#productsView .product-toolbar .inline-search {
  display: inline-flex;
  align-items: center;
}

#productsView .product-toolbar .inline-search input {
  height: 34px;
  min-height: 0;
  border: 0;
  box-shadow: none;
}

#productsView .product-toolbar select:hover,
#productsView .product-toolbar input:hover,
#productsView .product-toolbar .inline-search:hover {
  border-color: #94a3b8;
}

#productsView .product-toolbar select:focus,
#productsView .product-toolbar input:focus,
#productsView .product-toolbar .inline-search:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productSearchButton {
  color: #2563eb;
  background: #ffffff;
  border-color: #bfdbfe;
}

#productSearchButton:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

#productStoreFilter {
  min-width: 190px;
}

/* Product toolbar cleanup v80 */
#productsView .product-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

#productsView .product-toolbar select,
#productsView .product-toolbar .secondary-button,
#productsView .product-toolbar .inline-search {
  flex: 0 0 auto;
  height: 36px;
  min-height: 36px;
  border-radius: 8px;
  font-size: 12px;
  line-height: 1;
}

#productsView .product-toolbar select {
  padding: 0 34px 0 12px;
}

#productStoreFilter {
  min-width: 190px;
}

#productCommonFilter {
  min-width: 145px;
}

#productSearchScope {
  min-width: 132px;
}

#productResetButton,
#productSearchButton {
  min-width: 64px;
  padding: 0 14px;
}

#productsView .product-toolbar .inline-search {
  flex: 1 1 320px;
  min-width: 260px;
  max-width: 420px;
  padding: 0 12px;
  gap: 8px;
}

#productsView .product-toolbar .inline-search span {
  color: #94a3b8;
  line-height: 1;
}

#productsView .product-toolbar .inline-search input {
  width: 100%;
  padding: 0;
  font-size: 12px;
  line-height: 36px;
}

#productResetButton {
  color: #64748b;
  background: #ffffff;
  border-color: #cbd5e1;
}

#productResetButton:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.product-table-wrap {
  border-color: #e2e8f0;
  border-radius: 12px;
  scrollbar-color: #cbd5e1 #f8fafc;
  scrollbar-width: thin;
}

.product-table-wrap::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

.product-table-wrap::-webkit-scrollbar-track {
  background: #f8fafc;
}

.product-table-wrap::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.product-table th {
  height: 46px;
  padding: 0 12px;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-size: 12px;
  font-weight: 600;
}

.product-table td {
  position: relative;
  padding: 12px;
  color: #334155;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.product-table tbody tr {
  background: #ffffff;
}

.product-table tbody tr:hover td {
  background: #f8fafc;
}

.product-table tbody tr:hover td:first-child {
  box-shadow: inset 2px 0 0 #2563eb;
}

.product-table th:first-child,
.product-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 44px;
  min-width: 44px;
  background: inherit;
}

.product-table thead th:first-child {
  z-index: 9;
}

.product-table th:last-child,
.product-table td:last-child {
  position: sticky;
  right: 0;
  z-index: 5;
  width: 118px;
  min-width: 118px;
  text-align: right;
  background: inherit;
  box-shadow: -1px 0 0 #eef2f7;
}

.product-table thead th:last-child {
  z-index: 9;
  background: #f1f5f9;
}

.product-table thead button[data-product-sort] {
  color: #475569;
  font-weight: 600;
}

.product-table thead button[data-product-sort]:hover,
.product-table thead button[data-product-sort].active {
  color: #2563eb;
}

.product-ref-main {
  color: #2563eb;
  font-weight: 600;
}

.product-ref-sub,
.product-table .tiny-muted,
.product-table .price-delta,
.product-limit-readonly small {
  color: #64748b;
  font-weight: 500;
}

.product-table .tiny-muted {
  color: #94a3b8;
}

.product-table td strong,
.product-limit-readonly strong {
  color: #0f172a;
  font-weight: 600;
}

.product-gap {
  color: #64748b;
  font-weight: 600;
}

.product-gap.warn {
  color: #f97316;
}

.product-gap.danger {
  color: #ef4444;
}

.product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  color: #2563eb;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.product-thumb img {
  width: 100%;
  height: 100%;
  padding: 3px;
  object-fit: contain;
}

.product-title-wrap {
  color: #334155;
  font-weight: 500;
}

.product-status-mini {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

.product-status-mini::before {
  width: 6px;
  height: 6px;
  content: "";
  border-radius: 50%;
}

.product-status-mini.ok {
  color: #16a34a;
  background: #dcfce7;
}

.product-status-mini.ok::before {
  background: #22c55e;
}

.product-status-mini.warn {
  color: #ea580c;
  background: #fff7ed;
}

.product-status-mini.warn::before {
  background: #f97316;
}

.state-dot {
  font-weight: 650;
}

.state-dot.ok {
  color: #16a34a;
}

.state-dot.ok::before {
  background: #22c55e;
  box-shadow: 0 0 0 4px #dcfce7;
}

.state-dot.warn {
  color: #ea580c;
}

.state-dot.warn::before {
  background: #f97316;
  box-shadow: 0 0 0 4px #fff7ed;
}

.state-dot.neutral {
  color: #64748b;
}

.state-dot.neutral::before {
  background: #94a3b8;
  box-shadow: 0 0 0 4px #f1f5f9;
}

.action-icons {
  display: inline-flex;
  width: 100%;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}

.auto-switch {
  display: inline-flex;
  align-items: center;
  width: 34px;
  height: 20px;
  padding: 0;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.auto-switch span {
  position: relative;
  display: block;
  width: 34px;
  height: 20px;
  background: #cbd5e1;
  border-radius: 999px;
  transition: background-color 0.16s ease, box-shadow 0.16s ease;
}

.auto-switch span::after {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 14px;
  height: 14px;
  content: "";
  background: #ffffff;
  border-radius: 50%;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.22);
  transition: transform 0.16s ease;
}

.auto-switch.is-on span {
  background: #2563eb;
}

.auto-switch.is-on span::after {
  transform: translateX(14px);
}

.auto-switch:hover span {
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.auto-switch:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.product-view-link {
  color: #2563eb;
  font-weight: 700;
}

.product-view-link:hover {
  color: #1d4ed8;
}

/* Product table operational polish v79 */
.product-table tbody tr {
  height: 68px;
}

.product-table td {
  height: 68px;
}

.product-table th:nth-child(5),
.product-table td.product-title-cell {
  width: 360px;
  min-width: 360px;
  max-width: 380px;
}

.product-title-cell .product-cell {
  min-width: 0;
}

.product-title-wrap {
  display: -webkit-box;
  max-width: 300px;
  overflow: hidden;
  color: #1e293b;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.product-rule-select {
  width: 124px;
  min-width: 124px;
  height: 32px;
  color: #94a3b8;
  font-weight: 500;
}

.product-rule-select.has-value {
  color: #334155;
  font-weight: 600;
}

.product-table th:nth-child(19),
.product-table td.product-status-cell {
  width: 124px;
  min-width: 124px;
  text-align: left;
}

.product-status-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
  min-width: 92px;
}

.product-status-stack .state-dot,
.product-status-stack .product-status-mini {
  display: inline-flex;
  align-items: center;
  min-width: 88px;
  height: 22px;
  padding: 0 8px;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.product-status-stack .state-dot {
  gap: 6px;
}

.product-status-stack .state-dot::before,
.product-status-stack .product-status-mini::before {
  flex: 0 0 6px;
  width: 6px;
  height: 6px;
  box-shadow: none;
}

.product-status-stack .state-dot.ok {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.product-status-stack .state-dot.ok::before {
  background: #2563eb;
}

.product-status-stack .state-dot.neutral {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

.product-status-stack .state-dot.neutral::before {
  background: #94a3b8;
}

.product-status-stack .state-dot.warn {
  color: #ea580c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.product-status-stack .state-dot.warn::before {
  background: #f97316;
}

.product-status-stack .product-status-mini.ok {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.product-status-stack .product-status-mini.warn {
  color: #ea580c;
  background: #fff7ed;
  border-color: #fed7aa;
}

.product-table th:last-child,
.product-table td.product-action-cell {
  width: 118px;
  min-width: 118px;
  text-align: center;
}

.product-action-cell .action-icons {
  justify-content: center;
  gap: 10px;
}

.product-table thead button[data-product-sort] {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
}

.product-table thead button[data-product-sort].active {
  color: #2563eb;
}

.toast {
  bottom: 64px;
}

/* GIGA product page final scoped overrides v82 */
#supplyView .supply-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  scrollbar-color: #cbd5e1 #f8fafc;
  scrollbar-width: thin;
}

#supplyView .supply-table {
  min-width: 1420px;
  table-layout: fixed;
}

#supplyView .supply-table thead th {
  height: 46px;
  color: #475569;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
  font-weight: 600;
}

#supplyView .supply-table td {
  height: 82px;
  color: #334155;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
}

#supplyView .supply-table tbody tr:hover td {
  background: #f8fafc;
}

#supplyView .supply-table th:nth-child(1),
#supplyView .supply-table td:nth-child(1) {
  position: sticky;
  left: 0;
  z-index: 5;
  width: 380px;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.04);
}

#supplyView .supply-table thead th:nth-child(1) {
  z-index: 8;
}

#supplyView .supply-table th:nth-child(7),
#supplyView .supply-table td:nth-child(7) {
  width: 300px;
}

#supplyView .supply-table th:nth-child(9),
#supplyView .supply-table td:nth-child(9) {
  position: sticky;
  right: 0;
  z-index: 5;
  width: 104px;
  box-shadow: -4px 0 12px rgba(15, 23, 42, 0.04);
}

#supplyView .supply-table thead th:nth-child(9) {
  z-index: 8;
}

#supplyView .supply-product-cell {
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 12px;
}

#supplyView .supply-product-cell img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

#supplyView .supply-product-cell strong {
  color: #0f172a;
  font-weight: 600;
  line-height: 1.38;
}

#supplyView .supply-product-cell span,
#supplyView .supply-product-cell small,
#supplyView .price-delta {
  color: #64748b;
}

#supplyView .supply-factor-control {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: #64748b;
  font-size: 11px;
  line-height: 1;
  white-space: nowrap;
}

#supplyView .supply-factor-control input {
  width: 58px;
  height: 24px;
  padding: 0 6px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  font-size: 11px;
  line-height: 22px;
}

#supplyView .supply-factor-control input:hover,
#supplyView .supply-factor-control input:focus {
  border-color: #2563eb;
}

#supplyView .supply-factor-control input:focus {
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.12);
  outline: none;
}

#supplyView .supply-match-box.wide {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 56px;
  gap: 8px;
}

#supplyView .supply-match-box.wide input {
  width: 100%;
  height: 32px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

#supplyView .supply-match-button {
  height: 32px;
  color: #ffffff;
  background: #2563eb;
  border: 0;
  border-radius: 8px;
  font-weight: 600;
}

#supplyView .supply-match-button:hover {
  background: #1d4ed8;
}

#supplyView .matched-sku-chip {
  color: #2563eb;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
}

#supplyView .matched-sku-chip strong {
  color: #1d4ed8;
}

#supplyView .matched-empty {
  color: #64748b;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
}

#supplyView .status-pill {
  display: inline-flex;
  width: max-content;
  min-width: 62px;
  align-items: center;
  justify-content: center;
  gap: 5px;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

#supplyView .status-pill::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: currentColor;
}

#supplyView .status-pill.ok {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

#supplyView .status-pill.warn {
  color: #d97706;
  background: #fef3c7;
  border-color: #fde68a;
}

#supplyView .status-pill.danger {
  color: #dc2626;
  background: #fee2e2;
  border-color: #fecaca;
}

#supplyView .status-pill.neutral {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

#supplyView .supply-sync-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 78px;
  height: 30px;
  color: #2563eb;
  border-radius: 6px;
  font-weight: 600;
}

#supplyView .supply-sync-link:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

/* GIGA product pagination and status alignment v83 */
#supplyView .supply-pagination-row {
  position: sticky;
  bottom: 0;
  z-index: 4;
  min-height: 48px;
  padding: 10px 2px 0;
  color: #64748b;
  background: #ffffff;
  border-top: 1px solid #eef2f7;
}

#supplyView .supply-pagination-row span:first-child {
  color: #64748b;
  font-weight: 500;
}

#supplyView .supply-pagination-row select {
  height: 30px;
  padding: 0 28px 0 10px;
  color: #334155;
  border-color: #cbd5e1;
  border-radius: 8px;
  background-color: #ffffff;
}

#supplyView .supply-pagination-row button {
  min-width: 30px;
  height: 30px;
  color: #2563eb;
  background: #ffffff;
  border-color: #cbd5e1;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1;
}

#supplyView .supply-pagination-row button:hover:not(:disabled) {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #93c5fd;
}

#supplyView .supply-pagination-row button:disabled {
  color: #cbd5e1;
  background: #f8fafc;
  border-color: #e2e8f0;
}

#supplyView #supplyPageInfo {
  min-width: 52px;
  color: #334155;
  text-align: center;
}

#supplyView .supply-table th:nth-child(7),
#supplyView .supply-table td:nth-child(7) {
  width: 310px;
}

#supplyView .supply-table th:nth-child(8),
#supplyView .supply-table td:nth-child(8) {
  width: 112px;
  text-align: center;
}

#supplyView .supply-table th:nth-child(9),
#supplyView .supply-table td:nth-child(9) {
  width: 106px;
  text-align: center;
}

#supplyView .supply-match-component {
  gap: 7px;
}

#supplyView .supply-match-box.wide {
  grid-template-columns: 190px 60px;
  justify-content: start;
}

#supplyView .matched-sku-list {
  min-height: 24px;
}

#supplyView .matched-empty,
#supplyView .matched-sku-chip {
  min-height: 24px;
}

#supplyView .supply-status-cell {
  justify-items: center;
  text-align: center;
}

#supplyView .supply-status-cell .price-delta {
  max-width: 100%;
  overflow: hidden;
  color: #94a3b8;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#supplyView .supply-table td:nth-child(9) .row-actions {
  display: flex;
  justify-content: center;
}

/* GIGA product toolbar alignment v84 */
#supplyView .supply-toolbar-unified {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 18px;
  margin-bottom: 14px;
}

#supplyView .supply-filter-group,
#supplyView .supply-action-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

#supplyView .supply-filter-group {
  flex: 1 1 560px;
  min-width: 0;
}

#supplyView .supply-action-group {
  flex: 0 0 auto;
  justify-content: flex-end;
}

#supplyView .supply-toolbar-unified select {
  width: 190px;
  height: 38px;
  flex: 0 0 190px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

#supplyView .supply-toolbar-unified .search-box {
  width: min(520px, 46vw);
  min-width: 340px;
  height: 38px;
  flex: 1 1 420px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

#supplyView .supply-toolbar-unified .search-box input {
  height: 36px;
}

#supplyView .supply-action-group .primary-button,
#supplyView .supply-action-group .secondary-button {
  height: 38px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}

#supplyView .supply-action-group .secondary-button {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
}

#supplyView .supply-action-group .secondary-button:hover {
  color: #1d4ed8;
  background: #f8fafc;
  border-color: #93c5fd;
}

/* GIGA product info cleanup v85 */
#supplyView .supply-product-cell > div {
  display: grid;
  gap: 5px;
  align-content: center;
  min-width: 0;
}

#supplyView .supply-product-cell small {
  color: #64748b;
  line-height: 1.25;
}

/* Rule management card polish v86 */
#rulesView .rule-summary-grid {
  gap: 12px;
  margin-bottom: 14px;
}

#rulesView .rule-summary-grid article {
  position: relative;
  min-height: 86px;
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

#rulesView .rule-summary-grid article::before {
  position: absolute;
  inset: 14px auto 14px 0;
  width: 3px;
  content: "";
  background: #bfdbfe;
  border-radius: 999px;
}

#rulesView .rule-summary-grid article.is-warning::before {
  background: #f59e0b;
}

#rulesView .rule-summary-grid article.is-quiet::before {
  background: #cbd5e1;
}

#rulesView .rule-summary-grid span {
  color: #64748b;
  font-weight: 600;
}

#rulesView .rule-summary-grid strong {
  margin-top: 8px;
  color: #0f172a;
  font-size: 26px;
  font-weight: 800;
}

#rulesView .rule-summary-grid article.is-warning strong {
  color: #ea580c;
}

#rulesView .rule-card {
  padding: 16px 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

#rulesView .rule-card.active {
  border-color: #e2e8f0;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.035);
}

#rulesView .rule-card:hover,
#rulesView .rule-card.active:hover {
  border-color: #bfdbfe;
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.08);
  transform: translateY(-1px);
}

#rulesView .rule-card-head {
  margin-bottom: 14px;
}

#rulesView .rule-card h3 {
  color: #0f172a;
  font-size: 17px;
  font-weight: 800;
}

#rulesView .rule-name-input {
  width: min(360px, 100%);
  height: 32px;
  padding: 0 8px;
  color: #0f172a;
  font: inherit;
  font-size: 17px;
  font-weight: 800;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  outline: none;
}

#rulesView .rule-name-input:hover {
  background: #f8fafc;
  border-color: #d8e0ee;
}

#rulesView .rule-name-input:focus {
  background: #ffffff;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#rulesView .rule-card-head p {
  color: #64748b;
  font-weight: 600;
}

#rulesView .rule-condition-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

#rulesView .rule-condition-group {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 92px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
  border-radius: 12px;
}

#rulesView .rule-condition-group strong {
  color: #475569;
  font-size: 12px;
  font-weight: 800;
}

#rulesView .rule-condition-group div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

#rulesView .rule-condition-group span {
  min-height: 24px;
  padding: 4px 8px;
  color: #475569;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

#rulesView .rule-health {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

#rulesView .rule-health .rule-health-item {
  position: relative;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

#rulesView .rule-health .rule-health-item::before {
  position: absolute;
  inset: 12px auto 12px 0;
  width: 3px;
  content: "";
  background: #cbd5e1;
  border-radius: 999px;
}

#rulesView .rule-health strong {
  margin-top: 0;
  color: #0f172a;
  font-size: 24px;
  font-weight: 800;
}

#rulesView .rule-health span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  font-weight: 600;
}

#rulesView .rule-health .is-applied {
  background: #f8fbff;
}

#rulesView .rule-health .is-applied::before {
  background: #2563eb;
}

#rulesView .rule-health .is-applied strong {
  color: #2563eb;
}

#rulesView .rule-health .is-store::before {
  background: #94a3b8;
}

#rulesView .rule-health .is-attention,
#rulesView .rule-health .is-risk {
  background: #fff7ed;
  border-color: #fed7aa;
}

#rulesView .rule-health .is-attention::before,
#rulesView .rule-health .is-risk::before {
  background: #f59e0b;
}

#rulesView .rule-health .is-attention strong,
#rulesView .rule-health .is-risk strong {
  color: #ea580c;
}

#rulesView .rule-health .is-ok {
  background: #f8fafc;
}

#rulesView .rule-health .is-ok::before {
  background: #22c55e;
}

#rulesView .rule-health .is-ok strong {
  color: #16a34a;
}

#rulesView .rule-card-actions {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef2f7;
}

#rulesView .rule-card-actions .rule-action {
  min-height: 28px;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
}

#rulesView .rule-card-actions .rule-action:hover {
  background: #f8fafc;
}

#rulesView .rule-action-edit {
  color: #2563eb;
}

#rulesView .rule-action-edit:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

#rulesView .rule-action-copy {
  color: #64748b;
}

#rulesView .rule-action-copy:hover {
  color: #334155;
}

#rulesView .rule-action-toggle {
  color: #f97316;
}

#rulesView .rule-action-toggle:hover {
  color: #ea580c;
  background: #fff7ed;
}

#rulesView .rule-action-delete,
#rulesView .rule-action-delete:hover {
  color: #dc2626;
}

#rulesView .rule-action-delete:hover {
  background: #fee2e2;
}

#rulesView .edge-toggle,
#rulesView .side-handle,
#rulesView .floating-edge,
#rulesView .right-edge-handle,
#rulesView .assistant-edge-toggle {
  display: none !important;
}

/* Rule editor SaaS layout v88 */
#rulesView.wizard-mode .rule-wizard {
  padding: 18px 22px 92px;
  background: #ffffff;
}

#rulesView.wizard-mode .breadcrumb-line button:hover {
  color: #2563eb;
}

#rulesView.wizard-mode .wizard-steps {
  grid-template-columns: auto minmax(180px, 460px) auto;
  margin: 26px auto 30px;
}

#rulesView.wizard-mode .wizard-step {
  color: #94a3b8;
}

#rulesView.wizard-mode .wizard-step span {
  color: #94a3b8;
  background: #f1f5f9;
}

#rulesView.wizard-mode .wizard-step.active,
#rulesView.wizard-mode .wizard-step.done {
  color: #1d4ed8;
}

#rulesView.wizard-mode .wizard-step.active span {
  color: #ffffff;
  background: #2563eb;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.2);
}

#rulesView.wizard-mode .wizard-step.done span {
  color: #2563eb;
  background: #dbeafe;
}

#rulesView.wizard-mode .wizard-line {
  background: #bfdbfe;
}

#rulesView.wizard-mode .rule-step-config {
  max-width: 1200px;
  margin: 0 auto;
}

#rulesView.wizard-mode .rule-step-config > h2 {
  margin-bottom: 4px;
  color: #0f172a;
}

#rulesView.wizard-mode .rule-step-config > p {
  color: #64748b;
}

#rulesView.wizard-mode .rule-config-layout {
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 28px;
  max-width: 1180px;
  margin: 24px auto 0;
  align-items: start;
}

#rulesView.wizard-mode .rule-form {
  gap: 16px;
  min-width: 0;
}

#rulesView.wizard-mode .rule-form-section,
#rulesView.wizard-mode .advanced-rules.open {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#rulesView.wizard-mode .rule-section-head {
  display: grid;
  gap: 4px;
}

#rulesView.wizard-mode .rule-section-head strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

#rulesView.wizard-mode .rule-section-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

#rulesView.wizard-mode .config-card {
  display: grid;
  gap: 12px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

#rulesView.wizard-mode .wide-field {
  color: #334155;
}

#rulesView.wizard-mode .wide-field input[type="text"],
#rulesView.wizard-mode .inline-rule input[type="text"],
#rulesView.wizard-mode .inline-rule input[type="number"],
#rulesView.wizard-mode .range-field input[type="number"],
#rulesView.wizard-mode .daily-limit-field input[type="number"],
#rulesView.wizard-mode .strong-rule-settings input,
#rulesView.wizard-mode .time-range-row input {
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
}

#rulesView.wizard-mode .wide-field input:focus,
#rulesView.wizard-mode .inline-rule input:focus,
#rulesView.wizard-mode .range-field input:focus,
#rulesView.wizard-mode .strong-rule-settings input:focus,
#rulesView.wizard-mode .time-range-row input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#rulesView.wizard-mode .inline-rule {
  grid-template-columns: auto minmax(180px, 1fr) auto minmax(120px, 180px) auto;
  gap: 12px;
  margin: 0;
  color: #475569;
}

#rulesView.wizard-mode .row-index {
  color: #2563eb;
  background: #eff6ff;
}

#rulesView.wizard-mode .rule-unit-row,
#rulesView.wizard-mode .daily-unlimited,
#rulesView.wizard-mode .strong-rule-toggle,
#rulesView.wizard-mode .option-card label {
  color: #475569;
}

#rulesView.wizard-mode input[type="radio"],
#rulesView.wizard-mode input[type="checkbox"] {
  accent-color: #2563eb;
}

#rulesView.wizard-mode output {
  color: #2563eb;
}

#rulesView.wizard-mode .range-field {
  grid-template-columns: minmax(150px, 220px) minmax(120px, 180px) auto;
}

#rulesView.wizard-mode .daily-limit-field {
  grid-template-columns: minmax(150px, 220px) 120px auto;
}

#rulesView.wizard-mode .strong-rule-box {
  padding: 14px 16px;
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 12px;
}

#rulesView.wizard-mode .strong-rule-toggle {
  color: #ea580c;
}

#rulesView.wizard-mode .strong-rule-settings {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#rulesView.wizard-mode .advanced-rules {
  gap: 0;
  padding: 0;
  background: transparent;
  border-radius: 0;
}

#rulesView.wizard-mode .advanced-rule-head {
  margin-bottom: 4px;
}

#rulesView.wizard-mode .option-card {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 10px 18px;
  min-height: 50px;
  padding: 12px 14px;
  color: #64748b;
  background: #ffffff;
  border: 0;
  border-bottom: 1px solid #eef2f7;
  border-radius: 0;
}

#rulesView.wizard-mode .option-card:last-child {
  border-bottom: 0;
}

#rulesView.wizard-mode .option-card strong {
  flex: none;
  grid-column: 1;
  grid-row: 1 / -1;
  color: #0f172a;
  font-weight: 700;
}

#rulesView.wizard-mode .option-card label {
  grid-column: 2;
  min-height: 28px;
  white-space: normal;
}

#rulesView.wizard-mode .option-card label:has(input:checked) {
  color: #0f172a;
  font-weight: 600;
}

#rulesView.wizard-mode .option-card small,
#rulesView.wizard-mode .time-range-row {
  grid-column: 2;
}

#rulesView.wizard-mode .rule-preview {
  gap: 8px;
  margin-top: 0;
  padding: 14px 16px;
  color: #334155;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  line-height: 1.6;
}

#rulesView.wizard-mode .rule-preview strong {
  color: #0f172a;
}

#rulesView.wizard-mode .wizard-actions {
  position: sticky;
  bottom: 0;
  z-index: 10;
  justify-content: flex-end;
  margin: 0 -4px;
  padding: 12px 4px;
  background: rgba(255, 255, 255, 0.96);
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
  backdrop-filter: blur(10px);
}

#rulesView.wizard-mode .wizard-actions .primary-button {
  background: #2563eb;
}

#rulesView.wizard-mode .wizard-actions .primary-button:hover {
  background: #1d4ed8;
}

#rulesView.wizard-mode .advanced-toggle {
  color: #2563eb;
  border: 1px solid #bfdbfe;
}

#rulesView.wizard-mode .advanced-toggle:hover {
  background: #eff6ff;
}

#rulesView.wizard-mode .rule-market-preview {
  position: sticky;
  top: 88px;
  min-height: 360px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#rulesView.wizard-mode .rule-price-ladder div {
  padding: 14px;
  border-color: #e2e8f0;
  border-radius: 10px;
  background: #ffffff;
}

#rulesView.wizard-mode .rule-price-ladder div.active {
  border-color: #bfdbfe;
  box-shadow: inset 3px 0 0 #2563eb;
}

#rulesView.wizard-mode .rule-price-ladder strong {
  color: #0f172a;
  font-size: 16px;
}

#rulesView.wizard-mode .rule-price-ladder div:nth-child(3) strong {
  color: #2563eb;
}

#rulesView.wizard-mode .rule-price-ladder div:last-child strong {
  color: #ea580c;
}

#rulesView.wizard-mode .side-toggle,
#rulesView.wizard-mode .edge-handle,
#rulesView.wizard-mode .floating-toggle,
#rulesView.wizard-mode [class*="edge"][class*="toggle"],
#rulesView.wizard-mode [class*="right"][class*="handle"] {
  display: none !important;
}

/* Logs center v89 */
.danger-outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  color: #dc2626;
  font-weight: 700;
  background: #ffffff;
  border: 1px solid #fecaca;
  border-radius: 8px;
  cursor: pointer;
  transition:
    color 0.16s ease,
    background 0.16s ease,
    border-color 0.16s ease;
}

.danger-outline-button:hover {
  color: #b91c1c;
  background: #fee2e2;
  border-color: #fca5a5;
}

.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 0 14px;
  color: #ffffff;
  font-weight: 700;
  background: #dc2626;
  border: 1px solid #dc2626;
  border-radius: 8px;
  cursor: pointer;
  transition:
    background 0.16s ease,
    border-color 0.16s ease;
}

.danger-button:hover {
  background: #b91c1c;
  border-color: #b91c1c;
}

.confirm-dialog {
  width: min(420px, calc(100vw - 32px));
  padding: 0;
  background: transparent;
  border: 0;
}

.confirm-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.confirm-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.14);
}

.confirm-card h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.confirm-card p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.confirm-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

#logsView .logs-center-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

#logsView .logs-head {
  align-items: center;
  margin: 0;
  padding: 0 0 2px;
  border-bottom: 0;
}

#logsView .logs-toolbar,
.staff-toolbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 38px;
}

#logsView .logs-toolbar {
  margin-bottom: -2px;
}

#logsView .log-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

#logsView .log-filter-bar select,
#logsView .log-filter-bar input[type="date"],
#logsView .log-search {
  height: 38px;
  color: #334155;
  font-size: 13px;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  outline: none;
}

#logsView .log-filter-bar select {
  min-width: 132px;
  padding: 0 32px 0 12px;
}

#logsView .log-custom-date {
  display: none;
  min-width: 138px;
  padding: 0 10px;
}

#logsView .log-custom-date.visible {
  display: block;
}

#logsView .log-search {
  display: inline-flex;
  flex: 1 1 320px;
  align-items: center;
  max-width: 520px;
  min-width: 280px;
  padding: 0 12px;
}

#logsView .log-search span {
  color: #94a3b8;
}

#logsView .log-search input {
  width: 100%;
  height: 100%;
  padding: 0 0 0 8px;
  color: #334155;
  background: transparent;
  border: 0;
  outline: none;
}

#logsView .log-filter-bar select:focus,
#logsView .log-filter-bar input[type="date"]:focus,
#logsView .log-search:focus-within {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#logsView .log-filter-bar .secondary-button {
  height: 38px;
  min-height: 38px;
  border-color: #cbd5e1;
}

#logsView .log-list-center {
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

#logsView .log-row {
  position: relative;
  display: grid;
  grid-template-columns: 92px minmax(300px, 1.35fr) minmax(330px, 1fr) 150px 108px;
  gap: 14px;
  align-items: center;
  min-height: 74px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid #eef2f7;
}

#logsView .log-row:last-child {
  border-bottom: 0;
}

#logsView .log-row:hover {
  background: #f8fafc;
}

#logsView .log-row:hover::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 2px;
  content: "";
  background: #2563eb;
}

#logsView .log-row-time {
  display: grid;
  gap: 3px;
  color: #64748b;
  font-size: 12px;
  min-width: 0;
}

#logsView .log-row-time strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

#logsView .log-row-time span,
#logsView .log-row-meta,
#logsView .log-no-change {
  color: #94a3b8;
}

#logsView .log-row-main {
  display: grid;
  min-width: 0;
  gap: 4px;
}

#logsView .log-row-title {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#logsView .log-row-desc {
  overflow: hidden;
  color: #334155;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logsView .log-row-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 12px;
}

#logsView .log-row-change {
  min-width: 0;
}

#logsView .log-row-change.is-empty {
  min-height: 1px;
  color: transparent;
}

#logsView .log-metric-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  min-width: 0;
}

#logsView .log-metric-grid span {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#logsView .log-metric-grid em {
  overflow: hidden;
  color: #94a3b8;
  font-size: 11px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logsView .log-metric-grid strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logsView .log-change {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  color: #64748b;
  font-size: 12px;
}

#logsView .log-change strong {
  color: #0f172a;
  font-weight: 800;
}

#logsView .log-change i {
  color: #94a3b8;
  font-style: normal;
}

#logsView .log-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
}

#logsView .log-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  height: 22px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  border: 1px solid transparent;
  border-radius: 999px;
}

#logsView .log-tag::before {
  width: 6px;
  height: 6px;
  margin-right: 5px;
  content: "";
  background: currentColor;
  border-radius: 50%;
}

#logsView .log-tag.success,
#logsView .log-tag.winning {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

#logsView .log-tag.monitor,
#logsView .log-tag.neutral {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

#logsView .log-tag.warning,
#logsView .log-tag.up {
  color: #ea580c;
  background: #fff7ed;
  border-color: #fed7aa;
}

#logsView .log-tag.waiting {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#logsView .log-tag.strong {
  color: #c2410c;
  background: #ffedd5;
  border-color: #fdba74;
}

#logsView .log-tag.down {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#logsView .log-tag.failed {
  color: #dc2626;
  background: #fee2e2;
  border-color: #fecaca;
}

#logsView .log-row-actions {
  display: flex;
  justify-content: flex-end;
  min-width: 108px;
}

#logsView .log-row-actions .action-link {
  min-width: 80px;
  padding: 6px 8px;
  color: #2563eb;
  font-weight: 700;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

#logsView .log-row-actions .action-link:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

#logsView .log-detail-panel {
  grid-column: 2 / -1;
  margin-top: -2px;
  color: #64748b;
  font-size: 12px;
}

#logsView .log-detail-panel summary {
  width: max-content;
  color: #2563eb;
  font-weight: 700;
  cursor: pointer;
  list-style-position: inside;
}

#logsView .log-detail-panel summary:hover {
  color: #1d4ed8;
}

#logsView .log-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

#logsView .log-detail-grid div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#logsView .log-detail-grid span {
  color: #94a3b8;
}

#logsView .log-detail-grid strong {
  overflow: hidden;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#logsView .log-empty-state {
  display: grid;
  min-height: 220px;
  place-items: center;
  align-content: center;
  gap: 8px;
  text-align: center;
}

#logsView .log-empty-state strong {
  color: #0f172a;
}

#logsView .log-empty-state span {
  color: #64748b;
}

#logsView .log-pagination-row {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-content: flex-end;
  margin-top: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

#logsView .log-pagination-row span:first-child {
  margin-right: auto;
  color: #64748b;
}

#logsView .log-pagination-row select,
#logsView .log-pagination-row button {
  height: 30px;
  color: #334155;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
}

#logsView .log-pagination-row select {
  padding: 0 8px;
}

#logsView .log-pagination-row button {
  min-width: 30px;
  padding: 0 9px;
  cursor: pointer;
}

#logsView .log-pagination-row button:hover:not(:disabled) {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#logsView .log-pagination-row button:disabled {
  color: #cbd5e1;
  cursor: not-allowed;
  background: #f8fafc;
}

#logsView .side-toggle,
#logsView .edge-handle,
#logsView .floating-toggle,
#logsView [class*="edge"][class*="toggle"],
#logsView [class*="right"][class*="handle"] {
  display: none !important;
}

/* First paint loading guard v88 */
body.app-hydrating .page-heading,
body.app-hydrating .view {
  display: none !important;
}

body.app-hydrating #appBootState {
  display: grid !important;
}

.app-boot-state {
  display: grid;
  min-height: calc(100vh - 160px);
  place-items: center;
}

.app-boot-state.hidden {
  display: none;
}

.app-boot-card {
  display: grid;
  justify-items: center;
  min-width: 320px;
  max-width: 460px;
  padding: 28px 32px;
  text-align: center;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.1);
}

.app-boot-card::before {
  width: 34px;
  height: 34px;
  margin-bottom: 14px;
  content: "";
  border: 3px solid #dbeafe;
  border-top-color: #2563eb;
  border-radius: 50%;
  animation: boot-spin 0.8s linear infinite;
}

.app-boot-state.is-error .app-boot-card::before {
  border-color: #fee2e2;
  border-top-color: #ef4444;
}

.app-boot-card strong {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

.app-boot-card p {
  max-width: 360px;
  margin: 8px 0 16px;
  color: #64748b;
  line-height: 1.6;
}

body.login-screen {
  min-width: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(135deg, #f6f9ff 0%, #eef5ff 48%, #ffffff 100%);
}

html.login-route,
html.login-route body {
  width: 100%;
  min-height: 100%;
  min-width: 0;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(135deg, #f6f9ff 0%, #eef5ff 48%, #ffffff 100%);
}

body.login-screen .platform-header,
body.login-screen .app-shell,
html.login-route .platform-header,
html.login-route .app-shell {
  display: none !important;
}

body.login-screen .side-toggle,
body.login-screen .edge-handle,
body.login-screen .floating-toggle,
body.login-screen .floating-edge,
body.login-screen .right-edge-handle,
body.login-screen .assistant-edge-toggle,
body.login-screen [class*="edge"][class*="toggle"],
body.login-screen [class*="right"][class*="handle"],
html.login-route .side-toggle,
html.login-route .edge-handle,
html.login-route .floating-toggle,
html.login-route .floating-edge,
html.login-route .right-edge-handle,
html.login-route .assistant-edge-toggle,
html.login-route [class*="edge"][class*="toggle"],
html.login-route [class*="right"][class*="handle"] {
  display: none !important;
}

.login-page-shell {
  box-sizing: border-box;
  min-height: 100vh;
  min-height: 100svh;
  height: 100vh;
  height: 100svh;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 58%) minmax(440px, 42%);
  align-items: stretch;
  gap: 0;
  width: 100vw;
  max-width: none;
  margin: 0;
  padding: 0 clamp(80px, 5vw, 120px);
  overflow: hidden;
  isolation: isolate;
  background:
    radial-gradient(circle at 18% 16%, rgba(37, 99, 235, 0.14), transparent 28%),
    radial-gradient(circle at 78% 72%, rgba(96, 165, 250, 0.12), transparent 30%),
    linear-gradient(135deg, #f6f9ff 0%, #eef5ff 48%, #ffffff 100%);
}

.login-page-shell::before,
.login-page-shell::after {
  content: "";
  position: absolute;
  inset: auto;
  pointer-events: none;
}

.login-page-shell::before {
  left: 12%;
  top: 7%;
  width: 92vw;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.16), transparent);
  transform: rotate(14deg);
}

.login-page-shell::after {
  right: -16%;
  bottom: -24%;
  width: 60vw;
  height: 60vw;
  max-width: 1120px;
  max-height: 1120px;
  border: 1px solid rgba(37, 99, 235, 0.08);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.08), transparent 64%);
}

.login-page-shell.hidden {
  display: none !important;
}

.login-hero-panel,
.login-auth-card {
  position: relative;
  z-index: 1;
}

.login-hero-panel {
  position: relative;
  display: block;
  height: 100vh;
  min-height: 680px;
  padding-top: 1px;
}

.login-hero-brand {
  position: absolute;
  left: -64px;
  top: 56px;
  display: flex;
  align-items: center;
}

.login-hero-brand .brand-logo-official {
  width: 188px;
  max-width: none;
}

.login-hero-copy {
  position: absolute;
  left: 0;
  top: 18.5vh;
  display: grid;
  gap: 20px;
  max-width: 760px;
}

.login-hero-copy h1 {
  margin: 0;
  color: #1e293b;
  font-size: clamp(40px, 3.4vw, 52px);
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1.12;
}

.login-hero-copy strong {
  color: #1d4ed8;
  font-size: clamp(16px, 1.05vw, 18px);
  font-weight: 800;
  line-height: 1.6;
}

.login-hero-copy p {
  max-width: 600px;
  margin: 0;
  color: #334155;
  font-size: 15px;
  line-height: 1.9;
}

.login-visual {
  position: absolute;
  left: clamp(-22px, 1vw, 34px);
  bottom: clamp(58px, 7.2vh, 110px);
  width: min(940px, 100%);
  height: min(500px, 49vh);
  min-height: 420px;
  margin: 0;
}

.login-visual-orbit {
  position: absolute;
  left: 50%;
  top: 52%;
  width: min(760px, 96%);
  height: min(440px, 90%);
  border: 1px solid rgba(37, 99, 235, 0.16);
  border-radius: 50%;
  transform: translate(-50%, -50%) rotate(-14deg);
  animation: loginOrbitRotate 26s linear infinite;
}

.login-visual-orbit::before,
.login-visual-orbit::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: #2563eb;
  box-shadow: 0 0 26px rgba(37, 99, 235, 0.32);
}

.login-visual-orbit::before {
  right: 68px;
  top: 18px;
  width: 9px;
  height: 9px;
}

.login-visual-orbit::after {
  left: 42px;
  bottom: 34px;
  width: 7px;
  height: 7px;
}

.login-visual-grid {
  position: absolute;
  left: -150px;
  right: -130px;
  top: -92px;
  bottom: -64px;
  border: 0;
  border-radius: 0;
  background:
    linear-gradient(rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37, 99, 235, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 32% 36%, rgba(37, 99, 235, 0.1), transparent 26%),
    radial-gradient(circle at 56% 58%, rgba(147, 197, 253, 0.19), transparent 38%);
  background-size: 30px 30px, 30px 30px, 100% 100%, 100% 100%;
  box-shadow: none;
  opacity: 0.78;
  transform: none;
  mask-image: radial-gradient(ellipse at 48% 54%, #000 0%, #000 52%, transparent 78%);
}

.login-visual-grid::before,
.login-visual-grid::after {
  content: "";
  position: absolute;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(37, 99, 235, 0.34), transparent);
}

.login-visual-grid::before {
  left: 13%;
  right: 12%;
  top: 34%;
}

.login-visual-grid::after {
  left: 8%;
  right: 20%;
  bottom: 28%;
}

.login-visual-card {
  position: absolute;
  z-index: 3;
  display: grid;
  gap: 5px;
  padding: 17px 20px;
  border: 1px solid rgba(191, 219, 254, 0.92);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 20px 48px rgba(37, 99, 235, 0.16);
  backdrop-filter: blur(12px);
  animation: loginFloatCard 4.8s ease-in-out infinite;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.login-visual-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 26px 58px rgba(37, 99, 235, 0.2);
}

.login-visual-card span {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.login-visual-card b {
  color: #2563eb;
  font-size: 26px;
  font-weight: 900;
}

.login-visual-card-main {
  left: 4%;
  top: 9%;
  min-width: 188px;
}

.login-visual-card-side {
  right: 3%;
  bottom: 10%;
  min-width: 154px;
  animation-delay: -1.5s;
}

.login-visual-card-price {
  right: 7%;
  top: 7%;
  min-width: 150px;
  animation-delay: -0.8s;
}

.login-visual-card-stock {
  left: 3%;
  bottom: 11%;
  min-width: 132px;
  animation-delay: -2.2s;
}

.login-visual-flow {
  position: absolute;
  z-index: 1;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, #60a5fa, transparent);
  box-shadow: 0 0 18px rgba(96, 165, 250, 0.35);
}

.login-visual-flow-a {
  left: 18%;
  right: 18%;
  top: 49%;
}

.login-visual-flow-b {
  left: 21%;
  right: 21%;
  bottom: 38%;
  transform: rotate(-16deg);
}

.login-visual-chip {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 53%;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(147, 197, 253, 0.85);
  border-radius: 34px;
  background:
    radial-gradient(circle at 50% 48%, rgba(37, 99, 235, 0.16), transparent 36%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(219, 234, 254, 0.72));
  box-shadow: 0 28px 72px rgba(37, 99, 235, 0.18);
  transform: translate(-50%, -50%);
}

.login-visual-chip::before {
  content: "AI";
  position: absolute;
  inset: 50px;
  display: grid;
  place-items: center;
  color: #2563eb;
  font-size: 34px;
  font-weight: 900;
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.72);
}

.login-visual-chip i {
  position: absolute;
  width: 28px;
  height: 2px;
  background: rgba(37, 99, 235, 0.3);
}

.login-visual-chip i:nth-child(1) { left: -28px; top: 34px; }
.login-visual-chip i:nth-child(2) { right: -28px; top: 54px; }
.login-visual-chip i:nth-child(3) { left: -28px; bottom: 42px; }
.login-visual-chip i:nth-child(4) { right: -28px; bottom: 30px; }

@keyframes loginOrbitRotate {
  from { transform: translate(-50%, -50%) rotate(-14deg); }
  to { transform: translate(-50%, -50%) rotate(346deg); }
}

@keyframes loginFloatCard {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -8px; }
}

.login-auth-card {
  display: grid;
  width: 100%;
  gap: 24px;
  max-width: 480px;
  justify-self: center;
  align-self: center;
  padding: 44px;
  background: #ffffff;
  border: 1px solid rgba(221, 231, 246, 0.92);
  border-radius: 24px;
  box-shadow: 0 30px 80px rgba(15, 23, 42, 0.12);
}

.login-auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  padding: 6px;
  background: #eef5ff;
  border: 1px solid #dde7f6;
  border-radius: 16px;
}

.login-auth-tabs button {
  height: 44px;
  color: #64748b;
  font-weight: 800;
  border: 0;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  transition: color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.login-auth-tabs button.is-active {
  color: #1d4ed8;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(37, 99, 235, 0.12);
}

.auth-form {
  display: none;
  gap: 16px;
}

.auth-form.is-active {
  display: grid;
}

.register-auth-note {
  margin: -2px 0 2px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.auth-form label:not(.login-remember) {
  display: grid;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  height: 48px;
  width: 100%;
  padding: 0 14px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: #ffffff;
  color: #1e293b;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.auth-form input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

.auth-form input::placeholder {
  color: #94a3b8;
}

.login-remember {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  color: #64748b;
  font-size: 12px;
}

.login-error {
  padding: 9px 10px;
  color: #dc2626;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1.5;
}

.login-error.is-success {
  color: #15803d;
  background: #dcfce7;
  border-color: #bbf7d0;
}

.login-submit,
.register-submit {
  height: 50px;
  margin-top: 4px;
  background: #2563eb;
  border-radius: 12px;
  font-weight: 800;
}

.login-submit:hover,
.register-submit:hover {
  background: #1d4ed8;
}

.login-submit:disabled,
.register-submit:disabled {
  cursor: not-allowed;
  opacity: 0.7;
}

.login-link-button {
  height: 40px;
  color: #2563eb;
  font-weight: 700;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  background: #ffffff;
  cursor: pointer;
}

.login-link-button:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.logout-button {
  height: 30px;
  padding: 0 12px;
}

@media (max-width: 980px) {
  body.login-screen,
  html.login-route,
  html.login-route body {
    overflow: auto;
  }

  .login-page-shell {
    width: 100%;
    height: auto;
    grid-template-columns: 1fr;
    gap: 28px;
    min-height: 100vh;
    max-width: none;
    padding: 32px 18px;
    overflow: visible;
  }

  .login-hero-panel {
    display: grid;
    min-height: 0;
    height: auto;
    gap: 20px;
    text-align: center;
    padding-top: 0;
  }

  .login-hero-brand {
    position: relative;
    left: auto;
    top: auto;
    justify-content: center;
  }

  .login-hero-copy {
    position: relative;
    left: auto;
    top: auto;
    justify-items: center;
    max-width: none;
  }

  .login-hero-copy p {
    max-width: 620px;
  }

  .login-visual {
    position: relative;
    left: auto;
    bottom: auto;
    justify-self: center;
    width: min(620px, 100%);
    height: 310px;
    min-height: 310px;
  }
}

@media (max-width: 560px) {
  .login-hero-copy h1 {
    font-size: 30px;
  }

  .login-hero-copy p {
    font-size: 14px;
  }

  .login-visual {
    display: none;
  }

  .login-auth-card {
    padding: 24px;
    border-radius: 18px;
  }
}

.staff-shell {
  display: grid;
  gap: 16px;
}

.staff-tip {
  padding: 11px 14px;
  color: #334155;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 10px;
  font-size: 13px;
}

.staff-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.staff-stat-card {
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 8px;
  min-height: 86px;
  padding: 16px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-left: 3px solid #64748b;
  border-radius: 14px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
}

.staff-stat-card::after {
  display: none !important;
  content: none !important;
}

.staff-stat-card span {
  color: #64748b;
  font-size: 13px;
}

.staff-stat-card strong {
  align-self: end;
  color: #0f172a;
  font-size: 23px;
  font-weight: 700;
  line-height: 1.1;
}

.staff-stat-card.blue {
  border-left-color: #2563eb;
}

.staff-stat-card.green {
  border-left-color: #22c55e;
}

.staff-stat-card.red {
  border-left-color: #ef4444;
}

.staff-stat-card.gray,
.staff-stat-card.slate {
  border-left-color: #94a3b8;
}

.staff-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

.staff-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.staff-table th {
  height: 46px;
  padding: 0 14px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  background: #f1f5f9;
  border-bottom: 1px solid #e2e8f0;
}

.staff-table td {
  height: 62px;
  padding: 12px 14px;
  color: #334155;
  font-size: 13px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: middle;
}

.staff-table tr:hover td {
  background: #f8fafc;
}

.staff-store-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.staff-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  white-space: nowrap;
}

.staff-actions button {
  height: 28px;
  padding: 0 8px;
  color: #2563eb;
  background: transparent;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 600;
}

.staff-actions button:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.staff-actions .danger-link {
  color: #dc2626;
}

.staff-actions .danger-link:hover {
  color: #b91c1c;
  background: #fee2e2;
}

.staff-lock-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.staff-empty-hint {
  padding: 14px 16px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  font-size: 13px;
}

.staff-table .status-pill.info {
  color: #2563eb;
  background: #eff6ff;
}

.staff-table .status-pill.neutral {
  color: #64748b;
  background: #f1f5f9;
}

.staff-table .status-pill.ok {
  color: #16a34a;
  background: #dcfce7;
}

.staff-dialog {
  width: min(700px, calc(100vw - 32px));
  max-height: calc(100vh - 64px);
  padding: 0;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
}

.staff-dialog[open] {
  display: block;
}

.staff-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.staff-form {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: calc(100vh - 64px);
  padding: 0;
  overflow: hidden;
}

.staff-dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  padding: 14px 18px 13px 20px;
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
}

.staff-dialog-header h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.25;
}

.staff-dialog-header p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.35;
}

.staff-dialog-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  color: #64748b;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.staff-dialog-close:hover {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.staff-dialog-body {
  display: grid;
  gap: 14px;
  min-height: 0;
  padding: 16px 20px 18px;
  overflow: auto;
  background: #fff;
  scrollbar-color: #cbd5e1 transparent;
  scrollbar-width: thin;
}

.staff-dialog-body::-webkit-scrollbar {
  width: 8px;
}

.staff-dialog-body::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 999px;
}

.staff-dialog-body::-webkit-scrollbar-track {
  background: transparent;
}

.staff-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.staff-form label {
  display: grid;
  gap: 6px;
  color: #475569;
  font-size: 13px;
  font-weight: 600;
}

.staff-form input,
.staff-form select {
  height: 38px;
  padding: 0 10px;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
}

.staff-form input:disabled {
  color: #64748b;
  background: #f8fafc;
  cursor: not-allowed;
}

.staff-form input:focus,
.staff-form select:focus {
  outline: 0;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.staff-status-field {
  grid-column: 1 / -1;
}

.staff-status-field span {
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

.staff-form-section {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
}

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

.staff-form-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 600;
}

.staff-form-section p {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 12px;
  line-height: 1.4;
}

.staff-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.staff-check-all {
  grid-column: 1 / -1;
}

.staff-check-grid label {
  display: flex;
  gap: 8px;
  align-items: center;
  min-height: 34px;
  padding: 6px 8px;
  color: #334155;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

.staff-check-grid label:has(input:checked) {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

.staff-check-grid input {
  width: 16px;
  height: 16px;
  accent-color: #2563eb;
}

.staff-scope-empty {
  grid-column: 1 / -1;
  padding: 10px 12px;
  color: #64748b;
  background: #f8fafc;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
}

.permission-grid {
  grid-template-columns: 1fr;
}

.permission-group {
  display: grid;
  gap: 8px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
}

.permission-group-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.permission-group-head > strong {
  color: #0f172a;
  font-size: 13px;
  font-weight: 600;
}

.permission-group-head button,
.staff-permission-actions button {
  height: 28px;
  padding: 0 8px;
  color: #2563eb;
  background: #fff;
  border: 1px solid #bfdbfe;
  border-radius: 7px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.permission-group-head button:hover,
.staff-permission-actions button:hover {
  color: #1d4ed8;
  background: #eff6ff;
}

.permission-group > .permission-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.permission-group label {
  min-height: 34px;
}

.staff-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 20px;
  background: #fff;
  border-top: 1px solid #e2e8f0;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
}

.staff-dialog-actions .secondary-button,
.staff-dialog-actions .primary-button {
  height: 38px;
  border-radius: 9px;
}

.staff-dialog-actions .primary-button {
  background: #2563eb;
}

.staff-dialog-actions .primary-button:hover {
  background: #1d4ed8;
}

.staff-dialog-actions .primary-button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.status-pill.info {
  color: #2563eb;
  background: #eff6ff;
}

.modal-kicker,
.muted-text {
  color: #64748b;
}

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

@media (max-width: 1280px) {
  body {
    min-width: 1024px;
  }

  .platform-header {
    grid-template-columns: 165px minmax(0, 1fr) auto;
  }

  .account-actions .soft-button:nth-of-type(2),
  .account-actions .soft-button:nth-of-type(3) {
    display: none;
  }

  .guide-grid,
  .dashboard-metrics,
  .rule-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-board {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "events events"
      "todo revenue"
      "gap status";
  }

  .rule-config-layout {
    grid-template-columns: 1fr;
  }

  .product-detail-grid,
  .user-layout {
    grid-template-columns: 1fr;
  }

  .support-grid,
  .module-card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  body {
    min-width: 0;
  }

  .platform-header {
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 10px 14px;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: auto;
    min-height: auto;
    border-right: 0;
  }

  .side-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 12px;
  }

  .page-heading,
  .product-detail-head,
  .brand-preview {
    grid-template-columns: 1fr;
  }

  .dashboard-metrics,
  .dashboard-board,
  .detail-metric-grid,
  .support-grid,
  .module-card-grid,
  .automation-grid {
    grid-template-columns: 1fr;
  }

  .dashboard-board {
    grid-template-areas:
      "events"
      "todo"
      "revenue"
      "gap"
      "status";
  }

  .detail-field-grid,
  .detail-report,
  .rule-summary-grid,
  .rule-health,
  .strong-rule-settings {
    grid-template-columns: 1fr;
  }
}
/* Order management */
.order-management-page {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
  overflow: hidden;
}

.order-page-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 38px;
  min-width: 0;
}

.order-action-group,
.order-filter-bar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.order-action-group {
  justify-content: flex-end;
  gap: 8px;
}

.order-action-group .primary-button,
.order-action-group .secondary-button {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.order-action-group .primary-button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.order-action-group .primary-button:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.order-action-group .secondary-button {
  background: #ffffff;
  border-color: #cbd5e1;
  color: #334155;
}

.order-action-group .secondary-button:hover {
  background: #f8fafc;
  border-color: #94a3b8;
  color: #1e293b;
}

.order-filter-bar {
  position: sticky;
  top: calc(var(--topbar-height, 58px) + 8px);
  z-index: 18;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.035);
}

.order-filter-bar select,
.order-filter-bar input {
  height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font-size: 13px;
  padding: 0 12px;
  outline: none;
}

.order-filter-bar select {
  min-width: 140px;
}

.order-filter-bar input[type="search"] {
  width: min(360px, 100%);
  min-width: 280px;
}

#orderSearchButton {
  height: 38px;
  padding: 0 16px;
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

#orderSearchButton:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

#orderResetButton {
  height: 38px;
  padding: 0 16px;
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

#orderResetButton:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

.order-filter-bar select:focus,
.order-filter-bar input:focus,
.order-dialog-card input:focus,
.order-dialog-card select:focus,
.order-dialog-card textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.order-custom-dates {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.order-custom-dates span {
  color: #64748b;
  font-size: 12px;
}

.order-table-wrap {
  overflow: auto;
  max-width: 100%;
  max-height: calc(100vh - var(--topbar-height, 58px) - 215px);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
  scrollbar-color: #cbd5e1 #f8fafc;
  scrollbar-width: thin;
}

.order-table-wrap::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.order-table-wrap::-webkit-scrollbar-track {
  background: #f8fafc;
}

.order-table-wrap::-webkit-scrollbar-thumb {
  border: 2px solid #f8fafc;
  border-radius: 999px;
  background: #cbd5e1;
}

.order-table {
  width: 100%;
  min-width: 1820px;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.order-table th {
  position: sticky;
  top: 0;
  z-index: 6;
  height: 42px;
  padding: 0 10px;
  background: #F1F5F9;
  color: #475569;
  font-weight: 600;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
  white-space: nowrap;
}

.order-table td {
  height: 66px;
  padding: 8px 10px;
  color: #334155;
  vertical-align: middle;
  border-bottom: 1px solid #EEF2F7;
  background: #ffffff;
}

.order-table tbody tr:hover td {
  background: #EFF6FF;
  border-bottom-color: #DBEAFE;
}

.order-table th:first-child,
.order-table td:first-child {
  position: sticky;
  left: 0;
  width: 44px;
  min-width: 44px;
  max-width: 44px;
  text-align: center;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.04);
}

.order-table th:first-child {
  z-index: 9;
}

.order-table td:first-child {
  z-index: 5;
}

.order-table th:nth-child(2),
.order-table td:nth-child(2) {
  position: sticky;
  left: 44px;
  width: 156px;
  min-width: 156px;
  box-shadow: 4px 0 12px rgba(15, 23, 42, 0.035);
}

.order-table th:nth-child(2) {
  z-index: 8;
}

.order-table td:nth-child(2) {
  z-index: 4;
}

.order-table th:last-child,
.order-table td:last-child {
  position: sticky;
  right: 0;
  width: 150px;
  min-width: 150px;
  box-shadow: -4px 0 12px rgba(15, 23, 42, 0.04);
}

.order-table th:last-child {
  z-index: 9;
}

.order-table td:last-child {
  z-index: 5;
}

.order-table th:nth-child(3),
.order-table td:nth-child(3) {
  width: 120px;
  min-width: 120px;
}

.order-table th:nth-child(4),
.order-table td:nth-child(4) {
  width: 360px;
  min-width: 360px;
}

.order-table th:nth-child(5),
.order-table td:nth-child(5),
.order-table th:nth-child(6),
.order-table td:nth-child(6),
.order-table th:nth-child(7),
.order-table td:nth-child(7),
.order-table th:nth-child(8),
.order-table td:nth-child(8) {
  width: 112px;
  min-width: 112px;
}

.order-table th:nth-child(9),
.order-table td:nth-child(9) {
  width: 132px;
  min-width: 132px;
}

.order-table th:nth-child(10),
.order-table td:nth-child(10) {
  width: 150px;
  min-width: 150px;
}

.order-table th:nth-child(11),
.order-table td:nth-child(11) {
  width: 110px;
  min-width: 110px;
}

.order-table th:nth-child(12),
.order-table td:nth-child(12) {
  width: 190px;
  min-width: 190px;
}

.order-table th:nth-child(13),
.order-table td:nth-child(13) {
  width: 84px;
  min-width: 84px;
}

.order-table th:nth-child(14),
.order-table td:nth-child(14) {
  width: 150px;
  min-width: 150px;
}

.order-table small {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.order-id {
  color: #2563eb;
  font-weight: 600;
}

.order-net-amount {
  color: #059669;
  font-weight: 700;
}

.order-product-cell {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 340px;
}

.order-products-list {
  display: grid;
  gap: 8px;
}

.order-products-table {
  gap: 6px;
}

.order-products-table .order-product-cell {
  max-width: 390px;
}

.order-products-table.has-multiple .order-product-cell {
  padding-bottom: 6px;
  border-bottom: 1px dashed #e2e8f0;
}

.order-products-table.has-multiple .order-product-cell:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.order-products-table .order-product-image {
  width: 38px;
  height: 38px;
  border-radius: 7px;
}

.order-product-image {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
  overflow: hidden;
}

.order-product-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.order-image-placeholder {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background:
    linear-gradient(135deg, transparent 45%, #cbd5e1 46%, #cbd5e1 54%, transparent 55%),
    #f8fafc;
  color: #94a3b8;
  font-weight: 600;
}

.order-title-clamp {
  display: -webkit-box;
  overflow: hidden;
  color: #0f172a;
  font-weight: 600;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.order-product-title-link {
  color: #2563eb;
  text-decoration: none;
  cursor: pointer;
}

.order-product-title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.order-ship-deadline,
.order-tracking-link,
.order-tracking-number {
  display: inline-block;
  max-width: 128px;
  overflow: hidden;
  color: #334155;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-ship-deadline.ok,
.order-ship-deadline.safe {
  color: #047857;
}

.order-ship-deadline.warning {
  color: #f97316;
}

.order-ship-deadline.urgent {
  color: #dc2626;
}

.order-ship-deadline.shipped {
  color: #334155;
}

.order-ship-deadline.overdue {
  color: #dc2626;
  font-weight: 800;
}

.order-tracking-link {
  color: #2563eb;
  text-decoration: none;
}

.order-tracking-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.order-logistics-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  height: 24px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.order-logistics-status.in-transit {
  color: #2563eb;
  background: #dbeafe;
}

.order-logistics-status.delivered {
  color: #047857;
  background: #dcfce7;
}

.order-detail-product-title {
  color: #2563eb;
  font-weight: 700;
  line-height: 1.35;
  text-decoration: none;
}

.order-detail-product-title:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.order-recipient-summary {
  display: grid;
  gap: 2px;
  max-width: 176px;
}

.order-recipient-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
  min-width: 0;
  line-height: 1.3;
}

.order-recipient-line span {
  color: #94a3b8;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.order-recipient-line strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 72px;
  height: 24px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.order-status-pill i {
  width: 6px;
  height: 6px;
  border-radius: 999px;
}

.order-status-pill.ok {
  background: #dcfce7;
  color: #16a34a;
}

.order-status-pill.ok i {
  background: #22c55e;
}

.order-status-pill.warn {
  background: #fff7ed;
  color: #ea580c;
}

.order-status-pill.warn i {
  background: #f97316;
}

.order-status-pill.neutral {
  background: #f1f5f9;
  color: #64748b;
}

.order-status-pill.neutral i {
  background: #94a3b8;
}

.order-status-pill.danger {
  background: #fee2e2;
  color: #dc2626;
}

.order-status-pill.danger i {
  background: #ef4444;
}

.order-note-cell {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #64748b;
}

.order-shipping-cell {
  display: grid;
  gap: 3px;
  max-width: 260px;
  color: #334155;
}

.order-shipping-line {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  min-width: 0;
  line-height: 1.35;
}

.order-shipping-line span {
  color: #94a3b8;
  font-size: 12px;
  white-space: nowrap;
}

.order-shipping-line strong {
  overflow: hidden;
  color: #334155;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.order-remark {
  color: #334155;
}

.order-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}

.order-tags span {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #2563eb;
  font-size: 12px;
}

.order-action-buttons {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-width: 126px;
  white-space: nowrap;
}

.order-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 7px;
  border-radius: 6px;
  color: #2563eb;
  font-weight: 600;
  line-height: 1;
}

.order-action-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
}

.order-action-primary {
  background: transparent;
  color: #2563eb;
}

.order-action-primary:hover {
  background: #dbeafe;
  color: #1d4ed8;
}

.order-empty-cell {
  height: 180px;
  text-align: center;
  color: #64748b;
}

.order-pagination-row {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 10px 2px 0;
  background: #ffffff;
}

.order-pagination-row > span:first-child {
  margin-right: auto;
  color: #64748b;
}

.order-pagination-row select,
.order-pagination-row button {
  height: 30px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #334155;
}

.order-pagination-row button {
  min-width: 32px;
}

.order-pagination-row button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.order-dialog::backdrop {
  background: rgba(15, 23, 42, 0.35);
}

.order-dialog {
  width: auto;
  max-width: calc(100vw - 32px);
  max-height: calc(100vh - 48px);
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  overflow: visible;
}

.order-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
  inset: 0;
  width: 100vw;
  max-width: 100vw;
  height: 100vh;
  max-height: 100vh;
  margin: 0;
  padding: 24px 16px;
  box-sizing: border-box;
}

.order-dialog-card {
  width: min(520px, calc(100vw - 32px));
  padding: 0;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 20px 50px rgba(15, 23, 42, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 48px);
}

#orderShipForm.order-dialog-card,
#orderRemarkForm.order-dialog-card,
#orderTagForm.order-dialog-card,
#orderProfitForm.order-dialog-card {
  overflow-y: auto;
}

.order-detail-card {
  width: min(720px, calc(100vw - 32px));
}

#orderRemarkDialog .order-dialog-card {
  width: min(480px, calc(100vw - 32px));
}

#orderShipDialog .order-dialog-card {
  width: min(560px, calc(100vw - 32px));
}

.order-ship-confirm-card {
  width: min(440px, calc(100vw - 32px));
}

.order-ship-confirm-body {
  padding: 14px 20px 2px;
}

.order-ship-confirm-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.weak-price-confirm-card {
  width: min(440px, calc(100vw - 32px));
}

.weak-price-confirm-body {
  padding: 14px 20px 2px;
}

.weak-price-confirm-text {
  margin: 0;
  color: #475569;
  font-size: 14px;
  line-height: 1.65;
}

.store-delete-confirm-card {
  width: min(424px, calc(100vw - 32px));
  border-color: #dbeafe;
  border-radius: 18px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.18);
}

.store-delete-confirm-card .order-dialog-head {
  padding: 20px 20px 16px;
  border-bottom: 1px solid #eaf1fb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.store-delete-confirm-card .order-dialog-head h3 {
  font-size: 18px;
}

.store-delete-confirm-card .order-dialog-head p {
  max-width: 320px;
  color: #64748b;
  line-height: 1.55;
}

.store-delete-confirm-body {
  display: grid;
  gap: 14px;
  padding: 18px 20px 4px;
}

.store-delete-confirm-text {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  line-height: 1.65;
}

.store-delete-confirm-text strong {
  font-weight: 800;
}

.store-delete-confirm-warning {
  padding: 11px 12px;
  border: 1px solid #fecaca;
  border-radius: 10px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 13px;
  line-height: 1.55;
}

.store-delete-confirm-card .order-dialog-actions {
  padding: 16px 20px 18px;
  border-top-color: #eaf1fb;
  box-shadow: none;
}

#orderExportDialog .order-dialog-card {
  width: min(680px, calc(100vw - 32px));
}

.order-dialog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex: 0 0 auto;
  position: sticky;
  top: 0;
  z-index: 3;
  padding: 16px 20px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.order-dialog-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 18px;
}

.order-dialog-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 13px;
}

.order-dialog-head .modal-close {
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  margin: -4px -6px 0 0;
  border-radius: 8px;
  color: #64748b;
}

.order-dialog-head .modal-close:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.order-dialog-card label {
  display: grid;
  gap: 6px;
  margin: 12px 20px 0;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
}

#orderShipAddress {
  overflow: auto;
}

.order-ship-address,
.order-detail-body {
  margin: 16px 20px 0;
}

.order-ship-address {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.order-sf-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 12px 20px 0;
  padding: 12px;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  background: #eff6ff;
}

.order-sf-panel[hidden] {
  display: none;
}

.order-sf-panel div {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.order-sf-panel strong {
  color: #1e3a8a;
  font-size: 13px;
  font-weight: 800;
}

.order-sf-panel span {
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.order-ship-address h4 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.order-ship-address-grid {
  display: grid;
  gap: 6px;
}

.order-detail-body {
  display: grid;
  gap: 14px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 16px 20px;
  margin: 0;
  overflow: auto;
}

.order-detail-product {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #ffffff;
}

.order-ship-product {
  margin: 14px 20px 0;
  background: #f8fafc;
}

.order-products-detail,
.order-products-ship {
  margin: 0 0 12px;
}

.order-detail-amounts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.order-detail-amounts > div {
  padding: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.order-detail-amounts span,
.order-ship-order-number {
  display: block;
  color: #64748b;
  font-size: 12px;
}

.order-detail-amounts strong {
  display: block;
  margin-top: 4px;
  color: #0f172a;
}

.order-ship-products {
  margin: 14px 20px 0;
}

.order-ship-products .order-detail-product {
  margin-top: 8px;
  background: #f8fafc;
}

.order-detail-product strong {
  display: block;
  color: #0f172a;
  font-weight: 700;
  line-height: 1.4;
}

.order-detail-product small {
  display: block;
  margin-top: 4px;
  color: #64748b;
}

.order-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.order-detail-grid div {
  padding: 12px;
  border: 1px solid #eef2f7;
  border-radius: 10px;
  background: #f8fafc;
}

.order-detail-grid span {
  display: block;
  margin-bottom: 5px;
  color: #64748b;
  font-size: 12px;
}

.order-detail-grid strong {
  color: #0f172a;
  font-weight: 600;
}

.order-dialog-card input,
.order-dialog-card select,
.order-dialog-card textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  outline: none;
}

.order-dialog-card input,
.order-dialog-card select {
  height: 38px;
  padding: 0 12px;
}

.order-dialog-card select {
  cursor: pointer;
}

.order-dialog-card textarea {
  min-height: 108px;
  padding: 10px 12px;
  resize: vertical;
}

#orderRemarkDialog .order-dialog-card textarea {
  min-height: 112px;
  max-height: 180px;
}

.order-tag-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 18px 20px 4px;
}

.order-tag-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  min-height: 36px;
  padding: 0 10px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

.order-profit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 10px;
}

.order-export-card {
  max-height: calc(100vh - 48px);
}

.order-export-body {
  display: grid;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  padding: 18px 20px 4px;
  overflow: auto;
}

.order-export-section {
  display: grid;
  gap: 10px;
}

.order-export-section h4 {
  margin: 0;
  color: #0f172a;
  font-size: 14px;
  font-weight: 700;
}

.order-export-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-export-section-head .secondary-button {
  height: 32px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 12px;
}

.order-export-option {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 10px !important;
  min-height: 54px;
  margin: 0 !important;
  padding: 10px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
}

.order-export-option input {
  width: 16px !important;
  height: 16px !important;
  padding: 0 !important;
}

.order-export-option span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.order-export-option strong {
  color: #0f172a;
  font-size: 13px;
}

.order-export-option small {
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.order-export-option.is-disabled {
  opacity: 0.55;
}

.order-export-fields {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.order-export-field {
  display: flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 8px !important;
  min-height: 34px;
  margin: 0 !important;
  padding: 7px 9px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #ffffff;
  color: #334155 !important;
  font-size: 12px !important;
  font-weight: 600 !important;
}

.order-export-field input {
  width: 15px !important;
  height: 15px !important;
  padding: 0 !important;
}

@media (max-width: 720px) {
  .order-export-fields {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.order-dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
  position: sticky;
  bottom: 0;
  z-index: 3;
  margin-top: 16px;
  padding: 14px 20px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
  box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.04);
}

.order-detail-card .order-dialog-actions {
  margin-top: 0;
}

.order-dialog-actions .primary-button,
.order-dialog-actions .secondary-button,
.order-dialog-actions .danger-button {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.order-dialog-actions .primary-button {
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
}

.order-dialog-actions .primary-button:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

.order-dialog-actions .secondary-button {
  border-color: #cbd5e1;
  background: #ffffff;
  color: #334155;
}

.order-dialog-actions .secondary-button:hover {
  border-color: #94a3b8;
  background: #f8fafc;
}

@media (max-width: 760px) {
  .order-profit-grid,
  .order-tag-options,
  .order-detail-grid {
    grid-template-columns: 1fr;
  }
  .order-filter-bar input[type="search"] {
    min-width: 0;
    width: 100%;
  }
  .order-action-group {
    justify-content: flex-start;
  }
}

/* Product management UI polish v119 */
#productsView .full-table-page {
  overflow: hidden;
  padding-bottom: 14px;
}

#productsView .product-toolbar {
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

#productsView .product-toolbar select,
#productsView .product-toolbar .secondary-button,
#productsView .product-toolbar .inline-search,
#productResetButton,
#productSearchButton {
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
}

#productsView .product-toolbar select {
  color: #334155;
  border-color: #cbd5e1;
}

#productsView .product-toolbar .inline-search {
  max-width: 430px;
  border-color: #cbd5e1;
}

#productsView .product-toolbar .inline-search input {
  height: 36px;
  line-height: 36px;
}

#productSearchButton {
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 700;
}

#productSearchButton:hover {
  color: #ffffff;
  background: #1d4ed8;
  border-color: #1d4ed8;
}

#productResetButton {
  color: #334155;
  background: #ffffff;
  border-color: #cbd5e1;
  font-weight: 700;
}

#productResetButton:hover {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#productsView .product-table-wrap {
  max-height: calc(100vh - 278px);
  margin-bottom: 8px;
  border-radius: 12px;
}

#productsView .product-table {
  table-layout: fixed;
}

#productsView .product-table th {
  height: 44px;
}

#productsView .product-table td {
  height: 64px;
  padding: 10px 12px;
}

#productsView .product-table tbody tr:hover td {
  background: #f1f7ff;
}

#productsView .product-table tbody tr:hover td:first-child {
  box-shadow: none;
}

#productsView .product-id {
  justify-content: center;
  gap: 2px;
  line-height: 1.35;
}

#productsView .product-ref-main {
  color: #2563eb;
  font-weight: 700;
}

#productsView .product-ref-sub {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
}

#productsView .product-title-cell .product-cell {
  align-items: center;
  gap: 10px;
  min-width: 0;
}

#productsView .product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

#productsView .product-title-wrap {
  display: -webkit-box;
  max-width: 292px;
  overflow: hidden;
  color: #2563eb;
  font-weight: 700;
  line-height: 1.42;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#productsView .product-title-wrap.title-link {
  color: #2563eb;
  text-decoration: none;
}

#productsView .product-title-wrap.title-link:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

#productsView .product-table td:nth-child(9) strong,
#productsView .product-table td:nth-child(11) strong,
#productsView .product-table td:nth-child(12) strong {
  color: #0f172a;
  font-weight: 800;
}

#productsView .product-table td:nth-child(9) .tiny-muted,
#productsView .product-table td:nth-child(11) .tiny-muted,
#productsView .product-table td:nth-child(12) .tiny-muted {
  color: #94a3b8;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

#productsView .product-gap {
  color: #64748b;
  font-weight: 700;
  white-space: nowrap;
}

#productsView .product-gap.neutral {
  color: #64748b;
}

#productsView .product-gap.warn,
#productsView .product-gap.danger {
  color: #ea580c;
}

#productsView .product-status-stack {
  display: inline-flex;
  width: 100%;
  min-width: 96px;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  justify-content: center;
  width: 118px;
  min-width: 118px;
  height: 22px;
  padding: 0 8px;
  line-height: 1;
}

#productsView .product-status-stack .state-dot.ok {
  color: #2563eb;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#productsView .product-status-stack .state-dot.neutral {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

#productsView .product-status-stack .state-dot.warn,
#productsView .product-status-stack .state-dot.danger {
  color: #dc2626;
  background: #fef2f2;
  border-color: #fecaca;
}

#productsView .product-status-stack .state-dot.warn::before,
#productsView .product-status-stack .state-dot.danger::before {
  background: #ef4444;
}

#productsView .product-status-stack .product-status-mini.ok {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

#productsView .product-status-stack .product-status-mini.warn {
  color: #64748b;
  background: #f1f5f9;
  border-color: #e2e8f0;
}

#productsView .product-status-stack .product-status-mini.warn::before {
  background: #94a3b8;
}

#productsView .product-action-cell .action-icons {
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 100%;
}

#productsView .product-view-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 28px;
  padding: 0 8px;
  border-radius: 6px;
  color: #2563eb;
  font-weight: 700;
}

#productsView .product-view-link:hover {
  color: #1d4ed8;
  background: #eff6ff;
  text-decoration: none;
}

#productsView .pagination-row {
  position: relative;
  z-index: 2;
  min-height: 38px;
  padding: 4px 2px 0;
  color: #64748b;
  background: #ffffff;
}

#productsView .pagination-row select,
#productsView .pagination-row button {
  height: 30px;
  border-color: #cbd5e1;
  border-radius: 7px;
}

#productsView .pagination-row select {
  min-width: 96px;
  color: #334155;
}

#productsView .pagination-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  color: #475569;
  background: #ffffff;
}

#productsView .pagination-row button:hover:not(:disabled) {
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
}

#productsView .pagination-row button:disabled {
  color: #cbd5e1;
  background: #f8fafc;
}

/* Product rule column polish v120 */
#productsView .product-table th:nth-child(6),
#productsView .product-table td:nth-child(6) {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
  padding-left: 10px;
  padding-right: 10px;
  text-align: left;
}

#productsView .product-table th:nth-child(6) {
  vertical-align: middle;
}

#productsView .product-table td:nth-child(6) {
  vertical-align: middle;
}

#productsView .product-rule-select {
  box-sizing: border-box;
  width: 132px;
  min-width: 132px;
  max-width: 132px;
  height: 34px;
  min-height: 34px;
  padding: 0 28px 0 10px;
  overflow: hidden;
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  line-height: 32px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-rule-select:hover {
  border-color: #2563eb;
}

#productsView .product-rule-select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productsView .product-rule-select option {
  color: #334155;
}

/* Product ID column polish v121 */
#productsView .product-table th:nth-child(4),
#productsView .product-table td:nth-child(4) {
  width: 158px;
  min-width: 158px;
  max-width: 158px;
  padding-left: 12px;
  padding-right: 12px;
  text-align: left;
}

#productsView .product-id {
  display: flex;
  max-width: 134px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 3px;
  overflow: hidden;
  line-height: 1.35;
}

#productsView .product-ref-main,
#productsView .product-ref-sub {
  display: block;
  width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-ref-main {
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-decoration: none;
  text-underline-offset: 2px;
}

#productsView .product-ref-main:hover {
  color: #1e40af;
  text-decoration: underline;
  text-decoration-thickness: 1px;
}

#productsView .product-ref-sub {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

#productsView .product-ref-sub:hover {
  color: #475569;
}

/* Product management red-frame UI polish v122 */
#productsView {
  padding: 10px 14px 16px;
  background: #f5f7fb;
}

#productsView .full-table-page {
  min-height: calc(100vh - 128px);
  padding: 18px;
  overflow: hidden;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
}

#productsView .table-page-head {
  min-height: 38px;
  margin-bottom: 14px;
  align-items: center;
}

#productsView .table-page-head h2 {
  color: #0f172a;
  font-size: 16px;
  font-weight: 800;
}

#bulkToggleAuto {
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border-color: #2563eb;
  border-radius: 8px;
  background: #2563eb;
  color: #ffffff;
  font-size: 12px;
  font-weight: 700;
}

#bulkToggleAuto:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
}

#productsView .product-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 14px;
}

#productsView .product-toolbar select,
#productsView .product-toolbar input,
#productsView .product-toolbar .inline-search,
#productsView .product-toolbar .secondary-button,
#productResetButton,
#productSearchButton {
  height: 38px;
  min-height: 38px;
  border-color: #d8e0ee;
  border-radius: 8px;
  font-size: 12px;
}

#productsView .product-toolbar select {
  padding: 0 34px 0 12px;
  color: #334155;
  background-color: #ffffff;
}

#productsView .product-toolbar .inline-search {
  flex: 1 1 340px;
  max-width: 440px;
  padding: 0 12px;
  background: #ffffff;
}

#productsView .product-toolbar .inline-search input {
  height: 36px;
  min-height: 36px;
  color: #334155;
  line-height: 36px;
}

#productsView .product-toolbar select:hover,
#productsView .product-toolbar .inline-search:hover,
#productsView .product-toolbar input:hover,
#productResetButton:hover {
  border-color: #b7c4d8;
}

#productsView .product-toolbar select:focus,
#productsView .product-toolbar .inline-search:focus-within,
#productsView .product-toolbar input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productSearchButton {
  min-width: 70px;
  padding: 0 16px;
  border-color: #2563eb;
  background: #2563eb;
  color: #ffffff;
  font-weight: 700;
}

#productSearchButton:hover {
  border-color: #1d4ed8;
  background: #1d4ed8;
  color: #ffffff;
}

#productResetButton {
  min-width: 66px;
  padding: 0 14px;
  background: #ffffff;
  color: #334155;
  font-weight: 700;
}

#productResetButton:hover {
  background: #f8fafc;
  color: #1d4ed8;
}

#productsView .product-table-wrap {
  max-height: calc(100vh - 288px);
  min-height: 430px;
  margin-bottom: 10px;
  overflow: auto;
  border: 1px solid #d8e0ee;
  border-radius: 12px;
  background: #ffffff;
}

#productsView .product-table {
  min-width: 2040px;
  table-layout: fixed;
}

#productsView .product-table thead th {
  height: 44px;
  padding: 0 12px;
  background: #f1f5f9;
  border-bottom: 1px solid #d8e0ee;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 1px 0 #e5eaf3;
}

#productsView .product-table thead th:last-child {
  background: #f1f5f9;
}

#productsView .product-table thead button[data-product-sort] {
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

#productsView .product-table td {
  height: 68px;
  padding: 10px 12px;
  background: #ffffff;
  border-bottom: 1px solid #e5eaf3;
  color: #334155;
  vertical-align: middle;
}

#productsView .product-table tbody tr:hover td {
  background: #f8fafc;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  position: sticky;
  right: 0;
  z-index: 5;
  width: 118px;
  min-width: 118px;
  background: inherit;
  box-shadow: -1px 0 0 #e5eaf3;
}

#productsView .product-table thead th:last-child {
  z-index: 9;
  background: #f1f5f9;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td:nth-child(4) {
  width: 158px;
  min-width: 158px;
  max-width: 158px;
}

#productsView .product-id {
  max-width: 134px;
  gap: 3px;
  line-height: 1.35;
}

#productsView .product-ref-main {
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

#productsView .product-ref-main:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#productsView .product-ref-sub {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.45;
}

#productsView .product-title-cell .product-cell {
  align-items: center;
  gap: 10px;
}

#productsView .product-title-wrap {
  display: -webkit-box;
  max-width: 292px;
  overflow: hidden;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.42;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#productsView .product-title-wrap:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#productsView .product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  background: #f8fafc;
}

#productsView .product-table td:nth-child(9) strong,
#productsView .product-table td:nth-child(11) strong {
  color: #0f172a;
  font-weight: 700;
}

#productsView .product-table td:nth-child(9) .tiny-muted,
#productsView .product-table td:nth-child(11) .tiny-muted,
#productsView .product-table td:nth-child(12) .tiny-muted,
#productsView .product-limit-readonly small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

#productsView .product-gap {
  font-weight: 700;
  white-space: nowrap;
}

#productsView .product-gap.neutral {
  color: #64748b;
}

#productsView .product-gap.warn,
#productsView .product-gap.danger {
  color: #f97316;
}

#productsView .product-status-stack {
  align-items: center;
  justify-content: center;
  gap: 5px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: 96px;
  min-width: 96px;
  height: 22px;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}

#productsView .product-status-stack .state-dot.ok {
  color: #2563eb;
  background: #dbeafe;
  border-color: #bfdbfe;
}

#productsView .product-status-stack .state-dot.ok::before {
  background: #3b82f6;
}

#productsView .product-status-stack .product-status-mini.ok {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

#productsView .product-status-stack .product-status-mini.ok::before {
  background: #22c55e;
}

#productsView .product-action-cell .action-icons {
  display: inline-flex;
  height: 100%;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

#productsView .auto-switch.is-on span {
  background: #2563eb;
}

#productsView .product-view-link {
  height: 30px;
  min-width: 42px;
  padding: 0 9px;
  border-radius: 8px;
  color: #2563eb;
  font-weight: 700;
}

#productsView .product-view-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
}

/* Product management table alignment v127 final */
#productsView .product-table {
  min-width: 1392px;
  table-layout: fixed;
}

/* Store management toolbar polish v20260618 */
#storesView .store-filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  min-height: 0;
  margin-bottom: 16px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.025);
}

#storesView .store-filter-bar select,
#storesView .store-filter-bar .inline-search,
#storesView .store-filter-bar .secondary-button,
#storesView .store-filter-bar .primary-button {
  height: 38px;
  min-height: 38px;
  border-radius: 8px;
  font-size: 13px;
}

#storesView .store-filter-bar select {
  width: 132px;
  min-width: 132px;
  padding: 0 32px 0 12px;
  color: #334155;
  background-color: #ffffff;
  border: 1px solid #cbd5e1;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#storesView .store-filter-bar .store-search {
  width: 260px;
  min-width: 220px;
  padding: 0 12px;
  gap: 8px;
  color: #64748b;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

#storesView .store-filter-bar .store-search span {
  color: #94a3b8;
  line-height: 1;
}

#storesView .store-filter-bar .store-search input {
  height: 36px;
  color: #0f172a;
  font-size: 13px;
  line-height: 36px;
}

#storesView .store-filter-bar .store-search input::placeholder {
  color: #64748b;
}

#storesView .store-filter-bar select:hover,
#storesView .store-filter-bar .store-search:hover {
  border-color: #94a3b8;
  background-color: #f8fafc;
}

#storesView .store-filter-bar select:focus,
#storesView .store-filter-bar .store-search:focus-within {
  border-color: #2563eb;
  background-color: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#storesView #storeSearchButton {
  min-width: 80px;
  padding: 0 18px;
  color: #ffffff;
  background: #2563eb;
  border-color: #2563eb;
  font-weight: 700;
}

#storesView #storeSearchButton:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

#storesView #syncAllStores {
  min-width: 122px;
  padding: 0 16px;
  color: #1d4ed8;
  background: #eff6ff;
  border-color: #bfdbfe;
  font-weight: 700;
}

#storesView #syncAllStores:hover {
  color: #1e40af;
  background: #dbeafe;
  border-color: #93c5fd;
}

#storesView .store-filter-bar .auth-bind-button {
  min-width: 140px;
  margin-left: auto;
  padding: 0 18px;
  font-weight: 800;
}

@media (max-width: 900px) {
  #storesView .store-filter-bar {
    gap: 10px;
  }

  #storesView .store-filter-bar .store-search {
    flex: 1 1 240px;
    width: auto;
  }

  #storesView .store-filter-bar .auth-bind-button {
    margin-left: 0;
  }
}

#productsView .product-table thead th {
  height: 38px;
  padding: 7px 8px;
  vertical-align: middle;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

#productsView .product-table td {
  height: 66px;
  padding: 6px 8px;
  vertical-align: middle !important;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 420px;
  min-width: 420px;
  max-width: 420px;
  text-align: left;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  text-align: left;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  text-align: left;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  text-align: center;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  text-align: center;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
}

#productsView .product-info-cell .product-info-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  gap: 9px;
}

#productsView .product-info-cell .product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

#productsView .product-info-meta {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0;
  line-height: 1.18;
}

#productsView .product-rule-select {
  display: inline-block;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  height: 32px;
  margin: 0 auto;
  line-height: 32px;
  vertical-align: middle;
}

#productsView .product-limit-compact,
#productsView .product-bid-status {
  display: grid;
  height: 100%;
  min-height: 54px;
  align-content: center;
  gap: 1px;
}

#productsView .product-limit-line,
#productsView .product-bid-status > div {
  align-items: center;
}

#productsView .product-stock-main {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  color: #334155;
  line-height: 24px;
}

#productsView .product-stock-main.is-zero {
  color: #ea580c;
}

#productsView .product-status-stack {
  display: grid;
  height: 100%;
  min-height: 54px;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: auto;
  min-width: 76px;
  max-width: 104px;
  height: 20px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
}

#productsView .product-action-cell .action-icons {
  display: inline-flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}

#productsView .product-view-link {
  height: 26px;
  min-width: 36px;
  padding: 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

/* Product management price alignment and spacing v128 */
#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 382px;
  min-width: 382px;
  max-width: 382px;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  vertical-align: middle !important;
}

#productsView .product-info-cell .product-info-compact {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

#productsView .product-info-meta {
  min-width: 0;
  overflow: hidden;
}

#productsView .product-info-cell .product-title-wrap,
#productsView .product-info-cell .product-ref-sub {
  max-width: 316px;
}

#productsView .product-rule-select {
  display: block;
  width: 116px;
  min-width: 116px;
  max-width: 116px;
  height: 32px;
  margin: 0 auto;
}

#productsView .product-price-config-cell .product-limit-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

#productsView .product-price-config-cell .product-limit-line {
  min-height: 19px;
  line-height: 19px;
}

#productsView .product-price-config-cell .product-limit-line > span,
#productsView .product-price-config-cell .product-limit-value {
  height: 19px;
  line-height: 19px;
}

#productsView .product-price-config-cell .product-limit-compact small {
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 16px;
}

/* Product management column balance and source alignment v129 */
#productsView .product-table {
  width: 100%;
  min-width: 1715px;
  table-layout: fixed;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 2.5%;
  min-width: 42px;
  max-width: none;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 5%;
  min-width: 72px;
  max-width: none;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 9.5%;
  min-width: 138px;
  max-width: none;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 21%;
  min-width: 360px;
  max-width: 420px;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 7.5%;
  min-width: 120px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 8%;
  min-width: 128px;
  max-width: none;
  vertical-align: middle !important;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 18%;
  min-width: 190px;
  max-width: none;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 7%;
  min-width: 82px;
  max-width: none;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 12%;
  min-width: 120px;
  max-width: none;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 9.5%;
  min-width: 96px;
  max-width: none;
}

#productsView .product-info-cell .product-info-compact {
  width: 100%;
  min-width: 0;
  gap: 8px;
}

#productsView .product-info-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 50px);
  overflow: hidden;
}

#productsView .product-info-cell .product-title-wrap,
#productsView .product-info-cell .product-ref-sub {
  max-width: 100%;
}

#productsView .product-rule-select {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  margin: 0 auto;
}

#productsView .product-price-config-cell .product-limit-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

#productsView .product-price-config-cell .product-limit-line,
#productsView .product-price-config-cell .product-limit-source {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  padding: 0 3px;
}

#productsView .product-price-config-cell .product-limit-line {
  min-height: 19px;
  line-height: 19px;
}

#productsView .product-price-config-cell .product-limit-source {
  min-height: 16px;
  margin-top: 1px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 16px;
}

#productsView .product-price-config-cell .product-limit-source span,
#productsView .product-price-config-cell .product-limit-source strong {
  overflow: hidden;
  color: #64748b;
  font-size: 10.5px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-price-config-cell .product-limit-source strong {
  font-weight: 600;
}

/* Product management even column gaps v130 */
#productsView .product-table {
  width: 100%;
  min-width: 1715px;
  table-layout: fixed;
}

#productsView .product-table th,
#productsView .product-table td {
  padding-left: 12px;
  padding-right: 12px;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 2.5%;
  min-width: 42px;
  max-width: none;
  padding-left: 8px;
  padding-right: 8px;
  text-align: center;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 5%;
  min-width: 72px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 9.5%;
  min-width: 138px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 19%;
  min-width: 360px;
  max-width: 405px;
  text-align: left;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 8%;
  min-width: 120px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 8.5%;
  min-width: 128px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 20%;
  min-width: 190px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 5.5%;
  min-width: 82px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 9%;
  min-width: 120px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 13%;
  min-width: 110px;
  max-width: none;
  text-align: left;
}

#productsView .product-info-cell .product-info-compact {
  width: 100%;
  min-width: 0;
  gap: 8px;
}

#productsView .product-info-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 50px);
  overflow: hidden;
}

#productsView .product-info-cell .product-title-wrap,
#productsView .product-info-cell .product-ref-sub {
  max-width: 100%;
}

#productsView .product-rule-select {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  margin: 0;
}

#productsView .product-stock-main {
  justify-content: flex-start;
}

#productsView .product-status-stack {
  place-content: center start;
  justify-items: start;
}

#productsView .product-action-cell .action-icons {
  justify-content: flex-start;
}

#productsView .product-price-config-cell .product-limit-line,
#productsView .product-price-config-cell .product-limit-source {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  align-items: center;
  padding: 0 3px;
}

/* Product management table alignment v127 */
#productsView .product-table {
  min-width: 1392px;
  table-layout: fixed;
}

#productsView .product-table thead th {
  height: 38px;
  padding: 7px 8px;
  vertical-align: middle;
  background: #f8fafc;
  border-bottom-color: #e5eaf3;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

#productsView .product-table td {
  height: 66px;
  padding: 6px 8px;
  vertical-align: middle !important;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 420px;
  min-width: 420px;
  max-width: 420px;
  text-align: left;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  text-align: left;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  text-align: left;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  text-align: center;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  text-align: center;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
}

#productsView .product-info-cell .product-info-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  gap: 9px;
}

#productsView .product-info-cell .product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

#productsView .product-info-meta {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0;
  line-height: 1.18;
}

#productsView .product-info-cell .product-title-wrap {
  max-width: 352px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.22;
}

#productsView .product-info-cell .product-ref-sub {
  max-width: 352px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.18;
}

#productsView .product-rule-select {
  display: inline-block;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  height: 32px;
  margin: 0 auto;
  color: #334155;
  line-height: 32px;
  vertical-align: middle;
}

#productsView .product-limit-compact {
  display: grid;
  height: 100%;
  min-height: 54px;
  align-content: center;
  gap: 1px;
}

#productsView .product-limit-line {
  align-items: center;
  min-height: 21px;
}

#productsView .product-limit-value {
  height: 21px;
  line-height: 21px;
}

#productsView .product-limit-inline-input {
  height: 24px;
  line-height: 24px;
}

#productsView .product-bid-status {
  display: grid;
  height: 100%;
  min-height: 54px;
  align-content: center;
  gap: 1px;
}

#productsView .product-bid-status > div {
  align-items: center;
  line-height: 1.16;
}

#productsView .product-bid-status .product-gap.good strong {
  color: #16a34a;
}

#productsView .product-bid-status .product-gap.neutral strong {
  color: #64748b;
}

#productsView .product-bid-status .product-gap.warn strong,
#productsView .product-bid-status .product-gap.danger strong {
  color: #ea580c;
}

#productsView .product-stock-main {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
}

#productsView .product-stock-main.is-zero {
  color: #ea580c;
}

#productsView .product-status-stack {
  display: grid;
  height: 100%;
  min-height: 54px;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: auto;
  min-width: 76px;
  max-width: 104px;
  height: 20px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
}

#productsView .product-action-cell .action-icons {
  display: inline-flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}

#productsView .product-view-link {
  height: 26px;
  min-width: 36px;
  padding: 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

/* Product management density tuning v126 */
#productsView .product-toolbar {
  gap: 8px;
  align-items: center;
}

#productsView .product-toolbar select,
#productsView .product-toolbar .secondary-button,
#productsView .product-toolbar .inline-search {
  height: 36px;
}

#productsView .product-toolbar .inline-search {
  width: min(360px, 32vw);
}

#productsView .product-toolbar .inline-search input {
  height: 34px;
}

#productsView .product-toolbar #productSearchButton {
  background: #2563eb;
  border-color: #2563eb;
  color: #ffffff;
}

#productsView .product-toolbar #productSearchButton:hover {
  background: #1d4ed8;
  border-color: #1d4ed8;
}

#productsView .table-page-head #bulkToggleAuto {
  height: 36px;
  padding: 0 14px;
}

#productsView .product-table {
  min-width: 1392px;
  table-layout: fixed;
}

#productsView .product-table thead th {
  height: 38px;
  padding: 7px 8px;
  background: #f8fafc;
  border-bottom-color: #e5eaf3;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
}

#productsView .product-table td {
  height: 66px;
  padding: 6px 8px;
  color: #334155;
  font-size: 12px;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 420px;
  min-width: 420px;
  max-width: 420px;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
}

#productsView .product-info-compact {
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 9px;
}

#productsView .product-info-cell .product-thumb {
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

#productsView .product-info-meta {
  gap: 0;
  line-height: 1.18;
}

#productsView .product-info-cell .product-title-wrap {
  max-width: 352px;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.22;
}

#productsView .product-info-cell .product-title-wrap:hover {
  color: #1d4ed8;
}

#productsView .product-info-cell .product-ref-sub {
  max-width: 352px;
  color: #64748b;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.18;
}

#productsView .product-rule-select {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  height: 30px;
  padding-left: 9px;
  padding-right: 24px;
  color: #334155;
}

#productsView .product-limit-compact {
  gap: 1px;
}

#productsView .product-limit-line {
  grid-template-columns: 28px minmax(0, 1fr);
  min-height: 21px;
  padding: 0 3px;
}

#productsView .product-limit-line > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

#productsView .product-limit-value {
  height: 21px;
  padding: 0 3px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  line-height: 21px;
}

#productsView .product-limit-inline-input {
  width: 74px;
  height: 24px;
  padding: 0 6px;
  font-size: 12px;
  line-height: 24px;
}

#productsView .product-limit-compact small {
  color: #64748b;
  font-size: 10.5px;
  line-height: 1.15;
}

#productsView .product-bid-status {
  gap: 1px;
}

#productsView .product-bid-status > div {
  grid-template-columns: 30px minmax(0, 1fr);
  line-height: 1.16;
}

#productsView .product-bid-status span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

#productsView .product-bid-status strong {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
}

#productsView .product-bid-status > div:last-child strong {
  color: #475569;
  font-size: 11.5px;
  font-weight: 600;
}

#productsView .product-bid-status .product-gap.good strong {
  color: #16a34a;
}

#productsView .product-bid-status .product-gap.neutral strong {
  color: #64748b;
}

#productsView .product-bid-status .product-gap.warn strong,
#productsView .product-bid-status .product-gap.danger strong {
  color: #ea580c;
}

#productsView .product-stock-main {
  color: #334155;
  font-size: 12px;
  font-weight: 700;
}

#productsView .product-stock-main.is-zero {
  color: #ea580c;
}

#productsView .product-status-stack {
  gap: 2px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: auto;
  min-width: 76px;
  max-width: 104px;
  height: 20px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
  white-space: nowrap;
}

#productsView .product-status-stack .state-dot.ok {
  color: #2563eb;
  background: #dbeafe;
  border-color: #bfdbfe;
}

#productsView .product-status-stack .product-status-mini.ok {
  color: #16a34a;
  background: #dcfce7;
  border-color: #bbf7d0;
}

#productsView .product-action-cell .action-icons {
  gap: 5px;
}

#productsView .product-view-link {
  height: 26px;
  min-width: 36px;
  padding: 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

#productsView .pagination-row {
  display: flex;
  min-height: 40px;
  padding: 4px 2px 0;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  background: #ffffff;
  color: #64748b;
}

#productsView .pagination-row > span:first-child {
  margin-right: auto;
}

#productsView .pagination-row select,
#productsView .pagination-row button {
  height: 30px;
  border: 1px solid #d8e0ee;
  border-radius: 8px;
  background: #ffffff;
  color: #475569;
}

#productsView .pagination-row button {
  min-width: 30px;
}

#productsView .pagination-row button:hover:not(:disabled) {
  border-color: #bfdbfe;
  background: #eff6ff;
  color: #1d4ed8;
}

#productsView .pagination-row button:disabled {
  border-color: #e5eaf3;
  background: #f8fafc;
  color: #cbd5e1;
}

/* Product limit price editing v123 */
#productsView .product-limit-editor {
  display: grid;
  min-width: 92px;
  gap: 4px;
  align-items: center;
}

#productsView .product-limit-input {
  box-sizing: border-box;
  width: 86px;
  height: 30px;
  padding: 0 8px;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #d8e0ee;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  line-height: 30px;
}

#productsView .product-limit-input:hover {
  border-color: #94a3b8;
}

#productsView .product-limit-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productsView .product-limit-input::placeholder {
  color: #94a3b8;
  font-weight: 600;
}

#productsView .product-limit-editor small {
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

/* Product management compact table v125 */
#productsView .product-table-wrap {
  overflow-x: auto;
  overflow-y: auto;
}

#productsView .product-table {
  min-width: 1384px;
  table-layout: fixed;
}

#productsView .product-table thead th {
  height: 42px;
  padding: 8px 10px;
  background: #f8fafc;
  border-bottom: 1px solid #e5eaf3;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

#productsView .product-table td {
  height: 70px;
  padding: 8px 10px;
  border-bottom: 1px solid #e5eaf3;
  color: #0f172a;
  font-size: 12px;
  vertical-align: middle;
}

#productsView .product-table tbody tr:hover td {
  background: #f8fafc;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 44px;
  min-width: 44px;
  max-width: 44px;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 74px;
  min-width: 74px;
  max-width: 74px;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 118px;
  min-width: 118px;
  max-width: 118px;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 380px;
  min-width: 380px;
  max-width: 380px;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 142px;
  min-width: 142px;
  max-width: 142px;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 150px;
  min-width: 150px;
  max-width: 150px;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 190px;
  min-width: 190px;
  max-width: 190px;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 78px;
  min-width: 78px;
  max-width: 78px;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 112px;
  min-width: 112px;
  max-width: 112px;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  right: 0;
}

#productsView .product-info-compact {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  min-width: 0;
  align-items: center;
  gap: 10px;
}

#productsView .product-info-cell .product-thumb {
  width: 44px;
  height: 44px;
  border-radius: 6px;
}

#productsView .product-info-meta {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.3;
}

#productsView .product-info-cell .product-title-wrap {
  display: -webkit-box;
  max-width: 306px;
  overflow: hidden;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-overflow: ellipsis;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

#productsView .product-info-cell .product-title-wrap:hover {
  color: #1d4ed8;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#productsView .product-info-cell .product-ref-sub {
  max-width: 306px;
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-rule-select {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
  height: 32px;
}

#productsView .product-limit-compact {
  display: grid;
  min-width: 0;
  gap: 3px;
}

#productsView .product-limit-line {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  min-height: 24px;
  padding: 1px 4px;
  border: 1px solid transparent;
  border-radius: 7px;
}

#productsView .product-limit-line:hover,
#productsView .product-limit-line.is-editing {
  background: #f8fafc;
  border-color: #dbeafe;
}

#productsView .product-limit-line > span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

#productsView .product-limit-value {
  min-width: 0;
  height: 24px;
  padding: 0 4px;
  overflow: hidden;
  color: #0f172a;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 700;
  line-height: 24px;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}

#productsView .product-limit-value:hover {
  color: #1d4ed8;
}

#productsView .product-limit-inline-input {
  display: none;
  width: 82px;
  height: 26px;
  padding: 0 7px;
  font-size: 12px;
  line-height: 26px;
}

#productsView .product-limit-line.is-editing .product-limit-value {
  display: none;
}

#productsView .product-limit-line.is-editing .product-limit-inline-input {
  display: block;
}

#productsView .product-limit-compact small {
  overflow: hidden;
  color: #64748b;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-bid-status {
  display: grid;
  min-width: 0;
  gap: 2px;
}

#productsView .product-bid-status > div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  min-width: 0;
  line-height: 1.25;
}

#productsView .product-bid-status span {
  color: #64748b;
  font-size: 11px;
  font-weight: 600;
}

#productsView .product-bid-status strong {
  overflow: hidden;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-bid-status .product-gap.neutral strong {
  color: #64748b;
}

#productsView .product-bid-status .product-gap.warn strong,
#productsView .product-bid-status .product-gap.danger strong {
  color: #f97316;
}

#productsView .product-stock-main {
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

#productsView .product-status-stack {
  display: grid;
  justify-items: center;
  gap: 3px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: 84px;
  min-width: 84px;
  height: 20px;
  padding: 0 8px;
  justify-content: center;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  line-height: 20px;
}

#productsView .product-action-cell .action-icons {
  display: inline-flex;
  width: 100%;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

#productsView .product-action-cell .auto-switch {
  flex: 0 0 auto;
}

#productsView .product-view-link {
  height: 28px;
  min-width: 38px;
  padding: 0 8px;
  border-radius: 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 700;
}

#productsView .product-view-link:hover {
  background: #eff6ff;
  color: #1d4ed8;
  text-decoration: none;
}

/* Product management table alignment v127 final */
#productsView .product-table {
  min-width: 1392px;
  table-layout: fixed;
}

#productsView .product-table thead th {
  height: 38px;
  padding: 7px 8px;
  vertical-align: middle;
  background: #f8fafc;
  color: #475569;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
}

#productsView .product-table td {
  height: 66px;
  padding: 6px 8px;
  vertical-align: middle !important;
  color: #334155;
  font-size: 12px;
  line-height: 1.25;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 140px;
  min-width: 140px;
  max-width: 140px;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 420px;
  min-width: 420px;
  max-width: 420px;
  text-align: left;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 126px;
  min-width: 126px;
  max-width: 126px;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  text-align: left;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 156px;
  min-width: 156px;
  max-width: 156px;
  text-align: left;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 82px;
  min-width: 82px;
  max-width: 82px;
  text-align: center;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  text-align: center;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 96px;
  min-width: 96px;
  max-width: 96px;
  text-align: center;
}

#productsView .product-info-cell .product-info-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  gap: 9px;
}

#productsView .product-info-cell .product-thumb {
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  border-radius: 6px;
}

#productsView .product-info-meta {
  display: grid;
  min-width: 0;
  align-content: center;
  gap: 0;
  line-height: 1.18;
}

#productsView .product-rule-select {
  display: inline-block;
  width: 112px;
  min-width: 112px;
  max-width: 112px;
  height: 32px;
  margin: 0 auto;
  line-height: 32px;
  vertical-align: middle;
}

#productsView .product-limit-compact,
#productsView .product-bid-status {
  display: grid;
  height: 100%;
  min-height: 54px;
  align-content: center;
  gap: 1px;
}

#productsView .product-limit-line,
#productsView .product-bid-status > div {
  align-items: center;
}

#productsView .product-stock-main {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  color: #334155;
  line-height: 24px;
}

#productsView .product-stock-main.is-zero {
  color: #ea580c;
}

#productsView .product-status-stack {
  display: grid;
  height: 100%;
  min-height: 54px;
  place-content: center;
  justify-items: center;
  gap: 2px;
}

#productsView .product-status-stack .state-dot,
#productsView .product-status-stack .product-status-mini {
  width: auto;
  min-width: 76px;
  max-width: 104px;
  height: 20px;
  padding: 0 8px;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  line-height: 20px;
  white-space: nowrap;
}

#productsView .product-action-cell .action-icons {
  display: inline-flex;
  height: 100%;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  gap: 6px;
  vertical-align: middle;
}

#productsView .product-view-link {
  height: 26px;
  min-width: 36px;
  padding: 0 7px;
  color: #2563eb;
  font-size: 12px;
  font-weight: 600;
}

/* Product management price alignment and spacing v128 final */
#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 382px;
  min-width: 382px;
  max-width: 382px;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 130px;
  min-width: 130px;
  max-width: 130px;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 128px;
  min-width: 128px;
  max-width: 128px;
  vertical-align: middle !important;
}

#productsView .product-info-cell .product-info-compact {
  display: flex;
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 8px;
}

#productsView .product-info-meta {
  min-width: 0;
  overflow: hidden;
}

#productsView .product-info-cell .product-title-wrap,
#productsView .product-info-cell .product-ref-sub {
  max-width: 316px;
}

#productsView .product-rule-select {
  display: block;
  width: 116px;
  min-width: 116px;
  max-width: 116px;
  height: 32px;
  margin: 0 auto;
}

#productsView .product-price-config-cell .product-limit-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

#productsView .product-price-config-cell .product-limit-line {
  min-height: 19px;
  line-height: 19px;
}

#productsView .product-price-config-cell .product-limit-line > span,
#productsView .product-price-config-cell .product-limit-value {
  height: 19px;
  line-height: 19px;
}

#productsView .product-price-config-cell .product-limit-compact small {
  margin-top: 1px;
  font-size: 10.5px;
  line-height: 16px;
}

/* Product management fixed layout v131 */
#productsView .product-table {
  width: 100%;
  min-width: 1574px;
  table-layout: fixed;
}

#productsView .product-table th,
#productsView .product-table td {
  box-sizing: border-box;
  height: 80px;
  padding: 8px 10px;
  vertical-align: middle !important;
}

#productsView .product-table thead th {
  height: 40px;
}

#productsView .product-table th:nth-child(1),
#productsView .product-table td:nth-child(1) {
  width: 2.8%;
  min-width: 44px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:nth-child(2),
#productsView .product-table td:nth-child(2) {
  width: 5.1%;
  min-width: 80px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:nth-child(3),
#productsView .product-table td:nth-child(3) {
  width: 9.5%;
  min-width: 150px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(4),
#productsView .product-table td.product-info-cell {
  width: 35.6%;
  min-width: 560px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(5),
#productsView .product-table td:nth-child(5) {
  width: 8.3%;
  min-width: 130px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:nth-child(6),
#productsView .product-table td.product-price-config-cell {
  width: 8.3%;
  min-width: 130px;
  max-width: none;
  text-align: left;
  vertical-align: middle !important;
}

#productsView .product-table th:nth-child(7),
#productsView .product-table td.product-bid-status-cell {
  width: 11.4%;
  min-width: 180px;
  max-width: none;
  text-align: left;
}

#productsView .product-table th:nth-child(8),
#productsView .product-table td:nth-child(8) {
  width: 5.1%;
  min-width: 80px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:nth-child(9),
#productsView .product-table td.product-status-cell {
  width: 7.6%;
  min-width: 120px;
  max-width: none;
  text-align: center;
}

#productsView .product-table th:last-child,
#productsView .product-table td.product-action-cell {
  width: 6.3%;
  min-width: 100px;
  max-width: none;
  text-align: center;
}

#productsView .product-info-cell .product-info-compact {
  width: 100%;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

#productsView .product-info-meta {
  flex: 1 1 auto;
  min-width: 0;
  max-width: calc(100% - 54px);
  overflow: hidden;
  align-content: center;
  gap: 2px;
}

#productsView .product-info-cell .product-title-wrap {
  max-width: 100%;
  font-size: 13px;
  line-height: 1.28;
}

#productsView .product-ref-line {
  display: flex;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-ref-pair {
  gap: 14px;
}

#productsView .product-ref-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-rule-select {
  width: 120px;
  min-width: 120px;
  max-width: 120px;
  margin: 0 auto;
}

#productsView .product-price-config-cell .product-limit-compact {
  display: flex;
  height: 100%;
  min-height: 54px;
  flex-direction: column;
  justify-content: center;
  gap: 0;
}

#productsView .product-bid-status {
  display: grid;
  height: 100%;
  min-height: 60px;
  align-content: center;
  gap: 1px;
}

#productsView .product-price-config-cell .product-limit-line,
#productsView .product-price-config-cell .product-limit-source {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  padding: 0 3px;
}

#productsView .product-bid-status > div {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  line-height: 1.22;
}

#productsView .product-own-price-value {
  width: fit-content;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  color: #0f172a;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  text-align: left;
}

#productsView .product-own-price-value:not(:disabled):hover {
  color: #2563eb;
  text-decoration: underline;
}

#productsView .product-own-price-value:disabled {
  cursor: default;
  opacity: 1;
}

#productsView .product-own-price-input {
  display: none;
  width: 84px;
  height: 26px;
  padding: 0 7px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 11.5px;
  font-weight: 700;
  text-align: left;
}

#productsView .product-own-price-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productsView .product-own-price-editor.is-editing .product-own-price-value {
  display: none;
}

#productsView .product-own-price-editor.is-editing .product-own-price-input {
  display: inline-block;
}

#productsView .product-own-price-editor.is-saving .product-own-price-value {
  color: #64748b;
  text-decoration: none;
}

#productsView .product-price-config-cell .product-limit-line {
  min-height: 20px;
  line-height: 20px;
}

#productsView .product-price-config-cell .product-limit-source {
  min-height: 16px;
  margin-top: 1px;
  color: #64748b;
  font-size: 10.5px;
  font-weight: 500;
  line-height: 16px;
}

#productsView .product-price-config-cell .product-limit-source span,
#productsView .product-price-config-cell .product-limit-source strong {
  overflow: hidden;
  color: #64748b;
  font-size: 10.5px;
  line-height: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-price-config-cell .product-limit-source strong {
  font-weight: 600;
}

#productsView .product-stock-main {
  justify-content: center;
}

#productsView .product-stock-cell {
  text-align: center;
}

#productsView .product-stock-editor {
  display: inline-grid;
  min-width: 74px;
  place-items: center;
}

#productsView .product-stock-main {
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 700;
}

#productsView .product-stock-main:not(:disabled):hover {
  color: #2563eb;
  text-decoration: underline;
}

#productsView .product-stock-main:disabled {
  cursor: default;
  opacity: 1;
}

#productsView .product-stock-input {
  display: none;
  width: 70px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  color: #0f172a;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

#productsView .product-stock-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
  outline: none;
}

#productsView .product-stock-editor.is-editing .product-stock-main {
  display: none;
}

#productsView .product-stock-editor.is-editing .product-stock-input {
  display: inline-block;
}

#productsView .product-stock-editor.is-saving .product-stock-main {
  color: #64748b;
  text-decoration: none;
}

#productsView .product-sync-mini {
  display: block;
  max-width: 96px;
  margin-top: 2px;
  overflow: hidden;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#productsView .product-sync-mini.is-active {
  color: #2563eb;
}

#productsView .product-sync-mini.is-done {
  color: #16a34a;
}

#productsView .product-sync-mini.is-failed {
  color: #dc2626;
}

#productsView .product-status-stack {
  place-content: center;
  justify-items: center;
}

#productsView .product-action-cell .action-icons {
  justify-content: center;
}

#logisticsView .logistics-shell {
  display: grid;
  gap: 14px;
  min-height: calc(100vh - 140px);
  padding: 18px;
}

#logisticsView .logistics-page-head {
  align-items: center;
  margin: 0;
}

#logisticsView .logistics-page-head p {
  margin: 6px 0 0;
  color: #64748b;
  font-size: 12px;
  font-weight: 500;
}

#logisticsView .logistics-page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

#logisticsView .logistics-form {
  display: grid;
  gap: 14px;
}

#logisticsView .logistics-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
}

#logisticsView .logistics-card-head {
  display: grid;
  gap: 5px;
}

#logisticsView .logistics-card-head strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 800;
}

#logisticsView .logistics-card-head span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

#logisticsView .logistics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

#logisticsView .logistics-grid-compact {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
}

#logisticsView .logistics-grid label {
  display: grid;
  gap: 7px;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
}

#logisticsView .logistics-grid .wide-field {
  grid-column: span 2;
}

#logisticsView .checkbox-field {
  grid-template-columns: auto 1fr;
  align-items: center;
  align-content: center;
  min-height: 38px;
  padding: 0 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

#logisticsView .logistics-grid input,
#logisticsView .logistics-grid select {
  width: 100%;
  height: 38px;
  padding: 0 10px;
  border-color: #cbd5e1;
  border-radius: 8px;
}

#logisticsView .logistics-grid input:focus,
#logisticsView .logistics-grid select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

#logisticsView .logistics-status {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 12px;
}

#logisticsView .logistics-help-card {
  display: grid;
  gap: 6px;
  padding: 12px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
}

#logisticsView .logistics-help-card strong {
  color: #0f172a;
  font-size: 13px;
}

#logisticsView .logistics-help-card span {
  color: #64748b;
  font-size: 12px;
  line-height: 1.6;
}

.app-shell {
  transition: grid-template-columns 0.18s ease;
}

.sidebar {
  min-width: var(--sidebar-width);
  overflow: hidden;
  transition:
    min-width 0.18s ease,
    padding 0.18s ease,
    border-color 0.18s ease,
    box-shadow 0.18s ease;
}

.side-nav,
.store-panel {
  transition:
    opacity 0.14s ease,
    transform 0.18s ease;
}

body.sidebar-collapsed .app-shell {
  grid-template-columns: 0 minmax(0, 1fr);
}

body.sidebar-collapsed .sidebar {
  min-width: 0;
  padding-right: 0;
  padding-left: 0;
  border-right-color: transparent;
  box-shadow: none;
}

body.sidebar-collapsed .side-nav,
body.sidebar-collapsed .store-panel {
  pointer-events: none;
  opacity: 0;
  transform: translateX(-14px);
}

@media (max-width: 1400px) {
  #logisticsView .logistics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
#financeView {
  margin: -4px;
  padding: 12px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, rgba(248, 251, 255, 0.96), rgba(239, 246, 255, 0.78)),
    #eef5ff;
}

.finance-shell {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 14px;
  border-color: #dbe7f5;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(30, 64, 175, 0.07);
}

.finance-head,
.finance-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.finance-head h2 {
  margin: 0 0 6px;
  font-size: 20px;
  color: #0f172a;
}

.finance-head p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.finance-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 10px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f8fbff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.finance-filter-left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 auto;
  flex-wrap: wrap;
}

.finance-sync-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 0 0 auto;
  margin-left: auto;
}

.finance-toolbar select,
.finance-toolbar .primary-button,
.finance-toolbar .secondary-button,
.finance-toolbar .inline-search {
  min-height: 36px;
  height: 36px;
}

.finance-toolbar select {
  width: 136px;
  border: 1px solid #cbd8ea;
  border-radius: 9px;
  background: #fff;
  color: #243247;
  padding: 0 12px;
  font-weight: 700;
}

.finance-toolbar .finance-search {
  width: 310px;
  border: 1px solid #cbd8ea;
  border-radius: 9px;
  background: #fff;
}

.finance-query-button {
  min-width: 72px;
  border-color: #bfdbfe;
  color: #1d4ed8;
  background: #eff6ff;
}

.finance-toolbar .finance-search input {
  min-width: 0;
}

.finance-summary-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}

.finance-summary-heading {
  grid-column: 1 / -1;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  border-radius: 12px;
  background: #f8fbff;
}

.finance-summary-heading strong,
.finance-summary-heading span,
.finance-summary-heading em {
  display: block;
}

.finance-summary-heading strong {
  color: #0f172a;
  font-size: 14px;
}

.finance-summary-heading span {
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.5;
}

.finance-summary-heading em {
  max-width: 360px;
  color: #b45309;
  font-size: 12px;
  font-style: normal;
  line-height: 1.5;
  text-align: right;
}

.finance-account-badges {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: 6px;
}

.finance-account-status {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  line-height: 1;
}

.finance-account-status.ok {
  background: #dcfce7;
  color: #047857;
}

.finance-account-status.danger {
  background: #fee2e2;
  color: #b91c1c;
}

.finance-account-status.warning {
  background: #ffedd5;
  color: #c2410c;
}

.finance-payout-link {
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 12px;
  line-height: 1;
  padding: 7px 10px;
  cursor: pointer;
}

.finance-payout-link:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.finance-account-alert {
  grid-column: 1 / -1;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.finance-account-alert.ok {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #047857;
}

.finance-account-alert.danger {
  border: 1px solid #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.finance-summary-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 16px 20px 15px;
  min-height: 106px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
  text-align: left;
}

.finance-summary-card::before {
  position: absolute;
  top: 16px;
  bottom: 16px;
  left: 0;
  width: 4px;
  border-radius: 0 999px 999px 0;
  background: #94a3b8;
  content: "";
}

.finance-summary-card span {
  display: block;
  margin-bottom: 6px;
  color: #64748b;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
}

.finance-summary-card strong {
  display: block;
  color: #0f172a;
  min-height: 36px;
  font-size: 29px;
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: 0;
}

.finance-summary-card small {
  display: block;
  margin-top: 5px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
}

.finance-summary-card.blue::before {
  background: #2563eb;
}

.finance-summary-card.green::before,
.finance-summary-card.positive::before {
  background: #16a34a;
}

.finance-summary-card.cyan::before {
  background: #0f766e;
}

.finance-summary-card.orange::before {
  background: #f59e0b;
}

.finance-summary-card.red::before,
.finance-summary-card.negative::before {
  background: #ef4444;
}

.finance-summary-card.positive strong,
.finance-summary-card.green strong {
  color: #047857;
}

.finance-summary-card.blue strong {
  color: #1d4ed8;
}

.finance-summary-card.cyan strong {
  color: #0f766e;
}

.finance-summary-card.negative strong,
.finance-summary-card.red strong {
  color: #dc2626;
}

.finance-summary-card.orange strong {
  color: #b45309;
}

.finance-summary-card.neutral strong,
.finance-summary-card.zero strong {
  color: #1f2937;
}

.finance-summary-card.zero::before {
  background: #94a3b8;
}

.finance-summary-card.finance-summary-loading {
  border-left: 0;
  background: linear-gradient(90deg, #f8fafc 0%, #eef4fb 48%, #f8fafc 100%);
  background-size: 220% 100%;
  animation: finance-loading-pulse 1.25s ease-in-out infinite;
  box-shadow: none;
}

.finance-summary-card.finance-summary-loading::before {
  display: none;
}

.finance-summary-card.finance-summary-loading span,
.finance-summary-card.finance-summary-loading strong,
.finance-summary-card.finance-summary-loading small {
  display: block;
  width: 44%;
  height: 12px;
  margin: 0 0 12px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.22);
}

.finance-summary-card.finance-summary-loading strong {
  width: 68%;
  height: 28px;
}

.finance-summary-card.finance-summary-loading small {
  width: 36%;
  margin-bottom: 0;
}

@keyframes finance-loading-pulse {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.finance-account-details {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.finance-account-details section {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  padding: 18px 20px;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.055);
}

.finance-account-details h4 {
  margin: 0 0 14px;
  color: #0f172a;
  font-size: 15px;
  font-weight: 900;
}

.finance-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-top: 1px dashed #e2e8f0;
  color: #64748b;
  font-size: 13px;
  text-align: left;
}

.finance-balance-row:first-of-type {
  border-top: 0;
}

.finance-balance-row strong {
  text-align: right;
  font-size: 14px;
  font-weight: 900;
}

.finance-check-note {
  margin: 8px 0 0;
  font-size: 12px;
}

.finance-check-note.ok {
  color: #047857;
}

.finance-check-note.danger {
  color: #b91c1c;
}

.finance-sync-overview {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 0;
  padding: 6px 10px;
  border: 1px solid #dbe7f5;
  border-radius: 12px;
  background: #f8fbff;
}

.finance-sync-overview-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 0;
  border-right: 1px solid #e2e8f0;
  border-radius: 0;
  background: transparent;
  padding: 7px 12px;
  box-shadow: none;
}

.finance-sync-overview-item:last-child {
  border-right: 0;
}

.finance-sync-overview-item span {
  color: #64748b;
  font-size: 12px;
}

.finance-sync-overview-item strong {
  color: #0f172a;
  font-size: 14px;
  font-weight: 900;
}

.finance-sync-overview-item.danger strong {
  color: #dc2626;
}

.finance-message {
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  background: #eff6ff;
  color: #1d4ed8;
  padding: 10px 12px;
  font-size: 13px;
}

.finance-table-wrap {
  overflow: auto;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.04);
}

.finance-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 13px;
}

.finance-table th {
  height: 48px;
  background: #eaf2fb;
  color: #334155;
  text-align: left;
  font-weight: 800;
  padding: 0 14px;
  white-space: nowrap;
  border-bottom: 1px solid #dbe7f5;
}

.finance-table td {
  border-top: 1px solid #e2e8f0;
  padding: 15px 14px;
  color: #1e293b;
  vertical-align: middle;
}

.finance-table tbody tr:hover td {
  background: #f6f8fb;
}

.finance-table td span {
  display: block;
  margin-top: 4px;
  color: #64748b;
  font-size: 12px;
}

.finance-amount.positive {
  color: #047857;
}

.finance-amount.negative {
  color: #dc2626;
}

.finance-amount.neutral {
  color: #1f2937;
}

.finance-amount.orange {
  color: #b45309;
}

.finance-state-pill {
  display: inline-flex !important;
  align-items: center;
  width: fit-content;
  margin-top: 0 !important;
  border-radius: 999px;
  background: #eef4ff;
  color: #2563eb !important;
  padding: 3px 9px;
  font-size: 12px;
  font-weight: 700;
}

.finance-state-pill.ok {
  background: #dcfce7;
  color: #15803d !important;
}

.finance-state-pill.warn {
  background: #fef3c7;
  color: #b45309 !important;
}

.finance-state-pill.danger {
  background: #fee2e2;
  color: #dc2626 !important;
}

.finance-state-pill.neutral {
  background: #f1f5f9;
  color: #475569 !important;
}

.finance-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid #e2e8f0;
  padding-top: 4px;
}

.finance-tab {
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: #64748b;
  padding: 11px 14px;
  border-radius: 10px 10px 0 0;
  font-weight: 700;
  cursor: pointer;
}

.finance-tab:hover {
  color: #2563eb;
  background: #eff6ff;
}

.finance-tab.active {
  border-bottom-color: #2563eb;
  background: #f8fbff;
  color: #2563eb;
}

.finance-tab-panel {
  display: grid;
  gap: 10px;
}

.finance-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.finance-section-head h3 {
  margin: 0;
  color: #0f172a;
  font-size: 16px;
}

.finance-section-head span {
  color: #64748b;
  font-size: 12px;
}

.finance-empty-cell {
  padding: 28px 12px !important;
}

.finance-empty-cell strong,
.finance-empty-cell span {
  display: block;
}

.finance-empty-cell strong {
  color: #0f172a;
  margin-bottom: 6px;
}

.finance-empty-cell span {
  color: #64748b;
  font-size: 12px;
}

.finance-store-table {
  min-width: 1040px;
}

.finance-detail-table,
.finance-log-table {
  min-width: 1180px;
}

.finance-sync-log {
  border-top: 1px solid #e2e8f0;
  padding-top: 12px;
}

.finance-sync-log h3 {
  margin: 0 0 10px;
  color: #0f172a;
  font-size: 15px;
}

.finance-sync-log-list {
  display: grid;
  gap: 8px;
}

.finance-log-item {
  display: grid;
  grid-template-columns: 160px 1fr auto;
  gap: 12px;
  align-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 9px 12px;
  background: #fff;
  color: #334155;
  font-size: 12px;
}

.finance-log-item.failed {
  border-color: #fecaca;
  background: #fff7f7;
}

.finance-log-item em,
.finance-log-empty {
  color: #64748b;
  font-style: normal;
}

@media (max-width: 900px) {
  .finance-head,
  .finance-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .finance-toolbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .finance-filter-left {
    flex: 1 1 100%;
  }

  .finance-toolbar .finance-search {
    width: min(320px, 100%);
  }

  .finance-sync-right {
    width: 100%;
  }

  .finance-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-summary-heading {
    flex-direction: column;
  }

  .finance-account-badges {
    align-items: flex-start;
  }

  .finance-summary-heading em {
    max-width: none;
    text-align: left;
  }

  .finance-account-details {
    grid-template-columns: 1fr;
  }

  .finance-sync-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .finance-log-item {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 1280px) {
  .finance-summary-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .finance-summary-grid,
  .finance-sync-overview {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
