/* ==========================================================================
   Orders Dashboard — e-shop administration UI
   ========================================================================== */

:root {
  --sidebar-w: 104px;
  --topbar-h: 54px;
  --gutter: 90px;
  --radius-card: 14px;
  --radius-ctl: 9px;

  --bg: #ffffff;
  --panel: #ffffff;
  --sidebar-bg: #f4f5f7;
  --muted-bg: #f9fafb;
  --border: #e8eaee;
  --border-ctl: #e2e5ea;
  --text: #111827;
  --text-2: #6b7280;
  --text-3: #9ca3af;

  --blue: #3b82f6;
  --green: #22c55e;
  --amber: #f59e0b;
  --red: #ef4444;
  --violet: #8b5cf6;
  --up: #16a34a;
  --down: #dc2626;

  --tint-blue: #eef4ff;
  --tint-green: #e9f9f0;
  --tint-amber: #fef6e7;
  --tint-red: #fdeeee;
  --tint-violet: #f3eeff;

  --pill-green-bg: #e7f8ef;
  --pill-green-tx: #157f45;
  --pill-amber-bg: #fdf1d8;
  --pill-amber-tx: #a86609;
  --pill-red-bg: #fdeaea;
  --pill-red-tx: #b8242a;
  --pill-gray-bg: #f1f2f4;
  --pill-gray-tx: #6b7280;
  --pill-blue-bg: #eef4ff;
  --pill-blue-tx: #2563eb;
  --pill-violet-bg: #f3eeff;
  --pill-violet-tx: #6d28d9;

  --grid-line: #f0f1f4;
  --shadow-sm: 0 1px 2px rgba(16, 24, 40, .04);
  --shadow-md: 0 8px 24px rgba(16, 24, 40, .10);
}

[data-theme="dark"] {
  --bg: #0e1116;
  --panel: #151a22;
  --sidebar-bg: #101419;
  --muted-bg: #1a202a;
  --border: #242b36;
  --border-ctl: #2a323f;
  --text: #e8eaf0;
  --text-2: #98a2b3;
  --text-3: #6b7686;

  --tint-blue: #16233a;
  --tint-green: #133026;
  --tint-amber: #33270f;
  --tint-red: #351b1c;
  --tint-violet: #24183a;

  --pill-green-bg: #10301f;
  --pill-green-tx: #4ade80;
  --pill-amber-bg: #34260e;
  --pill-amber-tx: #fbbf24;
  --pill-red-bg: #351a1b;
  --pill-red-tx: #f87171;
  --pill-gray-bg: #2a3038;
  --pill-gray-tx: #98a2b3;
  --pill-blue-bg: #16233a;
  --pill-blue-tx: #60a5fa;
  --pill-violet-bg: #24183a;
  --pill-violet-tx: #a78bfa;

  --grid-line: #1e242e;
  --shadow-md: 0 10px 30px rgba(0, 0, 0, .45);
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

p, h1, h2, h3, ul { margin: 0; padding: 0; }
ul { list-style: none; }
button { font: inherit; color: inherit; }

.i {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.ta-right { text-align: right; }

/* ---------------------------------------------------------------- layout */

.app { display: flex; min-height: 100vh; }

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

/* --------------------------------------------------------------- sidebar */

.sidebar {
  width: var(--sidebar-w);
  flex: none;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 22px 0 20px;
  position: sticky;
  top: 0;
  height: 100vh;
  z-index: 40;
}

.sidebar-nav,
.sidebar-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.nav-item {
  position: relative;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 11px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: none;
  transition: background .15s, color .15s, border-color .15s;
}

.nav-item .i { width: 19px; height: 19px; }
.nav-item:hover { color: var(--text); background: rgba(17, 24, 39, .05); }
[data-theme="dark"] .nav-item:hover { background: rgba(255, 255, 255, .06); }

.nav-item.is-active {
  background: var(--panel);
  border-color: var(--border-ctl);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}

.nav-item[data-tip]::after {
  content: attr(data-tip);
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  background: #111827;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 60;
}
.nav-item[data-tip]:hover::after { opacity: 1; }

#themeToggle .icon-sun { display: none; }
[data-theme="dark"] #themeToggle .icon-moon { display: none; }
[data-theme="dark"] #themeToggle .icon-sun { display: block; }

/* ---------------------------------------------------------------- topbar */

.topbar {
  height: var(--topbar-h);
  flex: none;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 var(--gutter);
  background: var(--bg);
}

.burger {
  display: none;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border-ctl);
  border-radius: 9px;
  background: var(--panel);
  place-items: center;
  cursor: pointer;
}

.topbar-search {
  flex: 1;
  min-width: 0;
  height: 34px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-3);
  transform: translateY(5px);
}

.topbar-search .i {
  width: 18px;
  height: 18px;
  display: block;
}

.topbar-search input {
  flex: 1;
  min-width: 0;
  height: 34px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 13.5px;
  line-height: 34px;
  color: var(--text);
}
.topbar-search input::placeholder { color: var(--text-3); }

.topbar-right {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 34px;
  transform: translateY(5px);
}

.bell {
  position: relative;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  flex: none;
}
.bell:hover { background: var(--muted-bg); color: var(--text); }
.bell .i { width: 18px; height: 18px; display: block; }

.bell-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--red);
  border: 1.5px solid var(--bg);
}

.user {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 34px;
}

.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--text-2);
  flex: none;
}
.avatar .i { width: 17px; height: 17px; display: block; }

.user-name {
  font-size: 13px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.btn-logout {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  flex: none;
}
.btn-logout:hover { background: var(--muted-bg); color: var(--text); }
.btn-logout .i { width: 18px; height: 18px; display: block; }

/* --------------------------------------------------------------- content */

.content {
  flex: 1;
  padding: 14px var(--gutter) 34px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

body[data-page="orders"] .content,
body[data-page="products"] .content,
body[data-page="pages"] .content,
body[data-page="categories"] .content,
body[data-page="customers"] .content {
  padding-top: 12px;
  gap: 20px;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-head-stack {
  flex-direction: column;
  align-items: stretch;
}

.page-head-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.page-tabs {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  min-width: 0;
}

.page-tab {
  appearance: none;
  background: none;
  border: 0;
  border-bottom: 2px solid transparent;
  padding: 2px 0 8px;
  font: inherit;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}

.page-tab:hover { color: var(--text); }

.page-tab.is-active {
  font-weight: 600;
  color: var(--text);
  border-bottom-color: var(--text);
}

.page-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
}

.page-title-shop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  color: var(--text-3);
  text-decoration: none;
  transition: background .15s, color .15s;
}

.page-title-shop .i { width: 15px; height: 15px; }

.page-title-shop:hover {
  color: var(--blue);
  background: var(--tint-blue);
}

.page-sub {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--text-2);
}

.btn-back {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  flex: none;
  transform: translateY(5px);
  box-shadow: var(--shadow-sm);
  transition: background .15s, border-color .15s;
}

.btn-back .i {
  width: 15px;
  height: 15px;
  display: block;
}

.btn-back:hover {
  background: var(--muted-bg);
  border-color: var(--text-3);
}

.breadcrumb {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: -.01em;
  color: var(--text);
  transform: translateY(5px);
}

.breadcrumb-link {
  color: var(--text-2);
  text-decoration: none;
  transition: color .15s;
}

.breadcrumb-link:hover { color: var(--text); }

.breadcrumb-sep {
  width: 13px;
  height: 13px;
  color: var(--text-3);
  display: block;
  flex: none;
}

.breadcrumb-current { color: var(--text); }

.page-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-inverse {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid #111827;
  border-radius: var(--radius-ctl);
  background: #111827;
  color: #fff;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s, opacity .15s;
}

.btn-inverse .i {
  width: 14px;
  height: 14px;
  color: currentColor;
}

.btn-inverse:hover {
  background: #1f2937;
  border-color: #1f2937;
}

[data-theme="dark"] .btn-inverse {
  background: #e8eaf0;
  border-color: #e8eaf0;
  color: #111827;
}

[data-theme="dark"] .btn-inverse:hover {
  background: #fff;
  border-color: #fff;
}

/* ------------------------------------------------------ generic controls */

.card {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.dropdown { position: relative; }

.select {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 34px;
  padding: 0 11px;
  background: var(--panel);
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-ctl);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, background .15s;
}
.select:hover { border-color: var(--text-3); }
.select .i { width: 15px; height: 15px; color: var(--text-3); flex: none; }
.select [data-dd-label] {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.select-sm {
  height: 31px;
  gap: 8px;
  padding: 0 9px 0 10px;
  font-size: 12px;
}

.dd-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 100%;
  z-index: 50;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 11px;
  box-shadow: var(--shadow-md);
  padding: 5px;
  display: none;
  flex-direction: column;
  max-height: min(320px, 70vh);
  overflow-y: auto;
}
.dropdown.is-open .dd-menu { display: flex; }
.dropdown.dd-fixed-open .dd-menu { z-index: 80; }

.dd-menu button {
  text-align: left;
  white-space: nowrap;
  border: 0;
  background: transparent;
  border-radius: 7px;
  padding: 7px 10px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
}
.dd-menu button:hover { background: var(--muted-bg); }
.dd-menu button.is-selected { color: var(--blue); font-weight: 600; }
.dd-menu button:disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

select.fancy-native {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0);
  border: 0 !important;
  opacity: 0 !important;
  pointer-events: none;
  inset: auto;
}

.fancy-select { position: relative; }
.fancy-select.is-disabled { pointer-events: none; opacity: .55; }
.fancy-select .select { width: 100%; }

.dd-in-table {
  display: block;
  width: 100%;
  min-width: 8rem;
}
.dropdown.prod-cat-select {
  min-width: 10.5rem;
  max-width: 14rem;
  width: 100%;
}
.dropdown.prod-vat-select {
  min-width: 5.75rem;
  width: auto;
}
.dropdown.table-pill-select {
  min-width: 11.25rem;
  width: auto;
  max-width: 100%;
}

.dd-toolbar {
  width: auto;
  min-width: 7.5rem;
  flex: none;
}
.dd-toolbar .select { min-width: 7.5rem; }
.dd-toolbar .dd-menu { left: 0; right: auto; }

.dd-pill { width: 100%; }
.dd-pill-inline {
  width: auto;
  min-width: 8.75rem;
  max-width: min(16rem, 58%);
  margin-left: auto;
  flex: 0 1 auto;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: none;
  display: inline-block;
}
.dot-blue { background: var(--blue); }
.dot-green { background: var(--green); }
.dot-amber { background: var(--amber); }
.dot-red { background: var(--red); }

/* ----------------------------------------------------------- stat cards */

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
  transition: border-color .18s ease, background .18s ease;
}

.stat:hover {
  border-color: var(--text-3);
  background: var(--muted-bg);
}

.stat-icon {
  width: 44px;
  height: 44px;
  flex: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
}
.stat-icon .i { width: 20px; height: 20px; stroke-width: 2; }

.tint-blue   { background: var(--tint-blue);   color: var(--blue); }
.tint-green  { background: var(--tint-green);  color: var(--green); }
.tint-amber  { background: var(--tint-amber);  color: var(--amber); }
.tint-red    { background: var(--tint-red);    color: var(--red); }
.tint-violet { background: var(--tint-violet); color: var(--violet); }

.stat-body { min-width: 0; }
.stat-label { font-size: 12.5px; color: var(--text-2); }
.stat-value { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; font-variant-numeric: tabular-nums; }
.stat-delta { font-size: 11.5px; font-weight: 600; }
.stat-delta.up { color: var(--up); }
.stat-delta.down { color: var(--down); }

/* --------------------------------------------------------------- charts */

.charts {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 16px;
  align-items: stretch;
}

.chart-card {
  padding: 18px 20px 14px;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-width: 0;
}

.chart-donut,
.products-card { min-height: 236px; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title { font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }

.legend-inline {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-2);
}
.legend-inline .dot { width: 7px; height: 7px; }

.chart-line-wrap {
  position: relative;
  margin-top: 6px;
  flex: 1;
  min-height: 168px;
}

#lineChart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 168px;
  overflow: visible;
}

.grid-h { stroke: var(--grid-line); stroke-width: 1; }
.grid-v { stroke: var(--grid-line); stroke-width: 1; }
.axis-label { fill: var(--text-3); font-size: 10.5px; font-family: inherit; }
.line-path {
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.2;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.line-area { fill: url(#lineFade); }
.line-hot { fill: transparent; cursor: crosshair; }
.line-cursor { stroke: var(--border-ctl); stroke-width: 1; stroke-dasharray: 3 3; opacity: 0; }
.line-end-dot { fill: var(--blue); stroke: var(--panel); stroke-width: 2.5; }
.line-end-label { fill: var(--text); font-size: 11px; font-weight: 600; font-family: inherit; }
.line-hover-dot { fill: var(--blue); stroke: var(--panel); stroke-width: 2.5; opacity: 0; }

.line-tooltip {
  position: absolute;
  z-index: 20;
  transform: translate(-50%, -140%);
  background: #111827;
  color: #fff;
  font-size: 11.5px;
  font-weight: 500;
  padding: 5px 9px;
  border-radius: 7px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity .12s;
}

.donut-row {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 10px;
  padding-bottom: 2px;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.donut-wrap {
  position: relative;
  flex: 1 1 auto;
  min-width: 0;
  min-height: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.donut {
  display: block;
  height: 100%;
  width: auto;
  max-width: 100%;
  aspect-ratio: 1 / 1;
  transform: rotate(-90deg);
}
.donut-track { fill: none; stroke: transparent; stroke-width: 28; }

.donut-seg {
  fill: none;
  transition: opacity .15s;
}
.donut-seg:hover { opacity: .82; }
.seg-m09 { fill: var(--blue); }
.seg-m08 { fill: var(--green); }
.seg-m07 { fill: var(--amber); }

.donut-legend {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  flex: none;
  min-width: 0;
}
.donut-legend li { display: flex; align-items: flex-start; gap: 8px; }
.donut-legend .dot { margin-top: 4px; }
.lg-name { font-size: 12px; font-weight: 600; }
.lg-val { font-size: 10.5px; color: var(--text-2); }

.chart-donut > .link-all {
  margin-top: auto;
  align-self: flex-end;
  padding-top: 8px;
  margin-bottom: 3px;
}

/* ------------------------------------------------------ top products */

.product-list {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0;
  margin-top: 8px;
}

.product-item {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) auto;
  grid-template-areas:
    "rank name sold"
    "rank meta sold";
  column-gap: 8px;
  row-gap: 1px;
  align-items: center;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.product-item:last-child { border-bottom: 0; }

.product-rank {
  grid-area: rank;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  display: grid;
  place-items: center;
}

.product-name {
  grid-area: name;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.product-sold {
  grid-area: sold;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.product-meta {
  grid-area: meta;
  font-size: 11px;
  color: var(--text-2);
  line-height: 1.3;
}

/* -------------------------------------------------------- order history */

.orders {
  display: flex;
  flex-direction: column;
}

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

.orders > .card {
  overflow: hidden;
}

.section-title { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }

.link-all {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}
.link-all:hover { text-decoration: underline; }
.link-all .i { width: 14px; height: 14px; }

.filters {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 200px;
  max-width: 250px;
  height: 33px;
  padding: 0 11px;
  background: var(--panel);
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-ctl);
  color: var(--text-3);
}
.filter-search .i { width: 15px; height: 15px; }
.filter-search input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 12.5px;
  color: var(--text);
}
.filter-search input::placeholder { color: var(--text-3); }

.btn-filters {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 33px;
  padding: 0 12px;
  background: var(--panel);
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-ctl);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-filters:hover { border-color: var(--text-3); }
.btn-filters .i { width: 15px; height: 15px; color: var(--text-2); }

.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
}

.table thead th {
  background: var(--muted-bg);
  border-bottom: 1px solid var(--border);
  padding: 10px 18px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
}

.table tbody td {
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  font-size: 12.5px;
  vertical-align: middle;
  white-space: nowrap;
}
body[data-page="products"] .table tbody tr:not(.empty-row) td {
  height: 56px;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--muted-bg); }
.table tbody tr.is-selected { background: var(--tint-blue); }
.table tbody tr.is-selected:hover { background: var(--tint-blue); }

.table thead th.cell-open,
.table tbody td.cell-open {
  width: 44px;
  padding-left: 12px;
  padding-right: 0;
}
.table thead th.cell-check,
.table tbody td.cell-check {
  width: 40px;
  padding-left: 14px;
  padding-right: 0;
}

.check {
  position: relative;
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  margin: 0;
  cursor: pointer;
}
.check input {
  position: absolute;
  inset: 0;
  z-index: 1;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.check-ui {
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--border-ctl);
  border-radius: 4px;
  background: var(--panel);
  display: grid;
  place-items: center;
  pointer-events: none;
  transition: background .12s, border-color .12s;
}
.check input:hover + .check-ui { border-color: var(--text-3); }
.check input:checked + .check-ui,
.check input:indeterminate + .check-ui {
  background: var(--blue);
  border-color: var(--blue);
}
.check input:checked + .check-ui::after {
  content: '';
  width: 5.5px;
  height: 3px;
  margin-top: -1px;
  border: 1.8px solid #fff;
  border-top: 0;
  border-right: 0;
  transform: rotate(-45deg);
}
.check input:indeterminate + .check-ui::after {
  content: '';
  width: 6px;
  height: 0;
  border: 0;
  border-bottom: 1.8px solid #fff;
  transform: none;
  margin: 0;
}
.check input:focus-visible + .check-ui {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.select-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
}
.select-info[hidden] { display: none; }
.select-clear {
  border: 0;
  background: none;
  padding: 0;
  color: var(--text-2);
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
.select-clear:hover { color: var(--text); }

.cell-id {
  font-weight: 500;
  color: var(--text);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  width: 1%;
}
.cell-ship, .cell-pay {
  color: var(--text-2);
  font-size: 12.5px;
  white-space: nowrap;
}
.cust-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.cust-mail { font-size: 10.5px; color: var(--text-3); line-height: 1.35; }
.cust-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cust-cell > div { min-width: 0; }
.cust-ava {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: -.03em;
  color: #fff;
  flex: none;
}
.cust-ava-lg {
  width: 36px;
  height: 36px;
  font-size: 12px;
}
.cust-ava[data-tone="0"] { background: #4f46e5; }
.cust-ava[data-tone="1"] { background: #0284c7; }
.cust-ava[data-tone="2"] { background: #0f766e; }
.cust-ava[data-tone="3"] { background: #c2410c; }
.cust-ava[data-tone="4"] { background: #7c3aed; }
.cust-ava[data-tone="5"] { background: #be185d; }
.cell-date, .cell-product, .cell-stock, .cell-sold { color: var(--text-2); }
.cell-items { width: 1%; }
.count-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 26px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tint-blue);
  color: var(--blue);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.cell-amount { font-weight: 600; text-align: right; }
.cell-paid { width: 1%; }
.paid-cell {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.paid-input {
  width: 7.25rem;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.paid-input:hover { border-color: var(--text-3); }
.paid-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.paid-suffix {
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
}
.paid-full.is-paid {
  color: var(--pill-green-tx);
  border-color: var(--pill-green-tx);
  background: var(--pill-green-bg);
}
.paid-full:disabled {
  opacity: .75;
  cursor: default;
}

.table-pill-select {
  width: auto;
  min-width: 11.25rem;
  max-width: 100%;
}
.table-carrier-select {
  appearance: none;
  height: 28px;
  padding: 0 26px 0 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background-color: var(--panel);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
  color: var(--text);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  outline: 0;
}
.table-carrier-select:hover { border-color: var(--text-3); }
.table-carrier-select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.prod-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 31px;
}
.prod-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.prod-cat { font-size: 10.5px; color: var(--text-3); line-height: 1.35; }
.pg-url {
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.cat-name {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.cat-name .i {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  color: var(--text-3);
  flex: none;
}
.cat-name.is-l2 { padding-left: 22px; }
.cat-name.is-l3 { padding-left: 44px; }
.cat-cover {
  height: 140px;
  border: 1px dashed var(--border-ctl);
  border-radius: 10px;
  background: var(--muted-bg);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
.cat-cover .i {
  width: 28px;
  height: 28px;
  color: var(--text-3);
}
.cat-cover.has-image {
  border-style: solid;
}
.cat-cover.has-image .i { display: none; }

.table thead th.cell-flag,
.table tbody td.cell-flag {
  text-align: center;
  width: 1%;
}
.table tbody td.cell-flag .check {
  width: 26px;
  height: 26px;
}
.table tbody td.cell-flag .check-ui {
  width: 19px;
  height: 19px;
  border-radius: 5px;
}
.table tbody td.cell-flag .check input:checked + .check-ui::after {
  width: 7px;
  height: 4px;
  border-width: 2px;
}

.hp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 14px;
  align-items: start;
}
.hp-col-main,
.hp-col-side {
  min-width: 0;
}
.hp-col-main > .card { overflow: hidden; }
.hp-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  align-self: start;
}
.hp-flag-card { overflow: hidden; }
.hp-flag-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 14px 10px;
}
.hp-flag-list {
  max-height: 220px;
  overflow-y: auto;
}
.hp-flag-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px 8px 14px;
  border-top: 1px solid var(--border);
}
.hp-flag-open {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hp-flag-open:hover .hp-flag-name { color: var(--blue); }
.hp-flag-name {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.hp-flag-sku {
  font-size: 10.5px;
  color: var(--text-3);
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}
.hp-flag-remove {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.hp-flag-remove:hover {
  background: var(--muted-bg);
  color: var(--text);
}
.hp-flag-remove .i { width: 13px; height: 13px; pointer-events: none; }
.hp-flag-empty {
  padding: 12px 14px 14px;
  color: var(--text-3);
  font-size: 12px;
}
.prod-cat-select {
  min-width: 10.5rem;
  max-width: 14rem;
  width: 100%;
}
.prod-vat-select {
  min-width: 5.75rem;
  width: auto;
}
.prod-price-cell { width: 1%; }
.prod-price-field { display: inline-flex; }
.prod-price-input {
  width: 92px;
  height: 28px;
  font-size: 12.5px;
}
.prod-margin-cell {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.prod-margin-pct {
  display: block;
  font-weight: 600;
}
.prod-margin-abs {
  display: block;
  margin-top: 2px;
  font-size: 10.5px;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1.35;
}
.prod-margin-cell.is-negative .prod-margin-pct {
  color: var(--down);
}

.pill {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
}
.pill-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 10px 0 5px;
  font-size: 12px;
  line-height: 1;
}
.pill-ico-svg {
  width: 16px;
  height: 16px;
  flex: none;
  display: block;
  overflow: visible;
}
.pill-ico-bg {
  fill: currentColor;
  stroke: none;
}
.pill-ico-svg path,
.pill-ico-svg .pill-ico-mark {
  fill: none;
  stroke: #fff;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pill.pending .pill-ico-svg path,
.pill.pending .pill-ico-svg .pill-ico-mark,
.pill.low .pill-ico-svg path,
.pill.low .pill-ico-svg .pill-ico-mark {
  stroke-width: 1.55;
}
.pill.completed { background: var(--pill-green-bg); color: var(--pill-green-tx); }
.pill.pending   { background: var(--pill-amber-bg); color: var(--pill-amber-tx); }
.pill.cancelled { background: var(--pill-red-bg);   color: var(--pill-red-tx); }
.pill.in  { background: var(--pill-green-bg); color: var(--pill-green-tx); }
.pill.low { background: var(--pill-amber-bg); color: var(--pill-amber-tx); }
.pill.out { background: var(--pill-red-bg);   color: var(--pill-red-tx); }

.row-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.act {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: color .15s, border-color .15s, background .15s;
}
.act:hover {
  color: var(--text);
  background: var(--muted-bg);
  border-color: var(--text-3);
}
.act .i { width: 14px; height: 14px; pointer-events: none; }

.empty-row td {
  padding: 34px 16px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}

.table-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 18px;
  background: var(--muted-bg);
  border-top: 1px solid var(--border);
  border-radius: 0 0 var(--radius-card) var(--radius-card);
  flex-wrap: wrap;
}

.foot-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  min-width: 0;
}
.foot-info { font-size: 12px; color: var(--text-2); }

.pager { display: flex; align-items: center; gap: 8px; margin-left: auto; }

.pager button {
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.pager button:hover:not(:disabled) { background: var(--panel); color: var(--text); }
.pager button.is-active {
  background: var(--panel);
  border-color: var(--border-ctl);
  color: var(--text);
  box-shadow: var(--shadow-sm);
}
.pager button:disabled { opacity: .4; cursor: default; }
.pager .i { width: 14px; height: 14px; }
.pager .gap { color: var(--text-3); cursor: default; }

/* -------------------------------------------------------- order detail */

body[data-page="order"] {
  background: var(--muted-bg);
}

body[data-page="order"] .topbar,
body[data-page="order"] .content {
  background: var(--muted-bg);
}

body[data-page="order"] .content {
  gap: 18px;
}

.od-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.od-title-row { display: flex; align-items: center; gap: 10px; }

.od-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
}

.od-id-input {
  width: 18ch;
  min-width: 10ch;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  font: inherit;
  font-weight: 700;
  letter-spacing: -.03em;
  color: inherit;
  padding: 2px 6px;
  margin-left: -6px;
}
.od-id-input:hover,
.od-id-input:focus {
  border-color: var(--border-ctl);
  background: var(--panel);
  outline: 0;
}

.od-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  font-size: 13px;
  color: var(--text-2);
}

.od-inline-input {
  width: 16ch;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 2px 6px;
}
.od-inline-input:hover,
.od-inline-input:focus {
  border-color: var(--border-ctl);
  background: var(--panel);
  outline: 0;
}

.od-head-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-ctl);
  background: var(--panel);
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, background .15s;
}
.btn-outline:hover { border-color: var(--text-3); background: var(--muted-bg); }
.btn-outline .i { width: 14px; height: 14px; color: var(--text-2); }

.btn-icon {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-ctl);
  border-radius: var(--radius-ctl);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.btn-icon:hover { color: var(--text); border-color: var(--text-3); }
.btn-icon .i { width: 16px; height: 16px; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 10px;
  border: 1px dashed var(--border-ctl);
  border-radius: var(--radius-ctl);
  background: transparent;
  color: var(--text-2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.btn-ghost:hover { color: var(--text); border-color: var(--text-3); background: var(--panel); }
.btn-ghost .i { width: 14px; height: 14px; }

.od-input,
.od-pill-select {
  font: inherit;
  color: inherit;
}

.od-input {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  font-size: 13px;
  outline: 0;
  transition: border-color .15s, box-shadow .15s;
}
.od-input:hover { border-color: var(--text-3); }
.od-input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}

.od-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.od-label { font-size: 11px; font-weight: 500; color: var(--text-3); }

.od-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: stretch;
}

.od-sum-card {
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.od-sum-card .od-input {
  height: 32px;
  font-size: 12.5px;
  padding: 0 8px;
}

.od-sum-customer {
  justify-content: flex-start;
}

.od-cust-actions {
  margin-top: auto;
  align-self: flex-end;
  display: flex;
  align-items: center;
  gap: 6px;
  padding-top: 8px;
}

.od-cust-btn {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color .15s, color .15s, background .15s;
}
.od-cust-btn:hover,
.od-cust-msg.is-open .od-cust-btn {
  color: var(--text);
  border-color: var(--text-3);
}
.od-cust-btn .i { width: 15px; height: 15px; }

.od-cust-msg { position: relative; }
.od-cust-msg-menu {
  top: auto;
  bottom: calc(100% + 6px);
  right: 0;
  left: auto;
  min-width: 248px;
  padding: 10px;
  display: none;
  flex-direction: column;
  gap: 8px;
}
.od-cust-msg.is-open .od-cust-msg-menu {
  display: flex;
}
.od-cust-msg-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
}
.od-cust-msg-text {
  width: 100%;
  min-height: 72px;
  resize: vertical;
  padding: 8px 9px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  color: inherit;
  font: inherit;
  font-size: 12.5px;
  outline: 0;
}
.od-cust-msg-text:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.od-cust-msg-menu .od-cust-msg-send {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  width: 100%;
  padding: 0 12px;
  border: 1px solid var(--border-ctl);
  background: var(--panel);
  color: var(--text);
  font-weight: 500;
  white-space: nowrap;
}
.od-cust-msg-menu .od-cust-msg-send:hover {
  background: var(--muted-bg);
  color: var(--text);
}

.od-cust-orders {
  position: relative;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--tint-blue);
  color: var(--blue);
}
.od-cust-orders .i { width: 15px; height: 15px; }
.od-cust-orders-n {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: var(--blue);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.od-cust-name {
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -.02em;
  line-height: 1.25;
  margin-top: 2px;
}
.od-cust-name[data-open-customer] {
  cursor: pointer;
}
.od-cust-name[data-open-customer]:hover {
  text-decoration: underline;
}

.od-cust-line {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.35;
}

.od-cust-line .i {
  width: 14px;
  height: 14px;
  color: var(--text-3);
}

.od-cust-line span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.od-sum-split {
  padding: 0;
  gap: 0;
}

.od-sum-block {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.od-sum-payments {
  border-top: 1px solid var(--border);
  flex: 1;
}

.od-sum-top { display: flex; }

.od-sum-head .od-pill-select-inline,
.od-sum-head .dd-pill-inline {
  width: auto;
  min-width: 8.75rem;
  max-width: min(16rem, 58%);
  margin-left: auto;
  flex: 0 1 auto;
}

.od-sum-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.od-pill-select {
  appearance: none;
  width: 100%;
  height: 26px;
  padding: 0 28px 0 10px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23157f45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
  background-repeat: no-repeat;
  background-position: right 8px center;
}
.od-pill-select[data-pay="paid"],
.od-pill-select[data-status="completed"] { background-color: var(--pill-green-bg); color: var(--pill-green-tx); }
.od-pill-select[data-pay="pending"],
.od-pill-select[data-status="prepared"] {
  background-color: var(--pill-amber-bg); color: var(--pill-amber-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23a86609' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-pay="refunded"],
.od-pill-select[data-pay="failed"] {
  background-color: var(--pill-red-bg); color: var(--pill-red-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23b8242a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-status="received"] {
  background-color: var(--tint-blue); color: var(--blue);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%233b82f6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-status="shipped"] {
  background-color: var(--tint-violet); color: var(--violet);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%238b5cf6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="unshipped"] {
  background-color: var(--pill-gray-bg); color: var(--pill-gray-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="preparing"] {
  background-color: var(--pill-amber-bg); color: var(--pill-amber-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23a86609' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="ready"] {
  background-color: var(--pill-blue-bg); color: var(--pill-blue-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%232563eb' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="shipped"] {
  background-color: var(--pill-violet-bg); color: var(--pill-violet-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%236d28d9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="delivered"] {
  background-color: var(--pill-green-bg); color: var(--pill-green-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23157f45' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select[data-ship="problem"] {
  background-color: var(--pill-red-bg); color: var(--pill-red-tx);
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23b8242a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m3 4.5 3 3 3-3'/></svg>");
}
.od-pill-select.table-pill-select {
  width: auto;
  min-width: 11.25rem;
  max-width: 100%;
}

button.select.od-pill-select {
  appearance: none;
  width: 100%;
  height: 26px;
  padding: 0 10px;
  gap: 8px;
  border: 0;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  background-image: none;
  justify-content: space-between;
}
button.select.od-pill-select .i {
  width: 12px;
  height: 12px;
  color: currentColor;
  flex: none;
}
button.select.od-pill-select.table-pill-select { width: 100%; }
button.select.od-pill-select[data-pay],
button.select.od-pill-select[data-status],
button.select.od-pill-select[data-ship] {
  background-image: none;
}

.od-sum-label { font-size: 12.5px; color: var(--text-2); }
.od-sum-amount {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex: none;
}

.od-sum-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}
.od-sum-kicker { font-size: 13.5px; font-weight: 600; }

.od-ico {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}
.od-ico .i { width: 15px; height: 15px; }

.od-track-link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  color: var(--blue);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
}
.od-track-link:hover { text-decoration: underline; }
.od-track-link .i { width: 14px; height: 14px; }

.od-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 14px;
  align-items: start;
}
.od-layout[hidden],
.pd-panel-placeholder[hidden],
.btn-outline[hidden],
.btn-inverse[hidden] {
  display: none !important;
}

.od-col-main,
.od-col-side {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
.od-col-side {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.od-card { padding: 16px 18px 18px; }
.od-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.od-card-head .card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.od-count {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 11.5px;
  font-weight: 600;
}

.od-table-wrap { overflow-x: auto; margin: 0 -6px; }

.od-table {
  width: 100%;
  border-collapse: collapse;
}
.od-table th {
  padding: 0 10px 10px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.od-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
  font-size: 13px;
}
.od-table tbody tr:last-child td { border-bottom: 0; }
.od-table tbody tr:hover { background: transparent; }

.od-product {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 220px;
}
.od-product-fields {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  flex: 1;
}

.od-thumb {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex: none;
  border: 1px solid var(--border);
  background: var(--muted-bg) center / cover no-repeat;
}
.od-thumb-mug {
  background:
    radial-gradient(circle at 62% 42%, #f3e6d4 0 7px, transparent 8px),
    linear-gradient(180deg, #efe4d4 40%, #d9c4a8 100%);
}
.od-thumb-bottle {
  background:
    linear-gradient(180deg, transparent 8px, #5eb8c4 8px 34px, transparent 34px),
    linear-gradient(180deg, #e8f4f6, #d5eef1);
}
.od-thumb-pack {
  background:
    linear-gradient(180deg, #1e3a5f 0 12px, #2a4d78 12px 100%);
}
.od-thumb-new {
  background:
    linear-gradient(135deg, var(--tint-blue), #dbeafe);
}

.od-input-name { font-weight: 600; height: 32px; }
.od-input-sku { height: 28px; font-size: 11.5px; color: var(--text-2); }

.od-stepper {
  display: inline-flex;
  align-items: center;
  height: 34px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel);
}
.od-step {
  width: 28px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.od-step:hover { background: var(--muted-bg); color: var(--text); }
.od-step .i { width: 12px; height: 12px; }
.od-qty {
  width: 42px;
  height: 32px;
  border: 0;
  border-left: 1px solid var(--border-ctl);
  border-right: 1px solid var(--border-ctl);
  text-align: center;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  color: inherit;
  background: transparent;
  outline: 0;
  -moz-appearance: textfield;
}
.od-qty::-webkit-outer-spin-button,
.od-qty::-webkit-inner-spin-button { appearance: none; }
.od-money .od-input { -moz-appearance: textfield; }
.od-money .od-input::-webkit-outer-spin-button,
.od-money .od-input::-webkit-inner-spin-button { appearance: none; }

.od-money {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-2);
  font-size: 12px;
}
.od-money .od-input { width: 96px; text-align: right; font-variant-numeric: tabular-nums; }
.od-money-sm .od-input { width: 84px; height: 30px; font-size: 12.5px; }
.od-money-sm .prod-price-input { height: 28px; }
.od-minus { color: var(--up); font-weight: 600; }

.od-line-total {
  font-weight: 600;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.od-items-foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-top: 8px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.od-totals {
  min-width: 260px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.od-totals > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  font-size: 13px;
}
.od-totals dt { color: var(--text-2); }
.od-totals dd { margin: 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.od-discount-row dd,
.od-discount-row .od-minus { color: var(--up); }
.od-total-row {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.od-total-row dt,
.od-total-row dd { font-size: 14.5px; color: var(--text); }
.od-total-row strong { font-size: 16px; letter-spacing: -.02em; }
.od-total-usd {
  display: block;
  margin-top: 2px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  text-align: right;
}

.od-addresses {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.od-addr-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.od-span-2 { grid-column: 1 / -1; }

.od-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.od-check input { accent-color: var(--blue); }

.od-addr-grid.is-locked .od-input {
  background: var(--muted-bg);
  color: var(--text-2);
}

.od-timeline {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.od-step-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  column-gap: 10px;
  align-items: center;
  position: relative;
  padding: 0 0 18px;
}
.od-step-row:last-child { padding-bottom: 0; }
.od-step-row:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 32px;
  bottom: 0;
  width: 2px;
  background: var(--border);
}
.od-step-row.is-waiting:not(:last-child)::before { background: var(--border); }
.od-step-row.is-done:not(:last-child)::before { background: #86efac; }

.od-tl-ico {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  z-index: 1;
  background: var(--muted-bg);
  color: var(--text-3);
  border: 1px solid transparent;
}
.od-tl-ico .i { width: 15px; height: 15px; }
.od-tl-ico-green {
  background: var(--tint-green);
  color: var(--green);
}
.od-tl-ico-blue {
  background: var(--tint-blue);
  color: var(--blue);
}
.od-tl-ico-gray {
  background: var(--muted-bg);
  color: var(--text-3);
  border-color: var(--border);
}

.od-tl-title { font-size: 13px; font-weight: 600; line-height: 1.3; }
.od-tl-sub { font-size: 11px; color: var(--text-3); margin-top: 2px; }

.od-status-btn {
  height: 24px;
  padding: 0 10px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  background: var(--muted-bg);
  color: var(--text-2);
  transition: background .15s, color .15s;
}
.od-step-row.is-done .od-status-btn {
  background: var(--pill-green-bg);
  color: var(--pill-green-tx);
}

.od-track {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
}
.od-track .od-ico { flex: none; }
.od-track .od-input { flex: 1; min-width: 0; }
.od-track-btn { flex: none; width: auto; }

.od-history {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.od-history li {
  position: relative;
  padding: 0 0 14px 16px;
}
.od-history li:last-child { padding-bottom: 0; }
.od-history li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: 1.5px solid var(--blue);
  background: var(--panel);
}
.od-history li:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 15px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}
.od-hist-time { font-size: 11px; color: var(--text-3); }
.od-hist-text { font-size: 12.5px; font-weight: 500; margin-top: 2px; }

.od-toast {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%) translateY(12px);
  background: #111827;
  color: #fff;
  font-size: 13px;
  font-weight: 500;
  padding: 10px 16px;
  border-radius: 10px;
  box-shadow: var(--shadow-md);
  opacity: 0;
  pointer-events: none;
  z-index: 80;
  transition: opacity .2s, transform .2s;
}
.od-toast.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

[data-theme="dark"] .od-pill-select[data-pay="paid"],
[data-theme="dark"] .od-pill-select[data-status="completed"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234ade80' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="unshipped"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="preparing"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="ready"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2360a5fa' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="shipped"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23a78bfa' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="delivered"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%234ade80' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] .od-pill-select[data-ship="problem"] { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%23f87171' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] button.select.od-pill-select,
[data-theme="dark"] button.select.od-pill-select[data-pay],
[data-theme="dark"] button.select.od-pill-select[data-status],
[data-theme="dark"] button.select.od-pill-select[data-ship] {
  background-image: none;
}
[data-theme="dark"] .table-carrier-select { background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='none' stroke='%2398a2b3' stroke-width='2' stroke-linecap='round'><path d='m3 4.5 3 3 3-3'/></svg>"); }
[data-theme="dark"] body[data-page="order"],
[data-theme="dark"] body[data-page="product"],
[data-theme="dark"] body[data-page="page"],
[data-theme="dark"] body[data-page="category"],
[data-theme="dark"] body[data-page="customer"] { background: var(--bg); }
[data-theme="dark"] body[data-page="order"] .topbar,
[data-theme="dark"] body[data-page="order"] .content,
[data-theme="dark"] body[data-page="product"] .topbar,
[data-theme="dark"] body[data-page="product"] .content,
[data-theme="dark"] body[data-page="page"] .topbar,
[data-theme="dark"] body[data-page="page"] .content,
[data-theme="dark"] body[data-page="category"] .topbar,
[data-theme="dark"] body[data-page="category"] .content,
[data-theme="dark"] body[data-page="customer"] .topbar,
[data-theme="dark"] body[data-page="customer"] .content { background: var(--bg); }

@media print {
  .sidebar, .topbar, .od-head-actions, .scrim, .od-toast, .no-print { display: none !important; }
  .main { margin: 0; }
  body[data-page="order"] .content,
  body[data-page="product"] .content,
  body[data-page="page"] .content { padding: 0; background: #fff; }
  .card { break-inside: avoid; box-shadow: none; }
  body[data-page="print"] {
    background: #fff !important;
  }
  body[data-page="print"] .print-doc {
    display: block;
    padding: 0;
    min-height: 0;
  }
  body[data-page="print"] .box-a4-bg,
  body[data-page="print"] .print-doc {
    background: #fff !important;
    width: 100% !important;
  }
  body[data-page="print"] .box-a4 {
    box-shadow: none !important;
    border: 0 !important;
    border-radius: 0 !important;
    width: 100% !important;
    height: auto !important;
    margin: 0 !important;
  }
}

/* ------------------------------------------------------ order print */

body[data-page="print"] {
  background: var(--muted-bg);
  margin: 0;
  min-height: 100vh;
}

.print-doc {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
  min-height: 100vh;
  padding: 40px 16px 64px;
  box-sizing: border-box;
}

.print-doc-side {
  position: sticky;
  top: 40px;
  z-index: 2;
}

.print-doc-side-left {
  display: flex;
  justify-content: flex-end;
  flex: 0 0 34px;
}

.print-doc-side-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  flex: 0 0 auto;
}

.print-doc-side-right .btn-inverse,
.print-doc-side-right .btn-outline {
  width: 100%;
}

.box-a4 {
  background: #fff;
  border-radius: 14px;
  box-shadow: var(--shadow-sm);
  width: 21cm;
  min-height: 29.7cm;
  margin: 0 auto;
  color: #000;
  font-family: Calibri, Arial, sans-serif;
}

.box-a4-printt {
  min-height: 29.7cm;
}

.box-a4-printt > table {
  width: 100%;
  min-height: 29.7cm;
}

.box-a4-print-top {
  padding: 25px 60px 0;
}

.box-a4-print-bottom {
  padding: 0 60px 25px;
}

.print-font-11 { font-size: 11px; }
.print-font-12 { font-size: 12px; }
.print-font-13 { font-size: 13px; }
.print-font-14 { font-size: 14px; }
.print-font-16 { font-size: 16px; }
.print-font-18 { font-size: 18px; }

.print-logo {
  display: block;
  margin: 0 auto;
  height: 42px;
  width: auto;
}

@media (max-width: 1100px) {
  .print-doc {
    flex-wrap: wrap;
    padding-top: 24px;
  }
  .print-doc-side-left {
    order: -1;
    justify-content: flex-start;
  }
  .print-doc-side-right {
    margin-left: auto;
    flex-direction: row;
  }
  .box-a4 {
    flex: 1 1 100%;
    width: 100%;
    max-width: 21cm;
  }
}

/* ------------------------------------------------------ product detail */

body[data-page="product"],
body[data-page="page"],
body[data-page="category"],
body[data-page="customer"] {
  background: var(--muted-bg);
}

body[data-page="product"] .topbar,
body[data-page="product"] .content,
body[data-page="page"] .topbar,
body[data-page="page"] .content,
body[data-page="category"] .topbar,
body[data-page="category"] .content,
body[data-page="customer"] .topbar,
body[data-page="customer"] .content {
  background: var(--muted-bg);
}

body[data-page="product"] .content,
body[data-page="page"] .content,
body[data-page="category"] .content,
body[data-page="customer"] .content {
  gap: 16px;
}

body[data-page="product"] .od-head,
body[data-page="page"] .od-head,
body[data-page="category"] .od-head,
body[data-page="customer"] .od-head {
  align-items: center;
}

body[data-page="product"] .od-head-actions .btn-outline,
body[data-page="product"] .od-head-actions .btn-inverse,
body[data-page="product"] .od-head-actions .btn-icon,
body[data-page="page"] .od-head-actions .btn-outline,
body[data-page="page"] .od-head-actions .btn-inverse,
body[data-page="page"] .od-head-actions .btn-icon,
body[data-page="category"] .od-head-actions .btn-outline,
body[data-page="category"] .od-head-actions .btn-inverse,
body[data-page="category"] .od-head-actions .btn-icon,
body[data-page="customer"] .od-head-actions .btn-outline,
body[data-page="customer"] .od-head-actions .btn-inverse,
body[data-page="customer"] .od-head-actions .btn-icon {
  line-height: 1;
}

body[data-page="product"] .od-head-actions .btn-outline .i,
body[data-page="product"] .od-head-actions .btn-inverse .i,
body[data-page="product"] .od-head-actions .btn-icon .i,
body[data-page="page"] .od-head-actions .btn-outline .i,
body[data-page="page"] .od-head-actions .btn-inverse .i,
body[data-page="page"] .od-head-actions .btn-icon .i,
body[data-page="category"] .od-head-actions .btn-outline .i,
body[data-page="category"] .od-head-actions .btn-inverse .i,
body[data-page="category"] .od-head-actions .btn-icon .i,
body[data-page="customer"] .od-head-actions .btn-outline .i,
body[data-page="customer"] .od-head-actions .btn-inverse .i,
body[data-page="customer"] .od-head-actions .btn-icon .i {
  display: block;
}

body[data-page="product"] .od-head-actions .btn-inverse,
body[data-page="page"] .od-head-actions .btn-inverse,
body[data-page="category"] .od-head-actions .btn-inverse,
body[data-page="customer"] .od-head-actions .btn-inverse {
  font-size: 12.5px;
  padding: 0 12px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid var(--blue);
  border-radius: var(--radius-ctl);
  background: var(--blue);
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(37, 99, 235, .25);
  transition: background .15s, border-color .15s;
}
.btn-primary:hover {
  background: #2563eb;
  border-color: #2563eb;
}
.btn-primary .i {
  width: 14px;
  height: 14px;
  color: #fff;
}

.pd-tabs {
  gap: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 2px;
}
.pd-tabs .page-tab {
  font-size: 13.5px;
  padding-bottom: 10px;
}
.pd-tabs .page-tab.is-active {
  color: var(--text);
  border-bottom-color: var(--text);
}

.pd-layout {
  grid-template-columns: minmax(0, 1fr) 320px;
}

body[data-page="product"] .od-col-side {
  max-height: none;
  overflow: visible;
  overscroll-behavior: auto;
}

.pd-form-grid {
  display: grid;
  gap: 12px;
  margin-bottom: 14px;
}
.pd-form-row-3 {
  grid-template-columns: minmax(0, 1.6fr) minmax(140px, .7fr) minmax(140px, .7fr);
}
.pd-form-row-4 {
  grid-template-columns: minmax(0, 1.2fr) minmax(120px, .7fr) minmax(110px, .55fr) minmax(150px, .8fr);
  align-items: end;
}
.pd-form-row-2 {
  grid-template-columns: 1fr 1fr;
}
.pd-span-grow { min-width: 0; }
.pd-span-full { grid-column: 1 / -1; }
.pd-block { margin-bottom: 14px; position: relative; }

.pd-hp-flags-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 20px;
  min-height: 34px;
}
.pd-hp-flag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin: 0;
  cursor: pointer;
  user-select: none;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--text);
}
.pd-hp-flag .check { flex: none; }

.pd-input-affix {
  position: relative;
  display: block;
}
.pd-input-affix .od-input { padding-right: 34px; }
.pd-affix-btn {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-affix-btn:hover { color: var(--text); background: var(--muted-bg); }
.pd-affix-btn .i { width: 14px; height: 14px; }

.pd-chip-field {
  position: relative;
  min-height: 34px;
}
.pd-chip-select {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}
.pd-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  max-width: 100%;
  padding: 0 8px 0 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
  pointer-events: none;
}
.pd-chip .i { width: 14px; height: 14px; color: var(--text-2); }
.pd-chip-x {
  pointer-events: auto;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  margin-left: 2px;
  border: 0;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--text-3);
  cursor: pointer;
  z-index: 3;
  position: relative;
}
.pd-chip-x .i { width: 11px; height: 11px; }
.pd-chip-x:hover { color: var(--text); }
.pd-chip.is-empty {
  color: var(--text-3);
  font-weight: 400;
}

.pd-dims { min-width: 0; }
.pd-dims-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  height: 34px;
}
.pd-dims-row .od-input {
  text-align: center;
  padding: 0 6px;
  height: 34px;
}

.pd-stepper-full { width: 100%; }
.pd-stepper-full .od-qty { flex: 1; width: 0; }

.pd-textarea {
  height: auto;
  min-height: 72px;
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}
.pd-counter {
  display: block;
  text-align: right;
  margin-top: 6px;
  font-size: 11.5px;
  color: var(--text-3);
}

.pd-editor {
  border: 1px solid var(--border-ctl);
  border-radius: 10px;
  background: var(--panel);
  overflow: hidden;
}
.pd-editor:focus-within {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, .12);
}
.pd-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 2px;
  padding: 6px 8px;
  border-bottom: 1px solid var(--border);
  background: var(--muted-bg);
}
.pd-toolbar-select {
  height: 28px;
  padding: 0 8px;
  border: 1px solid var(--border-ctl);
  border-radius: 6px;
  background: var(--panel);
  font: inherit;
  font-size: 12px;
  color: var(--text);
  margin-right: 4px;
}
.pd-toolbar-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}
.pd-tool {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.pd-tool:hover { background: var(--panel); color: var(--text); }
.pd-tool .i { width: 14px; height: 14px; }
.pd-editor-body {
  min-height: 160px;
  padding: 12px 14px;
  font-size: 13.5px;
  line-height: 1.55;
  outline: 0;
  color: var(--text);
}
.pd-editor-body p { margin: 0 0 10px; }
.pd-editor-body ul {
  list-style: disc;
  padding-left: 1.25rem;
  margin: 0 0 10px;
}
.pd-editor-body li { margin: 2px 0; }

.pd-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 12px;
  padding: 18px 14px;
  border: 1.5px dashed var(--border-ctl);
  border-radius: 10px;
  background: var(--muted-bg);
  text-align: center;
  cursor: pointer;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.35;
  transition: border-color .15s, background .15s;
}
.pd-dropzone:hover,
.pd-dropzone.is-drag {
  border-color: var(--blue);
  background: var(--tint-blue);
  color: var(--text);
}
.pd-dropzone .i { width: 22px; height: 22px; color: var(--text-3); }
.pd-dropzone em { font-style: normal; color: var(--blue); font-weight: 600; }
.pd-dropzone small { font-size: 11px; color: var(--text-3); }

.pd-thumbs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.pd-thumb {
  position: relative;
  aspect-ratio: 1;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0;
  background: var(--muted-bg);
  overflow: hidden;
}
.pd-thumb.is-main {
  grid-column: 1 / -1;
  aspect-ratio: 4 / 3;
}
.pd-thumb-act,
.pd-thumb-star,
.pd-thumb-x {
  position: absolute;
  top: 4px;
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  padding: 0;
  border-radius: 999px;
  background: rgba(17, 24, 39, .55);
  color: #fff;
  opacity: 0;
  cursor: pointer;
  transition: opacity .15s, color .15s, background .15s;
}
.pd-thumb-star { left: 4px; }
.pd-thumb-x { right: 4px; }
.pd-thumb:hover .pd-thumb-star,
.pd-thumb:hover .pd-thumb-x { opacity: 1; }
.pd-thumb-star:hover { color: #fbbf24; background: rgba(17, 24, 39, .72); }
.pd-thumb-x:hover { background: rgba(17, 24, 39, .72); }
.pd-thumb-star .i,
.pd-thumb-x .i { width: 11px; height: 11px; pointer-events: none; }
.pd-thumb.is-main .pd-thumb-star,
.pd-thumb.is-main .pd-thumb-x {
  width: 22px;
  height: 22px;
  top: 8px;
}
.pd-thumb.is-main .pd-thumb-star { left: 8px; }
.pd-thumb.is-main .pd-thumb-x { right: 8px; }
.pd-thumb.is-main .pd-thumb-star .i,
.pd-thumb.is-main .pd-thumb-x .i { width: 13px; height: 13px; }
.pd-thumb.is-main .pd-thumb-star {
  opacity: 1;
  color: #fbbf24;
}
.pd-thumb.is-main .pd-thumb-star .i {
  fill: currentColor;
}
.pd-thumb-img {
  display: block;
  width: 100%;
  height: 100%;
  background-position: center;
  background-size: cover;
}
.pd-mug-1,
.pd-mug-2,
.pd-mug-3,
.pd-mug-4 {
  background:
    radial-gradient(ellipse 28% 18% at 58% 38%, rgba(0,0,0,.06) 0 40%, transparent 42%),
    radial-gradient(circle at 68% 34%, #f7efe4 0 8%, transparent 9%),
    linear-gradient(180deg, #f4ebe0 0%, #e8d7c4 55%, #dcc6ae 100%);
}
.pd-mug-2 { filter: saturate(.92) brightness(1.03); }
.pd-mug-3 { filter: hue-rotate(-6deg) saturate(.95); }
.pd-mug-4 { filter: brightness(.97) contrast(1.04); }

.pd-thumb-add {
  display: grid;
  place-items: center;
  border-style: dashed;
  color: var(--text-3);
  background: transparent;
  cursor: pointer;
}
.pd-thumb-add:hover { color: var(--blue); border-color: var(--blue); background: var(--tint-blue); }
.pd-thumb-add .i { width: 18px; height: 18px; }

.pd-side-rows {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.pd-side-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.pd-side-label {
  font-size: 13px;
  font-weight: 500;
}

.pd-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
}
.pd-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.pd-switch-ui {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background .18s;
}
.pd-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .18s;
}
.pd-switch input:checked + .pd-switch-ui {
  background: var(--green);
}
.pd-switch input:checked + .pd-switch-ui::after {
  transform: translateX(18px);
}
.pd-switch input:focus-visible + .pd-switch-ui {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.pg-slug {
  display: flex;
  align-items: stretch;
  min-width: 0;
}
.pg-slug-host {
  display: flex;
  align-items: center;
  flex: none;
  padding: 0 10px;
  border: 1px solid var(--border-ctl);
  border-right: 0;
  border-radius: 8px 0 0 8px;
  background: var(--muted-bg);
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}
.pg-slug-field { flex: 1; min-width: 0; }
.pg-slug-field .od-input { border-radius: 0 8px 8px 0; }
.pg-side-hint {
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--text-3);
  font-weight: 400;
  line-height: 1.35;
}
.pg-serp {
  margin-top: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--muted-bg);
}
.pg-serp-kicker {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-bottom: 10px;
}
.pg-serp-url {
  font-size: 12px;
  color: #188038;
  margin-bottom: 2px;
}
.pg-serp-title {
  font-size: 18px;
  font-weight: 500;
  color: #1a0dab;
  line-height: 1.3;
  margin-bottom: 4px;
}
.pg-serp-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.45;
}
[data-theme="dark"] .pg-serp-title { color: #8ab4f8; }
[data-theme="dark"] .pg-serp-url { color: #81c995; }

.pd-price-val {
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  text-align: right;
  white-space: nowrap;
}

.pd-props {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.pd-props li {
  display: flex;
  align-items: center;
  gap: 10px;
}
.pd-prop-ico {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  flex: none;
}
.pd-prop-ico .i { width: 15px; height: 15px; }
.pd-prop-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.pd-prop-k { font-size: 11px; color: var(--text-3); }
.pd-prop-v {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pd-prop-btn {
  height: 28px;
  padding: 0 10px;
  font-size: 12px;
  box-shadow: none;
}

.pd-accordion {
  padding: 0;
  overflow: hidden;
}
.pd-accordion > summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 600;
  user-select: none;
}
.pd-accordion > summary::-webkit-details-marker { display: none; }
.pd-acc-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.pd-acc-chevron {
  width: 16px;
  height: 16px;
  color: var(--text-3);
  transition: transform .18s;
}
.pd-accordion[open] .pd-acc-chevron { transform: rotate(180deg); }
.pd-acc-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.pd-panel-placeholder .od-card { max-width: 100%; }
.pd-placeholder-text {
  font-size: 13.5px;
  color: var(--text-2);
}

.pd-cat-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.pd-cat-filter { margin-bottom: 12px; }
.pd-cat-tree-wrap {
  max-height: min(70vh, 640px);
  overflow: auto;
  padding: 2px 2px 6px;
  margin: 0 -2px;
}
.pd-cat-tree,
.pd-cat-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pd-cat-tree ul {
  padding-left: 22px;
}
.pd-cat-tree li {
  margin: 0;
}
.pd-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 1px 4px;
  margin: 0 -4px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.pd-cat-item:hover { background: var(--muted-bg); }
.pd-cat-item .check {
  flex: none;
}
.pd-cat-name {
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--text);
}
.pd-cat-tree > li > .pd-cat-item .pd-cat-name {
  font-weight: 500;
}
.pd-cat-tree li.is-filtered-out { display: none; }

.pill.inactive {
  background: var(--muted-bg);
  color: var(--text-2);
  border: 1px solid var(--border);
}

/* ----------------------------------------------------------- responsive */

.scrim {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .45);
  z-index: 35;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.scrim.is-on { opacity: 1; pointer-events: auto; }

@media (max-width: 1080px) {
  :root { --gutter: 28px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .charts { grid-template-columns: 1fr 1fr; }
  .chart-trend { grid-column: 1 / -1; }
  .od-layout,
  .hp-layout { grid-template-columns: minmax(0, 1fr); }
  .od-col-side {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .od-summary { grid-template-columns: 1fr 1fr; }
  .od-summary .od-sum-card:first-child { grid-column: 1 / -1; }
  .pd-form-row-3,
  .pd-form-row-4 { grid-template-columns: 1fr 1fr; }
  .pd-thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  :root { --gutter: 16px; }
  .burger { display: grid; }
  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    transform: translateX(-100%);
    transition: transform .22s ease;
  }
  .sidebar.is-open { transform: none; }
  .content { padding-top: 10px; padding-bottom: 28px; }
  .stats { grid-template-columns: minmax(0, 1fr); }
  .charts { grid-template-columns: minmax(0, 1fr); }
  .chart-trend { grid-column: auto; }
  .page-head,
  .page-head-bar { flex-direction: column; align-items: stretch; }
  .donut-row { flex-direction: column; align-items: flex-start; }
  .user-name { display: none; }
  .page-title { font-size: 15px; }
  .page-actions { justify-content: flex-start; }
  .od-head { flex-direction: column; }
  .od-title { font-size: 18px; flex-wrap: wrap; }
  .pg-slug { flex-wrap: wrap; }
  .cat-name.is-l2 { padding-left: 14px; }
  .cat-name.is-l3 { padding-left: 28px; }
  .pg-slug-host {
    width: 100%;
    border-right: 1px solid var(--border-ctl);
    border-bottom: 0;
    border-radius: 8px 8px 0 0;
  }
  .pg-slug-field .od-input { border-radius: 0 0 8px 8px; }
  .od-summary { grid-template-columns: minmax(0, 1fr); }
  .od-summary .od-sum-card:first-child { grid-column: auto; }
  .od-addresses { grid-template-columns: minmax(0, 1fr); }
  .od-items-foot { flex-direction: column; align-items: stretch; }
  .od-totals { min-width: 0; width: 100%; }
  .od-step-row { grid-template-columns: 32px minmax(0, 1fr); }
  .od-status-btn { grid-column: 2; justify-self: start; margin-top: 6px; }
  .pd-form-row-2,
  .pd-form-row-3,
  .pd-form-row-4 { grid-template-columns: minmax(0, 1fr); }
  .pd-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pd-tabs { gap: 14px; }
  .st-tabs { gap: 6px; }
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .st-split,
  .st-fields,
  .st-card-foot { grid-template-columns: minmax(0, 1fr); }
  .st-logo { align-items: flex-start; }
  .st-method { flex-wrap: wrap; }
  .st-method .btn-outline { margin-left: 0; }
}

/* ----------------------------------------------------------- settings */

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

body[data-page="settings"] {
  background: var(--muted-bg);
}
body[data-page="settings"] .topbar,
body[data-page="settings"] .content {
  background: var(--muted-bg);
}
body[data-page="settings"] .content {
  padding-top: 12px;
  gap: 18px;
}

[data-theme="dark"] body[data-page="settings"] {
  background: var(--bg);
}
[data-theme="dark"] body[data-page="settings"] .topbar,
[data-theme="dark"] body[data-page="settings"] .content {
  background: var(--bg);
}

html.is-compact body[data-page="settings"] .st-card { padding: 16px 18px; }
html.is-compact body[data-page="settings"] .st-grid { gap: 12px; }
html.is-compact body[data-page="settings"] .content { gap: 12px; }

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

.st-tab {
  appearance: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 12px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.st-tab .i {
  width: 16px;
  height: 16px;
}
.st-tab:hover { color: var(--text); background: rgba(17, 24, 39, .04); }
[data-theme="dark"] .st-tab:hover { background: rgba(255, 255, 255, .05); }
.st-tab.is-active {
  background: #111827;
  color: #fff;
  font-weight: 600;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .28);
}
.st-tab.is-active:hover { background: #1f2937; color: #fff; }
[data-theme="dark"] .st-tab.is-active {
  background: #e8eaf0;
  color: #111827;
  box-shadow: none;
}
[data-theme="dark"] .st-tab.is-active:hover { background: #fff; color: #111827; }

.st-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.st-card {
  padding: 20px 22px 18px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.st-card-wide { grid-column: 1 / -1; }
.st-card-head { min-width: 0; }
.st-card-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}
.st-card-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.st-card-desc {
  margin-top: 3px;
  font-size: 12.5px;
  color: var(--text-2);
}
.st-req { color: var(--red); }
.st-hint {
  font-size: 11.5px;
  color: var(--text-3);
}

.st-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 148px;
  gap: 22px;
  align-items: start;
}

.st-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 14px;
  min-width: 0;
}
.st-span-2 { grid-column: 1 / -1; }

.select-block {
  width: 100%;
  justify-content: flex-start;
}
.select-block [data-dd-label] { flex: 1; text-align: left; }
.select-block .st-select-ico {
  width: 15px;
  height: 15px;
  color: var(--text-3);
  flex: none;
}
.st-dd { width: 100%; }
.st-dd .dd-menu { left: 0; right: 0; }

.st-logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}
.st-logo-preview {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  background: #eceff3;
  color: #6b7280;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.03em;
  overflow: hidden;
  background-size: cover;
  background-position: center;
}
[data-theme="dark"] .st-logo-preview { background-color: #242b36; color: #98a2b3; }

.st-swatches {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}
.st-swatch {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  padding: 0;
  cursor: pointer;
  display: grid;
  place-items: center;
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  transition: transform .12s, box-shadow .12s;
}
.st-swatch[hidden],
.st-panel[hidden] { display: none; }
.st-swatch .i { width: 12px; height: 12px; stroke-width: 2.4; display: none; }
.st-swatch.is-selected { box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px currentColor; }
.st-swatch.is-selected .i { display: block; }
.st-swatch-toggle {
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 50%;
  background: var(--muted-bg);
  color: var(--text-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.st-swatch-toggle .i { width: 13px; height: 13px; }
.st-swatch-toggle.is-open .i { transform: rotate(180deg); }

.st-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.st-toggle-inline { gap: 12px; }
.st-toggle-copy { min-width: 0; }
.st-toggle-title { font-size: 13.5px; font-weight: 600; }
.st-toggle-desc { margin-top: 2px; font-size: 12px; color: var(--text-2); }

.st-switch {
  position: relative;
  display: inline-flex;
  cursor: pointer;
  flex: none;
}
.st-switch input {
  position: absolute;
  opacity: 0;
  inset: 0;
  margin: 0;
  cursor: pointer;
}
.st-switch-ui {
  width: 42px;
  height: 24px;
  border-radius: 999px;
  background: #d1d5db;
  position: relative;
  transition: background .18s;
}
[data-theme="dark"] .st-switch-ui { background: #3a4352; }
.st-switch-ui::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18);
  transition: transform .18s;
}
.st-switch input:checked + .st-switch-ui { background: var(--blue); }
.st-switch input:checked + .st-switch-ui::after { transform: translateX(18px); }
.st-switch input:focus-visible + .st-switch-ui {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.st-flag {
  width: 18px;
  height: 12px;
  border-radius: 2px;
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08);
  background-size: cover;
}
.st-flag-cz {
  background: linear-gradient(to bottom, #fff 50%, #d7141a 50%);
  position: relative;
  overflow: hidden;
}
.st-flag-cz::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  border-style: solid;
  border-width: 6px 0 6px 9px;
  border-color: transparent transparent transparent #11457e;
}
.st-flag-sk {
  background: linear-gradient(to bottom, #fff 33.3%, #0b4ea2 33.3% 66.6%, #ee1c25 66.6%);
}
.st-flag-gb {
  background: repeating-linear-gradient(90deg, #012169 0 6px, #c8102e 6px 12px, #012169 12px 18px);
}
.st-flag-de {
  background: linear-gradient(to bottom, #000 33.3%, #dd0000 33.3% 66.6%, #ffcc00 66.6%);
}

.st-pass { position: relative; }
.st-pass .od-input { padding-right: 38px; }
.st-pass-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.st-pass-toggle:hover { color: var(--text); background: var(--muted-bg); }
.st-pass-toggle .i { width: 15px; height: 15px; }
.st-pass-toggle .ico-eye-off { display: none; }
.st-pass-toggle.is-on .ico-eye { display: none; }
.st-pass-toggle.is-on .ico-eye-off { display: block; }

.st-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.st-notify {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.st-notify li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
}
.st-notify li + li { border-top: 1px solid var(--border); }
.st-notify-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
}
.st-notify-ico .i { width: 16px; height: 16px; }
.st-notify-label {
  flex: 1;
  min-width: 0;
  font-size: 13.5px;
  font-weight: 500;
}

.st-methods {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.st-method {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
}
.st-method > div { flex: 1; min-width: 0; }
.st-method-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.st-method-ico .i { width: 17px; height: 17px; }
.st-method-title { font-size: 13.5px; font-weight: 600; }
.st-method-desc { margin-top: 2px; font-size: 12px; color: var(--text-2); }
.st-method .btn-outline { margin-left: auto; }

.st-links { display: flex; flex-direction: column; }
.st-link {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 2px;
  border: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  border-radius: 10px;
}
.st-link + .st-link,
.st-links li + li .st-link { border-top: 1px solid var(--border); border-radius: 0; }
.st-link:hover { background: var(--muted-bg); }
.st-link > span:nth-child(2) { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.st-link-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  flex: none;
}
.st-link-ico .i { width: 16px; height: 16px; }
.st-link-title { font-size: 13.5px; font-weight: 600; }
.st-link-desc { font-size: 12px; color: var(--text-2); }
.st-link-arrow { width: 16px; height: 16px; color: var(--text-3); flex: none; }

.st-hours { display: flex; flex-direction: column; gap: 10px; }
.st-hour {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-2);
}

.st-table-list { display: flex; flex-direction: column; }
.st-table-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
}
.st-table-list li + li { border-top: 1px solid var(--border); }
.st-table-copy { flex: 1; min-width: 0; }
.st-price {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-2);
  min-width: 84px;
  text-align: right;
}

.st-sessions { display: flex; flex-direction: column; }
.st-sessions li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
}
.st-sessions li + li { border-top: 1px solid var(--border); }

.st-user-list .st-user {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  flex-wrap: wrap;
}
.st-user-av {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
  flex: none;
}
.st-user-you {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  vertical-align: middle;
}
.st-user-role {
  width: 168px;
  flex: none;
}
.st-user-role .select {
  width: 100%;
  height: 32px;
  font-size: 12.5px;
}
.st-user-seen,
.st-user-locked {
  font-size: 12px;
  color: var(--text-2);
  min-width: 88px;
  text-align: right;
  flex: none;
}
.st-user-locked { font-weight: 500; }
.st-user .pill { flex: none; }
.st-user .btn-outline { height: 32px; padding: 0 10px; }

@media (max-width: 1080px) {
  .st-grid { grid-template-columns: minmax(0, 1fr); }
  .st-split { grid-template-columns: minmax(0, 1fr) 140px; }
}
@media (max-width: 760px) {
  .st-user-role { width: 140px; }
  .st-user-seen,
  .st-user-locked { text-align: left; min-width: 0; }
}

/* --------------------------------------------------------- statistiky */

body[data-page="statistics"] .content {
  padding-top: 12px;
  gap: 18px;
}

.an-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.an-panel[hidden] { display: none; }

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

.an-toolbar-label {
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
}

.an-range-label {
  margin-left: auto;
  font-size: 12.5px;
  color: var(--text-2);
  font-variant-numeric: tabular-nums;
}

.an-custom {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}
.an-custom[hidden] { display: none; }
.an-date { width: 152px; }

.an-chart-card {
  padding: 18px 20px 12px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.an-chart-wrap {
  position: relative;
  flex: 1;
  margin-top: 8px;
  min-height: 300px;
}

.an-chart {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 300px;
  overflow: visible;
}

.an-bar { fill: var(--blue); transition: opacity .15s; }
.an-bar.is-on { opacity: .7; }

.line-path.is-dim {
  stroke: var(--text-3);
  stroke-width: 1.6;
  stroke-dasharray: 4 4;
  opacity: .8;
}
.line-hover-dot.is-dim,
.line-end-dot.is-dim { fill: var(--text-3); }

.an-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-top: 12px;
  font-size: 11.5px;
  color: var(--text-2);
}
.an-legend-item { display: inline-flex; align-items: center; gap: 7px; }
.an-legend .dot { width: 7px; height: 7px; }
.an-dash {
  width: 15px;
  border-top: 2px dashed var(--text-3);
  flex: none;
}

.an-tip {
  display: flex;
  flex-direction: column;
  gap: 1px;
  text-align: left;
  padding: 7px 10px;
  transform: translate(-50%, calc(-100% - 12px));
}
.an-tip strong { font-size: 11px; font-weight: 600; }
.an-tip span { font-size: 11.5px; }
.an-tip-dim { color: rgba(255, 255, 255, .62); }

.an-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  align-items: stretch;
}

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

.an-card {
  padding: 16px 18px 18px;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.an-bars {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin-top: 14px;
}

.an-bar-row {
  display: grid;
  grid-template-columns: minmax(0, 104px) minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
}

.an-bar-label {
  font-size: 12px;
  color: var(--text-2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.an-bar-track {
  height: 8px;
  border-radius: 99px;
  background: var(--muted-bg);
  overflow: hidden;
}

.an-bar-fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--blue);
}
.an-bar-fill.fill-green { background: var(--green); }
.an-bar-fill.fill-amber { background: var(--amber); }
.an-bar-fill.fill-red { background: var(--red); }

.an-bar-value {
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.an-empty {
  font-size: 12.5px;
  color: var(--text-3);
  padding: 8px 0;
}

.an-note {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding: 13px 18px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}

.an-note-text {
  flex: 1 1 320px;
  min-width: 0;
  font-size: 12.5px;
  color: var(--text-2);
}
.an-note-text strong { color: var(--text); font-weight: 600; }
.an-note code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11.5px;
  color: var(--text);
}
.an-note .btn-outline { height: 31px; font-size: 12px; }

body[data-page="statistics"] .table tbody td { font-variant-numeric: tabular-nums; }
body[data-page="statistics"] .table .product-rank { margin: 0; }

@media (max-width: 1080px) {
  .an-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-grid > .an-card:last-child:nth-child(3) { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  .an-grid { grid-template-columns: minmax(0, 1fr); }
  .an-range-label { margin-left: 0; }
  .an-bar-row { grid-template-columns: minmax(0, 84px) minmax(0, 1fr) auto; }
  .an-date { width: 100%; }
  .an-custom { width: 100%; }
  .an-custom .od-field { flex: 1 1 140px; }
  .an-chart-wrap,
  .an-chart { min-height: 260px; }
}
