.plan-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.plan-toolbar #planDuplicateBtn {
  margin-left: 24px;
}

.plan-toolbar-meta {
  margin: -2px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.plan-toolbar-note {
  color: #b7c7dc;
  font-size: 11px;
  line-height: 1.35;
}

.plan-inline-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(138, 167, 206, 0.28);
  background: rgba(10, 28, 52, 0.45);
  color: #dce8fb;
  font-size: 11px;
  font-weight: 650;
}

.plan-inline-status.is-ok {
  color: #d8fbe6;
  border-color: rgba(128, 206, 145, 0.34);
  background: rgba(53, 114, 79, 0.32);
}

.plan-inline-status.is-warn {
  color: #ffe2a8;
  border-color: rgba(243, 198, 117, 0.42);
  background: rgba(123, 89, 38, 0.3);
}

.plan-inline-status.is-error {
  color: #fde5f2;
  border-color: rgba(220, 161, 190, 0.42);
  background: rgba(121, 70, 100, 0.35);
}

.plan-btn {
  border: 1px solid rgba(125, 158, 209, 0.26);
  color: #dce8fb;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 700;
  border-radius: 10px;
  padding: 5px 12px;
  min-width: 118px;
  min-height: 29px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background: rgba(10, 28, 52, 0.62);
  box-shadow: inset 0 1px 0 rgba(233, 241, 253, 0.08);
}

.plan-btn.green {
  border-color: rgba(128, 206, 145, 0.38);
  color: #d7f5e2;
  background: rgba(53, 114, 79, 0.4);
}

.plan-btn.blue {
  border-color: rgba(122, 171, 240, 0.4);
  color: #daebff;
  background: rgba(47, 87, 143, 0.42);
}

.plan-btn.blue.is-active {
  border-color: rgba(177, 213, 255, 0.72);
  background: rgba(60, 109, 175, 0.62);
}

.plan-btn.red {
  border-color: rgba(220, 161, 190, 0.42);
  color: #fde5f2;
  background: rgba(121, 70, 100, 0.43);
}

.plan-btn.purple {
  border-color: rgba(170, 149, 222, 0.42);
  color: #efe8ff;
  background: rgba(93, 74, 142, 0.44);
}

.plan-btn.yellow {
  margin-left: auto;
  border-color: rgba(243, 198, 117, 0.5);
  color: #ffe2a8;
  background: rgba(123, 89, 38, 0.35);
}

.plan-sheet {
  border: 1px solid #7ea2c4;
  border-radius: 10px;
  background: #e8edf5;
  overflow: hidden;
}


.plan-sheet-title {
  display: inline-flex;
  align-items: center;
  margin: 8px 0 0 8px;
  border-radius: 7px;
  background: #29557c;
  color: #ebf3ff;
  font-size: 11px;
  font-weight: 700;
  padding: 6px 10px;
}

.plan-table-wrap {
  margin-top: 0;
  overflow: auto;
}

.page-shell.accounting-mode {
  display: flex;
  flex-direction: column;
  height: var(--accounting-shell-height, calc(100vh - 172px));
  min-height: var(--accounting-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.page-shell.production-mode {
  display: flex;
  flex-direction: column;
  height: var(--production-shell-height, calc(100vh - 172px));
  min-height: var(--production-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.page-shell.employees-mode {
  display: flex;
  flex-direction: column;
  height: var(--employees-shell-height, calc(100vh - 172px));
  min-height: var(--employees-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.page-shell.report-employees-mode {
  display: flex;
  flex-direction: column;
  height: var(--report-employees-shell-height, calc(100vh - 172px));
  min-height: var(--report-employees-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.page-shell.dashboard-mode {
  display: flex;
  flex-direction: column;
  height: var(--dashboard-shell-height, calc(100vh - 172px));
  min-height: var(--dashboard-shell-height, calc(100vh - 172px));
  overflow: hidden;
}

.page-shell.dashboard-mode.panel {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.production-sheet {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.employees-sheet {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.report-employees-sheet {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.production-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.employees-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.employees-table-wrap #empListTable thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.employees-table-wrap #empListTable thead th.report-emp-gear-col {
  z-index: 7;
}

.employees-table-wrap #empLeadTable thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.employees-table-wrap #empLeadTable thead th.report-emp-gear-col {
  z-index: 7;
}

.production-table-wrap .plan-table thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.production-table-wrap .plan-table thead th.report-emp-gear-col {
  z-index: 7;
}

.accounting-table-wrap #reportAccountingTable thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.accounting-table-wrap #reportAccountingTable thead th.report-acc-gear-col {
  z-index: 7;
}

.report-employees-table-wrap #reportEmployeesTable thead th,
.report-employees-table-wrap #reportLossesTable thead th {
  position: sticky;
  top: 0;
  z-index: 6;
}

.report-employees-table-wrap #reportEmployeesTable thead th.report-emp-gear-col,
.report-employees-table-wrap #reportLossesTable thead th.report-emp-gear-col {
  z-index: 7;
}

.report-employees-table-wrap {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.production-sheet .plan-pagination {
  flex: 0 0 auto;
}

.employees-sheet .plan-pagination {
  flex: 0 0 auto;
}

.report-employees-sheet .plan-pagination {
  flex: 0 0 auto;
}


.plan-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  color: #1d2a3b;
  font-family: "Manrope", "Segoe UI", sans-serif;
  font-size: 10px;
}


.plan-table th,
.plan-table td {
  border-right: 1px solid #c6d2df;
  border-bottom: 1px solid #c6d2df;
  padding: 3px 5px;
  white-space: nowrap;
}

.plan-table th {
  position: relative;
  background: linear-gradient(180deg, #2f5f8a, #284d72);
  color: #ebf3ff;
  font-weight: 650;
  font-size: 10px;
  line-height: 1.15;
  white-space: normal;
  text-transform: none;
}

.plan-table td {
  position: relative;
  background: #f9fbfe;
  font-size: 10px;
  line-height: 1.25;
  overflow: visible;
}

.plan-table tbody tr:nth-child(even) td {
  background: #f2f6fb;
}

.plan-table .t-center {
  text-align: center;
}

.plan-check {
  width: 12px;
  height: 12px;
  cursor: pointer;
}

.plan-table tbody tr.plan-empty-row td,
.plan-table tbody tr.archive-empty-row td,
.plan-table tbody tr.brigade-empty-row td {
  height: 26px;
}

.plan-empty-check,
.archive-empty-check,
.brigade-empty-check,
.employee-empty-check,
.employee-lead-empty-check {
  opacity: 0.35;
}

.brigade-empty-row .brigade-lead-check {
  opacity: 0.35;
}

.col-resizer {
  position: absolute;
  top: 0;
  right: -3px;
  width: 7px;
  height: 100%;
  cursor: col-resize;
  z-index: 2;
}

.col-resizer:hover {
  background: rgba(255, 255, 255, 0.24);
}

.cell-select {
  min-height: 16px;
  border-radius: 999px;
  padding: 0 6px;
  background: #e9eef5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
}

.cell-value {
  font-size: 10px;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-select.empty {
  color: #9aa7b9;
}

.plan-empty-cell {
  min-height: 22px;
  border-radius: 8px;
  background: #eef3f9;
}

.plan-select-shell {
  display: flex;
  align-items: center;
  min-width: 0;
  width: 100%;
  min-height: 22px;
  border: 1px solid #c7d3e2;
  border-radius: 10px;
  background: linear-gradient(180deg, #f8fbff, #ebf1f8);
  overflow: hidden;
}

.plan-select-shell.is-disabled {
  background: linear-gradient(180deg, #eef2f7, #e4eaf1);
  opacity: 0.78;
}

.plan-status-shell {
  border-color: transparent;
}

.plan-status-shell.status-new {
  background: #6d58aa;
}

.plan-status-shell.status-work {
  background: #3d73b2;
}

.plan-status-shell.status-failed {
  background: #c05a81;
}

.plan-status-shell.status-partial {
  background: #e6cc78;
}

.plan-status-shell.status-done {
  background: #2f9268;
}

.plan-status-shell.status-wait {
  background: #de9a52;
}

.plan-cell-select,
.plan-cell-input {
  width: 100%;
  min-width: 0;
  min-height: 22px;
  border: 0;
  outline: none;
  background: transparent;
  color: #213852;
  font: inherit;
  font-size: 10px;
  padding: 0 7px;
}

.plan-cell-select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, #617387 50%), linear-gradient(135deg, #617387 50%, transparent 50%);
  background-position: calc(100% - 10px) 9px, calc(100% - 6px) 9px;
  background-size: 4px 4px, 4px 4px;
  background-repeat: no-repeat;
  padding-right: 18px;
}

.plan-cell-select:disabled {
  color: #7f90a4;
  cursor: default;
}

.plan-cell-input::placeholder {
  color: #8b9aad;
}

.plan-status-select {
  color: #ffffff;
  font-weight: 700;
  background-image: linear-gradient(45deg, transparent 50%, rgba(255, 255, 255, 0.92) 50%), linear-gradient(135deg, rgba(255, 255, 255, 0.92) 50%, transparent 50%);
}

.plan-status-shell.status-partial .plan-status-select,
.plan-status-shell.status-wait .plan-status-select {
  color: #4f3d18;
  background-image: linear-gradient(45deg, transparent 50%, rgba(79, 61, 24, 0.9) 50%), linear-gradient(135deg, rgba(79, 61, 24, 0.9) 50%, transparent 50%);
}

.cell-caret {
  color: #607287;
  font-size: 8px;
}

.plan-status-wrap {
  position: relative;
}

.plan-status-wrap.open {
  z-index: 20;
}

.plan-status-button {
  border: 0;
  background: transparent;
  width: 100%;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  cursor: pointer;
}

.status-caret {
  color: #607287;
  font-size: 8px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 15px;
  border-radius: 999px;
  padding: 0 6px;
  font-size: 10px;
  font-weight: 700;
}

.plan-status-static {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.status-new {
  color: #f4edff;
  background: #6d58aa;
}

.status-work {
  color: #e6f2ff;
  background: #3d73b2;
}

.status-failed {
  color: #ffe9f0;
  background: #c05a81;
}

.status-partial {
  color: #4f3d18;
  background: #e6cc78;
}

.status-done {
  color: #e7fff2;
  background: #2f9268;
}

.status-wait {
  color: #5a3a13;
  background: #de9a52;
}

.status-empty-cell {
  background: #f9fbfe;
}

.archive-saved {
  color: #2b8e49;
  font-weight: 700;
}

.archive-unsaved {
  color: #b83b30;
  font-weight: 700;
}

.plan-op-menu {
  min-width: 280px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}

.plan-op-wrap.open .plan-op-menu {
  display: block;
}

.plan-op-search-wrap {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding-bottom: 6px;
  z-index: 2;
  border-bottom: 1px solid #e0e6ef;
  margin-bottom: 6px;
}

.plan-op-search {
  width: 100%;
  min-height: 26px;
  border: 1px solid #9fb4cd;
  border-radius: 6px;
  background: #f7f9fd;
  color: #1d3353;
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.plan-op-search:focus {
  border-color: #4779b6;
  background: #ffffff;
}

.plan-op-section[hidden] {
  display: none;
}

.plan-op-section-title {
  color: #6a7b91;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 2px 2px;
}

.plan-op-section {
  display: grid;
  gap: 2px;
  padding-bottom: 4px;
}

.plan-op-option[hidden] {
  display: none;
}

.plan-op-empty {
  color: #7a8ba3;
  font-size: 11px;
  padding: 10px 6px;
  text-align: center;
  font-style: italic;
}

.plan-op-empty[hidden] {
  display: none;
}

/* ── Employee search dropdown (mirrors plan-op) ── */
.plan-emp-menu {
  min-width: 260px;
  max-height: 320px;
  overflow: auto;
  padding: 8px;
}

.plan-emp-wrap.open .plan-emp-menu {
  display: block;
}

.plan-emp-search {
  width: 100%;
  min-height: 26px;
  border: 1px solid #9fb4cd;
  border-radius: 6px;
  background: #f7f9fd;
  color: #1d3353;
  padding: 0 8px;
  font: inherit;
  font-size: 11px;
  outline: none;
}

.plan-emp-search:focus {
  border-color: #4779b6;
  background: #ffffff;
}

.plan-emp-empty {
  color: #7a8ba3;
  font-size: 11px;
  padding: 10px 6px;
  text-align: center;
  font-style: italic;
}

.plan-emp-option[hidden] {
  display: none;
}

.plan-emp-empty[hidden] {
  display: none;
}
