.eqc-dialog { width: 98vw; max-width: 98vw; height: 96dvh; max-height: 96dvh; overflow: hidden; padding: 12px; font-size: 12px; }
.eqc-body { height: 100%; display: flex; flex-direction: column; min-height: 0; overflow: auto; }
.eqc-body > :not(.eqc-columns) { flex-shrink: 0; }
.eqc-dialog :is(button, input, select) { font-size: 12px; }
.eqc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.eqc-head h2 { margin: 0; font-size: 16px; }
.eqc-head button { font-size: 24px; }
.eqc-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; flex: 1; min-height: min(320px, 50dvh); }
.eqc-columns > section { min-width: 0; min-height: 0; overflow: auto; scrollbar-gutter: stable; border: 1px solid var(--border, #d4dbe5); border-radius: 10px; padding: 12px; }
.eqc-columns h3 { margin: 0; font-size: 14px; }
.eqc-dialog label { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.eqc-dialog input, .eqc-dialog select { padding: 5px 7px; max-width: 100%; }
.eqc-scroll { overflow: auto; max-height: 46vh; margin: 8px 0; }
.eqc-dialog table, .eqc-subtypes table { width: 100%; border-collapse: collapse; }
.eqc-dialog table { font-size: 11px; }
.eqc-subtypes table { font-size: 13px; }
.eqc-dialog td, .eqc-dialog th, .eqc-subtypes td, .eqc-subtypes th { padding: 3px 6px; line-height: 1.25; text-align: left; border-bottom: 1px solid var(--border, #d4dbe5); vertical-align: top; }
.eqc-dialog thead th { position: sticky; top: 0; background: var(--panel, #fff); }
.eqc-dialog .eqc-qty { width: 64px; padding: 2px 5px; }
.eqc-dialog small { display: block; color: var(--muted, #667085); }
.eqc-warning { border-left: 3px solid #c78a22; padding: 8px 12px; background: #fff6df; color: #694c12; }
.eqc-summary { padding: 7px 10px; background: var(--bg, #edf4fa); border-radius: 8px; }
.eqc-subtypes { padding: 14px; }
.eqc-subtypes details { margin: 5px 0; }
.eqc-subtypes summary { cursor: pointer; padding: 6px 9px; background: var(--bg, #edf4fa); }
.eqc-dialog button:not(.btn-primary), .eqc-subtypes button { border: 1px solid var(--border, #cdd6e3); border-radius: 6px; padding: 5px 9px; background: var(--panel, #fff); color: inherit; cursor: pointer; }
.eqc-dialog button:disabled { opacity: .5; cursor: default; }
.eqc-dialog input:not([type=checkbox]), .eqc-dialog select { border: 1px solid var(--border, #cdd6e3); border-radius: 6px; background: var(--panel, #fff); color: inherit; }
.eqc-dialog details { margin: 8px 0; }
.eqc-dialog summary { cursor: pointer; }
.eqc-head > div, .eqc-section-head, .eqc-toolbar, .eqc-footer { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 16px; }
.eqc-head > div { gap: 8px 20px; }
.eqc-section-head { justify-content: space-between; margin-bottom: 10px; }
.eqc-toolbar { margin-bottom: 10px; }
.eqc-toolbar .eqc-summary { margin: 0 0 0 auto; }
.eqc-dialog p { margin: 7px 0; }
.eqc-dialog h4 { margin: 10px 0 6px; font-size: 13px; }
.eqc-dialog .eqc-summary { margin-top: 0; margin-bottom: 0; }
.eqc-protocols { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; }
.eqc-protocols h4, .eqc-protocols p { margin: 0; }
.eqc-footer { justify-content: space-between; margin-top: 10px; }
.eqc-footer details { margin: 0; flex: 1; min-width: 180px; }
.eqc-dialog :is(.eqc-toolbar, .eqc-footer) .btn-primary { padding: 6px 12px; }
.eqc-dialog input[type=search] { flex: 1; min-width: 120px; }

.eqc-rates td, .eqc-rates th { vertical-align: middle; }
.eqc-rates td b { margin-right: 4px; }
.eqc-registry { padding: 8px; border: 1px solid var(--border, #d4dbe5); border-radius: 6px; }
.eqc-registry-table { max-height: 28vh; overflow: auto; }
.eqc-registry-table :is(th, td):first-child { width: 1%; }
.eqc-registry-kks { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eqc-equip-groups { padding-left: 16px; }
.eqc-subtypes { overflow-x: auto; }
.eqc-subtypes table :is(th, td):not(:nth-child(3)) { white-space: nowrap; }
.eqc-toolbar select { max-width: 260px; }

.eqc-subtypes .eqc-toolbar input[type="search"] { flex: 1; width: auto; min-width: 180px; }
.eqc-subtypes .eqc-toolbar label { display: flex; gap: 8px; align-items: center; }
.eqc-subtypes .eqc-toolbar select {
  width: auto;
  padding: 6px 8px;
  border: 1px solid var(--border, #cdd6e3);
  border-radius: 6px;
  background: var(--panel, #fff);
  color: inherit;
}

.eqc-plan-tree details { margin: 4px 0; }
.eqc-plan-tree summary { padding: 4px 7px; background: var(--bg, #edf4fa); }
.eqc-plan-tree .eqc-rates th { position: static; }

.eqc-tree-actions, .eqc-edit-fields {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 4px 0;
}
.eqc-dialog .eqc-tree-actions button { padding: 3px 8px; }
.eqc-edit-fields { padding: 7px; border: 1px solid var(--border); border-radius: 6px; }
.eqc-edit-fields [role="alert"] { flex-basis: 100%; }

.eqc-act-plan { border-bottom: 1px solid var(--border); margin-bottom: 12px; padding-bottom: 8px; }
.eqc-act-plan h3 { margin-bottom: 8px; }
.eqc-act-editor { margin: 8px 0; }
.eqc-act-editor .eqc-toolbar { margin-top: 8px; }

.eqc-act-picker-scroll { max-height: 32vh; overflow: auto; margin: 6px 0; }
.eqc-act-picker-scroll table { table-layout: fixed; min-width: 370px; }
.eqc-act-picker-scroll :is(th, td, button) { overflow-wrap: anywhere; }
.eqc-act-picker-scroll th:nth-child(2) { width: 10%; }
.eqc-act-picker-scroll th:nth-child(5) { width: 22%; }
.eqc-act-picker-scroll input[type="search"] { display: block; width: 100%; min-width: 0; margin-top: 4px; padding: 3px 4px; }

.eqc-act-plan .eqc-section-head h3 { margin: 0; }
.eqc-act-plan .eqc-section-head { gap: 6px 12px; }
.eqc-scroll.eqc-act-matrix-wrap { max-height: none; }
.eqc-act-matrix { table-layout: fixed; min-width: 620px; }
.eqc-act-matrix th:first-child { width: 94px; }
.eqc-act-matrix th:nth-child(3), .eqc-act-matrix th:nth-child(4) { width: 42px; }
.eqc-act-matrix th:nth-child(n+5):nth-child(-n+7) { width: 63px; }
.eqc-act-matrix th:nth-child(n+8) { width: 51px; }
.eqc-dialog .eqc-stage-fill { display: block; margin-bottom: 3px; min-width: 26px; padding: 2px 5px; }
.eqc-act-matrix tr.eqc-outside-act { color: var(--muted); background: var(--panel-2); }
.eqc-act-matrix tr.eqc-progress-complete { background: #e6f5e9; }
.eqc-act-matrix tr.eqc-progress-report { background: #e7f1fd; }
.eqc-act-matrix .eqc-stage-percent { display: block; margin-top: 2px; color: var(--muted); font-weight: normal; }
.eqc-act-matrix th.eqc-progress { width: 63px; }
.eqc-act-matrix .eqc-progress { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.eqc-act-matrix :is(th, td) { overflow-wrap: anywhere; }
.eqc-dialog .eqc-matrix-cell { text-align: center; vertical-align: middle; }
.eqc-dialog .eqc-matrix-cell .eqc-qty { width: 100%; max-width: 48px; font-size: 11px; text-align: right; }
.eqc-matrix-done { font-weight: bold; color: var(--text, #1f2937); }
.eqc-act-matrix th:nth-child(3), .eqc-act-matrix th:nth-child(5) { white-space: nowrap; }
