/* Режим администратора: загрузка дня и сетка времени по мастерам. */
.screen--admin { gap: 16px; padding-top: 12px; }

.adm-nav { display: flex; align-items: center; gap: 4px; margin: 0 -8px; }
.adm-nav__mid { flex: 1; min-width: 0; display: flex; flex-direction: column; align-items: center; }
.adm-nav__title { font: 400 22px/1.2 var(--serif); text-align: center; white-space: nowrap; }
.adm-nav__sub { min-height: 44px; display: inline-flex; align-items: center; font-size: 13px; color: var(--ink-3); }
.adm-nav__mid .linkbtn { color: var(--accent-ink); }
.adm-nav__title:focus { outline: none; }

.load {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px 20px;
  align-items: center;
  padding: 16px;
  border-radius: var(--r-card);
  background: var(--surface);
  box-shadow: 0 0 0 1px var(--line);
}
.load__head { display: flex; flex-direction: column; gap: 4px; }
.load__big { font: 400 44px/1 var(--serif); color: var(--accent-ink); }
.load__big span { font-size: 24px; margin-left: 2px; }
.load__sub { font-size: 13px; color: var(--ink-3); line-height: 1.4; }
.load__sub .num { color: var(--ink-2); }
.lbars { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbar { display: grid; grid-template-columns: 22px 44px 1fr 36px; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.lbar__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbar__track { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.lbar__fill { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }
.lbar__val { text-align: right; }
.lbar.is-off { color: var(--ink-3); }
.lbar.is-off .lbar__val { font-size: 11px; grid-column: 3 / 5; text-align: left; }
.lbar.is-off .lbar__track { display: none; }

.hint--admin { margin-top: -4px; }

/* сетка времени */
.grid { --k: 1.1; --gutter: 40px; margin: 0 -16px; background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.grid__head {
  position: sticky;
  top: var(--top-h);
  z-index: 10;
  display: grid;
  grid-template-columns: var(--gutter) repeat(4, 1fr);
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}
.gh { display: flex; align-items: center; gap: 4px; min-width: 0; padding: 8px 4px; font-size: 12px; font-weight: 500; }
.gh span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.gh--time { padding: 0; }

.grid__body {
  position: relative;
  display: grid;
  grid-template-columns: var(--gutter) repeat(4, 1fr);
  height: calc(var(--rows) * var(--k) * 1px + 16px);
  padding-top: 8px;
  overflow: hidden;
}
.gtime { position: static; }
.hline { position: absolute; left: 0; right: 0; top: calc(var(--s) * var(--k) * 1px + 8px); height: 0; border-top: 1px solid var(--line); pointer-events: none; }
.hline__t { position: absolute; left: 4px; top: -8px; padding: 0 2px; background: var(--surface); font-size: 11px; color: var(--ink-3); }
.gcol { position: relative; border-left: 1px solid var(--line); }

.off, .bk { position: absolute; top: calc(var(--s) * var(--k) * 1px); height: calc(var(--d) * var(--k) * 1px); }
.off { left: 0; right: 0; background: repeating-linear-gradient(135deg, rgba(30, 26, 23, .05) 0 4px, transparent 4px 8px); }
.off--day { display: grid; place-items: start center; padding-top: 16px; }
.off--day span { font-size: 12px; color: var(--ink-3); writing-mode: vertical-rl; transform: rotate(180deg); }

.bk {
  left: 3px;
  right: 3px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  padding: 4px 6px;
  overflow: hidden;
  border: 0;
  border-left: 3px solid var(--tone);
  border-radius: 6px;
  background: var(--tone-bg);
  text-align: left;
  font-size: 11px;
  line-height: 1.3;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  cursor: grab;
  transition: box-shadow var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}
.bk:hover { box-shadow: 0 0 0 1px var(--line-2); }
.bk--clay { --tone: #B8684B; --tone-bg: #F6E9E1; }
.bk--moss { --tone: #6F8B63; --tone-bg: #E9EFE5; }
.bk--ink { --tone: #5E6673; --tone-bg: #E9EBEF; }
.bk--sand { --tone: #A88A47; --tone-bg: #F5EEDD; }
.bk__time { display: flex; align-items: center; gap: 4px; font-weight: 500; color: var(--ink); }
.bk__svc { color: var(--ink); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk__client { color: var(--ink-3); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk.is-short .bk__client { display: none; }
.bk.is-new { box-shadow: inset 0 0 0 1.5px var(--accent); background: var(--accent-soft); border-left-color: var(--accent); }
.bk__new { font-size: 10px; font-weight: 500; color: var(--accent-ink); }
.bk.is-lift { box-shadow: 0 0 0 2px var(--ink-3); }
.bk.is-drag { z-index: 5; cursor: grabbing; box-shadow: 0 6px 16px rgba(30, 26, 23, .18), 0 0 0 1.5px var(--ink); }
.bk.is-drag.is-bad { box-shadow: 0 6px 16px rgba(30, 26, 23, .18), 0 0 0 2px var(--danger); background: var(--danger-soft); }

.nowline {
  position: absolute;
  left: var(--gutter);
  right: 0;
  z-index: 3;
  top: calc(var(--s) * var(--k) * 1px + 8px);
  height: 0;
  border-top: 1.5px solid var(--accent);
  pointer-events: none;
}
.nowline span { position: absolute; left: -40px; top: -9px; width: 38px; text-align: right; font-size: 10px; font-weight: 600; color: var(--accent-ink); background: var(--surface); }

/* нижний лист переноса */
.mover { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px; border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); }
.mover__time { font: 400 26px/1 var(--serif); }
.mover__status { min-height: 20px; font-size: 14px; color: var(--ink-3); }
.mover__status.is-ok { color: var(--ok); }
.mover__status.is-bad { color: var(--danger); }

@media (max-width: 359px) {
  .grid { --gutter: 34px; }
  .bk__new { display: none; }
  .adm-nav__title { font-size: 20px; }
  .load { grid-template-columns: 1fr; }
  .load__head { flex-direction: row; align-items: baseline; gap: 12px; }
}
