.mobile-more {
  display: none;
}

@media (max-width: 760px) {
  .mobile-more {
    display: inline-flex;
  }
}

.no-anim {
  animation: none !important;
}

.hide-sm {}
.show-sm {
  display: none;
}

@media (max-width: 760px) {
  .hide-sm {
    display: none;
  }
  .show-sm {
    display: block;
  }
}

.lock-note {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink-3);
}

.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--ink-2);
}

.legend i,
.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 6px;
  vertical-align: -1px;
}

/* ---------- фильтры ---------- */

.filters {
  display: flex;
  gap: var(--s2);
  padding: var(--s4) var(--s4) var(--s3);
  flex-wrap: wrap;
  align-items: center;
}

.filters-search {
  flex: 1 1 260px;
}

.filters-chips {
  padding: 0 var(--s4) var(--s3);
  gap: 6px;
}

/* ---------- смена ---------- */

.bay-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: var(--s3);
}

.bay-card {
  padding: var(--s3);
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 168px;
  background: var(--panel-2);
  border-color: transparent;
  cursor: default;
}

.bay-card[data-open-order] {
  cursor: pointer;
  background: var(--panel);
  border-color: var(--line);
}

.bay-card[data-open-order]:hover {
  border-color: var(--line-strong);
}

.bay-card.is-free {
  border: 1.5px dashed var(--line-strong);
  background: transparent;
}

.bay-card.is-blocked {
  background: repeating-linear-gradient(135deg, var(--panel-2) 0 8px, var(--panel) 8px 16px);
}

.bay-card .btn {
  margin-top: auto;
  align-self: flex-start;
}

.bay-name {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 13px;
}

.bay-name strong {
  font-size: 14px;
}

.bay-svc {
  font-size: 14px;
  color: var(--ink-2);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bay-free {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--st-ready);
}

.queue-item {
  cursor: pointer;
}

.queue-item:hover {
  background: var(--panel-2);
}

.list-item[data-open-order] {
  cursor: pointer;
}

.list-item[data-open-order]:hover {
  background: var(--panel-2);
}

.shift-cols {
  align-items: start;
}

.idle-panel {
  border-color: color-mix(in srgb, var(--signal) 55%, var(--line));
  background:
    linear-gradient(var(--panel), var(--panel)) padding-box;
  position: relative;
  overflow: hidden;
}

.idle-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: repeating-linear-gradient(135deg, var(--signal) 0 10px, var(--ink) 10px 20px);
  opacity: 0.85;
}

.idle-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--signal-soft);
  color: var(--ink);
  flex-shrink: 0;
}

/* ---------- карточка заказа ---------- */

.timeline {
  list-style: none;
  margin: 0;
  padding: 0 0 0 16px;
  border-left: 2px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-size: 14px;
}

.timeline li {
  position: relative;
  display: flex;
  flex-direction: column;
}

.timeline li::before {
  content: "";
  position: absolute;
  left: -22px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--panel);
  border: 2px solid var(--primary);
}

.timeline li span.muted {
  font-size: 12px;
}

.mini {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--panel-2);
}

.mini strong {
  font-size: 16px;
}

/* ---------- запись ---------- */

.svc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
}

.svc {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  min-height: 60px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  text-align: left;
}

.svc:hover {
  border-color: var(--primary);
}

.svc[aria-pressed="true"] {
  border-color: var(--primary);
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1px var(--primary);
}

.svc-name {
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
}

.svc-meta {
  font-size: 12px;
  color: var(--ink-3);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.slot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 8px 12px;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line-strong);
  background: var(--panel);
  font-size: 12px;
  color: var(--ink-3);
  text-align: left;
}

.slot strong {
  font-size: 16px;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.slot[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: rgba(255, 255, 255, 0.85);
}

.slot[aria-pressed="true"] strong {
  color: #fff;
}

/* ---------- календарь ---------- */

.cal-panel {
  overflow: hidden;
}

.cal-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s3);
  padding: var(--s3) var(--s4);
  flex-wrap: wrap;
}

.cal-date {
  margin-left: 8px;
  font-size: 15px;
  white-space: nowrap;
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  padding: 0 var(--s4) var(--s3);
  font-size: 12px;
  color: var(--ink-2);
}

.cal-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-right: 5px;
  vertical-align: -1px;
  background: var(--tone-soft);
  border-left: 3px solid var(--tone);
}

.cal-legend i.is-idle {
  background: repeating-linear-gradient(135deg, var(--signal) 0 2px, var(--signal-soft) 2px 4px);
  border: 1px solid var(--signal);
}

.cal-scroll {
  position: relative;
  overflow: auto;
  max-height: calc(100dvh - var(--topbar-h) - 200px);
  min-height: 460px;
  border-top: 1px solid var(--line);
  overscroll-behavior: contain;
}

.cal-grid {
  --col: 158px;
  position: relative;
  display: grid;
  grid-template-columns: 72px repeat(var(--bays), minmax(var(--col), 1fr));
  grid-template-rows: 48px auto;
  min-width: calc(72px + var(--bays) * var(--col));
}

.cal-corner,
.cal-head {
  position: sticky;
  top: 0;
  z-index: 7;
  height: 48px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.cal-corner {
  left: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  color: var(--ink-3);
  border-right: 1px solid var(--line);
}

.cal-head {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 0 10px;
  border-right: 1px solid var(--line);
  font-size: 14px;
  line-height: 1.2;
}

.cal-load {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-3);
  margin-top: 4px;
}

.cal-load .progress {
  height: 4px;
}

.cal-times {
  position: sticky;
  left: 0;
  z-index: 5;
  background: var(--panel);
  border-right: 1px solid var(--line);
}

.cal-hour {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 6px 0 8px;
  border-top: 1px solid var(--line);
  font-size: 12px;
}

.cal-hour.is-rain {
  background: color-mix(in srgb, var(--st-booked) 9%, var(--panel));
  box-shadow: inset 3px 0 0 var(--st-booked);
}

.cal-hour-label {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.cal-wx {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  color: var(--ink-3);
  font-size: 11px;
}

.cal-hour.is-rain .cal-wx {
  color: var(--st-booked);
}

.cal-col {
  position: relative;
  border-right: 1px solid var(--line);
  background-image:
    linear-gradient(to bottom, var(--line) 1px, transparent 1px),
    linear-gradient(to bottom, color-mix(in srgb, var(--line) 45%, transparent) 1px, transparent 1px);
  background-size: 100% 90px, 100% 45px;
  cursor: copy;
}

.cal-col.is-target {
  background-color: color-mix(in srgb, var(--primary) 6%, transparent);
}

.cal-card {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 2;
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 4px 8px;
  border-radius: 8px;
  background: var(--tone-soft);
  box-shadow: inset 3px 0 0 var(--tone);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.3;
  overflow: hidden;
  cursor: pointer;
  touch-action: pan-y;
  user-select: none;
}

.cal-card:hover {
  filter: brightness(0.98);
  box-shadow: inset 3px 0 0 var(--tone), 0 0 0 1px var(--tone);
}

.cal-card.is-draggable {
  cursor: grab;
  touch-action: none;
}

.cal-card.is-dragging {
  cursor: grabbing;
  z-index: 20;
  opacity: 0.94;
  box-shadow: inset 3px 0 0 var(--tone), var(--shadow-float);
}

.cal-card.is-done {
  opacity: 0.72;
}

.cal-card.is-compact {
  flex-direction: row;
  align-items: center;
}

.cal-card-top {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.cal-time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.cal-flag {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: var(--signal);
  color: var(--signal-ink);
}

.cal-plate {
  margin-left: auto;
  font-weight: 600;
  font-size: 11px;
  white-space: nowrap;
  letter-spacing: 0.02em;
}

.cal-svc {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-client {
  color: var(--ink-3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cal-idle {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1.5px dashed color-mix(in srgb, var(--signal) 80%, var(--ink));
  background: repeating-linear-gradient(135deg, var(--signal-soft) 0 9px, color-mix(in srgb, var(--signal) 30%, var(--signal-soft)) 9px 11px);
}

.cal-idle-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  background: var(--signal-soft);
  padding: 0 4px;
  border-radius: 4px;
}

.cal-idle .btn {
  min-height: 30px;
}

.cal-block {
  position: absolute;
  left: 4px;
  right: 4px;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: repeating-linear-gradient(135deg, var(--panel-2) 0 6px, color-mix(in srgb, var(--ink-3) 18%, var(--panel-2)) 6px 8px);
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.cal-now {
  position: absolute;
  left: 72px;
  right: 0;
  z-index: 6;
  height: 2px;
  background: var(--now);
  pointer-events: none;
}

.cal-now span {
  position: absolute;
  left: -54px;
  top: -9px;
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--now);
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 760px) {
  .cal-grid {
    --col: 136px;
    grid-template-columns: 56px repeat(var(--bays), minmax(var(--col), 1fr));
    min-width: calc(56px + var(--bays) * var(--col));
  }
  .cal-now {
    left: 56px;
  }
  .cal-now span {
    left: -50px;
  }
  .cal-legend {
    display: none;
  }
  .cal-scroll {
    max-height: calc(100dvh - 250px);
  }
  .cal-toolbar {
    padding: var(--s3);
    gap: var(--s2);
  }
  .cal-toolbar > .row:first-child {
    flex-wrap: wrap !important;
  }
  .cal-date {
    order: -1;
    width: 100%;
    font-size: 14px;
    margin: 0 0 4px;
    white-space: normal;
  }
}

.week-table th.is-today .week-day {
  color: var(--primary);
}

.week-day {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  background: none;
  font-weight: 600;
  padding: 4px 0;
  color: var(--ink-2);
}

.week-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  width: 100%;
  min-width: 74px;
  min-height: 52px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 0;
  font-size: 12px;
}

.week-load {
  font-weight: 600;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.load-lo {
  background: var(--signal-soft);
}

.load-mid {
  background: var(--st-work-soft);
}

.load-hi {
  background: color-mix(in srgb, var(--primary) 30%, var(--panel));
}

.week-table td {
  padding: 4px;
}

/* ---------- клиенты ---------- */

.consents {
  display: flex;
  gap: 4px;
}

.consent {
  display: inline-grid;
  place-items: center;
  min-width: 26px;
  height: 22px;
  padding: 0 4px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--ink-3);
  background: var(--panel-2);
  text-decoration: line-through;
}

.consent.is-on {
  color: var(--st-ready);
  background: var(--st-ready-soft);
  text-decoration: none;
}

/* ---------- смарт-предложения ---------- */

.offers-top {
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
}

@media (max-width: 1100px) {
  .offers-top {
    grid-template-columns: minmax(0, 1fr);
  }
}

.wx-strip {
  display: flex;
  justify-content: space-around;
  padding-left: 60px;
  margin-bottom: 4px;
  font-size: 12px;
  color: var(--ink-3);
}

.wx-strip span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}

.offer-builder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: var(--s4);
  align-items: start;
}

@media (max-width: 1100px) {
  .offer-builder {
    grid-template-columns: minmax(0, 1fr);
  }
}

.builder-summary {
  position: sticky;
  top: calc(var(--topbar-h) + 16px);
  border-color: color-mix(in srgb, var(--signal) 55%, var(--line));
}

.step-head {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: var(--s4) var(--s4) 0;
}

.step-head + .step-body {
  padding: var(--s3) var(--s4) var(--s4) calc(var(--s4) + 40px);
  border-bottom: 1px solid var(--line);
}

.builder-main .step-body:last-child {
  border-bottom: 0;
}

.step-num {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  font-size: 13px;
  flex-shrink: 0;
}

@media (max-width: 560px) {
  .step-head + .step-body {
    padding-left: var(--s4);
  }
}

.win-chip {
  min-height: 34px;
}

.win-chip .muted {
  margin-left: 4px;
}

.win-chip[aria-pressed="true"] .muted {
  color: rgba(255, 255, 255, 0.8);
}

.range {
  width: 100%;
  accent-color: var(--primary);
  min-height: 32px;
}

.price-line {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 14px 0 10px;
  padding: 12px;
  border-radius: 12px;
  background: var(--panel-2);
}

.price-line > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.price-line strong {
  font-size: 16px;
}

.price-offer {
  color: var(--primary);
}

@media (max-width: 640px) {
  .price-line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.audience-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin: 12px 0 8px;
  font-size: 14px;
  color: var(--ink-2);
}

.audience-summary strong {
  color: var(--ink);
  font-size: 16px;
}

.score {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 13px;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.sms-preview {
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px 14px 14px 4px;
  background: var(--panel-2);
  border: 1px solid var(--line);
  max-width: 460px;
}

.sms-preview p {
  margin: 4px 0;
  font-size: 14px;
}

/* ---------- графики ---------- */

.chart {
  display: block;
  max-width: 100%;
  height: auto;
  overflow: visible;
}

.chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart .base-line {
  stroke: var(--line-strong);
  stroke-width: 1;
}

.chart .axis {
  fill: var(--ink-3);
  font-size: 11px;
  font-family: var(--font-ui);
}

.chart .threshold {
  stroke: var(--ink-2);
  stroke-width: 1.5;
  stroke-dasharray: 5 4;
}

.chart .threshold-label {
  fill: var(--ink-2);
  font-weight: 600;
}

.chart .hit {
  cursor: default;
  outline: none;
}

.chart .hit:hover,
.chart .hit:focus {
  fill: color-mix(in srgb, var(--ink) 5%, transparent);
}

.chart-scroll {
  overflow-x: auto;
}

.ba-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: var(--s5);
  align-items: center;
}

.ba-stats {
  display: flex;
  flex-direction: column;
  gap: var(--s4);
}

.ba-stats > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.ba-stats strong {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 22px;
  letter-spacing: -0.02em;
}

@media (max-width: 900px) {
  .ba-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .ba-stats {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--s3) var(--s5);
  }
}

.funnel {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.funnel-row {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr) 110px;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  outline: none;
}

.funnel-row:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 4px;
}

.funnel-track {
  height: 18px;
  border-radius: 4px;
  background: var(--panel-2);
  overflow: hidden;
}

.funnel-bar {
  display: block;
  height: 100%;
  border-radius: 0 4px 4px 0;
  background: var(--primary);
}

.funnel-row:last-child .funnel-bar {
  background: var(--signal);
}

.funnel-val {
  text-align: right;
  font-weight: 600;
}

.funnel-val .muted {
  font-weight: 400;
  font-size: 12px;
}

@media (max-width: 480px) {
  .funnel-row {
    grid-template-columns: 96px minmax(0, 1fr) 84px;
    gap: 6px;
  }
}

.heatmap {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: var(--ink-3);
}

.hm-col {
  text-align: center;
}

.hm-row {
  display: flex;
  align-items: center;
}

.hm-cell {
  aspect-ratio: 1.3;
  min-height: 16px;
  border-radius: 3px;
  outline: none;
}

.hm-cell:hover,
.hm-cell:focus {
  box-shadow: 0 0 0 2px var(--ink);
}

/* ---------- настройки ---------- */

.tabs {
  display: flex;
  gap: 4px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
  scrollbar-width: none;
}

.tabs button {
  min-height: 44px;
  padding: 8px 14px;
  border: 0;
  background: none;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-weight: 500;
  white-space: nowrap;
}

.tabs button[aria-selected="true"] {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

/* ---------- исполнитель ---------- */

.task {
  padding: var(--s4);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.task-current {
  border: 2px solid var(--primary);
}

.task-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--s3);
}
