/* Таблицы и мобильные карточки работников по макетам Penpot. */
.operators-header { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; }
.operators-heading { min-width:0; }
.operators-heading h2 { margin:0; }
.operators-heading p { margin:3px 0 0; color:var(--md-sys-color-on-surface-variant); font-size:12px; line-height:1.35; }
.operators-title-mobile, .operators-count-mobile { display:none; }
.operators-actions { display:flex; align-items:center; justify-content:flex-end; flex-wrap:wrap; gap:8px; }
.table-toggle { display:inline-flex; align-items:center; gap:8px; min-height:36px; padding:8px 12px; background:var(--md-sys-color-surface-container-lowest); border:1px solid var(--md-sys-color-outline-variant); border-radius:8px; color:var(--md-sys-color-on-surface); font-size:12px; font-weight:700; cursor:pointer; white-space:nowrap; }
.table-toggle input { width:14px; height:14px; margin:0; }
.operators-actions .m3-btn, #btnAddNal { gap:8px; }
.advance-panel { padding:14px; border:1px solid var(--md-sys-color-outline-variant); border-radius:10px; background:var(--md-sys-color-surface-container); }
.advance-heading { display:flex; align-items:flex-start; justify-content:space-between; flex-wrap:wrap; gap:12px; margin-bottom:12px; }
.advance-heading h3 { margin:0; color:var(--md-sys-color-on-surface); font-size:14px; font-weight:700; }
.advance-heading p { margin:3px 0 0; color:var(--md-sys-color-on-surface-variant); font-size:11px; }
.advance-quick { display:flex; align-items:center; flex-wrap:wrap; gap:6px; color:var(--md-sys-color-on-surface-variant); font-size:11px; }
.advance-quick button { min-height:30px; padding:5px 8px; border:1px solid var(--md-sys-color-outline-variant); border-radius:6px; background:var(--md-sys-color-surface-container-lowest); color:var(--md-sys-color-on-surface); box-shadow:none; }
.advance-workers { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr)); gap:8px; }
.advance-worker { display:grid; grid-template-columns:minmax(0,1fr) 62px auto; align-items:center; gap:8px; min-width:0; padding:9px; border:1px solid var(--md-sys-color-outline-variant); border-radius:8px; background:var(--md-sys-color-surface-container-lowest); font-size:12px; }
.advance-worker-name { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; font-weight:600; }
.advance-worker input { width:100%; min-width:0; height:32px; padding:4px; }
.advance-worker-result { color:var(--md-sys-color-primary); font-weight:700; white-space:nowrap; }
.app-operators #tableViewContainer, .app-nalad-section > .overflow-x-auto { border:0; border-radius:8px; }
.app-operators #tableViewContainer table, .app-nalad-section table { table-layout:auto; border-collapse:separate; border-spacing:0; }
.app-nalad-section table.nal-table { table-layout:fixed; min-width:1050px; }
.app-operators #operatorsTableHead th, .app-nalad-section thead th { height:65px; padding:8px 6px; color:var(--md-sys-color-on-surface-variant) !important; background:var(--md-sys-color-surface-container-high) !important; border:0; text-align:center; font-size:10px; line-height:1.2; letter-spacing:0; }
.app-operators #operatorsTableHead th:first-child, .app-nalad-section thead th:first-child { border-top-left-radius:8px; }
.app-operators #operatorsTableHead th:last-child, .app-nalad-section thead th:last-child { border-top-right-radius:8px; }
#operatorsTableHead th span { font-size:10px; font-weight:600; opacity:1; }
#operatorsTableHead #lblMonthHours { display:none; }
#operatorsTableHead input { width:42px; min-height:28px; padding:3px; }
.app-operators #operatorsTableBody td, .app-nalad-section tbody td { height:58px; padding:8px 6px; border:0; color:var(--md-sys-color-on-surface); text-align:center; }
.app-nalad-section tbody td { font-size:12px; }
.app-nalad-section tbody td.table-contribution { color:var(--md-sys-color-tertiary); font-weight:700; }
.app-nalad-section tbody td.table-premium { color:var(--md-sys-color-primary); font-weight:700; }
.app-nalad-section tbody td.nal-weight { font-weight:700; }
.app-nalad-section thead th { text-transform:uppercase; }
.app-nalad-section thead th span { font-size:10px; font-weight:600; }
.app-operators #operatorsTableBody td:first-child, .app-nalad-section tbody td:first-child { text-align:left; }
.app-operators #operatorsTableBody tr:nth-child(even), .app-nalad-section tbody tr:nth-child(even) { background:var(--app-table-alt); }
.app-nalad-section tbody tr:nth-child(odd) { background:var(--md-sys-color-surface-container-lowest); }
.app-operators #operatorsTableBody td[style], .app-operators #operatorsTableBody tr:nth-child(even) td[style] { background:transparent !important; }
#operatorsTableBody input, .app-nalad-section input { font-family:inherit; font-size:12px; font-weight:600; }
.app-nalad-section .nal-name-input { max-width:260px; }
#operatorsTableBody input::placeholder, .app-nalad-section input::placeholder { color:var(--md-sys-color-on-surface-variant); opacity:.8; }
#operatorsTableBody .op-input { padding:6px 5px; }
#operatorsTableBody [data-cell-hplan], #operatorsTableBody [data-cell-hplan-hours], #operatorsTableBody [data-cell-hcal] { text-align:center; line-height:1.2; white-space:nowrap; }
#operatorsTableBody [data-cell-hplan-hours] { color:var(--md-sys-color-on-surface-variant); }
#operatorsTableBody .table-share { color:#1767b3; font-weight:700; }
#operatorsTableBody .table-percent { padding:0; border:0; border-radius:0; background:transparent; color:var(--md-sys-color-on-surface); font:inherit; }
#operatorsTableBody [data-cell-fzp] { color:var(--md-sys-color-primary); font-weight:700; }
#operatorsTableBody [data-cell-share] { display:none; }
#operatorsTableBody .btn-remove-op, .operator-remove, .nal-delete-btn { display:inline-flex; align-items:center; justify-content:center; flex:none; width:32px; height:32px; padding:0; color:var(--md-sys-color-on-surface-variant); background:transparent; border:0; border-radius:6px; cursor:pointer; }
#operatorsTableBody .btn-remove-op:hover, .operator-remove:hover, .nal-delete-btn:hover { color:var(--md-sys-color-primary); background:var(--md-sys-color-primary-container); }
.app-operators #operatorsTableFoot tr, .app-nalad-section tfoot tr { background:var(--md-sys-color-surface-container-high); }
.app-operators #operatorsTableFoot th, .app-operators #operatorsTableFoot td, .app-nalad-section tfoot th, .app-nalad-section tfoot td { height:52px; padding:8px 6px; font-size:11px; vertical-align:middle; text-align:center; }
.app-operators #operatorsTableFoot th { padding-left:8px; text-align:left; }
.table-contribution { color:var(--md-sys-color-tertiary); font-weight:700; }
.table-premium { color:var(--md-sys-color-primary); font-weight:700; }
.app-nalad-section .nal-premium { color:var(--md-sys-color-primary); }
.nal-total-mobile, .nal-title-mobile { display:none; }
.operator-card { padding:8px 10px 10px; border:1px solid var(--md-sys-color-outline-variant); border-radius:10px; background:var(--md-sys-color-surface-container); }
.operator-card-header { display:flex; align-items:center; gap:8px; }
.operator-card-name { flex:1; min-width:0; height:32px; padding:6px 8px; font-weight:700; font-size:12px; }
.operator-card-fields { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px 4px; margin-top:8px; }
.operator-card-fields label, .operator-card-premium { display:flex; min-width:0; flex-direction:column; gap:4px; color:var(--md-sys-color-on-surface-variant); font-size:11px; font-weight:700; line-height:1.2; }
.operator-card-fields input { width:100%; min-width:0; height:34px; padding:5px; font-size:12px; font-weight:600; }
.operator-card-premium strong { display:flex; align-items:center; justify-content:center; min-height:34px; padding:0; color:var(--md-sys-color-primary); font-size:13px; line-height:1.2; text-align:center; overflow-wrap:anywhere; }
.operator-card-premium small { color:var(--md-sys-color-secondary); font-size:10px; }
.operator-card-calculation { display:grid; gap:4px; margin-top:9px; color:var(--md-sys-color-on-surface-variant); font-size:11px; }
.operator-card-calculation [data-card-cell-weight] { color:#1767b3; font-weight:700; }
.app-operators #mobileCardsList { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.app-operators #mobileCardsList .operator-card { background:var(--md-sys-color-surface-container); }
.app-operators #mobileCardsSummary:not([hidden]) { display:flex; justify-content:space-between; gap:12px; padding:8px 6px 0; border:0; background:transparent !important; color:var(--md-sys-color-on-surface); font-size:12px; font-weight:700; }
.app-card-schedule { display:flex; flex-wrap:wrap; justify-content:flex-start; align-items:center; gap:6px; }
.app-card-schedule .schedule-label { flex-basis:100%; margin-bottom:0; font-weight:700; font-size:11px; }
.app-card-schedule input { width:88px; min-height:34px; padding:5px; }
.app-card-schedule .slash { padding:0; }
.nal-cards-view { display:none; }
.nal-cards-list { display:grid; grid-template-columns:minmax(0,1fr); gap:10px; }
.nal-cards-summary:not([hidden]) { display:flex; justify-content:space-between; gap:12px; margin-top:8px; padding:8px 6px 0; font-size:12px; font-weight:700; }
.nal-cards-summary strong { color:var(--md-sys-color-primary); }
.nal-card-ktu { display:flex; min-width:0; flex-direction:column; gap:4px; color:var(--md-sys-color-on-surface-variant); font-size:11px; font-weight:700; line-height:1.2; }
.nal-card-ktu strong { display:grid; place-items:center; height:34px; color:var(--md-sys-color-on-surface); background:var(--md-sys-color-surface-container-lowest); border:1px solid var(--md-sys-color-outline-variant); border-radius:6px; font-size:12px; }
/* Одинаковое появление для обеих категорий и обоих представлений. */
tr.app-enter { animation:app-row-enter 200ms ease-out both; }
tr.app-enter > td, tr.app-enter > th { animation:none; }
@media (max-width:639px) {
  .app-nalad-section .nal-table-wrap { display:none; }
  .app-nalad-section .nal-cards-view { display:block; }
  .nal-title-desktop { display:none; }
  .nal-title-mobile { display:inline; }
  .nal-total-desktop { display:none; }
  .nal-total-mobile { display:table-row; }
  #btnAddNal { min-height:36px; padding:7px 10px; white-space:nowrap; }
  .operators-header { display:grid; grid-template-columns:minmax(0,1fr) auto; gap:12px 8px; }
  .operators-title-desktop, .operators-heading #activeMethodDescription { display:none; }
  .operators-title-mobile, .operators-count-mobile { display:block; }
  .operators-actions { display:contents; }
  .operators-actions #btnAddOperator { grid-row:1; grid-column:2; align-self:start; min-height:36px; padding:7px 10px; white-space:nowrap; }
  .operators-actions .table-toggle { grid-row:2; min-height:22px; padding:0; border:0; background:transparent; justify-self:start; }
  .operators-actions .table-toggle:first-child { grid-column:2; justify-self:start; }
  .operators-actions .table-toggle:nth-child(2) { grid-column:1; }
  .app-operators #mobileCardsSummary:not([hidden]) { margin-top:8px; }
  .app-nalad-section table.nal-table { min-width:0; width:100%; table-layout:fixed; }
  .app-nalad-section thead th, .app-nalad-section tbody td { padding:5px; }
  .app-nalad-section thead th { height:32px; }
  .app-nalad-section thead th:nth-child(3), .app-nalad-section thead th:nth-child(4), .app-nalad-section thead th:nth-child(5),
  .app-nalad-section tbody td:nth-child(3), .app-nalad-section tbody td:nth-child(4), .app-nalad-section tbody td:nth-child(5) { display:none; }
  .app-nalad-section thead th:nth-child(1) { width:43%; }
  .app-nalad-section thead th:nth-child(2) { width:18%; }
  .app-nalad-section thead th:nth-child(6) { width:auto; }
  .app-nalad-section thead th:nth-child(7) { width:32px; }
  .app-nalad-section tbody td { height:44px; }
  .app-nalad-section .nal-name-input { width:100%; min-width:0; }
  .app-nalad-section .nal-hour-input { width:100%; min-width:0; }
  .app-nalad-section tfoot th { text-align:left; }
}
@media (prefers-reduced-motion: reduce) { tr.app-enter { animation:none !important; } }
