/* «Стационар»: дополнение к общему стилю «Резерва» (/static/common/style.css);
   цвета — переменные темы /static/shared/theme.css. Статусные цвета листа
   (просрочка — красный, выполнено — зелёный) розовыми не делаются. */

/* Доска */
.board-block { margin: 0 0 12px; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; }
.tile { display: flex; flex-direction: column; gap: 2px; min-height: 120px; padding: 6px 8px;
  border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
  color: var(--text); text-decoration: none; }
.tile.busy { border-left: 4px solid var(--brand); }
.tile.busy:hover { background: var(--row-hover); }
.tile.has-overdue { border-left-color: var(--danger); }
.tile.free { background: var(--row-alt); justify-content: space-between; }
.tile-head { display: flex; gap: 6px; align-items: center; }
.tile .code { font-weight: 700; font-size: 16px; }
.tile .day { margin-left: auto; color: var(--muted); font-size: 12px; }
.tile .alias { font-weight: 600; font-size: 15px; }
.tile .diag { overflow-wrap: anywhere; }
.overdue-badge { background: var(--danger); color: #fff; border-radius: 10px; padding: 0 7px;
  font-weight: 700; font-size: 12px; }

/* Поступление */
.admit-layout { display: grid; grid-template-columns: minmax(360px, 1.2fr) 1fr; gap: 10px;
  align-items: start; }
.hints .hint-entry { border-top: 1px solid var(--border); padding: 4px 0; }
.hints .text { max-height: 260px; overflow: auto; }

/* Лист назначений */
.sheet-card { overflow: hidden; }
.sheet-card.saving { opacity: 0.7; }
table.sheet-head { border-collapse: collapse; width: 100%; margin: 0 0 8px; }
table.sheet-head th { text-align: left; font-weight: 600; color: var(--muted); padding: 2px 8px 2px 0;
  white-space: nowrap; width: 1%; }
table.sheet-head td { padding: 2px 16px 2px 0; }
.weight-edit { display: inline-flex; gap: 4px; align-items: center; }
.weight-edit input { width: 80px; }
.sheet-section h2 { margin: 10px 0 4px; }
.grid-scroll { overflow-x: auto; }
table.sheet-grid { border-collapse: collapse; background: var(--card); min-width: 100%; }
table.sheet-grid th, table.sheet-grid td { border: 1px solid var(--border); padding: 2px 4px; }
table.sheet-grid th { background: var(--head); font-weight: 600; white-space: nowrap; }
table.sheet-grid .title-col { min-width: 160px; max-width: 260px; text-align: left; }
table.sheet-grid th.hour { width: 30px; text-align: center; font-size: 12px; }
table.sheet-grid td.cell { width: 30px; min-width: 30px; height: 28px; text-align: center;
  cursor: pointer; font-weight: 700; user-select: none; font-size: 15px; }
table.sheet-grid.monitoring td.cell { font-weight: 400; font-size: 12px; min-width: 38px; }
table.sheet-grid td.cell:hover { outline: 2px solid var(--brand); outline-offset: -2px; }
table.sheet-grid .now { background: var(--now); }
table.sheet-grid td.cell.done { background: var(--ok-bg); color: var(--ok); }
table.sheet-grid td.cell.skipped { background: var(--row-alt); color: var(--danger); }
table.sheet-grid td.cell.overdue { background: var(--danger-bg); color: var(--danger); }
table.sheet-grid td.del button { padding: 0 6px; min-height: 22px; }
.row-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 6px 8px;
  align-items: end; }
.row-form label { display: flex; flex-direction: column; gap: 2px; }
.row-form .wide { grid-column: span 2; }
.day-jump { width: auto; }

/* Журнал сотрудника */
.ok-text { color: var(--ok); }
.danger-text { color: var(--danger); }
.staff-summary { margin: 4px 0 8px; }
table.staff-journal tr.st-cancelled td { color: var(--muted); }

/* Места */
.place-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.place-row input[name=code] { width: 120px; } .place-row input[name=sort] { width: 70px; }
.place-row label.check input { width: auto; }

/* Печать листа — альбомная, как бумажный бланк */
.print-landscape main { max-width: none; }
table.sheet-grid.print td.cell { cursor: default; height: 22px; }

@media (max-width: 900px) {
  .admit-layout { grid-template-columns: 1fr; }
  .row-form .wide { grid-column: auto; }
}
@media print {
  @page { size: A4 landscape; margin: 8mm; }
  .print-landscape body, body.print-landscape { font-size: 9pt; }
  table.sheet-grid th, table.sheet-grid td { padding: 1px 2px; }
  table.sheet-grid .title-col { min-width: 0; }
  table.sheet-grid td.cell { width: auto; min-width: 0; font-size: 10pt; }
  table.sheet-grid td.cell.done, table.sheet-grid td.cell.skipped,
  table.sheet-grid td.cell.overdue { background: none; color: #000; }
}
