/* Вкладка «Смены»: интерактивная шкала окон недели, карточки подработок и дашборд «Мои часы». */

.wk-top {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.9rem 1rem 0.35rem;
}
.wk-badge {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--study);
  background: color-mix(in srgb, var(--study) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--study) 32%, transparent);
  border-radius: var(--radius-pill);
  padding: 0.18rem 0.65rem;
}

/* ---------- окна недели: семь строк-шкал 8:00–22:00 ---------- */
.wk-week {
  margin: 0.5rem 1rem 0.25rem;
  padding: 0.85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-xs);
}
.wk-week__ticks, .wk-row {
  display: grid;
  grid-template-columns: 3.2rem minmax(0, 1fr) 1.5rem;
  gap: 0.6rem;
  align-items: center;
}
.wk-week__axis {
  position: relative;
  height: 1.1rem;
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.wk-week__axis span {
  position: absolute;
  transform: translateX(-50%);
}
.wk-week__axis span:first-child { transform: none; }

.wk-row {
  appearance: none;
  width: 100%;
  border: 0;
  background: none;
  cursor: pointer;
  color: inherit;
  text-align: left;
  padding: 0.32rem 0.25rem;
  border-radius: var(--radius-s);
  transition: background-color 0.2s var(--ease-out);
}
.wk-row:hover {
  background: color-mix(in srgb, var(--paper-2) 70%, transparent);
}
.wk-row__d {
  font-size: 0.82rem;
  color: var(--muted);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.wk-row__d b {
  color: var(--ink);
  font-weight: 600;
}
.wk-row__n {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--live);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.wk-row__t {
  position: relative;
  height: 18px;
  border-radius: 6px;
  background: var(--paper-2);
  overflow: hidden;
  border: 1px solid var(--rule);
  transition: transform 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.wk-row__t .b {
  position: absolute;
  top: 0;
  bottom: 0;
}
.wk-row[aria-pressed="true"] .wk-row__d b,
.wk-row[aria-pressed="true"] .wk-row__d {
  color: var(--focus);
}
.wk-row[aria-pressed="true"] .wk-row__t {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.b--free {
  background: color-mix(in srgb, var(--live) 22%, transparent);
}
.b--lesson {
  background: var(--ink);
  opacity: 0.8;
}
.b--busy {
  background: repeating-linear-gradient(135deg, var(--muted) 0 2px, transparent 2px 5px);
}
.b--shift {
  top: 3px !important;
  bottom: 3px !important;
  border-radius: 4px;
  background: var(--live);
  box-shadow: 0 0 0 1.5px var(--surface);
}
.b--shift.is-off {
  background: var(--surface);
  box-shadow: inset 0 0 0 1.5px var(--muted);
}
.wk-row__t .now {
  position: absolute;
  top: -2px;
  bottom: -2px;
  width: 2.5px;
  background: var(--study);
  box-shadow: 0 0 6px var(--study);
}

.wk-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1rem;
  margin: 0.65rem 0 0;
  padding-left: 0.25rem;
  font-size: 0.75rem;
  color: var(--muted);
}
.wk-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
.wk-legend i {
  display: inline-block;
  width: 14px;
  height: 8px;
  border-radius: 3px;
}
.wk-legend .b--shift { box-shadow: none; }

/* ---------- плашки и фильтр ---------- */
.wk-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  margin: 0.75rem 1rem 0.25rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  box-shadow: var(--shadow-xs);
  font-size: 0.86rem;
  color: var(--muted);
}
.wk-note .link-btn {
  flex: none;
  font-size: 0.86rem;
}
.wk-note.is-warn {
  border-color: color-mix(in srgb, var(--study) 45%, var(--rule));
  background: color-mix(in srgb, var(--study) 8%, var(--surface));
  color: var(--text);
}
.wk-filter {
  margin: 0.85rem 1.15rem 0;
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink);
  display: flex;
  gap: 0.6rem;
  align-items: baseline;
  flex-wrap: wrap;
}
.wk-center {
  text-align: center;
  margin-top: -0.5rem;
  padding-bottom: 2rem;
}

/* ---------- карточка смены в ленте ---------- */
.wk-list {
  list-style: none;
  margin: 0;
  padding: 0 1rem 0.6rem;
  display: grid;
  gap: 0.65rem;
}
.wk-card {
  appearance: none;
  width: 100%;
  border: 1px solid var(--rule);
  background: var(--surface);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-xs);
  cursor: pointer;
  text-align: left;
  color: inherit;
  display: grid;
  grid-template-columns: 4.1rem minmax(0, 1fr);
  gap: 0.95rem;
  padding: 1rem 1.15rem;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s var(--ease-out), border-color 0.25s var(--ease-out);
}
.wk-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--rule-strong);
}
.wk-card__time {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.08rem;
  padding: 0.45rem 0.3rem;
  background: var(--paper-2);
  border-radius: var(--radius-m);
  border: 1px solid var(--rule);
  font-variant-numeric: tabular-nums;
  text-align: center;
  align-self: start;
}
.wk-card__time b {
  font-family: var(--ff-display);
  font-weight: 700;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--ink);
}
.wk-card__time span {
  font-size: 0.76rem;
  color: var(--muted);
}
.wk-card__time small {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--focus);
  margin-top: 0.15rem;
}
.wk-card__main {
  display: grid;
  gap: 0.3rem;
  min-width: 0;
}
.wk-card__title {
  font-size: 1.04rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.wk-card__meta {
  font-size: 0.85rem;
  color: var(--muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.wk-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
  margin-top: 0.15rem;
}
.wk-pay {
  font-weight: 700;
  color: var(--live);
  background: color-mix(in srgb, var(--live) 12%, transparent);
  padding: 0.12rem 0.55rem;
  border-radius: var(--radius-s);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}
.tag--new {
  border-color: color-mix(in srgb, var(--live) 40%, transparent);
  color: var(--live);
  background: color-mix(in srgb, var(--live) 10%, transparent);
}
.tag.is-on {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}
.wk-card.is-off {
  opacity: 0.68;
}
.wk-card.is-off .wk-card__title,
.wk-card.is-off .wk-card__time b,
.wk-card.is-off .wk-pay {
  color: var(--muted);
}

.wk-fit {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 500;
  display: flex;
  gap: 0.4rem;
  align-items: baseline;
}
.wk-fit::before {
  content: "";
  flex: none;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  transform: translateY(-1px);
}
.wk-fit.is-ok { color: var(--live); }
.wk-fit.is-ok::before { background: var(--live); box-shadow: 0 0 6px var(--live); }
.wk-fit.is-off { color: var(--muted); }
.wk-fit.is-off::before { border: 1.5px solid var(--muted); width: 5px; height: 5px; }
.wk-fit.is-applied { color: var(--focus); font-weight: 600; }
.wk-fit.is-applied::before { display: none; }

/* ---------- лист смены ---------- */
.wk-sheet .wk-when {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.95rem;
}
.wk-sheet .wk-when b {
  color: var(--ink);
  font-size: 1.05rem;
}
.wk-facts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem;
  margin: 0 0 1rem;
}
.wk-facts div {
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  padding: 0.65rem 0.85rem;
  min-width: 0;
}
.wk-facts dt {
  font-size: 0.74rem;
  color: var(--muted);
}
.wk-facts dd {
  margin: 0.1rem 0 0;
  color: var(--ink);
  font-weight: 600;
  overflow-wrap: anywhere;
}
.wk-dates {
  margin: 0 0 0.8rem;
  font-size: 0.86rem;
  color: var(--muted);
  line-height: 2;
}
.wk-text {
  white-space: pre-line;
  margin: 0.9rem 0 1.2rem;
  padding: 0.9rem 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-m);
  color: var(--text);
  font-size: 0.93rem;
}
.wk-done {
  margin: 0 0 0.7rem;
  color: var(--live);
  font-weight: 600;
}

/* ---------- «Мои часы» и занятость ---------- */
.wk-busy {
  list-style: none;
  margin: 0 0 0.85rem;
  padding: 0;
}
.wk-busy li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.55rem 0;
  border-top: 1px solid var(--rule);
}
.wk-busy li:first-child { border-top: 0; }
.wk-busy li span { display: grid; }
.wk-busy b { color: var(--ink); font-weight: 600; }
.wk-busy small { color: var(--muted); font-size: 0.82rem; }
.wk-busy .is-empty { color: var(--muted); font-size: 0.88rem; border: 0; }
.wk-busy .icon-btn { width: 36px; height: 36px; }
.wk-busy .icon-btn svg { width: 18px; height: 18px; }

.wk-add {
  display: grid;
  gap: 0.65rem;
  padding: 1rem;
  background: var(--paper-2);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  min-width: 0;
}
.wk-daypick {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 0.35rem;
}
.wk-daypick .chip {
  padding: 0;
  min-width: 0;
  width: 100%;
  border-width: 1px;
  border-color: var(--rule);
}
.wk-daypick .chip.is-on { border-color: var(--ink); }
.wk-times {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0.55rem;
}
.wk-times label {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 0.88rem;
  color: var(--muted);
  min-width: 0;
}
.wk-times .field, .wk-add > .field {
  min-height: 44px;
  font-variant-numeric: tabular-nums;
}
.wk-times .field {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  padding-left: 0.75rem;
  padding-right: 0.5rem;
}
.wk-add .btn { width: 100%; }
.hr-day__h { flex-wrap: wrap; }

/* ---------- переключатель «Смены | Мои часы» ---------- */
.wk-views {
  display: grid !important;
  grid-template-columns: 1fr 1fr;
  margin: 0.9rem 1rem 0;
}
.wk-views button { justify-content: center; }

/* ---------- дашборд «Мои часы» ---------- */
.hr-sum {
  margin: 0.75rem 1rem 0.5rem;
  padding: 1.15rem 1.25rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-sm);
}
.hr-nav {
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 40px;
  align-items: center;
  text-align: center;
  gap: 0.4rem;
}
.hr-nav div { display: grid; }
.hr-nav b { color: var(--ink); font-weight: 700; }
.hr-nav small { color: var(--muted); font-size: 0.78rem; }
.hr-nav .icon-btn { font-size: 1.4rem; line-height: 1; }
.hr-nav .icon-btn[disabled] { opacity: 0.3; cursor: default; transform: none; }
.hr-big {
  margin: 1rem 0 0;
  display: grid;
  justify-items: center;
  text-align: center;
}
.hr-big b {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 2.8rem;
  line-height: 1;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.hr-big span {
  color: var(--muted);
  font-size: 0.9rem;
  margin-top: 0.15rem;
}
.hr-left {
  text-align: center;
  margin: 0.35rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
}
.hr-left b { color: var(--live); font-weight: 700; }
.hr-split {
  display: flex;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--paper-2);
  margin: 1rem 0 0.35rem;
  border: 1px solid var(--rule);
}
.hr-split i {
  display: block;
  height: 100%;
  transition: width 0.4s var(--ease-out);
}
.hr-split .b--shift { box-shadow: none; }
.hr-split .b--free { background: color-mix(in srgb, var(--live) 50%, transparent); }
.hr-legend { padding-left: 0 !important; justify-content: center; }
.hr-legend .b--free { background: color-mix(in srgb, var(--live) 50%, transparent); }
.hr-range {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 2.1;
}
.hr-sel {
  font: inherit;
  color: var(--ink);
  background: var(--paper-2);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius-s);
  padding: 0.15rem 0.45rem;
  font-variant-numeric: tabular-nums;
  min-height: 30px;
}

.hr-days {
  padding: 0.35rem 1rem 0.25rem;
  display: grid;
  gap: 0.65rem;
}
.hr-day {
  padding: 0.95rem 1.15rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-xs);
}
.hr-day__h {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}
.hr-day__h b { color: var(--ink); font-weight: 700; }
.hr-day__h span { color: var(--muted); font-size: 0.85rem; }
.hr-day__h em {
  margin-left: auto;
  font-style: normal;
  font-size: 0.84rem;
  color: var(--live);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hr-day.is-today {
  border-color: color-mix(in srgb, var(--live) 45%, var(--rule));
}
.hr-day.is-today .hr-day__h b::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--live);
  margin-left: 0.4rem;
  transform: translateY(-2px);
}
.hr-day.is-past { opacity: 0.55; }
.hr-day.is-past .hr-day__h em { color: var(--muted); font-weight: 400; }
.hr-bar { display: block; height: 14px; }
.hr-items {
  list-style: none;
  margin: 0.55rem 0 0;
  padding: 0;
}
.hr-it {
  display: grid;
  grid-template-columns: 6.6rem minmax(0, 1fr) auto;
  gap: 0.5rem;
  align-items: center;
  min-height: 36px;
  font-size: 0.88rem;
}
.hr-it__t {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}
.hr-it__m {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
}
.hr-it__m b { color: var(--ink); font-weight: 600; }
.hr-it--free .hr-it__m b, .hr-it--free .hr-it__t { color: var(--live); }
.hr-it--free .hr-it__m b { font-weight: 700; }
.hr-it--shift .hr-it__m b { font-weight: 700; }
.hr-it--rem .hr-it__m b { font-weight: 600; }
.hr-it .icon-btn { width: 34px; height: 34px; }
.hr-it .icon-btn svg { width: 16px; height: 16px; }
.hr-it .link-btn { font-size: 0.84rem; }
.hr-bell {
  appearance: none;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  cursor: pointer;
  border: 1px solid var(--rule-strong);
  background: var(--paper-2);
  color: var(--ink);
  transition: transform 0.2s var(--ease-spring), border-color 0.2s var(--ease-out);
}
.hr-bell:hover {
  border-color: var(--focus);
  transform: scale(1.06);
}
.hr-bell svg { width: 16px; height: 16px; }
.hr-none { margin: 0.45rem 0 0; font-size: 0.86rem; color: var(--muted); }

.hr-block {
  margin: 0.85rem 1rem;
  padding: 1.2rem;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: var(--radius-l);
  box-shadow: var(--shadow-xs);
}
.hr-h {
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: 1.65rem;
  color: var(--ink);
  margin: 0 0 0.75rem;
}
.hr-rem {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
}
.hr-rem .field { min-height: 46px; min-width: 0; }
.hr-err { margin: 0.5rem 0 0; font-size: 0.84rem; color: var(--study); line-height: 1.45; }
.hr-hint { margin: 0.5rem 0 0.85rem; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.hr-block .wk-busy { margin-bottom: 1rem; }
.hr-block .wk-busy li span { min-width: 0; }
.hr-block .wk-busy li b { overflow-wrap: anywhere; }

@media (max-width: 380px) {
  .wk-week__ticks, .wk-row { grid-template-columns: 2.7rem minmax(0, 1fr) 1.1rem; gap: 0.4rem; }
  .wk-legend { padding-left: 0; }
  .wk-facts { grid-template-columns: 1fr; }
  .hr-it { grid-template-columns: 5.7rem minmax(0, 1fr) auto; font-size: 0.84rem; }
  .hr-rem { grid-template-columns: 1fr; }
  .hr-big b { font-size: 2.3rem; }
}
