.projects-title { display: flex; align-items: center; gap: 6px; }
.projects-title .icon-button { width: 28px; height: 28px; }
.project-edit-note { margin: -2px 0 13px; }
.projects-table-wrap { scroll-padding-left: 132px; }
.team-table.projects-table { width: 100%; min-width: 1738px; table-layout: fixed; }
.projects-table col.project-number-col { width: 132px; }
.projects-table col.project-status-col { width: 145px; }
.projects-table col.project-operators-col { width: 200px; }
.projects-table col.project-schedule-col { width: 185px; }
.projects-table col.project-remaining-col { width: 170px; }
.projects-table col.project-testing-col { width: 180px; }
.projects-table col.project-contacts-col { width: 125px; }
.projects-table col.project-updated-col { width: 135px; }
.projects-table col.project-chat-col { width: 180px; }
.projects-table col.project-actions-col { width: 46px; }
.team-table.projects-table th, .team-table.projects-table td { padding: 12px; white-space: normal; overflow-wrap: anywhere; }
.team-table.projects-table .project-number-cell { width: 132px; min-width: 132px; max-width: 132px; vertical-align: top; text-align: left; }
.project-group-label > strong { display: block; font-size: 17px; font-weight: 750; color: var(--text); }
.projects-table .project-group-start > * { border-top: 2px solid #cbd9d0; }
.projects-table tbody .project-group-start:first-child > * { border-top: 0; }
.project-completed-link { display: block; margin: 10px 0 0; padding: 0; border: 0; background: transparent; color: var(--brand); font-size: 11px; font-weight: 500; text-align: left; line-height: 1.45; }
.project-completed-link:hover { text-decoration: underline; }
.project-completed-link svg { width: 13px; height: 13px; vertical-align: middle; margin-left: 4px; }
.project-base-cell strong { display: block; font-weight: 650; }
.project-base-cell small { display: block; color: var(--muted); margin-top: 5px; }
.project-cell-button { display: flex; align-items: center; gap: 8px; justify-content: space-between; width: calc(100% + 12px); min-height: 36px; padding: 6px; margin: -6px; border: 1px solid transparent; border-radius: 5px; background: transparent; color: inherit; text-align: left; line-height: 1.5; }
.project-cell-button > span { min-width: 0; }
.project-cell-button > svg { flex: 0 0 14px; width: 14px; height: 14px; color: var(--brand); opacity: 0; }
.project-cell-button:hover, .project-cell-button:focus-visible { background: #fff; border-color: var(--line-strong); }
.project-cell-button:hover > svg, .project-cell-button:focus-visible > svg { opacity: 1; }
.project-cell-button:disabled { cursor: default; }
.project-cell-button:disabled > svg { display: none; }
.project-status-button { border: 1px solid transparent; text-align: left; }
.project-status-button:hover, .project-status-button:focus-visible { border-color: currentColor; }
.project-remaining-cell { font-variant-numeric: tabular-nums; text-align: left; }
.project-testing-cell strong { display: block; font-variant-numeric: tabular-nums; font-weight: 650; }
.project-testing-cell small { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; color: var(--muted); }
.project-testing-cell .project-cell-button > svg { opacity: .65; }
.project-testing-form { display: grid; gap: 12px; }
.modal:has(.project-testing-summary) { display: flex; flex-direction: column; }
.modal:has(.project-testing-summary) > header, .modal:has(.project-testing-summary) > .modal-actions { flex-shrink: 0; }
.modal:has(.project-testing-summary) > .modal-content { min-height: 0; max-height: none; }
.project-testing-form .field-note { margin: -4px 0 0; }
.project-testing-form input[name="test_duration"] { max-width: 190px; font-variant-numeric: tabular-nums; }
.project-testing-form textarea { resize: vertical; min-height: 70px; }
.project-testing-contact-note { padding: 10px 12px; border-left: 3px solid var(--brand); background: var(--surface-soft); font-size: 13px; line-height: 1.5; }
.project-testing-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.project-testing-history { margin-top: 14px; color: var(--muted); font-size: 12px; }
.project-testing-history summary { cursor: pointer; }
.testing-reset { margin-right: auto; }
.project-updated-cell { color: var(--muted); font-size: 12px; }
.project-chat-cell .status-pill { max-width: 100%; white-space: normal; }
.project-chat-current { display: grid; gap: 5px; padding: 13px 15px; background: var(--surface-soft); border-radius: 6px; overflow-wrap: anywhere; }
.project-chat-current > span, .project-chat-current > small { color: var(--muted); font-size: 12px; }
.project-chat-current > strong { font-size: 15px; }
.project-chat-scope { padding: 11px 14px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; line-height: 1.5; }
.project-chat-scope ul { padding-left: 19px; margin: 7px 0; }
.project-chat-scope p { margin: 7px 0 0; color: var(--muted); }
#project-chat-binding-form label, #project-chat-binding-form select { min-width: 0; }
#project-chat-binding-form p { margin: 0; }
.modal:has(#project-chat-binding-form), .modal:has(#project-chat-form) { display: flex; flex-direction: column; }
.modal:has(#project-chat-binding-form) > header, .modal:has(#project-chat-binding-form) > .modal-actions, .modal:has(#project-chat-form) > header, .modal:has(#project-chat-form) > .modal-actions { flex-shrink: 0; }
.modal:has(#project-chat-binding-form) > .modal-content, .modal:has(#project-chat-form) > .modal-content { min-height: 0; max-height: none; }
.modal-actions:has(#chat-binding-save), .modal-actions:has(#save-project-chat) { flex-wrap: wrap; }
.project-archived-only td { color: var(--muted); }
.project-archived-only td > strong { display: block; font-weight: 500; }
.project-archived-only td > span { display: block; margin-top: 4px; font-size: 12px; }
.project-modal-note { margin: 10px 0 16px; color: var(--muted); font-size: 12px; line-height: 1.55; }
.project-payroll-hint { padding: 12px 14px; margin: 14px 0; border: 1px solid #cadfd0; background: #f1f8f3; border-radius: 6px; font-size: 13px; line-height: 1.55; }
.project-payroll-hint p { margin: 7px 0 0; }
.project-payroll-hint summary { cursor: pointer; color: var(--brand); margin-top: 8px; }
.project-summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 10px; margin: 16px 0; }
.project-summary-grid > div { padding: 12px; background: var(--surface-soft); border-radius: 6px; }
.project-summary-grid strong, .project-summary-grid span { display: block; }
.project-summary-grid span { margin-top: 5px; font-size: 12px; color: var(--muted); }
.project-history-table { min-width: 640px; }
.project-history-table th, .project-history-table td { font-size: 12px; padding: 10px; white-space: normal; }
.project-history-table small { display: block; color: var(--muted); margin-top: 3px; }
.project-history-more { margin: 14px 0 0; }
.schedule-editor { display: grid; gap: 9px; margin: 16px 0; }
.schedule-day { display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line); }
.schedule-day-label { display: flex; gap: 7px; align-items: center; min-height: 36px; font-weight: 600; }
.schedule-day-label input { width: 17px; height: 17px; }
.schedule-day-intervals { display: grid; gap: 7px; }
.schedule-interval { display: flex; align-items: center; gap: 7px; }
.schedule-interval input { width: 94px; min-width: 0; height: 36px; padding: 7px; }
.schedule-interval .icon-button { width: 30px; height: 30px; }
.schedule-add { justify-self: start; padding: 4px 0; border: 0; background: transparent; color: var(--brand); font-size: 12px; }
.schedule-day.is-off .schedule-day-intervals { display: none; }
.schedule-day.is-off::after { content: "Не работает"; color: var(--muted); align-self: center; }
.schedule-reload { margin-right: auto; }
@media (hover: none), (pointer: coarse) { .project-cell-button > svg { opacity: .7; } }
@media (max-width: 760px) {
  .projects-head { align-items: stretch; flex-direction: column; }
  .projects-head .button-row { justify-content: space-between; }
  .projects-head .search-field { flex: 1; min-width: 180px; }
  .team-table.projects-table .project-number-cell { width: 115px; min-width: 115px; max-width: 115px; }
  .projects-table col.project-number-col { width: 115px; }
  .projects-table-wrap { scroll-padding-left: 115px; }
}
@media (max-width: 440px) {
  .project-testing-summary { gap: 6px; }
  .project-testing-summary > div { padding: 9px 7px; }
  .project-testing-summary strong { font-size: 15px; }
  .project-testing-summary span { font-size: 11px; }
  .modal-actions:has(.testing-reset) { flex-wrap: wrap; }
  .testing-reset { flex: 0 0 100%; }
  .schedule-day { grid-template-columns: 78px minmax(0, 1fr); gap: 6px; }
  .schedule-interval { gap: 4px; }
  .schedule-interval input { width: 75px; font-size: 13px; padding: 5px; }
}
