/* Демо-інтерфейс платформи — дизайн-система Proboot (токени з apps/web/src/index.css).
   Усе обмежено .pb-app: вікно демо малюється у фіксованому розмірі 1280×800 і масштабується
   цілим блоком, тому всередині — тільки px, без vw/vh. */

.pb-app {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-2: #f8f8f8;
  --text: #0a0a0a;
  --text-dim: #6e6e6b;
  --line: #e4e4e2;
  --selected: #2a2a2a;
  --on-selected: #f5f5f5;
  --subnav-selected: #f1f1f0;
  --accent-solid: #2a2a2a;
  --accent-color: rgb(61 90 128);
  --accent-soft: rgb(61 90 128 / 0.1);
  --accent-color-hover: #2e4763;
  --switch-off: #d8d8d6;
  --success: #1e7a46;
  --warning: #8a5a00;
  --lime: #5f7d00;
  --error: #b23a32;
  --danger: #b42518;
  --btn-main-bg: #181818;
  --btn-main-fg: #e6e6e6;
  --btn-second-bg: #e6e6e6;
  --btn-second-fg: #181818;
  --overlay: rgb(10 10 10 / 0.38);
  --shadow: 0 12px 32px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.06);

  position: relative;
  display: flex;
  width: 1280px;
  height: 800px;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 14px;
  line-height: 1.45;
  font-feature-settings: 'tnum' 1;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.pb-app[data-theme='dark'] {
  --bg: #030303;
  --surface: #0c0c0c;
  --surface-2: #181818;
  --text: #f2f2f2;
  --text-dim: #8a8a8a;
  --line: #262626;
  --selected: #e6e6e6;
  --on-selected: #0c0c0c;
  --subnav-selected: #181818;
  --accent-solid: #e6e6e6;
  --accent-color: rgb(107 143 181);
  --accent-soft: rgb(107 143 181 / 0.14);
  --accent-color-hover: #82a2c4;
  --switch-off: #3a3a3a;
  --success: #57c785;
  --warning: #d9a441;
  --lime: #b8d34a;
  --error: #e2716b;
  --btn-main-bg: #e6e6e6;
  --btn-main-fg: #181818;
  --btn-second-bg: #242424;
  --btn-second-fg: #e6e6e6;
  --overlay: rgb(0 0 0 / 0.6);
  --shadow: 0 12px 32px rgb(0 0 0 / 0.5);
}

.pb-app *,
.pb-app *::before,
.pb-app *::after {
  box-sizing: border-box;
}

:where(.pb-app) button,
:where(.pb-app) input,
:where(.pb-app) textarea {
  font: inherit;
  color: inherit;
}

:where(.pb-app) button {
  cursor: pointer;
  background: none;
  border: 0;
  padding: 0;
}

.pb-app svg.i {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.pb-app svg.i-sm {
  width: 14px;
  height: 14px;
}

.pb-app ::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
.pb-app ::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.pb-app * {
  scrollbar-width: thin;
  scrollbar-color: var(--line) transparent;
}

/* ── Рейка навігації ─────────────────────────────────────────────── */
.pb-rail {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 72px;
  flex-shrink: 0;
}

.pb-rail-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.pb-rail-logo img {
  width: 30px;
  height: 30px;
}

.pb-rail nav,
.pb-rail-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.pb-rail nav {
  flex: 1;
  justify-content: center;
}

.pb-rail-bottom {
  padding-bottom: 16px;
}

.pb-tile {
  position: relative;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 4px;
  color: var(--text-dim);
  transition: color 0.15s, background-color 0.15s;
}

.pb-tile:hover {
  color: var(--text);
}

.pb-tile.is-active {
  background: var(--selected);
  color: var(--on-selected);
}

.pb-tile .pb-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.pb-tip {
  position: absolute;
  left: 48px;
  top: 50%;
  z-index: 30;
  transform: translateY(-50%);
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  font-size: 12px;
  white-space: nowrap;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.12s;
}

.pb-tile:hover .pb-tip {
  opacity: 1;
}

/* ── Каркас ──────────────────────────────────────────────────────── */
.pb-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  min-width: 0;
}

.pb-header {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 64px;
  padding: 0 24px 0 8px;
  flex-shrink: 0;
}

.pb-store {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px 6px 6px;
  border-radius: 4px;
  background: var(--surface);
  border: 1px solid var(--line);
}

.pb-store-mark {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 4px;
  background: var(--selected);
  color: var(--on-selected);
  font-size: 12px;
  font-weight: 600;
}

.pb-store b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}

.pb-store small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.2;
}

.pb-crumbs {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 13px;
}

.pb-crumbs b {
  color: var(--text);
  font-weight: 500;
}

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

.pb-search {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 260px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 13px;
}

.pb-search kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 3px;
  font-family: inherit;
  font-size: 11px;
}

.pb-icon-btn {
  position: relative;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 4px;
  color: var(--text-dim);
}

.pb-icon-btn:hover {
  color: var(--text);
  background: var(--surface);
}

.pb-icon-btn .pb-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--danger);
}

.pb-avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--selected);
  color: var(--on-selected);
  font-size: 12px;
  font-weight: 600;
}

.pb-main {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 0 24px 24px 8px;
}

.pb-page-head {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 44px;
  margin-bottom: 16px;
}

.pb-page-head h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pb-page-head .pb-count {
  color: var(--text-dim);
  font-size: 13px;
}

.pb-page-head .pb-actions {
  display: flex;
  gap: 8px;
  margin-left: auto;
}

.pb-split {
  display: flex;
  gap: 16px;
  align-items: flex-start;
}

.pb-split > .pb-grow {
  flex: 1;
  min-width: 0;
}

/* ── Підкатегорії ────────────────────────────────────────────────── */
.pb-subnav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  width: 196px;
  flex-shrink: 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.pb-subnav button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 10px;
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 13px;
  text-align: left;
}

.pb-subnav button:hover {
  color: var(--text);
}

.pb-subnav button.is-active {
  background: var(--subnav-selected);
  color: var(--text);
  font-weight: 500;
}

.pb-subnav small {
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 400;
}

/* ── Картки ──────────────────────────────────────────────────────── */
.pb-card {
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.pb-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 0;
}

.pb-card-head h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
}

.pb-card-head .pb-link {
  margin-left: auto;
}

.pb-card-body {
  padding: 14px 16px 16px;
}

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

.pb-grid-4 {
  grid-template-columns: repeat(4, 1fr);
}
.pb-grid-3 {
  grid-template-columns: repeat(3, 1fr);
}
.pb-grid-2 {
  grid-template-columns: repeat(2, 1fr);
}
.pb-grid-21 {
  grid-template-columns: 2fr 1fr;
}
.pb-grid-12 {
  grid-template-columns: 1fr 1.4fr;
}

.pb-stack {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pb-kpi {
  padding: 14px 16px 12px;
}

.pb-kpi-label {
  color: var(--text-dim);
  font-size: 12px;
}

.pb-kpi-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 2px 0 8px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pb-delta {
  font-size: 12px;
  font-weight: 500;
}
.pb-delta.up {
  color: var(--success);
}
.pb-delta.down {
  color: var(--error);
}

.pb-kpi svg {
  display: block;
  width: 100%;
  height: 44px;
}

.pb-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--accent-color);
  font-size: 13px;
  font-weight: 500;
}

.pb-link:hover {
  color: var(--accent-color-hover);
}

.pb-dim {
  color: var(--text-dim);
}

.pb-small {
  font-size: 12px;
}

.pb-mono {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
}

.pb-strike {
  color: var(--text-dim);
  text-decoration: line-through;
  font-size: 12px;
}

/* ── Кнопки ──────────────────────────────────────────────────────── */
.pb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--btn-main-bg) !important;
  border-radius: 4px;
  background: var(--btn-main-bg) !important;
  color: var(--btn-main-fg) !important;
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  transition: background-color 0.15s, color 0.15s;
}

.pb-btn:hover {
  background: var(--btn-main-fg) !important;
  color: var(--btn-main-bg) !important;
}

.pb-btn.second {
  border-color: var(--btn-second-bg) !important;
  background: var(--btn-second-bg) !important;
  color: var(--btn-second-fg) !important;
}

.pb-btn.second:hover {
  background: var(--btn-second-fg) !important;
  color: var(--btn-second-bg) !important;
}

.pb-btn.outline {
  border-color: var(--line) !important;
  background: var(--surface) !important;
  color: var(--text) !important;
}

.pb-btn.outline:hover {
  background: var(--surface-2) !important;
}

.pb-btn.sm {
  height: 30px;
  padding: 0 10px;
  font-size: 12px;
}

.pb-btn.accent {
  border-color: var(--accent-color) !important;
  background: var(--accent-color) !important;
  color: #fff !important;
}

.pb-btn.accent:hover {
  border-color: var(--accent-color-hover) !important;
  background: var(--accent-color-hover) !important;
}

.pb-btn[disabled] {
  opacity: 0.5;
  pointer-events: none;
}

/* ── Мітки ───────────────────────────────────────────────────────── */
.pb-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 1px 8px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}
.pb-badge.info {
  border-color: var(--accent-color);
  color: var(--accent-color);
}
.pb-badge.success {
  border-color: var(--success);
  color: var(--success);
}
.pb-badge.warning {
  border-color: var(--warning);
  color: var(--warning);
}
.pb-badge.lime {
  border-color: var(--lime);
  color: var(--lime);
}
.pb-badge.error {
  border-color: var(--error);
  color: var(--danger);
}

.pb-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 11px;
  background: var(--surface-2);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 500;
}

/* ── Вкладки ─────────────────────────────────────────────────────── */
.pb-tabs {
  display: flex;
  gap: 22px;
  border-bottom: 1px solid var(--line);
}

.pb-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: -1px;
  padding: 10px 0;
  border-bottom: 2px solid transparent;
  color: var(--text-dim);
  font-size: 13px;
}

.pb-tabs button:hover {
  color: var(--text);
}

.pb-tabs button.is-active {
  border-bottom-color: var(--accent-solid);
  color: var(--text);
  font-weight: 500;
}

.pb-tabs .pb-chip {
  height: 18px;
  padding: 0 6px;
}

.pb-seg {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
}

.pb-seg button {
  height: 28px;
  padding: 0 12px;
  border-radius: 3px;
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.pb-seg button.is-active {
  background: var(--selected);
  color: var(--on-selected);
}

/* ── Таблиці ─────────────────────────────────────────────────────── */
.pb-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.pb-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}

.pb-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: middle;
}

.pb-table th:first-child,
.pb-table td:first-child {
  padding-left: 16px;
}

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

.pb-table tbody tr.is-click {
  cursor: pointer;
}

.pb-table tbody tr.is-click:hover td {
  background: var(--surface-2);
}

.pb-table tbody tr.is-flash td {
  animation: pb-flash 1.4s ease-out;
}

@keyframes pb-flash {
  from {
    background: var(--accent-soft);
  }
  to {
    background: transparent;
  }
}

.pb-table .num {
  text-align: right;
  white-space: nowrap;
}

.pb-table .nowrap {
  white-space: nowrap;
}

.pb-cell-title {
  font-weight: 500;
}

.pb-cell-sub {
  color: var(--text-dim);
  font-size: 12px;
}

.pb-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.pb-empty {
  padding: 48px 16px;
  color: var(--text-dim);
  text-align: center;
}

/* ── Поля ────────────────────────────────────────────────────────── */
.pb-input {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-dim);
}

.pb-input:focus-within {
  border-color: var(--accent-solid);
}

.pb-input input,
.pb-input textarea {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font-size: 13px;
}

.pb-input.area {
  height: auto;
  padding: 8px 10px;
}

.pb-input textarea {
  resize: none;
  line-height: 1.45;
}

.pb-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pb-field > span {
  color: var(--text-dim);
  font-size: 12px;
  font-weight: 500;
}

.pb-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px 16px;
}

.pb-form .full {
  grid-column: 1 / -1;
}

.pb-switch {
  position: relative;
  display: inline-block;
  width: 34px;
  height: 20px;
  flex-shrink: 0;
  border-radius: 10px;
  background: var(--switch-off);
  transition: background-color 0.15s;
}

.pb-switch::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.2);
  transition: transform 0.15s;
}

.pb-switch.is-on {
  background: var(--accent-color);
}

.pb-switch.is-on::after {
  transform: translateX(14px);
}

.pb-check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
}

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

.pb-row.between {
  justify-content: space-between;
}

.pb-list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
}

.pb-list-row:first-child {
  border-top: 0;
}

.pb-list-row.is-click {
  cursor: pointer;
}

.pb-list-row.is-click:hover {
  background: var(--surface-2);
}

/* ── Взуття: мініатюри та ростовка ───────────────────────────────── */
.pb-thumb {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 4px;
  background: var(--surface-2);
}

.pb-thumb.lg {
  width: 100%;
  height: 120px;
}

.pb-thumb svg {
  width: 80%;
  height: auto;
}

.pb-sizes {
  display: flex;
  gap: 3px;
}

.pb-sz {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--surface);
  line-height: 1.1;
}

.pb-sz small {
  color: var(--text-dim);
  font-size: 10px;
}

.pb-sz b {
  font-size: 12px;
  font-weight: 600;
}

.pb-sz.is-low {
  border-color: var(--warning);
}

.pb-sz.is-low b {
  color: var(--warning);
}

.pb-sz.is-zero {
  border-style: dashed;
  opacity: 0.55;
}

.pb-sz.is-zero b {
  color: var(--text-dim);
  font-weight: 400;
}

.pb-size-edit {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
}

.pb-size-cell {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 4px;
  text-align: center;
}

.pb-size-cell.is-low {
  border-color: var(--warning);
}

.pb-size-cell.is-zero {
  border-style: dashed;
}

.pb-size-cell .pb-size-label {
  color: var(--text-dim);
  font-size: 12px;
}

.pb-stepper {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 6px;
}

.pb-stepper button {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--text-dim);
}

.pb-stepper button:hover {
  color: var(--text);
  background: var(--surface-2);
}

.pb-stepper b {
  min-width: 22px;
  font-size: 16px;
  font-weight: 600;
}

/* ── Етапи ───────────────────────────────────────────────────────── */
.pb-steps {
  display: flex;
  align-items: center;
}

.pb-step {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-dim);
  font-size: 12px;
  white-space: nowrap;
}

.pb-step i {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-style: normal;
  font-size: 11px;
}

.pb-step.is-done i {
  border-color: var(--accent-color);
  background: var(--accent-color);
  color: #fff;
}

.pb-step.is-current {
  color: var(--text);
  font-weight: 500;
}

.pb-step.is-current i {
  border-color: var(--accent-color);
  color: var(--accent-color);
}

.pb-step-line {
  flex: 1;
  height: 1px;
  min-width: 14px;
  margin: 0 8px;
  background: var(--line);
}

.pb-step-line.is-done {
  background: var(--accent-color);
}

.pb-progress {
  display: flex;
  gap: 3px;
}

.pb-progress span {
  flex: 1;
  height: 6px;
  border-radius: 2px;
  background: var(--line);
}

.pb-progress span.is-done {
  background: var(--accent-color);
}

.pb-progress span.is-current {
  background: var(--accent-soft);
  box-shadow: inset 0 0 0 1px var(--accent-color);
}

/* ── Графіки ─────────────────────────────────────────────────────── */
.pb-chart {
  display: block;
  width: 100%;
}

.pb-chart .bar {
  fill: var(--accent-color);
}
.pb-chart .bar-prev {
  fill: var(--line);
}
.pb-chart .bar-hl {
  fill: var(--accent-solid);
}
.pb-chart .grid {
  stroke: var(--line);
  stroke-width: 1;
}
.pb-chart text {
  fill: var(--text-dim);
  font-size: 10px;
  font-family: inherit;
}
.pb-chart .val {
  fill: var(--text);
  font-weight: 600;
}

.pb-chart .bar,
.pb-chart .bar-prev {
  transition: opacity 0.15s;
}

.pb-chart g.col:hover .bar {
  opacity: 0.75;
}

.pb-legend {
  display: flex;
  gap: 14px;
  color: var(--text-dim);
  font-size: 12px;
}

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

.pb-legend span::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 2px;
  background: var(--accent-color);
}

.pb-legend span.prev::before {
  background: var(--line);
}

.pb-hbar {
  height: 6px;
  border-radius: 3px;
  background: var(--surface-2);
  overflow: hidden;
}

.pb-hbar span {
  display: block;
  height: 100%;
  border-radius: 3px;
  background: var(--accent-color);
}

/* ── Шухляда, діалог, тост ───────────────────────────────────────── */
.pb-overlay {
  position: absolute;
  inset: 0;
  z-index: 40;
  background: var(--overlay);
  animation: pb-fade 0.15s ease-out;
}

.pb-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: 500px;
  border-left: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: pb-slide 0.2s ease-out;
}

.pb-dialog {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 41;
  display: flex;
  flex-direction: column;
  width: 780px;
  max-height: 700px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow);
  transform: translate(-50%, -50%);
  animation: pb-pop 0.16s ease-out;
}

.pb-dialog.sm {
  width: 460px;
}

.pb-modal-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--line);
}

.pb-modal-head h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.pb-modal-head .pb-icon-btn {
  margin-left: auto;
}

.pb-modal-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 20px;
}

.pb-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px;
  border-top: 1px solid var(--line);
}

.pb-modal-foot .pb-note {
  margin-right: auto;
}

.pb-section {
  margin-bottom: 20px;
}

.pb-section:last-child {
  margin-bottom: 0;
}

.pb-section-title {
  margin: 0 0 10px;
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.pb-kv {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 12px;
  font-size: 13px;
}

.pb-kv dt {
  color: var(--text-dim);
}

.pb-kv dd {
  margin: 0;
}

.pb-line-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.pb-line-item:first-child {
  border-top: 0;
  padding-top: 0;
}

.pb-total {
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--line);
  font-weight: 600;
}

.pb-timeline {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pb-timeline li {
  position: relative;
  padding: 0 0 12px 18px;
  font-size: 13px;
}

.pb-timeline li::before {
  content: '';
  position: absolute;
  top: 6px;
  left: 2px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--line);
}

.pb-timeline li:first-child::before {
  background: var(--accent-color);
}

.pb-timeline small {
  display: block;
  color: var(--text-dim);
  font-size: 11px;
}

.pb-toasts {
  position: absolute;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.pb-toast {
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 380px;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--btn-main-bg);
  color: var(--btn-main-fg);
  font-size: 13px;
  box-shadow: var(--shadow);
  animation: pb-toast 0.2s ease-out;
}

.pb-receipt {
  width: 280px;
  margin: 0 auto;
  padding: 18px 20px;
  border: 1px dashed var(--line);
  background: var(--surface-2);
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 12px;
  line-height: 1.6;
}

.pb-receipt .c {
  text-align: center;
}

.pb-receipt hr {
  border: 0;
  border-top: 1px dashed var(--text-dim);
  margin: 8px 0;
}

.pb-receipt .row {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}

.pb-receipt .qr {
  width: 84px;
  height: 84px;
  margin: 10px auto 0;
}

.pb-receipt .qr rect {
  fill: var(--text);
}

.pb-snippet {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 4px;
}

.pb-snippet .u {
  color: var(--success);
  font-size: 12px;
}

.pb-snippet .t {
  margin: 2px 0;
  color: var(--accent-color);
  font-size: 16px;
}

.pb-snippet .d {
  color: var(--text-dim);
  font-size: 13px;
}

.pb-photo-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.pb-photo-grid .pb-thumb {
  width: 100%;
  height: 120px;
}

.pb-photo-add {
  display: grid;
  place-items: center;
  height: 120px;
  border: 1px dashed var(--line);
  border-radius: 4px;
  color: var(--text-dim);
  font-size: 12px;
  text-align: center;
}

.pb-theme-prev {
  height: 150px;
  padding: 10px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
}

.pb-theme-prev .sf {
  display: flex;
  flex-direction: column;
  gap: 6px;
  height: 100%;
  padding: 8px;
  border-radius: 3px;
  overflow: hidden;
}

.pb-theme-prev .sf-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 10px;
}

.pb-theme-prev .sf-bar span {
  width: 34px;
  height: 6px;
  border-radius: 2px;
}

.pb-theme-prev .sf-hero {
  height: 46px;
  border-radius: 2px;
}

.pb-theme-prev .sf-items {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  flex: 1;
}

.pb-theme-prev .sf-items span {
  border-radius: 2px;
}

.sf.t-light {
  background: #ffffff;
}
.sf.t-light .sf-bar span,
.sf.t-light .sf-items span {
  background: #e6e6e4;
}
.sf.t-light .sf-hero {
  background: #d9d4cb;
}

.sf.t-dark {
  background: #111111;
}
.sf.t-dark .sf-bar span,
.sf.t-dark .sf-items span {
  background: #2a2a2a;
}
.sf.t-dark .sf-hero {
  background: #3d3a35;
}

.sf.t-warm {
  background: #f4efe7;
}
.sf.t-warm .sf-bar span,
.sf.t-warm .sf-items span {
  background: #e3d9ca;
}
.sf.t-warm .sf-hero {
  background: #a46a3c;
}

.pb-stars {
  color: var(--warning);
  letter-spacing: 1px;
}

.pb-spin {
  animation: pb-spin 0.8s linear infinite;
}

@keyframes pb-spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes pb-fade {
  from {
    opacity: 0;
  }
}

@keyframes pb-slide {
  from {
    transform: translateX(40px);
    opacity: 0;
  }
}

@keyframes pb-pop {
  from {
    transform: translate(-50%, -48%);
    opacity: 0;
  }
}

@keyframes pb-toast {
  from {
    transform: translateY(8px);
    opacity: 0;
  }
}

/* Підсвітка «натисни сюди» з лендингу */
.pb-hint {
  position: relative;
}

.pb-hint::after {
  content: '';
  position: absolute;
  inset: -3px;
  border: 2px solid var(--accent-color);
  border-radius: 6px;
  pointer-events: none;
  animation: pb-pulse 1.6s ease-in-out infinite;
}

td.pb-hint::after,
tr.pb-hint td:first-child::after {
  inset: 2px;
}

@keyframes pb-pulse {
  0%,
  100% {
    opacity: 0.25;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .pb-app *,
  .pb-app *::after {
    animation: none !important;
    transition: none !important;
  }
}

/* ── Службові ────────────────────────────────────────────────────── */
.pb-grow { flex: 1; min-width: 0; }
.pb-mt { margin-top: 16px; }
.pb-mt8 { margin-top: 8px; }
.pb-mt6 { margin-top: 6px; }
.pb-mb12 { margin-bottom: 12px; }
.pb-pt8 { padding-top: 8px; }
.pb-m0 { margin: 0; }
.pb-ml-auto { margin-left: auto; }
.pb-w60 { width: 60px; }
.pb-w90 { width: 90px; }
.pb-w200 { width: 200px; }
.pb-w240 { width: 240px; }
.pb-w320 { width: 320px; }
.pb-pad-x { padding: 0 16px; }
.pb-pad-x20 { padding: 0 20px; }
.pb-card-body.pb-flush { padding: 6px 0 0; }
.pb-card-body.pb-flush .pb-list-row:first-child { border-top: 0; }
.pb-bars { display: flex; flex-direction: column; gap: 14px; padding-top: 18px; }
.pb-bars .pb-hbar { margin-top: 6px; height: 8px; }
.pb-thumb.sm { width: 34px; height: 34px; }
.pb-thumb-zoom svg { width: 140%; }
.pb-overflow { overflow: hidden; }
.pb-h3 { margin: 0; font-size: 15px; font-weight: 600; }
.pb-kpi-inline { display: inline-flex; gap: 6px; align-items: baseline; font-weight: 600; }
.pb-prose p { display: flex; gap: 8px; margin: 0 0 10px; font-size: 13px; }
.pb-prose p .i { margin-top: 2px; }
.pb-center { display: flex; flex-direction: column; align-items: center; padding: 48px 24px; text-align: center; }
.pb-center p { margin: 8px 0 0; }
.pb-center .pb-btn { margin-top: 20px; }
.pb-big-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 14px; border-radius: 50%; background: var(--surface-2); color: var(--text-dim); }
.pb-big-icon .i { width: 24px; height: 24px; }
.pb-maxw { max-width: 520px; font-size: 13px; }
.pb-switch-row { flex-direction: row; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 4px; }
.pb-switch-row small { font-size: 12px; font-weight: 400; }
.pb-overlay.pb-over2 { z-index: 50; }
.pb-dialog.pb-over2 { z-index: 51; }
.pb-app svg.i-xs { width: 12px; height: 12px; stroke-width: 2.5; }
.pb-modal-head .pb-thumb { width: 40px; height: 40px; }
.pb-seg { flex-wrap: wrap; }

/* У темній темі мініатюри — на світлому тлі, як фото товару: чорне взуття інакше зливається */
.pb-app[data-theme='dark'] .pb-thumb {
  background: #c9c9c6;
}
