/* ==========================================================================
   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: 50;
  overflow: visible;
}

.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;
  line-height: 1.3;
  white-space: nowrap;
  padding: 5px 9px;
  border-radius: 7px;
  opacity: 0;
  pointer-events: none;
  transition: opacity .15s;
  z-index: 60;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
}
.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);
  position: relative;
  z-index: 45;
}

.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;
  margin: 0;
  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-wrap { position: relative; flex: none; }

.bell {
  position: relative;
  width: 34px;
  height: 34px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  flex: none;
}
.bell:hover,
.bell-wrap.is-open .bell { 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);
}
.bell-dot[hidden] { display: none; }

.bell-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 380px;
  max-width: min(380px, calc(100vw - 24px));
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(16, 24, 40, .14);
  display: none;
  flex-direction: column;
  z-index: 80;
  overflow: hidden;
}
.bell-wrap.is-open .bell-panel { display: flex; }

.bell-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 8px;
}
.bell-panel-title {
  margin: 0;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.bell-panel-count {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  white-space: nowrap;
}

.bell-panel-list {
  max-height: 368px;
  overflow-y: auto;
  padding: 0 8px 2px;
  scrollbar-width: thin;
  scrollbar-color: #d1d5db transparent;
}
.bell-panel-list::-webkit-scrollbar { width: 8px; }
.bell-panel-list::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
.bell-panel-list::-webkit-scrollbar-track { background: transparent; }

.bell-panel .nt-item {
  grid-template-columns: 40px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 11px 10px;
  border-radius: 12px;
}
.bell-panel .nt-ico {
  width: 40px;
  height: 40px;
  border-radius: 12px;
}
.bell-panel .nt-ico .i { width: 18px; height: 18px; }
.bell-panel .nt-title { font-size: 14px; }
.bell-panel .nt-text {
  font-size: 13px;
  -webkit-line-clamp: 2;
}
.bell-panel .nt-time { font-size: 12px; margin-top: 5px; }
.bell-panel .nt-mark { width: 8px; height: 8px; margin-top: 8px; }

.bell-panel-empty {
  margin: 0;
  padding: 22px 14px 18px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
}

.bell-panel-foot {
  flex: none;
  padding: 8px 14px 14px;
}
.bell-panel-all {
  width: 100%;
  height: 40px;
  border-radius: 10px;
  font-size: 13.5px;
  font-weight: 500;
}
.bell-panel .nt-text { font-size: 13px; }
.bell-panel .nt-time { font-size: 12px; }

[data-theme="dark"] .bell-panel {
  box-shadow: 0 16px 40px rgba(0, 0, 0, .45);
}
[data-theme="dark"] .bell-panel-list { scrollbar-color: #3a4454 transparent; }
[data-theme="dark"] .bell-panel-list::-webkit-scrollbar-thumb { background: #3a4454; }

.topbar-right { overflow: visible; }

.nt-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  padding: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: inherit;
  text-decoration: none;
  text-align: left;
  cursor: pointer;
  width: 100%;
}
.nt-item:hover { background: var(--muted-bg); }
.nt-item.is-unread .nt-title { font-weight: 700; }

.nt-ico {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  flex: none;
}
.nt-ico .i { width: 16px; height: 16px; }

.nt-body { min-width: 0; }
.nt-title {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.nt-text {
  margin-top: 2px;
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.nt-time {
  margin-top: 4px;
  font-size: 11px;
  color: var(--text-3);
}

.nt-mark {
  width: 8px;
  height: 8px;
  margin-top: 12px;
  border-radius: 50%;
  background: var(--blue);
  flex: none;
  position: relative;
}
.nt-item:not(.is-unread) .nt-mark { visibility: hidden; pointer-events: none; }
.nt-item.is-unread .nt-mark { cursor: pointer; }
.nt-item.is-unread .nt-mark::before {
  content: '';
  position: absolute;
  inset: -10px;
}

.nt-feed {
  display: flex;
  flex-direction: column;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nt-feed > li { list-style: none; }
.nt-feed .nt-item {
  grid-template-columns: 36px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 0;
  border-bottom: 1px solid var(--border);
}
.nt-feed li:last-child .nt-item { border-bottom: 0; }
.nt-empty {
  margin: 0;
  padding: 28px 16px;
  font-size: 13px;
  color: var(--text-2);
  text-align: center;
  list-style: none;
}
.nt-feed .nt-item.is-unread { background: var(--tint-blue); }
.nt-feed .nt-ico {
  width: 36px;
  height: 36px;
  border-radius: 10px;
}
.nt-feed .nt-ico .i { width: 17px; height: 17px; }
.nt-feed .nt-title { font-size: 13.5px; }
.nt-feed .nt-text { -webkit-line-clamp: 3; }
.nt-feed .nt-mark { margin-top: 14px; }

#ntMarkAll:disabled {
  opacity: .45;
  cursor: default;
  pointer-events: none;
}

.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;
}

.user-copy {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.user-role {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  line-height: 1;
  white-space: nowrap;
}

.user.is-global .avatar {
  color: var(--text);
}

.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,
body[data-page="notifications"] .content,
body[data-page="connections"] .content,
body[data-page="search"] .content {
  padding-top: 12px;
  gap: 20px;
}

.page-head {
  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;
}

.page-head:not(.st-head) .page-actions .btn-inverse {
  height: 28px;
  padding: 0 10px;
  border-radius: 5px;
  font-size: 11px;
}

.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;
}

.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;
}

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

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

html:has(body.login-body) {
  height: 100%;
  overflow: hidden;
}

body.login-body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: #fff;
}

.login-split {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(340px, 1.05fr);
  overflow: hidden;
}

.login-pane {
  display: grid;
  place-items: center;
  min-height: 0;
  padding: 32px 28px;
  background: #fff;
  overflow: hidden;
}

.login-wrap {
  width: min(300px, 100%);
  transform: translateY(-10px);
}

.login-mark {
  width: 64px;
  height: 64px;
  margin: 0 auto 22px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  background: #7c5cfc;
  color: #fff;
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -.04em;
  box-shadow: 0 10px 24px rgba(124, 92, 252, .28);
}

.login-title {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.03em;
  line-height: 1.2;
  text-align: center;
  color: #1f2430;
}

.login-lead {
  margin: 8px 0 28px;
  text-align: center;
  font-size: 14px;
  line-height: 1.4;
  color: #9aa3b2;
}

.login-art {
  display: grid;
  place-items: center;
  min-height: 0;
  height: 100%;
  padding: 16px;
  background: #f7f5f8;
  overflow: hidden;
}

.login-art img {
  display: block;
  width: auto;
  height: auto;
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
}

@media (max-width: 900px) {
  .login-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .login-pane {
    padding: 24px 20px;
  }

  .login-art {
    padding: 8px 16px 16px;
  }
}

.login-back {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  line-height: 1.3;
}

.login-back a {
  color: var(--text-3);
}

.login-form {
  display: grid;
  gap: 18px;
}

.login-form .od-field {
  gap: 8px;
  width: min(300px, 100%);
  justify-self: center;
}

.login-label {
  font-size: 12px;
  font-weight: 600;
  color: #3d4451;
}

.login-control {
  position: relative;
  display: block;
}

.login-control .i {
  position: absolute;
  left: 14px;
  top: 50%;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  color: #b0b7c3;
  pointer-events: none;
}

.login-form .od-input {
  height: 48px;
  padding: 0 14px 0 44px;
  border-radius: 10px;
  border-color: #e6e8ee;
  background: #fff;
  font-size: 15px;
}

.login-form .od-input::placeholder {
  color: #c5cad3;
}

.login-form .od-input:focus {
  border-color: #7c5cfc;
  box-shadow: 0 0 0 3px rgba(124, 92, 252, .16);
}

.login-submit {
  width: min(300px, 100%);
  justify-self: center;
  height: 48px;
  margin-top: 6px;
  border: 0;
  border-radius: 10px;
  background: #000000;
  color: #fff;
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.login-submit:hover {
  background: #494949;
}

.login-hint {
  font-size: 12.5px;
  color: var(--text-3);
}

.flash {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
}

.flash-ok {
  background: var(--tint-green);
  color: var(--pill-green-tx);
}

.flash-err {
  background: var(--tint-red);
  color: var(--pill-red-tx);
}

.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;
}

.select-sort {
  gap: 6px;
  min-width: 11.75rem;
}
.select-sort [data-dd-label] {
  flex: 1;
  text-align: left;
}
.filters [data-filter="sort"] .select-sort {
  min-width: 13.5rem;
}

.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%; }
.od-field .fancy-select,
.od-sum-card .fancy-select { width: 100%; }
.od-sum-card .fancy-select .select {
  height: 32px;
  font-size: 12.5px;
  padding: 0 8px;
}

.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: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
  margin-top: 10px;
  padding-bottom: 2px;
  flex: 1;
  min-width: 0;
  min-height: 0;
  width: calc(100% - 8px);
  align-self: start;
}

.donut-wrap {
  position: relative;
  min-width: 0;
  min-height: 0;
  height: 100%;
  width: 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: min-content;
}
.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; margin: 0; }
.lg-val { font-size: 10.5px; color: var(--text-2); white-space: nowrap; margin: 0; }

.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: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.product-item:last-child { border-bottom: 0; }

.products-card .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: start;
  justify-content: stretch;
}

.product-rank {
  grid-area: rank;
  align-self: center;
  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;
  flex: none;
}

.product-name {
  grid-area: name;
  margin: 0;
  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;
  align-self: center;
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
}

.product-meta {
  grid-area: meta;
  margin: 0;
  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 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 72px 24px;
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
}
.search-empty .i {
  width: 28px;
  height: 28px;
  color: var(--text-3);
  margin-bottom: 4px;
}
.search-empty-title {
  font-size: 15.5px;
  font-weight: 600;
  color: var(--text);
}
.search-empty-text {
  max-width: 380px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}

.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); }

.filters-end {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filters-end .btn-filters { margin-left: 0; }
.btn-prod-delete {
  color: var(--red);
}
.btn-prod-delete:hover { border-color: var(--red); }
.btn-prod-delete[hidden] { display: none !important; }

.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,
body[data-page="search"] .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;
}
.table thead th.cell-thumb,
.table tbody td.cell-thumb {
  width: 48px;
  padding-left: 10px;
  padding-right: 0;
}
.prod-thumb {
  display: block;
  width: 36px;
  height: 36px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background-color: var(--muted-bg);
  object-fit: cover;
  object-position: center;
}
.prod-thumb-empty {
  display: grid;
  place-items: center;
  color: var(--text-3);
  background: var(--muted-bg);
  border-style: dashed;
}
.prod-thumb-empty .i {
  width: 16px;
  height: 16px;
}

.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;
}

.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;
  background: #4f46e5;
}
.cust-ava-lg {
  width: 40px;
  height: 40px;
  font-size: 13px;
}
.cust-ava[data-tone="0"],
.cust-ava[data-tone="6"] { 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; white-space: nowrap; }
.cell-paid { width: 1%; }
.paid-cell {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.paid-field {
  position: relative;
  display: block;
  width: 6.25rem;
}
.paid-input {
  width: 100%;
  height: 32px;
  padding: 0 28px 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 {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-3);
  font-size: 12px;
  font-weight: 500;
  pointer-events: none;
}
.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;
}

body[data-view="finance"] .table-wrap {
  overflow-x: hidden;
}
body[data-view="finance"] .table {
  table-layout: fixed;
}
body[data-view="finance"] .table thead th,
body[data-view="finance"] .table tbody td {
  padding-left: 12px;
  padding-right: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-view="finance"] .cell-id { width: 7.25rem; }
body[data-view="finance"] .cell-items { width: 4.75rem; }
body[data-view="finance"] .cell-date { width: 6.25rem; }
body[data-view="finance"] .cell-amount { width: 7.75rem; }
body[data-view="finance"] .cell-paid { width: 10.25rem; overflow: visible; }
body[data-view="finance"] .table thead th:last-child,
body[data-view="finance"] .table tbody td:last-child {
  width: 8.75rem;
  overflow: visible;
}
body[data-view="finance"] .cell-cust { min-width: 0; }
body[data-view="finance"] .cust-name,
body[data-view="finance"] .cust-mail {
  overflow: hidden;
  text-overflow: ellipsis;
}

body[data-view="expedice"] .table-wrap {
  overflow-x: hidden;
}
body[data-view="expedice"] .table {
  table-layout: fixed;
}
body[data-view="expedice"] .table thead th,
body[data-view="expedice"] .table tbody td {
  padding-left: 10px;
  padding-right: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-view="expedice"] .table thead th.cell-check,
body[data-view="expedice"] .table tbody td.cell-check {
  width: 40px;
  padding-left: 14px;
  padding-right: 0;
}
body[data-view="expedice"] .table thead th.cell-open,
body[data-view="expedice"] .table tbody td.cell-open {
  width: 40px;
  padding-left: 8px;
  padding-right: 0;
}
body[data-view="expedice"] .cell-id { width: 7rem; }
body[data-view="expedice"] .cell-items { width: 4.5rem; }
body[data-view="expedice"] .cell-method { width: 8.25rem; min-width: 0; }
body[data-view="expedice"] .cell-ship-status {
  width: 9.5rem;
  overflow: visible;
}
body[data-view="expedice"] .cell-carrier {
  width: 8.25rem;
  overflow: visible;
}
body[data-view="expedice"] .cell-actions {
  width: 8.25rem;
  overflow: visible;
}
body[data-view="expedice"] .cell-cust { min-width: 0; }
body[data-view="expedice"] .cust-name,
body[data-view="expedice"] .cust-mail,
body[data-view="expedice"] .method-name,
body[data-view="expedice"] .method-sub {
  overflow: hidden;
  text-overflow: ellipsis;
}
.method-name { font-size: 12.5px; font-weight: 600; line-height: 1.3; }
.method-sub { font-size: 10.5px; color: var(--text-3); line-height: 1.35; }
body[data-view="expedice"] .row-actions { gap: 8px; }
body[data-view="expedice"] .dropdown.table-pill-select,
body[data-view="expedice"] .dd-in-table {
  min-width: 0;
  width: 100%;
}
body[data-view="expedice"] .od-pill-select.table-pill-select,
body[data-view="expedice"] .table-carrier-select,
body[data-view="expedice"] .dd-in-table .select {
  min-width: 0;
  width: 100%;
}

.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; }

.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);
}

body[data-view="prices"] .table-wrap {
  overflow-x: hidden;
}
body[data-view="prices"] .table {
  table-layout: fixed;
}
body[data-view="prices"] .table thead th,
body[data-view="prices"] .table tbody td {
  padding-left: 10px;
  padding-right: 10px;
}
body[data-view="prices"] .table thead th.cell-check,
body[data-view="prices"] .table tbody td.cell-check {
  width: 40px;
  padding-left: 14px;
  padding-right: 0;
}
body[data-view="prices"] .table thead th.cell-thumb,
body[data-view="prices"] .table tbody td.cell-thumb {
  width: 48px;
  padding-left: 10px;
  padding-right: 0;
}
body[data-view="prices"] .table thead th.cell-open,
body[data-view="prices"] .table tbody td.cell-open {
  width: 40px;
  padding-left: 8px;
  padding-right: 0;
}
body[data-view="prices"] .cell-id { width: 7rem; }
body[data-view="prices"] .cell-prod { min-width: 0; }
body[data-view="prices"] .cell-prod .prod-name {
  overflow: hidden;
  text-overflow: ellipsis;
}
body[data-view="prices"] .prod-price-cell { width: 7.75rem; }
body[data-view="prices"] .prod-price-field {
  display: flex;
  width: 100%;
  min-width: 0;
}
body[data-view="prices"] .prod-price-input,
body[data-view="prices"] .od-money-sm .prod-price-input {
  width: auto;
  min-width: 0;
  flex: 1;
}
body[data-view="prices"] .prod-margin-cell { width: 5.5rem; }
body[data-view="prices"] .prod-vat-cell { width: 6.5rem; }
body[data-view="prices"] .prod-vat-select {
  min-width: 0;
  width: 100%;
}

.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;
}
body[data-page="order"] .content > form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}

.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;
  color: var(--text);
}
.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;
}

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

.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-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-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-addr-head-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.od-card-head .btn-icon {
  width: 30px;
  height: 30px;
  flex: none;
}

.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; }
.pd-hist-changes {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin: 6px 0 0;
}
.pd-hist-changes p {
  margin: 0;
  font-size: 12px;
  color: var(--text-2);
  display: flex;
  flex-wrap: wrap;
  gap: 4px 6px;
  align-items: baseline;
}
.pd-hist-field { font-weight: 500; color: var(--text); }
.pd-hist-from { color: var(--text-3); }
.pd-hist-arrow { color: var(--text-3); }
.pd-hist-to { font-weight: 600; color: var(--text); }

.od-comments-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.od-comments-list[hidden] { display: none; }
.od-comments-empty {
  margin: 0;
  font-size: 13px;
  color: var(--text-3);
}
.od-comments-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: none;
}
.od-comment {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--muted-bg);
}
.od-comment.is-notified {
  background: var(--panel);
  box-shadow: inset 3px 0 0 var(--blue);
}
.od-comment-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.od-comment-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint-blue);
  color: var(--blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .02em;
  flex: none;
}
.od-comment-meta { min-width: 0; }
.od-comment-author { font-size: 13px; font-weight: 600; line-height: 1.3; }
.od-comment-time { font-size: 11px; color: var(--text-3); margin-top: 2px; }
.od-comment-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  justify-content: flex-end;
}
.od-comment-flag {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--pill-blue-bg);
  color: var(--pill-blue-tx);
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.od-comment-flag[hidden] { display: none; }
.od-comment-flag .i { width: 12px; height: 12px; }
.od-comment-flag-visible {
  background: var(--pill-violet-bg);
  color: var(--pill-violet-tx);
}
.od-comment.is-visible {
  background: var(--panel);
  box-shadow: inset 3px 0 0 var(--violet);
}
.od-comment.is-notified.is-visible {
  box-shadow: inset 3px 0 0 var(--blue);
}
.od-comment-text {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.od-comment-toggles {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.od-dialog-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}
.od-dialog-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}
.od-dialog {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 20px;
  border: 0;
  background: transparent;
  color: inherit;
}
.od-dialog[open] {
  display: flex;
  align-items: center;
  justify-content: center;
}
.od-dialog::backdrop {
  background: rgba(15, 23, 42, .45);
}
.od-dialog-card {
  width: min(440px, 100%);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-md);
  padding: 16px 18px 16px;
}
.od-dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.od-dialog-title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.02em;
}
.od-dialog-head .btn-icon {
  width: 32px;
  height: 32px;
  box-shadow: none;
}
.od-dialog-error {
  margin: 8px 0 0;
  font-size: 12.5px;
  color: var(--pill-red-tx);
}
.od-dialog-error[hidden] { display: none; }
.od-dialog-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.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; }
}

/* ------------------------------------------------------ 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"] .pd-head,
body[data-page="page"] .pd-head,
body[data-page="category"] .pd-head,
body[data-page="customer"] .pd-head {
  margin-bottom: 12px;
}
body[data-page="product"] .pd-tabs,
body[data-page="page"] .pd-tabs,
body[data-page="category"] .pd-tabs,
body[data-page="customer"] .pd-tabs {
  margin-bottom: 16px;
}

.cu-head-ident {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.cu-head-text {
  min-width: 0;
}

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;
}

.pd-tabs {
  gap: 18px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
  padding-bottom: 0;
  margin-bottom: 2px;
}
.pd-tabs .page-tab {
  display: inline-flex;
  align-items: center;
  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;
}

body[data-page="category"] .od-col-side {
  position: static;
  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: 12px;
  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);
  user-select: none;
}
.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-size {
  width: 52px;
  height: 28px;
  margin: 0;
  padding: 0 2px 0 6px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  cursor: pointer;
  flex: none;
  appearance: auto;
}
.pd-toolbar-size:hover,
.pd-toolbar-size:focus {
  background: var(--panel);
  color: var(--text);
  outline: 0;
}
.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.is-on {
  background: var(--panel);
  color: var(--blue);
  box-shadow: inset 0 0 0 1px var(--border);
}
.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.is-empty::before {
  content: attr(data-placeholder);
  color: var(--text-3);
  pointer-events: none;
}
#pdLong.pd-editor-body {
  min-height: 480px;
}
.pd-editor-body p { margin: 0 0 10px; }
.pd-editor-body p:last-child { margin-bottom: 0; }
.pd-editor-body ul,
.pd-editor-body ol {
  padding-left: 1.25rem;
  margin: 0 0 10px;
}
.pd-editor-body ul { list-style: disc; }
.pd-editor-body ol { list-style: decimal; }
.pd-editor-body li { margin: 2px 0; }
.pd-editor-body a { color: var(--blue); }
.pd-editor-body img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 8px 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-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pd-thumb.is-busy { opacity: .55; pointer-events: none; }
.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;
}
.pd-switch-green input:checked + .pd-switch-ui {
  background: var(--green);
}
.pd-switch-green input:focus-visible + .pd-switch-ui {
  outline-color: var(--green);
}
.pd-switch-blue input:checked + .pd-switch-ui {
  background: var(--blue);
}

.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-place {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.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-prices,
.pd-cats {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}
.pd-prices .pd-price-meta {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.pd-price-group {
  padding-top: 14px;
  margin-top: 4px;
}
.pd-price-group-title {
  margin: 0 0 10px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
}
.pd-price-group .pd-form-grid { margin-bottom: 0; }
.pd-price-money {
  display: flex;
  width: 100%;
  min-width: 0;
}
.pd-price-money .od-input {
  flex: 1;
  width: 0;
  min-width: 0;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pd-price-money > span:last-child {
  flex: none;
  min-width: 22px;
}

.pd-price-hist-card { min-width: 0; }
.pd-price-hist-wrap {
  margin: 0;
  max-height: 28rem;
  overflow: auto;
}
.pd-price-hist-table th,
.pd-price-hist-table td {
  padding-top: 7px;
  padding-bottom: 7px;
  font-size: 12.5px;
  white-space: nowrap;
}
.pd-price-hist-table th { padding-bottom: 8px; }
.pd-price-hist-table td:nth-child(2) { color: var(--text-2); }
.pd-price-hist-table .ta-right {
  font-variant-numeric: tabular-nums;
}
.pd-price-hist-from { color: var(--text-3); font-weight: 500; }
.pd-price-hist-to { font-weight: 600; }
.pd-price-hist-arrow-col {
  width: 18px;
  padding-left: 4px;
  padding-right: 4px;
  color: var(--text-3);
  text-align: center;
}

.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-tab-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  margin-left: 6px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 11px;
  font-weight: 600;
  vertical-align: 1px;
}
.pd-tab-count[hidden] { display: none !important; }
.page-tab.is-active .pd-tab-count {
  background: var(--text);
  color: var(--panel);
}

.pd-variants {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.pd-opt-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 12px;
}
.pd-opt-empty {
  padding: 16px;
  border: 1px dashed var(--border-ctl);
  border-radius: 10px;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.45;
}
.pd-opt-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  background: var(--muted-bg);
}
.pd-opt-head {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}
.pd-opt-head .od-input {
  height: 32px;
  font-weight: 600;
  background: var(--panel);
}
.pd-opt-index {
  flex: none;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-3);
  font-size: 11px;
  font-weight: 700;
}
.pd-opt-remove {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-opt-remove:hover { color: var(--red); background: var(--tint-red); }
.pd-opt-remove .i { width: 14px; height: 14px; }
.pd-opt-values {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.pd-opt-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 28px;
  padding: 0 4px 0 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 999px;
  background: var(--panel);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text);
}
.pd-opt-swatch {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 1px solid rgba(17, 24, 39, .12);
  flex: none;
}
.pd-opt-chip-x {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-opt-chip-x:hover { color: var(--text); background: var(--muted-bg); }
.pd-opt-chip-x .i { width: 11px; height: 11px; }
.pd-opt-add {
  width: min(180px, 100%);
  height: 28px;
  padding: 0 10px;
  font-size: 12.5px;
}
.pd-var-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
}
.pd-var-presets {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 8px;
}
.pd-var-presets-label {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-right: 2px;
}
.pd-var-presets button {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.pd-var-presets button:hover { color: var(--text); }
.pd-var-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
}
.pd-var-search {
  flex: 1;
  min-width: 200px;
}
.pd-var-table { min-width: 760px; }
.pd-var-table .empty-row td {
  padding: 28px 10px;
  text-align: center;
  color: var(--text-3);
  font-size: 12.5px;
}
.pd-var-table th,
.pd-var-table td { white-space: nowrap; }
.pd-var-table td:first-child { white-space: normal; }
.pd-var-table .od-input {
  height: 32px;
  min-width: 110px;
  font-size: 12.5px;
}
.pd-var-table .pd-var-sku { min-width: 148px; }
.pd-var-table .pd-var-ean { min-width: 128px; }
.pd-var-table .pd-var-price {
  width: 92px;
  min-width: 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.pd-var-combo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 160px;
}
.pd-var-name {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.pd-var-name strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.pd-var-name span {
  font-size: 11.5px;
  color: var(--text-3);
}
.pd-var-col-act { width: 40px; }
.pd-var-del {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-var-del:hover { color: var(--red); background: var(--tint-red); }
.pd-var-del .i { width: 14px; height: 14px; }
.pd-var-table .od-stepper { height: 32px; }
.pd-var-table .od-qty { width: 38px; height: 30px; font-size: 12.5px; }
.pd-var-table .od-step { width: 24px; height: 30px; }
.pd-var-empty {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 2px 4px;
}
.pd-var-empty p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.45;
}
.pd-var-empty[hidden],
.pd-var-foot[hidden],
#pdVariantTableWrap[hidden] { display: none !important; }
.pd-var-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-2);
}
#pdStockField.is-from-variants .od-stepper {
  opacity: .6;
  pointer-events: none;
}
#pdStockField.is-from-variants .od-qty { color: var(--text-2); }

.pd-cat-hint {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-2);
}
.pd-cat-selected-card { min-width: 0; }
.pd-cat-picked-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
}
.pd-cat-picked {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.pd-cat-picked:last-child { border-bottom: 0; }
.pd-cat-picked-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.pd-cat-picked-body:hover .pd-cat-picked-name { color: var(--blue); }
.pd-cat-picked-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}
.pd-cat-picked-path {
  font-size: 11.5px;
  color: var(--text-3);
  line-height: 1.35;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pd-cat-picked-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 10.5px;
  font-weight: 600;
  flex: none;
}
.pd-cat-picked-x {
  width: 26px;
  height: 26px;
  flex: none;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-cat-picked-x:hover { background: var(--muted-bg); color: var(--text); }
.pd-cat-picked-x .i { width: 13px; height: 13px; pointer-events: none; }
.pd-cat-filter { margin-bottom: 8px; }
.pd-cat-tools {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
}
.pd-cat-tool {
  border: 0;
  background: none;
  padding: 0;
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-2);
  cursor: pointer;
}
.pd-cat-tool:hover { color: var(--text); }
.pd-cat-tools-sep { color: var(--text-3); font-size: 12px; }
.pd-cat-tree-wrap {
  max-height: min(70vh, 640px);
  overflow-x: hidden;
  overflow-y: auto;
  padding: 2px 0 6px;
  min-width: 0;
}
.pd-cat-tree,
.pd-cat-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
  min-width: 0;
  max-width: 100%;
}
.pd-cat-tree ul {
  padding-left: 22px;
}
.pd-cat-tree li {
  margin: 0;
}
.pd-cat-row {
  display: flex;
  align-items: center;
  gap: 2px;
  min-width: 0;
}
.pd-cat-toggle,
.pd-cat-toggle-spacer {
  width: 22px;
  height: 22px;
  flex: none;
}
.pd-cat-toggle {
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.pd-cat-toggle:hover {
  background: var(--muted-bg);
  color: var(--text);
}
.pd-cat-toggle .i {
  width: 14px;
  height: 14px;
  transition: transform .15s;
}
.pd-cat-tree li.has-children:not(.is-collapsed) > .pd-cat-row > .pd-cat-toggle .i {
  transform: rotate(90deg);
}
.pd-cat-item {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  min-height: 30px;
  padding: 1px 4px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}
.pd-cat-item:hover { background: var(--muted-bg); }
.pd-cat-item.is-flash {
  background: var(--muted-bg);
  box-shadow: inset 0 0 0 1px var(--blue);
}
.pd-cat-item .check {
  flex: none;
}
.pd-cat-name {
  min-width: 0;
  font-size: 13.5px;
  line-height: 1.3;
  color: var(--text);
  overflow-wrap: anywhere;
}
.pd-cat-tree > li > .pd-cat-row .pd-cat-name {
  font-weight: 500;
}
.pd-cat-tree li.is-filtered-out { display: none; }
.pd-cat-tree li.is-collapsed > ul { 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,
  .pd-prices,
  .pd-cats { 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 { flex-direction: column; align-items: stretch; }
  body[data-page="settings"] .page-head {
    flex-direction: row;
    align-items: flex-start;
  }
  .donut-row {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
  }
  .user-name,
  .user-copy { display: none; }
  .bell-panel { width: min(380px, calc(100vw - 16px)); }
  .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; }
  .od-comment-head { grid-template-columns: auto minmax(0, 1fr); }
  .od-comment-badges {
    grid-column: 2;
    justify-self: start;
  }
  .od-comments .od-card-head { flex-wrap: wrap; }
  .od-dialog-foot { align-items: stretch; }
  .od-dialog-actions {
    width: 100%;
    margin-left: 0;
  }
  .od-dialog-actions .btn-outline,
  .od-dialog-actions .btn-inverse { flex: 1; }
  .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; }
  .pd-var-search { min-width: 0; width: 100%; }
  .pd-var-toolbar .btn-outline { width: 100%; }
  .st-tabs { gap: 6px; }
  .st-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .st-grid:has(> .st-col) {
    display: flex;
    flex-direction: column;
  }
  .st-col { display: contents; }
  .st-split,
  .st-fields,
  .st-hp-counts,
  .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;
}
body[data-page="settings"] .content > form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

[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,
html.is-compact body[data-page="settings"] .st-col { gap: 12px; }
html.is-compact body[data-page="settings"] .content { gap: 12px; }
html.is-compact body[data-page="settings"] .content > form { gap: 16px; }

.st-head {
  align-items: center;
  gap: 12px;
}
.st-head .st-tabs {
  flex: 1;
  min-width: 0;
}
.st-head .page-actions {
  flex: none;
  margin-left: auto;
}

.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;
}
@supports (grid-template-rows: masonry) {
  .st-grid {
    grid-template-rows: masonry;
  }
}
.st-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 0;
}
.st-col:first-child > .st-card:nth-child(1) { order: 1; }
.st-col:nth-child(2) > .st-card:nth-child(1) { order: 2; }
.st-col:first-child > .st-card:nth-child(2) { order: 3; }
.st-col:nth-child(2) > .st-card:nth-child(2) { order: 4; }
.st-col:first-child > .st-card:nth-child(3) { order: 5; }
.st-col:nth-child(2) > .st-card:nth-child(3) { order: 6; }
.st-col:first-child > .st-card:nth-child(4) { order: 7; }
.st-col:nth-child(2) > .st-card:nth-child(4) { order: 8; }

.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-assets-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 28px;
}
.st-assets-row .st-logo-row {
  flex: 1 1 200px;
  min-width: 0;
}
.st-logo-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.st-favicon-preview {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  font-size: 16px;
  align-self: center;
}
.st-logo-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.st-logo-preview { flex: none; }
.st-logo-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.st-block {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.st-hp-counts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px 14px;
}

.st-panel[hidden] { display: none; }

.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-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: 0;
  width: 100%;
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.st-svc-list > .st-svc {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}
.st-svc-main {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 88px 42px 32px 32px;
  align-items: center;
  column-gap: 12px;
  padding: 12px;
  min-width: 0;
  cursor: pointer;
}
.st-svc.is-open .st-svc-main { padding-bottom: 8px; }
.st-svc-toggle {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
  flex: none;
}
.st-svc-toggle:hover { background: var(--muted-bg); color: var(--text); }
.st-svc-toggle .i {
  width: 18px;
  height: 18px;
  transition: transform .18s;
}
.st-svc.is-open .st-svc-toggle .i { transform: rotate(180deg); }
.st-svc-detail {
  margin: 0 0 12px;
  padding: 14px;
  border-radius: 12px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
}
.st-svc-detail[hidden] { display: none; }
.st-svc-fields {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(140px, .8fr) minmax(0, 1fr);
  gap: 12px 14px;
}
.st-svc-fields .st-span-2 { grid-column: 1 / -1; }
.st-svc-money {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.st-svc-money .od-input {
  flex: 1;
  min-width: 0;
}
.st-svc-currency {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-2);
  flex: none;
}
.st-svc-detail-foot {
  display: flex;
  justify-content: flex-end;
  margin-top: 12px;
}
.st-svc-detail-foot .btn-outline { height: 32px; padding: 0 10px; }
.st-svc-empty[hidden] { display: none; }
.st-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.st-disc-summary {
  width: 100%;
}
.st-disc-summary li {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 12px;
}
.st-disc-summary .st-method-title {
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-disc-empty[hidden],
.st-disc-summary[hidden] { display: none; }
.st-disc-dialog-card {
  width: min(520px, 100%);
}
.st-disc-dialog-lead {
  margin: 0 0 12px;
}
.st-disc-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px;
  gap: 10px;
  align-items: end;
}
.st-disc-row .st-svc-remove {
  margin-bottom: 2px;
}
.st-disc-add {
  margin-top: 12px;
  height: 36px;
  width: 100%;
  justify-content: center;
}
.st-svc-add-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.st-svc-remove,
.st-svc-remove-slot {
  width: 32px;
  height: 32px;
  flex: none;
}
.st-svc-remove {
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.st-svc-remove-slot {
  display: block;
  pointer-events: none;
}
.st-svc-remove:hover {
  background: var(--pill-red-bg);
  color: var(--pill-red-tx);
}
.st-svc-remove .i { width: 15px; height: 15px; }
.st-svc-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .01em;
  vertical-align: middle;
  background: var(--blue);
  color: #fff;
}
.st-svc.is-system .st-svc-main {
  margin: 4px 0 2px;
  padding: 12px;
  border-radius: 12px;
  background: var(--tint-blue);
  box-shadow: inset 3px 0 0 var(--blue);
}
.st-svc.is-system.is-open .st-svc-main {
  border-radius: 12px 12px 0 0;
  margin-bottom: 0;
  padding-bottom: 10px;
}
.st-svc.is-system .st-svc-detail {
  margin-top: 0;
  border-color: color-mix(in srgb, var(--blue) 22%, var(--border));
  background: var(--tint-blue);
  border-radius: 0 0 12px 12px;
}
.st-svc.is-system + .st-svc { border-top: 0; }
.st-svc.is-system [data-st-svc-name] {
  background: var(--muted-bg);
  color: var(--text-2);
}
.st-svc-locked {
  margin: 0;
  margin-right: auto;
}

.st-menu-lead { margin: 0 0 8px; }
.st-menu-access {
  list-style: none;
  margin: 0 0 4px;
  padding: 0;
}
.st-menu-access li + li { border-top: 1px solid var(--border); }
.st-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 2px;
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
}
.st-menu-item .i {
  width: 16px;
  height: 16px;
  color: var(--text-2);
  flex: none;
}
.st-menu-item .check { flex: none; }

.st-user-list .st-user {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr) 168px 80px 128px minmax(250px, auto);
  align-items: center;
  column-gap: 12px;
  padding: 12px 0;
}
.st-user-av {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: -.02em;
}
.st-user-you {
  margin-left: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  vertical-align: middle;
}
.st-user-role {
  width: auto;
  min-width: 0;
}
.st-user-role .select {
  width: 100%;
  min-width: 0;
  height: 32px;
  font-size: 12.5px;
  gap: 8px;
}
.st-user-role [data-dd-label] {
  overflow: hidden;
  text-overflow: ellipsis;
}
.st-user .pill {
  justify-self: start;
  white-space: nowrap;
}
.st-user-seen,
.st-user [data-st-user-resend] {
  min-width: 0;
  justify-self: start;
}
.st-user-seen {
  font-size: 12px;
  color: var(--text-2);
  text-align: left;
  white-space: nowrap;
}
.st-user-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  justify-self: end;
}
.st-user-locked,
.st-user [data-st-user-remove],
.st-user [data-st-user-login] {
  justify-self: start;
}
.st-user-locked {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  text-align: left;
  white-space: nowrap;
}
.st-user .btn-outline { height: 32px; padding: 0 10px; }
.st-user-add {
  height: 28px;
  padding: 0 12px;
  font-size: 12px;
  font-weight: 600;
  gap: 5px;
  box-shadow: none;
  border-radius: 999px;
}
.st-user-add .i {
  width: 12px;
  height: 12px;
  color: #fff;
}
.btn-outline.st-user-add .i {
  color: var(--text-2);
}

@media (max-width: 1080px) {
  .st-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .st-grid:has(> .st-col) {
    display: flex;
    flex-direction: column;
  }
  .st-col { display: contents; }
  .st-split { grid-template-columns: minmax(0, 1fr) 140px; }
}
@media (max-width: 760px) {
  .st-user-list .st-user {
    grid-template-columns: 36px minmax(0, 1fr);
    row-gap: 8px;
  }
  .st-user-av { grid-row: 1 / span 2; align-self: start; }
  .st-user-role,
  .st-user .pill,
  .st-user-seen,
  .st-user [data-st-user-resend],
  .st-user-actions,
  .st-user-locked,
  .st-user [data-st-user-remove],
  .st-user [data-st-user-login] {
    grid-column: 2;
    justify-self: start;
    width: auto;
    max-width: 100%;
  }
  .st-user-actions {
    justify-self: start;
  }
  .st-svc-fields,
  .st-svc-add-row,
  .st-disc-row {
    grid-template-columns: minmax(0, 1fr);
  }
  .st-disc-row .st-svc-remove {
    justify-self: end;
  }
  .st-svc-main {
    grid-template-columns: 32px minmax(0, 1fr) 72px 42px 32px 32px;
  }
}

/* --------------------------------------------------------- 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; }
}

/* ----------------------------------------------------------- connections */

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

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

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

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

.cn-badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1;
}

.cn-badge-heureka {
  background: #f97316;
  color: #fff;
}
.cn-badge-zbozi {
  background: #e11d48;
  color: #fff;
}
.cn-badge-google {
  background: #e8f1fe;
  color: #1a73e8;
}
[data-theme="dark"] .cn-badge-google {
  background: #16325c;
  color: #8ab4f8;
}

.cn-card-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.cn-card-meta {
  margin-top: 4px;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.4;
}

.cn-fields {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 16px;
}

.cn-url-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 0;
}

.cn-url-field .od-input {
  font-size: 12.5px;
  color: var(--text-2);
}

.cn-card.is-off .cn-card-title,
.cn-card.is-off .cn-card-meta,
.cn-card.is-off .cn-url-field:first-child .od-input {
  opacity: .72;
}

@media (max-width: 1080px) {
  .cn-grid { grid-template-columns: 1fr; }
}

.st-mail-list > .st-mail {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  padding: 0;
}
.st-mail-main {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr) 42px 32px;
  align-items: center;
  column-gap: 12px;
  padding: 12px 0;
  min-width: 0;
  cursor: pointer;
}
.st-mail.is-open .st-mail-main { padding-bottom: 8px; }
.st-mail-detail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px;
  border-radius: 12px;
  background: var(--muted-bg);
  border: 1px solid var(--border);
}
.st-mail-detail[hidden] { display: none; }
.st-mail-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.st-mail-chip {
  appearance: none;
  height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 999px;
  background: var(--panel);
  color: var(--text-2);
  font: inherit;
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}
.st-mail-chip:hover {
  border-color: var(--text-3);
  color: var(--text);
}
.st-mail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
  min-width: 0;
}
textarea.st-mail-editor {
  height: 360px;
  min-height: 220px;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  line-height: 1.45;
  resize: vertical;
  white-space: pre;
}
.st-mail-preview {
  width: 100%;
  height: 360px;
  min-height: 220px;
  border: 1px solid var(--border-ctl);
  border-radius: 8px;
  background: #fff;
}
.st-mail-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.st-mail-foot .btn-outline { height: 32px; padding: 0 12px; }

@media (max-width: 1080px) {
  .st-mail-layout { grid-template-columns: minmax(0, 1fr); }
  textarea.st-mail-editor,
  .st-mail-preview { height: 280px; }
}

/* ----------------------------------------------------------- modules */

body[data-page="modules"] {
  background: var(--muted-bg);
}
body[data-page="modules"] .topbar,
body[data-page="modules"] .content {
  background: var(--muted-bg);
}
body[data-page="modules"] .content {
  padding-top: 12px;
  gap: 18px;
}
body[data-page="modules"] .content > form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
[data-theme="dark"] body[data-page="modules"] {
  background: var(--bg);
}
[data-theme="dark"] body[data-page="modules"] .topbar,
[data-theme="dark"] body[data-page="modules"] .content {
  background: var(--bg);
}
html.is-compact body[data-page="modules"] .st-card { padding: 16px 18px; }
html.is-compact body[data-page="modules"] .content { gap: 12px; }
html.is-compact body[data-page="modules"] .content > form { gap: 16px; }
#mdHomeBody.pd-editor-body {
  min-height: 360px;
}

.md-slides {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.md-tile {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.md-tile-photo,
.md-row-photo {
  display: grid;
  place-items: center;
  width: 100%;
  border: 0;
  padding: 0;
  cursor: pointer;
  overflow: hidden;
  background: var(--muted-bg);
  color: var(--text-3);
  font: inherit;
}
.md-tile-photo {
  aspect-ratio: 16 / 10;
  border-radius: 10px;
}
.md-tile-photo img,
.md-row-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.md-tile-ph,
.md-row-ph {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 500;
}
.md-tile-ph .i,
.md-row-ph .i {
  width: 22px;
  height: 22px;
}
.md-tile-photo:hover,
.md-row-photo:hover {
  color: var(--blue);
  background: var(--tint-blue);
}
.md-tile-remove {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
}
.md-tile-remove .i { width: 14px; height: 14px; }
.md-tile-remove:hover {
  color: var(--red);
  border-color: var(--red);
  background: var(--tint-red, rgba(220, 38, 38, .06));
}
.md-tile-add {
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 220px;
  border-style: dashed;
  color: var(--text-2);
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-size: 13.5px;
  font-weight: 600;
}
.md-tile-add .i { width: 22px; height: 22px; }
.md-tile-add:hover {
  color: var(--blue);
  border-color: var(--blue);
  background: var(--tint-blue);
}

.md-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.md-row {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) 40px;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  background: var(--panel);
}
.md-row-photo {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  flex: none;
}
.md-row-text { min-width: 0; }
.md-row-remove { margin-bottom: 2px; }
.md-row-foot { margin-top: 12px; }

@media (max-width: 1080px) {
  .md-slides { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  body[data-page="modules"] .page-head {
    flex-direction: row;
    align-items: flex-start;
  }
  .md-slides { grid-template-columns: minmax(0, 1fr); }
  .md-row {
    grid-template-columns: 72px minmax(0, 1fr);
  }
  .md-row-remove {
    grid-column: 1 / -1;
    justify-self: end;
  }
}

/* ------------------------------------------------------------ callcentrum */

body[data-page="callcenter"][data-view="desk"] .main {
  height: 100vh;
  max-height: 100vh;
}
body[data-page="callcenter"][data-view="desk"] .content {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  gap: 14px;
  padding-top: 12px;
  padding-bottom: 16px;
}
body[data-page="callcenter"][data-view="report"] .content {
  padding-top: 12px;
  gap: 16px;
}
.cc-report {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.cc-report > .filters { margin-bottom: 0; }

.cc-head-tools {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}
.cc-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
.cc-progress-label {
  font-size: 12.5px;
  line-height: 1;
  color: var(--text-2);
  white-space: nowrap;
}
.cc-progress-label strong {
  color: var(--text);
  font-weight: 600;
  letter-spacing: -.01em;
}
.cc-progress-track {
  position: relative;
  width: 168px;
  height: 6px;
  border-radius: 99px;
  background: var(--border-ctl);
  flex: none;
}
.cc-progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--green);
}
.cc-progress-knob {
  position: absolute;
  top: 50%;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--panel);
  box-shadow: 0 1px 2px rgba(17, 24, 39, .16);
  transform: translateY(-50%);
  pointer-events: none;
}
.cc-progress-pct {
  min-width: 38px;
  font-size: 12.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  white-space: nowrap;
}

.cc-split {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(220px, 25%) minmax(210px, 280px) minmax(0, 1fr);
  gap: 16px;
}
.cc-col { min-height: 0; }
.cc-col-list {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 14px 12px 12px;
}
.cc-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 0 4px 10px;
}
.cc-list-head .card-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.cc-count {
  min-width: 22px;
  height: 22px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--muted-bg);
  color: var(--text-2);
  font-size: 12px;
  font-weight: 600;
  display: inline-grid;
  place-items: center;
}
.cc-filter {
  display: grid;
  grid-template-columns: 1.35fr 1.15fr .7fr;
  gap: 4px;
  margin: 0 0 10px;
  padding: 3px;
  border: 1px solid var(--border-ctl);
  border-radius: 10px;
  background: var(--muted-bg);
  flex: none;
}
.cc-filter-btn {
  appearance: none;
  border: 0;
  height: 28px;
  border-radius: 8px;
  background: transparent;
  color: var(--text-2);
  font: inherit;
  padding: 0 4px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
}
.cc-filter-btn:hover { color: var(--text); }
.cc-filter-btn.is-active {
  background: var(--panel);
  color: var(--text);
  font-weight: 600;
  box-shadow: var(--shadow-sm);
}
.cc-search { margin: 0 0 10px; width: 100%; max-width: none; flex: none; }
.cc-addr-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.cc-addr {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 4px;
  padding: 8px 6px 8px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: inherit;
}
.cc-addr-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}
.cc-park {
  flex: none;
  width: 28px;
  height: 28px;
  margin-top: -1px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-3);
  cursor: pointer;
}
.cc-park:hover,
.cc-park:focus-visible {
  background: var(--panel);
  color: var(--text);
}
.cc-park .i { width: 15px; height: 15px; }
.cc-addr.is-parked .cc-park {
  color: var(--text-2);
}
.cc-addr-body {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}
.cc-addr[hidden] { display: none !important; }
.cc-addr:hover { background: var(--muted-bg); }
.cc-addr.is-active {
  background: var(--tint-blue);
  border-color: transparent;
}
.cc-addr.is-parked,
.cc-addr.is-parked:hover {
  background: color-mix(in srgb, var(--text) 7%, var(--panel));
}
.cc-addr.is-parked.is-active {
  box-shadow: inset 3px 0 0 var(--blue);
}
.cc-addr-title {
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.3;
}
.cc-addr-sub {
  font-size: 12px;
  color: var(--text-2);
  line-height: 1.35;
}
.cc-addr .pill { margin-top: 4px; }
.cc-addr-empty {
  margin: 8px 6px 0;
  font-size: 13px;
  color: var(--text-2);
}
.cc-col-work {
  container-type: inline-size;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  background: color-mix(in srgb, var(--text) 5%, var(--bg));
}
#ccForm {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.cc-step.od-card { padding: 10px 12px 12px; }
.cc-step-call {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.cc-step-call .cc-hint { margin: 0; }
.cc-call-block[hidden] { display: none !important; }
.cc-step .pd-form-grid { gap: 8px 10px; margin-bottom: 0; }
.cc-step-note {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
.cc-step-note .pd-textarea {
  flex: 1;
  height: auto;
  min-height: 52px;
  resize: none;
  overflow: auto;
}
.cc-locked-note {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}
#ccForm.is-locked .cc-opt {
  cursor: default;
}
#ccForm.is-locked .cc-opt:hover {
  border-color: var(--border-ctl);
}
#ccForm.is-locked .cc-opt:not(:has(:checked)) {
  opacity: .55;
}
#ccForm.is-locked .cc-opt:has(input[value="reached"]:checked):hover,
#ccForm.is-locked .cc-opt:has(input[value="interested"]:checked):hover {
  border-color: var(--green);
}
#ccForm.is-locked .cc-opt:has(input[value="missed"]:checked):hover {
  border-color: var(--amber);
}
#ccForm.is-locked .cc-opt:has(input[value="not_interested"]:checked):hover {
  border-color: var(--red);
}
#ccForm.is-locked .od-input,
#ccForm.is-locked .od-input:hover,
#ccForm.is-locked .od-input:focus {
  background: var(--muted-bg);
  border-color: var(--border-ctl);
  box-shadow: none;
  cursor: default;
}
.cc-placeholder {
  margin: auto;
  max-width: 420px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}
.cc-placeholder p { color: var(--text-2); font-size: 13.5px; line-height: 1.45; }
.cc-placeholder-ico {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--tint-blue);
  color: var(--blue);
  margin-bottom: 4px;
}
.cc-side {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0;
}
.cc-side-empty {
  margin: 0;
  padding: 16px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}
.cc-side-addr {
  flex: none;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--border);
}
.cc-side-head {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.cc-side-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  line-height: 1.3;
}
.cc-side-place {
  margin-top: 3px;
  color: var(--text-2);
  font-size: 12.5px;
  line-height: 1.35;
}
.cc-side-facts {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 14px;
}
.cc-side-facts li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}
.cc-mini {
  width: 22px;
  height: 22px;
  margin-top: 1px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  flex: none;
}
.cc-mini .i { width: 13px; height: 13px; }
.cc-side-k {
  display: block;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
}
.cc-side-v {
  display: block;
  margin: 1px 0 0;
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
a.cc-side-v { color: inherit; text-decoration: none; }
a.cc-side-v:hover { color: var(--blue); }
.cc-side-sub {
  display: block;
  margin-top: 1px;
  color: var(--text-2);
  font-size: 12px;
}
.cc-side-addr .od-track-link { margin-top: 12px; }
.cc-side-notes {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 14px 14px;
}
.cc-side-notes-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.cc-side-notes .cc-side-empty { padding: 0; }
.cc-side-note-list { display: flex; flex-direction: column; }
.cc-side-note {
  padding: 10px 0;
  border-top: 1px solid var(--border);
}
.cc-side-note:first-child { padding-top: 0; border-top: 0; }
.cc-side-note-top {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
}
.cc-side-note time {
  font-size: 11.5px;
  color: var(--text-3);
}
.cc-side-pills { display: flex; flex-wrap: wrap; gap: 4px; }
.cc-side-note p {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.4;
  white-space: pre-wrap;
}
.cc-step-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
}
.cc-step-title .od-ico {
  width: 22px;
  height: 22px;
  border-radius: 7px;
}
.cc-step-title .od-ico .i { width: 13px; height: 13px; }
.cc-opt:has(input[value="reached"]:checked),
.cc-opt:has(input[value="interested"]:checked) {
  background: var(--tint-green);
  border-color: var(--green);
}
.cc-opt:has(input[value="missed"]:checked) {
  background: var(--tint-amber);
  border-color: var(--amber);
}
.cc-opt:has(input[value="not_interested"]:checked) {
  background: var(--tint-red);
  border-color: var(--red);
}
.cc-hint {
  margin: -4px 0 12px;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.4;
}
.cc-bonita {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}
.cc-bonita[hidden],
.cc-bonita-scale[hidden] { display: none !important; }
.cc-bonita-opt {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin: 0;
  padding: 7px 6px;
  border: 1px solid var(--border-ctl);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
}
.cc-bonita-opt:hover { border-color: var(--text-3); }
.cc-bonita-opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.cc-bonita-opt:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.cc-bonita-dot {
  width: 16px;
  height: 16px;
  border: 2px solid var(--text-3);
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--panel);
}
.cc-bonita-dot::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: transparent;
}
.cc-bonita-num {
  font-size: 13.5px;
  font-weight: 650;
  letter-spacing: -.02em;
  line-height: 1;
}
.cc-bonita-opt:has(input[value="1"]:checked) { background: var(--tint-red); border-color: var(--red); }
.cc-bonita-opt:has(input[value="2"]:checked) { background: var(--tint-amber); border-color: var(--amber); }
.cc-bonita-opt:has(input[value="3"]:checked) { background: var(--tint-blue); border-color: var(--blue); }
.cc-bonita-opt:has(input[value="4"]:checked),
.cc-bonita-opt:has(input[value="5"]:checked) { background: var(--tint-green); border-color: var(--green); }
.cc-bonita-opt:has(input[value="1"]:checked) .cc-bonita-dot { border-color: var(--red); }
.cc-bonita-opt:has(input[value="2"]:checked) .cc-bonita-dot { border-color: var(--amber); }
.cc-bonita-opt:has(input[value="3"]:checked) .cc-bonita-dot { border-color: var(--blue); }
.cc-bonita-opt:has(input[value="4"]:checked) .cc-bonita-dot,
.cc-bonita-opt:has(input[value="5"]:checked) .cc-bonita-dot { border-color: var(--green); }
.cc-bonita-opt:has(input[value="1"]:checked) .cc-bonita-dot::after { background: var(--red); }
.cc-bonita-opt:has(input[value="2"]:checked) .cc-bonita-dot::after { background: var(--amber); }
.cc-bonita-opt:has(input[value="3"]:checked) .cc-bonita-dot::after { background: var(--blue); }
.cc-bonita-opt:has(input[value="4"]:checked) .cc-bonita-dot::after,
.cc-bonita-opt:has(input[value="5"]:checked) .cc-bonita-dot::after { background: var(--green); }
.cc-bonita-scale {
  display: flex;
  justify-content: space-between;
  margin: 8px 2px 0;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.3;
}
.cc-step .cc-hint[data-cc-bonita-skip] { margin: 0; }
.cc-bonita-badge {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  background: var(--muted-bg);
  color: var(--text);
}
.cc-bonita-badge[data-bonita="1"] { background: var(--tint-red); color: var(--red); }
.cc-bonita-badge[data-bonita="2"] { background: var(--tint-amber); color: var(--amber); }
.cc-bonita-badge[data-bonita="3"] { background: var(--tint-blue); color: var(--blue); }
.cc-bonita-badge[data-bonita="4"],
.cc-bonita-badge[data-bonita="5"] { background: var(--tint-green); color: var(--green); }
#ccForm.is-locked .cc-bonita-opt { cursor: default; }
#ccForm.is-locked .cc-bonita-opt:hover { border-color: var(--border-ctl); }
#ccForm.is-locked .cc-bonita-opt:not(:has(:checked)) { opacity: .55; }
#ccForm.is-locked .cc-bonita-opt:has(input[value="1"]:checked):hover { border-color: var(--red); }
#ccForm.is-locked .cc-bonita-opt:has(input[value="2"]:checked):hover { border-color: var(--amber); }
#ccForm.is-locked .cc-bonita-opt:has(input[value="3"]:checked):hover { border-color: var(--blue); }
#ccForm.is-locked .cc-bonita-opt:has(input[value="4"]:checked):hover,
#ccForm.is-locked .cc-bonita-opt:has(input[value="5"]:checked):hover { border-color: var(--green); }
.cc-choice {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.cc-choice[hidden],
.cc-hint[hidden] { display: none !important; }
.cc-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 7px 10px;
  border: 1px solid var(--border-ctl);
  border-radius: 10px;
  background: var(--panel);
  cursor: pointer;
}
.cc-opt:hover { border-color: var(--text-3); }
.cc-opt input {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  opacity: 0;
}
.cc-opt:focus-within {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}
.cc-opt .cc-mini { width: 20px; height: 20px; margin-top: 0; }
.cc-opt-copy { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cc-opt-title { font-size: 13px; font-weight: 600; white-space: nowrap; }
.cc-opt-hint { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.cc-stats {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.cc-link {
  display: block;
  color: inherit;
  font-weight: 600;
  text-decoration: none;
}
.cc-link:hover { color: var(--blue); }
.cc-cell-sub {
  display: block;
  margin-top: 2px;
  color: var(--text-2);
  font-size: 12px;
  font-weight: 400;
}
.cc-note {
  max-width: 280px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1200px) {
  .cc-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1080px) {
  body[data-page="callcenter"][data-view="desk"] .main {
    height: auto;
    max-height: none;
  }
  body[data-page="callcenter"][data-view="desk"] .content { overflow: visible; }
  .cc-split { grid-template-columns: minmax(0, 1fr); }
  .cc-col-list { max-height: 340px; }
  .cc-side { max-height: 420px; }
  .cc-col-work { overflow: visible; }
  #ccForm { flex: none; }
  .cc-step-note { flex: none; }
  .cc-step-note .pd-textarea { flex: none; min-height: 72px; resize: vertical; }
  .cc-head-tools { margin-left: 0; }
  .cc-progress { flex: 1; }
  .cc-progress-track { width: auto; flex: 1; min-width: 72px; }
}
@media (max-width: 760px) {
  .cc-stats { grid-template-columns: 1fr 1fr; }
  .cc-stats .stat:last-child { grid-column: 1 / -1; }
  .cc-choice { grid-template-columns: 1fr; }
}
@container (min-width: 640px) {
  .cc-step-call {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
  }
  .cc-step-call > .cc-hint,
  .cc-step-call > [data-cc-bonita-choice] { grid-column: 1 / -1; }
  .cc-step-call:has([data-cc-interest-choice][hidden]) > .cc-call-block:first-child { grid-column: 1 / -1; }
}
@container (min-width: 700px) {
  .cc-step .pd-form-row-2 { grid-template-columns: 1.3fr .8fr .9fr 1.15fr; }
}

