/* Klein CRM — інтерфейс.
   Палітра статусів побудована на CMYK: блакитний, пурпуровий, жовтий і чорний — як у картриджах. */

:root {
  --bg: #EDF0F3;
  --surface: #FFFFFF;
  --surface-2: #F6F8FA;
  --ink: #16202B;
  --ink-2: #364352;
  --muted: #66737F;
  --line: #D6DDE4;
  --line-2: #E6EBEF;
  --accent: #0A7AA6;
  --accent-2: #075E80;
  --accent-soft: #E0F0F7;
  --ok: #1E8A5C;
  --warn: #B07F00;
  --err: #B3261E;

  --c-found: #8A96A3;
  --c-agreed: #0A9BC9;
  --c-trip: #2F5BD3;
  --c-onway: #6B46C1;
  --c-received: #16202B;
  --c-service: #D9A300;
  --c-repair: #C13C7E;
  --c-sale: #1E9E6A;
  --c-sold: #0D6B47;
  --c-cancel: #B4BDC6;

  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --shadow: 0 1px 2px rgba(22, 32, 43, .06), 0 2px 10px rgba(22, 32, 43, .04);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Unbounded", "Onest", system-ui, sans-serif;
  --side: 248px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 var(--font);
  font-feature-settings: "tnum" 1;
}
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; }
code { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 4px; padding: 0 4px; font-size: .9em; }
h1, h2, h3 { margin: 0; line-height: 1.2; }
h1 { font: 700 26px/1.15 var(--display); letter-spacing: -.01em; }
h2 { font: 600 18px/1.3 var(--font); }
h3 { font: 600 15px/1.3 var(--font); }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.ic { flex: none; vertical-align: middle; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* ---------- Каркас ---------- */
.side {
  position: fixed; inset: 0 auto 0 0; width: var(--side);
  background: var(--ink); color: #C9D3DC;
  display: flex; flex-direction: column; padding: 18px 14px; z-index: 30;
}
.brand { display: flex; align-items: center; gap: 10px; color: #fff; padding: 4px 8px 18px; }
.brand:hover { text-decoration: none; }
.brand-name { font: 700 16px/1.1 var(--display); letter-spacing: .01em; }
.brand-logo { width: 34px; height: 34px; flex: none; border-radius: 9px; display: block; }
.auth-brand .brand-logo { width: 56px; height: 56px; border-radius: 14px; }
.brand-mark { display: inline-grid; grid-template-columns: repeat(4, 6px); gap: 3px; height: 22px; align-items: end; }
.brand-mark i { display: block; border-radius: 3px; }
.brand-mark i:nth-child(1) { background: #13B4E5; height: 22px; }
.brand-mark i:nth-child(2) { background: #D64B92; height: 16px; }
.brand-mark i:nth-child(3) { background: #F2C200; height: 19px; }
.brand-mark i:nth-child(4) { background: #fff; height: 13px; }
.side-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; font-weight: 600;
  padding: 11px 12px; border-radius: var(--r-md); margin-bottom: 16px;
}
.side-add:hover { background: #0B8BBD; text-decoration: none; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.side-nav a {
  display: flex; align-items: center; gap: 12px; color: #C9D3DC;
  padding: 10px 12px; border-radius: var(--r-sm); font-weight: 500;
}
.side-nav a:hover { background: rgba(255, 255, 255, .06); color: #fff; text-decoration: none; }
.side-nav a.on { background: rgba(19, 180, 229, .14); color: #fff; box-shadow: inset 3px 0 0 #13B4E5; }
.side-user {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 12px 8px; border-top: 1px solid rgba(255, 255, 255, .08);
}
.side-user b { display: block; color: #fff; font-weight: 600; font-size: 14px; }
.side-user small { color: #8796A5; }
.side-user .icon-btn { color: #C9D3DC; }
.side-ver { font-size: 12px; color: #607080; padding: 0 8px; }

.main { margin-left: var(--side); padding: 28px 32px 60px; max-width: calc(1380px + var(--side)); }
.main-solo { margin: 0 auto; }

.tabbar { display: none; }

@media (max-width: 900px) {
  .side { display: none; }
  .main { margin-left: 0; padding: 18px 14px 100px; }
  .tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    background: var(--ink); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around; align-items: center;
  }
  .tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    color: #9AA8B5; font-size: 11px; padding: 6px 0;
  }
  .tabbar a.on { color: #fff; }
  .tabbar a:hover { text-decoration: none; }
  .tabbar .tab-add {
    flex: none; width: 52px; height: 52px; border-radius: 50%;
    background: var(--accent); color: #fff; justify-content: center; margin-top: -22px;
    box-shadow: 0 4px 14px rgba(10, 122, 166, .45);
  }
  h1 { font-size: 21px; }
}

/* ---------- Заголовок сторінки ---------- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head .sub { margin: 6px 0 0; color: var(--muted); }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.crumbs { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font: 600 14px/1 var(--font); padding: 10px 15px; border-radius: var(--r-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  cursor: pointer; white-space: nowrap; min-height: 40px;
}
.btn:hover { border-color: #B8C3CD; background: var(--surface-2); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-2); border-color: var(--accent-2); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #26323F; }
.btn-danger { color: var(--err); }
.btn-danger:hover { border-color: var(--err); background: #FDF0EF; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-sm { padding: 6px 10px; min-height: 32px; font-size: 13px; }
.btn-lg { padding: 13px 22px; font-size: 15px; min-height: 48px; }
.btn[disabled] { opacity: .55; cursor: wait; }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border-radius: var(--r-sm); color: var(--ink-2); background: transparent; border: 0; cursor: pointer; }
.icon-btn:hover { background: rgba(0, 0, 0, .06); }

/* ---------- Панелі ---------- */
.panel { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-lg); padding: 20px; box-shadow: var(--shadow); }
.panel + .panel { margin-top: 16px; }
.panel > h2 { margin-bottom: 14px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-head h2 { margin: 0; }
.cols { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(320px, 1fr); gap: 18px; align-items: start; }
.cols > div > .panel + .panel { margin-top: 18px; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }

/* ---------- Конвеєр статусів ---------- */
.pipe { list-style: none; padding: 0; margin: 0 0 22px; display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 4px; }
.pipe li { position: relative; }
.pipe-cell {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; height: 100%;
  background: var(--surface); padding: 14px 12px 12px 18px; color: var(--ink);
  clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%, 12px 50%);
  border-top: 4px solid var(--c);
  min-height: 86px;
}
.pipe li:first-child .pipe-cell { clip-path: polygon(0 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 0 100%); padding-left: 14px; }
a.pipe-cell:hover { background: var(--surface-2); text-decoration: none; }
.pipe-cell b { font: 700 28px/1 var(--display); color: var(--c); }
.pipe-cell span { font-size: 12.5px; color: var(--ink-2); line-height: 1.25; }
.pipe .st-found { --c: var(--c-found); }
.pipe .st-agreed { --c: var(--c-agreed); }
.pipe .st-trip { --c: var(--c-trip); }
.pipe .st-onway { --c: var(--c-onway); }
.pipe .st-received { --c: var(--c-received); }
.pipe .st-service { --c: var(--c-service); }
.pipe .st-repair { --c: var(--c-repair); }
.pipe .st-sale { --c: var(--c-sale); }
.pipe .st-sold { --c: var(--c-sold); }
.pipe-item .pipe-cell { min-height: 54px; padding-top: 10px; padding-bottom: 10px; background: var(--surface-2); color: var(--muted); }
.pipe-item .pipe-cell span { color: var(--muted); }
.pipe-item .is-done .pipe-cell { background: color-mix(in srgb, var(--c) 14%, #fff); }
.pipe-item .is-done .pipe-cell span { color: var(--ink-2); }
.pipe-item .is-now .pipe-cell { background: var(--c); }
.pipe-item .is-now .pipe-cell span { color: #fff; font-weight: 600; }
.pipe-item .st-service.is-now .pipe-cell span { color: var(--ink); }
@media (max-width: 900px) {
  .pipe { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .pipe-cell { min-height: 70px; padding: 10px 8px 8px 16px; }
  .pipe-cell b { font-size: 22px; }
  .pipe-cell span { font-size: 11px; }
  .pipe-item { display: flex; overflow-x: auto; scrollbar-width: none; }
  .pipe-item li { flex: 0 0 auto; min-width: 118px; }
}

/* ---------- Показники ---------- */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.kpi { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 14px 16px; }
.kpi small { display: block; color: var(--muted); font-size: 13px; }
.kpi b { display: block; font: 700 22px/1.25 var(--display); margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi em { font-style: normal; font-size: 12.5px; color: var(--muted); }
.kpi .pos { color: var(--ok); }
.kpi .neg { color: var(--err); }
@media (max-width: 900px) { .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin-left: -14px; margin-right: -14px; padding: 0 14px 2px; } .chip { flex: none; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi b { font-size: 18px; } }

.pos { color: var(--ok); }
.neg { color: var(--err); }

/* ---------- Значки статусів ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 6px; padding: 3px 9px 3px 8px;
  border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap;
  background: color-mix(in srgb, var(--c) 13%, #fff); color: color-mix(in srgb, var(--c) 82%, #000);
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.st-found { --c: var(--c-found); }
.st-agreed { --c: var(--c-agreed); }
.st-trip { --c: var(--c-trip); }
.st-onway { --c: var(--c-onway); }
.st-received { --c: var(--c-received); }
.st-service { --c: var(--c-service); }
.st-repair { --c: var(--c-repair); }
.st-sale { --c: var(--c-sale); }
.st-sold { --c: var(--c-sold); }
.st-cancel { --c: var(--c-cancel); }
.badge.st-service { color: #6B5100; }
.badge.st-cancel { color: #6A7580; text-decoration: line-through; }
.tag { display: inline-block; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); border: 1px solid var(--line-2); font-size: 12px; color: var(--ink-2); }

/* ---------- Таблиці ---------- */
.table-wrap { overflow-x: auto; margin: 0 -20px; padding: 0 20px; }
table.t { width: 100%; border-collapse: collapse; font-size: 14px; }
.t th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.t td { padding: 10px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.t tr:last-child td { border-bottom: 0; }
.t tbody tr:hover td { background: #FAFBFC; }
.t .num { text-align: right; white-space: nowrap; }
.t tfoot td { font-weight: 700; border-top: 2px solid var(--line); }
.t .row-link { color: var(--ink); font-weight: 600; }
.t .row-sub { color: var(--muted); font-size: 12.5px; }

/* ---------- Список товарів ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .search { flex: 1 1 260px; position: relative; }
.toolbar .search input { padding-left: 38px; }
.toolbar .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-size: 13.5px; font-weight: 500;
}
.chip:hover { text-decoration: none; border-color: #B8C3CD; }
.chip i { font-style: normal; color: var(--muted); font-size: 12px; }
.chip.on { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.on i { color: #AEBBC7; }
.chip-dot::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--c); }

.items { display: flex; flex-direction: column; gap: 8px; }
.item-row {
  display: grid; grid-template-columns: 28px 76px minmax(0, 1fr) 150px 170px 130px; gap: 14px; align-items: center;
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 14px 10px 10px;
}
.item-row:hover { border-color: #C5CFD8; }
.item-row .thumb { width: 76px; height: 58px; }
.item-row .title { font-weight: 600; color: var(--ink); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-row .meta { font-size: 13px; color: var(--muted); display: flex; gap: 10px; flex-wrap: wrap; margin-top: 2px; }
.item-row .meta span { display: inline-flex; align-items: center; gap: 3px; }
.item-row .money { text-align: right; }
.item-row .money b { display: block; font: 600 16px/1.2 var(--display); }
.item-row .money s { color: var(--muted); font-size: 12.5px; }
.item-row .money small { display: block; color: var(--muted); font-size: 12px; }
.thumb { display: block; object-fit: cover; border-radius: var(--r-sm); background: var(--surface-2); }
.thumb-sm { width: 56px; height: 44px; min-width: 56px; }
/* Мініатюра не стискається у вузькій таблиці (на телефоні) */
.thumb { flex-shrink: 0; max-width: none; }
.t td:has(> .thumb) { min-width: 56px; }
.thumb-empty { display: flex; align-items: center; justify-content: center; color: #A7B3BF; }
@media (max-width: 900px) {
  .item-row { grid-template-columns: 22px 64px minmax(0, 1fr); gap: 10px; padding: 10px; }
  .item-row .thumb { width: 64px; height: 52px; }
  .item-row .col-status, .item-row .col-money, .item-row .col-cost { grid-column: 3; text-align: left; }
  .item-row .money { text-align: left; }
  .item-row .money b { display: inline; font-size: 15px; }
}
.bulk {
  position: sticky; bottom: 12px; z-index: 20; display: none; align-items: center; gap: 10px; flex-wrap: wrap;
  background: var(--ink); color: #fff; border-radius: var(--r-md); padding: 10px 14px; margin-top: 14px;
  box-shadow: 0 8px 24px rgba(22, 32, 43, .25);
}
.bulk.on { display: flex; }
.bulk select { width: auto; min-width: 180px; }
@media (max-width: 900px) { .bulk { bottom: 84px; } }

/* ---------- Форми ---------- */
.form label, label.f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form label + label, .form .grid2 + label { margin-top: 12px; }
.form :is(.grid2, .grid3, .grid4) > label { margin-top: 0; }
input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=email], input:not([type]), select, textarea {
  width: 100%; font: 400 15px/1.35 var(--font); color: var(--ink);
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 9px 11px; min-height: 40px;
}
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[readonly] { background: var(--surface-2); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.span2 { grid-column: span 2; }
.span-all { grid-column: 1 / -1; }
@media (max-width: 700px) { .grid2, .grid3, .grid4 { grid-template-columns: 1fr; } .span2 { grid-column: auto; } }
.hint { font-size: 13px; color: var(--muted); font-weight: 400; margin: 4px 0 0; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; flex-wrap: wrap; }
.input-suffix { position: relative; display: block; }
.input-suffix input { padding-right: 34px; }
.input-suffix em { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); font-weight: 600; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.seg label {
  flex-direction: row !important; align-items: center; gap: 8px !important; padding: 10px 14px;
  border: 1px solid var(--line); border-radius: var(--r-sm); cursor: pointer; font-size: 14px !important; color: var(--ink) !important;
}
.seg label small { color: var(--muted); font-weight: 400; }
.seg label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }
.check { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px !important; font-weight: 500 !important; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }

/* ---------- Повідомлення ---------- */
.flash { position: relative; padding: 12px 40px 12px 14px; border-radius: var(--r-md); margin-bottom: 14px; font-weight: 500; border: 1px solid; }
.flash-ok { background: #E8F6EF; border-color: #BFE5D1; color: #12573A; }
.flash-err { background: #FCEDEC; border-color: #F2C6C2; color: #8C1D17; }
.flash-warn { background: #FFF6DB; border-color: #F1DE9E; color: #6B5100; }
.flash-x { position: absolute; right: 8px; top: 8px; border: 0; background: none; font-size: 20px; line-height: 1; cursor: pointer; color: inherit; opacity: .6; }
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty h2 { color: var(--ink); margin-bottom: 8px; }
.empty .btn { margin-top: 14px; }

/* ---------- Картка товару ---------- */
.item-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: start; margin-bottom: 16px; }
.item-head h1 { font-size: 23px; }
.item-head .meta { display: flex; gap: 14px; flex-wrap: wrap; color: var(--muted); font-size: 14px; margin-top: 8px; }
.item-head .meta a, .item-head .meta span { display: inline-flex; gap: 5px; align-items: center; }
@media (max-width: 700px) { .item-head { grid-template-columns: 1fr; } }

.gallery { display: grid; gap: 8px; }
.gallery-main { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); border-radius: var(--r-md); overflow: hidden; }
.gallery-main img { width: 100%; height: 100%; object-fit: contain; }
.gallery-strip { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; }
.gallery-strip button { flex: none; padding: 0; border: 2px solid transparent; border-radius: var(--r-sm); background: none; cursor: pointer; position: relative; }
.gallery-strip button.on { border-color: var(--accent); }
.gallery-strip img { width: 74px; height: 56px; object-fit: cover; border-radius: 4px; display: block; }
.photo-del { position: absolute; right: 8px; top: 8px; }

/* Торг: стара ціна перекреслена, нова — велика */
.deal { display: flex; align-items: flex-end; gap: 14px; flex-wrap: wrap; }
.deal-ask { color: var(--muted); }
.deal-ask small, .deal-got small { display: block; font-size: 12.5px; }
.deal-ask s { font: 500 20px/1.2 var(--display); text-decoration-thickness: 2px; text-decoration-color: var(--c-repair); }
.deal-got b { font: 700 38px/1 var(--display); letter-spacing: -.02em; }
.deal-save { background: #E3F4EC; color: #12573A; font-weight: 700; border-radius: 999px; padding: 4px 10px; font-size: 13px; margin-bottom: 6px; }
.deal-note { font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 2px 7px; border-radius: 4px; margin-left: 6px; vertical-align: middle; font-family: var(--font); }

.cost { width: 100%; border-collapse: collapse; font-size: 14px; }
.cost td { padding: 7px 0; border-bottom: 1px dashed var(--line-2); }
.cost td:last-child { text-align: right; white-space: nowrap; font-weight: 600; }
.cost td small { color: var(--muted); font-weight: 400; }
.cost tr.total td { border-bottom: 0; border-top: 2px solid var(--ink); padding-top: 10px; font-size: 16px; font-weight: 700; }
.cost tr.total td:last-child { font-family: var(--display); }
.cost tr.profit td { border-bottom: 0; font-size: 16px; }
.cost tr.profit td:last-child { font-family: var(--display); }

.kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 7px 12px; font-size: 14px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }

.desc { white-space: pre-wrap; font-size: 14px; color: var(--ink-2); max-height: 220px; overflow: auto; background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; margin: 0; }

.status-pick { display: flex; gap: 6px; flex-wrap: wrap; }
.status-pick button {
  border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 6px 12px 6px 10px;
  font: 500 13.5px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; color: var(--ink);
}
.status-pick button::before { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.status-pick button:hover { border-color: var(--c); }
.status-pick button.on { background: var(--c); border-color: var(--c); color: #fff; }
.status-pick button.on::before { background: #fff; }
.status-pick button.st-service.on { color: var(--ink); }

.exp-add { display: grid; grid-template-columns: 1fr 1.4fr 1fr; gap: 8px; align-items: end; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line-2); }
@media (max-width: 700px) { .exp-add { grid-template-columns: 1fr 1fr; } .exp-add .btn { grid-column: span 2; } }

.timeline { list-style: none; margin: 0; padding: 0; font-size: 13.5px; }
.timeline li { display: grid; grid-template-columns: 118px minmax(0, 1fr); gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.timeline li:last-child { border: 0; }
.timeline time { color: var(--muted); font-size: 12.5px; }

/* ---------- Додавання ---------- */
.importer { display: flex; gap: 10px; }
.importer input { font-size: 16px; min-height: 48px; }
@media (max-width: 700px) { .importer { flex-direction: column; } }
.pick-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(108px, 1fr)); gap: 8px; }
.pick-photos label { position: relative; cursor: pointer; display: block !important; }
.pick-photos img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--r-sm); border: 2px solid transparent; display: block; }
.pick-photos input { position: absolute; top: 6px; left: 6px; width: 18px; height: 18px; accent-color: var(--accent); }
.pick-photos input:checked + img { border-color: var(--accent); }
.pick-photos input:not(:checked) + img { opacity: .4; }
.bookmarklet {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: var(--r-sm);
  background: var(--ink); color: #fff; font-weight: 700; cursor: grab; border: 2px dashed #5B6B7B;
}
.bookmarklet:hover { text-decoration: none; color: #fff; }
.steps { padding-left: 20px; margin: 8px 0 0; }
.steps li { margin: 4px 0; }

/* ---------- Карта ---------- */
.map-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; height: calc(100vh - 150px); min-height: 520px; }
.map-box { border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line-2); background: #DDE5EC; position: relative; }
#map, .map { width: 100%; height: 100%; }
.map-small { height: 260px; border-radius: var(--r-md); overflow: hidden; border: 1px solid var(--line-2); }
.map-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.map-side .panel { padding: 14px; }
.map-list { overflow: auto; flex: 1; min-height: 0; }
.map-pick { list-style: none; margin: 0; padding: 0; }
.map-pick li { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: center; padding: 8px 4px; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.map-pick li b { font-weight: 600; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.map-pick li small { color: var(--muted); }
.map-pick .num { font: 700 12px var(--display); background: var(--ink); color: #fff; border-radius: 50%; width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center; }
@media (max-width: 1000px) { .map-layout { grid-template-columns: 1fr; height: auto; } .map-box { height: 60vh; } }
.pin { width: 26px; height: 26px; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); background: var(--c, var(--accent)); border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; }
.pin span { transform: rotate(45deg); color: #fff; font: 700 11px var(--display); }
.pin.sel { outline: 3px solid #13B4E5; outline-offset: 1px; }
.leaflet-popup-content { font: 14px/1.4 var(--font); margin: 12px 14px; min-width: 220px; }
.pop img { width: 100%; height: 120px; object-fit: cover; border-radius: 6px; margin-bottom: 6px; }
.pop b { display: block; margin-bottom: 2px; }
.pop .btn { margin-top: 8px; width: 100%; }
.leaflet-div-icon.pin-wrap { background: none; border: 0; }

/* ---------- Рейси ---------- */
.stops { list-style: none; margin: 0; padding: 0; counter-reset: stop; }
.stop { display: grid; grid-template-columns: 44px 72px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.stop:last-child { border: 0; }
.stop-n { width: 36px; height: 36px; border-radius: 50%; background: var(--ink); color: #fff; font: 700 15px var(--display); display: flex; align-items: center; justify-content: center; }
.stop.done .stop-n { background: var(--ok); }
.stop .thumb { width: 72px; height: 56px; }
.stop h3 { margin-bottom: 4px; }
.stop .addr { font-size: 14px; color: var(--ink-2); }
.stop .line { display: flex; gap: 12px; flex-wrap: wrap; font-size: 14px; margin-top: 4px; }
.stop .line a, .stop .line span { display: inline-flex; gap: 5px; align-items: center; }
.stop-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
.stop-actions .row { display: flex; gap: 4px; }
@media (max-width: 700px) {
  .stop { grid-template-columns: 36px minmax(0, 1fr); }
  .stop .thumb { display: none; }
  .stop-actions { grid-column: 2; flex-direction: row; flex-wrap: wrap; align-items: center; }
}
.pay { font: 700 15px var(--display); }
.trip-card { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: center; }

/* ---------- Розрахунки з перевізниками ---------- */
.bal { display: inline-block; font-weight: 700; white-space: nowrap; padding: 3px 10px; border-radius: 999px; font-size: 13px; }
.bal-owe { background: #FCECEB; color: #A42A20; }
.bal-hold { background: #E2F1F8; color: #075E80; }
.bal-zero { background: #E6F4EC; color: #12573A; }
.bal-big { font: 700 26px/1.2 var(--display); padding: 6px 16px; margin: 6px 6px 0 0; }
.balance-hero { margin-bottom: 18px; }
.balance-hero .hint { max-width: 70ch; }
.owe { color: #A42A20; }
.paid { color: var(--accent-2); }
.kpis-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.paid-by { border: 1px dashed var(--line); background: var(--surface-2); border-radius: 999px; padding: 2px 9px; font: 500 12px var(--font); cursor: pointer; color: var(--ink-2); }
.paid-by.pb-carrier { border-color: #9DB6F0; color: #2340A0; background: #EEF2FD; }
.paid-by:hover { border-style: solid; }
@media (max-width: 700px) { .bal-big { font-size: 20px; } .kpis-2 { grid-template-columns: 1fr; } }

/* ---------- Сторінка перевізника ---------- */
.carrier-page { max-width: 760px; margin: 0 auto; }
.carrier-page .page-head h1 { font-size: 22px; }
.big-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0; }
.big-actions .btn { min-height: 50px; }

/* ---------- Звіти ---------- */
.chart-box { position: relative; height: 300px; }
.bar-mini { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; }
.bar-mini i { display: block; height: 100%; background: var(--accent); }

/* ---------- Налаштування ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a { padding: 10px 14px; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); text-decoration: none; }
.tabs a.on { color: var(--ink); border-bottom-color: var(--accent); }
.drop {
  border: 2px dashed var(--line); border-radius: var(--r-md); padding: 26px; text-align: center; color: var(--muted);
  background: var(--surface-2);
}
.drop input { margin-top: 10px; }
.ver-big { font: 700 40px/1 var(--display); }
.notes { margin: 8px 0 0; padding-left: 18px; }
.more-list { display: flex; flex-direction: column; gap: 8px; }
.more-list a { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 14px 16px; color: var(--ink); font-weight: 600; }

/* ---------- Вхід / встановлення ---------- */
.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 14px; background: var(--ink); }
.auth { width: 100%; max-width: 420px; }
.auth.install { max-width: 640px; }
.auth-brand { display: flex; align-items: center; gap: 14px; color: #fff; margin-bottom: 20px; }
.auth-brand .brand-mark { grid-template-columns: repeat(4, 9px); height: 34px; gap: 4px; }
.auth-brand .brand-mark i:nth-child(1) { height: 34px; }
.auth-brand .brand-mark i:nth-child(2) { height: 24px; }
.auth-brand .brand-mark i:nth-child(3) { height: 29px; }
.auth-brand .brand-mark i:nth-child(4) { height: 19px; }
.auth-brand h1 { font-size: 24px; color: #fff; }
.auth-brand p { margin: 4px 0 0; color: #93A2B0; }
.auth .panel { padding: 24px; }
.auth .panel h2 { margin: 6px 0 12px; }
.auth .panel h2:not(:first-child) { margin-top: 22px; }
.auth .btn-lg { width: 100%; margin-top: 18px; }
.checks { list-style: none; margin: 0; padding: 0; }
.checks li { display: flex; gap: 10px; padding: 6px 0; border-bottom: 1px solid var(--line-2); font-size: 14px; }
.checks li > span { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; flex: none; color: #fff; }
.checks .ok > span { background: var(--ok); }
.checks .bad > span { background: var(--err); }
.checks small { display: block; color: var(--err); }

/* ---------- Друк ---------- */
@media print {
  .side, .tabbar, .page-actions, .no-print, .flash, .stop-actions { display: none !important; }
  .main { margin: 0; padding: 0; max-width: none; }
  body { background: #fff; font-size: 12pt; }
  .panel { box-shadow: none; border: 0; padding: 0; }
  .stop { grid-template-columns: 40px 70px 1fr; break-inside: avoid; }
  a { color: #000; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }

/* ---------- Закріплена панель редагування ---------- */
.editbar {
  position: sticky; top: 0; z-index: 25; margin: -28px -32px 16px; padding: 10px 32px 0;
  background: rgba(237, 240, 243, .97); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.editbar-row { display: flex; align-items: center; gap: 8px; min-height: 48px; padding-bottom: 8px; }
.editbar-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.editbar-t b { font-weight: 700; font-size: 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.editbar-t > span { display: flex; align-items: center; gap: 6px; }
.editbar-t .badge { font-size: 11.5px; padding: 1px 7px; }
#save-all[disabled] { opacity: .45; cursor: default; }
#save-all .cnt { background: rgba(255,255,255,.25); border-radius: 999px; padding: 0 7px; font-size: 12px; }
.editbar-nav { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-bottom: 8px; }
.editbar-nav::-webkit-scrollbar { display: none; }
.editbar-nav a { flex: none; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 5px 11px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); }
.editbar-nav a:hover { text-decoration: none; border-color: var(--line); }
.panel.dirty { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.panel[id] { scroll-margin-top: 120px; }
.editbar-mobile { display: none; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: #fff; padding: 11px 18px; border-radius: 999px; font-weight: 600; z-index: 60; box-shadow: 0 8px 24px rgba(22,32,43,.3); }
@media (max-width: 900px) {
  .editbar { margin: -18px -14px 14px; padding: calc(6px + env(safe-area-inset-top)) 10px 0; }
  .editbar-mobile { display: block; }
  .editbar .btn span { display: none; }
  .editbar .btn { padding: 10px 14px; }
  /* На телефоні «Зберегти» — завжди лише дискета (кількість змін — значком) */
  #save-all { width: 46px; height: 46px; padding: 0; justify-content: center; position: relative; flex: none; }
  #save-all span { display: none !important; }
  #save-all[data-n]::after { content: attr(data-n); position: absolute; top: 2px; right: 2px; background: #D64B92; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; min-width: 18px; height: 18px; line-height: 18px; text-align: center; padding: 0 4px; }
  .editbar.is-mfixed { position: fixed; top: 0; left: 0; right: 0; margin: 0; z-index: 35; padding: calc(6px + env(safe-area-inset-top)) 10px 0; box-shadow: 0 2px 10px rgba(22,32,43,.08); }
  /* Нічого не може розперти сторінку вшир (інакше телефон зменшує її, як на комп’ютері) */
  html, body { overflow-x: clip; }
  .main { min-width: 0; max-width: 100vw; }
  .panel, .item-head, .flash, .hint, .timeline div, .row-sub, .meta { overflow-wrap: anywhere; }
  .panel table { overflow-wrap: normal; }
  .panel .btn { max-width: 100%; white-space: normal; text-align: left; }
  .chart-box, canvas { max-width: 100%; }
  .panel > div { min-width: 0; }
  .editbar.is-mfixed { overflow: hidden; }
  .editbar-t > span { overflow: hidden; white-space: nowrap; }
  .editbar .icon-btn { width: 38px; height: 38px; flex: none; }
  .toast { bottom: calc(90px + env(safe-area-inset-bottom)); }
}
.nav-badge { margin-left: auto; font-style: normal; background: #D64B92; color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 1px 7px; min-width: 20px; text-align: center; }
.tabbar a { position: relative; }
.tab-badge { position: absolute; top: 2px; left: 55%; padding: 0 5px; font-size: 10px; min-width: 16px; }
.side-me { color: inherit; display: block; min-width: 0; }
.side-me:hover { text-decoration: none; }
.side-me:hover b { text-decoration: underline; }
.notif-list { list-style: none; margin: 0; padding: 0; }
.notif-list li a { display: grid; gap: 2px; padding: 12px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink); }
.notif-list li a:hover { background: var(--surface-2); text-decoration: none; }
.notif-list li span { color: var(--ink-2); font-size: 14px; }
.notif-list li time { color: var(--muted); font-size: 12.5px; }
.notif-list li.unread a { box-shadow: inset 3px 0 0 #D64B92; }
.notif-list li.unread b::after { content: " •"; color: #D64B92; }
.install-steps { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 12px; }
@media (max-width: 700px) { .install-steps { grid-template-columns: 1fr; } }
.carrier-map { height: 280px; margin-bottom: 4px; }
.carrier-cost { display: flex; gap: 8px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; padding: 10px; background: var(--surface-2); border-radius: var(--r-md); }
.carrier-cost label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); width: 120px; }
.phone-text { font-weight: 600; }
@media (display-mode: standalone) { .main { padding-top: calc(18px + env(safe-area-inset-top)); } }
.flash ~ .editbar { margin-top: 0; }
@media (display-mode: standalone) and (max-width: 900px) { .editbar { margin-top: calc(-18px - env(safe-area-inset-top)); } .flash ~ .editbar { margin-top: 0; } }
.cols > * { min-width: 0; }
.map-small, .map-box, #map { isolation: isolate; z-index: 0; position: relative; }
.photo-up { display: flex; gap: 8px; flex: 1 1 240px; min-width: 0; flex-wrap: wrap; align-items: center; }
.photo-up input[type=file] { flex: 1 1 160px; min-width: 0; max-width: 100%; font-size: 13px; }
.tabbar a { min-width: 0; }

details.orig { margin-top: 12px; }
details.orig summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-2); padding: 4px 0; }
details.orig textarea { margin-top: 6px; background: var(--surface-2); }

/* ---------- Довідка ---------- */
.help { display: grid; grid-template-columns: 220px minmax(0, 760px); gap: 24px; align-items: start; }
.help-toc { position: sticky; top: 16px; display: flex; flex-direction: column; gap: 2px; }
.help-toc a { color: var(--ink-2); padding: 6px 10px; border-radius: var(--r-sm); font-size: 14px; font-weight: 500; }
.help-toc a:hover { background: var(--surface); text-decoration: none; }
.help-sec { scroll-margin-top: 16px; line-height: 1.6; }
.help-sec h2 { font: 700 19px/1.25 var(--display); margin-bottom: 12px; }
.help-sec h3 { margin: 18px 0 6px; }
.help-sec p { margin: 8px 0; max-width: 68ch; }
.help-sec ul, .help-sec ol { padding-left: 22px; margin: 8px 0; }
.help-sec li { margin: 5px 0; }
.help-sec li ul { margin-top: 4px; }
.help-kv { grid-template-columns: 210px minmax(0, 1fr); align-items: center; }
.help-new { border-color: var(--c-sale); }
.help-new ul { padding-left: 20px; margin: 6px 0 0; }
.faq dt { font-weight: 700; margin-top: 14px; }
.faq dd { margin: 4px 0 0; color: var(--ink-2); }
.memo-text, #memo { white-space: pre-wrap; font: 14px/1.6 var(--font); background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-sm); padding: 12px; width: 100%; }
@media (max-width: 900px) {
  .help { grid-template-columns: 1fr; }
  .help-toc { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: none; margin: 0 -14px; padding: 0 14px 4px; }
  .help-toc a { flex: none; background: var(--surface); border: 1px solid var(--line-2); border-radius: 999px; font-size: 13px; }
  .help-kv { grid-template-columns: 1fr; }
}

/* ---------- Пошук і автопідбір ---------- */
.verdict { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 9px; border-radius: 999px; white-space: nowrap; }
.v-good { background: #DDF3E7; color: #0D6B47; }
.v-ok { background: #FFF2CC; color: #6B5100; }
.v-bad { background: #F3E3E8; color: #8E2C55; }
.v-unknown { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line-2); }
.hits { display: flex; flex-direction: column; gap: 8px; }
.hit { display: grid; grid-template-columns: 112px minmax(0, 1fr) auto; gap: 14px; background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 12px; scroll-margin-top: 16px; }
.hit.is-new { border-left: 3px solid var(--c-agreed); }
.hit:target { box-shadow: 0 0 0 3px var(--accent-soft); border-color: var(--accent); }
.hit-img { display: flex; align-items: center; justify-content: center; width: 112px; height: 84px; border-radius: var(--r-sm); background: var(--surface-2); overflow: hidden; color: #A7B3BF; }
.hit-img img { width: 100%; height: 100%; object-fit: cover; }
.hit-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 3px; }
.hit-title { display: block; font-weight: 600; color: var(--ink); }
.hit-price { margin-top: 2px; }
.hit-price b { font: 700 17px var(--display); }
.hit-score { font-size: 13.5px; color: var(--ink-2); margin-top: 4px; }
.hit-more { margin-top: 4px; font-size: 13px; }
.hit-more summary { cursor: pointer; color: var(--muted); }
.hit-more .cost { margin-top: 6px; font-size: 13px; }
.hit-actions { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; }
@media (max-width: 700px) {
  .hit { grid-template-columns: 84px minmax(0, 1fr); gap: 10px; }
  .hit-img { width: 84px; height: 66px; }
  .hit-actions { grid-column: 1 / -1; flex-direction: row; justify-content: flex-end; }
}
.srch { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.srch.off { opacity: .55; }
.srch .row { display: flex; gap: 2px; flex: none; }
.nb-search { background: var(--c-agreed); }
.score-box { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: var(--r-md); padding: 10px 12px; margin-bottom: 14px; font-size: 14px; }
#sec-score .cost td:last-child { white-space: normal; }

/* ---------- Клієнти ---------- */
.bal-due { background: #FFF1D6; color: #7A4B00; }
.due { color: #9A5B00; }
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .kpis-3 { grid-template-columns: 1fr; } }
.tag-res { background: #F1EAFD; border-color: #DCCDF7; color: #4C2E9A; }
.res-box { display: flex; justify-content: space-between; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: #F6F2FE; border: 1px solid #E3D8F8; border-radius: var(--r-md); padding: 12px 14px; }
.res-box > div:first-child { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.res-box b { font-size: 16px; }
.res-sum { text-align: right; }
.res-sum b { font: 700 24px/1.1 var(--display); display: block; }
.res-row { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.res-row:last-of-type { border-bottom: 0; }
.hero-row { display: flex; gap: 32px; flex-wrap: wrap; align-items: flex-end; }
.hero-num { font: 700 20px/1.3 var(--display); margin-top: 8px; }
@media (max-width: 700px) { .res-row { grid-template-columns: 48px minmax(0, 1fr) auto; } .res-row form { grid-column: 3; } }

@media (max-width: 700px) { .hide-m { display: none; } }

/* Плитка «Заброньовано» поруч з конвеєром */
.pipe-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 10px; margin-bottom: 22px; align-items: stretch; }
.pipe-wrap .pipe { margin-bottom: 0; }
.pipe-res {
  display: flex; flex-direction: column; justify-content: flex-end; gap: 2px; padding: 12px 14px;
  background: #F6F2FE; border: 1px solid #E3D8F8; border-top: 4px solid #8B6FD6; border-radius: 0 0 var(--r-md) var(--r-md); color: var(--ink);
}
.pipe-res:hover { text-decoration: none; background: #EFE8FD; }
.pipe-res b { font: 700 28px/1 var(--display); color: #5B3FB8; }
.pipe-res span { font-size: 12.5px; color: var(--ink-2); }
.pipe-res small { font-size: 12px; color: var(--muted); }
.pipe-res-n { font-style: normal; font-size: 11px; font-weight: 600; color: #4C2E9A; background: #F1EAFD; border-radius: 999px; padding: 0 6px; align-self: flex-start; margin-top: 2px; }
@media (max-width: 900px) {
  .pipe-wrap { grid-template-columns: 1fr; }
  .pipe-res { flex-direction: row; align-items: baseline; gap: 10px; border-radius: var(--r-md); border-top-width: 1px; border-left: 4px solid #8B6FD6; }
  .pipe-res b { font-size: 22px; }
}
.pipe-wrap { grid-template-columns: minmax(0, 1fr) 132px; }
.pipe-wrap .pipe-cell { padding-left: 16px; padding-right: 10px; }
.pipe-wrap .pipe li:first-child .pipe-cell { padding-left: 12px; }
.pipe-cell span { hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
@media (max-width: 1280px) and (min-width: 901px) { .pipe-wrap .pipe-cell span { font-size: 11.5px; } .pipe-wrap .pipe-cell b { font-size: 24px; } }
@media (max-width: 900px) { .pipe-wrap { grid-template-columns: 1fr; } }
.pipe-res-n { white-space: nowrap; }

/* ---------- Нагадування з відліком ---------- */
body.nag-on { overflow: hidden; }
.nag {
  position: fixed; inset: 0; z-index: 2147483000; display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(22, 32, 43, .78); backdrop-filter: blur(8px) grayscale(.4); -webkit-backdrop-filter: blur(8px) grayscale(.4);
  transition: opacity .5s ease;
}
.nag.nag-done { opacity: 0; }
.nag-card {
  width: 100%; max-width: 520px; max-height: calc(100vh - 40px); overflow: auto; text-align: center;
  background: var(--surface); border-radius: 18px; padding: 30px 28px 26px; box-shadow: 0 24px 60px rgba(0, 0, 0, .35);
  border-top: 6px solid #D64B92;
}
.nag-card h2 { font: 700 22px/1.25 var(--display); margin-bottom: 12px; }
.nag-text { font-size: 16px; line-height: 1.6; color: var(--ink-2); text-align: left; background: var(--surface-2); border-radius: var(--r-md); padding: 14px 16px; white-space: normal; overflow-wrap: anywhere; }
.nag-timer { position: relative; width: 150px; height: 150px; margin: 22px auto 10px; }
.nag-timer svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.nag-timer circle { fill: none; stroke-width: 9; }
.nag-track { stroke: var(--line-2); }
.nag-arc { stroke: #D64B92; stroke-linecap: round; transition: stroke-dashoffset 1s linear; }
.nag-timer b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font: 700 30px/1 var(--display); font-feature-settings: "tnum" 1; }
.nag-hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.nag-next { font-size: 14px; font-weight: 600; color: #8E2C55; margin: 10px 0 0; }
.nag-preview { background: #FFF6DB; color: #6B5100; border-radius: var(--r-sm); padding: 8px 10px; font-size: 13px; margin: -8px 0 14px; }
@media (prefers-reduced-motion: reduce) { .nag-arc { transition: none; } }

.nag-item { border: 1px solid var(--line-2); border-radius: var(--r-md); margin-top: 10px; }
.nag-item.off { opacity: .6; }
.nag-item > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; align-items: center; padding: 12px 14px; }
.nag-item > summary::-webkit-details-marker { display: none; }
.nag-item[open] > summary { border-bottom: 1px solid var(--line-2); }
.nag-sum { text-align: right; flex: none; }
.nag-sum b { display: block; font-family: var(--display); }
.nag-sum small { color: var(--muted); font-size: 12px; }
.nag-body { padding: 12px 14px 14px; }
.nag-msg { background: var(--surface-2); border-radius: var(--r-sm); padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; }
.sched { display: flex; gap: 6px; flex-wrap: wrap; }
.sched span { display: flex; flex-direction: column; background: #FBEAF2; color: #8E2C55; border-radius: var(--r-sm); padding: 5px 9px; font-weight: 700; font-size: 13px; }
.sched small { font-weight: 500; font-size: 11px; color: #A35A7A; }

/* ---------- Вибір моделі ---------- */
.f-label { font-size: 13px; font-weight: 600; color: var(--ink-2); margin-bottom: 5px; display: flex; gap: 8px; align-items: baseline; }
.mpick { position: relative; }
.mpick-cur { display: flex; justify-content: space-between; align-items: center; gap: 10px; background: var(--accent-soft); border: 1px solid #BFE0EE; border-radius: var(--r-sm); padding: 9px 12px; }
.mpick-cur b { display: block; font-size: 15px; }
.mpick-cur small { color: var(--ink-2); font-size: 12.5px; }
.mpick-find .search { position: relative; }
.mpick-find .search input { padding-left: 38px; }
.mpick-find .search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.mpick-list { list-style: none; margin: 4px 0 0; padding: 4px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); max-height: 300px; overflow: auto; box-shadow: 0 8px 24px rgba(22, 32, 43, .12); position: absolute; left: 0; right: 0; z-index: 30; }
.mpick-list li { padding: 8px 10px; border-radius: 6px; cursor: pointer; display: flex; flex-direction: column; }
.mpick-list li small { color: var(--muted); font-size: 12px; }
.mpick-list li.on, .mpick-list li:hover { background: var(--accent-soft); }
.mpick-sugg { display: block; width: 100%; text-align: left; margin-top: 6px; border: 1px dashed var(--accent); background: #F3FAFD; color: var(--ink); border-radius: var(--r-sm); padding: 8px 10px; font: 13.5px var(--font); cursor: pointer; }
.linkish { background: none; border: 0; padding: 6px 0 0; color: var(--accent-2); font: 600 13px var(--font); cursor: pointer; }
.linkish:hover { text-decoration: underline; }
.input-btn { position: relative; display: block; }
.input-btn input { padding-right: 44px; }
.input-btn .icon-btn { position: absolute; right: 3px; top: 50%; transform: translateY(-50%); color: var(--accent-2); }
.ad-title { font-style: italic; }

/* ---------- Модальні вікна ---------- */
.kmodal { position: fixed; inset: 0; z-index: 2000; background: rgba(22, 32, 43, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.kmodal-card { background: var(--surface); border-radius: 16px; padding: 22px; width: 100%; max-width: 460px; max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 24px 60px rgba(0, 0, 0, .3); }
.kmodal-card h2 { margin-bottom: 12px; }
.kconfirm p { font-size: 17px; font-weight: 600; margin: 4px 0 14px; line-height: 1.4; }
.kconfirm textarea { margin-bottom: 14px; }
.kconfirm-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kscan-view { position: relative; background: #000; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4 / 3; }
.kscan-view video { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Запасний режим закріпленої панелі */
.editbar.is-fixed { position: fixed; top: 0; left: var(--side); right: 0; margin: 0; padding-left: 32px; padding-right: 32px; z-index: 35; }
@media (max-width: 900px) { .editbar.is-fixed { left: 0; padding: calc(6px + env(safe-area-inset-top)) 10px 0; } }
.cost2 th { font-size: 12px; color: var(--muted); font-weight: 600; text-align: right; padding: 0 0 4px; }
.cost2 td:nth-child(2) { text-align: right; white-space: nowrap; font-weight: 700; }
.cost2 td:nth-child(3) { text-align: right; white-space: nowrap; color: var(--muted); font-weight: 500; font-size: 13px; padding-left: 12px; }
.cost2 tr.total td:nth-child(2) { font: 700 18px var(--display); }
.cost2 tr.total td:nth-child(3) { font-family: var(--font); font-size: 13px; }
.cost2 tr.profit td:nth-child(2) { font-family: var(--display); }
.item-row .money small.kg { color: var(--ink-2); font-weight: 500; }
@media (max-width: 900px) { .item-row .money small { display: inline; margin-left: 6px; } }

/* ---------- Сторінка водія ---------- */
.carrier-cost { display: block; margin-top: 10px; padding: 10px; background: var(--surface-2); border-radius: var(--r-md); }
.cc-row { display: flex; gap: 8px; align-items: flex-end; }
.cc-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--ink-2); flex: 1 1 0; min-width: 0; width: auto; }
.cc-row label.grow { flex: 2 1 0; }
.cc-row input { min-width: 0; }
.cc-save { flex: none; width: 44px; height: 40px; padding: 0; }
.cc-extra { margin-top: 8px; }
.cc-extra summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--accent-2); }
.cc-extra .cc-row { margin-top: 6px; }
.btn-done { background: var(--ok); border-color: var(--ok); color: #fff; }
.btn-done:hover { background: #17724B; border-color: #17724B; color: #fff; }
.drop-btn { color: var(--muted); font-weight: 500; font-size: 12.5px; min-height: 28px; padding: 4px 8px; }
.drop-btn:hover { color: var(--err); background: #FDF0EF; }
.stop-more { text-align: right; }
.stop-more summary { cursor: pointer; font-size: 12.5px; color: var(--accent-2); font-weight: 600; list-style: none; padding: 4px 0; }
.stop-more summary::-webkit-details-marker { display: none; }
.stop-more summary::before { content: "▸ "; }
.stop-more[open] summary::before { content: "▾ "; }
.stop-more-body { display: flex; flex-direction: column; gap: 6px; align-items: flex-end; margin-top: 4px; }
.cnote { display: flex; gap: 6px; align-items: flex-start; background: #FFF6DB; border: 1px solid #F1DE9E; color: #5C4600; border-radius: var(--r-sm); padding: 7px 10px; font-size: 14px; margin-top: 6px; }
.cnote .ic { margin-top: 2px; flex: none; }
@media (max-width: 700px) { .stop-more { text-align: left; } .stop-more-body { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }
.note-edit { margin-top: 8px; }
.note-edit summary { cursor: pointer; font-size: 13px; color: var(--accent-2); font-weight: 600; display: inline-flex; gap: 5px; align-items: center; list-style: none; }
.note-edit summary::-webkit-details-marker { display: none; }
.note-prev { color: #5C4600; background: #FFF6DB; border: 1px solid #F1DE9E; border-radius: var(--r-sm); padding: 2px 8px; font-weight: 500; }
.note-form { display: flex; gap: 8px; align-items: flex-end; margin-top: 6px; }
.note-form textarea { min-height: 52px; }
.print-only { display: none; }
@media print { .print-only { display: flex; } }
@media (max-width: 700px) { .note-form { flex-direction: column; align-items: stretch; } }
.thumb-wrap { position: relative; }
.thumb-trash { position: absolute; top: -6px; right: -6px; width: 26px; height: 26px; border-radius: 50%; border: 2px solid #fff; background: var(--err); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; box-shadow: 0 2px 6px rgba(0,0,0,.25); }
.item-row.ad-gone .title { color: var(--muted); text-decoration: line-through; text-decoration-color: rgba(102,115,127,.5); }
.item-row.ad-gone .thumb { filter: grayscale(1); opacity: .45; }
.item-row.ad-gone .money b { color: var(--muted); }
.tag-gone { background: #F3E3E8; border-color: #E8C9D4; color: #8E2C55; }
.tag-reserv { background: #FFF2CC; border-color: #F1DE9E; color: #6B5100; }
.tag-mkt { font-weight: 700; letter-spacing: .01em; }
.tag-olx { background: #E2F4F3; border-color: #B9E3E0; color: #00494F; }
.tag-allegro, .tag-alok { background: #FFEDE3; border-color: #FFD2BA; color: #9A3A00; }
.tag-ka { background: #EEF6E3; border-color: #D3E8B9; color: #3D5E14; }
.vendor-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.vendor-chips .chip { cursor: default; }
.vendor-chips .chip a { color: inherit; }
.vendor-chips .linkish { margin-left: 2px; font-size: 15px; line-height: 1; }
.serial-check { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.cron-box { background: var(--surface-2); border-radius: var(--r-md); padding: 12px; }
.cron-fields { width: 100%; border-collapse: collapse; margin: 4px 0 8px; font-size: 14px; }
.cron-fields td { padding: 6px 4px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.cron-fields td:first-child { color: var(--ink-2); width: 110px; white-space: nowrap; }
.cron-fields code { font-size: 13.5px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; word-break: break-all; }
.cron-cmd { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.err-table td { vertical-align: top; }
.err-table tr.err-old { opacity: .5; }
/* Телефон: шрифт полів 16px — інакше iPhone збільшує сторінку при введенні й «зриває» закріплену панель */
@media (max-width: 900px) {
  input[type=text], input[type=search], input[type=password], input[type=number], input[type=date], input[type=url], input[type=tel], input[type=email], input:not([type]), select, textarea { font-size: 16px; }
}
/* Фото для клієнта */
.client-photos { margin-top: 12px; }
.cp-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin: 10px 0; }
.cp-tile { position: relative; display: block; border-radius: 10px; overflow: hidden; border: 2px solid var(--line); cursor: pointer; aspect-ratio: 1; background: var(--surface-2); }
.cp-tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-tile input { position: absolute; top: 6px; left: 6px; width: 20px; height: 20px; accent-color: var(--accent); }
.cp-tile:has(input:checked) { border-color: var(--accent); }
.cp-tile.is-ad img { filter: grayscale(1); opacity: .5; }
.cp-tile.is-ad:has(input:checked) { border-color: #E0A800; }
.cp-tile.is-ad:has(input:checked) img { filter: none; opacity: 1; }
.cp-tile.is-ad:has(input:checked) .cp-badge { background: #B07800; }
.cp-badge { position: absolute; left: 4px; right: 4px; bottom: 4px; font-size: 11px; font-weight: 600; background: rgba(22,32,43,.72); color: #fff; border-radius: 6px; padding: 2px 5px; display: flex; align-items: center; gap: 3px; justify-content: center; }
.photo-up select { width: auto; padding: 6px 8px; font-size: 13px; }
/* Підбірки */
.offer-link .share-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.oi-list { display: flex; flex-direction: column; gap: 8px; }
.oi-row { display: flex; gap: 12px; align-items: center; padding: 8px; border: 1px solid var(--line-2); border-radius: var(--r-md); background: var(--surface); }
.oi-cand { cursor: pointer; }
.oi-cand:has(input:checked) { border-color: var(--accent); background: #EEF7FB; }
.oi-cand > input { width: 20px; height: 20px; flex: none; accent-color: var(--accent); }
.oi-thumb { position: relative; width: 64px; height: 64px; flex: none; border-radius: 10px; overflow: hidden; background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--muted); }
.oi-thumb img { width: 100%; height: 100%; object-fit: cover; }
.oi-thumb i { position: absolute; right: 3px; bottom: 3px; font-style: normal; font-size: 11px; font-weight: 700; background: rgba(22,32,43,.72); color: #fff; border-radius: 5px; padding: 0 4px; }
.oi-main { flex: 1; min-width: 0; }
.oi-main b { display: block; overflow: hidden; text-overflow: ellipsis; }
.oi-price { display: flex; align-items: center; gap: 4px; flex: none; }
.oi-price .input-suffix { width: 130px; }
.av { font-weight: 600; }
.av-stock { color: #0D6B47; } .av-way { color: #0A7AA6; } .av-order { color: #8A5A00; } .av-sold { color: #B3261E; }
.resp-list { display: flex; flex-direction: column; gap: 10px; }
.resp { padding: 10px 12px; border-radius: var(--r-md); background: var(--surface-2); }
.resp.is-new { background: #FFF6DB; box-shadow: inset 3px 0 0 #E0A800; }
.resp-head { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.resp-head .muted { margin-left: auto; }
.resp-comment { margin-top: 4px; white-space: pre-wrap; }
@media (max-width: 600px) { .oi-row { flex-wrap: wrap; } .oi-price { width: 100%; justify-content: flex-end; } }
/* Рядок кнопок/полів (у формах, де клас row використано без своїх стилів) */
.panel > form.row, .panel-head .row, details .row, .offer-link .row, form.row { display: flex; align-items: center; }
.rec-price { background: var(--surface-2); border-radius: var(--r-md); padding: 10px 12px; margin: 10px 0; display: flex; flex-direction: column; gap: 4px; }
.rec-price b { font-size: 16px; }
.rec-price .btn { margin-left: 6px; padding: 4px 10px; }
.oi-pcol { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.oi-pcol small { font-size: 11.5px; white-space: nowrap; }
label small.muted { display: block; font-weight: 400; margin-top: 3px; }

/* Довгі слова й посилання (адреса оголошення, історія змін) переносяться, а не розпирають сторінку */
.timeline div, .item-head .meta, .hint, .flash { overflow-wrap: anywhere; }
.panel input, .panel select, .panel textarea { min-width: 0; max-width: 100%; }

/* Самоперевірка безпеки */
.sec-list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.sec-list li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: var(--r-sm); background: var(--surface-2); }
.sec-list li > b { flex: none; width: 24px; height: 24px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 13px; }
.sec-list li > div { display: grid; gap: 2px; min-width: 0; }
.sec-list li span { color: var(--muted); font-size: 14px; overflow-wrap: anywhere; }
.sec-ok > b { background: var(--ok, #1F8A5B); }
.sec-warn > b { background: #C98A00; }
.sec-bad > b { background: var(--err); }
.sec-bad { box-shadow: inset 3px 0 0 var(--err); }
.sec-skip > b { background: #8A96A3; }

/* Галерея: збільшення і порядок фото */
.gallery-main img[data-zoom] { cursor: zoom-in; }
.gallery-zoom { position: absolute; left: 10px; bottom: 10px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: rgba(15, 23, 32, .55); color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; }
.gallery-strip > button { position: relative; touch-action: pan-x; }
.gallery-strip > button.is-drag { opacity: .4; }
.gallery-strip > button:first-child::after { content: 'обкладинка'; position: absolute; left: 2px; right: 2px; bottom: 2px; font-size: 10px; line-height: 14px; text-align: center; color: #fff; background: rgba(15, 23, 32, .6); border-radius: 0 0 3px 3px; }
.gs-move { display: none; position: absolute; inset: 0; justify-content: space-between; align-items: center; }
.gs-move i { font-style: normal; width: 26px; height: 100%; display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; color: #fff; background: rgba(15, 23, 32, .55); }
.gallery.is-sorting .gs-move { display: flex; }
.gallery.is-sorting .gallery-strip > button:first-child .gs-move i:first-child,
.gallery.is-sorting .gallery-strip > button:last-child .gs-move i:last-child { visibility: hidden; }
.gallery.is-sorting .gallery-strip img { width: 92px; height: 70px; }
.gallery.is-sorting [data-sort-toggle] { background: var(--accent); color: #fff; border-color: var(--accent); }
.gallery-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.gallery-tools .hint { flex: 1 1 220px; margin: 0; font-size: 13px; }
.gallery-saved { color: var(--ok, #1F8A5B); font-size: 13px; font-weight: 600; }
@media (hover: none) { .gallery-tools .hint { display: none; } }

.lbox { position: fixed; inset: 0; z-index: 2000; background: rgba(8, 12, 18, .97); display: flex; touch-action: none; user-select: none; }
.lbox-stage { flex: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.lbox-stage img { max-width: 100%; max-height: 100%; object-fit: contain; transform-origin: center; will-change: transform; cursor: zoom-in; }
.lbox.is-zoom .lbox-stage img { cursor: grab; }
.lbox button { position: absolute; border: 0; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lbox button:hover { background: rgba(255, 255, 255, .24); }
.lbox-x { top: max(12px, env(safe-area-inset-top)); right: 12px; width: 44px; height: 44px; border-radius: 50%; font-size: 30px; line-height: 1; }
.lbox-prev, .lbox-next { top: 50%; transform: translateY(-50%); width: 48px; height: 64px; border-radius: 10px; font-size: 38px; }
.lbox-prev { left: 10px; } .lbox-next { right: 10px; }
.lbox-n { position: absolute; left: 0; right: 0; bottom: max(14px, env(safe-area-inset-bottom)); text-align: center; color: #fff; font-size: 14px; opacity: .8; pointer-events: none; }
html.lbox-open, html.lbox-open body { overflow: hidden; }
@media (max-width: 700px) { .lbox .lbox-prev, .lbox .lbox-next { display: none; } }

/* Габарити */
.dims-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto; gap: 8px; align-items: end; }
.dims-row label { margin: 0; }
.dims-row > .btn { align-self: end; height: 42px; }
@media (max-width: 560px) { .dims-row { grid-template-columns: repeat(3, minmax(0, 1fr)); } .dims-row > .btn { grid-column: 1 / -1; } }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Нова Пошта */
.np-pick { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px 12px; }
@media (max-width: 700px) { .np-pick { grid-template-columns: 1fr; } }
.np-pick label { margin: 0; }
.np-ac { position: relative; display: block; }
.np-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); max-height: 280px; overflow-y: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-sm); box-shadow: 0 8px 24px rgba(15, 23, 32, .14); }
.np-list[hidden] { display: none; }
.np-list button { display: block; width: 100%; text-align: left; padding: 9px 12px; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 400; color: var(--ink); border-bottom: 1px solid var(--line-2); }
.np-list button:hover { background: var(--surface-2); }
.np-list b { font-weight: 600; }
.np-list small { display: block; color: var(--muted); font-size: 12px; }
.np-bad { color: var(--err) !important; }
.np-dims { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; align-items: end; }
.np-dims label { margin: 0; }
@media (max-width: 480px) { .np-dims { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.np-calc { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 12px; }
.np-out { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.np-cost { font-size: 22px; }
.np-h3 { font-size: 16px; margin: 20px 0 10px; padding-top: 14px; border-top: 1px solid var(--line-2); }
.ttn-box { display: grid; gap: 12px; }
.ttn-box > div:first-child { display: grid; gap: 3px; }
.ttn-num { font-size: 24px; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.ttn-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.ttn-actions form { margin: 0; }
.plain-list { margin: 0; padding-left: 18px; display: grid; gap: 8px; }

/* Товари на телефоні: кожен параметр з нового рядка */
@media (max-width: 700px) {
  .item-row .meta { flex-direction: column; align-items: flex-start; gap: 3px; }
  .item-row .meta > * { max-width: 100%; }
}

/* Згортання розділів */
.fold-head { cursor: pointer; user-select: none; }
.panel > h2.fold-head { display: flex; align-items: center; justify-content: space-between; }
.panel.is-foldable { position: relative; }
.panel.is-foldable > .fold-head { padding-right: 38px; }
.fold-btn { position: absolute; top: 16px; right: 12px; width: 32px; height: 32px; border: 0; border-radius: 50%; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: transform .18s, background .15s; }
.fold-btn:hover { background: var(--surface-2); color: var(--ink); }
.panel.is-folded .fold-btn { transform: rotate(-90deg); }
.panel.is-folded > :not(.fold-head) { display: none !important; }
.panel.is-folded { padding-bottom: 14px; }
.panel.is-folded > .fold-head { margin-bottom: 0; }
.panel.is-folded > .fold-head h2, .panel.is-folded > h2.fold-head { color: var(--muted); }

/* Перемикач «Лише заброньовані» */
.res-toggle { margin: -4px 0 14px; }
.switch { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 500; font-size: 15px; }
.switch > span { width: 40px; height: 24px; border-radius: 12px; background: var(--line); position: relative; flex: none; transition: background .15s; }
.switch > span::after { content: ''; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch.on > span { background: var(--accent); }
.switch.on > span::after { transform: translateX(16px); }
.switch i { font-style: normal; color: var(--muted); font-size: 13px; }

/* Масове бронювання / продаж */
.deal-form { max-width: 820px; }
.deal-t .deal-price { width: 120px; text-align: right; }
.deal-t td { vertical-align: middle; }
.cell-item { display: flex; gap: 10px; align-items: center; }

/* ТТН: штрихкод, ручне введення, тип отримувача */
.ttn-barcode { margin: 6px 0 4px; background: #fff; border-radius: 6px; padding: 8px 6px; max-width: 420px; }
.ttn-barcode svg { display: block; width: 100%; height: 72px; }
.ttn-manual { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.ttn-manual summary { cursor: pointer; color: var(--accent); font-weight: 500; font-size: 14px; }
.ttn-manual form { margin-top: 12px; }
.np-rtype { margin: 0 0 12px; }
.np-org[hidden] { display: none; }
