/* Серія 4: підменю, чорний список, користувачі, AI-помічник, задачі, аналітика */
:root {
  --black-row: #f6c4c4;
  --black-row-hover: #f1b5b5;
  --black-line: #d93a3a;
  --tgl-off: #c9ced6;
}
:root[data-theme="dark"] {
  --black-row: #57292c;
  --black-row-hover: #64302f;
  --black-line: #e05555;
  --tgl-off: #4a505a;
}

/* ---------- Підменю збоку від лівого меню ---------- */
.menu-item.has-sub::after {
  content: ""; position: absolute; right: 14px; top: 50%; width: 6px; height: 6px; margin-top: -3px;
  border-top: 1.6px solid currentColor; border-right: 1.6px solid currentColor; transform: rotate(45deg); opacity: .55;
}
.app.collapsed .menu-item.has-sub::after { right: 6px; }
.menu-fly {
  position: fixed; z-index: 60; min-width: 220px; padding: 6px; border-radius: 8px;
  background: var(--side-bg); color: var(--side-text); border: 1px solid var(--side-sep); box-shadow: 0 8px 24px rgba(0,0,0,.3);
}
.menu-fly::before { content: ""; position: absolute; left: -8px; top: 0; bottom: 0; width: 8px; } /* «місток», щоб курсор не губив меню */
.fly-title { font-size: 12px; color: var(--side-muted); text-transform: uppercase; letter-spacing: .3px; padding: 6px 10px 4px; }
.fly-item { display: block; width: 100%; text-align: left; border: 0; background: none; color: var(--side-text); padding: 9px 10px; border-radius: 5px; font-size: 14px; }
.fly-item:hover, .fly-item:focus-visible { background: var(--side-hover); outline: none; }
.fly-item.on { background: var(--side-active); color: var(--side-text); font-weight: 500; box-shadow: inset 3px 0 0 var(--accent); }

/* ---------- Чорний список ---------- */
.orders tbody tr.black td, .dt tbody tr.black td { background: var(--black-row); }
.orders tbody tr.black:hover td, .dt tbody tr.black:hover td { background: var(--black-row-hover); }
.orders tbody tr.black td.col-check, .dt tbody tr.black td:first-child { box-shadow: inset 4px 0 0 var(--black-line); }
.cs-mini {
  display: inline-block; background: var(--black-line); color: #fff; font-size: 10px; font-weight: 700; line-height: 1;
  padding: 3px 4px; border-radius: 3px; vertical-align: 1px; letter-spacing: .3px;
}
.cs-tag { background: var(--black-line); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 8px; border-radius: 4px; }
.cs-box {
  width: 40px; height: 40px; flex: none; border-radius: 6px; border: 2px solid var(--border); background: var(--surface);
  color: var(--faint); font-weight: 700; font-size: 14px; letter-spacing: .5px;
}
.cs-box:hover { border-color: var(--black-line); color: var(--black-line); }
.cs-box.on { background: var(--black-line); border-color: var(--black-line); color: #fff; }
.cs-note textarea { border-color: var(--danger-line); }
.seg button.seg-black.on { background: var(--black-line); }

/* ---------- Користувачі ---------- */
.us-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.us-head .sec-h { margin: 0; }
.us-head .spacer { flex: 1; }
.us-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.us-card { border: 1px solid var(--line); border-radius: 10px; padding: 16px; background: var(--surface); box-shadow: 0 1px 3px var(--shadow); }
.us-card.off { opacity: .7; }
.us-top { display: flex; gap: 12px; align-items: flex-start; position: relative; margin-bottom: 12px; }
.us-ava {
  width: 64px; height: 64px; border-radius: 50%; flex: none; background: var(--accent-soft); color: var(--accent);
  display: grid; place-items: center; font-size: 22px; font-weight: 600; position: relative;
}
.us-ava i { position: absolute; right: 2px; bottom: 2px; width: 13px; height: 13px; border-radius: 50%; background: var(--faint); border: 2px solid var(--surface); }
.us-ava i.on { background: var(--green); }
.us-name { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; padding-top: 6px; }
.us-name b { font-size: 16px; font-weight: 600; }
.role-b { display: inline-block; color: #fff; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .3px; padding: 3px 7px; border-radius: 4px; }
.us-menu {
  position: absolute; right: 0; top: 36px; z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  box-shadow: 0 6px 18px var(--shadow); display: flex; flex-direction: column; min-width: 160px; padding: 4px;
}
.us-menu button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 4px; color: var(--text); }
.us-menu button:hover { background: var(--hover); }
.us-menu button.danger { color: var(--danger); }
.us-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 12px; margin: 0; font-size: 14px; }
.us-dl dt { color: var(--muted); }
.us-dl dd { margin: 0; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.us-st { display: inline-block; font-size: 12px; padding: 2px 8px; border-radius: 4px; color: #fff; }
.us-st.ok { background: #27b39b; }
.us-st.no { background: #e0a43a; }
.us-st.off { background: #e05555; }
.rl-list { display: flex; flex-direction: column; gap: 8px; }
.rl-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.rl-row .spacer { flex: 1; }

.role-modal { width: min(680px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.role-body { padding: 16px 22px; overflow-y: auto; flex: 1; }
.role-row { display: grid; grid-template-columns: 140px 1fr; align-items: center; gap: 12px; margin-bottom: 14px; color: var(--muted); font-size: 14px; }
.role-row .req { color: var(--danger); }
.role-colors { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rc { width: 26px; height: 26px; border-radius: 6px; border: 2px solid transparent; }
.rc.on { border-color: var(--text); box-shadow: 0 0 0 2px var(--surface) inset; }
.role-sep { display: flex; align-items: center; gap: 10px; font-weight: 600; margin: 18px 0 8px; }
.role-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-sec { border-bottom: 1px solid var(--line); padding: 10px 0; }
.role-sec-h { display: flex; align-items: center; margin-bottom: 6px; }
.role-sec-h .spacer { flex: 1; }
.role-p { padding: 5px 0; }
.role-p.dis { color: var(--faint); cursor: default; }
.lv-wrap { position: relative; }
.lv-btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; padding: 5px 10px; border-radius: 5px; border: 1px solid var(--accent); color: var(--accent); background: var(--accent-soft); }
.lv-btn svg { width: 15px; height: 15px; }
.lv-btn.none { border-color: var(--border); color: var(--muted); background: var(--panel); }
.lv-pop { position: absolute; right: 0; top: calc(100% + 4px); z-index: 5; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px var(--shadow); display: flex; flex-direction: column; min-width: 220px; padding: 4px; }
.lv-pop button { border: 0; background: none; text-align: left; padding: 8px 10px; border-radius: 4px; color: var(--text); }
.lv-pop button:hover { background: var(--hover); }
.lv-pop button.on { color: var(--accent); font-weight: 500; }

/* ---------- AI-помічник (картки з перемикачем) ---------- */
.ai-intro { display: flex; gap: 14px; align-items: flex-start; border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; background: var(--soft-panel); }
.ai-intro .sub { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ai-mic { width: 44px; height: 44px; border-radius: 10px; background: linear-gradient(135deg, #7c4dff, #2f7fe0); color: #fff; display: grid; place-items: center; flex: none; }
.ai-mic svg { width: 24px; height: 24px; }
.ai-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.ai-card { border: 1px solid var(--line); border-radius: 8px; padding: 16px; background: var(--surface); display: flex; flex-direction: column; gap: 10px; box-shadow: 0 1px 3px var(--shadow); }
.ai-card.locked { opacity: .65; }
.ai-h { display: flex; align-items: center; gap: 12px; }
.ai-h b { flex: 1; font-size: 15px; font-weight: 600; }
.ai-ic { width: 30px; height: 30px; border-radius: 6px; color: #fff; display: grid; place-items: center; flex: none; }
.ai-ic svg { width: 18px; height: 18px; }
.ai-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }
.ai-price { font-size: 13px; font-weight: 500; }
.ai-card .btn { align-self: flex-start; }
.ai-ex { margin: 0 0 12px; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; }
.tgl { width: 46px; height: 24px; border-radius: 12px; border: 0; background: var(--tgl-off); position: relative; flex: none; padding: 0; transition: background .15s; }
.tgl i { position: absolute; left: 2px; top: 2px; width: 20px; height: 20px; border-radius: 50%; background: #fff; display: grid; place-items: center; transition: left .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.tgl.on { background: var(--accent); }
.tgl.on i { left: 24px; color: var(--accent); }
.tgl i svg { width: 13px; height: 13px; stroke-width: 3; }
.tgl:disabled { cursor: not-allowed; }
.tgl:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- Задачі ---------- */
.tk-page { display: flex; flex-direction: column; gap: 0; }
.tk-tabs { display: flex; gap: 24px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.tk-tabs button { border: 0; background: none; padding: 10px 0; color: var(--muted); font-size: 15px; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tk-tabs button span { font-size: 12px; background: var(--chip); border-radius: 10px; padding: 1px 7px; margin-left: 4px; color: var(--muted); }
.tk-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); }
.tk-tabs button.warn span { background: var(--danger-soft); color: var(--danger); }
.tk-list { display: flex; flex-direction: column; gap: 8px; }
.tk-empty { padding: 40px; text-align: center; color: var(--muted); }
.tk-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); cursor: pointer; box-shadow: 0 1px 2px var(--shadow); }
.tk-item:hover { border-color: var(--accent); }
.tk-item:focus-visible { outline: 2px solid var(--focus); }
.tk-item.done .tk-title { color: var(--muted); text-decoration: line-through; }
.tk-circle { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--border); background: var(--surface); flex: none; display: grid; place-items: center; padding: 0; margin-top: 1px; color: #fff; }
.tk-circle svg { width: 13px; height: 13px; stroke-width: 3; }
.tk-item.od .tk-circle { border-color: var(--danger); }
.tk-item.done .tk-circle, .tk-circle.on { background: var(--green); border-color: var(--green); }
.tk-circle:hover { border-color: var(--green); }
.tk-circle.sm { width: 18px; height: 18px; }
.tk-main { flex: 1; min-width: 0; }
.tk-title { font-weight: 600; font-size: 15px; display: flex; align-items: center; gap: 8px; }
.tk-desc { color: var(--muted); font-size: 13px; margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-meta { display: flex; align-items: center; gap: 16px; margin-top: 10px; font-size: 13px; flex-wrap: wrap; }
.tk-meta .spacer { flex: 1; }
.tk-ty svg { width: 18px; height: 18px; display: block; }
.tk-due { display: inline-flex; align-items: center; gap: 6px; }
.tk-due i { color: #e6b800; display: inline-flex; }
.tk-due.od { color: var(--danger); }
.tk-due.od i { color: var(--danger); }
.tk-due i svg { width: 15px; height: 15px; }
.tk-prog, .tk-sm { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); }
.tk-prog svg, .tk-sm svg { width: 16px; height: 16px; }
.bar { display: inline-block; width: 90px; height: 6px; border-radius: 3px; background: #cfe9d4; overflow: hidden; vertical-align: middle; }
.bar i { display: block; height: 100%; background: var(--green); border-radius: 3px; }
.tk-ord { display: inline-flex; align-items: center; gap: 4px; border: 0; background: var(--accent-soft); color: var(--accent); border-radius: 4px; padding: 2px 8px; font-size: 13px; }
.tk-ord svg { width: 14px; height: 14px; }
.tk-who { font-size: 12px; background: var(--chip); color: var(--text); border-radius: 10px; padding: 2px 8px; }
.prio { font-size: 11px; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: var(--chip); color: var(--muted); }
.prio.high { background: var(--danger-soft); color: var(--danger); }

.tk-panel {
  width: min(1040px, 100%); height: min(760px, calc(100vh - 32px)); background: var(--surface); border-radius: 12px; overflow: hidden;
  display: grid; grid-template-columns: minmax(0, 1fr) 320px; box-shadow: 0 16px 48px rgba(0,0,0,.25);
}
.tk-left { display: flex; flex-direction: column; min-height: 0; background: var(--soft-panel); }
.tk-head { display: flex; align-items: center; gap: 12px; padding: 16px 18px 6px; }
.tk-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--dot); flex: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.tk-dot.od { background: var(--danger); box-shadow: 0 0 0 3px var(--danger-soft); }
.tk-dot.done { background: var(--green); box-shadow: 0 0 0 3px var(--grp); }
.tk-title-in { flex: 1; min-width: 0; font-size: 20px; font-weight: 600; border: 1px solid transparent; background: none; color: var(--text); padding: 4px 6px; border-radius: 4px; }
.tk-title-in:hover { border-color: var(--line); }
.tk-title-in:focus { outline: 2px solid var(--focus); background: var(--surface); }
.tk-sub-head { display: flex; align-items: center; gap: 10px; padding: 0 18px 10px 44px; font-size: 13px; }
.tk-sub-head .spacer { flex: 1; }
.tk-scroll { flex: 1; overflow-y: auto; padding: 0 18px 12px; }
.tk-box { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 16px; margin-bottom: 12px; }
.tk-fields { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.tk-fields > span { color: var(--muted); font-size: 14px; }
.tk-fields .inp { height: 34px; }
.tk-fields textarea.inp { height: auto; resize: vertical; }
.tk-fields .inp.od { color: var(--danger); border-color: var(--danger-line); }
.prio-sel.high { color: var(--danger); }
.tk-val { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.tk-file { display: inline-flex; align-items: center; gap: 6px; background: var(--panel); border-radius: 4px; padding: 2px 4px 2px 8px; }
.tk-file svg { width: 15px; height: 15px; }
.tk-file .icon-btn { width: 24px; height: 24px; }
.tk-file .icon-btn svg { width: 14px; height: 14px; }
.tk-sec-h { display: flex; align-items: center; gap: 10px; margin: 6px 0 8px; font-size: 14px; }
.tk-sec-h svg { width: 18px; height: 18px; }
.tk-sec-h .bar { width: 130px; }
.tk-ck, .tk-st { display: flex; align-items: center; gap: 10px; padding: 5px 0; border-bottom: 1px solid var(--line); }
.tk-ck .check { flex: 1; }
.tk-ck .icon-btn, .tk-st .icon-btn { width: 26px; height: 26px; opacity: .5; }
.tk-ck:hover .icon-btn, .tk-st:hover .icon-btn { opacity: 1; }
.tk-st .spacer { flex: 1; }
.tk-st .muted { font-size: 12px; }
.strike { text-decoration: line-through; }
.tk-add { display: flex; gap: 8px; align-items: center; padding-top: 8px; }
.tk-add .inp { flex: 1; height: 32px; min-width: 0; }
.tk-add select.inp { flex: none; width: 130px; }
.tk-foot { display: flex; gap: 10px; padding: 12px 18px; border-top: 1px solid var(--line); background: var(--surface); }
.tk-foot > .btn.blue { flex: 1; justify-content: center; }
.tk-foot svg { width: 18px; height: 18px; }
.snz { position: relative; flex: 1; display: flex; }
.snz > .btn { flex: 1; justify-content: center; }
.snz-pop { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 6px 18px var(--shadow); display: flex; flex-direction: column; padding: 4px; z-index: 3; }
.snz-pop button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 4px; color: var(--text); }
.snz-pop button:hover { background: var(--hover); }
.tk-right { display: flex; flex-direction: column; min-height: 0; border-left: 1px solid var(--line); }
.tk-rtabs { display: flex; align-items: center; gap: 6px; padding: 12px; border-bottom: 1px solid var(--line); }
.tk-rtabs b { margin-left: auto; }
.tk-rtabs button { width: 38px; height: 34px; border-radius: 6px; border: 0; background: none; color: var(--muted); display: grid; place-items: center; }
.tk-rtabs button svg { width: 20px; height: 20px; }
.tk-rtabs button.on { background: var(--side-bg); color: var(--side-text); }
:root[data-theme="light"] .tk-rtabs button.on { background: var(--accent); color: #fff; }
.tk-feed { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 10px; font-size: 14px; }
.tk-none { text-align: center; margin-top: 8px; }
.tk-cm { background: var(--panel); border-radius: 8px; padding: 8px 10px; }
.tk-cm .muted, .tk-hs .muted { font-size: 12px; }
.tk-hs { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.tk-cbox { margin: 12px; border-radius: 8px; background: var(--accent-soft); padding: 8px; display: flex; flex-direction: column; }
.tk-cbox textarea { border: 0; background: none; resize: none; color: var(--text); font: inherit; outline: none; }
.tk-cbox .icon-btn { align-self: flex-end; color: var(--accent); }

/* ---------- Аналітика ---------- */
.an-kind { width: auto; min-width: 150px; height: 36px; border-radius: 18px; padding: 0 14px; font-weight: 500; }
.an-tabs { display: flex; gap: 2px; overflow-x: auto; overflow-y: hidden; border-bottom: 1px solid var(--line); flex: none; scrollbar-width: thin; }
.an-tabs button { border: 0; background: none; padding: 10px 14px; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; margin-bottom: -1px; font-size: 15px; border-radius: 4px 4px 0 0; }
.an-tabs button:hover { color: var(--text); }
.an-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); background: var(--accent-soft); }
.topbar .spacer { flex: 1; }
.an-page { display: flex; flex-direction: column; gap: 14px; background: var(--panel); }
.an-filters { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; }
.an-filters .fl { min-width: 140px; }
.an-filters .inp { height: 34px; }
.an-cmp { font-size: 12px; margin-left: auto; align-self: center; }
.an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.an-kpis.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-kpi { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; box-shadow: 0 1px 2px var(--shadow); }
.an-kpi-l { color: var(--muted); font-size: 14px; }
.an-kpi b { display: block; font-size: 22px; font-weight: 500; margin: 6px 0; font-variant-numeric: tabular-nums; }
.an-kpi-d { font-size: 13px; }
.hint { font-style: normal; color: var(--faint); cursor: help; }
.dl { display: inline-block; font-size: 12px; font-weight: 500; }
.dl.up { color: var(--green); }
.dl.down { color: var(--danger); }
.dl.zero { color: var(--muted); }
.an-kpi .dl { padding: 1px 6px; border-radius: 4px; }
.an-kpi .dl.up { background: var(--grp); }
.an-kpi .dl.down { background: var(--danger-soft); }
.an-kpi .dl.up::before { content: "▲ "; }
.an-kpi .dl.down::before { content: "▼ "; }
.dlw { line-height: 1.2; }
.an-card { border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; background: var(--surface); min-width: 0; }
.an-card-h { display: flex; align-items: center; margin-bottom: 10px; }
.an-card-h h3 { margin: 0; font-size: 15px; font-weight: 600; flex: 1; }
.an-card-h .icon-btn svg { width: 18px; height: 18px; }
.an-table { max-height: 520px; }
.an-table .dt th.sortable { cursor: pointer; user-select: none; }
.an-table .dt th .srt { margin-left: 4px; color: var(--faint); font-size: 11px; }
.an-table .dt th .srt.on { color: var(--accent); }
.an-table .dt th.grp-h { text-align: center; border-left: 1px solid var(--line); }
.an-table td.big { font-weight: 600; }
.an-table td.ind { padding-left: 28px; color: var(--muted); }
.an-prod { display: flex; align-items: center; gap: 10px; }
.an-prod img { width: 40px; height: 40px; border-radius: 4px; object-fit: cover; background: var(--panel); }
.an-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.an-grid.wide-l { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
.an-note { font-size: 12px; margin: 0; }
.donut { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.donut svg { width: 160px; height: 160px; }
.donut .lg { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; font-size: 13px; }
.donut .lg i { display: inline-block; width: 11px; height: 11px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.donut .lg b { font-weight: 500; color: var(--muted); }
.fn-wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 20px; align-items: center; }
.funnel { width: 100%; max-width: 520px; }
.fn-t { fill: #fff; font-size: 17px; }
.hb.ch .hb-l { display: flex; align-items: center; gap: 6px; }
.hb.ch .hb-bar i { background: #bfe3fb; }

@media (max-width: 1100px) {
  .ai-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .an-grid.wide-l, .fn-wrap { grid-template-columns: minmax(0, 1fr); }
  .donut svg { width: 130px; height: 130px; }
  .tk-panel { grid-template-columns: minmax(0, 1fr) 260px; height: calc(100vh - 32px); }
}
@media (max-width: 860px) {
  .an-grid.three { grid-template-columns: minmax(0, 1fr); }
  .tk-panel { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) 230px; }
  .tk-right { border-left: 0; border-top: 1px solid var(--line); }
  .tk-cbox { margin: 8px; }
}
@media (max-width: 760px) {
  .ai-grid, .an-kpis, .an-kpis.three { grid-template-columns: minmax(0, 1fr); }
  .us-grid { grid-template-columns: minmax(0, 1fr); }
  .an-tabs button { padding: 8px 10px; font-size: 14px; }
  .an-cmp { margin-left: 0; }
  .tk-fields { grid-template-columns: minmax(0, 1fr); }
  .tk-sub-head { padding-left: 18px; }
  .tk-foot { flex-wrap: wrap; }
  .role-row { grid-template-columns: minmax(0, 1fr); }
  .tk-meta { gap: 10px; }
}

/* ---------- Таблиця замовлень: Статус + час, Джерело значком, Служба доставки ---------- */
.orders .col-status .date-sub { margin-top: 4px; }
.orders .col-source { width: 124px; }
.orders .col-source .sub.ext { white-space: nowrap; }
.orders .col-delivery { width: 168px; }
.src-ic { display: inline-flex; }
.car-ic { display: inline-grid; place-items: center; border-radius: 6px; color: #fff; font-weight: 700; line-height: 1; flex: none; letter-spacing: -.3px; }
.car { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
a.ttn { display: inline-block; margin-top: 4px; font-size: 13px; color: var(--link); font-variant-numeric: tabular-nums; text-decoration: none; }
a.ttn:hover { text-decoration: underline; }
.orders td.col-delivery .sub { margin-top: 4px; }
.dlv { display: flex; flex-direction: column; gap: 8px; }
.dlv h3 { margin-bottom: 0; }
.dlv-row { display: flex; align-items: center; gap: 8px; }
.dlv-row .inp { flex: 1; min-width: 0; }
.cl-line { display: flex; align-items: center; gap: 10px; }
.cl-who { flex: 1; min-width: 0; }
.chat-go {
  display: inline-flex; align-items: center; gap: 6px; flex: none; height: 34px; padding: 0 12px; border-radius: 17px;
  border: 1px solid var(--accent); background: var(--surface); color: var(--accent); font-size: 13px; font-weight: 500;
}
.chat-go svg { width: 17px; height: 17px; }
.chat-go:hover { background: var(--accent-soft); }
.chat-go.has { background: var(--accent); color: #fff; }
.chat-go.has:hover { background: #2470cc; }
.br-ic { display: block; flex: none; }

/* ---------- Історія трекінгу ---------- */
.track-btn {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); text-align: left; font-size: 14px;
}
.track-btn:hover { border-color: var(--accent); background: var(--accent-soft); }
.track-btn svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.track-btn span { flex: 1; font-weight: 500; }
.tr-now { font-size: 11px; font-weight: 600; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); white-space: nowrap; }
.track-modal { width: min(440px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; }
.track-modal .modal-head h2 { font-size: 20px; }
.tr-car { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.tr-ttn { display: flex; align-items: center; gap: 8px; padding: 10px 20px; border-bottom: 1px solid var(--line); font-size: 14px; flex-wrap: wrap; }
.tr-ttn .ttn { margin: 0 0 0 auto; }
.tr-list { overflow-y: auto; flex: 1; }
.tr-ev { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 12px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.tr-when { display: flex; gap: 6px; align-items: flex-start; color: var(--muted); }
.tr-when svg { width: 17px; height: 17px; margin-top: 2px; flex: none; }
.tr-when b { display: block; font-size: 16px; font-weight: 500; color: var(--text); }
.tr-when span { font-size: 13px; }
.tr-body { border-left: 4px solid var(--c); padding-left: 12px; display: flex; flex-direction: column; gap: 5px; }
.tr-badge-row { display: flex; align-items: center; gap: 8px; }
.tr-ic { color: var(--c); display: inline-flex; }
.tr-ic svg { width: 20px; height: 20px; }
.tr-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .2px; padding: 2px 7px; border-radius: 4px; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); }
.tr-text { font-size: 15px; }
.tr-place { font-size: 13px; color: var(--muted); }
.tr-note { font-size: 12px; color: var(--muted); padding: 10px 20px; }

/* ---------- Примітка для менеджера (згортається) ---------- */
.mnote { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; background: var(--surface); }
.mnote.open, .mnote.has { background: var(--warn-soft); border-color: var(--warn); }
.mnote-head { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 2px 0; text-align: left; font-size: 13px; font-weight: 600; color: var(--warn-text); }
.mnote:not(.open):not(.has) .mnote-head { color: var(--link); }
.mnote-head span { flex: 1; }
.mnote-head svg { width: 15px; height: 15px; flex: none; }
.mnote-head svg:last-child { transition: transform .15s; }
.mnote.open .mnote-head svg:last-child { transform: rotate(180deg); }
.mnote-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--warn); flex: none; }
.mnote-preview { font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.mnote textarea { resize: vertical; background: var(--surface); width: 100%; box-sizing: border-box; }
.mnote-hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
.note-mark { display: inline-flex; align-items: center; gap: 3px; margin-top: 4px; font-size: 12px; color: var(--warn-text); background: var(--warn-soft); border-radius: 4px; padding: 1px 6px; cursor: help; }
.note-mark svg { width: 13px; height: 13px; }

/* ---------- Сторінки замовлень (по 25) ---------- */
.pager { display: flex; align-items: center; gap: 4px; }
.pg-btn, .pg-num { height: 32px; min-width: 32px; padding: 0 10px; border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 6px; font-size: 13px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; }
.pg-btn svg { width: 15px; height: 15px; }
.pg-r svg { transform: rotate(180deg); display: block; }
.pg-btn:hover:not(:disabled), .pg-num:hover { background: var(--hover); }
.pg-btn:disabled { opacity: .45; cursor: default; }
.pg-num.on { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.pg-gap { color: var(--muted); padding: 0 4px; }
@media (max-width: 760px) { .pg-btn { padding: 0 8px; font-size: 0; gap: 0; } .pg-btn svg { width: 17px; height: 17px; } .table-foot { flex-wrap: wrap; } }

/* ---------- Спосіб оплати і статуси «лише CRM» ---------- */
.pay-mark { display: inline-block; margin-top: 4px; font-size: 11px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 5px; white-space: nowrap; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.crm-only { margin-left: auto; font-size: 10px; color: var(--muted); border: 1px dashed var(--border); border-radius: 3px; padding: 0 4px; white-space: nowrap; }

/* ---------- Справжні замовлення з Prom ---------- */
.prom-btn { gap: 6px; border-color: #6b2fd6; color: #6b2fd6; }
.prom-btn svg { width: 17px; height: 17px; }
.prom-btn:disabled { opacity: .6; }
:root[data-theme="dark"] .prom-btn { border-color: #9d7cf0; color: #b9a3f5; }
.live-tgl { gap: 6px; }
.live-tgl b { font-weight: 600; background: var(--chip); border-radius: 10px; padding: 0 7px; font-size: 12px; }
.live-tgl.on { background: #6b2fd6; border-color: #6b2fd6; color: #fff; }
.live-tgl.on b { background: rgba(255,255,255,.25); color: #fff; }
.prom-box { display: flex; flex-direction: column; gap: 6px; border: 1px solid #d9ccf7; background: #f6f2ff; border-radius: 8px; padding: 10px; font-size: 13px; }
:root[data-theme="dark"] .prom-box { background: #2a2340; border-color: #4a3d73; }
.prom-box h3 { margin: 0 0 2px; color: #6b2fd6; }
.prom-box > div { display: flex; gap: 8px; justify-content: space-between; }
.prom-box span { color: var(--muted); flex: none; }
.prom-box b { font-weight: 500; text-align: right; overflow-wrap: anywhere; }
.prom-box .pb-note { flex-direction: column; }
.prom-box .pb-note b { text-align: left; }

/* ---------- Плитки статусів у «Замовлення» ---------- */
.st-tiles { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.st-tile {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; padding: 10px 14px; border-radius: 6px; border: 0;
  background: var(--c); color: #fff; text-align: left; min-width: 0; cursor: pointer; transition: transform .1s, box-shadow .1s, opacity .1s;
}
.st-tile b { font-size: 22px; font-weight: 600; line-height: 1.1; font-variant-numeric: tabular-nums; }
.st-tile span { font-size: 14px; opacity: .95; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.st-tile:hover { transform: translateY(-1px); box-shadow: 0 3px 10px var(--shadow); }
.st-tile:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.st-tiles:has(.st-tile.on:not([data-st="all"])) .st-tile:not(.on) { opacity: .55; }
.st-tile.on:not([data-st="all"]) { box-shadow: 0 0 0 3px var(--surface), 0 0 0 5px var(--c); }
@media (max-width: 1000px) { .st-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 600px) { .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 480px) { .st-tile { padding: 8px 10px; } .st-tile b { font-size: 18px; } .st-tile span { font-size: 12px; } }

/* ---------- Чати Prom: лише читання ---------- */
.ro-note { display: flex; gap: 10px; align-items: flex-start; margin: 10px 12px; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); border: 1px solid var(--warn); color: var(--text); font-size: 13px; line-height: 1.4; }
.ro-note svg { width: 18px; height: 18px; flex: none; color: var(--warn-text); margin-top: 1px; }
.ic-btn.prom-sync.busy svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Логотипи компаній ---------- */
img.br-ic.logo { display: block; flex: none; border-radius: 6px; background: #fff; object-fit: contain; box-shadow: inset 0 0 0 1px rgba(0,0,0,.06); }
img.br-ic.logo.wide { object-fit: contain; padding: 2px; box-sizing: border-box; }
:root[data-theme="dark"] img.br-ic.logo { box-shadow: 0 0 0 1px var(--border); }
.src.with-logo { display: inline-flex; align-items: center; gap: 6px; }
.src.with-logo img.br-ic.logo { border-radius: 4px; }
.chb.logo { background: #fff; overflow: hidden; display: inline-grid; place-items: center; box-shadow: 0 0 0 1px rgba(0,0,0,.08); }
.chb.logo img { width: 100%; height: 100%; object-fit: contain; display: block; }

/* ---------- Вхід ---------- */
.auth-gate { position: fixed; inset: 0; z-index: 200; background: var(--side-bg); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.auth-card { width: min(380px, 100%); background: var(--surface); color: var(--text); border-radius: 14px; padding: 26px 24px; box-shadow: 0 20px 60px rgba(0,0,0,.35); }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-bottom: 14px; }
.auth-brand .brand-name { color: #a8812c; }
.auth-card h1 { font-size: 21px; font-weight: 600; margin: 0 0 6px; text-align: center; }
.auth-lead { color: var(--muted); font-size: 14px; text-align: center; margin: 0 0 14px; line-height: 1.4; }
.auth-card form { display: flex; flex-direction: column; gap: 12px; }
.auth-f { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--muted); }
.auth-f input { height: 44px; border: 1px solid var(--border); border-radius: 8px; padding: 0 12px; font-size: 16px; color: var(--text); background: var(--surface); }
.auth-f input:focus { outline: 2px solid var(--focus); border-color: var(--accent); }
.auth-btn { height: 44px; justify-content: center; font-size: 15px; width: 100%; }
.auth-err { color: var(--danger); font-size: 13px; margin: 0; min-height: 1em; }
.auth-hint { color: var(--muted); font-size: 12px; text-align: center; margin: 14px 0 0; }

/* Хто увійшов — внизу меню */
.me-chip { position: relative; border-top: 1px solid var(--side-sep); }
.me-btn { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 14px; border: 0; background: none; color: var(--side-text); text-align: left; }
.me-btn:hover { background: var(--side-hover); }
.me-ava { width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 600; flex: none; }
.me-txt { display: flex; flex-direction: column; min-width: 0; }
.me-txt b { font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-txt small { font-size: 12px; color: var(--side-muted); }
.app.collapsed .me-txt { display: none; }
.app.collapsed .me-btn { justify-content: center; padding: 10px 0; }
.me-menu { position: absolute; left: 8px; bottom: calc(100% + 4px); z-index: 70; min-width: 220px; background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px var(--shadow); padding: 4px; display: flex; flex-direction: column; }
.me-menu[hidden] { display: none; }
.me-menu button { border: 0; background: none; text-align: left; padding: 9px 10px; border-radius: 5px; color: var(--text); }
.me-menu button:hover { background: var(--hover); }
.temp-dl { display: grid; grid-template-columns: auto 1fr; gap: 8px 14px; margin: 10px 0 14px; }
.temp-dl dt { color: var(--muted); }
.temp-dl dd { margin: 0; word-break: break-all; }
.temp-pw { font-size: 18px; font-weight: 600; letter-spacing: 1px; background: var(--warn-soft); padding: 2px 8px; border-radius: 4px; }
.h-by { color: var(--muted); }

/* ---------- Телефон: меню з логотипа, прокрутка замовлень, плитки за кнопкою ---------- */
.mob-menu-btn, .mob-backdrop, .tiles-tgl { display: none; }
@media (max-width: 820px), (max-height: 520px) and (pointer: coarse) {
  .mob-menu-btn {
    display: flex; align-items: center; gap: 2px; position: fixed; top: 8px; left: 8px; z-index: 90; height: 46px; padding: 0 8px 0 4px;
    border: 0; border-radius: 23px; background: var(--side-bg); color: var(--side-text); box-shadow: 0 2px 10px rgba(0,0,0,.25);
  }
  .mob-menu-btn .brand-mark { width: 38px; height: 38px; font-size: 20px; border-width: 2px; }
  .mob-menu-btn svg { width: 18px; height: 18px; transition: transform .15s; }
  .app.mob-open ~ .mob-menu-btn svg, .mob-menu-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
  .mob-backdrop:not([hidden]) { display: block; position: fixed; inset: 0; z-index: 84; background: rgba(0,0,0,.28); }
  .sidebar {
    display: none; position: fixed; top: 60px; left: 8px; z-index: 85; max-height: calc(100dvh - 68px);
    border-radius: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.35); overflow: hidden;
  }
  .app.mob-open .sidebar { display: flex; }
  .app.mob-open.collapsed .sidebar { width: 64px; }
  .app.mob-open:not(.collapsed) .sidebar { width: 230px; }
  .sidebar .brand { display: none; }
  .menu { padding: 6px 0; }
  .main { width: 100%; }
  .topbar { padding-left: 88px; min-height: 62px; }
  /* Стрілка внизу меню: вправо — розширити, вліво — звузити. */
  .app.mob-open:not(.collapsed) .collapse-btn svg { transform: none; }
  /* Замовлення: прокручується вся сторінка (і горизонтально на телефоні теж). */
  .app:has(#tableScroll) { height: auto; min-height: 100dvh; overflow: visible; }
  .app:has(#tableScroll) .main { overflow: visible; }
  .app:has(#tableScroll) .content { flex: none; }
  .app:has(#tableScroll) .table-scroll { flex: none; overflow-y: visible; overflow-x: auto; }
  /* Плитки статусів — лише за кнопкою «Статуси». */
  .tiles-tgl { display: inline-flex; gap: 6px; }
  .tiles-tgl svg { width: 16px; height: 16px; transition: transform .15s; }
  .tiles-tgl.open svg { transform: rotate(180deg); }
  .tiles-tgl.open { border-color: var(--accent); color: var(--accent); }
  #tiles.st-tiles { display: none; }
  #tiles.st-tiles.open { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  #tiles .st-tile { padding: 8px 10px; }
  #tiles .st-tile b { font-size: 18px; }
}
@media (max-height: 520px) and (pointer: coarse) and (min-width: 521px) {
  #tiles.st-tiles.open { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Головна: банер і кнопка «Перейти до замовлень» ---------- */
.content.home { overflow-y: auto; align-items: center; }
.home-hero { position: relative; width: 100%; max-width: min(1400px, calc((100dvh - 120px) * 16 / 9)); margin: 0 auto; }
.home-hero img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 6px 24px var(--shadow); }
/* Прозора кнопка точно поверх намальованої (координати у % від картинки). */
.home-go { position: absolute; left: 7%; top: 59.5%; width: 34.3%; height: 12.2%; border-radius: 999px; transition: box-shadow .15s, background .15s; }
.home-go:hover { background: rgba(255, 200, 80, .08); box-shadow: 0 0 0 3px rgba(212, 160, 23, .55), 0 0 22px rgba(212, 160, 23, .45); }
.home-go:focus-visible { outline: 3px solid #d4a017; outline-offset: 3px; }
.home-go:active { background: rgba(255, 255, 255, .08); }
@media (max-width: 820px) {
  .content.home { padding: 10px 12px 20px; }
  .home-hero { max-width: 520px; }
  .home-go { left: 6.5%; top: 38%; width: 87%; height: 6.8%; }
}

/* ---------- Підменю впритул до меню; на сторінці налаштувань без дубля підменю ---------- */
.menu-fly { border-radius: 0 10px 10px 0; border-left: 0; padding-left: 4px; }
.menu-fly::before { display: none; }
.menu-item.has-sub.fly-open { background: var(--side-hover); }
.set-split { grid-template-columns: minmax(0, 1fr); }
.set-split .set-nav { display: none; }
/* На телефоні пункти налаштувань теж у підменю (натискання на «Налаштування»), тому список на сторінці не потрібен. */

/* ---------- Логотип NF company ---------- */
.brand { padding: 14px 0 10px; }
.brand-logo { width: 132px; height: 132px; object-fit: contain; display: block; filter: drop-shadow(0 2px 6px rgba(0,0,0,.25)); transition: width .15s, height .15s; }
.app.collapsed .brand-logo { width: 52px; height: 52px; }
.auth-logo { width: 150px; height: 150px; object-fit: contain; display: block; }
.auth-gate .auth-card { padding-top: 18px; }
.mob-menu-btn .mob-logo { width: 40px; height: 40px; object-fit: contain; display: block; }
.menu-fly { z-index: 95; }
/* Світла тема: золото на світлому тлі темніше й з тінню, щоб не зливалося. */
:root[data-theme="light"] .brand-logo { filter: brightness(.82) saturate(1.25) drop-shadow(0 1px 1.5px rgba(0,0,0,.45)); }
.auth-logo { filter: brightness(.85) saturate(1.2) drop-shadow(0 1px 1.5px rgba(0,0,0,.35)); }

/* ---------- Головна: «Привіт, <ім'я>!» поверх картинки ---------- */
.home-hero { container-type: inline-size; }
.home-name { position: absolute; left: 30.6%; top: 33.85%; width: 17.8%; overflow: visible; pointer-events: none; }
.home-name span { display: inline-block; white-space: nowrap; font: 800 6.6cqw/1 "Segoe UI", Inter, Arial, sans-serif; letter-spacing: -.01em; color: #d6940d; }
.topbar h1:empty { display: none; }
@media (max-width: 820px) {
  .home-name { left: 45.4%; top: 22.65%; width: 50%; }
  .home-name span { font-size: 9.2cqw; }
  /* Меню під аватаркою на телефоні — повністю, не обрізається вузьким меню. */
  .app.mob-open .sidebar { overflow: visible; }
  .me-menu { left: 6px; min-width: 230px; }
}
@media (max-height: 520px) and (pointer: coarse) {
  .app.mob-open .sidebar { overflow: visible; }
  .me-menu { left: 6px; min-width: 230px; }
}

/* ---------- Пошук — лише лупа; поле розгортається по натисканню (і лишається відкритим, якщо щось введено) ---------- */
.topbar .theme-sw { margin-left: auto; } /* перемикач теми завжди праворуч, навіть без заголовка */
.search { width: 38px; padding: 0; gap: 0; border-radius: 19px; cursor: pointer; transition: width .2s ease, border-color .15s; overflow: hidden; flex: none; }
.search svg { flex: none; margin: 0 9px; }
.search input { flex: 0 0 0; width: 0; padding: 0; opacity: 0; transition: opacity .15s; }
.search:hover { border-color: var(--accent); color: var(--accent); }
.search:focus-within, .search:has(input:not(:placeholder-shown)) { width: 280px; cursor: text; border-color: var(--accent); color: var(--muted); }
.search:focus-within input, .search:has(input:not(:placeholder-shown)) input { flex: 1 1 auto; width: auto; padding-right: 10px; opacity: 1; }
@media (max-width: 820px), (max-height: 520px) and (pointer: coarse) {
  .search { width: 38px; order: 0; }
  .search:focus-within, .search:has(input:not(:placeholder-shown)) { width: 100%; order: 3; }
}

/* ---------- Товари: справжній каталог з Prom (етап 1, 15.11.2026) ---------- */
.p2-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.p2-stage button b { font-weight: 600; margin-left: 4px; opacity: .8; }
.p2-sync { font-size: 13px; color: var(--muted); }
.p2-empty { padding: 30px; color: var(--muted); text-align: center; }
.p2-start { max-width: 620px; margin: 40px auto; padding: 24px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel2); }
.p2-start h2 { margin: 0 0 8px; font-size: 18px; }
.p2-start p { color: var(--muted); line-height: 1.5; }
.p2-tree { max-height: calc(100vh - 210px); }
.cat2 { display: flex; align-items: center; padding-left: calc(var(--d) * 14px); }
.cat2 .cat { flex: 1; min-width: 0; padding-left: 4px; }
.cat2 .cat.top { font-weight: 600; }
.cat2-tg { flex: none; width: 22px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border: 0; background: none; color: var(--muted); padding: 0; border-radius: 4px; }
.cat2-tg svg { width: 14px; height: 14px; transition: transform .15s; }
.cat2-tg.open svg { transform: rotate(90deg); }
button.cat2-tg:hover { background: var(--hover); color: var(--text); }
.p2-nocat { padding: 6px 8px; font-size: 12px; color: var(--muted); }
.p2-flt i { font-style: normal; opacity: .7; margin-left: 3px; }
.p2-selinfo { font-size: 13px; color: var(--muted); }
.p2-table .col-check { width: 36px; text-align: center; }
.p2-table .col-check input { width: 17px; height: 17px; margin: 0; cursor: pointer; }
.p2-table td.c-name { max-width: 460px; }
.p2-sizes { font-size: 13px; font-variant-numeric: tabular-nums; }
.p2-marks { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 3px; }
.p2-mark { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; padding: 1px 7px; border-radius: 9px; background: var(--chip); color: var(--muted); }
.p2-mark svg { width: 12px; height: 12px; }
.p2-mark.warn { background: var(--warn-soft); color: var(--warn-text); }
.p2-mark.info { background: var(--accent-soft); color: var(--accent); }
.p2-mark.bad { background: var(--danger-soft); color: var(--danger); }
.p2-table .table-foot, .p2 .table-foot { justify-content: space-between; flex-wrap: wrap; }

.modal.p2-card { width: min(1500px, calc(100vw - 64px)); margin: auto 0; }
.p2-cbody { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 22px; padding: 18px 20px; }
.p2-gal { display: flex; flex-direction: column; gap: 8px; }
.p2-gal > a img { width: 300px; height: 400px; object-fit: contain; background: var(--panel); border-radius: 6px; display: block; }
.p2-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.p2-thumbs button { padding: 0; border: 2px solid transparent; border-radius: 4px; background: none; }
.p2-thumbs button.on { border-color: var(--accent); }
.p2-thumbs img { width: 50px; height: 50px; object-fit: cover; display: block; border-radius: 2px; }
.p2-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.p2-h { font-size: 15px; margin: 8px 0 0; display: flex; align-items: center; gap: 10px; }
.p2-h .sub { font-weight: 400; }
.seg.sm button { height: 26px; padding: 0 9px; font-size: 12px; }
.p2-note { display: flex; gap: 10px; align-items: flex-start; flex-wrap: wrap; padding: 10px 12px; border-radius: 6px; font-size: 13px; line-height: 1.45; }
.p2-note > svg { width: 18px; height: 18px; flex: none; margin-top: 1px; }
.p2-note > div { flex: 1; min-width: 200px; }
.p2-note ul { margin: 4px 0 0; padding-left: 18px; }
.p2-note.warn { background: var(--warn-soft); color: var(--warn-text); }
.p2-note.info { background: var(--accent-soft); color: var(--text); }
.p2-note.small { padding: 7px 10px; font-size: 12px; }
.p2-form .table-scroll { flex: none; }
.p2-vt .inp.sm { height: 30px; width: 90px; padding: 0 8px; font-size: 13px; }
.p2-vt .inp.guess { border-color: var(--warn); background: var(--warn-soft); }
.p2-vt .inp.need { border-color: var(--danger); }
.p2-vt tr.p2-gone td { opacity: .55; }
.p2-ids { font-size: 12px; font-variant-numeric: tabular-nums; }
.p2-desc { position: relative; padding: 12px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; line-height: 1.5; background: var(--surface); }
.p2-desc p { margin: 0 0 6px; }
.p2-desc ul { margin: 4px 0 6px; padding-left: 18px; }
.p2-flag { display: inline-block; font-size: 11px; padding: 0 5px; margin: 0 2px; border-radius: 4px; background: var(--warn-soft); color: var(--warn-text); }
.p2-kv { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 8px 16px; font-size: 13px; }
.p2-kv span { display: block; color: var(--muted); font-size: 12px; }
@media (max-width: 900px) {
  .p2-cbody { grid-template-columns: minmax(0, 1fr); }
  .p2-gal > a img { width: 100%; height: 300px; }
  .cat-tree.p2-tree { max-height: 220px; flex-direction: column; flex-wrap: nowrap; }
  .p2-tree .cat2, .p2-tree .cat2 .cat { width: auto; }
}
.p2-pack { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.p2-pack .inp { min-width: 0; }
.p2-chars { display: flex; flex-direction: column; gap: 6px; max-height: 280px; overflow: auto; }
.p2-ch { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 6px; align-items: center; }
.p2-ch .inp { height: 32px; font-size: 13px; }
.p2-chars > .btn.link { align-self: flex-start; }
/* Етап 2: робочі групи й масові дії */
.p2-groups { display: flex; align-items: flex-end; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.p2-gsel { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.p2-gsel .inp { height: 32px; min-width: 260px; max-width: 100%; font-size: 13px; color: var(--text); }
.p2-selbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 8px; border-radius: 6px; background: var(--accent-soft); font-size: 13px; }
.p2-dlg .modal-body { padding: 16px 20px; display: flex; flex-direction: column; gap: 12px; }
.p2-dlg .sub { margin: 0; line-height: 1.45; }
.p2-chk { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.p2-chk input { width: 16px; height: 16px; margin: 0; }
.p2-mlist { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.p2-mlist label { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; color: var(--text); font-size: 13px; }
.p2-mlist img { width: 36px; height: 36px; object-fit: cover; border-radius: 4px; flex: none; }
.p2-mlist i { display: block; font-style: normal; color: var(--muted); font-size: 12px; }
.modal.small.p2-dlg { width: min(560px, 100%); }
/* Етап 3: вкладки площадок у картці товару */
.p2-chead { flex-wrap: wrap; row-gap: 8px; }
.p2-chead h2 { flex: 1 1 320px; min-width: 0; }
.p2-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-left: auto; }
.p2-tabs button { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border: 1px solid var(--border); border-radius: 16px; background: var(--surface); color: var(--muted); font-size: 13px; }
.p2-tabs button img { width: 16px; height: 16px; border-radius: 3px; }
.p2-tabs button.en { color: var(--text); }
.p2-tabs button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.p2-mkdot { width: 16px; height: 16px; border-radius: 3px; display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; background: var(--chip); color: var(--text); }
.p2-tabs button.on .p2-mkdot { background: rgba(255,255,255,.25); color: #fff; }
.p2-mk { display: flex; flex-direction: column; gap: 10px; }
.p2-rule { margin: 0; line-height: 1.45; }
.p2-pv td { white-space: normal; vertical-align: top; }
.p2-len { font-variant-numeric: tabular-nums; }
.p2-len.bad { color: var(--danger); font-weight: 600; }
.p2-oid { width: 150px !important; }
@media (max-width: 900px) { .p2-tabs { margin-left: 0; } }
@media (max-width: 760px) { .p2-card .p2-chead { padding-top: 60px; } } /* кнопка меню телефона не закриває назву */

/* Виправлення після перевірки власником (15.11.2026, етап 3): ширша й довша картка, без вузької прокрутки всередині */
.backdrop:has(.p2-card) { padding: 32px 24px; align-items: flex-start; }
.p2-card .p2-chead { position: sticky; top: -32px; z-index: 5; background: var(--surface); padding: 16px 64px 12px 24px; }
.p2-card .p2-chead > [data-c2=close] { position: absolute; top: 14px; right: 16px; }
.p2-card .p2-chead h2 { font-size: 19px; line-height: 1.3; }
.p2-card .modal-foot { position: sticky; bottom: -32px; z-index: 5; background: var(--surface); }
.p2-cbody { grid-template-columns: 340px minmax(0, 1fr); gap: 28px; padding: 22px 24px; }
.p2-gal { position: sticky; top: 110px; align-self: start; }
.p2-gal > a img { width: 340px; height: 450px; }
.p2-desc.clip { max-height: 420px; overflow: hidden; }
.p2-desc.clip::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--surface)); }
.p2-more { align-self: flex-start; }
.p2-pv .lang { display: inline-block; min-width: 24px; font-size: 11px; font-weight: 600; color: var(--muted); margin-right: 6px; }
.p2-pv tr.ru td { border-top: 0; padding-top: 0; color: var(--muted); }
.p2-pv tr.uk td { border-bottom: 0; }
.p2-lenline { font-size: 13px; }
@media (max-width: 900px) {
  .modal.p2-card { width: 100%; }
  .backdrop:has(.p2-card) { padding: 12px 8px; }
  .p2-cbody { grid-template-columns: minmax(0, 1fr); padding: 16px; }
  .p2-gal { position: static; }
  .p2-gal > a img { width: 100%; height: 320px; }
  .p2-card .p2-chead { top: -12px; padding: 12px 56px 10px 16px; }
  .p2-card .modal-foot { bottom: -12px; }
}
@media (max-width: 760px) { .p2-card .p2-chead { padding-top: 60px; } } /* кнопка меню телефона не закриває назву */
.p2-card .p2-chars { max-height: none; overflow: visible; } /* без окремої прокрутки всередині картки */
.p2-pv td.p2-len.bad { color: var(--danger); font-weight: 600; }
@media (max-width: 900px) { .p2-card .p2-chead, .p2-card .modal-foot { position: static; } } /* на телефоні шапка й кнопки не займають пів екрана */

/* Етап 4: готовність до вивантаження, довідники площадок */
.p2-ready { border-radius: 8px; padding: 10px 14px; font-size: 13px; line-height: 1.5; }
.p2-ready.ok { background: var(--grp); color: var(--green); font-weight: 600; border: 1px solid var(--green); }
.p2-ready.bad { background: var(--danger-soft); color: var(--danger); border: 1px solid var(--danger); }
.p2-ready ol { margin: 6px 0 0; padding-left: 20px; color: var(--text); }
.p2-ready ol .btn.link { padding: 0; height: auto; text-align: left; white-space: normal; color: var(--text); text-decoration: underline dotted; }
.p2-ready ol .btn.link:hover { color: var(--danger); }
.p2-tdot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-left: 2px; }
.p2-tdot.ok { background: var(--green); }
.p2-tdot.bad { background: var(--danger); }
.p2-tabs button.on .p2-tdot { box-shadow: 0 0 0 2px #fff; }
.p2-catsel { padding: 8px 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--panel2); font-size: 13px; }
.p2-catpick { display: flex; gap: 8px; }
.p2-catpick .inp { flex: 1; min-width: 0; }
.p2-cathits, .p2-hits { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; max-height: 260px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; padding: 6px 8px; font-size: 13px; }
.p2-hits:empty { display: none; }
.p2-cathits .btn.link, .p2-hits .btn.link { height: auto; padding: 3px 0; text-align: left; white-space: normal; }
.p2-attrs { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.p2-attr .inp { font-size: 13px; }
.p2-req { color: var(--danger); }
.p2-ms { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; }
.p2-ms label { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); }
.p2-brand { position: relative; display: flex; flex-direction: column; gap: 4px; }
.p2-okmark { font-size: 12px; color: var(--green); }
.p2-more-attrs summary { cursor: pointer; font-size: 13px; color: var(--accent); padding: 6px 0; }
.p2-va select.inp.sm, .p2-va input.inp.sm { width: 160px; }
.p2-flash { outline: 3px solid var(--danger) !important; outline-offset: 2px; border-radius: 4px; transition: outline-color .3s; }
.p2-mkr { display: inline-flex; gap: 4px; margin-left: 6px; }
.p2-mkr i { font-style: normal; font-size: 11px; padding: 0 6px; border-radius: 8px; border: 1px solid currentColor; }
.p2-mkr i.ok { color: var(--green); }
.p2-mkr i.bad { color: var(--danger); }
.p2-readysel { height: 34px; font-size: 13px; }
.p2-readysel { width: auto !important; min-width: 220px; flex: none; }
.p2-qty { width: 70px !important; text-align: right; }
/* П. 4.3 ТЗ: незаповнене обов'язкове поле — червона рамка; готова вкладка площадки — зелена смуга */
.p2-card .p2-need { border-color: var(--danger) !important; box-shadow: 0 0 0 1px var(--danger); }
.p2-card table.p2-need, .p2-card .p2-ms.p2-need, .p2-card .p2-gal.p2-need, .p2-card .p2-chars.p2-need, .p2-card .p2-desc.p2-need, .p2-card label.p2-need, .p2-card th.p2-need { outline: 2px solid var(--danger); outline-offset: 2px; border-radius: 4px; box-shadow: none; }
.p2-mk.is-ready { border-left: 3px solid var(--green); padding-left: 12px; }

/* Фото по кольорах (п. 5.4 ТЗ, 17.11.2026): перемикач кольорів над галереєю, вибір фото кольору */
.p2-colors { display: flex; flex-wrap: wrap; gap: 6px; }
.p2-colors button { border: 1px solid var(--border); background: var(--surface); color: var(--text); border-radius: 14px; padding: 4px 10px; font-size: 12px; line-height: 1.3; }
.p2-colors button span { color: var(--muted, #7a8594); margin-left: 2px; }
.p2-colors button.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.p2-colors button.on span { color: #fff; opacity: .85; }
.p2-colors button.bad:not(.on) { border-color: var(--danger); color: var(--danger); }
.p2-galbtns { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.p2-thumbs.picking button { position: relative; opacity: .45; }
.p2-thumbs.picking button.sel { opacity: 1; border-color: var(--green); }
.p2-thumbs.picking button.sel::after { content: "✓"; position: absolute; right: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--green); color: #fff; font-size: 11px; line-height: 16px; text-align: center; }
.p2-cdesc { margin-top: 6px; }
.p2-gal.picking > a img { height: 220px; }
@media (min-width: 901px) { .p2-gal .p2-thumbs { max-height: 176px; overflow-y: auto; } .p2-gal.picking .p2-thumbs { max-height: 300px; } }

/* Олівець і посилання перекладу (рішення власника 17.11.2026): назва й опис захищені від випадкової правки */
.p2-lock > label { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.p2-lockrow { position: relative; }
.p2-lock:not(.open) .p2-lockrow .inp[readonly] { background: var(--panel); cursor: default; padding-right: 40px; }
.p2-lock.open .p2-lockrow .inp { border-color: var(--accent); }
.p2-pen { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 4px; background: none; color: var(--muted); cursor: pointer; }
.p2-pen svg { width: 17px; height: 17px; }
.p2-pen:hover, .p2-pen:focus-visible { background: var(--accent-soft); color: var(--accent); }
.p2-tr { align-self: flex-start; text-align: left; border: 0; background: none; padding: 4px 0 0; color: var(--link); font-size: 12px; cursor: pointer; text-decoration: none; }
.p2-tr:hover { text-decoration: underline; }
.p2-desc2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr)); gap: 14px; }
.p2-dcol { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.p2-dhead { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 12px; }
.p2-dcol .p2-desc { background: var(--panel); min-height: 80px; }
.p2-dcol { position: relative; }
.p2-dcol .p2-pen { top: 26px; right: 6px; transform: none; opacity: 0; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: opacity .15s; }
.p2-dcol:hover .p2-pen, .p2-dcol .p2-pen:focus-visible { opacity: 1; }
@media (hover: none) { .p2-dcol .p2-pen { opacity: 1; } }
@media (max-width: 900px) { .p2-desc2 { grid-template-columns: minmax(0, 1fr); } }

/* Вікно «Експорт груп та позицій» (як на Prom; 18.11.2026) */
.modal.p2-exp { width: 600px; max-width: 100%; }
.p2-exp .modal-body { display: flex; flex-direction: column; gap: 16px; }
.p2-exp-g { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.p2-exp-g legend { font-size: 13px; color: var(--text); margin-bottom: 8px; padding: 0; }
.p2-exp-r, .p2-exp-c { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 20px; cursor: pointer; }
.p2-exp-r input, .p2-exp-c input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }
.p2-exp-r.off { color: var(--faint); cursor: default; }
.p2-exp-why { color: var(--faint); }
.p2-exp-lab { display: inline-flex; align-items: center; gap: 8px; vertical-align: top; }
.p2-exp-lab img, .p2-exp-lab .p2-mkdot { width: 18px; height: 18px; }
.p2-exp-pick { display: flex; flex-direction: column; gap: 6px; margin: 2px 0 4px 28px; padding: 8px 10px; max-height: 200px; overflow-y: auto; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.p2-exp-pick label { display: flex; align-items: center; gap: 8px; }
.p2-exp-sum { margin: 0; padding: 10px 12px; background: var(--panel); border-radius: 6px; font-size: 13px; }
.p2-addph { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.p2-addph .inp { flex: 1 1 160px; min-width: 0; }
.p2-exp-more > summary { cursor: pointer; font-size: 14px; padding: 2px 0; color: var(--link); list-style-position: inside; }
.p2-exp-more[open] > summary { margin-bottom: 8px; }
.p2-exp-morelist { display: flex; flex-direction: column; gap: 8px; padding-left: 14px; border-left: 2px solid var(--line); }

/* Розділи CRM ліворуч у «Товари» (18.11.2026); старе дерево з Prom — згорнуте */
.p2-tree .p2-sec.empty { color: var(--faint); }
.p2-tree .p2-sec.nosec { color: var(--warn-text); margin-top: 4px; }
.p2-oldcats { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 8px; }
.p2-oldcats > summary { cursor: pointer; font-size: 12px; color: var(--muted); padding: 4px 8px; }
.p2-oldcats[open] > summary { margin-bottom: 4px; }

/* Замкнене / відкрите поле (зауваження власника 18.11.2026) */
.p2-lock.open .p2-pen { display: none; }
.p2-dhint { display: none; margin: 0; }
.p2-lock.open .p2-dhint { display: block; }
.p2-dedit img { max-width: 100%; height: auto; }
.p2-dcol.open .p2-dedit { background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); min-height: 200px; outline: none; cursor: text; }
.p2-lock:not(.open) .p2-dedit { cursor: default; }

/* Одна кнопка «Оновити» з меню (18.11.2026) */
.p2-upd { position: relative; }
.p2-updmenu { position: absolute; right: 0; top: calc(100% + 4px); z-index: 30; min-width: 280px; background: var(--surface); border: 1px solid var(--border); border-radius: 6px; box-shadow: 0 8px 24px rgba(0,0,0,.15); padding: 4px; display: flex; flex-direction: column; }
.p2-updmenu button { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: left; border: 0; background: none; padding: 8px 10px; border-radius: 4px; color: var(--text); cursor: pointer; font-size: 13px; }
.p2-updmenu button span { font-size: 12px; color: var(--muted); }
.p2-updmenu button:hover, .p2-updmenu button:focus-visible { background: var(--hover); }

/* Перевірка розміру фото (не менше 500×500, 18.11.2026) */
.p2-thumbs button.small { border-color: var(--danger); }
.p2-thumbs button.small.on { box-shadow: 0 0 0 2px var(--accent); }
.p2-phsize { margin-top: 4px; }
.p2-phsize.bad { color: var(--danger); font-weight: 600; }

/* «Товари»: «Експорт» праворуч (18.11.2026) */
.p2-top .spacer { flex: 1; }

/* «Товари → Імпорт» (18.11.2026, за зразком Prom) */
.imp-note { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.imp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 12px; align-items: start; }
.imp-main, .imp-side, .imp-set, .imp-rep { padding: 16px; }
.imp-set { grid-column: 1 / -1; }
.imp-lead { margin: 0 0 8px; }
.imp-src { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.imp-chk { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.imp-chk input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.imp-help { display: inline-grid; place-items: center; width: 16px; height: 16px; border: 1px solid var(--muted); border-radius: 50%; font-size: 11px; color: var(--muted); cursor: help; }
.imp-link { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; }
.imp-link .inp { flex: 1; min-width: 0; }
.imp-ico { width: 28px; height: 28px; display: inline-grid; place-items: center; border: 0; background: none; color: var(--muted); font-size: 18px; cursor: pointer; }
.imp-ico.box { border: 1px solid var(--border); border-radius: 4px; }
.imp-file { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.imp-toggle { display: block; }
.imp-toggle, .imp-more { border: 0; background: none; color: var(--accent); cursor: pointer; padding: 6px 0; font: inherit; }
.imp-toggle span, .imp-more span { text-decoration: underline; text-decoration-style: dotted; }
.imp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.imp-h { font-size: 13px; font-weight: 600; margin: 12px 0 4px; }
.imp-col > .imp-h:first-child { margin-top: 0; }
.imp-all { margin-bottom: 4px; }
.imp-foot { display: flex; justify-content: flex-end; margin-top: 12px; }
.imp-side { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.imp-side .imp-h { margin: 0 0 4px; }
.imp-reps { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }
.imp-rep h3 { margin: 0 0 8px; font-size: 16px; font-weight: 500; }
.imp-rep p { margin: 2px 0; font-size: 13px; }
.imp-rep-body { border-top: 1px solid var(--border); margin-top: 10px; padding-top: 10px; }
.imp-rep h4 { margin: 8px 0 6px; font-size: 13px; }
.imp-line { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 2px 0; }
.imp-dot { width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.imp-line.ok .imp-dot { background: var(--green); }
.imp-line.bad .imp-dot { background: var(--danger); }
.imp-more { margin-left: 26px; font-size: 13px; }
.imp-detail { margin: 2px 0 4px 44px; padding: 0; font-size: 13px; color: var(--muted); }
@media (max-width: 760px) {
  .imp-grid, .imp-cols { grid-template-columns: 1fr; }
}
.imp .card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }

/* Результат експорту (18.11.2026) */
.p2-exp-res { margin-top: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; background: var(--panel); font-size: 13px; }
.p2-exp-res p { margin: 0 0 6px; }
.p2-exp-res .ok b { color: var(--green); }
.p2-exp-skip ul { margin: 6px 0 0; padding-left: 18px; max-height: 220px; overflow: auto; }
.p2-exp-skip li { margin-bottom: 4px; }

/* «Імпорт»: посилання постачальників, у кожного свої налаштування (19.11.2026) */
.imp-src-top { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.imp-src-top h2, .imp-reps-h { font-size: 18px; margin: 0; }
.imp-reps-h { margin: 22px 0 0; }
.imp-src-top .spacer, .imp-src-head .spacer, .imp-foot .spacer { flex: 1; }
.imp-src-card, .imp-edit, .imp-empty { padding: 14px 16px; margin-bottom: 12px; }
.imp-src-card.off { opacity: .7; }
.imp-src-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.imp-src-head h3 { margin: 0; font-size: 16px; }
.imp-tag { font-size: 12px; padding: 1px 8px; border-radius: 10px; background: var(--chip); color: var(--muted); }
.imp-src-url { margin: 4px 0 8px; font-size: 12px; color: var(--muted); word-break: break-all; }
.imp-src-set { margin: 0; padding-left: 18px; font-size: 13px; }
.imp-src-set li { margin: 2px 0; }
.imp-src-res { margin-top: 10px; border-top: 1px solid var(--border); padding-top: 8px; }
.imp-src-res h4 { margin: 0 0 6px; font-size: 13px; }
.imp-edit h3 { margin: 0 0 10px; font-size: 16px; }
.imp-edit .fl { display: flex; flex-direction: column; gap: 4px; margin-bottom: 8px; }
.imp-edit .fl span { font-size: 13px; color: var(--muted); }
.imp-edit select.inp { max-width: 260px; margin-bottom: 8px; }
.btn.link.danger { color: var(--danger); }
.imp .card { background: var(--surface); border: 1px solid var(--border); border-radius: 6px; }
.imp-set-in { border: 1px solid var(--border); border-radius: 6px; padding: 12px; background: var(--panel); margin: 6px 0 10px; }
.imp-en { margin-top: 8px; }

/* Кнопка «звук сповіщень» біля перемикача теми (19.11.2026) */
.sound-sw { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border); background: var(--surface); color: var(--muted); display: inline-grid; place-items: center; cursor: pointer; margin-right: 8px; flex: none; }
.sound-sw svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.sound-sw.on { color: var(--accent); }
.sound-sw:hover { background: var(--hover); }
