/* Стили: вторая половина стилей кабинета (карта разбора, док, мобильный вид).
 * Вынесено из office.css дословно (резка 2026-10-18, tools/split_css.py office); подключается сразу за ним — порядок каскада тот же. */
    /* Компактные колонки + канон центра как в админке склада */
    .cars-table th:nth-child(1),
    .cars-table td:nth-child(1),
    .cars-table th:nth-child(2),
    .cars-table td:nth-child(2),
    .cars-table th:nth-child(n+4),
    .cars-table td:nth-child(n+4) {
      white-space: nowrap;
      padding-left: 6px;
      padding-right: 6px;
      text-align: center;
    }
    .cars-table .cell-date {
      color: var(--muted);
      font-variant-numeric: tabular-nums;
      font-size: 0.82rem;
      text-align: center;
    }
    .cars-table th:nth-child(3),
    .cars-table td:nth-child(3) {
      width: 28%;
      text-align: left; /* описание машины / детали */
    }
    .cars-table th.th-part-photo,
    .cars-table td.cell-part-photo {
      width: 56px;
      min-width: 56px;
      max-width: 64px;
      padding-left: 4px;
      padding-right: 4px;
      text-align: center;
      vertical-align: middle;
    }
    .cars-table td.cell-part-photo img {
      width: 48px;
      height: 36px;
      border-radius: 6px;
      object-fit: cover;
      display: inline-block;
      background: #e8edf2;
      vertical-align: middle;
    }
    .cars-table td.cell-part-photo .part-ph {
      color: #94a3b8;
      font-size: 0.78rem;
    }
    .part-photo-btn {
      position: relative;
      appearance: none;
      border: 0;
      padding: 0;
      margin: 0;
      background: transparent;
      cursor: zoom-in;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      line-height: 0;
    }
    .part-photo-btn.is-empty {
      cursor: default;
    }
    .part-photo-btn--inline {
      flex: 0 0 auto;
    }
    .part-photo-btn--inline img,
    .cell-car .part-photo-btn img {
      width: 64px;
      min-width: 64px;
      height: 48px;
      border-radius: 7px;
      object-fit: cover;
      background: #e8edf2;
    }
    .pwa-car-media.part-photo-btn {
      width: 100%;
      height: 100%;
      border-radius: inherit;
      overflow: hidden;
    }
    .part-photo-n {
      position: absolute;
      right: 3px;
      bottom: 3px;
      min-width: 1.1rem;
      height: 1.1rem;
      padding: 0 4px;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.78);
      color: #fff;
      font-size: 0.65rem;
      font-weight: 700;
      line-height: 1.1rem;
      text-align: center;
    }
    .cars-table .cell-car {
      display: flex;
      align-items: center;
      justify-content: flex-start;
      gap: 10px;
      width: 100%;
      max-width: 100%;
      margin: 0;
      box-sizing: border-box;
      text-align: left;
    }
    .cars-table .cell-car img,
    .cars-table .cell-car .car-ph {
      width: 64px;
      min-width: 64px;
      height: 48px;
      border-radius: 7px;
      object-fit: cover;
      background: #e8edf2;
      flex: 0 0 64px;
      display: block;
    }
    .cars-table .cell-title {
      font-weight: 750;
      font-size: 0.92rem;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 100%;
      text-align: left;
    }
    .cars-table .cell-vin {
      font-size: 0.72rem;
      color: var(--muted);
      font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
      margin-top: 2px;
      white-space: nowrap;
      text-align: left;
    }
    .cars-table .cell-car > div {
      min-width: 0;
      flex: 1;
      text-align: left;
    }
    .cars-table .cell-car .sale-brand-line {
      text-align: left;
    }
    .cars-table .cell-lot {
      font-weight: 400;
      vertical-align: middle;
      text-align: center;
    }
    .cars-table .lot-stack {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 3px;
      line-height: 1.15;
    }
    .cars-table .lot-num {
      font-weight: 400;
      font-variant-numeric: tabular-nums;
      color: var(--ink);
      font-size: 0.82rem;
    }
    /* Как buyer-acc-chip в админке: C / I в квадрате */
    .cars-table .auction-mark {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      min-width: 1.15rem;
      height: 1.15rem;
      padding: 0 3px;
      box-sizing: border-box;
      border-radius: 3px;
      box-shadow: 0 0 0 1.5px currentColor;
      font-size: 0.78rem;
      font-weight: 900;
      letter-spacing: 0.01em;
      line-height: 1;
      user-select: none;
    }
    .cars-table .auction-mark--copart {
      color: #2662D9;
    }
    .cars-table .auction-mark--iaai {
      color: #C90107;
    }
    .cars-table .cell-meta { color: var(--muted); font-size: 0.78rem; text-align: center; }
    .cars-table .cell-yard {
      vertical-align: middle;
      text-align: center;
    }
    .cars-table .cell-yard-stack {
      display: inline-flex;
      flex-direction: column;
      align-items: center;
      gap: 4px;
    }
    .cars-table .cell-money,
    .cars-table .cell-status {
      text-align: center;
    }
    .cars-table .cell-dc,
    .cars-table .cell-code,
    .cars-table .cell-container {
      text-align: center;
      vertical-align: middle;
    }
    .cars-table .cell-code {
      white-space: nowrap;
    }
    .cars-table td.cell-container {
      /* td. — сильнее «nowrap» компактных колонок (nth-child(n+4)); длинный номер (BASIC-BDAD-C1) переносится,
         а не налезает на «Смету» (находка t105, 21.10) */
      white-space: normal;
      overflow-wrap: anywhere;
      line-height: 1.25;
    }
    .cars-table .cell-code,
    .cars-table .cell-container {
      font-weight: 800;
      font-variant-numeric: tabular-nums;
      letter-spacing: 0.02em;
    }
    .cars-table .cell-container .cell-ctr-line {
      display: block;
    }
    .cars-table .cell-container .cell-ctr-line--book {
      font-weight: 650;
      font-size: 0.85em;
      color: var(--muted);
    }
    .cars-table .card-ico {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 1.85rem;
      height: 1.85rem;
      padding: 0;
      border: 0;
      border-radius: 7px;
      background: transparent;
      color: #dc2626;
      cursor: pointer;
    }
    .cars-table .card-ico.is-idle {
      color: #94a3b8;
      cursor: pointer;
    }
    .cars-table .card-ico.is-wait {
      color: #a16207;
      background: #fde047;
      box-shadow:
        0 0 0 2px #facc15,
        0 0 10px rgba(250, 204, 21, 0.85);
    }
    .cars-table .card-ico.is-wait:hover {
      background: #facc15;
      box-shadow:
        0 0 0 2px #eab308,
        0 0 14px rgba(234, 179, 8, 0.95);
    }
    .cars-table .card-ico.is-ok { color: #16a34a; }
    .cars-table .card-ico.is-miss { color: #dc2626; }
    .cars-table .card-ico svg {
      width: 1.25rem;
      height: 1.25rem;
      display: block;
    }
    .cars-table .expand-row td {
      padding: 0;
      background: #f8fafc;
      border-bottom: 1px solid var(--line);
      /* Не раздувать таблицу шире экрана содержимым раскрытия */
      width: 100%;
    }
    .cars-table .expand-row .detail {
      border-top: 2px solid #cbd5e1;
      max-height: min(78vh, 920px);
      overflow-x: hidden;
      overflow-y: auto;
      padding: 10px 14px 20px;
      width: 0;
      min-width: 100%;
      max-width: 100%;
      box-sizing: border-box;
    }
    .cars-table .empty-row td {
      padding: 40px 12px;
      text-align: center;
      color: var(--muted);
    }
    @media (max-width: 860px) {
      .table-wrap { padding: 8px; }
      .finance-panel.is-tab-mode:not([hidden]) {
        display: block !important;
      }
      .finance-btn {
        display: none !important;
      }
      .filters-side {
        width: 100%;
        margin-left: 0;
        justify-content: space-between;
      }
      .filters-side .env-release,
      .filters-side .pill {
        display: none !important;
      }
      .cars-table thead { display: none; }
      .cars-table tbody tr.car-row td {
        display: block;
        border-bottom: 0;
        padding: 4px 12px;
      }
      .cars-table tbody tr.car-row td:first-child { padding-top: 12px; }
      .cars-table tbody tr.car-row td:last-child {
        padding-bottom: 12px;
        border-bottom: 1px solid var(--line);
      }
    }
    .map-stage { display: none !important; }
    .dismantle-dock {
      width: 100%;
      background: var(--card);
      border-top: 2px solid #cbd5e1;
      padding: 16px 18px 48px;
    }
    .dismantle-dock:empty { display: none; }
    /*
      Раскрытие машины — на всю ширину. Карта разбора — в том же detail, без map-stage.
    */
    body.car-open .cars-table {
      width: 100%;
      max-width: 100%;
    }
    body.car-open .cars-table .expand-row .detail {
      min-height: 0;
      height: auto;
      max-height: none;
      overflow-x: hidden;
      overflow-y: visible;
      padding: 12px 16px 16px;
      box-sizing: border-box;
    }
    body.car-open .car-head-right {
      display: none !important;
    }
    .dismantle-mount {
      display: none;
      margin-top: 8px;
      background: var(--card);
      border-radius: 12px;
      border: 1px solid var(--line);
      min-height: 0;
    }
    body.map-open .dismantle-mount {
      display: block;
    }
    body.map-open .dismantle-mount .dismantle-dock {
      border-top: 0;
      padding: 12px 14px 24px;
      background: transparent;
    }
    body.map-open .dc-map-btn.is-open {
      text-decoration-thickness: 2px;
    }
    @media (max-width: 720px) {
      body.car-open .cars-table .expand-row .detail {
        min-height: 0;
        padding: 10px 10px 14px;
      }
      html, body {
        overflow-x: hidden;
      }
      .cars-table .expand-row .detail {
        max-height: none;
        overflow: visible;
        padding-bottom: 16px;
      }
    }
    .dc-head {
      display: flex;
      flex-direction: column;
      align-items: stretch;
      gap: 4px;
      margin-bottom: 8px;
    }
    .dc-head-main { min-width: 0; width: 100%; }
    .dc-head .dc-actions { margin-top: 0; }
    .dc-stats {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 5px 6px;
    }
    .dc-stat {
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 5px;
      height: 1.7rem;
      min-height: 1.7rem;
      min-width: 2.6rem;
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1;
      padding: 0 9px;
      border-radius: 5px;
      border: 1.5px solid #94a3b8;
      background: transparent;
      color: #64748b;
      white-space: nowrap;
      text-align: center;
      vertical-align: middle;
    }
    .dc-stat.yes,
    .dc-stat.no,
    .dc-stat.pending,
    .dc-stat.empty {
      min-width: 3.1rem;
      padding: 0 9px;
    }
    .dc-stat-ico {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 14px;
      height: 14px;
      flex-shrink: 0;
    }
    .dc-stat-ico svg {
      width: 14px;
      height: 14px;
      display: block;
    }
    .dc-stat-n {
      font-variant-numeric: tabular-nums;
      font-weight: 800;
    }
    /* Outline-чипы: заливка нет, цвет = контур + текст (канон) */
    .dc-stat.yes {
      border-color: #15803d;
      color: #15803d;
      background: transparent;
    }
    .dc-stat.no {
      border-color: #b91c1c;
      color: #b91c1c;
      background: transparent;
    }
    .dc-stat.empty {
      border-color: #64748b;
      color: #64748b;
      background: transparent;
    }
    .dc-stat.pending {
      border-color: #a16207;
      color: #a16207;
      background: transparent;
    }
    .dc-filt.pending.is-on,
    .dc-stat.pending.is-on {
      outline-color: #a16207;
    }
    .dc-stat[data-dc-f] {
      font: inherit;
      cursor: pointer;
    }
    .dc-stat[data-dc-f].is-on {
      outline: 2px solid #14212b;
      outline-offset: 1px;
    }
    .dc-btn.primary:disabled {
      opacity: 0.4;
      cursor: default;
      filter: none;
    }
    .dc-filters {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-bottom: 12px;
    }
    .dc-filt {
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 999px;
      padding: 5px 12px;
      font: inherit;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--muted);
      cursor: pointer;
    }
    .dc-filt.is-on { background: #14212b; color: #fff; border-color: #14212b; }
    .dc-filt:disabled,
    .dc-filt.is-locked {
      opacity: 0.4;
      cursor: default;
      pointer-events: none;
    }
    .dc-toolbar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      margin-bottom: 10px;
    }
    .dc-toolbar .dc-filters {
      margin: 0;
      flex: 0 1 auto;
    }
    .dc-toolbar .dc-actions {
      margin: 0;
      margin-left: auto;
      flex: 1 1 auto;
      justify-content: flex-end;
      gap: 6px;
    }
    .dc-toolbar .dc-save-hint {
      margin: 0;
      max-width: 16rem;
      line-height: 1.25;
    }
    .dc-toolbar .dc-btn {
      padding: 5px 10px;
      font-size: 0.75rem;
    }
    .dc-toolbar .dc-status {
      font-size: 0.72rem;
      padding: 4px 10px;
    }
    .dc-cols {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px;
    }
    .dc-cols-label {
      font-size: 0.75rem;
      font-weight: 700;
      color: var(--muted);
      margin-right: 2px;
    }
    /* Разделы карты: чипы в ряд → поля сразу под ними */
    .dc-groups {
      display: flex;
      flex-direction: column;
      gap: 8px;
      min-width: 0;
    }
    .dc-for-assembly {
      display: inline-flex;
      align-items: center;
      gap: 8px;
      margin: 0 0 6px;
      padding: 8px 10px;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #fff;
      font-size: 0.88rem;
      font-weight: 750;
      letter-spacing: 0.02em;
      color: #0f172a;
      user-select: none;
      width: fit-content;
      max-width: 100%;
      box-sizing: border-box;
    }
    .dc-for-assembly input {
      width: 1.05rem;
      height: 1.05rem;
      margin: 0;
      accent-color: #15803d;
      cursor: pointer;
      flex-shrink: 0;
    }
    .dc-for-assembly.is-ro {
      opacity: 0.92;
      cursor: default;
    }
    .dc-for-assembly.is-ro input {
      cursor: default;
    }
    .dc-for-assembly.is-on {
      border-color: #15803d;
      color: #166534;
      background: #f0fdf4;
    }
    .dc-sec-nav {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(11.5rem, 1fr));
      gap: 8px;
      padding: 0;
      max-height: none;
      overflow: visible;
      position: static;
      width: 100%;
      min-width: 0;
    }
    .dc-sec {
      display: flex;
      flex-direction: column;
      align-items: flex-start;
      justify-content: center;
      gap: 2px;
      width: 100%;
      min-width: 0;
      min-height: 3.25rem;
      text-align: left;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #fff;
      padding: 10px 12px;
      font: inherit;
      cursor: pointer;
      color: #0f172a;
      line-height: 1.2;
      box-sizing: border-box;
    }
    .dc-sec:hover {
      border-color: #60a5fa;
      background: #f8fbff;
    }
    .dc-sec.is-on {
      border-color: #1d4ed8;
      background: #eff6ff;
      box-shadow: inset 3px 0 0 #1d4ed8;
    }
    .dc-sec.is-done {
      background: #f0fdf4;
      border-color: #86efac;
    }
    .dc-sec.is-done.is-on {
      background: #ecfdf5;
      border-color: #16a34a;
      box-shadow: inset 3px 0 0 #16a34a;
    }
    .dc-sec-name {
      font-size: 0.88rem;
      font-weight: 800;
      line-height: 1.25;
      white-space: normal;
      max-width: none;
      overflow: visible;
      text-overflow: unset;
      word-break: break-word;
    }
    .dc-sec-meta {
      flex-shrink: 0;
      font-size: 0.75rem;
      font-weight: 800;
      color: #64748b;
      font-variant-numeric: tabular-nums;
    }
    .dc-sec.is-done .dc-sec-meta { color: #166534; }
    .dc-sec.is-on .dc-sec-meta { color: #1d4ed8; }
    .dc-sec.is-done.is-on .dc-sec-meta { color: #166534; }
    /* Согласование закрыто, пока не заполнены все остальные разделы */
    .dc-sec.is-gated {
      background: #f1f5f9;
      border-color: #cbd5e1;
      color: #94a3b8;
      opacity: 0.78;
    }
    .dc-sec.is-gated:hover {
      border-color: #cbd5e1;
      background: #f1f5f9;
    }
    .dc-sec.is-gated.is-on {
      background: #e2e8f0;
      border-color: #94a3b8;
      box-shadow: inset 3px 0 0 #94a3b8;
      color: #64748b;
      opacity: 1;
    }
    .dc-sec.is-gated .dc-sec-meta,
    .dc-sec.is-gated.is-on .dc-sec-meta {
      color: #94a3b8;
    }
    .dc-part.is-ready-step.is-gated {
      opacity: 0.72;
      background: #f8fafc;
      border-color: #e2e8f0;
    }
    .dc-part.is-ready-step.is-gated .dc-save {
      background: #e2e8f0;
      color: #64748b;
      border-color: #cbd5e1;
    }
    .dc-dock-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 8px;
      justify-content: flex-end;
      margin-top: 12px;
      padding-top: 4px;
    }
    .dc-dock-foot .dc-btn {
      border-radius: 8px;
      padding: 8px 14px;
      font-size: 0.85rem;
      font-weight: 800;
    }
    .dc-sec-work {
      border: 1px solid var(--line);
      border-radius: 10px;
      background: #fff;
      overflow: hidden;
      min-width: 0;
      width: 100%;
      max-width: 100%;
    }
    .dc-sec-work-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 8px;
      padding: 6px 10px;
      background: #f8fafc;
      border-bottom: 1px solid var(--line);
    }
    .dc-sec-work-head h4 {
      margin: 0;
      font-size: 0.8rem;
      font-weight: 800;
    }
    .dc-sec-work-head .dc-group-meta {
      color: var(--muted);
      font-size: 0.68rem;
      font-weight: 700;
      white-space: nowrap;
    }
    .dc-sec-work .dc-parts {
      box-sizing: border-box;
      width: 100%;
      min-width: 0;
      padding: 8px;
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
      gap: 6px;
      align-items: stretch;
    }
    .dc-sec-foot {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      justify-content: space-between;
      padding: 6px 10px 8px;
      border-top: 1px solid var(--line);
      background: #f8fafc;
    }
    .dc-sec-foot .dc-btn {
      min-width: 0;
      padding: 4px 10px;
      font-size: 0.72rem;
    }
    .dc-group {
      break-inside: avoid;
      -webkit-column-break-inside: avoid;
      page-break-inside: avoid;
      border: 1px solid var(--line);
      border-radius: 12px;
      overflow: hidden;
      background: #fff;
      margin: 0 0 12px;
      display: inline-block;
      width: 100%;
      vertical-align: top;
    }
    .dc-group > summary {
      list-style: none;
      cursor: pointer;
      padding: 8px 10px;
      font-weight: 800;
      font-size: 0.82rem;
      line-height: 1.25;
      background: #f1f5f9;
      display: flex;
      justify-content: space-between;
      gap: 8px;
      align-items: flex-start;
    }
    .dc-group > summary::-webkit-details-marker { display: none; }
    .dc-group[open] > summary { border-bottom: 1px solid var(--line); background: #e8eef5; }
    .dc-group-meta { color: var(--muted); font-size: 0.7rem; font-weight: 700; white-space: nowrap; }
    .dc-parts { padding: 0; }
    /*
      Клетка детали: всегда одна высота 40px.
      Flex, не grid: иначе при width:0 у .detail колонка с именем схлопывалась
      (белый прямоугольник + серая кнопка, текста не видно).
    */
    .dc-part {
      box-sizing: border-box;
      display: flex;
      flex-direction: row;
      align-items: center;
      gap: 8px;
      width: 100%;
      min-width: 0;
      height: 40px;
      min-height: 40px;
      max-height: 40px;
      padding: 0 8px 0 6px;
      margin: 0;
      border: 1px solid #cbd5e1;
      border-radius: 8px;
      background: #fff;
      overflow: hidden;
      color: #0f172a;
    }
    .dc-part.is-yes {
      background: #f0fdf4;
      border-color: #86efac;
    }
    .dc-part.is-no {
      background: #fef2f2;
      border-color: #fca5a5;
    }
    .dc-save {
      box-sizing: border-box;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      flex: 0 0 40px;
      width: 40px;
      min-width: 40px;
      max-width: 40px;
      height: 28px;
      min-height: 28px;
      max-height: 28px;
      margin: 0;
      padding: 0;
      border: 1px solid #94a3b8;
      border-radius: 6px;
      text-align: center;
      font: inherit;
      font-weight: 800;
      font-size: 12px;
      line-height: 1;
      text-transform: uppercase;
      letter-spacing: 0.02em;
      cursor: pointer;
      user-select: none;
      -webkit-tap-highlight-color: transparent;
      overflow: hidden;
      white-space: nowrap;
      color: #334155;
      background: #e2e8f0;
    }
    .dc-save.yes {
      background: #bbf7d0;
      color: #14532d;
      border-color: #86efac;
    }
    .dc-save.no {
      background: #fecaca;
      color: #7f1d1d;
      border-color: #fca5a5;
    }
    .dc-save.empty {
      background: #e2e8f0;
      color: #334155;
      border-color: #94a3b8;
    }
    .dc-save:not(:disabled):not(.is-lock):hover { filter: brightness(0.96); }
    .dc-save:not(:disabled):not(.is-lock):active { transform: scale(0.97); }
    .dc-save:disabled,
    .dc-save.is-lock { cursor: default; opacity: 1; }
    .dc-save.is-lock { box-shadow: inset 0 0 0 1px rgba(22, 101, 52, 0.35); }
    .dc-part-ru {
      flex: 1 1 0;
      min-width: 0;
      margin: 0;
      padding: 0;
      color: #0f172a;
      font-weight: 700;
      font-size: 14px;
      line-height: 18px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .dc-part-en { display: none; }
    .dc-part-note {
      flex: 0 1 auto;
      max-width: 5.5rem;
      margin: 0;
      padding: 1px 5px;
      border-radius: 4px;
      background: #fffbeb;
      border: 1px solid #fde68a;
      color: #92400e;
      font-size: 11px;
      line-height: 14px;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    .dc-part-note[contenteditable="true"] {
      outline: none;
      cursor: text;
      min-width: 3.5rem;
      max-width: 7rem;
    }
    .dc-note-add {
      flex: 0 0 auto;
      margin: 0;
      border: 0;
      background: transparent;
      padding: 0;
      font: inherit;
      font-size: 11px;
      font-weight: 700;
      color: #64748b;
      cursor: pointer;
      white-space: nowrap;
      line-height: 14px;
    }
    .dc-note-add:hover { color: var(--brand); }
    .dc-flag-hist {
      margin: 14px 0 0;
      border: 1px solid var(--line);
      border-radius: 12px;
      background: #f8fafc;
      overflow: hidden;
    }
    .dc-flag-hist > summary {
      list-style: none;
      cursor: pointer;
      padding: 10px 12px;
      font-weight: 800;
      font-size: 0.88rem;
      color: #334155;
      display: flex;
      justify-content: space-between;
      gap: 10px;
      align-items: center;
      user-select: none;
    }
    .dc-flag-hist > summary::-webkit-details-marker { display: none; }
    .dc-flag-hist > summary::after {
      content: "▸";
      color: #94a3b8;
      font-size: 0.85rem;
    }
    .dc-flag-hist[open] > summary {
      border-bottom: 1px solid var(--line);
      background: #eef2f7;
    }
    .dc-flag-hist[open] > summary::after { content: "▾"; }
    .dc-flag-hist-hint {
      font-weight: 600;
      font-size: 0.75rem;
      color: var(--muted);
    }
    .dc-flag-hist-list {
      display: flex;
      flex-direction: column;
      gap: 8px;
      padding: 10px 12px 12px;
    }
    .dc-flag-item {
      display: grid;
      grid-template-columns: 72px minmax(0, 1fr);
      gap: 10px;
      padding: 8px 10px;
      border: 1px solid #e2e8f0;
      border-radius: 10px;
      background: #fff;
    }
    .dc-flag-item.is-pending { border-color: #fcd34d; background: #fffbeb; }
    .dc-flag-item.is-no .dc-flag-ans { color: #991b1b; background: #fee2e2; }
    .dc-flag-ph {
      width: 72px;
      height: 54px;
      object-fit: cover;
      border-radius: 6px;
      background: #e2e8f0;
      cursor: zoom-in;
      display: block;
    }
    .dc-flag-ph-empty {
      width: 72px;
      height: 54px;
      border-radius: 6px;
      background: #f1f5f9;
      color: #94a3b8;
      font-size: 0.65rem;
      font-weight: 700;
      display: grid;
      place-items: center;
      text-align: center;
      padding: 4px;
    }
    .dc-flag-part { font-weight: 800; font-size: 0.86rem; color: #9a3412; }
    .dc-flag-note { font-size: 0.8rem; color: #475569; margin-top: 2px; }
    .dc-flag-meta { font-size: 0.72rem; color: var(--muted); margin-top: 4px; }
    .dc-flag-ans {
      display: inline-block;
      margin-top: 4px;
      font-size: 0.72rem;
      font-weight: 800;
      padding: 2px 8px;
      border-radius: 999px;
      background: #dcfce7;
      color: #166534;
    }
    .dc-flag-ans.is-wait { background: #fef3c7; color: #92400e; }
    .dc-status {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      font-size: 0.78rem;
      font-weight: 800;
      padding: 5px 10px;
      border-radius: 999px;
      background: #f1f5f9;
      color: var(--muted);
    }
    .dc-status.draft { background: #f1f5f9; color: #475569; }
    .dc-status.submitted { background: #ffedd5; color: #9a3412; }
    .dc-status.accepted { background: #dcfce7; color: #166534; }
    .dc-status.in_work { background: #e0e7ff; color: #3730a3; }
    .dc-actions {
      display: flex;
      flex-wrap: wrap;
      gap: 6px;
      margin-top: 8px;
    }
    .dc-btn {
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 8px;
      padding: 6px 12px;
      font: inherit;
      font-size: 0.8rem;
      font-weight: 700;
      color: var(--ink);
      cursor: pointer;
    }
    .dc-btn:hover { background: #f8fafc; }
    .dc-btn.primary { background: var(--brand); color: #fff; border-color: var(--brand); }
    .dc-btn.primary:hover { filter: brightness(1.05); }
    .dc-btn.ok { background: #15803d; color: #fff; border-color: #15803d; }
    .dc-btn:disabled { opacity: 0.45; cursor: default; }
    .dc-save-hint {
      font-size: 0.72rem;
      color: var(--muted);
      margin: 0;
    }
    .badge.card.submitted { background: #ffedd5; color: #9a3412; }
    .badge.card.accepted { background: #dcfce7; color: #166534; }
    .badge.card.draft { background: #e2e8f0; color: #475569; }
    .badge.card.in_work { background: #e0e7ff; color: #3730a3; }
    .badge.disassembled {
      background: transparent !important;
      border: 1.5px solid #0f172a;
      color: #0f172a;
      border-radius: 5px;
      letter-spacing: 0.02em;
    }
    .car.is-disassembled .car-title { color: #166534; }
    .car-head-extra .badge.disassembled,
    .car-head-chips .badge.disassembled {
      font-size: 0.72rem;
      padding: 4px 9px;
    }
    .dc-empty {
      color: var(--muted);
      text-align: center;
      padding: 28px 12px;
      font-size: 0.9rem;
    }
    .badge.card {
      background: #dcfce7;
      color: #166534;
    }
    .car-title { font-weight: 750; font-size: 0.95rem; }
    .car-meta { color: var(--muted); font-size: 0.75rem; margin-top: 2px; }
    .money { font-weight: 800; color: var(--ok); font-variant-numeric: tabular-nums; }
    .ask-tag { color: var(--warn); font-weight: 800; font-size: 0.72rem; }
    .badge {
      font-size: 0.68rem;
      font-weight: 800;
      padding: 3px 7px;
      border-radius: 5px;
      background: #e8eef3;
      color: var(--muted);
    }
    /* Yard / № — цвета заданы выше в каноне outline-чипов */
    .detail { padding: 16px 18px 48px; overflow: auto; }
    .empty { color: var(--muted); padding: 40px 10px; text-align: center; }
    .ask-card {
      display: grid;
      grid-template-columns: 140px 1fr;
      gap: 12px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
      border-radius: 12px;
      padding: 12px;
      margin-bottom: 14px;
    }
    @media (max-width: 640px) { .ask-card { grid-template-columns: 1fr; } }
    .ask-photo {
      aspect-ratio: 1;
      border-radius: 10px;
      background: repeating-linear-gradient(-45deg,#fde68a,#fde68a 8px,#fcd34d 8px,#fcd34d 16px);
      border: 1px dashed #d97706;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      font-size: 0.75rem;
      font-weight: 700;
      color: #92400e;
      padding: 8px;
    }
    .ask-card h4 { margin: 0 0 4px; }
    .ask-card p { margin: 0 0 10px; font-size: 0.85rem; color: #9a3412; }
    .ask-actions { display: flex; flex-wrap: wrap; gap: 8px; }
    .btn {
      appearance: none;
      border: 0;
      border-radius: 8px;
      padding: 8px 12px;
      font: inherit;
      font-weight: 700;
      font-size: 0.85rem;
      cursor: pointer;
      background: var(--brand);
      color: #fff;
    }
    .btn.ghost {
      background: #fff;
      color: var(--ink);
      border: 1px solid var(--line);
    }
    .car-head { margin: 0 0 4px; }
    .car-head-bar {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 8px 10px;
      width: 100%;
    }
    .car-head-bar .car-head-title {
      flex: 1 1 100%;
      width: 100%;
      min-width: 0;
    }
    .car-head-back {
      margin-left: auto;
      flex: 0 0 auto;
      appearance: none;
      border: 1px solid var(--line);
      background: #e2e8f0;
      color: #334155;
      border-radius: 8px;
      padding: 5px 12px;
      font: inherit;
      font-size: 0.75rem;
      font-weight: 800;
      letter-spacing: 0.02em;
      cursor: pointer;
      white-space: nowrap;
    }
    .car-head-back:hover {
      background: #cbd5e1;
      color: #0f172a;
    }
    .car-head-title {
      display: flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 6px 10px;
      margin: 0;
      width: 100%;
    }
    .car-head-topline {
      display: flex;
      align-items: flex-start;
      justify-content: space-between;
      gap: 8px 12px;
      width: 100%;
      min-width: 0;
    }
    .car-head-topline h2 {
      flex: 1 1 auto;
      min-width: 0;
      margin: 0;
      font-size: 1.2rem;
      font-weight: 750;
      line-height: 1.25;
    }
    .car-head-topline .car-head-dc {
      margin-left: 0;
      flex: 0 0 auto;
      padding-top: 2px;
    }
    .car-head-title h2 {
      margin: 0;
      font-size: 1.2rem;
      font-weight: 750;
      line-height: 1.25;
    }
    .car-head-chips {
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      gap: 5px 6px;
    }
    .car-head-chips .dc-stats {
      margin: 0;
    }
    .car-head-chips .dc-stat {
      height: 1.45rem;
      min-height: 1.45rem;
      font-size: 0.7rem;
    }
    .car-head-right {
      margin-left: auto;
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 6px 8px;
    }
    .car-head-right .meta-lot {
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      color: var(--ink);
      font-size: 0.95rem;
    }
    .car-head-right .meta-date {
      font-weight: 700;
      font-variant-numeric: tabular-nums;
      color: var(--ink);
      white-space: nowrap;
      font-size: 0.95rem;
    }
    .car-head-right .meta-sep {
      color: #cbd5e1;
      font-weight: 400;
      user-select: none;
    }
    .car-head-dc {
      margin-left: auto;
      display: inline-flex;
      flex-wrap: wrap;
      align-items: center;
      justify-content: flex-end;
      gap: 6px 8px;
      flex: 0 0 auto;
    }
    .car-head-dc .dc-stats {
      margin: 0;
    }
    .dc-map-btn {
      appearance: none;
      border: 0;
      background: transparent;
      display: inline-flex;
      align-items: center;
      gap: 6px;
      padding: 2px 0;
      font: inherit;
      font-size: 0.78rem;
      font-weight: 800;
      letter-spacing: 0.08em;
      text-transform: uppercase;
      color: #dc2626;
      cursor: pointer;
      white-space: nowrap;
    }
    .dc-map-btn span {
      color: var(--ink);
    }
    .dc-map-btn svg {
      width: 1.2rem;
      height: 1.2rem;
      display: block;
      flex-shrink: 0;
    }

    .dc-sec.is-review {
      background: #fef9c3;
      border-color: #facc15;
    }
    .dc-sec.is-review.is-on {
      background: #fef08a;
      border-color: #ca8a04;
      box-shadow: inset 3px 0 0 #ca8a04;
    }
    .dc-sec.is-review .dc-sec-meta { color: #a16207; }
    .dc-sec.is-accepted {
      background: #f0fdf4;
      border-color: #86efac;
    }
    .dc-sec.is-accepted.is-on {
      box-shadow: inset 3px 0 0 #16a34a;
      border-color: #16a34a;
    }
    .dc-map-btn.is-review { color: #ca8a04; }
    .dc-map-btn.is-review span { color: #a16207; }
    .dc-map-btn.is-accepted { color: #16a34a; }
    .dc-map-btn.is-accepted span { color: #15803d; }
    .dc-part.is-ready-step {
      max-height: none !important;
      height: auto !important;
      min-height: 44px;
      flex-wrap: wrap;
      align-items: center;
      padding-top: 8px;
      padding-bottom: 8px;
      overflow: visible !important;
      gap: 8px 10px;
    }
    .dc-part.is-ready-step.is-yes {
      background: #f0fdf4;
      border-color: #86efac;
    }
    /* карта уже у админа — жёлтый, как чип «на согласовании» */
    .dc-part.is-ready-step.is-waiting,
    .dc-part.is-ready-step.is-waiting.is-yes {
      background: #fef08a;
      border-color: #ca8a04;
    }
    .dc-part.is-ready-step.is-waiting .dc-save.yes {
      background: #fde68a;
      color: #92400e;
      border-color: #f59e0b;
    }
    .dc-part.is-ready-step.is-waiting .dc-part-ru {
      color: #92400e;
      font-weight: 800;
    }
    .dc-part.is-ready-step.is-rejected {
      background: #f8fafc;
      border-color: #cbd5e1;
      flex-wrap: wrap;
      align-items: flex-start;
    }
    .dc-reject-banner {
      flex: 1 1 100%;
      display: flex;
      flex-wrap: wrap;
      align-items: flex-start;
      gap: 8px 12px;
      margin-top: 4px;
      padding: 8px 10px;
      border-radius: 8px;
      background: #fff7ed;
      border: 1px solid #fed7aa;
    }
    .dc-reject-text {
      flex: 1 1 12rem;
      min-width: 0;
      font-size: 0.82rem;
      font-weight: 650;
      color: #9a3412;
      line-height: 1.35;
      white-space: pre-wrap;
    }
    .dc-reject-ack {
      margin-left: auto;
      flex: 0 0 auto;
    }
    .dc-part.is-ready-step .dc-submit-inline {
      margin-left: auto;
      flex: 0 0 auto;
    }
    .dc-submit-inline {
      margin-left: auto;
      flex: 0 0 auto;
      white-space: nowrap;
      padding: 6px 12px;
      font-size: 0.72rem;
    }
    .dc-part.is-ready-step .dc-part-ru {
      flex: 1 1 auto;
      white-space: normal;
    }
    .dc-map-btn.is-ready {
      color: #16a34a;
    }
    .dc-map-btn:hover {
      filter: brightness(0.92);
    }
    .vin-inline {
      display: inline-flex;
      align-items: center;
      gap: 6px;
      min-width: 0;
    }
    .vin-inline .vin-label {
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.06em;
      text-transform: uppercase;
      color: var(--muted);
    }
    .vin-inline .vin-code {
      font-family: ui-monospace, Menlo, monospace;
      font-size: 0.88rem;
      font-weight: 650;
      color: var(--ink);
      letter-spacing: 0.02em;
    }
    .vin-copy {
      appearance: none;
      border: 1px solid var(--line);
      background: #fff;
      border-radius: 7px;
      width: 30px;
      height: 30px;
      padding: 0;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      color: var(--muted);
      flex-shrink: 0;
    }
    .vin-copy:hover { border-color: #93c5fd; color: var(--brand); background: #eff6ff; }
    .vin-copy svg { width: 15px; height: 15px; display: block; }
    .badge.auction-copart {
      background: #1a5fb4;
      color: #fff;
    }
    .badge.auction-iaai {
      background: #b91c1c;
      color: #fff;
    }
    .car-head-extra { display: none; } /* чипы в первой строке с названием */
    section {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 14px;
      margin-bottom: 14px;
    }
    section.ledger-sec {
      border-color: transparent;
      background: transparent;
      padding: 0;
      margin: 0;
      box-shadow: none;
    }
    section.ledger-sec h3 { display: none; }
    section h3 { margin: 0 0 10px; font-size: 0.95rem; }
    .hint { margin: -4px 0 10px; font-size: 0.78rem; color: var(--muted); }
    .ledger {
      display: grid;
      grid-template-columns: repeat(6, 1fr);
      gap: 6px;
    }
    /* смета над большим фото; миниатюры на одной линии с фото */
    .photos-hero-col {
      display: contents;
    }
    .ledger.ledger--over-hero {
      /* столько колонок, сколько строк сметы (машина 7, деталь 4) */
      grid-template-columns: none;
      grid-auto-flow: column;
      grid-auto-columns: minmax(0, 1fr);
      width: 100%;
      gap: 4px;
      margin: 0;
      grid-column: 1;
      grid-row: 1;
      min-width: 0;
    }
    .ledger.ledger--over-hero .led {
      padding: 4px 2px;
      border-radius: 6px;
      min-width: 0;
    }
    .ledger.ledger--over-hero .led label {
      font-size: 0.52rem;
      letter-spacing: 0.03em;
      margin-bottom: 2px;
    }
    .ledger.ledger--over-hero .led b {
      font-size: 0.72rem;
      font-weight: 800;
      line-height: 1.15;
      display: block;
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
    /* Мобилка: смета компактнее — все цифры видны, без обрезки */
    @media (max-width: 720px) {
      .ledger.ledger--over-hero {
        gap: 2px;
      }
      .ledger.ledger--over-hero .led {
        padding: 3px 0;
        border-radius: 4px;
      }
      .ledger.ledger--over-hero .led label {
        font-size: 0.46rem;
        letter-spacing: 0.01em;
        margin-bottom: 1px;
      }
      .ledger.ledger--over-hero .led b {
        font-size: clamp(0.55rem, 2.85vw, 0.66rem);
        font-weight: 750;
        letter-spacing: -0.03em;
        overflow: visible;
        text-overflow: clip;
      }
    }
    html.office-pwa-standalone .ledger.ledger--over-hero {
      gap: 2px;
    }
    html.office-pwa-standalone .ledger.ledger--over-hero .led {
      padding: 3px 0;
      border-radius: 4px;
    }
    html.office-pwa-standalone .ledger.ledger--over-hero .led label {
      font-size: 0.46rem;
      letter-spacing: 0.01em;
      margin-bottom: 1px;
    }
    html.office-pwa-standalone .ledger.ledger--over-hero .led b {
      font-size: clamp(0.55rem, 2.85vw, 0.66rem);
      font-weight: 750;
      letter-spacing: -0.03em;
      overflow: visible;
      text-overflow: clip;
    }
    .gal-vin-meta {
      margin: 8px 0 0;
      width: 100%;
      display: flex;
      flex-wrap: wrap;
      gap: 4px 12px;
      font-size: 0.78rem;
      color: var(--muted);
      line-height: 1.4;
      box-sizing: border-box;
    }
    .gal-vin-meta .vin-spec b {
      color: #64748b;
      font-weight: 700;
      margin-right: 0.25em;
    }
    /* Карта разбора: теххарактеристики под фото не нужны */
    body.map-open .gal-vin-meta {
      display: none !important;
    }
    @media (max-width: 720px) {
      .ledger:not(.ledger--over-hero) { grid-template-columns: repeat(3, 1fr); }
      .ledger.ledger--over-hero { grid-template-columns: none; grid-auto-columns: minmax(0, 1fr); }
    }
    .led {
      text-align: center;
      padding: 8px 4px;
      border-radius: 8px;
      background: #f8fafc;
    }
    .led label {
      display: block;
      font-size: 0.62rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      color: var(--muted);
      text-transform: uppercase;
      margin-bottom: 4px;
    }
    .led b { font-variant-numeric: tabular-nums; }
    .led.total { background: #ecfdf5; }
    .led.total b { color: var(--ok); }
    .stages-strip {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      justify-content: flex-start;
      gap: 8px;
      margin-bottom: 10px;
      width: 100%;
      min-width: 0;
    }
    .stages {
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      gap: 6px 10px;
      margin: 0;
      flex: 0 1 auto;
      min-width: 0;
    }
    .stage {
      appearance: none;
      position: relative;
      display: inline-block;
      border: 0;
      border-radius: 0;
      background: transparent;
      box-shadow: none;
      padding: 0 0 3px;
      margin: 0;
      font: inherit;
      font-size: 0.72rem;
      font-weight: 800;
      letter-spacing: 0.04em;
      text-transform: uppercase;
      line-height: 1.15;
      color: var(--muted);
      cursor: pointer;
      white-space: nowrap;
      flex: 0 0 auto;
    }
    .stage::after {
      content: "";
      position: absolute;
      left: 0;
      right: 0;
      bottom: 0;
      height: 2px;
      background: transparent;
    }
    .stage.is-on {
      background: transparent;
      color: var(--ink);
      border: 0;
    }
    .stage.is-on::after {
      background: #dc2626;
    }
    .stage.is-empty { opacity: 0.35; }
    .stage:hover { color: var(--ink); }
    /* Галерея: без плитки, чипы этапов — текстовая строка над фото */
    section.photos-sec {
      background: transparent;
      border: 0;
      border-radius: 0;
      padding: 0;
      margin: 0 0 8px;
      box-shadow: none;
    }
    .photos-sec > .photos-head { display: none; } /* legacy: этапы в одной сетке со сметой */
    .photos {
      --gallery-h: 380px;
      display: grid;
      grid-template-columns: minmax(0, 1.45fr) minmax(180px, 1fr);
      grid-template-rows: auto var(--gallery-h);
      gap: 6px 10px;
      align-items: stretch;
    }
    .photos > .ledger-sec {
      grid-column: 1;
      grid-row: 1;
      margin: 0;
      align-self: center;
    }
    .photos > .stages--head {
      grid-column: 2;
      grid-row: 1;
      display: flex;
      flex-wrap: nowrap;
      align-items: center;
      align-self: center;
      justify-content: flex-start;
      gap: 6px 10px;
      margin: 0;
      min-width: 0;
      overflow-x: auto;
      scrollbar-width: thin;
    }
    .photos > .hero-wrap,
    .photos-hero-col > .hero-wrap {
      grid-column: 1;
      grid-row: 2;
    }
    .photos > .thumbs {
      grid-column: 2;
      grid-row: 2;
    }
    @media (max-width: 720px) {
      .photos {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto auto;
      }
      .photos > .ledger-sec,
      .photos > .stages--head,
      .photos > .hero-wrap,
      .photos-hero-col > .hero-wrap,
      .photos > .thumbs {
        grid-column: 1;
      }
      .photos > .ledger-sec { grid-row: 1; }
      .photos > .stages--head { grid-row: 2; }
      .photos > .hero-wrap,
      .photos-hero-col > .hero-wrap { grid-row: 3; height: min(48vw, 280px); }
      .photos > .thumbs { grid-row: 4; height: auto; max-height: 220px; }
    }
    .hero-wrap {
      position: relative;
      height: var(--gallery-h);
      min-height: 0;
      border-radius: 10px;
      overflow: hidden;
      background: #0f172a;
    }
    .hero-btn {
      display: block;
      width: 100%;
      height: 100%;
      border: 0;
      padding: 0;
      margin: 0;
      background: transparent;
      cursor: zoom-in;
    }
    .hero-btn img {
      width: 100%;
      height: 100%;
      max-height: none;
      min-height: 0;
      object-fit: cover;
      display: block;
      vertical-align: middle;
      pointer-events: none;
    }
    .hero-hint {
      position: absolute;
      right: 10px;
      bottom: 10px;
      z-index: 2;
      background: rgba(15, 23, 42, 0.65);
      color: #fff;
      font-size: 0.7rem;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 999px;
      pointer-events: none;
    }
    .lb {
      padding: 0;
      border: 0;
      background: transparent;
      max-width: none;
      width: min(1100px, 96vw);
    }
    .lb::backdrop { background: rgba(13, 27, 42, 0.88); }
    .lb-inner {
      background: #0d1117;
      border-radius: 12px;
      overflow: hidden;
      box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
    }
    .lb-head {
      display: flex;
      align-items: center;
      justify-content: space-between;
      gap: 12px;
      padding: 10px 14px;
      background: #fff;
      color: var(--ink);
      border-bottom: 1px solid var(--line);
    }
    .lb-head strong { font-size: 0.95rem; }
    .lb-count { margin-left: 8px; color: var(--muted); font-weight: 500; font-size: 0.85rem; }
    .lb-close {
      width: 2.2rem;
      height: 2.2rem;
      border: 0;
      border-radius: 8px;
      background: #eef2f6;
      color: var(--ink);
      font-size: 1.4rem;
      line-height: 1;
      cursor: pointer;
    }
    .lb-stage {
      position: relative;
      display: flex;
      align-items: center;
      justify-content: center;
      min-height: 50vh;
      background: #000;
    }
    .lb-stage img {
      display: block;
      max-width: 100%;
      max-height: min(82vh, 860px);
      width: auto;
      height: auto;
      object-fit: contain;
    }
    .lb-nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      width: 2.75rem;
      height: 3.25rem;
      border: 0;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.14);
      color: #fff;
      font-size: 1.75rem;
      cursor: pointer;
    }
    .lb-nav:hover { background: rgba(255, 255, 255, 0.28); }
    .lb-nav--prev { left: 10px; }
    .lb-nav--next { right: 10px; }
    .lb-meta {
      margin: 0;
      padding: 10px 14px 12px;
      color: #94a3b8;
      font-size: 0.8rem;
      background: #0d1117;
    }
    .nav {
      position: absolute;
      top: 50%;
      transform: translateY(-50%);
      z-index: 2;
      width: 2.4rem;
      height: 2.4rem;
      border: 0;
      border-radius: 999px;
      background: rgba(15, 23, 42, 0.55);
      color: #fff;
      font-size: 1.5rem;
      line-height: 1;
      cursor: pointer;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .nav:hover { background: rgba(15, 23, 42, 0.8); }
    .nav--prev { left: 8px; }
    .nav--next { right: 8px; }
    .nav.hidden { display: none; }
    .photo-count {
      position: absolute;
      left: 10px;
      bottom: 10px;
      z-index: 2;
      background: rgba(15, 23, 42, 0.65);
      color: #fff;
      font-size: 0.75rem;
      font-weight: 700;
      padding: 4px 8px;
      border-radius: 999px;
    }
    .thumbs {
      display: grid;
      grid-template-columns: repeat(3, 1fr);
      gap: 6px;
      align-content: start;
      height: var(--gallery-h);
      max-height: var(--gallery-h);
      overflow: auto;
      padding-right: 2px;
      min-height: 0;
    }
    .thumb {
      border: 2px solid transparent;
      border-radius: 8px;
      overflow: hidden;
      padding: 0;
      cursor: pointer;
      background: #e5e7eb;
      aspect-ratio: 4/3;
      display: flex;
      align-items: center;
      justify-content: center;
    }
    .thumb.is-on { border-color: #dc2626; }
    .thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
    .thumb-n {
      font-size: 0.72rem;
      font-weight: 800;
      color: #64748b;
      font-variant-numeric: tabular-nums;
    }
    .toast {
      position: fixed;
      left: 50%;
      top: 50%;
      right: auto;
      bottom: auto;
      transform: translate(-50%, -50%);
      background: var(--ink);
      color: #fff;
      padding: 12px 18px;
      border-radius: 12px;
      font-size: 0.9rem;
      font-weight: 700;
      opacity: 0;
      transition: opacity 0.2s;
      max-width: min(22rem, calc(100vw - 2rem));
      text-align: center;
      line-height: 1.35;
      box-shadow: 0 16px 40px rgba(15, 23, 42, 0.28);
      z-index: 90;
      pointer-events: none;
    }
    .toast.show { opacity: 1; }

    /* Вход логин+пароль · установка пароля по ссылке */
    .office-gate {
      position: fixed;
      inset: 0;
      z-index: 80;
      display: flex;
      align-items: center;
      justify-content: center;
      padding: 1.25rem;
      background: #f4f7fb;
    }
    .office-gate.hidden { display: none !important; }
    .office-gate-card {
      width: min(20rem, 100%);
      background: #fff;
      border: 1px solid var(--line);
      border-radius: 12px;
      padding: 1.35rem 1.25rem 1.4rem;
      box-shadow: 0 10px 28px rgba(15, 23, 42, 0.08);
    }
    .office-gate-card.hidden { display: none !important; }
    .office-gate-title {
      margin: 0 0 0.85rem;
      font-size: 1.15rem;
      font-weight: 800;
      text-align: center;
      color: #0f172a;
    }
    .office-gate-sub {
      margin: -0.35rem 0 0.85rem;
      font-size: 0.88rem;
      text-align: center;
      color: #475569;
    }
    .office-gate-sub:empty { display: none; }
    .office-gate-label {
      display: block;
      margin: 0 0 0.25rem;
      font-size: 0.75rem;
      font-weight: 700;
      color: #64748b;
      letter-spacing: 0.02em;
    }
    .office-gate-card input {
      width: 100%;
      box-sizing: border-box;
      border: 1px solid var(--line);
      border-radius: 8px;
      padding: 0.65rem 0.8rem;
      font: inherit;
      font-size: 1rem;
      font-weight: 600;
      letter-spacing: normal;
      margin-bottom: 0.75rem;
      text-align: left;
    }
    .office-gate-card input:focus {
      outline: 2px solid #93c5fd;
      border-color: #60a5fa;
    }
    .office-gate-card .btn {
      width: 100%;
      justify-content: center;
      margin-top: 0.15rem;
    }
    .office-gate-hint {
      margin: 0.75rem 0 0;
      font-size: 0.75rem;
      line-height: 1.35;
      color: #64748b;
      text-align: center;
    }
    .office-gate-err {
      margin: 0 0 0.75rem;
      color: #b91c1c;
      font-size: 0.82rem;
      font-weight: 700;
      min-height: 1.1em;
      text-align: center;
    }
    .office-gate-err:empty { margin: 0; min-height: 0; }
    body.is-office-locked .filters,
    body.is-office-locked .finance-panel,
    body.is-office-locked .table-wrap,
    body.is-office-locked #mapStage,
    body.is-office-locked #detailPark,
    body.is-office-locked .dismantle-dock {
      visibility: hidden;
    }
    /* «За что» под «Доп.» — только когда сумма введена (2026-10-17) */
    .fin-note {
      display: block;
      font-size: 0.62rem;
      font-weight: 500;
      line-height: 1.15;
      color: var(--muted, #6b7280);
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

/* Маяки приёмки (2026-10-19): рядом с «под сборку», цвета как в админке (admin-st-ds.css) */
.dc-marks-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.dc-marks { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.dc-mark { font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #eef2ff; border: 1px solid #c7d2fe; color: #334155; white-space: nowrap; }
.dc-mark b { font-weight: 800; }
.dc-mark.is-y b { color: #15803d; }
.dc-mark.is-n b { color: #b91c1c; }
.dc-mark.is-e, .dc-mark.is-e b { color: #94a3b8; font-weight: 600; }
