/* hero.css */
/* Первый экран: история обслуживания одной единицы и карточка «Календаря ТО».
   Фон — сама страница, без подложки. Окно уходит за нижний край, карточка
   календаря стоит слева поверх боковой панели и поля. */
.rh .ss-stage {
  --gutter: 24px;
  --ss-accent: #6f66dd;
  --ss-accent-soft: rgba(111, 102, 221, 0.12);
  --ss-font: Inter, system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

.rh .rh-window {
  position: absolute;
  top: var(--gutter);
  left: 56px;
  right: var(--gutter);
  height: 520px;
  box-shadow: var(--ss-shadow-hero);
}

/* Боковая панель кабинета: светлая, с цветным логотипом */
.rh .rh-window .ss-window__side {
  background: #f6f7fb;
}

.rh .rh-side {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 6px 8px 0;
}

.rh .rh-side__logo {
  width: 84px;
  height: auto;
  margin: 2px 0 14px 4px;
}

.rh .rh-side__item {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 8px;
  border-radius: 7px;
}

.rh .rh-side__item[data-on] {
  background: #fff;
  box-shadow: 0 0 0 1px #e3e6ef;
}

.rh .rh-side__icon {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #dfe2ec;
}

.rh .rh-side__line {
  flex: none;
  height: 6px;
  border-radius: 3px;
  background: #e3e6ef;
}

.rh .rh-side__item[data-on] .rh-side__icon {
  background: #6f66dd;
}

.rh .rh-side__label {
  color: #2a293c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.rh .rh-main {
  padding: 16px 14px 0 24px;
}

.rh .rh-head {
  margin-bottom: 10px;
}

.rh .rh-title {
  color: #2a293c;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
}

/* Вкладки «Заявки» / «История обслуживания» */
.rh .rh-tabs {
  display: flex;
  gap: 18px;
  border-bottom: 1px solid #eceef5;
}

.rh .rh-tab {
  padding: 0 0 8px;
  color: #6b6a80;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.rh .rh-tab[data-on] {
  color: #2a293c;
  font-weight: 600;
  box-shadow: inset 0 -2px 0 #6f66dd;
}

.rh .rh-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 12px 0 10px;
}

.rh .rh-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 22px;
  padding: 0 8px 0 10px;
  border-radius: 6px;
  background: #f0effc;
  color: #2a293c;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
}

.rh .rh-filter__chip .ss-icon,
.rh .rh-filter__chip svg {
  color: #8b8aa0;
}

.rh .rh-cols,
.rh .rh-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) 100px;
  column-gap: 8px;
}

.rh .rh-cols {
  padding: 7px 10px;
  border-radius: 8px;
  background: #f4f5fa;
  color: #6b6a80;
  font-size: 10.5px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

.rh .rh-row {
  padding: 10px;
  border-bottom: 1px solid #eceef5;
  background: #fff;
}

.rh .rh-cell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  min-width: 0;
}

.rh .rh-row--filler .rh-cell {
  gap: 11px;
  padding-top: 3px;
}

.rh .rh-id {
  color: #6f66dd;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
}

.rh .rh-sub {
  color: #6b6a80;
  font-size: 10px;
  line-height: 1.3;
  white-space: nowrap;
}

.rh .rh-what {
  color: #2a293c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}

.rh .rh-total {
  color: #2a293c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
}

/* Повтор: та же кофемашина с той же неисправностью отмечается мягкой подложкой,
   другая единица приглушается */
.rh .rh-made {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: -4px -6px;
  padding: 4px 6px;
  border-radius: 7px;
  box-shadow: inset 0 0 0 1px transparent;
  transition: background-color 360ms ease, box-shadow 360ms ease;
}

.rh .rh-made[data-hl] {
  background: #efedfd;
  box-shadow: inset 0 0 0 1px #d6d2f7;
}

.rh .rh-made .rh-sub {
  transition: color 360ms ease;
}

.rh .rh-made[data-hl] .rh-sub {
  color: #4d44b8;
}

.rh .rh-slot .rh-row {
  transition: opacity 360ms ease;
}

.rh .rh-list[data-repeat] .rh-slot[data-other] .rh-row {
  opacity: 0.5;
}

/* Карточка «Календаря ТО»: слева поверх боковой панели, край окна под ней */
.rh .rh-cal {
  position: absolute;
  top: 244px;
  left: var(--gutter);
  width: 168px;
  padding: 12px 12px 12px;
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--ss-shadow-satellite), 0 26px 44px -20px rgba(42, 41, 60, 0.35);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 380ms ease, transform 520ms cubic-bezier(0.25, 0.8, 0.25, 1);
  will-change: transform;
}

.rh .rh-cal[data-on] {
  opacity: 1;
  transform: none;
}

.rh .rh-cal__head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 10px;
}

.rh .rh-cal__title {
  color: #2a293c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
}

.rh .rh-cal__month {
  color: #6b6a80;
  font-size: 10.5px;
  line-height: 1.3;
}

.rh .rh-cal__week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}

.rh .rh-cal__day {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 0 5px;
  border-radius: 6px;
  transition: background-color 300ms ease, color 300ms ease;
}

.rh .rh-cal__dow {
  color: #8b8aa0;
  font-size: 8.5px;
  line-height: 1;
}

.rh .rh-cal__num {
  color: #2a293c;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
}

.rh .rh-cal__day[data-muted] .rh-cal__num {
  color: #b3b2c4;
}

.rh .rh-cal__day[data-mark] {
  background: #6f66dd;
}

.rh .rh-cal__day[data-mark] .rh-cal__dow,
.rh .rh-cal__day[data-mark] .rh-cal__num {
  color: #fff;
}

/* Событие календаря — как карточка события в кабинете: объект, единица и номер ТО,
   исполнитель, когда будет создана заявка */
.rh .rh-event {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  margin-top: 10px;
  padding: 8px 6px 9px 10px;
  border-radius: 8px;
  background: #f0effc;
  box-shadow: inset 3px 0 0 #6f66dd;
  opacity: 0;
  transition: opacity 420ms ease;
}

.rh .rh-event[data-on] {
  opacity: 1;
}

.rh .rh-event__building {
  color: #6b6a80;
  font-size: 10px;
  line-height: 1.3;
}

.rh .rh-event__name {
  color: #2a293c;
  font-size: 11.5px;
  white-space: nowrap;
  font-weight: 600;
  line-height: 1.3;
}

.rh .rh-event__number {
  color: #4d44b8;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.3;
}

.rh .rh-event__line {
  display: flex;
  align-self: stretch;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.rh .rh-event__executor {
  display: inline-flex;
  align-items: center;
  height: 16px;
  gap: 4px;
  color: #2a293c;
  font-size: 10.5px;
  line-height: 1.3;
}

.rh .rh-event__executor svg {
  color: #8b8aa0;
}

.rh .rh-event__create {
  color: #6b6a80;
  font-size: 10px;
  line-height: 1.3;
}

/* Узкая версия: окно без боковой панели, строки в две колонки,
   в истории только кофемашина; календарь — поверх нижнего края окна */
.rh .ss-stage[data-layout='compact'] {
  --gutter: 16px;
}

.rh .ss-stage[data-layout='compact'] .rh-window {
  left: var(--gutter);
  right: var(--gutter);
  height: 560px;
}

.rh .ss-stage[data-layout='compact'] .rh-window .ss-window__side {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-cols {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-slot[data-other] {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-row {
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: 'id total' 'made made';
  row-gap: 5px;
  padding: 8px 10px 9px;
}

.rh .ss-stage[data-layout='compact'] .rh-cell--total .rh-sub {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-cell--id {
  grid-area: id;
  flex-direction: row;
  align-items: baseline;
  gap: 8px;
}

.rh .ss-stage[data-layout='compact'] .rh-cell--made {
  grid-area: made;
}

.rh .ss-stage[data-layout='compact'] .rh-cell--total {
  grid-area: total;
  align-items: flex-end;
}

.rh .ss-stage[data-layout='compact'] .rh-made {
  flex-direction: row;
  align-items: baseline;
  gap: 6px;
}

.rh .ss-stage[data-layout='compact'] .rh-row--filler .rh-cell--made {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-cal {
  top: auto;
  bottom: var(--gutter);
  left: 28px;
  right: 28px;
  width: auto;
  display: grid;
  grid-template-columns: 1fr;
}

.rh .ss-stage[data-layout='compact'] .rh-cal {
  padding-bottom: 0;
  overflow: hidden;
}

.rh .ss-stage[data-layout='compact'] .rh-cal__head {
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0;
}

.rh .ss-stage[data-layout='compact'] .rh-cal__week {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-event__building {
  display: none;
}

.rh .ss-stage[data-layout='compact'] .rh-event__create {
  white-space: nowrap;
}

.rh .ss-stage[data-layout='compact'] .rh-event {
  margin: 10px -12px 0;
  padding: 9px 12px 11px;
  border-radius: 0 0 12px 12px;
  box-shadow: inset 0 1px 0 #e3e1f8;
}


.rh .ss-stage[data-layout='compact'] .rh-event {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px;
  row-gap: 0;
  align-items: baseline;
}

.rh .ss-stage[data-layout='compact'] .rh-event__line {
  display: contents;
}

.rh .ss-stage[data-layout='compact'] .rh-event__name { grid-area: 1 / 1; }
.rh .ss-stage[data-layout='compact'] .rh-event__number { grid-area: 1 / 2; justify-self: end; }
.rh .ss-stage[data-layout='compact'] .rh-event__create { grid-area: 2 / 1; }
.rh .ss-stage[data-layout='compact'] .rh-event__executor { grid-area: 2 / 2; justify-self: end; }

/* У Collapse атрибут data-reveal, как у блоков главной (home-motion.ts, .js-reveal [data-reveal]):
   правило сайта без слоя перебивает набор и прячет строки. Возвращаем поведение набора. */
.js-reveal .ss-collapse[data-reveal] {
  opacity: 0;
  transform: none;
  transition: grid-template-rows 0.42s cubic-bezier(0.4, 0, 0.2, 1) 0.05s, opacity 0.42s cubic-bezier(0, 0.8, 0.5, 1);
}

.js-reveal .ss-collapse[data-reveal][data-open] {
  opacity: 1;
  transition: grid-template-rows 0.46s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease-out 0.15s;
}

.js-reveal .ss-collapse[data-reveal][data-tall][data-open] {
  transition: grid-template-rows 0.46s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.24s ease-out 0.3s;
}

/* status.css */
/* Блок «видят одно и то же»: два кабинета по бокам, телефон мастера в центре.
   Окна уходят за нижний край, телефон тоже; одно поле — 40px. */
.rs .ss-stage {
  --gutter: 40px;
  --ss-accent: #6f66dd;
  --ss-accent-soft: rgba(111, 102, 221, 0.12);
  --ss-font: Inter, system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

.rs .rs-window {
  position: absolute;
  top: var(--gutter);
  width: 400px;
  height: 680px;
  box-shadow: var(--ss-shadow-hero);
}

.rs .rs-window--owner {
  left: var(--gutter);
}

.rs .rs-window--service {
  right: var(--gutter);
  top: 56px;
}

.rs .rs-window .ss-window__body {
  background: #fff;
}

.rs .rs-main {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 24px 0;
}

/* Внутренний край окна закрыт телефоном: содержимое отодвинуто от него */
.rs .rs-window--service .rs-main {
  padding-left: 84px;
}

.rs .rs-window--owner .rs-main {
  padding-right: 84px;
}

/* Карточки в окне не сжимаются по высоте: окно режет их краем, а не плющит */
.rs .rs-main > * {
  flex: none;
}

.rs .rs-role {
  color: #2a293c;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.3;
}

.rs .rs-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e6ef, 0 6px 16px -8px rgba(42, 41, 60, 0.12);
}

.rs .rs-card__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  align-self: stretch;
}

.rs .rs-id {
  color: #6f66dd;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
}

.rs .rs-what {
  color: #2a293c;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
}

.rs .rs-where {
  margin-top: -4px;
  color: #6b6a80;
  font-size: 11px;
  line-height: 1.3;
}

/* Плашка статуса, как в кабинете */
.rs .rs-status {
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 10px;
  border-radius: 6px;
  color: #2a293c;
  font-size: 12px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  background: #e4e2fa;
  transition: background-color 220ms ease, color 220ms ease;
  will-change: transform;
}

.rs .rs-status[data-status='done'] {
  background: #4d44b8;
  color: #fff;
}

.rs .rs-exec {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #2a293c;
  font-size: 12px;
  line-height: 1.3;
}

.rs .rs-sec {
  color: #2a293c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
}

/* «Комментарии» владельца: записка диспетчера, затем мастера с фото */
.rs .rs-comments {
  align-items: stretch;
  gap: 10px;
}

.rs .rs-msg {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.rs .rs-msg > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rs .rs-msg__who {
  color: #6b6a80;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.3;
}

.rs .rs-msg__text {
  color: #2a293c;
  font-size: 12px;
  line-height: 1.35;
}

.rs .rs-msg--shot {
  grid-template-columns: 22px minmax(0, 1fr) 44px;
}

.rs .rs-msg__shot {
  display: block;
  width: 44px;
}

.rs .rs-msg__shot .rs-shot {
  border-radius: 8px;
}

.rs .rs-card .rs-accept {
  align-self: stretch;
}

.rs .rs-card .rs-accept .rs-accept__btn {
  margin-top: 4px;
}

.rs .rs-accept__btn {
  --ss-accent: #6f66dd;
  font-weight: 600;
}

/* «Итоговая стоимость», как в приложении: салатовая плашка */
.rs .rs-cost {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  border-radius: 12px;
  background: #e3f0a6;
  color: #2a293c;
}

.rs .rs-cost__row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.3;
}

.rs .rs-cost__row b {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.rs .rs-cost__row--total {
  margin-top: 2px;
  padding-top: 8px;
  border-top: 1px solid rgba(42, 41, 60, 0.18);
  font-size: 13px;
  font-weight: 700;
}

.rs .rs-cost__row--total b {
  font-weight: 800;
}

/* Фото с объекта */
.rs .rs-shot {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
}

/* Телефон мастера: по центру, поверх внутренних краёв окон */
.rs .rs-phone {
  position: absolute;
  top: var(--gutter);
  left: 380px;
  box-shadow: var(--ss-shadow-satellite), 0 30px 50px -20px rgba(42, 41, 60, 0.35);
}

/* Экран — в точках iOS */
.rs .rs-app {
  display: flex;
  flex-direction: column;
  gap: 14px;
  height: 100%;
  padding: 52px 20px 0;
  background: #f5f6fb;
  font-family: Inter, -apple-system, system-ui, sans-serif;
}

.rs .rs-app__id {
  color: #6f66dd;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.3;
}

.rs .rs-app__status .rs-status {
  height: 34px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 17px;
}

.rs .rs-app__unit {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rs .rs-app__name {
  color: #2a293c;
  font-size: 19px;
  font-weight: 700;
  line-height: 1.3;
}

.rs .rs-app__place {
  color: #6b6a80;
  font-size: 16px;
  line-height: 1.3;
}

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

.rs .rs-app__label {
  color: #6b6a80;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}

.rs .rs-app__grid,
.rs .rs-mini__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.rs .rs-mini__grid {
  grid-template-columns: repeat(3, 56px);
}

.rs .rs-mini__grid .rs-shot {
  border-radius: 8px;
}

/* Ячейка «+»: после касания в ней встаёт фото */
.rs .rs-slot {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  box-shadow: inset 0 0 0 1.5px #c9c6f0;
}

.rs .rs-slot--mini {
  border-radius: 8px;
}

.rs .rs-add {
  color: #6f66dd;
  font-size: 28px;
  font-weight: 400;
  line-height: 1;
  transition: opacity 180ms ease;
}

.rs .rs-slot--mini .rs-add {
  font-size: 22px;
}

.rs .rs-fresh {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(0.86);
  transition: opacity 260ms ease, transform 320ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.rs .rs-slot[data-on] .rs-fresh {
  opacity: 1;
  transform: none;
}

.rs .rs-slot[data-on] .rs-add {
  opacity: 0;
}

.rs .rs-slot--mini .rs-fresh .rs-shot {
  border-radius: 8px;
}

.rs .rs-next {
  display: grid;
  place-items: center;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: #6f66dd;
  color: #fff;
  font: inherit;
  font-size: 17px;
  font-weight: 600;
  transition: background-color 220ms ease, color 220ms ease, transform 160ms ease;
  will-change: transform;
}

.rs .rs-next[data-pressed] {
  transform: scale(0.97);
}

.rs .rs-next[data-done] {
  background: #4d44b8;
  color: #fff;
}

/* Узкая версия: одна панель, три вида заявки секциями; панель уходит за нижний край */
.rs .rs-stack {
  position: absolute;
  top: 16px;
  right: 16px;
  bottom: -60px;
  left: 16px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 0 0 1px #e3e6ef, var(--ss-shadow-hero);
}

.rs .rs-mini {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #eceef5;
  will-change: transform;
}

.rs .rs-mini__role {
  color: #6b6a80;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.rs .rs-mini__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rs .rs-next--mini {
  height: 40px;
  border-radius: 10px;
  font-size: 14px;
}

.rs .rs-msg--mini {
  align-items: center;
}

.rs .rs-mini__cost {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #e3f0a6;
  color: #2a293c;
  font-size: 13px;
  line-height: 1.3;
}

.rs .rs-mini__cost b {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

.rs .rs-accept__btn--wide {
  width: 100%;
  justify-content: center;
}
