/* Окна, выделение ячеек и тёмная панель выделения (ZK-58, макет «Состояния и окна»).
   Окна: «Бланк поставщика», «Добавить позиции», «Дни поставок», подтверждение, опрос-проверки.
   Выделение как в Excel: классы is-range / is-selected / is-sel-* ставит zakaz-select.js. */

/* ── Окно ───────────────────────────────────────────────────────── */

.dialog-back, .modal-backdrop {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  padding: 24px; background: var(--shade);
}
.dialog, .modal {
  width: 600px; max-width: 100%; max-height: calc(100vh - 48px); overflow: auto; display: flex; flex-direction: column;
  border-radius: 16px; background: var(--pop); box-shadow: var(--shadow-dialog);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 20px 6px; }
.dialog-head b { font-size: 18px; font-weight: 700; }
.dialog-x { padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: 18px; line-height: 1; }
.dialog-body { display: flex; flex-direction: column; gap: 16px; padding: 10px 20px 20px; }
.dialog-row { display: flex; align-items: center; gap: 10px; }
.dialog-row-end { justify-content: flex-end; }
.dialog-foot { display: flex; align-items: center; gap: 12px; padding-top: 14px; border-top: 1px solid var(--line-group); }
.dialog-foot a { font-size: 13px; }
.dialog-foot .btn-dark { margin-left: auto; height: 40px; padding: 0 18px; border-radius: 10px; }
.dialog .btn-line, .dialog .btn-dark { height: 40px; border-radius: 10px; }
.dialog .btn-line { border-radius: 9px; color: var(--ink); }
.field-col { display: flex; flex-direction: column; gap: 6px; }
.field-title { font-size: 13px; font-weight: 500; }
.field-title span { font-weight: 400; color: var(--ink-soft); }
.field-note { font-size: 12.5px; color: oklch(0.45 0.014 60); }
.field-col .input { height: 42px; }
.consumable-dialog { width: 540px; }
.consumable-dialog .dialog-body { gap: 11px; }
.consumable-approximate { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); }
.consumable-approximate input { width: 16px; height: 16px; accent-color: var(--ok); }
.consumable-note-input { min-height: 68px; height: auto !important; padding: 10px 12px; resize: vertical; }
.consumable-count-state { min-height: 18px; margin: 0; color: var(--ink-2); font-size: 12.5px; }
.consumable-review { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--bad-ink); border-radius: 10px; background: oklch(0.975 0.015 28); }
.consumable-review p { margin: 0; color: var(--bad-ink); font-size: 12.5px; line-height: 1.45; }
.consumable-review button { justify-self: start; min-height: 40px; }
.consumable-history { border-top: 1px solid var(--line-group); padding-top: 10px; }
.consumable-history h3 { margin: 0 0 8px; font-size: 13px; }
.consumable-history ol { display: flex; flex-direction: column; gap: 8px; max-height: 180px; margin: 0; padding: 0; overflow: auto; list-style: none; }
.consumable-history-row { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 9px; background: var(--surface-sunk); font-size: 12px; }
.consumable-history-row b { font-size: 12.5px; font-variant-numeric: tabular-nums; }
.consumable-history-row span, .consumable-history-empty { color: var(--ink-soft); }
.consumable-history-empty { padding: 8px 0; font-size: 12.5px; }
.consumable-dialog .dialog-foot { justify-content: flex-end; }
.consumable-dialog .dialog-foot .btn-dark { margin-left: 0; }
.consumable-unavailable { margin: 0; padding: 9px 14px; color: var(--bad-ink); background: oklch(0.975 0.015 28); font-size: 12.5px; }
.consumable-count-launch { min-height: 36px; padding: 0 12px; white-space: nowrap; }
/* Общая шапка подсчёта и управления списком; композиция подсчёта — в styles-consumable-count.css. */
.consumable-count-screen-head {
  position: sticky; top: 0; z-index: 2; display: flex; align-items: center; gap: 18px; padding: 12px max(20px, calc((100vw - 1040px) / 2));
  border-bottom: 1px solid var(--line); background: var(--surface); box-shadow: 0 2px 8px oklch(0.2 0.02 60 / .05);
}
.consumable-count-back { min-height: 42px; white-space: nowrap; }
.consumable-count-heading { min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.consumable-count-heading h2 { margin: 0; font-size: 20px; line-height: 1.2; }
.consumable-count-heading span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink-2); font-size: 13px; }
.consumable-manager-search-label { display: block; margin: 14px 0 5px; color: var(--ink-2); font-size: 12.5px; }
.consumable-manager-active-summary { display: block; min-height: 16px; margin-top: 3px; color: var(--ink-soft); font-size: 11.5px; }
.consumable-count-preview { min-height: 17px; color: var(--ink-2); font-size: 12px; }
.consumable-count-preview.is-error { color: var(--bad-ink); }
.row-consumable-action { flex: none; width: 22px; height: 22px; padding: 0; border: 0; background: transparent; color: var(--link); font-size: 17px; line-height: 1; }
.row-consumable-action:hover { border-radius: 6px; background: oklch(0.94 0.025 245); }
.tc-consumable { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid var(--line-group); border-radius: 12px; font-size: 12.5px; color: var(--ink-2); }
.tc-consumable .tc-btn { flex: none; min-width: 132px; padding: 0 10px; }

/* Сегмент «кг / шт / л» — кнопки на подложке (строит zakaz-head.js из <select>). */
.seg { display: flex; padding: 3px; border-radius: 10px; background: oklch(0.93 0.008 80); width: max-content; }
.seg button { padding: 8px 18px; border: 0; border-radius: 8px; background: transparent; color: var(--ink-2); }
.seg button.is-on { background: var(--pop); box-shadow: 0 1px 2px oklch(0.3 0.02 60 / .12); color: var(--ink); font-weight: 600; }
.custom-own-row .seg button { padding: 7px 12px; }

.blank-file { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: 12px; background: oklch(0.965 0.025 150); }
.blank-file-text { flex: 1; display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; color: oklch(0.4 0.014 60); white-space: normal; }
.blank-file-text b { font-size: 14px; font-weight: 700; color: var(--ink); }
.btn-ok-line { border-color: oklch(0.8 0.03 150); background: var(--pop); font-weight: 500; }

.custom-dialog .dialog-body { gap: 12px; }
.dialog .search.search-dialog { width: 100%; height: 40px; }
.custom-list { display: flex; flex-direction: column; border-radius: 12px; border: 1px solid oklch(0.91 0.008 80); overflow: auto; max-height: 300px; }
.custom-list:empty { display: none; }
.custom-item {
  display: flex; align-items: center; gap: 12px; min-height: 46px; padding: 0 12px; border: 0;
  border-bottom: 1px solid oklch(0.93 0.007 80); background: transparent; text-align: left; cursor: pointer;
}
.custom-item:last-child { border-bottom: 0; }
.custom-item.is-on { background: oklch(0.975 0.015 150); }
.custom-item input { position: absolute; opacity: 0; width: 0; height: 0; }
.custom-item-name { flex: 1; font-weight: 500; }
.custom-item-stock { font-size: 12.5px; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.custom-empty { padding: 14px 12px; font-size: 13px; color: var(--ink-2); }
.custom-state { margin-right: auto; font-size: 12.5px; color: var(--ink-2); }
.custom-own { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-group); }
.custom-own-row { display: flex; align-items: center; gap: 8px; }
.custom-own-row #customName { flex: 1; min-width: 0; }
.custom-pack { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); }
.custom-pack .input { width: 70px; }

/* Окно подтверждения (zakaz-confirm.js) и опрос-проверки (zakaz-checklist.js). */
.modal { width: 500px; }
.modal-body { display: flex; flex-direction: column; gap: 8px; padding: 22px 24px 8px; }
.modal-title { font-size: 18px; font-weight: 700; line-height: 1.3; }
.modal-text { margin: 0; font-size: 14px; line-height: 1.5; color: oklch(0.4 0.014 60); white-space: pre-line; }
.modal-foot { display: flex; align-items: center; gap: 10px; padding: 12px 24px 20px; }
.modal-note { font-size: 12.5px; color: var(--ink-soft); }
.modal-actions { margin-left: auto; display: flex; gap: 8px; }
.modal-cancel { height: 44px; padding: 0 16px; border-radius: 11px; border: 1px solid var(--line-strong); background: transparent; color: var(--ink-strong); }
.modal-ok { height: 44px; padding: 0 20px; border: 0; border-radius: 11px; background: var(--dark); color: var(--on-dark); font-weight: 600; }

.quiz { width: 500px; gap: 16px; padding: 22px 24px 20px; border-radius: 18px; box-shadow: var(--shadow-quiz); }
.quiz-top { display: flex; align-items: center; justify-content: space-between; }
.quiz-step { font: 500 12px var(--mono); letter-spacing: .05em; text-transform: uppercase; color: oklch(0.45 0.014 60); }
.quiz-dots { display: flex; gap: 6px; }
.quiz-dots i { flex: 1; height: 5px; border-radius: 3px; background: var(--line-btn); }
.quiz-dots i.is-done { background: oklch(0.6 0.13 150); }
.quiz-dots i.is-now { background: var(--dark); }
.quiz-q { display: flex; flex-direction: column; gap: 8px; min-height: 96px; }
.quiz-q b { font-size: 21px; line-height: 1.3; letter-spacing: -0.01em; font-weight: 700; }
.quiz-q span { font-size: 14.5px; line-height: 1.45; color: oklch(0.4 0.014 60); }
.quiz-q span.is-bad { color: var(--bad-ink); }
.quiz-q a { font-size: 14px; }
.quiz-acts { display: flex; align-items: center; gap: 8px; }
.quiz-acts .btn-dark { height: 44px; padding: 0 20px; border-radius: 11px; }
.quiz-acts .btn-line { height: 44px; padding: 0 16px; border-radius: 11px; }
.quiz-acts .link { margin-left: auto; font-size: 13px; }
.quiz-acts { flex-wrap: wrap; }
.quiz-fact { margin: 2px 0 0; color: var(--ink-soft); font-size: 13px; line-height: 1.45; }
.mail-adjust { display: flex; flex-direction: column; gap: 12px; max-height: min(65vh, 560px); overflow: auto; }
.mail-adjust p { margin: 0; line-height: 1.45; }
.mail-adjust label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-soft); }
.mail-adjust input, .mail-adjust select { width: 100%; min-height: 40px; padding: 6px 10px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); color: var(--ink-strong); }
.mail-adjust-feedback { min-height: 20px; color: var(--ink-soft); }
.mail-adjust-actions { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── Выделение ячеек ────────────────────────────────────────────── */

#zakazList .row.is-range { background: var(--focus-row); }
/* Выделенные ячейки — голубой полосой без рамки по контуру (макет states/01). Классы is-sel-top/-left…
   ставит zakaz-select.js; рамку по ним больше не рисуем. */
#zakazList .cell.is-sel-cell { background: var(--select-band); }
#zakazList .row-qty.is-selected { background: var(--select-input); border-color: var(--focus); }
/* Одна ячейка под курсором (щелчок, Tab) — не выделение: белое поле, синяя рамка и кольцо (макет vz/07). */
#zakazList .row:not(.is-range) .row-qty.is-selected:focus { background: var(--pop); }
#zakazList .row.is-ordered:not(.is-range) .row-qty.row-order.is-selected:focus { background: var(--ok-input); border-color: var(--focus); }
#zakazList.is-dragging, #zakazList.is-dragging .row-qty { user-select: none; cursor: cell; }
.row { position: relative; }
.row .cell-fill-handle {
  position: absolute; width: 6px; height: 6px; padding: 0; border: 1px solid #fff; box-sizing: content-box;
  background: var(--focus); cursor: crosshair; z-index: 3; touch-action: none;
}

/* Тёмная панель выделения — нижней полосой таблицы, как строка состояния Excel. */
.table-card { position: relative; }
.selection-status {
  position: absolute; left: 0; right: 18px; bottom: 0; z-index: 6; display: flex; align-items: center; gap: 14px;
  height: 52px; padding: 0 10px 0 16px; background: var(--dark); color: oklch(0.97 0.004 80); font-size: 13.5px; white-space: nowrap;
}
body.set-simple .selection-status { right: 0; }
.selection-status > b { font-weight: 700; }
.selection-status .sel-sum { color: oklch(0.8 0.01 80); }
.sel-text { display: flex; align-items: baseline; gap: 10px; }
#selectionStatusText { font-weight: 700; }
#selectionStatusSub { font-size: 13.5px; color: oklch(0.8 0.01 80); }
.selection-bar { position: relative; display: flex; align-items: center; gap: 14px; }
.sel-menu { position: absolute; left: 14px; bottom: calc(100% + 8px); min-width: 200px; padding: 6px; color: var(--ink); }
.selection-bar::before { content: ''; width: 1px; height: 22px; background: oklch(0.45 0.01 60); }
.selection-bar #selectionText { display: none; }
.sel-btn { padding: 6px 10px; border: 0; border-radius: 8px; background: oklch(0.35 0.015 60); color: inherit; font-size: 13.5px; }
.sel-btn:hover { background: oklch(0.4 0.015 60); }
.selection-status .keys { margin-left: auto; font-size: 12.5px; color: oklch(0.8 0.01 80); }

/* ── Пустой раздел и загрузка ───────────────────────────────────── */

.empty-state {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  min-height: 380px; padding: 32px; text-align: center;
}
.empty-state b { font-size: 20px; font-weight: 600; }
.empty-state span { max-width: 440px; font-size: 14px; line-height: 1.5; color: oklch(0.4 0.014 60); white-space: normal; }
.empty-state .btn-dark { height: 44px; padding: 0 18px; border-radius: 11px; margin-top: 6px; }
#zakazList:has(> .empty-state) ~ .list-after { display: none; }
.skeleton-row {
  display: grid; grid-template-columns: minmax(0, 1fr) 90px 90px 90px 120px; align-items: center; gap: 16px;
  height: 52px; padding: 0 16px; border-bottom: 1px solid oklch(0.93 0.007 80);
}
.skeleton-row i { height: 11px; border-radius: 4px; background: oklch(0.94 0.005 80); }
.skeleton-row i.sk-name {
  background: linear-gradient(90deg, oklch(0.93 0.006 80) 0, oklch(0.965 0.004 80) 40%, oklch(0.93 0.006 80) 80%);
  background-size: 800px 100%; animation: zk-shimmer 1.4s linear infinite;
}
.skeleton-row i.sk-box { height: 30px; border-radius: 7px; border: 1px solid var(--line-group); background: none; }
@keyframes zk-shimmer { 0% { background-position: -400px 0; } 100% { background-position: 400px 0; } }

/* ── Окно «Дни поставок» (zakaz-schedule-edit.js) ──────────────── */

.sched-dialog .dialog-body { gap: 14px; }
.sched-dialog .dialog-head { position: sticky; top: 0; z-index: 2; background: var(--pop); }
.sched-dialog .dialog-x { width: 44px; height: 44px; flex: none; display: inline-flex; align-items: center; justify-content: center; font-size: 24px; }
.sched-weekly { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.sched-weekly h3 { margin: 0; font-size: 15px; }
.sched-weekly-summary { display: flex; flex-direction: column; gap: 5px; }
.sched-weekly-pair { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; font-size: 13px; }
.sched-weekly-pair b { min-width: 86px; }
.sched-weekly-empty { margin: 0; color: var(--ink-2); font-size: 13px; }
.sched-weekly-unsaved { margin: 3px 0 0; color: var(--bad-ink); font-size: 12px; }
.sched-weekly > .link { align-self: flex-start; display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; margin-left: -8px; }
.sched-weekly-edit { display: flex; flex-direction: column; gap: 12px; padding-top: 10px; border-top: 1px solid var(--line-group); }
.sched-weekly-edit[hidden] { display: none; }
.sched-hint { font-size: 13px; color: oklch(0.4 0.014 60); white-space: normal; }
.day-tiles { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.day-tile {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 4px; border-radius: 11px;
  border: 1px solid var(--line); background: transparent; color: var(--ink-3);
}
.day-tile b { font-size: 15px; font-weight: 700; }
.day-tile span { font-size: 11.5px; line-height: 1.3; text-align: center; }
.day-tile.is-on { background: oklch(0.965 0.025 150); border-color: oklch(0.7 0.1 150); color: oklch(0.3 0.08 150); }
.day-tile.is-on span { color: oklch(0.35 0.06 150); }
.day-times { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 13px; color: var(--ink-2); }
.day-times:empty { display: none; }
.day-time { display: flex; align-items: center; gap: 6px; }
.day-time b { color: var(--ink); }
.day-time select, .day-time input { height: 44px; padding: 0 6px; border: 1px solid var(--line-strong); border-radius: 7px; background: var(--pop); }
.shifts { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--line-group); }
.shifts .field-title { font-weight: 600; }
.shift-row b { font-weight: 700; }
.shift-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-sunk); font-size: 13.5px; }
.shift-none { color: var(--bad-ink); }
.shift-tag { padding: 1px 7px; border-radius: 5px; background: oklch(0.93 0.008 80); font-size: 12px; }
.shift-x { margin-left: auto; padding: 0; border: 0; background: none; color: var(--ink-soft); font-size: 13.5px; }
.shift-more { align-self: flex-start; font-size: 13px; }
.shift-form { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13px; }
.shift-form .input { height: 36px; width: 150px; }
.shift-form .btn-line { height: 36px; }
.shift-check { display: flex; align-items: center; gap: 5px; color: var(--ink-2); }
.sched-status { font-size: 13px; color: var(--bad-ink); }
.sched-status.is-ok { color: oklch(0.38 0.09 150); }
.dialog-row-end .btn-line, .dialog-row-end .btn-dark { height: 40px; border-radius: 10px; }
/* «Дни поставок»: «Сохранить» с полями 18 (макет states/05, второй круг ревью ZK-58). */
.sched-dialog .dialog-row-end .btn-dark { min-height: 44px; padding: 0 18px; }

.holiday-calendar { display: flex; flex-direction: column; gap: 10px; padding-top: 14px; border-top: 1px solid var(--line-group); }
.holiday-calendar h3, .holiday-detail h4 { margin: 0; font-size: 15px; }
.holiday-period-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.holiday-period-actions button { min-height: 40px; }
.holiday-period-actions .is-active { border-color: var(--focus); background: var(--surface-sunk); }
.holiday-period-label { margin: 0; font-size: 12px; color: var(--ink-2); }
.holiday-range { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.holiday-range[hidden] { display: none; }
.holiday-range .input { width: 150px; min-height: 44px; }
.holiday-range button { min-height: 44px; }
.holiday-events { display: flex; flex-direction: column; gap: 6px; }
.holiday-event { display: grid; grid-template-columns: minmax(0, 1fr) minmax(170px, 1fr); align-items: center; gap: 8px;
  width: 100%; min-height: 52px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px;
  background: var(--surface); color: var(--ink); text-align: left; font-size: 13px; }
.holiday-event.is-selected { border-color: var(--focus); background: var(--surface-sunk); }
.holiday-event-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.holiday-event-main small { color: var(--ink-2); font-size: 12px; }
.holiday-event-main .holiday-unknown { color: var(--bad-ink); }
.holiday-event-main .holiday-unsaved { color: oklch(0.45 0.09 80); }
.holiday-event-deadline { min-width: 0; overflow-wrap: anywhere; }
.holiday-unknown { color: var(--bad-ink); }
.holiday-empty, .holiday-note { margin: 0; color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.holiday-toggle, .holiday-add { align-self: flex-start; }
.holiday-detail { display: flex; flex-direction: column; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 10px; }
.holiday-detail:empty { display: none; }
.holiday-preview { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--surface-sunk); font-size: 13px; line-height: 1.5; }
.holiday-advanced summary, .holiday-sent-orders summary { min-height: 44px; padding: 12px 0; cursor: pointer; font-weight: 600; font-size: 13px; }
.holiday-advanced .holiday-field { margin-top: 8px; }
.holiday-sent-orders { padding-top: 12px; border-top: 1px solid var(--line-group); }
.holiday-sent-row { display: flex; flex-wrap: wrap; gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--line-group); font-size: 12px; }
.holiday-sent-orders .holiday-note { margin-top: 8px; }
.holiday-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.holiday-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 12px; }
.holiday-field > .input { width: 100%; min-width: 0; min-height: 44px; }
.holiday-field:has(input[type="checkbox"]) { flex-direction: row; align-items: center; gap: 8px; min-height: 44px; }
.holiday-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.holiday-actions button { min-height: 44px; }
.holiday-remove { color: var(--bad-ink); }
@media (max-width: 640px) {
  .sched-dialog .dialog-body { padding-inline: 12px; }
  .day-tiles { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .holiday-range .input { flex: 1 1 130px; min-width: 0; }
  .holiday-event { grid-template-columns: 1fr; gap: 4px; }
  .holiday-period-actions button { flex: 1 1 130px; min-height: 44px; }
  .holiday-toggle, .holiday-add { align-self: stretch; min-height: 44px; }
  .holiday-fields { grid-template-columns: 1fr; }
  .holiday-actions button { flex: 1 1 140px; }
}

/* Управление ожидаемыми поставками рядом с расчётом, во всех видах экрана. */
.deliveries-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 8px 24px; font-size: 12px; }
.deliveries-bar > span { color: var(--ink-mute); }
.order-guide { padding: 5px var(--page-x); color: var(--ink-2); font-size: 12px; line-height: 1.4; }
.deliveries-dialog { width: min(620px, calc(100vw - 24px)); }
#deliveriesList { display: grid; gap: 12px; }
#deliveriesList > section, #deliveriesList > article, .delivery-manual > section { border: 1px solid var(--line); padding: 12px; border-radius: 10px; display: grid; gap: 8px; }
#deliveriesList input[type="date"] { max-width: 180px; min-height: 36px; }
.delivery-manual, .delivery-extra { border-top: 1px solid var(--line); padding-top: 10px; }
.delivery-manual > summary, .delivery-extra > summary { cursor: pointer; color: var(--ink-2); font-size: 13px; }
.delivery-manual > section { margin-top: 10px; }
.delivery-extra[open] { display: grid; gap: 8px; }
#deliveriesList .delivery-date-warning { color: var(--bad-ink); }
body.touch-phone #touchCard.is-open { display: block; position: fixed; inset: 60px 12px calc(var(--zakaz-touchbar-height, 90px) + 12px); width: auto; z-index: 90; overflow: auto; background: var(--surface); border: 1px solid var(--line); box-shadow: 0 12px 40px #0003; }

#deliveriesList h3, #deliveriesList p { margin: 0; }
#deliveriesList h3 { font-size: 15px; }
#deliveriesList p { color: var(--ink-soft); font-size: 13px; }
#deliveriesPanel { z-index: 95; }
#zakazModal { z-index: 100; }
.touch-card > * { flex-shrink: 0; }

.calculation-details { z-index: 96; }
.dialog-back:has(.quiz) { z-index: 101; }
.calculation-text { white-space: pre-wrap; line-height: 1.55; font-size: 14px; }

.deliveries-bar > .order-explain-note { flex-basis: 100%; color: var(--ink-2); line-height: 1.4; }
/* На компьютере пояснение остаётся доступным целиком по наведению, но не
   отнимает отдельную строку у бланка. */
body:not(.is-touch) .deliveries-bar { flex-wrap: nowrap; padding: 5px var(--page-x); }
body:not(.is-touch) .deliveries-bar > .order-explain-note {
  flex: 1 1 0; min-width: 0; margin-left: auto; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap;
}
/* В цикле заказа появились дополнительные действия: итог не сжимается в столбик. */
body.touch-portrait .touch-bar:has(> button:nth-of-type(3)),
body.touch-phone .touch-bar:has(> button:nth-of-type(2)) { flex-wrap: wrap; }
body.touch-portrait .touch-bar:has(> button:nth-of-type(3)) .tb-text,
body.touch-phone .touch-bar:has(> button:nth-of-type(2)) .tb-text { flex-basis: 100%; }
body.touch-phone .touch-bar > button { flex: 1; padding: 0 12px; }
body.touch-phone #toolbar .toolbar-right { min-width: 0; flex-wrap: wrap; }
