/* IzyShift — «Чек-листы смены» (21.10.2026, Прогон A), checklists.js.
   Телефон по умолчанию (390 px), от 900 px — шире строки и таблицы. Токены — app.css. */
#view-checklists .card { margin: 12px; }
.cl-pad { margin: 12px; }
.cl-sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cl-seg { margin: 10px 12px; flex-wrap: wrap; }
.cl-seg .seg { flex: 1 1 auto; min-width: 0; }

/* строки списков */
.cl-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; width: 100%;
  padding: 12px 0; border: 0; border-bottom: 1px solid #F1F1F1; background: none; font: inherit; color: inherit;
  text-align: left; cursor: pointer; min-height: 48px; }
.cl-row:last-child { border-bottom: 0; }
.cl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 8px; }
.cl-r-main { display: flex; flex-direction: column; min-width: 0; }
.cl-r-main b, .cl-r-tpl { overflow-wrap: anywhere; }
.cl-r-main small { font-size: 12px; }
.cl-r-prog { display: flex; align-items: center; gap: 8px; min-width: 0; }
.cl-r-go { grid-column: 1 / -1; font-size: 13px; color: var(--accent); font-weight: 600; }
.cl-r-tpl { grid-column: 1 / -1; font-size: 14px; }
.cl-row > .pill { justify-self: start; }
.cl-ctl > .pill { justify-self: end; }
.cl-prog { display: inline-block; width: 72px; height: 6px; border-radius: 3px; background: #E5E7EB; overflow: hidden; flex: none; }
.cl-prog > span { display: block; height: 100%; background: #059669; border-radius: 3px; }
.cl-n { font-variant-numeric: tabular-nums; font-size: 14px; }
.cl-sh-h { display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; }
.cl-sh-h > span:first-child::first-letter { text-transform: uppercase; }

/* статусы: цвет + текст (не только цвет) */
.pill.cl-not_started { background: #F3F4F6; color: #374151; }
.pill.cl-in_progress { background: #DBEAFE; color: #1E40AF; }
.pill.cl-done { background: #D1FAE5; color: #065F46; }
.pill.cl-skipped { background: #FEF3C7; color: #92400E; }
.pill.cl-reviewed { background: #EDE9FE; color: #5B21B6; }
.pill.cl-st { white-space: nowrap; }

/* день, фильтры, плитки */
.cl-bar { margin: 0 12px; display: flex; flex-direction: column; gap: 8px; }
.cl-day { display: flex; align-items: center; gap: 4px; flex-wrap: nowrap; }
.cl-day .inp { width: auto; flex: 0 1 190px; min-width: 0; }
.cl-filters { display: flex; gap: 8px; flex-wrap: wrap; }
.cl-filters .inp { flex: 1 1 140px; min-width: 0; width: auto; }
.cl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(96px, 1fr)); gap: 8px; margin: 12px; }
.cl-tile { border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; background: #fff; }
.cl-tile b { display: block; font-size: 20px; font-variant-numeric: tabular-nums; }
.cl-tile span { font-size: 12px; color: var(--muted); }
.cl-tile.cl-done { border-color: #A7F3D0; }
.cl-tile.cl-skipped { border-color: #FCD34D; }
.cl-tile.cl-in_progress { border-color: #BFDBFE; }
.cl-tile.cl-reviewed { border-color: #DDD6FE; }
.cl-grp + .cl-grp { margin-top: 10px; }
.cl-grp-h { font-size: 13px; color: var(--muted); font-weight: 600; margin: 8px 0 0; text-transform: none; letter-spacing: 0; }
.cl-empty .btn { width: auto; }

/* лист прохождения */
.cl-meta { margin: 0 0 6px; }
.cl-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.cl-left { margin: 0 0 6px; color: #92400E; }
.cl-items { list-style: none; margin: 0; padding: 0; }
.cl-item { padding: 10px 0; border-bottom: 1px solid #F1F1F1; }
.cl-item:last-child { border-bottom: 0; }
.cl-i-top { display: flex; gap: 12px; align-items: flex-start; }
.cl-i-top input[type=checkbox] { width: 24px; height: 24px; flex: none; margin: 1px 0 0; accent-color: #059669; cursor: pointer; }
.cl-i-top label { flex: 1 1 auto; min-width: 0; overflow-wrap: anywhere; cursor: pointer; line-height: 1.35; padding-top: 2px; }
.cl-item.is-done .cl-i-top label { color: var(--muted); text-decoration: line-through; text-decoration-color: #9CA3AF; }
.cl-i-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 0 36px; align-items: center; }
.cl-tag { font-size: 12px; background: #FEF3C7; color: #78350F; border-radius: 999px; padding: 2px 8px; }
.cl-tag.soft { background: #F3F4F6; color: #4B5563; }
.cl-by { font-size: 12px; }
.cl-photos { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0 36px; }
.cl-ph { position: relative; width: 72px; height: 72px; border-radius: 8px; overflow: hidden; background: #F3F4F6; }
.cl-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cl-ph-x { position: absolute; top: 2px; right: 2px; width: 28px; height: 28px; border-radius: 50%; border: 0;
  background: rgba(17,24,39,.75); color: #fff; font-size: 13px; cursor: pointer; }
.cl-addph { position: relative; display: inline-flex; align-items: center; gap: 6px; width: auto; margin: 8px 0 0 36px;
  min-height: 40px; cursor: pointer; }
.cl-addph .cl-file { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.cl-addph:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.cl-com { margin: 6px 0 0 36px; display: flex; flex-direction: column; gap: 4px; }
.cl-com-l { font-size: 12px; color: var(--muted); }
.cl-com textarea { min-height: 40px; resize: vertical; }
.cl-extra { display: flex; gap: 16px; margin: 4px 0 0 36px; align-items: center; flex-wrap: wrap; }
.cl-link { display: inline-flex; align-items: center; gap: 4px; position: relative; font-size: 14px; color: var(--muted);
  background: none; border: 0; padding: 6px 0; min-height: 36px; cursor: pointer; font-family: inherit; font-weight: 400; text-decoration: none; }
.cl-link:hover { color: var(--ink); }
.cl-extra .cl-addph { margin: 0; }
.cl-com-v { margin: 0; overflow-wrap: anywhere; }
.cl-done { background: #F9FAFB; border-radius: 10px; padding: 8px 12px; margin-top: 10px; }
.cl-done p { margin: 4px 0; overflow-wrap: anywhere; }
.cl-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; }
.cl-acts .btn { width: auto; }
.cl-acts .cl-note { flex-basis: 100%; }
.cl-err { margin: 8px 0 0; }

/* шаблоны */
.cl-tpl { display: flex; gap: 10px; justify-content: space-between; align-items: center; padding: 12px 0;
  border-bottom: 1px solid #F1F1F1; flex-wrap: wrap; }
.cl-tpl:last-child { border-bottom: 0; }
.cl-tpl.is-off .cl-tpl-m b, .cl-tpl.is-arch .cl-tpl-m b { color: var(--muted); }
.cl-tpl-m { display: flex; flex-direction: column; min-width: 0; flex: 1 1 220px; }
.cl-tpl-m small { font-size: 12px; overflow-wrap: anywhere; }
.cl-tpl-a { display: flex; gap: 6px; flex-wrap: wrap; }
.cl-tpl-a .btn { width: auto; min-height: 40px; }
.cl-tform fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px 10px; margin: 0; min-width: 0; }
.cl-tform legend { font-size: 13px; color: var(--muted); padding: 0 4px; }
.cl-role-list { display: flex; flex-wrap: wrap; gap: 4px 14px; }
.cl-chk { display: inline-flex; gap: 6px; align-items: center; min-height: 32px; font-size: 14px; cursor: pointer; }
.cl-chk input { width: 18px; height: 18px; flex: none; }
.cl-tlist { margin: 0; padding: 0 0 0 20px; display: flex; flex-direction: column; gap: 10px; }
.cl-titem .inp { width: 100%; }
.cl-ti-opts { display: flex; flex-wrap: wrap; gap: 2px 12px; align-items: center; margin-top: 2px; }
.cl-ti-mv { margin-left: auto; display: inline-flex; gap: 2px; }
.cl-ti-mv .link { min-width: 36px; min-height: 36px; font-size: 16px; }
.cl-ti-mv .link:disabled { opacity: .3; }
.cl-sample { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--line); border-radius: 10px;
  margin-bottom: 8px; cursor: pointer; }
.cl-sample input { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.cl-sample span { display: flex; flex-direction: column; min-width: 0; }
.cl-sample small { font-size: 12px; overflow-wrap: anywhere; }

/* отчёт */
.cl-period { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.cl-period .inp { min-width: 0; }
.cl-rep-f .cl-filters { margin-bottom: 4px; }
.cl-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cl-table th, .cl-table td { padding: 8px 6px; border-bottom: 1px solid #F1F1F1; text-align: right; font-variant-numeric: tabular-nums; }
.cl-table th:first-child { text-align: left; font-weight: 600; overflow-wrap: anywhere; }
.cl-table thead th { font-size: 12px; color: var(--muted); font-weight: 600; }
.cl-pct { display: inline-flex; align-items: center; gap: 6px; }
.cl-pct .cl-prog { width: 44px; }
.cl-rtab .tbl-scroll { overflow-x: auto; }

/* «Итоги смены» и «Сегодня» */
.cl-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0 2px; }
.cl-chip { font-size: 12px; border-radius: 999px; padding: 2px 9px; background: #F3F4F6; color: #374151; }
.cl-chip.cl-in_progress { background: #DBEAFE; color: #1E40AF; }
.cl-chip.cl-done { background: #D1FAE5; color: #065F46; }
.cl-chip.cl-skipped { background: #FEF3C7; color: #92400E; }
.cl-chip.cl-reviewed { background: #EDE9FE; color: #5B21B6; }
.cl-today h2 { display: flex; gap: 6px; align-items: baseline; }

@media (min-width: 900px) {
  .cl-row { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1.2fr) auto auto; }
  .cl-row .cl-r-go { grid-column: auto; }
  .cl-r-tpl { grid-column: auto; }
  #view-checklists .cl-row:not(.cl-ctl) { grid-template-columns: minmax(0, 1fr) auto auto auto; }
  .cl-bar { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; }
  .cl-filters .inp { flex: 0 1 220px; }
  .cl-period { grid-template-columns: 200px 200px; }
  .cl-tiles { grid-template-columns: repeat(5, minmax(0, 160px)); }
  .cl-sheet.sheet { max-width: 640px; }
}
