/* Этап 9 · часть 4: экран «Табель» (День, График, Расчёт, Месяц, Сотрудники, Найм, Дни рождения, Настройки). Только классы tbl-. Цвета клеток — как в боевом табеле. */

.tbl-note { margin: 0 0 14px; padding: 12px 16px; background: var(--yellow-bg); border: 1px solid #e0b84c; border-radius: 8px; }
.tbl-note b { font-weight: 700; }
.tbl-note .tbl-row { margin-top: 8px; }
.tbl-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.tbl-bar .tbl-sp { flex: 1 1 auto; }
.tbl-bar label { color: var(--ink-soft); }
.tbl-bar input[type="date"], .tbl-bar input[type="month"], .tbl-bar select { padding: 6px 10px; font: inherit; border: 1px solid var(--line-hard); border-radius: 6px; background: #fff; }
.tbl-bar input[type="date"], .tbl-bar input[type="month"] { width: auto; flex: 0 0 auto; }
.tbl-bar select { width: auto; }
.tbl-bar .btn.on { background: var(--acc); border-color: var(--acc); color: #fff; }
.tbl-title { font-weight: 700; min-width: 130px; text-align: center; }
.tbl-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tbl-sub { margin: 0 0 8px; font-size: 14.5px; color: var(--ink-soft); }
.tbl-h { margin: 18px 0 8px; font-size: 18px; font-weight: 700; }
.tbl-g { color: var(--ink-soft); }
.tbl-bad { color: var(--red); font-weight: 600; }
.tbl-star { color: #d9a400; font-weight: 700; }
.tbl-ok { color: var(--green); }
.tbl-warn { color: var(--yellow); }
.tbl-err { color: var(--red); margin: 6px 0; }

/* таблицы */
.tbl-t { width: 100%; border-collapse: collapse; font-size: 15.5px; }
.tbl-t th { padding: 6px 10px; text-align: left; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .02em; color: var(--ink-soft); background: #f6f7f9; border-bottom: 1px solid var(--line-hard); }
.tbl-t td { padding: 7px 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl-t .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl-t th.num { text-align: right; }
.tbl-t tbody tr:hover td { background: #fafbfd; }
.tbl-t tfoot td { font-weight: 700; background: #f6f7f9; border-bottom: 0; }
.tbl-t tr.rest td { background: #e6e9ee; color: #8c96a2; }
.tbl-t tr.rest .pill { background: #fff; color: #7d8793; }
.tbl-t tr.xtra td { background: #f7f3fe; }
.tbl-t tr.gone td { color: #8c96a2; }
.tbl-t tr.click { cursor: pointer; }
.tbl-t tr.neg td { background: var(--yellow-bg); }
.tbl-t .tbl-fc { color: #9aa3ad; }
.tbl-t .tbl-fc div { font-size: 13px; }
.tbl-scroll { overflow-x: auto; background: var(--card); border: 1px solid var(--line-hard); border-radius: 8px; }
.tbl-scroll .tbl-t th:first-child, .tbl-scroll .tbl-t td:first-child { padding-left: 14px; }

/* время правки */
.tbl-time { border: 1px solid var(--line-hard); background: #fff; border-radius: 6px; padding: 4px 10px; font: inherit; min-width: 74px; cursor: pointer; font-variant-numeric: tabular-nums; }
.tbl-time:hover { border-color: var(--acc); }
.tbl-time.empty { color: #a9b2bd; }
.tbl-src { font-size: 12px; color: var(--ink-soft); }
.tbl-lead { text-align: center; font-weight: 700; color: var(--green); }

/* разовые */
.tbl-casual { margin-top: 18px; }
.tbl-casual h3 { margin: 0 0 8px; font-size: 17px; }

/* график */
.tbl-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 0 0 10px; font-size: 13.5px; }
.tbl-legend i { display: inline-block; width: 13px; height: 13px; border: 1px solid var(--line-hard); vertical-align: -2px; margin-right: 4px; border-radius: 2px; }
.tbl-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14.5px; }
.tbl-grid th, .tbl-grid td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); text-align: center; padding: 0; min-width: 40px; }
.tbl-grid th { padding: 4px 2px; background: #fff; font-weight: 700; position: sticky; top: 0; z-index: 2; line-height: 1.15; }
.tbl-grid th .dw { display: block; font-size: 11.5px; font-weight: 600; color: var(--red); }
.tbl-grid th .mo { display: block; font-size: 11px; color: var(--ink-soft); text-transform: uppercase; }
.tbl-grid th.wk, .tbl-grid td.wk { background-image: linear-gradient(rgba(0, 0, 0, .025), rgba(0, 0, 0, .025)); }
.tbl-grid th.td { background: #fff4d6; box-shadow: inset 0 -3px 0 #e0a800; }
.tbl-grid th.nm, .tbl-grid td.nm { position: sticky; left: 0; z-index: 3; background: #fff; text-align: left; padding: 6px 12px; min-width: 150px; width: 1%; white-space: nowrap; font-weight: 600; }
.tbl-grid th.nm { z-index: 4; text-transform: uppercase; font-size: 13px; color: var(--ink-soft); }
.tbl-grid td.c { height: 38px; cursor: default; font-weight: 600; position: relative; }
.tbl-grid td.c.can { cursor: pointer; }
.tbl-grid td.c.can:hover { outline: 2px solid var(--acc); outline-offset: -2px; }
.tbl-grid td.c small { display: block; font-size: 10.5px; font-weight: 400; line-height: 1; }
.tbl-grid td.c .star { position: absolute; top: 1px; right: 3px; color: var(--red); font-size: 12px; }
.tbl-grid tr.sum td { font-weight: 700; height: 34px; }
.s-work { background: #fff; color: #8a94a0; }
.s-off { background: #eef1f4; color: #98a2ae; }
.s-agreed { background: #dfeeff; color: #1c5b96; }
.s-vacation { background: #e5f3e9; color: #1f7a4d; }
.s-sick { background: #fdf0d8; color: #9a6408; }
.s-personal { background: #fde68a; color: #7a5b00; }
.s-extra { background: #ece6fb; color: #5b3fa6; }
.f-ok { background: #e9f7ee; color: #2b7a4b; }
.f-late { background: #fff2cc; color: #8a5a00; }
.f-early { background: #ffe0cc; color: #8a3c08; }
.f-noout { background: #dfe7f2; color: #33506e; }
.f-none { background: #fff; }
.f-miss { background: #fbd5d5; color: #9b1c1c; font-weight: 800; }
.tbl-mon td.c { min-width: 34px; font-size: 13.5px; font-variant-numeric: tabular-nums; }

/* окна */
.tbl-dlg .field { margin: 0 0 10px; }
.tbl-dlg input[type="text"], .tbl-dlg input[type="time"], .tbl-dlg input[type="date"], .tbl-dlg input[type="number"], .tbl-dlg select, .tbl-dlg textarea { padding: 6px 10px; font-size: 15.5px; }
.tbl-opts { display: flex; flex-direction: column; gap: 4px; margin: 0 0 10px; }
.tbl-opts label { display: flex; align-items: center; gap: 8px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.tbl-opts label:hover { border-color: #9aa1ac; }
.tbl-opts label.on { border-color: var(--acc); background: var(--blue-bg); }
.tbl-opts b { display: inline-block; min-width: 26px; text-align: center; }
.tbl-chg { margin: 0 0 10px; padding: 8px 12px; background: var(--gray-bg); border-radius: 6px; font-variant-numeric: tabular-nums; }
.tbl-days { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 10px; }
.tbl-days label { display: flex; align-items: center; gap: 4px; }

/* расчёт: раскладка человека */
.tbl-pane { margin-top: 14px; }
.tbl-lines { width: 100%; max-width: 760px; border-collapse: collapse; }
.tbl-lines td { padding: 5px 8px; border-bottom: 1px solid var(--line); }
.tbl-lines td:last-child { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.tbl-lines tr.b td { font-weight: 700; }
.tbl-lines tr.fc td { color: #9aa3ad; }
.tbl-bonus { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 0; border-bottom: 1px solid var(--line); }
.tbl-bonus b { min-width: 160px; }

/* настройки */
.tbl-rules { max-width: 820px; }
.tbl-rules td:first-child { width: 62%; }
.tbl-rules td:last-child { font-weight: 600; font-variant-numeric: tabular-nums; }

@media (max-width: 700px) {
  .tbl-title { min-width: 0; }
  .tbl-t { font-size: 14.5px; }
}
