/* IzyShift — «Остатки отпусков» (02.11.2026), leavebal.js */
.lb-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 8px 0; }
.lb-bar .sp { flex: 1; }
.lb-bar select.inp { max-width: 220px; }
.lb-bar .lb-q { max-width: 240px; }
.lb-year { display: flex; align-items: center; gap: 8px; }
.lb-year b { min-width: 48px; text-align: center; font-size: 17px; }
.lb-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 8px; }
.lb-tabs .seg { display: inline-flex; border: 1px solid #D1D5DB; border-radius: 8px; overflow: hidden; }
.lb-tabs .seg-b { border: 0; background: transparent; padding: 6px 12px; font: inherit; cursor: pointer; color: inherit; }
.lb-tabs .seg-b.on { background: #111827; color: #fff; }
.lb-warn { margin: 10px 0 0; }
.lb-prorate { margin-top: 10px; }
.lb-prorate summary { cursor: pointer; color: #4B5563; margin-bottom: 6px; }
.lb-prorate p { margin: 2px 0 0 28px; }
.lb-tbl th, .lb-tbl td { vertical-align: top; text-align: left; padding: 8px 10px; }
.lb-tbl .num { text-align: right; white-space: nowrap; }
.lb-tbl tbody tr[data-id] { cursor: pointer; }
.lb-tbl tbody tr[data-id]:hover td { background: #F9FAFB; }
.lb-btbl tbody tr[data-id] { cursor: default; }
.lb-tbl tfoot td { font-weight: 600; border-top: 2px solid #E5E7EB; }
.lb-rem b { font-size: 15px; }
.lb-rem.neg b, .neg { color: #B91C1C; }
.lb-btbl input.inp.num { width: 84px; text-align: right; padding: 6px 8px; }
.lb-btbl input.inp.bad { border-color: #DC2626; background: #FEF2F2; }
.lb-bulk-top { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: flex-end; margin: 8px 0; }
.lb-bulk-top label { display: flex; flex-direction: column; gap: 4px; }
.lb-bulk-top label.grow { flex: 1 1 260px; }
.lb-bulk-foot { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 16px; margin-top: 12px;
  position: sticky; bottom: 0; background: #fff; padding: 8px 0; }
.lb-bulk-foot .note { margin: 0; flex: 1; }
.lb-jlist { display: flex; flex-direction: column; }
.lb-jrow { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 8px 0; border-bottom: 1px solid #E5E7EB; }
.lb-jrow .lb-jmeta { grid-column: 1; }
.lb-jrow [data-cancel] { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
.lb-jno { color: #6B7280; font-size: 12px; }
.lb-cancelled .lb-jtext { text-decoration: line-through; color: #9CA3AF; }
.lb-jcancel .lb-jtext { color: #92400E; }
.lb-cnote { color: #6B7280; }
.lb-sheet .lb-tiles { margin: 4px 0 8px; }
.lb-sheet .lb-tiles .stat em { display: block; font-style: normal; }
.lb-form { border-top: 1px solid #E5E7EB; padding-top: 10px; margin-top: 10px; display: flex; flex-direction: column; gap: 6px; }
.lb-form .btn { align-self: flex-start; }
.lb-frow { display: flex; flex-wrap: wrap; gap: 8px 12px; }
.lb-frow label { display: flex; flex-direction: column; gap: 4px; flex: 1 1 120px; }
.lb-frow label.grow { flex: 3 1 220px; }
.lb-sick { margin: 4px 0; }
.lb-tocard { margin-top: 12px; align-self: flex-start; }
.lb-itbl td, .lb-itbl th { padding: 6px 8px; vertical-align: top; text-align: left; }
.lb-i-error td { background: #FEF2F2; }
.lb-i-change td { background: #F0FDF4; }
.lb-fill { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px; margin: 4px 0 8px; }
.lb-fill label { display: flex; flex-direction: column; gap: 4px; }
.lb-fill input.inp.num { width: 90px; }
.lb-btbl input.lb-filled { background: #FFFBEB; }
.lg-balance-act { margin: 6px 0 4px; }

@media (max-width: 640px) {
  .lb-bar select.inp, .lb-bar .lb-q { max-width: none; flex: 1 1 100%; }
  .lb-bar .sp { display: none; }
  .lb-bar .btn { width: auto; flex: 1 1 0; min-width: 0; }
  .lb-tabs > .btn { width: 100%; }
  .lb-tabs .seg { display: flex; width: 100%; }
  .lb-tabs .seg-b { flex: 1 1 0; padding: 8px 6px; }
  .lb-top > p.muted { font-size: 13px; }
  /* таблица → карточки: подпись столбца над значением */
  .lb-tbl thead { display: none; }
  .lb-tbl, .lb-tbl tbody, .lb-tbl tfoot { display: block; width: 100%; }
  .lb-tbl tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px 8px; padding: 10px 0; border-bottom: 1px solid #E5E7EB; }
  .lb-tbl td { padding: 0; border: 0; text-align: left !important; white-space: normal; }
  .lb-tbl td:first-child { grid-column: 1 / -1; }
  .lb-tbl td[data-l]:not(:first-child)::before { content: attr(data-l); display: block; font-size: 11px; color: #9CA3AF; font-weight: 500; }
  .lb-tbl td:empty { display: none; }
  .lb-tbl tfoot tr { display: none; }
  .lb-btbl tr { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lb-btbl input.inp.num { width: 100%; }
  .lb-jrow { grid-template-columns: 1fr; }
  .lb-jrow [data-cancel] { grid-column: 1; grid-row: auto; justify-self: start; }
}
/* «Отменить запись» из листа человека: окно причины (ask, #ch-sheet) — поверх листа */
body:has(#lb-sheet:not([hidden])) #ch-sheet { z-index: 60; }
