/* стилі розділу кабінету — cabinet-catalog.css
   Товари, картка товару, категорії деревом, імпорт. Світлий стиль; усе під префіксом .cc-,
   щоб не залежати від загальних стилів кабінету. */
.cc {
  --cc-ink: #1f1f1f; --cc-ink-2: #8a8a8f; --cc-line: #e6e6ea; --cc-line-2: #d1d5db;
  --cc-bg: #fff; --cc-soft: #f3f4f6; --cc-soft-2: #e5e7eb;
  --cc-dark: #3d3d3d; --cc-dark-hi: #2b2b2b; --cc-green: #65a362; --cc-red: #d64545; --cc-yellow: #b7791f; --cc-blue: #3b6fd8;
  --cc-r: 10px;
  color: var(--cc-ink); font-family: "Manrope", "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; }
.cc a { color: inherit; }
.cc .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.cc code { background: var(--cc-soft); border-radius: 6px; padding: 1px 6px; font-size: .86em; }

/* шапка розділу */
.cc-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.cc-head h1 { margin: 0; font: 700 clamp(1.5rem, 2.4vw, 1.9rem)/1.2 inherit; font-family: inherit; color: var(--cc-ink);
  display: flex; align-items: center; gap: 10px; letter-spacing: -.01em; }
.cc-head__n { font-size: .95rem; font-weight: 600; color: var(--cc-ink-2); background: var(--cc-soft); border-radius: 999px; padding: 2px 10px; }
.cc-head__tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cc-back { margin: 0 0 6px; font-size: .88rem; }
.cc-back a { color: var(--cc-ink-2); text-decoration: none; }
.cc-back a:hover { color: var(--cc-ink); }

/* кнопки */
.cc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 9px 18px;
  border-radius: var(--cc-r); border: 1px solid var(--cc-dark); background: var(--cc-dark); color: #fff !important;
  font: 600 .92rem/1.2 inherit; font-family: inherit; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .2s, border-color .2s, box-shadow .2s; }
.cc-btn:hover { background: var(--cc-dark-hi); border-color: var(--cc-dark-hi); }
.cc-btn:focus-visible, .cc-link:focus-visible, .cc a:focus-visible, .cc input:focus-visible, .cc select:focus-visible,
.cc textarea:focus-visible, .cc-bulk button:focus-visible { outline: 2px solid var(--cc-green); outline-offset: 2px; }
.cc-btn--line { background: #fff; color: var(--cc-ink) !important; border-color: var(--cc-line-2); }
.cc-btn--line:hover { background: var(--cc-soft); border-color: #b9bec7; }
.cc-btn--danger { background: var(--cc-red); border-color: var(--cc-red); }
.cc-btn--danger:hover { background: #b83535; border-color: #b83535; }
.cc-btn--icon { padding: 9px 12px; letter-spacing: .1em; }
.cc-btn--wide { width: 100%; }
.cc-link { background: none; border: 0; padding: 4px 0; font: 600 .9rem inherit; font-family: inherit; color: var(--cc-ink-2);
  cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.cc-link:hover { color: var(--cc-ink); }
.cc-link--danger { color: var(--cc-red); }
.cc-link--danger:hover { color: #b83535; }

/* меню «•••» */
.cc-menu { position: relative; }
.cc-menu > summary { list-style: none; }
.cc-menu > summary::-webkit-details-marker { display: none; }
.cc-menu__pop { position: absolute; right: 0; top: calc(100% + 6px); z-index: 20; width: 260px; padding: 8px; background: #fff;
  border: 1px solid var(--cc-line); border-radius: 12px; box-shadow: 0 12px 32px rgba(17, 17, 17, .12); }
.cc-menu__pop > a { display: block; padding: 9px 10px; border-radius: 8px; text-decoration: none; font-size: .92rem; }
.cc-menu__pop > a:hover { background: var(--cc-soft); }
.cc-menu__label { margin: 10px 10px 6px; font-size: .74rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--cc-ink-2); }
.cc-menu__row { display: flex; gap: 6px; padding: 0 10px 4px; }
.cc-menu__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 8px; padding: 0 10px 6px; font-size: .88rem; }
.cc-menu__cols label { display: flex; gap: 6px; align-items: center; cursor: pointer; }
.cc-chip { padding: 5px 12px; border: 1px solid var(--cc-line-2); border-radius: 999px; text-decoration: none; font-size: .85rem; }
.cc-chip.on { background: var(--cc-dark); border-color: var(--cc-dark); color: #fff !important; }

/* вкладки-фільтри */
.cc-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--cc-line); margin-bottom: 14px; overflow-x: auto; scrollbar-width: none; }
.cc-tabs a { padding: 10px 12px; text-decoration: none; color: var(--cc-ink-2); font-weight: 600; font-size: .92rem; white-space: nowrap;
  border-bottom: 2px solid transparent; margin-bottom: -1px; }
.cc-tabs a span { font-weight: 500; font-size: .8rem; color: var(--cc-ink-2); background: var(--cc-soft); border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.cc-tabs a:hover { color: var(--cc-ink); }
.cc-tabs a.on { color: var(--cc-ink); border-bottom-color: var(--cc-ink); }

/* пошук і категорія */
.cc-filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cc-search { position: relative; flex: 1 1 280px; max-width: 420px; }
.cc-search svg { position: absolute; left: 12px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); fill: none;
  stroke: var(--cc-ink-2); stroke-width: 1.8; stroke-linecap: round; }
.cc-search input { padding-left: 38px !important; }
.cc input[type=text], .cc input[type=search], .cc input[type=number], .cc input[type=datetime-local], .cc input[type=url],
.cc textarea, .cc-select, .cc select {
  width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid var(--cc-line-2); border-radius: 8px; background: #fff;
  color: var(--cc-ink); font: 400 .94rem/1.4 inherit; font-family: inherit; transition: border-color .2s, box-shadow .2s; }
.cc textarea { resize: vertical; }
.cc input:focus, .cc textarea:focus, .cc select:focus { border-color: #9aa0aa; box-shadow: 0 0 0 3px rgba(61, 61, 61, .08); outline: none; }
.cc .cc-select { width: auto; min-width: 200px; max-width: 100%; cursor: pointer; }
.cc .cc-select--wide { width: 100%; }
.cc input[type=checkbox], .cc input[type=radio] { width: 17px; height: 17px; accent-color: var(--cc-dark); cursor: pointer; margin: 0; flex: none; }
.cc-reset { font-size: .9rem; color: var(--cc-ink-2); }

/* таблиця товарів */
.cc-tablewrap { overflow-x: auto; border: 1px solid var(--cc-line); border-radius: 12px; background: #fff; }
.cc-table { width: 100%; border-collapse: collapse; font-size: .93rem; }
.cc-table th { text-align: left; padding: 11px 12px; font-weight: 600; font-size: .8rem; color: #9ca3af; border-bottom: 1px solid var(--cc-line);
  white-space: nowrap; background: #fff; }
.cc-table th a { text-decoration: none; color: #9ca3af; }
.cc-table th a:hover, .cc-table th a.on { color: #111; }
.cc-table th a.on.up::after { content: " ↑"; }
.cc-table th a.on.down::after { content: " ↓"; }
.cc-table td { padding: 10px 12px; border-bottom: 1px solid var(--cc-line); vertical-align: middle; }
.cc-table tbody tr:last-child td { border-bottom: 0; }
.cc-table tbody tr { transition: background .15s; }
.cc-table tbody tr:hover { background: #fafafb; }
.cc-table tbody tr.is-picked { background: #f1f6f0; }
.cc-table tr.is-hidden .cc-name a, .cc-table tr.is-hidden .cc-thumb { opacity: .55; }
.cc-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cc-table__check { width: 40px; padding-right: 0 !important; }
.cc-thumb { width: 60px; }
.cc-thumb img, .cc-thumb span { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 8px; object-fit: cover;
  background: var(--cc-soft); color: var(--cc-ink-2); font-weight: 700; }
.cc-name a { font-weight: 600; text-decoration: none; }
.cc-name a:hover { text-decoration: underline; text-underline-offset: 3px; }
.cc-name small { display: block; color: var(--cc-ink-2); font-size: .8rem; margin-top: 2px; }
.cc-mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: .86rem; color: #4b5563; }
.cc-muted { color: var(--cc-ink-2); }
.cc-table.no-photo [data-col=photo], .cc-table.no-sku [data-col=sku], .cc-table.no-category [data-col=category],
.cc-table.no-price [data-col=price], .cc-table.no-availability [data-col=availability], .cc-table.no-stock [data-col=stock],
.cc-table.no-stickers [data-col=stickers] { display: none; }

/* пігулки наявності й мітки стікерів */
.cc-pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: .78rem; font-weight: 600; white-space: nowrap; }
.cc-pill--in_stock { background: #e8f3e7; color: #3f7a3c; }
.cc-pill--order { background: #e8effc; color: #2c58b3; }
.cc-pill--expected { background: #fdf3dc; color: #8a5a0f; }
.cc-pill--out { background: #fde8e8; color: #b23131; }
.cc-stickers { white-space: nowrap; }
.cc-tag { display: inline-block; margin: 1px 4px 1px 0; padding: 1px 7px; border-radius: 6px; font-size: .72rem; font-weight: 700; }
.cc-tag--new { background: #e8effc; color: #2c58b3; }
.cc-tag--hit { background: #fdf3dc; color: #8a5a0f; }
.cc-tag--sale, .cc-tag--discount { background: #fde8e8; color: #b23131; }

/* сторінки */
.cc-pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin: 14px 0; color: var(--cc-ink-2); font-size: .9rem; }
.cc-pager__btn { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid var(--cc-line-2); border-radius: 8px;
  text-decoration: none; font-size: 1.1rem; color: var(--cc-ink); background: #fff; }
.cc-pager__btn:hover { background: var(--cc-soft); }
.cc-pager__btn.off { opacity: .35; }

/* смуга масових дій — знизу, темна */
.cc-bulk { position: fixed; left: 50%; bottom: 18px; transform: translateX(-50%); z-index: 40; display: flex; align-items: center; gap: 14px;
  max-width: calc(100vw - 24px); padding: 8px 8px 8px 18px; background: #1f1f1f; color: #fff; border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, .25); font-family: "Manrope", "Inter", system-ui, sans-serif; }
.cc-bulk[hidden] { display: none; }
.cc-bulk__info { display: flex; flex-direction: column; gap: 2px; white-space: nowrap; font-size: .92rem; }
.cc-bulk__all { background: none; border: 0; padding: 0; color: #b9e3b6; font: 600 .78rem inherit; font-family: inherit; cursor: pointer;
  text-decoration: underline; text-align: left; }
.cc-bulk__acts { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; }
.cc-bulk__acts button { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .18); border-radius: 9px; padding: 8px 12px;
  font: 600 .86rem inherit; font-family: inherit; cursor: pointer; white-space: nowrap; transition: background .15s; }
.cc-bulk__acts button:hover { background: rgba(255, 255, 255, .1); }
.cc-bulk__acts button.cc-bulk__del { color: #ffb4b4; border-color: rgba(255, 140, 140, .35); }
.cc-bulk__x { background: none; border: 0; color: #fff; opacity: .7; font-size: 1rem; cursor: pointer; padding: 8px 10px; }
.cc-bulk__x:hover { opacity: 1; }
body.cc-has-bulk .content { padding-bottom: 110px; }

/* модальні вікна */
.cc-dlg { width: min(420px, calc(100vw - 32px)); border: 0; border-radius: 14px; padding: 22px; color: #1f1f1f; background: #fff;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .25); font-family: "Manrope", "Inter", system-ui, sans-serif; }
.cc-dlg::backdrop { background: rgba(20, 20, 24, .45); }
.cc-dlg h3 { margin: 0 0 14px; font-size: 1.1rem; }
.cc-dlg p { margin: 0 0 14px; color: #555; line-height: 1.5; }
.cc-dlg__foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.cc-dlg .cc-btn--line { background: #fff; color: #1f1f1f !important; border: 1px solid #d1d5db; }
.cc-dlg input[type=text], .cc-dlg select { width: 100%; min-height: 40px; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 8px;
  font: inherit; background: #fff; color: #1f1f1f; }
.cc-dlg input[type=radio], .cc-dlg input[type=checkbox] { accent-color: #3d3d3d; width: 17px; height: 17px; }
.cc-radios { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.cc-radios--row { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
.cc-radios label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .94rem; }
.cc-dlg .cc-field, .cc-dlg .cc-check { margin-bottom: 12px; }

/* порожній стан */
.cc-empty { text-align: center; padding: 48px 20px; border: 1px dashed var(--cc-line-2); border-radius: 14px; background: #fff;
  display: grid; justify-items: center; gap: 12px; }
.cc-empty p { margin: 0; color: var(--cc-ink-2); }
.cc-empty--big { padding: 72px 20px; }
.cc-empty__title { font-size: 1.25rem; font-weight: 700; color: var(--cc-ink) !important; }
.cc-empty__acts { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; margin-top: 6px; }

/* поля форм */
.cc-field { display: grid; gap: 6px; margin-bottom: 14px; align-content: start; }
.cc-field > label, .cc-field__label { font-weight: 600; font-size: .88rem; }
.cc-field > label i { color: var(--cc-red); font-style: normal; }
.cc-field small, .cc-hint { color: var(--cc-ink-2); font-size: .8rem; line-height: 1.45; display: block; }
.cc-hint { margin: 6px 0 0; }
.cc-count { color: var(--cc-ink-2); font-weight: 500; font-size: .78rem; float: right; }
.cc-field.is-err input, .cc-field.is-err select, .cc-field.is-err textarea { border-color: var(--cc-red); }
.cc-err { color: var(--cc-red); font-size: .82rem; display: block; }
.cc-check { display: flex; align-items: center; gap: 9px; margin-bottom: 10px; cursor: pointer; font-size: .94rem; }
.cc-alert { margin: 0 0 14px; padding: 11px 14px; border-radius: 10px; background: #fde8e8; color: #9b2c2c; font-size: .92rem; grid-column: 1 / -1; }
.cc-row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }

/* перемикач «Показувати на сайті» */
.cc-switch { display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 600; margin-bottom: 16px; }
.cc-switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cc-switch__ui { width: 40px; height: 22px; border-radius: 999px; background: #cfd3da; position: relative; transition: background .2s; flex: none; }
.cc-switch__ui::after { content: ""; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .2); transition: transform .2s; }
.cc-switch input:checked + .cc-switch__ui { background: var(--cc-green); }
.cc-switch input:checked + .cc-switch__ui::after { transform: translateX(18px); }
.cc-switch input:focus-visible + .cc-switch__ui { outline: 2px solid var(--cc-green); outline-offset: 2px; }

/* картка товару: секції ліворуч, липка колонка праворуч */
.cc-card-form { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.cc-card-form__side { position: sticky; top: 16px; display: grid; gap: 12px; }
.cc-sec { background: #fff; border: 1px solid var(--cc-line); border-radius: 12px; padding: 20px; margin-bottom: 16px; }
.cc-card-form__side .cc-sec { margin-bottom: 0; }
.cc-sec h2 { margin: 0 0 16px; font-size: 1.05rem; font-weight: 700; color: var(--cc-ink); display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.cc-sec h2 small { font-weight: 500; font-size: .82rem; color: var(--cc-ink-2); }
.cc-sec h3 { margin: 4px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; color: var(--cc-ink-2); }
.cc-sec--fold > summary { list-style: none; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }
.cc-sec--fold > summary::-webkit-details-marker { display: none; }
.cc-sec--fold > summary h2 { margin: 0; }
.cc-sec--fold > summary h2::after { content: "▾"; font-size: .9rem; color: var(--cc-ink-2); margin-left: auto; transition: transform .2s; }
.cc-sec--fold[open] > summary h2::after { transform: rotate(180deg); }
.cc-sec--fold > summary small { color: var(--cc-ink-2); font-size: .82rem; }
.cc-sec--fold[open] > summary { margin-bottom: 16px; }
.cc-side-actions { display: grid; gap: 8px; }
.cc-side-actions__more { display: flex; justify-content: space-between; gap: 8px; padding: 4px 2px; }

/* фото товару */
.cc-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; border-radius: 10px; }
.cc-photos.is-over { outline: 2px dashed var(--cc-green); outline-offset: 4px; }
.cc-photo { position: relative; margin: 0; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: var(--cc-soft);
  border: 1px solid var(--cc-line); cursor: grab; }
.cc-photo img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.cc-photo:first-child::before { content: "Головне"; position: absolute; left: 6px; top: 6px; z-index: 1; padding: 2px 7px; border-radius: 6px;
  background: rgba(31, 31, 31, .82); color: #fff; font-size: .7rem; font-weight: 700; }
.cc-photo--new::after { content: "нове"; position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px; background: var(--cc-green);
  color: #fff; font-size: .68rem; font-weight: 700; }
.cc-photo.is-drag { opacity: .4; }
.cc-photo__x { position: absolute; right: 6px; top: 6px; width: 26px; height: 26px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .92);
  color: #1f1f1f; cursor: pointer; font-size: .8rem; box-shadow: 0 1px 3px rgba(0, 0, 0, .2); }
.cc-photo__x:hover { background: #fff; color: var(--cc-red); }
.cc-photos__add { aspect-ratio: 1; display: grid; place-content: center; justify-items: center; gap: 2px; border: 1.5px dashed var(--cc-line-2);
  border-radius: 10px; color: var(--cc-ink-2); font-size: .82rem; font-weight: 600; cursor: pointer; text-align: center; position: relative; }
.cc-photos__add:hover { border-color: var(--cc-dark); color: var(--cc-ink); }
.cc-photos__add span { font-size: 1.6rem; line-height: 1; }
.cc-photos__add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cc-photos__add[hidden] { display: none; }

/* варіанти */
.cc-vars { width: 100%; border-collapse: collapse; font-size: .9rem; }
.cc-vars th { text-align: left; font-size: .78rem; font-weight: 600; color: #9ca3af; padding: 10px 8px; border-bottom: 1px solid var(--cc-line); white-space: nowrap; }
.cc-vars td { padding: 6px 4px; border-bottom: 1px solid var(--cc-line); }
.cc-vars tr:last-child td { border-bottom: 0; }
.cc-vars td:first-child { padding-left: 8px; min-width: 140px; }
.cc-vars td.c { text-align: center; }
.cc-vars input[type=text], .cc-vars input[type=number] { min-width: 76px; min-height: 36px; padding: 6px 9px; }
.cc-sec .cc-tablewrap { border-radius: 10px; }
.cc-del { display: inline-flex; align-items: center; gap: 4px; color: var(--cc-ink-2); cursor: pointer; font-size: .8rem; }
.cc-del:has(input:checked) { color: var(--cc-red); font-weight: 700; }

/* прев'ю сніпета Google */
.cc-snippet { display: grid; gap: 3px; padding: 14px 16px; margin-bottom: 16px; border: 1px solid var(--cc-line); border-radius: 10px;
  background: #fafafb; font-family: Arial, sans-serif; }
.cc-snippet__url { color: #188038; font-size: .82rem; word-break: break-all; }
.cc-snippet__title { color: #1a0dab; font-size: 1.12rem; line-height: 1.3; }
.cc-snippet__desc { color: #4d5156; font-size: .86rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* категорії: дерево ліворуч, форма праворуч */
.cc-cats { display: grid; grid-template-columns: minmax(260px, 360px) minmax(0, 1fr); gap: 18px; align-items: start; }
.cc-tree { background: var(--cc-soft); border-radius: 12px; padding: 12px; position: sticky; top: 16px; }
.cc-tree__list { list-style: none; margin: 0; padding: 0; }
.cc-tree__list--sub { padding-left: 18px; }
.cc-tree li.is-closed > .cc-tree__list { display: none; }
.cc-tree li.is-closed > .cc-tree__row .cc-tree__tg { transform: rotate(-90deg); }
.cc-tree li.is-drag { opacity: .45; }
.cc-tree__row { display: flex; align-items: center; gap: 4px; padding: 5px 6px; border-radius: 8px; cursor: grab; }
.cc-tree__row:hover { background: rgba(255, 255, 255, .7); }
.cc-tree__row.on { background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
.cc-tree__row.on .cc-tree__name { font-weight: 700; }
.cc-tree__row.is-off .cc-tree__name { color: #9ca3af; }
.cc-tree__tg { width: 20px; height: 20px; flex: none; border: 0; background: none; padding: 0; color: var(--cc-ink-2); cursor: pointer;
  font-size: .8rem; transition: transform .15s; }
.cc-tree__name { flex: 1; min-width: 0; text-decoration: none; font-size: .94rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-tree__n { font-size: .76rem; color: var(--cc-ink-2); min-width: 18px; text-align: right; }
.cc-tree__act { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; text-decoration: none; color: var(--cc-ink-2);
  opacity: 0; transition: opacity .15s, background .15s; }
.cc-tree__row:hover .cc-tree__act, .cc-tree__row.on .cc-tree__act, .cc-tree__act:focus-visible { opacity: 1; }
.cc-tree__act:hover { background: var(--cc-soft-2); color: var(--cc-ink); }
.cc-tree__none { display: flex; justify-content: space-between; margin-top: 8px; padding: 6px 10px 6px 30px; border-top: 1px solid var(--cc-soft-2);
  text-decoration: none; font-size: .9rem; color: var(--cc-ink-2); }
.cc-tree__none span { font-size: .76rem; }
.cc-tree__empty { margin: 8px; color: var(--cc-ink-2); }
.cc-tree .cc-hint { padding: 8px 8px 2px; }
.cc-catform .cc-sec { margin-bottom: 10px; }
.cc-catform__head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.cc-catform__count { font-size: .88rem; font-weight: 600; color: var(--cc-ink-2) !important; text-decoration: none; }
.cc-catform__count:hover { color: var(--cc-ink) !important; }
.cc-catform__url { margin: -6px 0 14px; }
.cc-catform__img { max-width: 160px; border-radius: 8px; display: block; }
.cc-catform__foot { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.cc-catform__del { padding: 4px 4px 0; }
.cc-fold { border-top: 1px solid var(--cc-line); border-bottom: 1px solid var(--cc-line); margin: 4px 0 14px; padding: 10px 0; }
.cc-fold > summary { cursor: pointer; font-weight: 600; font-size: .9rem; }
.cc-fold[open] > summary { margin-bottom: 12px; }

/* імпорт */
.cc-steps { list-style: none; display: flex; gap: 8px; margin: 0 0 16px; padding: 0; counter-reset: st; flex-wrap: wrap; }
.cc-steps li { counter-increment: st; display: flex; align-items: center; gap: 8px; padding: 6px 14px 6px 6px; border-radius: 999px;
  background: var(--cc-soft); color: var(--cc-ink-2); font-weight: 600; font-size: .88rem; }
.cc-steps li::before { content: counter(st); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: #fff; font-size: .8rem; }
.cc-steps li.on { background: var(--cc-dark); color: #fff; }
.cc-steps li.on::before { color: var(--cc-ink); }
.cc-steps li.done::before { content: "✓"; background: var(--cc-green); color: #fff; }
.cc-import { max-width: 980px; }
.cc-drop { display: grid; justify-items: center; gap: 4px; padding: 40px 20px; border: 1.5px dashed var(--cc-line-2); border-radius: 12px;
  background: #fafafb; cursor: pointer; text-align: center; position: relative; transition: border-color .2s, background .2s; }
.cc-drop:hover, .cc-drop.is-over { border-color: var(--cc-green); background: #f1f6f0; }
.cc-drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.cc-drop span { color: var(--cc-ink-2); font-size: .88rem; }
.cc-import__tips { margin: 14px 0 6px; padding-left: 20px; color: #4b5563; font-size: .9rem; line-height: 1.7; }
.cc-table--map th { vertical-align: top; min-width: 160px; }
.cc-table--map td { font-size: .86rem; color: #4b5563; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
.cc-map__title { display: block; margin-bottom: 6px; color: var(--cc-ink); font-size: .84rem; }
.cc .cc-table--map .cc-select { min-width: 150px; width: 100%; font-size: .84rem; min-height: 34px; padding: 5px 8px; }
.cc-table--map .cc-select.is-set { border-color: var(--cc-green); background: #f1f6f0; }
.cc-opts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.cc-opts h2 { grid-column: 1 / -1; margin-bottom: 0; }
.cc-opts fieldset { border: 1px solid var(--cc-line); border-radius: 10px; padding: 12px 14px; margin: 0; display: grid; gap: 8px; }
.cc-opts legend { font-weight: 700; font-size: .88rem; padding: 0 4px; }
.cc-opts label { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: .92rem; }
.cc-report__nums { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 18px; }
.cc-report__nums div { background: var(--cc-soft); border-radius: 10px; padding: 14px 16px; display: grid; gap: 2px; }
.cc-report__nums b { font-size: 1.6rem; line-height: 1.1; }
.cc-report__nums span { color: var(--cc-ink-2); font-size: .86rem; }
.cc-report__nums .bad { background: #fde8e8; }
.cc-report__nums .bad b { color: #b23131; }
.cc-table--errors { border: 1px solid var(--cc-line); border-radius: 10px; margin-bottom: 12px; }

@media (max-width: 1080px) {
  .cc-card-form { grid-template-columns: minmax(0, 1fr); }
  .cc-card-form__side { position: static; }
  .cc-cats { grid-template-columns: minmax(0, 1fr); }
  .cc-tree { position: static; }
}
@media (max-width: 640px) {
  .cc-row3, .cc-opts { grid-template-columns: minmax(0, 1fr); }
  .cc-head__tools { width: 100%; }
  .cc .cc-select { min-width: 0; flex: 1 1 160px; }
  .cc-bulk { left: 8px; right: 8px; transform: none; bottom: 8px; flex-wrap: wrap; gap: 8px; padding: 10px; }
  .cc-bulk__acts { width: 100%; order: 3; }
  .cc-bulk__x { margin-left: auto; }
  .cc-sec { padding: 16px; }
  .cc-table td, .cc-table th { padding: 9px 8px; }
  .cc-tree__act { opacity: 1; }
  /* варіанти на телефоні — картка на рядок (2 колонки з підписами), а не таблиця, обрізана справа */
  .cc-vars thead { display: none; }
  .cc-vars, .cc-vars tbody { display: block; }
  .cc-vars tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--cc-line); }
  .cc-vars tr:last-child { border-bottom: 0; }
  .cc-vars td, .cc-vars td:first-child { display: grid; gap: 4px; padding: 0; border: 0; min-width: 0; text-align: left; }
  .cc-vars td:first-child { grid-column: 1 / -1; }
  .cc-vars td[data-l]::before { content: attr(data-l); font-size: .75rem; font-weight: 600; color: #9ca3af; }
  .cc-vars td.c { display: flex; align-items: center; gap: 8px; }
  .cc-vars td.c::before { order: 2; }
  .cc-vars input[type=text], .cc-vars input[type=number] { min-width: 0; width: 100%; }
}

/* Фільтри й сортування */
.cf-lead { margin: 0 0 16px; max-width: 720px; }
.cf-cols { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 16px; align-items: start; }
.cf-h { margin: 0 0 12px; font-size: 1.05rem; }
.cf-values { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 2px; max-height: 320px; overflow-y: auto; }
.cf-values li { display: flex; align-items: center; gap: 8px; padding: 5px 2px; border-bottom: 1px solid var(--cc-line); }
.cf-values li > span { font-weight: 600; }
.cf-values li > small { margin-right: auto; }
.cf-x { flex: none; width: 26px; height: 26px; border: 0; border-radius: 6px; background: none; color: var(--cc-ink-2); cursor: pointer; }
.cf-x:hover { background: var(--cc-soft); color: var(--cc-red); }
.cf-inline { display: contents; }
.cf-foot { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: start; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--cc-line); }
.cf-note { display: block; margin-top: 2px; max-width: 420px; }
.cf-gap { margin-top: 14px; }
.cf-pick { border: 0; margin: 0 0 10px; padding: 0; }
.cf-pick legend { font-weight: 600; font-size: .88rem; padding: 0; margin-bottom: 4px; }
@media (max-width: 900px) { .cf-cols { grid-template-columns: minmax(0, 1fr); } }
