/* «Продажи» / «Обращения» in the sidebar and «Пометки» of inquiries (2026-11-09). */
.workspace-nav-count { min-width: 18px; height: 18px; margin-left: auto; padding: 0 5px; border-radius: 9px; background: #e95a1b; color: #fff; font-size: 10px; font-weight: 800; line-height: 18px; text-align: center; }
.workspace-nav-count.is-inquiries { background: #3d7dd8; }
.workspace-nav-count + .nav-dot { margin-left: 6px; }

/* Label chips. Colours keep 4.5:1 text contrast on their tint. */
.inq-label { display: inline-flex; align-items: center; max-width: 160px; height: 20px; padding: 0 7px; border: 1px solid var(--inq-border, #c9d2d5); border-radius: 10px; background: var(--inq-bg, #eef2f3); color: var(--inq-fg, #3f4d52); font-size: 11px; font-weight: 650; line-height: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inq-label.is-archived { border-style: dashed; opacity: 0.85; }
.inq-label.is-none { --inq-bg: #fff; --inq-border: #d5dcde; --inq-fg: #5d6d72; font-weight: 600; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-red { --inq-bg: #fde8e6; --inq-border: #f2b8b2; --inq-fg: #a12a22; --inq-solid: #d64235; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-orange { --inq-bg: #fdeee2; --inq-border: #f3c39d; --inq-fg: #9c4410; --inq-solid: #e9781f; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-yellow { --inq-bg: #fbf3d2; --inq-border: #e8d27b; --inq-fg: #6f5a05; --inq-solid: #e1b912; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-green { --inq-bg: #e3f4e6; --inq-border: #a9d8b1; --inq-fg: #24693a; --inq-solid: #3a9a55; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-teal { --inq-bg: #def3f1; --inq-border: #9fd6d0; --inq-fg: #17645d; --inq-solid: #23a093; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-blue { --inq-bg: #e4eefb; --inq-border: #aac6ee; --inq-fg: #234f8f; --inq-solid: #3d7dd8; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-purple { --inq-bg: #efe8f8; --inq-border: #cdb8ea; --inq-fg: #5a3592; --inq-solid: #7a4fc0; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-pink { --inq-bg: #fbe6f0; --inq-border: #efb5cf; --inq-fg: #94275a; --inq-solid: #d4498a; }
:is(.inq-label, .inq-label-toggle, .inq-swatch).is-gray { --inq-bg: #eef1f2; --inq-border: #cbd3d6; --inq-fg: #4b585c; --inq-solid: #8a979b; }

/* In the list: chips above the topic. */
.ow-topic .inq-labels { display: flex; flex-wrap: wrap; gap: 4px; max-width: 100%; margin-bottom: 4px; overflow: visible; white-space: normal; }
.ow-topic .inq-labels .inq-label { display: inline-flex; max-width: 140px; color: var(--inq-fg, #3f4d52); font-weight: 650; }

/* Filter bar under the toolbar. */
.inq-label-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 10px; padding: 8px 10px; border: 1px solid #e1e8e9; border-radius: 8px; background: #fbfcfc; }
.inq-label-bar__title { display: inline-flex; align-items: center; gap: 5px; margin-right: 2px; color: #5d6d72; font-size: 12px; font-weight: 700; }
.inq-label-bar__title svg { width: 14px; height: 14px; }
.inq-filter { display: inline-flex; align-items: center; gap: 5px; padding: 2px 6px 2px 2px; border: 1px solid transparent; border-radius: 13px; background: transparent; font: inherit; cursor: pointer; }
.inq-filter b { min-width: 14px; color: #5d6d72; font-size: 11px; font-weight: 700; }
.inq-filter:hover { border-color: #d5dcde; background: #fff; }
.inq-filter[aria-pressed="true"] { border-color: #26383e; background: #fff; box-shadow: 0 0 0 1px #26383e; }
.inq-filter:focus-visible { outline: 2px solid #c9470a; outline-offset: 1px; }
.inq-label-edit { margin-left: auto; }
.inq-label-edit svg { width: 14px; height: 14px; }

/* Picker in the inquiry card. */
.inquiry-labels-field { margin: 0; padding: 0; border: 0; min-width: 0; }
.inquiry-labels-field legend { margin-bottom: 6px; padding: 0; color: #33474d; font-size: 13px; font-weight: 600; }
.inq-label-picker { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.inq-label-toggle { position: relative; display: inline-flex; cursor: pointer; }
.inq-label-toggle input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.inq-label-toggle span { display: inline-flex; align-items: center; gap: 5px; height: 28px; padding: 0 11px; border: 1px solid var(--inq-border, #cbd3d6); border-radius: 14px; background: #fff; color: var(--inq-fg, #4b585c); font-size: 12px; font-weight: 650; }
.inq-label-toggle span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--inq-solid, #8a979b); }
.inq-label-toggle input:checked + span { border-color: var(--inq-solid, #8a979b); background: var(--inq-bg, #eef1f2); box-shadow: inset 0 0 0 1px var(--inq-solid, #8a979b); }
.inq-label-toggle input:checked + span::after { content: "✓"; font-size: 11px; }
.inq-label-toggle input:focus-visible + span { outline: 2px solid #c9470a; outline-offset: 2px; }
.inq-label-toggle.is-archived span { border-style: dashed; }
.inq-label-picker__edit { width: 28px; height: 28px; padding: 5px; }

/* Editor dialog. */
.inq-labels-dialog { width: min(720px, calc(100vw - 32px)); }
.inq-labels-body { display: grid; gap: 12px; padding: 14px 18px; max-height: 62vh; overflow: auto; }
.inq-labels-body > .button { justify-self: start; }
.inq-labels-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.inq-labels-row { display: grid; grid-template-columns: 120px minmax(120px, 1fr) auto 52px repeat(3, 34px); align-items: center; gap: 8px; padding: 8px; border: 1px solid #e1e8e9; border-radius: 8px; background: #fff; }
.inq-labels-row input[type="text"] { min-height: 34px; padding: 6px 9px; border: 1px solid #cdd7d9; border-radius: 8px; font: inherit; font-size: 13px; }
.inq-labels-row__used { color: #6b7c81; font-size: 11px; white-space: nowrap; }
.inq-swatches { display: flex; gap: 3px; }
.inq-swatch { width: 18px; height: 18px; padding: 0; border: 2px solid #fff; border-radius: 50%; background: var(--inq-solid); box-shadow: 0 0 0 1px #cbd3d6; cursor: pointer; }
.inq-swatch[aria-checked="true"] { box-shadow: 0 0 0 2px #26383e; }
.inq-swatch:focus-visible { outline: 2px solid #c9470a; outline-offset: 2px; }
.inq-labels-hidden summary { color: #5d6d72; font-size: 13px; font-weight: 600; cursor: pointer; }
.inq-labels-hidden ul { display: grid; gap: 6px; margin: 8px 0 0; padding: 0; list-style: none; }
.inq-labels-hidden li { display: flex; align-items: center; gap: 10px; }
.inq-labels-hidden li .button { margin-left: auto; }

@media (max-width: 720px) {
  .inq-label-bar { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: thin; }
  .inq-label-bar > * { flex: 0 0 auto; }
  .inq-labels-row { grid-template-columns: minmax(0, 1fr) repeat(3, 34px); }
  .inq-labels-row > .inq-label { grid-column: 1 / -1; justify-self: start; }
  .inq-labels-row input[type="text"] { grid-column: 1 / -1; }
  .inq-swatches { grid-column: 1 / -1; flex-wrap: wrap; }
  .inq-swatch { width: 26px; height: 26px; }
  .inq-labels-row__used { grid-column: 1; }
}
.inq-labels-row > .inq-label { justify-self: start; max-width: 120px; }

/* Automatic marks: same colours, dotted border and a small ring so they read as «set by the system». */
.inq-label.is-auto { border-style: dotted; border-width: 1.5px; }
.inq-label.is-auto::before { content: ""; width: 6px; height: 6px; margin-right: 4px; flex: 0 0 6px; border: 1.5px solid currentColor; border-radius: 50%; }
.inq-label-bar__sep { width: 1px; height: 20px; margin: 0 4px; background: #d5dcde; }
.inq-auto-line { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0 0 8px; color: #5d6d72; font-size: 12px; }
.inq-labels-auto { display: grid; gap: 8px; padding: 12px; border: 1px solid #e1e8e9; border-radius: 8px; background: #fbfcfc; }
.inq-labels-auto h3 { margin: 0; font-size: 14px; }
.inq-labels-auto > p { margin: 0; color: #6b7c81; font-size: 12px; }
.inq-labels-auto__row { display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 8px; font-size: 12px; cursor: pointer; }
.inq-labels-auto__row small { color: #6b7c81; font-weight: 400; }
@media (max-width: 720px) { .inq-labels-auto__row { grid-template-columns: auto minmax(0, 1fr); } .inq-labels-auto__row small { grid-column: 2; } }
