/* «Качество заказов по клиентам» поверх каркаса screen_frame.css (ADR-0364): только токены темы. */
.ocq-screen { min-width: 0; }
.ocq-screen .sf-filters .dp { min-width: 180px; }
.ocq-screen .sf-btn[aria-pressed=true] { background: var(--blue-wash); border-color: var(--blue); color: var(--blue-deep); font-weight: 600; }
.ocq-screen .sf-btn:disabled { opacity: .5; cursor: default; }
.ocq-scope { margin: -4px 0 0; }
.ocq-summary { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ocq-meta { display: flex; flex-direction: column; gap: 8px; }
.ocq-meta:empty { display: none; }
.ocq-meta .sf-status { margin: 0; }
.ocq-failed { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.ocq-validation { color: var(--err); font-size: 13px; }
.ocq-validation:empty { display: none; }
.ocq-screen a { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.ocq-screen a:hover { text-decoration-thickness: 2px; }
.ocq-table-wrap:focus-visible, .ocq-screen a:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

/* Таблица клиентов: ширины колонок заданы, чтобы причины и сделки не сжимались в столбик. */
.ocq-table-wrap { container-type: inline-size; }
.ocq-summary > .ocq-table-wrap > .sf-table { min-width: 1120px; table-layout: fixed; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th { white-space: normal; line-height: 1.35; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(1) { width: 230px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(2) { width: 84px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(3) { width: 150px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(4) { width: 96px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(5) { width: 76px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(6) { width: 84px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(7) { width: 76px; }
.ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(8) { width: 90px; }
.ocq-summary > .ocq-table-wrap > .sf-table > tbody > .ocq-client-row > td:first-child { min-width: 0; max-width: none; }
.ocq-table-wrap td { overflow-wrap: anywhere; }
.ocq-reasons p { margin: 0 0 4px; }
.ocq-reasons p:last-child { margin-bottom: 0; }
.ocq-client-row > td:first-child { color: var(--blue-deep); font-weight: 600; }
.ocq-client-row > td.ocq-defective { color: var(--err); font-weight: 700; }
.ocq-client-row > td.ocq-reasons { color: var(--warn); }
.ocq-client-row.ocq-expanded > td { background: var(--blue-wash); }
.ocq-company { display: flex; align-items: flex-start; gap: 8px; }
.ocq-company-name { min-width: 0; padding-top: 6px; overflow-wrap: break-word; }
.ocq-deals { display: flex; flex-wrap: wrap; gap: 2px 10px; align-items: baseline; }
.ocq-deal { white-space: nowrap; }
.ocq-deals-more { color: var(--ink-2); white-space: nowrap; }
.ocq-expander { flex: none; min-width: 32px; padding: 4px; color: var(--blue); font-size: 14px; line-height: 1; }
.ocq-expander[aria-expanded=true] { background: var(--blue-deep); border-color: var(--blue-deep); color: var(--surface); }
.ocq-expander[aria-expanded=true]:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

/* Заказы клиента — строка под клиентом на всю ширину, сама не закреплена. */
.sf-table.sf-sticky > tbody > .ocq-inline-row > td:first-child { position: static; min-width: 0; max-width: none; padding: 0; background: var(--blue-wash); box-shadow: none; }
.ocq-inline-detail { box-sizing: border-box; position: sticky; left: 0; width: 100cqw; min-width: 0; padding: 16px 20px; border-left: 3px solid var(--blue); display: flex; flex-direction: column; gap: 8px; }
.ocq-inline-detail h3 { margin: 0; color: var(--blue-deep); font-size: 15px; line-height: 1.4; }
.ocq-inline-detail .sf-status { margin: 0; }
.ocq-inline-detail .sf-table { min-width: 620px; }
.ocq-inline-detail .sf-state { padding: 20px 16px; }

.ocq-pagination { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: flex-end; color: var(--ink-2); font-size: 13px; }

@media (max-width: 700px) {
  .ocq-screen .sf-filters .dp { min-width: 0; }
  .ocq-screen .sf-filters > .sf-field { flex: 1 1 140px; }
  .ocq-screen .sf-filters-side .sf-btn { flex: 1 1 100%; white-space: normal; text-align: center; }
  /* Телефон: компания закреплена узкой колонкой, остальные уже, чем на ПК. */
  .ocq-summary > .ocq-table-wrap > .sf-table { min-width: 880px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(1) { width: 172px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(2) { width: 64px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(3) { width: 110px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(4) { width: 80px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(5) { width: 64px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(6) { width: 72px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(7) { width: 64px; }
  .ocq-summary > .ocq-table-wrap > .sf-table > thead > tr > th:nth-child(8) { width: 76px; }
  .ocq-company { gap: 6px; }
  .ocq-expander { min-width: 28px; }
  .ocq-inline-detail { padding: 12px; }
  .ocq-pagination { justify-content: flex-start; gap: 8px; }
}
.ocq-client-row > td:first-child .ocq-why { margin: 4px 0 0 40px; font-weight: 400; color: var(--ink-2); }
@media (max-width: 700px) { .ocq-client-row > td:first-child .ocq-why { margin-left: 34px; } }
