/* NIPI-118: «Планы и трудозатраты» — расчёт трудозатрат по договорам (страница на всю ширину рабочей области) */
.lab-page > .card { margin-bottom: 16px; }
.lab-links { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lab-list td, .lab-lines td, .lab-costs td, .lab-fact td { vertical-align: top; }
.lab-list small, .lab-lines small, .lab-costs small, .lab-fact small { display: block; }
.lab-row { cursor: pointer; }
.lab-row:hover td, .lab-row:focus-visible td { background: var(--primary-soft); }
.lab-row:focus-visible { outline: 2px solid var(--primary); outline-offset: -2px; }
.lab-neg { color: var(--danger, #c62828); font-weight: 600; }
.lab-bar { display: inline-block; vertical-align: middle; width: 90px; height: 7px; border-radius: 4px; background: var(--border); overflow: hidden; }
.lab-bar span { display: block; height: 100%; background: #22a05a; }
.lab-bar-over span { background: #d97706; }

.lab-head-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.lab-head-title h3 { margin: 4px 0; font-size: 20px; }
.lab-head-title p { margin: 0; }
.lab-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; margin-top: 16px; }
.lab-tile { display: grid; gap: 2px; align-content: start; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg, #f6f8fb); }
.lab-tile span { font-size: 12.5px; color: var(--muted); }
.lab-tile strong { font-size: 20px; line-height: 1.25; overflow-wrap: anywhere; }
.lab-tile small { font-size: 12px; color: var(--muted); }
.lab-tile-good { border-color: #b9e4c9; background: #f2fbf5; }
.lab-tile-bad, .lab-tile-warn { border-color: #f3b4b4; background: #fff5f5; }
.lab-tile-bad strong { color: var(--danger, #c62828); }

.lab-rate { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 8px 12px; margin-bottom: 12px; }
.lab-rate label { display: grid; gap: 4px; }
.lab-rate input { width: 160px; }
.lab-rate .hint { flex-basis: 100%; margin: 0; }
.lab-level { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 12px; font-weight: 600; background: var(--border); }
.lab-level-specialist { background: #e0ecff; color: #1d4ed8; }
.lab-level-section { background: #dcfce7; color: #15803d; }
.lab-level-group { background: #ede9fe; color: #6d28d9; }
.lab-level-department { background: #ffedd5; color: #c2410c; }
.lab-switch { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.lab-cat { border-top: 1px solid var(--border); padding: 10px 0; }
.lab-cat:first-of-type { border-top: none; }
.lab-cat-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.lab-cat-head h4 { margin: 0; flex: 1; min-width: 200px; }
.lab-none { margin: 4px 0 0; font-size: 13px; }
.lab-totals .lab-total td { font-weight: 700; border-top: 2px solid var(--border); }
.lab-lines tfoot th, .lab-fact tfoot th { text-align: left; }
.lab-lines tfoot th.num, .lab-fact tfoot th.num { text-align: right; }
@media (max-width: 600px) {
  .lab-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lab-rate input { width: 100%; }
}
