/* Разделы «Учёт ЗП», «История», «Смены», «Профили», «Ставки».
   Свои стили держим здесь, основной styles.css не трогаем. */

:root {
  --zp-radius: 14px;
  --zp-radius-sm: 10px;
  --zp-line: rgba(127, 148, 180, 0.22);
  --zp-soft: rgba(127, 148, 180, 0.1);
  --zp-soft-2: rgba(127, 148, 180, 0.16);
  --zp-good: rgba(46, 160, 92, 0.22);
  --zp-warn: rgba(224, 122, 46, 0.22);
  --zp-bad: rgba(214, 62, 62, 0.24);
  --zp-info: rgba(46, 130, 200, 0.22);
  --zp-shadow: 0 6px 20px rgba(15, 25, 45, 0.1);
}

/* ---------- общее ---------- */

.shift-note,
.debts-hint,
.profile-hint,
.history-hint,
.journal-hint {
  margin: 0 2px 14px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.82;
  max-width: 82ch;
}

.debts-hint code,
.profile-hint code {
  padding: 2px 7px;
  border-radius: 7px;
  background: var(--zp-soft-2);
  font-size: 12px;
  font-family: "Consolas", "SF Mono", monospace;
}

.shift-range {
  font-size: 13px;
  opacity: 0.72;
  align-self: center;
}

/* ---------- ставки за смену ---------- */

.shift-rates {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.shift-rate-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: var(--zp-radius);
  background: var(--zp-soft);
  box-shadow: var(--zp-shadow);
}

.shift-rate-title {
  min-width: 62px;
  font-weight: 600;
}

.shift-rate-row input {
  width: 92px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.shift-rate-unit {
  font-size: 12px;
  opacity: 0.7;
}

/* ---------- доска смен ---------- */

.shift-board { overflow-x: auto; padding-bottom: 4px; }

.shift-board-table {
  border-collapse: separate;
  border-spacing: 4px;
  min-width: 100%;
}

.shift-board-table th {
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  padding: 4px 6px;
  white-space: nowrap;
  opacity: 0.85;
}

.shift-board-table tbody th {
  text-align: left;
  min-width: 132px;
  opacity: 1;
}

.shift-board-table th.shift-weekend { color: #d2703a; }

.shift-skills { opacity: 0.62; font-weight: 400; }

.shift-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 8px;
  vertical-align: middle;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.25);
}

.shift-cell {
  position: relative;
  min-width: 64px;
  height: 56px;
  padding: 4px;
  border-radius: var(--zp-radius-sm);
  text-align: center;
  cursor: pointer;
  background: var(--zp-soft);
  transition: transform 0.1s ease, box-shadow 0.14s ease;
}

.shift-cell:hover {
  transform: translateY(-1px);
  box-shadow: var(--zp-shadow);
}

.shift-cell-status { display: block; font-size: 12px; font-weight: 700; line-height: 1.25; }
.shift-cell-pos { display: block; font-size: 11px; opacity: 0.85; }
.shift-cell-sum { display: block; font-size: 11px; opacity: 0.72; font-variant-numeric: tabular-nums; }
.shift-cell-empty { opacity: 0.3; font-size: 18px; }

.shift-status-work { background: var(--zp-good); }
.shift-status-swap { background: var(--zp-info); }
.shift-status-dayoff { background: rgba(140, 150, 165, 0.18); }
.shift-status-sick { background: var(--zp-warn); }
.shift-status-vacation { background: rgba(154, 106, 214, 0.24); }
.shift-status-absent { background: var(--zp-bad); }
.shift-status-unmarked { background: rgba(214, 180, 62, 0.22); }

.shift-editor {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  width: 236px;
  padding: 14px;
  border-radius: var(--zp-radius);
  background: var(--panel-bg, #ffffff);
  box-shadow: 0 16px 44px rgba(15, 25, 45, 0.34);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 9px;
  cursor: default;
}

.shift-editor-title { font-weight: 700; font-size: 13px; }
.shift-editor select,
.shift-editor input { width: 100%; }
.shift-editor-actions { display: flex; gap: 8px; }
.shift-editor-actions button { flex: 1; }

/* ---------- навыки ---------- */

.shift-skills-editor,
.profile-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.shift-skill-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: var(--zp-radius);
  background: var(--zp-soft);
}

.shift-skill-name { min-width: 130px; font-weight: 600; }

.shift-skill-chip,
.profile-skill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--zp-soft-2);
  font-size: 13px;
  cursor: pointer;
  transition: background 0.12s ease;
}

.shift-skill-chip.on,
.profile-skill.on { background: var(--zp-good); }

.shift-skill-chip select,
.profile-skill select { font-size: 12px; padding: 1px 4px; }

.shift-skill-save { margin-left: auto; }

/* ---------- профили ---------- */

.profile-new {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 18px;
  align-items: flex-end;
  margin-bottom: 14px;
}

.profile-new label,
.profile-row label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  opacity: 0.85;
}

.profile-new input[type="text"] { min-width: 172px; }

.profile-skills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 14px;
}

.profile-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.profile-card {
  padding: 16px 18px;
  border-radius: var(--zp-radius);
  background: var(--zp-soft);
  box-shadow: var(--zp-shadow);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.profile-card.fired { opacity: 0.58; }

.profile-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.profile-name { font-weight: 600; min-width: 172px; }
.profile-color { width: 46px; padding: 0; }

.profile-state {
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--zp-good);
}

.profile-card.fired .profile-state { background: var(--zp-bad); }

.profile-delete { margin-left: auto; opacity: 0.75; }
.profile-delete:hover { opacity: 1; }

.profile-row { display: flex; flex-wrap: wrap; gap: 12px 18px; }

/* ---------- учёт ЗП ---------- */

.debts-counter { font-size: 13px; opacity: 0.72; margin-right: auto; margin-left: 12px; }
.debts-status-btn.active { outline: 2px solid rgba(70, 130, 220, 0.6); }
.debts-actions { display: flex; gap: 8px; align-items: center; }
.debts-actions select { min-width: 118px; }
.debts-empty { text-align: center; opacity: 0.6; padding: 20px 0; }

.pick-result { margin-top: 14px; border-radius: var(--zp-radius); font-size: 13px; line-height: 1.55; }

.pick-result.ok,
.pick-result.bad {
  padding: 14px 16px;
  background: var(--zp-good);
  box-shadow: var(--zp-shadow);
}

.pick-result.bad { background: var(--zp-bad); font-weight: 600; }

.pick-result-head { font-weight: 700; margin-bottom: 5px; }
.pick-result-stats { opacity: 0.85; margin-bottom: 10px; }

.pick-result-table { width: auto; min-width: 280px; margin-bottom: 10px; }

.pick-result-table th,
.pick-result-table td {
  padding: 5px 16px 5px 0;
  text-align: left;
  font-variant-numeric: tabular-nums;
}

.pick-result-problems {
  margin-top: 10px;
  padding: 12px 14px;
  border-radius: var(--zp-radius-sm);
  background: var(--zp-warn);
}

.pick-result-problems ul { margin: 8px 0 0; padding-left: 20px; }
.pick-result-problems li { margin-bottom: 3px; }

/* ---------- история ---------- */

.history-list { display: flex; flex-direction: column; gap: 10px; }

.history-day {
  border-radius: var(--zp-radius);
  background: var(--zp-soft);
  padding: 4px 6px;
  transition: box-shadow 0.14s ease;
}

.history-day[open] { box-shadow: var(--zp-shadow); }

.history-day > summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  list-style: none;
}

.history-day > summary::-webkit-details-marker { display: none; }
.history-day > summary::before { content: "▸"; opacity: 0.55; }
.history-day[open] > summary::before { content: "▾"; }

.history-date { font-weight: 700; min-width: 136px; }
.history-day-meta { opacity: 0.68; font-size: 13px; }

.history-day-sum,
.history-sheet-sum {
  margin-left: auto;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.history-people,
.history-sheet-people {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 0 14px 12px;
}

.history-sheet-people { padding: 8px 0 0; }

.history-chip {
  padding: 4px 11px;
  border-radius: 999px;
  background: var(--zp-good);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.history-sheet {
  margin: 0 8px 8px;
  padding: 12px 14px;
  border-radius: var(--zp-radius-sm);
  background: rgba(255, 255, 255, 0.05);
  border-left: 3px solid rgba(70, 130, 220, 0.55);
}

.history-sheet-head { display: flex; gap: 12px; align-items: baseline; font-size: 13px; }
.history-sheet-meta { font-size: 12px; opacity: 0.7; margin-top: 4px; }

.history-carry {
  margin: 0 8px 10px;
  padding: 12px 14px;
  border-radius: var(--zp-radius-sm);
  background: var(--zp-warn);
  font-size: 13px;
}

.history-carry ul { margin: 8px 0 0; padding-left: 20px; }
.history-empty { padding: 22px; text-align: center; opacity: 0.6; }

/* ---------- таблица расценок ---------- */

.rate-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.rate-table-narrow { width: auto; min-width: 360px; }

.rate-table th,
.rate-table td {
  padding: 9px 14px;
  text-align: left;
  border-bottom: 1px solid var(--zp-line);
  font-size: 14px;
}

.rate-table thead th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  opacity: 0.65;
  border-bottom-width: 2px;
}

.rate-table tbody tr:hover { background: var(--zp-soft); }
.rate-table tbody th { font-weight: 600; }

.rate-cell { text-align: right; }
.rate-cell input { width: 78px; text-align: right; }
.rate-cell-read { opacity: 0.9; }
.rate-cell-off { opacity: 0.35; text-align: center; }

.rate-total { font-weight: 700; text-align: right; }

/* ---------- подлинность журнала ---------- */

.journal-result {
  padding: 14px 16px;
  border-radius: var(--zp-radius);
  font-size: 14px;
  line-height: 1.5;
  background: var(--zp-soft);
}

.journal-result.ok { background: var(--zp-good); }
.journal-result.bad { background: var(--zp-bad); font-weight: 600; }

/* ---------- спрятанные разделы ---------- */

.legacy-tab { display: none !important; }
body.show-legacy .legacy-tab { display: inline-flex !important; }

.legacy-toggle {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  font-size: 13px;
  opacity: 0.85;
  cursor: pointer;
  max-width: 72ch;
  line-height: 1.5;
}

/* ---------- телефон ---------- */

@media (max-width: 720px) {
  .shift-cell { min-width: 56px; height: 52px; }
  .shift-board-table tbody th { min-width: 108px; font-size: 13px; }
  .shift-editor { width: 208px; left: auto; right: 0; }
  .profile-new input[type="text"],
  .profile-name { min-width: 144px; }
  .history-date { min-width: 104px; }
  .history-day-meta { display: none; }
  .rate-table th,
  .rate-table td { padding: 7px 9px; font-size: 13px; }
}

/* ---------- учёт ЗП: заголовок и форма ---------- */

.pick-lead {
  margin: 0 2px 12px;
  font-size: 14px;
  line-height: 1.55;
  max-width: 78ch;
}

.pick-help {
  margin: 0 0 16px;
  border-radius: var(--zp-radius-sm);
  background: var(--zp-soft);
}

.pick-help > summary {
  padding: 9px 14px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 600;
  list-style: none;
  opacity: 0.85;
}

.pick-help > summary::-webkit-details-marker { display: none; }
.pick-help > summary::before { content: "▸ "; opacity: 0.6; }
.pick-help[open] > summary::before { content: "▾ "; }

.pick-help-body {
  padding: 0 16px 12px;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.88;
  max-width: 84ch;
}

.pick-help-body p { margin: 0 0 9px; }

.pick-upload {
  align-items: flex-end;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--zp-radius);
  background: var(--zp-info);
  box-shadow: var(--zp-shadow);
}

.pick-upload label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
}

.pick-upload small { opacity: 0.75; font-weight: 400; }

/* ---------- метки листа и ряд загрузки ---------- */

.pick-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  margin-bottom: 14px;
}

.pick-tag-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.pick-tag-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.6;
  margin-right: 2px;
}

.pick-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--zp-soft-2);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
  transition: background 0.12s ease;
}

.pick-tag input { margin: 0; }
.pick-tag:hover { background: rgba(127, 148, 180, 0.24); }
.pick-tag:has(input:checked) { background: var(--zp-good); }

.pick-upload {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: var(--zp-radius);
  background: var(--zp-info);
  box-shadow: var(--zp-shadow);
}

/* всё в ряду одной высоты, чтобы ничего не скакало */
.pick-upload input,
.pick-upload button {
  height: 38px;
  box-sizing: border-box;
  margin: 0;
  vertical-align: middle;
}

.pick-upload input[type="date"] { width: 156px; padding: 0 10px; }
.pick-upload input[type="file"] { flex: 1 1 260px; min-width: 220px; padding: 6px 10px; }
.pick-upload button { padding: 0 22px; }

.pick-result-tags { display: inline-flex; gap: 6px; margin-right: 8px; }

.hidden { display: none !important; }

/* запасы: аккуратные таблицы поверх родных стилей */
.supply-group-head {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--zp-line);
}

.supply-group-head b { font-size: 14px; }

.supply-group .rate-table { width: 100%; table-layout: fixed; }

.supply-group .rate-table th {
  width: 52%;
  text-transform: none !important;
  letter-spacing: normal !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  background: transparent !important;
  color: inherit !important;
  opacity: 1 !important;
  padding: 5px 8px !important;
  border-radius: 0 !important;
}

.supply-group .rate-table td {
  padding: 5px 8px !important;
  border-radius: 0 !important;
}

.supply-qty { width: 34%; }
.supply-qty input {
  width: 100%;
  max-width: 96px;
  height: 32px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.supply-group .rate-table td:last-child {
  width: 14%;
  font-size: 12px;
  opacity: 0.65;
}

.supply-empty th { font-weight: 700 !important; }


/* старый вид зарплаты спрятан: остаётся одна таблица на всех + календарь */
.salary-legacy { display: none !important; }
body.show-salary-legacy .salary-legacy { display: block !important; }

/* ============ вид «как у сайта»: градиенты и объём вместо плоской заливки ============ */

:root {
  --aero-panel: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(235, 250, 255, 0.84) 54%, rgba(217, 244, 255, 0.78));
  --aero-btn: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(218, 244, 255, 0.88) 46%, rgba(123, 202, 244, 0.84));
  --aero-btn-hover: linear-gradient(180deg, #ffffff, #d8f2ff 46%, #8fd4f7);
  --aero-line: rgba(117, 200, 237, 0.72);
  --aero-line-strong: rgba(88, 178, 231, 0.66);
  --aero-inset: inset 0 1px 0 #fff, 0 2px 6px rgba(4, 83, 144, 0.16);
  --aero-green: linear-gradient(180deg, #ffffff, #dcfce7 46%, #86efac);
  --aero-amber: linear-gradient(180deg, #ffffff, #fef3c7 46%, #fcd34d);
  --aero-red: linear-gradient(180deg, #ffffff, #fee2e2 46%, #fca5a5);
}

/* карточки и блоки — как панели сайта */
.profile-card,
.history-day,
.supply-group,
.shift-rate-row,
.shift-skill-row,
.salary-calendar,
.pick-help,
.journal-result,
.pick-result.ok {
  background: var(--aero-panel) !important;
  border: 1px solid var(--aero-line);
  box-shadow: 0 6px 18px rgba(4, 83, 144, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.pick-result.bad { background: var(--aero-red) !important; border: 1px solid #fca5a5; }
.pick-result-problems,
.history-carry { background: var(--aero-amber) !important; border: 1px solid #fcd34d; }

/* шапки таблиц — как вкладки */
.rate-table thead th,
.salary-matrix thead th {
  background: var(--aero-btn) !important;
  border: 1px solid var(--aero-line-strong) !important;
  box-shadow: var(--aero-inset);
  color: #0b3d66 !important;
  opacity: 1 !important;
  border-radius: 6px 6px 0 0;
}

.rate-table tbody tr:nth-child(even) td,
.rate-table tbody tr:nth-child(even) th { background: rgba(235, 250, 255, 0.55); }
.rate-table tbody tr:hover td,
.rate-table tbody tr:hover th { background: #edf5ff; }

.salary-matrix tfoot th,
.salary-matrix tfoot td {
  background: var(--aero-btn) !important;
  border-top: 1px solid var(--aero-line-strong);
}

/* клетки календаря — маленькие аэро-кнопки */
.salary-calendar .cal-cell {
  background: var(--aero-btn) !important;
  border: 1px solid var(--aero-line-strong) !important;
  box-shadow: var(--aero-inset);
  color: #0b3d66;
}

.salary-calendar .cal-cell:hover { background: var(--aero-btn-hover) !important; }
.salary-calendar .cal-empty { background: transparent !important; border-color: transparent !important; box-shadow: none !important; }
.salary-calendar .cal-has { background: var(--aero-green) !important; border-color: #86efac !important; }
.salary-calendar .cal-active { outline: 2px solid #0b78c8 !important; }

.salary-calendar .cal-head button,
.salary-calendar .cal-all {
  background: var(--aero-btn) !important;
  border: 1px solid var(--aero-line-strong) !important;
  box-shadow: var(--aero-inset);
  color: #0b3d66;
}

/* чипы и метки — светлое стекло с рамкой */
.history-chip,
.pick-tag,
.profile-skill,
.shift-skill-chip,
.profile-state,
.supply-ok,
.supply-warn {
  background: var(--aero-btn) !important;
  border: 1px solid var(--aero-line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  color: #0b3d66;
}

.pick-tag:has(input:checked),
.profile-skill.on,
.shift-skill-chip.on,
.history-chip,
.profile-state,
.supply-ok { background: var(--aero-green) !important; border-color: #86efac; color: #14532d; }

.supply-warn,
.profile-card.fired .profile-state { background: var(--aero-red) !important; border-color: #fca5a5; color: #7f1d1d; }

/* клетки доски смен */
.shift-cell { border: 1px solid var(--aero-line-strong); box-shadow: var(--aero-inset); }
.shift-status-work { background: var(--aero-green) !important; }
.shift-status-swap { background: var(--aero-btn) !important; }
.shift-status-sick { background: var(--aero-amber) !important; }
.shift-status-absent { background: var(--aero-red) !important; }

/* форма загрузки листа */
.pick-upload {
  background: var(--aero-panel) !important;
  border: 1px solid var(--aero-line);
  box-shadow: 0 6px 18px rgba(4, 83, 144, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}


/* ============ ЗАРПЛАТА: одна таблица на всех + календарь справа ============ */

.salary-matrix-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 252px;
  gap: 18px;
  align-items: start;
}

.matrix-label { font-size: 13px; font-weight: 400; opacity: 0.7; margin-left: 8px; }

.salary-matrix-scroll { overflow-x: auto; }

/* --- таблица --- */

.salary-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.salary-matrix th,
.salary-matrix td {
  white-space: nowrap;
  padding: 7px 14px;
  border-bottom: 1px solid rgba(117, 200, 237, 0.35);
  text-transform: none;
  letter-spacing: normal;
  height: auto;
}

.salary-matrix thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: linear-gradient(180deg, #ffffff, #dceeff 60%, #c5e4fb);
  border-bottom: 1px solid var(--aero-line-strong);
  font-size: 12px;
  font-weight: 700;
  color: #0b3d66;
  text-align: right;
}

.salary-matrix thead th:first-child { text-align: left; }
.salary-matrix thead th:last-child { color: #0f5c96; }

.salary-matrix tbody th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: var(--zp-text, #17202a);
  background: rgba(240, 250, 255, 0.75);
  border-right: 1px solid rgba(117, 200, 237, 0.35);
  width: 1%;
}

.salary-matrix tbody tr:hover th,
.salary-matrix tbody tr:hover td { background: rgba(214, 240, 255, 0.65); }

.salary-matrix td {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.salary-matrix .matrix-cell b { font-weight: 600; }
.salary-matrix .matrix-qty {
  display: inline-block;
  margin-left: 6px;
  font-size: 11px;
  opacity: 0.55;
}
.salary-matrix .matrix-zero { color: rgba(23, 32, 42, 0.28); }

.salary-matrix .rate-total { font-weight: 700; color: #0f5c96; }

.salary-matrix tfoot th,
.salary-matrix tfoot td {
  background: linear-gradient(180deg, #ffffff, #dcfce7 60%, #b7ebc8);
  border-top: 1px solid rgba(88, 178, 231, 0.5);
  border-bottom: 0;
  font-weight: 700;
  color: #14532d;
}
.salary-matrix tfoot th { text-align: left; }
.salary-matrix tfoot td { text-align: right; }

.salary-matrix .shift-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.9);
}

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

.salary-calendar {
  width: 252px;
  padding: 12px 12px 14px;
  border-radius: var(--zp-radius, 12px);
  background: var(--aero-panel);
  border: 1px solid var(--aero-line);
  box-shadow: 0 6px 18px rgba(4, 83, 144, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* сайт подставляет иконки во все кнопки — тут они не нужны */
.salary-calendar button::before,
.salary-calendar button::after { content: none !important; display: none !important; }

.salary-calendar .cal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  margin-bottom: 10px;
}

.salary-calendar .cal-head b {
  font-size: 13px;
  color: #0b3d66;
  text-transform: capitalize;
}

.salary-calendar .cal-week {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 5px;
  font-size: 10px;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: rgba(11, 61, 102, 0.55);
}

.salary-calendar .cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

/* клетка дня: гасим всё родное и собираем заново */
.salary-calendar .cal-cell {
  all: unset;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 2px 0;
  border-radius: 7px;
  border: 1px solid rgba(117, 200, 237, 0.45);
  background: linear-gradient(180deg, #ffffff, #eef8ff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-family: inherit;
  color: #0b3d66;
  cursor: pointer;
  transition: transform 0.08s ease;
}

.salary-calendar .cal-cell:hover { background: linear-gradient(180deg, #ffffff, #d8f2ff 50%, #a9dcf6); }
.salary-calendar .cal-cell:active { transform: translateY(1px); }

.salary-calendar .cal-empty {
  all: unset;
  box-sizing: border-box;
  display: block;
  min-height: 32px;
}

.salary-calendar .cal-has {
  background: linear-gradient(180deg, #ffffff, #dcfce7 50%, #9ce4b6);
  border-color: #7fd6a0;
  color: #14532d;
}

.salary-calendar .cal-active {
  border-color: #0b78c8;
  box-shadow: 0 0 0 2px rgba(11, 120, 200, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.salary-calendar .cal-day { font-size: 12px; font-weight: 600; line-height: 1.1; }
.salary-calendar .cal-sum {
  font-size: 9px;
  line-height: 1.1;
  opacity: 0.7;
  font-variant-numeric: tabular-nums;
}

.salary-calendar .cal-head button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 600 15px/1 inherit;
  color: #0b3d66;
  cursor: pointer;
}

.salary-calendar .cal-all {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 600 12px/1 inherit;
  color: #0b3d66;
  cursor: pointer;
}

.salary-calendar .cal-all.cal-active {
  background: linear-gradient(180deg, #ffffff, #dcfce7 50%, #9ce4b6);
  border-color: #7fd6a0;
  color: #14532d;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.salary-calendar .cal-head button:hover,
.salary-calendar .cal-all:hover { background: var(--aero-btn-hover); }

@media (max-width: 900px) {
  .salary-matrix-wrap { grid-template-columns: minmax(0, 1fr); }
  .salary-calendar { width: 100%; }
}

/* ============ СТАВКИ: как в распечатке расценок, только в нашем аэро ============ */

.rates-panel { padding-bottom: 22px; }

/* --- шапка --- */

.rates-masthead {
  padding-bottom: 16px;
  margin-bottom: 22px;
  border-bottom: 2px solid var(--aero-line-strong);
}

.rates-eyebrow {
  margin: 0 0 4px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(11, 61, 102, 0.6);
}

.rates-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.rates-title-row h2 { margin: 0; font-size: 24px; color: #0b3d66; }
.rates-unit { font-size: 15px; font-weight: 400; opacity: 0.6; }

.rates-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}

.rates-meta li {
  padding: 4px 12px;
  border-radius: 999px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 12px;
  color: #0b3d66;
}

.rates-note { margin: 10px 0 0; font-size: 12px; font-weight: 600; color: #0f5c96; }

/* --- секции --- */

.rates-section { margin-top: 26px; }
.rates-section:first-of-type { margin-top: 0; }

.rates-sec-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  padding-bottom: 8px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--aero-line);
}

.rates-sec-head h3 {
  margin: 0;
  font-size: 16px;
  color: #0b3d66;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.rates-sec-head span { font-size: 12px; color: rgba(11, 61, 102, 0.6); }

.rates-caption {
  margin: -6px 0 12px;
  font-size: 12px;
  line-height: 1.5;
  color: rgba(23, 32, 42, 0.65);
}

/* --- ставки за смену --- */

.rates-shifts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.rates-shift {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.rates-shift-label { font-size: 12px; color: rgba(11, 61, 102, 0.75); }

.rates-shift-val {
  font-size: 26px;
  font-weight: 700;
  line-height: 1.1;
  color: #0b3d66;
  font-variant-numeric: tabular-nums;
}

.rates-shift-cap { font-size: 10px; color: rgba(11, 61, 102, 0.5); }

.rates-lines { margin-top: 12px; }

.rates-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0;
  padding: 9px 14px;
  border-radius: 9px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font-size: 13px;
  color: #0b3d66;
}

.rates-line b { font-size: 17px; font-variant-numeric: tabular-nums; }

.rates-explainer {
  margin: 12px 0 0;
  padding: 11px 14px;
  border-radius: 9px;
  border: 1px solid rgba(117, 200, 237, 0.45);
  border-left: 3px solid #58b2e7;
  background: rgba(240, 250, 255, 0.8);
  font-size: 12px;
  line-height: 1.55;
  color: rgba(23, 32, 42, 0.8);
}

/* --- станции печати --- */

.rates-stations {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.rates-station {
  padding: 14px 16px 8px;
  border-radius: 11px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.rates-station h4 {
  margin: 0;
  font-size: 15px;
  color: #0b3d66;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.rates-base { margin: 2px 0 10px; font-size: 11px; color: rgba(11, 61, 102, 0.55); }

.rates-rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 0;
  border-top: 1px solid rgba(117, 200, 237, 0.35);
}

.rates-op { font-size: 13px; color: var(--zp-text, #17202a); }

.rates-val {
  min-width: 44px;
  text-align: right;
  font-size: 17px;
  font-weight: 700;
  color: #0b3d66;
  font-variant-numeric: tabular-nums;
}

/* поле правки: маленькое и аккуратное, а не растянутое на всю клетку */
.rates-input {
  width: 62px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 600 14px/1.2 inherit;
  color: #0b3d66;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rates-input:focus {
  outline: none;
  border-color: #0b78c8;
  box-shadow: 0 0 0 2px rgba(11, 120, 200, 0.25);
}

/* --- таблица товаров --- */

.rates-goods {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.rates-goods th,
.rates-goods td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(117, 200, 237, 0.35);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  height: auto;
}

.rates-goods thead th {
  background: linear-gradient(180deg, #ffffff, #dceeff 60%, #c5e4fb);
  border-bottom: 1px solid var(--aero-line-strong);
  font-size: 12px;
  font-weight: 700;
  color: #0b3d66;
  text-align: center;
}

.rates-goods thead th:first-child { text-align: left; }

.rates-goods tbody th {
  text-align: left;
  font-weight: 500;
  font-size: 13px;
  color: var(--zp-text, #17202a);
  background: rgba(240, 250, 255, 0.75);
  border-right: 1px solid rgba(117, 200, 237, 0.35);
  width: 1%;
}

.rates-goods tbody td { text-align: center; }
.rates-goods tbody tr:hover th,
.rates-goods tbody tr:hover td { background: rgba(214, 240, 255, 0.6); }

.rates-nil { color: rgba(23, 32, 42, 0.25); }

.rates-total-col {
  text-align: right !important;
  font-weight: 700;
  color: #0f5c96;
  font-variant-numeric: tabular-nums;
  background: rgba(235, 250, 255, 0.55);
}

.rates-shelf { text-align: center; }

.rates-chip {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 11px;
  border: 1px solid var(--aero-line-strong);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.rates-chip.on {
  background: linear-gradient(180deg, #ffffff, #dcfce7 50%, #9ce4b6);
  border-color: #7fd6a0;
  color: #14532d;
}

.rates-chip.off {
  background: linear-gradient(180deg, #ffffff, #eef2f5 50%, #dbe3ea);
  border-color: #cbd5dd;
  color: rgba(23, 32, 42, 0.5);
}

/* --- ФБС --- */

.rates-slabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

.rates-slab {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.rates-slab .rates-op { flex: 1; }
.rates-slab-note {
  width: 100%;
  order: 3;
  font-size: 11px;
  color: rgba(11, 61, 102, 0.5);
}

/* ============ склад: минус-плюс по одной штуке ============ */

.qty-step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.qty-step input {
  width: 66px;
  padding: 4px 6px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 600 13px/1.2 inherit;
  color: #0b3d66;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.qty-step .qty-now {
  min-width: 46px;
  text-align: center;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  color: #0b3d66;
}

.qty-btn {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 700 16px/1 inherit;
  color: #0b3d66;
  cursor: pointer;
  user-select: none;
}

.qty-btn::before,
.qty-btn::after { content: none !important; display: none !important; }
.qty-btn:hover { background: var(--aero-btn-hover); }
.qty-btn:active { transform: translateY(1px); }

/* ============ зарплата: период и выдача денег ============ */

.salary-span {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
  font-size: 13px;
}

.salary-span label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(11, 61, 102, 0.8);
}

.salary-span input {
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 500 13px/1.2 inherit;
  color: #0b3d66;
}

.salary-span-hint { font-size: 11px; color: rgba(11, 61, 102, 0.55); margin-left: auto; }

.salary-matrix-side { min-width: 0; }

/* строки итогов: начислено, выдано, остаток */
.salary-matrix tfoot .salary-paid-row th,
.salary-matrix tfoot .salary-paid-row td {
  background: linear-gradient(180deg, #ffffff, #eaf4ff 60%, #cfe6fb);
  color: #0b3d66;
  border-top: 0;
}

.salary-matrix tfoot .salary-left-row th,
.salary-matrix tfoot .salary-left-row td {
  background: linear-gradient(180deg, #ffffff, #fff4de 60%, #ffe0ae);
  color: #7c4a03;
  border-top: 0;
}

.salary-matrix tfoot .salary-owe { font-weight: 700; }
.salary-matrix tfoot .salary-clear { opacity: 0.55; }

/* выдача денег: поля по каждому человеку */
.salary-payout {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.salary-payout-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.salary-payout-head b { font-size: 14px; color: #0b3d66; }
.salary-payout-head span { font-size: 11px; color: rgba(11, 61, 102, 0.55); }

.salary-payout-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.salary-payout-cell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(117, 200, 237, 0.45);
  background: rgba(255, 255, 255, 0.7);
  font-size: 13px;
  color: #0b3d66;
}

.salary-payout-cell input {
  width: 78px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 600 13px/1.2 inherit;
  color: #0b3d66;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

/* день, когда выдавали деньги */
.salary-calendar .cal-paid { border-color: #f0b849; box-shadow: inset 0 -3px 0 rgba(240, 184, 73, 0.8); }

.cal-legend {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  margin: 10px 0 0;
  font-size: 10px;
  color: rgba(11, 61, 102, 0.6);
}

.cal-legend-work,
.cal-legend-paid {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  border: 1px solid rgba(117, 200, 237, 0.6);
}

.cal-legend-work { background: linear-gradient(180deg, #ffffff, #9ce4b6); }
.cal-legend-paid { background: linear-gradient(180deg, #ffffff, #f0b849); margin-left: 8px; }

.salary-matrix tfoot .salary-over { font-weight: 700; color: #b4530a; }

/* ============ график работы ============ */

.schedule-table {
  width: auto;
  min-width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
}

.schedule-table th,
.schedule-table td {
  padding: 7px 14px;
  border-bottom: 1px solid rgba(117, 200, 237, 0.35);
  white-space: nowrap;
  text-transform: none;
  letter-spacing: normal;
  height: auto;
  text-align: center;
}

.schedule-table thead th {
  background: linear-gradient(180deg, #ffffff, #dceeff 60%, #c5e4fb);
  border-bottom: 1px solid var(--aero-line-strong);
  font-size: 12px;
  font-weight: 700;
  color: #0b3d66;
}

.schedule-table thead th:first-child,
.schedule-table tbody th { text-align: left; }

.schedule-table tbody th {
  font-weight: 600;
  font-size: 13px;
  color: var(--zp-text, #17202a);
  background: rgba(240, 250, 255, 0.75);
  border-right: 1px solid rgba(117, 200, 237, 0.35);
  width: 1%;
}

.schedule-table tbody tr:hover th,
.schedule-table tbody tr:hover td { background: rgba(214, 240, 255, 0.55); }

.sched-work { color: #0b3d66; }
.sched-off { color: rgba(23, 32, 42, 0.35); }

.sched-pick {
  padding: 3px 6px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.08);
  font: 500 12px/1.2 inherit;
  color: #0b3d66;
}

.schedule-table tfoot th,
.schedule-table tfoot td {
  background: linear-gradient(180deg, #ffffff, #dcfce7 60%, #b7ebc8);
  border-top: 1px solid rgba(88, 178, 231, 0.5);
  border-bottom: 0;
  font-weight: 700;
  color: #14532d;
}

.schedule-table tfoot th { text-align: left; }

/* состав бригады */
.schedule-crew {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 11px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.schedule-crew-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.schedule-crew-head b { font-size: 14px; color: #0b3d66; }
.schedule-crew-head span { font-size: 11px; color: rgba(11, 61, 102, 0.55); }

.schedule-crew-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 10px;
}

.schedule-crew-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 9px;
  border: 1px solid rgba(117, 200, 237, 0.45);
  background: rgba(255, 255, 255, 0.7);
}

.schedule-crew-row .crew-name {
  flex: 1;
  min-width: 0;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 500 13px/1.2 inherit;
  color: #0b3d66;
}

.schedule-crew-add {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(117, 200, 237, 0.35);
}

.schedule-crew-add input[type="text"] {
  min-width: 180px;
  padding: 5px 10px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 500 13px/1.2 inherit;
  color: #0b3d66;
}

.schedule-crew-add input[type="color"] { width: 44px; padding: 0; }

/* история переехала вниз «Учёта ЗП» — отделяем её чертой */
.pick-history-block {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--aero-line-strong);
}

.pick-history-block .band.inline-form { margin-bottom: 14px; }

/* ============ ставки и график: крупнее и жирнее, чтобы читалось от станка ============ */

.rates-title-row h2 { font-size: 30px; }
.rates-unit { font-size: 18px; }
.rates-eyebrow { font-size: 12px; }
.rates-meta li { font-size: 14px; padding: 5px 14px; }
.rates-note { font-size: 14px; }

.rates-sec-head h3 { font-size: 20px; }
.rates-sec-head span { font-size: 14px; }
.rates-caption { font-size: 14px; }
.rates-explainer { font-size: 14px; }

.rates-shift-label { font-size: 14px; }
.rates-shift-val { font-size: 34px; }
.rates-shift-cap { font-size: 12px; }
.rates-line { font-size: 15px; }
.rates-line b { font-size: 22px; }

.rates-station h4 { font-size: 18px; }
.rates-base { font-size: 13px; }
.rates-op { font-size: 15px; font-weight: 500; }
.rates-val { font-size: 21px; min-width: 52px; }
.rates-slab-note { font-size: 13px; }

.rates-input {
  width: 74px;
  padding: 6px 10px;
  font-size: 17px;
  font-weight: 700;
}

.rates-goods { font-size: 15px; }
.rates-goods th,
.rates-goods td { padding: 9px 16px; }
.rates-goods thead th { font-size: 14px; }
.rates-goods tbody th { font-size: 15px; font-weight: 600; }
.rates-total-col { font-size: 16px; }
.rates-chip { font-size: 12px; padding: 3px 12px; }

/* график работы */
.schedule-table { font-size: 15px; }
.schedule-table th,
.schedule-table td { padding: 9px 16px; }
.schedule-table thead th { font-size: 14px; }
.schedule-table tbody th { font-size: 16px; font-weight: 700; }
.schedule-table tbody td { font-weight: 600; }
.schedule-table tfoot th,
.schedule-table tfoot td { font-size: 15px; }
.schedule-table .rate-total { font-size: 16px; }

.sched-pick {
  padding: 5px 8px;
  font-size: 14px;
  font-weight: 600;
}

.schedule-crew-head b { font-size: 16px; }
.schedule-crew-head span { font-size: 13px; }
.schedule-crew-row .crew-name { font-size: 15px; padding: 6px 10px; }

/* крестик уборки дня: рядом с полем выплаты */
.day-wipe {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  border-radius: 7px;
  border: 1px solid #f3b0b0;
  background: linear-gradient(180deg, #ffffff, #fee2e2 50%, #fca5a5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 700 13px/1 inherit;
  color: #8a1c1c;
  cursor: pointer;
}

.day-wipe::before,
.day-wipe::after { content: none !important; display: none !important; }
.day-wipe:hover { background: linear-gradient(180deg, #ffffff, #fecaca 50%, #f68a8a); }
.day-wipe:active { transform: translateY(1px); }

.salary-payout-cell { gap: 6px; }
.salary-payout-cell input { width: 70px; }

/* ============ период зарплаты: под календарём справа ============ */

.salary-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 252px;
}

.salary-span {
  display: block;
  width: 252px;
  margin: 0;
  padding: 12px;
}

.salary-span-btns {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.salary-span-btns button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 600 13px/1.2 inherit;
  color: #0b3d66;
  cursor: pointer;
  text-align: center;
}

.salary-span-btns button::before,
.salary-span-btns button::after { content: none !important; display: none !important; }
.salary-span-btns button:hover { background: var(--aero-btn-hover); }
.salary-span-btns button:active { transform: translateY(1px); }

.salary-span-fields {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(117, 200, 237, 0.4);
}

.salary-span-fields.hidden { display: none; }

.salary-span-fields label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 13px;
  color: rgba(11, 61, 102, 0.8);
}

.salary-span-fields input {
  width: 152px;
  padding: 4px 8px;
  border-radius: 7px;
  border: 1px solid var(--aero-line-strong);
  background: linear-gradient(180deg, #ffffff, #f4fbff);
  box-shadow: inset 0 1px 2px rgba(4, 83, 144, 0.1);
  font: 500 13px/1.2 inherit;
  color: #0b3d66;
}

.salary-span-fields button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  border-radius: 8px;
  border: 1px solid #7fd6a0;
  background: linear-gradient(180deg, #ffffff, #dcfce7 50%, #9ce4b6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 700 13px/1.2 inherit;
  color: #14532d;
  cursor: pointer;
}

.salary-span-fields button::before,
.salary-span-fields button::after { content: none !important; display: none !important; }

@media (max-width: 900px) {
  .salary-side,
  .salary-span { width: 100%; }
}

/* ============ расшифровка клетки зарплаты ============ */

.matrix-open { cursor: pointer; }
.matrix-open:hover { background: rgba(180, 226, 255, 0.55); }

.matrix-active {
  background: linear-gradient(180deg, #ffffff, #d8f2ff 60%, #a9dcf6) !important;
  box-shadow: inset 0 0 0 2px #0b78c8;
}

.salary-details {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid var(--aero-line);
  background: var(--aero-panel);
  box-shadow: inset 0 1px 0 #fff, 0 3px 10px rgba(4, 83, 144, 0.1);
}

.salary-details.hidden { display: none; }

.details-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.details-head b { font-size: 15px; color: #0b3d66; }
.details-head span { font-size: 12px; color: rgba(11, 61, 102, 0.6); }

.details-head .details-close {
  all: unset;
  box-sizing: border-box;
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 8px;
  border: 1px solid var(--aero-line-strong);
  background: var(--aero-btn);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 600 12px/1.2 inherit;
  color: #0b3d66;
  cursor: pointer;
}

.details-head .details-close::before,
.details-head .details-close::after { content: none !important; display: none !important; }

.details-table { width: 100%; font-size: 13px; border-collapse: separate; border-spacing: 0; }

.details-table th,
.details-table td {
  padding: 6px 12px;
  border-bottom: 1px solid rgba(117, 200, 237, 0.3);
  text-transform: none;
  letter-spacing: normal;
  white-space: nowrap;
  height: auto;
}

.details-table thead th {
  background: linear-gradient(180deg, #ffffff, #dceeff 60%, #c5e4fb);
  font-size: 12px;
  font-weight: 700;
  color: #0b3d66;
  text-align: left;
}

.details-table td:nth-child(2) { white-space: normal; max-width: 420px; }
.details-table td:nth-child(4),
.details-table td:nth-child(5),
.details-table td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.details-table tbody tr:hover td { background: rgba(214, 240, 255, 0.5); }
.details-note { font-size: 11px; opacity: 0.6; }

/* кнопка полной очистки: держим её внизу и явно опасной на вид */
.salary-wipe {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #f3b0b0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 240, 240, 0.9));
  box-shadow: inset 0 1px 0 #fff;
}

.salary-wipe span { font-size: 11px; color: rgba(122, 30, 30, 0.75); max-width: 62ch; }

.salary-wipe button {
  all: unset;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 7px 16px;
  border-radius: 8px;
  border: 1px solid #e08585;
  background: linear-gradient(180deg, #ffffff, #fee2e2 50%, #fca5a5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
  font: 700 13px/1.2 inherit;
  color: #8a1c1c;
  cursor: pointer;
}

.salary-wipe button::before,
.salary-wipe button::after { content: none !important; display: none !important; }
.salary-wipe button:hover { background: linear-gradient(180deg, #ffffff, #fecaca 50%, #f68a8a); }
