.hw-workspace {
  --hw-border: var(--border-color, #dfe5ed);
  --hw-text: var(--text-primary, #223047);
  --hw-muted: var(--text-secondary, #64748b);
  --hw-accent: var(--primary, #2863b5);
  color: var(--hw-text);
  width: 100%;
  min-width: 0;
  max-width: 1880px;
  margin: 0 auto;
  padding: 8px 0 32px;
  font-family: inherit;
  font-size: inherit;
  line-height: 1.6;
}
.hw-workspace * {
  box-sizing: border-box;
}
.hw-workspace h1 {
  font-size: 1.85em;
  line-height: 1.3;
  margin: 0 0 8px;
  font-weight: 700;
  letter-spacing: -0.035em;
}
.hw-workspace h2 {
  font-size: 1.12em;
  margin: 0 0 14px;
}
.hw-workspace h3 {
  font-size: 1em;
  margin: 18px 0 10px;
}
.hw-workspace p {
  margin: 8px 0;
}
.hw-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
  margin-bottom: 24px;
}
.hw-header p {
  color: var(--hw-muted);
}
.hw-eyebrow {
  font-size: 0.76em;
  letter-spacing: 0.14em;
  font-weight: 650;
}
.hw-actions {
  display: flex;
  gap: 9px;
  align-items: center;
  flex-wrap: wrap;
  margin: 12px 0;
}
.hw-header > .hw-actions {
  flex-shrink: 0;
  max-width: 48%;
  justify-content: flex-end;
}
.hw-card {
  padding: 22px;
  background: var(--surface, #fff);
  border: 1px solid var(--hw-border);
  border-radius: 14px;
  box-shadow: 0 3px 14px #22304704;
  margin-bottom: 18px;
  min-width: 0;
}
.hw-button {
  font: inherit;
  line-height: 1.3;
  border: 1px solid var(--hw-border);
  padding: 0.6em 0.95em;
  border-radius: 8px;
  background: #fff;
  color: var(--hw-text);
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  justify-content: center;
  align-items: center;
  white-space: nowrap;
}
.hw-button:hover {
  border-color: var(--hw-accent);
  color: var(--hw-accent);
  background: #f3f7fd;
}
.hw-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.hw-button.hw-primary {
  background: var(--hw-accent);
  border-color: var(--hw-accent);
  color: #fff;
}
.hw-button.hw-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--hw-accent);
  font-weight: 600;
}
.hw-button.active {
  background: #edf4ff;
  border-color: #b8cfee;
  color: #2157a0;
}
.hw-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px 18px;
}
[data-form="hw-create"] > h2:not(:first-child) {
  margin-top: 24px;
}
.hw-grid-filter {
  grid-template-columns: 1.25fr 1.4fr 1fr 1fr 1.1fr;
}
.hw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
  margin-bottom: 6px;
}
.hw-field > span {
  font-size: 0.86em;
  color: #4c5d75;
  font-weight: 550;
}
.hw-workspace input:not([type="checkbox"]):not([type="file"]),
.hw-workspace select,
.hw-workspace textarea {
  width: 100%;
  min-width: 0;
  border: 1px solid #cfd8e5;
  background: #fff;
  border-radius: 7px;
  padding: 0.58em 0.7em;
  color: var(--hw-text);
  font: inherit;
  line-height: 1.45;
}
.hw-workspace input:focus,
.hw-workspace select:focus,
.hw-workspace textarea:focus {
  outline: 2px solid #bed3ee;
  outline-offset: 1px;
  border-color: #618dc4;
}
.hw-workspace textarea {
  min-height: 80px;
  resize: vertical;
}
.hw-workspace input:disabled,
.hw-workspace select:disabled,
.hw-workspace textarea:disabled {
  background: #f5f7fa;
  color: #4d5e72;
}
.hw-wide {
  grid-column: 1/-1;
}
.hw-check {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.9em;
}
.hw-check input {
  accent-color: var(--hw-accent);
  width: 16px;
  height: 16px;
}
.hw-workspace fieldset {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.hw-workspace fieldset:disabled button {
  display: none;
}
.hw-muted {
  font-size: 0.86em;
  color: var(--hw-muted);
}
.hw-advanced {
  border-top: 1px solid #edf0f5;
  margin-top: 14px;
  padding-top: 10px;
}
.hw-workspace summary {
  cursor: pointer;
  color: #435c7b;
  font-weight: 550;
  padding: 6px 0;
}
.hw-advanced[open] > .hw-grid {
  margin-top: 14px;
}
.hw-metrics {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}
.hw-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 19px 17px;
  border: 1px solid var(--hw-border);
  border-radius: 12px;
  background: linear-gradient(145deg, #fff, #f5f8fc);
  color: var(--hw-text);
  text-align: left;
  font: inherit;
  cursor: pointer;
}
.hw-metric:hover {
  border-color: #9bbbe1;
  box-shadow: 0 5px 20px #254c7d10;
}
.hw-metric > span {
  font-size: 0.85em;
  color: #5a6c85;
}
.hw-metric strong {
  font-size: 2.15em;
  line-height: 1.15;
  font-weight: 650;
}
.hw-metric small {
  font-size: 0.72em;
  color: #8190a4;
}
.hw-table-scroll {
  width: 100%;
  overflow: auto;
  max-height: 70vh;
  border: 1px solid #e4e9f0;
  border-radius: 9px;
}
.hw-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.88em;
  text-align: left;
}
.hw-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f3f6fa;
  color: #61718a;
  font-size: 0.91em;
  font-weight: 600;
  border-bottom: 1px solid #dfe5ee;
  padding: 12px 13px;
  white-space: nowrap;
}
.hw-table td {
  border-bottom: 1px solid #edf0f5;
  padding: 13px;
  vertical-align: top;
  max-width: 260px;
  overflow-wrap: anywhere;
}
.hw-table tr:last-child td {
  border-bottom: 0;
}
.hw-table tr:hover td {
  background: #fbfcff;
}
.hw-table small {
  display: block;
  color: var(--hw-muted);
  font-size: 0.86em;
  margin-top: 4px;
}
.hw-ledger {
  --hw-selection-width: 44px;
  --hw-number-left: 0px;
  min-width: 1400px;
}
.hw-ledger-selectable {
  --hw-number-left: var(--hw-selection-width);
}
.hw-ledger .hw-selection-cell {
  box-sizing: border-box;
  position: sticky;
  left: 0;
  width: var(--hw-selection-width);
  min-width: var(--hw-selection-width);
  max-width: var(--hw-selection-width);
  padding: 13px;
  text-align: center;
  vertical-align: middle;
  background: #fff;
  z-index: 2;
}
.hw-ledger .hw-task-number {
  position: sticky;
  left: var(--hw-number-left);
  background: #fff;
  z-index: 2;
  min-width: 25ch;
  white-space: nowrap;
  vertical-align: middle;
  font-variant-numeric: tabular-nums;
}
.hw-ledger .hw-task-number .hw-link {
  white-space: nowrap;
  padding: 0;
  text-align: left;
}
.hw-ledger th:last-child,
.hw-ledger td:last-child {
  position: sticky;
  right: 0;
  background: #fff;
  z-index: 2;
}
.hw-ledger th.hw-selection-cell,
.hw-ledger th.hw-task-number,
.hw-ledger th:last-child {
  background: #f3f6fa;
  z-index: 3;
}
.hw-tag {
  display: inline-flex;
  padding: 3px 9px;
  border-radius: 5px;
  color: #61718a;
  background: #eef2f6;
  white-space: nowrap;
  font-size: 0.83em;
  line-height: 1.6;
}
.hw-tag-PASS,
.hw-tag-APPROVED,
.hw-tag-CLOSED {
  color: #207050;
  background: #e8f5ed;
}
.hw-tag-NG,
.hw-tag-OPEN {
  color: #a14242;
  background: #fcecec;
}
.hw-tag-IN_PROGRESS,
.hw-tag-SUBMITTED,
.hw-tag-REVIEWED,
.hw-tag-PUBLISHED {
  color: #2c609e;
  background: #eaf2fc;
}
.hw-tag-PAUSED,
.hw-tag-RETURNED {
  color: #966115;
  background: #fff3dc;
}
.hw-tag-VOID,
.hw-tag-DISABLED {
  color: #707984;
  background: #eceef0;
}
.hw-workspace progress {
  display: block;
  width: 90px;
  height: 7px;
  margin-top: 7px;
  accent-color: #5089c3;
}
.hw-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  font-size: 0.9em;
  margin: 16px 0;
}
.hw-pagination select {
  width: 85px;
}
.hw-two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}
.hw-stat {
  font-size: 2.5em;
  color: #2c5f99;
  font-weight: 650;
  line-height: 1.3;
}
.hw-bar-row {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 14px;
  border: 0;
  background: transparent;
  padding: 13px 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
}
.hw-bar-row span {
  width: 90px;
  flex-shrink: 0;
}
.hw-conclusion-bar {
  flex: 1;
  min-width: 0;
  height: 18px;
  max-width: 75%;
  border-radius: 4px;
  fill: #87acd3;
}
.hw-bar-row strong {
  min-width: 40px;
}
.hw-empty {
  color: #8390a2;
  text-align: center;
  padding: 30px 18px;
  background: #f9fbfd;
  border-radius: 9px;
  font-size: 0.91em;
}
.hw-template-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.hw-template-tile {
  border: 1px solid var(--hw-border);
  padding: 18px;
  border-radius: 10px;
}
.hw-template-tile h3 {
  font-size: 1.14em;
  margin: 12px 0;
}
.hw-template-tile p {
  color: var(--hw-muted);
  font-size: 0.84em;
}
.hw-template-tile .hw-button {
  font-size: 0.86em;
}
.hw-workbench {
  display: grid;
  grid-template-columns: 230px 260px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}
.hw-workbench > .hw-card {
  padding: 18px;
}
.hw-tree-node {
  padding-left: calc(var(--hw-depth, 0) * 12px);
  max-width: 100%;
}
.hw-tree-button {
  border: 0;
  background: transparent;
  color: #4b607a;
  font: inherit;
  text-align: left;
  width: 100%;
  padding: 9px 7px;
  border-radius: 6px;
  cursor: pointer;
  overflow-wrap: anywhere;
}
.hw-tree-button:hover,
.hw-tree-button.active {
  background: #eaf2fd;
  color: #255f9e;
}
.hw-module-edit {
  border-top: 1px solid var(--hw-border);
  margin-top: 18px;
  padding-top: 16px;
}
.hw-module-edit .hw-actions {
  gap: 5px;
}
.hw-module-edit .hw-button {
  font-size: 0.77em;
  padding: 6px;
}
.hw-case-item {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: flex-start;
  border: 1px solid transparent;
  border-bottom-color: #e8edf4;
  border-radius: 8px;
  background: #fff;
  text-align: left;
  padding: 14px 10px;
  font: inherit;
  color: inherit;
  cursor: pointer;
  margin-top: 5px;
}
.hw-case-item small {
  font-size: 0.78em;
  color: var(--hw-muted);
}
.hw-case-item.active {
  background: #eef5ff;
  border-color: #c8dcf4;
}
.hw-case-editor .hw-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hw-field-editor {
  padding: 15px;
  border: 1px solid #dfe6ef;
  border-radius: 9px;
  margin: 12px 0;
  background: #fafbfd;
}
.hw-field-editor .hw-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hw-task-summary {
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
  background: #edf3fa;
  border: 1px solid #dae5f1;
  padding: 14px 20px;
  border-radius: 11px;
  margin-bottom: 15px;
}
.hw-task-summary > span:not(.hw-tag) {
  font-size: 0.87em;
  color: #60738c;
}
.hw-tabs {
  display: flex;
  gap: 5px;
  border-bottom: 1px solid #dce4ef;
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.hw-tabs .hw-button {
  border: 0;
  background: transparent;
  padding: 10px 20px;
  color: #65768e;
}
.hw-tabs .hw-button.active {
  background: #eaf2fc;
  color: #245f9f;
  font-weight: 650;
}
.hw-execution {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.hw-execution-list {
  max-height: 80vh;
  overflow: auto;
  position: sticky;
  top: 12px;
}
.hw-execution-main {
  padding: 24px;
  min-width: 0;
}
.hw-requirements {
  background: #f6f8fc;
  border: 1px solid #e2e9f2;
  border-radius: 9px;
  padding: 10px 16px;
  margin: 15px 0;
}
.hw-requirements summary {
  font-size: 0.9em;
  overflow-wrap: anywhere;
}
.hw-facts {
  margin: 10px 0;
}
.hw-facts > div {
  display: grid;
  grid-template-columns: 105px minmax(0, 1fr);
  border-top: 1px solid #e7ecf3;
  padding: 10px 0;
  font-size: 0.9em;
}
.hw-facts dt {
  color: var(--hw-muted);
}
.hw-facts dd {
  margin: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hw-results {
  min-width: 860px;
}
.hw-results td {
  min-width: 125px;
  padding: 9px;
}
.hw-results td:nth-child(2) {
  min-width: 75px;
}
.hw-results input,
.hw-results select,
.hw-results textarea {
  min-width: 105px !important;
  font-size: 1em;
}
.hw-results textarea {
  min-height: 60px !important;
}
.hw-results th {
  white-space: normal;
  min-width: 115px;
}
.hw-save-state {
  font-size: 0.85em;
  color: #40678e;
}
.hw-paste {
  margin: 20px 0;
  padding: 14px;
}
.hw-paste p {
  font-size: 0.85em;
  color: var(--hw-muted);
}
.hw-paste textarea {
  min-height: 120px;
}
.hw-time-list {
  font-size: 0.8em;
  color: var(--hw-muted);
}
.hw-evidence {
  border-top: 1px solid #e1e7f0;
  margin-top: 25px;
  padding-top: 5px;
}
.hw-evidence-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 12px 0;
}
.hw-evidence-item {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid #e1e7f0;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.84em;
  overflow-wrap: anywhere;
}
.hw-evidence-item img {
  width: 100%;
  height: 120px;
  object-fit: contain;
  background: #f2f5f8;
}
.hw-evidence-item small {
  color: var(--hw-muted);
}
.hw-note {
  border-left: 3px solid #a4bfdd;
  padding: 12px 18px;
  background: #f7f9fc;
  margin: 12px 0;
  border-radius: 0 8px 8px 0;
}
.hw-timeline {
  border-left: 2px solid #cad9eb;
  padding: 10px 18px;
  margin-left: 5px;
  margin-bottom: 8px;
}
.hw-timeline span {
  font-size: 0.83em;
  color: var(--hw-muted);
  margin-left: 20px;
}
.hw-timeline p {
  font-size: 0.9em;
  white-space: pre-wrap;
}
.hw-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}
.hw-alert {
  background: #fff4df;
  color: #805c20;
  border: 1px solid #f0d6a2;
  padding: 14px 18px;
  border-radius: 9px;
  margin-bottom: 18px;
  font-size: 0.92em;
  overflow-wrap: anywhere;
}
.hw-stack {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
@media (max-width: 1500px) {
  .hw-workbench {
    grid-template-columns: 220px minmax(0, 1fr);
  }
  .hw-case-editor {
    grid-column: 2;
    grid-row: 2;
  }
  .hw-tree {
    grid-row: 1/3;
  }
  .hw-case-list {
    max-height: 300px;
    overflow: auto;
  }
  .hw-template-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hw-grid-filter {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .hw-metrics {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .hw-header {
    align-items: flex-start;
  }
  .hw-execution {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}
@media (max-width: 1100px) {
  .hw-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .hw-header {
    flex-direction: column;
    gap: 10px;
  }
  .hw-header > .hw-actions {
    max-width: 100%;
    justify-content: flex-start;
  }
  .hw-card {
    padding: 16px;
  }
  .hw-execution {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .hw-workbench {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .hw-two {
    grid-template-columns: 1fr;
  }
}
.hw-tree-node {
  display: flex;
  align-items: center;
  gap: 3px;
}
.hw-tree-toggle {
  padding: 2px 5px;
  flex: 0 0 24px;
  font-size: 0.85em;
}
.hw-tree-button {
  flex: 1;
}
.hw-source-preview {
  max-height: 420px;
  overflow: auto;
}
.hw-source-preview article {
  border-bottom: 1px solid #e1e7f0;
  padding: 12px;
}
.hw-source-preview p {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.hw-filter-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-top: 1px dashed #e0e7f1;
  padding-top: 12px;
}
.hw-compact-filters {
  padding: 14px 20px;
}
.hw-compact-row {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}
.hw-compact-row > .hw-field {
  flex: 1 1 140px;
  margin: 0;
  max-width: 340px;
}
.hw-compact-row > .hw-button {
  margin-bottom: 1px;
}
.hw-compact-filters details {
  margin-top: 8px;
}
.hw-compact-filters summary {
  font-size: 0.84em;
}
.hw-compact-filters > .hw-muted {
  margin: 4px 0 0;
  font-size: 0.76em;
}
.hw-ledger-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: -4px 0 16px; }
.hw-ledger-toolbar p { margin: 0; color: var(--hw-muted); font-size: .86em; }
.hw-ledger-toolbar .hw-actions { margin: 0; }
.hw-batch-panel { padding: 14px 16px; margin: 0 0 16px; border: 1px solid #cfe3e9; border-radius: 10px; background: #f5fafb; }
.hw-batch-panel > .hw-actions { margin: 0; }
.hw-batch-panel .hw-muted { font-size: .82em; margin: 8px 0 0; }
.hw-batch-assignment { margin-top: 14px; padding-top: 12px; border-top: 1px solid #d9e8eb; }
.hw-batch-assignment h3 { margin: 0 0 8px; font-size: 1em; }
.hw-batch-assignment-controls { display: flex; align-items: flex-end; gap: 10px; margin: 12px 0; }
.hw-batch-assignment-controls .hw-field { flex: 0 1 360px; margin: 0; }
.hw-batch-feedback { color: #99591c; font-size: .87em; line-height: 1.65; }
.hw-batch-feedback ul { margin: 6px 0; padding-left: 20px; max-height: 200px; overflow: auto; }
.hw-job-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--hw-border); }
.hw-filters .filter-panel-head { align-items: center; }
.hw-filters .filter-panel-head > div:first-child { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.hw-filters .filter-panel-head small { margin: 0; }
.hw-filters .filter-panel-actions .hw-button { min-height: 32px; padding: 5px 10px; border-color: transparent; background: transparent; color: #397483; }
.hw-filter-body { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--hw-border); }
.hw-filter-body[hidden] { display: none; }
.hw-unified-filter-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px 14px; }
.hw-unified-filter-grid .hw-field { margin: 0; }
.hw-filter-flags { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 14px 0; }
.hw-filters .hw-actions { margin-bottom: 0; }
@media (max-width: 1500px) { .hw-unified-filter-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .hw-ledger-toolbar { flex-wrap: wrap; } }
.modal-card.hardware-ledger-columns .column-config-layout { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); }
.modal-card.hardware-ledger-columns .column-picker { display: grid; }
.modal-card.hardware-ledger-columns .column-picker-option { min-height: 45px; }
.modal-card.hardware-ledger-columns .column-picker-option small { display: inline-block; margin-left: 8px; font-size: .8em; color: #7d939b; }
.modal-card.hardware-ledger-columns .column-order-list b { white-space: normal; }
.modal-card.hardware-ledger-columns .column-order-list li { min-height: 42px; }
.modal-card.hardware-ledger-columns .column-order-button { width: 30px; height: 30px; }
.hw-ledger-column-actions { position: sticky; bottom: -22px; margin: 0 -22px -22px; padding: 14px 22px; border-top: 1px solid #dce9ed; background: #fff; }
.hw-ledger-column-actions > span { margin-right: auto; color: #718492; font-size: .85em; }
@media (max-width: 900px) {
  .modal-card.hardware-ledger-columns .column-config-layout { grid-template-columns: 1fr; }
  .hw-ledger-column-actions { bottom: -17px; margin: 0 -17px -17px; padding: 12px 17px; }
}
.hw-ledger input[type="checkbox"] {
  display: inline-block;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  padding: 0;
  margin: 0;
  vertical-align: middle;
  accent-color: var(--hw-accent);
}
.hw-config-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-bottom: 16px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--hw-border);
}
.hw-case-assignment {
  text-align: left;
  background: #fff;
  border: 1px solid #dce5f0;
  border-radius: 9px;
  padding: 14px 18px;
  margin-bottom: 12px;
}
.hw-case-assignment p {
  font-size: 0.87em;
  color: var(--hw-muted);
}
.hw-case-assignment .hw-check-grid {
  margin: 12px 0 0;
}
.hw-time-comparison {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.hw-time-compare {
  display: grid;
  grid-template-columns: minmax(140px, 1.3fr) minmax(160px, 3fr) 140px;
  align-items: center;
  gap: 18px;
  width: 100%;
  border: 0;
  border-bottom: 1px solid #e3eaf3;
  background: #fff;
  color: inherit;
  text-align: left;
  font: inherit;
  padding: 12px 0;
  cursor: pointer;
}
.hw-time-compare:hover {
  background: #f7faff;
}
.hw-time-compare strong {
  font-size: 0.92em;
}
.hw-time-compare small {
  display: block;
  font-size: 0.74em;
  color: var(--hw-muted);
}
.hw-time-compare > span:last-child {
  font-size: 0.8em;
  color: #5e728b;
}
.hw-time-bars {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.hw-time-bars svg {
  width: 100%;
  height: 10px;
  display: block;
  border-radius: 4px;
  min-width: 0;
}
.hw-time-plan {
  fill: #78a5d2;
}
.hw-time-actual {
  fill: #6db6a1;
}
@media (max-width: 1500px) {
  .hw-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
  }
  .hw-metric {
    padding: 13px 14px;
    gap: 6px;
  }
  .hw-metric strong {
    font-size: 1.9em;
  }
  .hw-metric small {
    display: none;
  }
  .hw-compact-row > .hw-field {
    flex-basis: 130px;
  }
  .hw-time-compare {
    grid-template-columns: 145px minmax(100px, 1fr) 110px;
  }
}
.hw-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background: #15233970;
  backdrop-filter: blur(3px);
}
.hw-workspace.hw-modal {
  width: min(540px, 100%);
  max-height: calc(100vh - 56px);
  overflow: auto;
  margin: 0;
  background: #fff;
  border: 1px solid #dce4ef;
  border-radius: 16px;
  padding: 25px 28px;
  box-shadow: 0 24px 100px #11233d40;
}
.hw-modal-heading h2 {
  margin: 0 0 14px;
  font-size: 1.25em;
}
.hw-modal-message {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  color: #52647c;
  margin-bottom: 20px !important;
}
.hw-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid #e7edf5;
  padding-top: 18px;
  margin-top: 22px;
}
.hw-modal .hw-field textarea {
  min-height: 110px;
}

/* Class-based tree depth remains effective under style-src self. */
.hw-depth-0 { --hw-depth: 0; }
.hw-depth-1 { --hw-depth: 1; }
.hw-depth-2 { --hw-depth: 2; }
.hw-depth-3 { --hw-depth: 3; }
.hw-depth-4 { --hw-depth: 4; }
.hw-depth-5 { --hw-depth: 5; }
.hw-depth-6 { --hw-depth: 6; }
.hw-depth-7 { --hw-depth: 7; }
.hw-depth-8 { --hw-depth: 8; }

/* Horizontal hardware outline and date analysis share existing workspace tokens. */
.hw-workspace .hw-outline { min-width: 0; padding: 16px; }
.hw-outline-table { min-width: 1100px; table-layout: auto; }
.hw-outline-table > thead > tr > th { white-space: normal; }
.hw-outline-table > tbody > tr > td { vertical-align: top; padding: 10px; }
.hw-outline-table .hw-outline-module { width: 112px; min-width: 105px; max-width: 140px; }
.hw-outline-table tr > .hw-outline-module:first-child { position: sticky; left: 0; z-index: 1; background: var(--surface, #fff); }
.hw-outline-table thead tr > .hw-outline-module:first-child { z-index: 3; background: #f3f6fa; }
.hw-outline-table .hw-outline-case { width: 140px; min-width: 125px; max-width: 180px; }
.hw-outline-table .hw-outline-requirements { width: 115px; min-width: 105px; max-width: 200px; }
.hw-outline-table .hw-outline-sample { width: 155px; min-width: 145px; }
.hw-outline-table .hw-outline-values { width: 240px; min-width: 200px; max-width: 300px; }
.hw-outline-table .hw-outline-conclusion { width: 185px; min-width: 175px; }
.hw-outline-table .hw-outline-evidence { width: 115px; min-width: 105px; }
.hw-outline-table small { display: block; margin-top: 4px; }
.hw-outline-table .hw-button { white-space: normal; }
.hw-outline-table .hw-outline-control { display: grid; gap: 3px; margin-bottom: 6px; min-width: 0; }
.hw-outline-control > span { font-size: .86em; color: var(--hw-muted); }
.hw-outline-table .hw-outline-control :is(input, select, textarea) { min-width: 0; width: 100%; padding: 5px 7px; min-height: 30px; }
.hw-outline-table .hw-outline-control textarea { min-height: 58px; resize: vertical; }
.hw-outline-table .hw-outline-sample .hw-outline-control { grid-template-columns: 30px minmax(0, 1fr); align-items: center; }
.hw-outline-value-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(95px, 1fr)); gap: 6px; }
.hw-outline-requirements details > summary { cursor: pointer; }
.hw-outline-requirements dd { margin: 3px 0 10px; white-space: pre-wrap; }
.hw-outline-active-row > :is(.hw-outline-sample, .hw-outline-values, .hw-outline-conclusion, .hw-outline-evidence) { background: #f7faff; }
.hw-outline-editor-toolbar { padding: 14px 16px; margin-bottom: 12px; }
.hw-outline-editor-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.hw-outline-editor-meta .hw-pagination { margin: 0; }
.hw-outline-editor-toolbar > .hw-field { max-width: 640px; }
.hw-outline-modules { margin-bottom: 14px; }
.hw-outline-modules .hw-actions { max-height: 220px; overflow: auto; margin-top: 12px; }
.hw-gantt-table { min-width: 1280px; width: 100%; table-layout: fixed; }
.hw-gantt-table th:first-child, .hw-gantt-table td:first-child { width: 280px; }
.hw-gantt-table th:nth-child(2), .hw-gantt-table td:nth-child(2) { width: 840px; }
.hw-gantt-table th:last-child, .hw-gantt-table td:last-child { width: 265px; }
.hw-gantt-axis, .hw-gantt-track { display: block; width: 840px; height: 46px; }
.hw-gantt-axis { height: 32px; }
.hw-gantt-axis text { font-size: 10px; fill: currentColor; }
.hw-gantt-track text { font-size: 12px; fill: currentColor; }
.hw-gantt-planned { fill: #4777c7; }.hw-gantt-actual { fill: #228068; }.hw-gantt-baseline { fill: #8491a3; }
.hw-gantt-level-0 > td:first-child { font-weight: 700; }
.hw-gantt-level-1 > td:first-child { padding-left: 20px; }
.hw-gantt-level-2 > td:first-child { padding-left: 35px; }
.hw-gantt-level-3 > td:first-child { padding-left: 50px; }
.hw-gantt-table small { display: block; }
.hw-evidence-item video { width: 100%; max-height: 260px; background: #18222f; }

/* Configuration follows the shared left-navigation workspace; editors retain full width. */
.hw-config-layout { display: grid; grid-template-columns: 184px minmax(0, 1fr); gap: 24px; align-items: start; --hw-accent: #078699; }
.hw-config-sidebar { padding: 16px 8px; border: 1px solid var(--hw-border); border-radius: 11px; background: #fff; }
.hw-config-sidebar > p { margin: 4px 12px 14px; color: var(--hw-muted); font-size: .85em; font-weight: 600; }
.hw-config-sidebar .hw-config-nav { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; border: 0; }
.hw-config-nav .hw-button { justify-content: flex-start; text-align: left; white-space: normal; border: 0; border-left: 3px solid transparent; padding: 12px 10px; color: #627d89; background: transparent; }
.hw-config-nav .hw-button.active { border-left-color: #078699; background: #e8f4f4; color: #087e90; font-weight: 650; }
.hw-config-content { min-width: 0; }
.hw-config-content > .hw-header { align-items: flex-start; flex-wrap: wrap; gap: 8px 18px; }
.hw-config-content > .hw-header h1 { font-size: 1.4em; letter-spacing: 0; }
.hw-config-content > .hw-header .hw-eyebrow { display: none; }
.hw-config-content > .hw-header > .hw-actions { flex-shrink: 1; }
.hw-config-sections { display: grid; gap: 20px; }
.hw-settings-card { margin: 0; padding: 24px; }
.hw-settings-heading { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; margin-bottom: 20px; }
.hw-settings-heading h2 { margin: 0; }
.hw-settings-heading .hw-eyebrow { margin: 0 0 6px; color: #078699; }
.hw-settings-options, .hw-report-fields { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 18px 24px; }
.hw-settings-options .hw-wide { grid-column: auto; }
.hw-settings-options textarea { min-height: 116px; line-height: 1.65; resize: vertical; }
.hw-approval-setting { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hw-border); }
.hw-approval-setting h3 { margin: 0 0 12px; }
.hw-approval-setting .hw-check { display: flex; align-items: center; gap: 10px; width: fit-content; margin: 0; }
.hw-approval-setting .hw-check input { flex: 0 0 17px; width: 17px; height: 17px; margin: 0; }
.hw-settings-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--hw-border); }
.hw-settings-footer > span { color: var(--hw-muted); font-size: .85em; }
.hw-report-structure { padding: 12px 14px; border-radius: 7px; background: #f5f9fa; color: #647f8b; font-size: .85em; }
.hw-template-status { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; }
.hw-template-status .hw-button.active { color: #087e90; background: #e8f4f4; border-color: #9ccdd2; }
.hw-template-table .hw-tag-DRAFT { color: #88560d; background: #fff3d6; }
.hw-template-table .hw-tag-PUBLISHED { color: #176646; background: #e5f4eb; }
.hw-template-table .hw-tag-DISABLED { color: #704f5a; background: #f2e9ed; }
.hw-template-status [data-value="DRAFT"] { color: #88560d; border-color: #dfc48d; }
.hw-template-status [data-value="PUBLISHED"] { color: #176646; border-color: #a7cfb8; }
.hw-template-status [data-value="DISABLED"] { color: #704f5a; border-color: #d2b9c3; }
.hw-template-status [data-value="DRAFT"].active { color: #88560d; background: #fff3d6; border-color: #bf943f; }
.hw-template-status [data-value="PUBLISHED"].active { color: #176646; background: #e5f4eb; border-color: #67a884; }
.hw-template-status [data-value="DISABLED"].active { color: #704f5a; background: #f2e9ed; border-color: #aa8393; }
.hw-template-table [data-hw-action="list-template-action"][data-value="disable"] { color: #a03f36; background: #fff0ed; border-color: #e4b5ad; }
.hw-template-table [data-hw-action="list-template-action"][data-value="enable"],
.hw-template-table [data-hw-action="list-template-action"][data-value="publish"] { color: #176646; background: #e5f4eb; border-color: #a7cfb8; }
.hw-template-table [data-hw-action="list-template-action"]:hover { filter: brightness(.96); }
.hw-template-table { overflow: auto; border: 1px solid var(--hw-border); border-radius: 9px; }
.hw-template-table table { width: 100%; min-width: 660px; border-collapse: collapse; }
.hw-template-table th { padding: 12px; text-align: left; background: #f3f8fa; color: #68818e; font-size: .8em; white-space: nowrap; }
.hw-template-table td { padding: 14px 12px; border-top: 1px solid var(--hw-border); vertical-align: middle; font-size: .85em; }
.hw-template-table td:first-child { min-width: 170px; }
.hw-template-table td:first-child b, .hw-template-table td:first-child small { display: block; overflow-wrap: anywhere; }
.hw-template-table td small { margin-top: 5px; color: var(--hw-muted); }
.hw-template-table .hw-actions { margin: 0; gap: 6px; }
.hw-template-table .hw-actions .hw-button { padding: 6px 8px; }
@media (max-width: 1350px) { .hw-config-layout { grid-template-columns: 160px minmax(0,1fr); gap: 18px; } .hw-settings-card { padding: 20px; } }

.hw-create-fields { border: 0; padding: 0; margin: 0; min-width: 0; }
.hw-create-fields > h2:not(:first-child) { margin-top: 24px; }
.hw-create-samples { min-width: 1140px; }
.hw-create-samples th { white-space: nowrap; }
.hw-create-samples input:not([type="file"]) { width: 100%; min-width: 110px; }
.hw-create-samples td:nth-child(6) { min-width: 180px; }
.hw-file-picker { position: relative; display: inline-flex; overflow: hidden; cursor: pointer; }
.hw-file-picker input[type="file"] { position: absolute; inset: 0; opacity: 0; width: 100%; cursor: pointer; }
.hw-file-picker:focus-within { outline: 2px solid var(--hw-accent, #168493); outline-offset: 2px; }
.hw-create-fields textarea { width: 100%; box-sizing: border-box; min-height: 96px; }

/* A case occupies one row; detailed results are opened intentionally. */
.hw-case-workspace { padding: 0; overflow: hidden; }
.hw-case-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 10px 18px; border-bottom: 1px solid var(--hw-border); }
.hw-case-toolbar .hw-actions { margin: 0; }
.hw-case-filter { display: flex; align-items: end; gap: 10px; padding: 14px 18px; flex-wrap: wrap; }
.hw-case-filter .hw-field { margin: 0; min-width: 130px; }
.hw-case-filter .hw-field:first-child { min-width: 240px; }
.hw-case-filter .hw-muted { align-self: center; margin-left: auto; font-size: .85em; }
.hw-case-table { table-layout: auto; min-width: 740px; width: 100%; }
.hw-case-table th, .hw-case-table td { padding: 13px 16px; vertical-align: middle; }
.hw-case-table th { white-space: nowrap; }
.hw-case-table td { max-width: 340px; min-width: 100px; }
.hw-case-table .hw-case-col-conclusion { min-width: 86px; width: 100px; }
.hw-case-table .hw-case-col-name { min-width: 170px; }
.hw-case-table .hw-case-col-module { min-width: 130px; max-width: 230px; }
.hw-case-table .hw-case-col-results { min-width: 180px; }
.hw-case-table .hw-case-col-evidence { min-width: 165px; }
.hw-case-table small { display: block; color: var(--hw-muted); margin-top: 3px; font-size: .82em; }
.hw-case-table [data-hw-action="case-open"] { border: 0; padding: 0; background: none; color: var(--hw-accent); font-weight: 650; text-align: left; white-space: normal; }
.hw-case-table [data-hw-action="case-evidence"] { font-size: .85em; padding: 3px 6px; }
.hw-case-table tbody tr:hover { background: #f4f9fa; }
.hw-module-path { color: var(--hw-muted); font-size: .9em; overflow-wrap: anywhere; }
.hw-result-summary, .hw-case-text { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow-wrap: anywhere; }
.hw-case-media { display: flex; gap: 5px; }
.hw-case-media img { width: 42px; height: 38px; border-radius: 5px; object-fit: cover; border: 1px solid var(--hw-border); }
.hw-column-settings { background: #f5f8fa; padding: 12px 18px; border-bottom: 1px solid var(--hw-border); }
.hw-column-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(220px,1fr)); gap: 6px 16px; }
.hw-column-option { display: flex; align-items: center; gap: 4px; }
.hw-column-option .hw-check { flex: 1; }
.hw-column-option .hw-button { padding: 1px 8px; min-height: 28px; }
.hw-case-input-table { width: 100%; min-width: 790px; }
.hw-case-input-table td { vertical-align: top; }
.hw-case-input-table td:nth-child(2), .hw-case-input-table td:nth-child(3) { width: 24%; }
.hw-case-input-table td:nth-child(4) { width: 28%; }
.hw-case-input-table > tbody > tr > td > .hw-field > span { display: none; }
.hw-case-input-table input, .hw-case-input-table textarea { width: 100%; min-width: 0; }
.hw-case-input-table .hw-field { margin: 0; }
.hw-case-input-table textarea { min-height: 60px; }
.hw-case-input-table { table-layout: fixed; min-width: 680px; }
.hw-case-input-table th:first-child { width: 50px; }
.hw-case-input-table th:last-child { width: 150px; }
.hw-case-input-table .hw-actions { gap: 4px; margin: 6px 0 0; }
.hw-case-input-table .hw-button { font-size: .85em; padding: 3px 7px; }
.hw-row-selected { background: #eff7f7; }
.hw-case-requirements { background: #f7fafb; border: 1px solid var(--hw-border); border-radius: 10px; padding: 18px; margin: 12px 0 20px; scroll-margin-top: 90px; }
.hw-case-requirements > .hw-actions { justify-content: space-between; margin-top: 0; }
.hw-case-requirements h3 { margin: 0; }
.hw-case-requirements .hw-field { min-width: 0; }
.hw-case-requirements input:not([type="checkbox"]), .hw-case-requirements select { width: 100%; }
.hw-case-requirements textarea { min-height: 76px; }
.hw-row-details { width: min(740px,65vw); padding: 18px; background: #f6f9fb; border: 1px solid var(--hw-border); border-radius: 8px; }
.hw-row-result-field { display: grid; grid-template-columns: repeat(4,minmax(80px,1fr)); gap: 8px; padding: 12px 0; border-top: 1px solid var(--hw-border); }
.hw-row-result-field label { font-size: .86em; }
.hw-case-paste { margin-top: 16px; }
.hw-case-paste textarea { width: 100%; min-height: 110px; }
.hw-rebuild-summary { display: flex; flex-wrap: wrap; gap: 14px; padding: 14px; margin: 16px 0; background: #edf6f4; border-radius: 8px; }
.hw-diff-list { max-height: 360px; overflow: auto; }
.hw-inherited { background: #edf6f4; padding: 10px; }
.hw-workspace:has(.hw-case-workspace) .hw-header { margin-bottom: 12px; }
.hw-workspace:has(.hw-case-workspace) .hw-task-summary { margin-bottom: 10px; padding: 10px 16px; }
@media (max-width: 1400px) { .hw-case-table th, .hw-case-table td { padding: 11px 10px; } .hw-case-filter .hw-muted { width: 100%; margin-left: 0; } }

/* Compact, conditional field configuration shared by task and template editors. */
.hw-result-definition { border: 1px solid var(--hw-border); background: #fff; border-radius: 10px; padding: 14px; margin: 12px 0; min-width: 0; }
.hw-result-definition-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.hw-result-definition-head strong { margin-right: auto; }
.hw-result-definition-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; align-items: start; }
.hw-result-definition-grid .hw-check { align-self: end; min-height: 40px; }
.hw-field-code { margin-top: 10px; color: var(--hw-muted); font-size: .85em; }
.hw-field-code .hw-field { max-width: 360px; margin-top: 8px; }
.hw-paste-panel { padding: 16px; margin: 12px 0 18px; background: #f7fafb; border: 1px solid var(--hw-border); border-radius: 10px; }
.hw-paste-panel > .hw-actions { margin-top: 0; }
.hw-paste-panel textarea { width: 100%; min-height: 112px; margin: 8px 0 12px; font-family: inherit; }
.hw-paste-example { max-height: 210px; }
.hw-paste-example th, .hw-paste-example td { min-width: 120px; padding: 10px; font-size: .86em; }
.hw-paste-example td { max-width: 240px; white-space: normal; }
.hw-outline-plan input[type="datetime-local"] { min-width: 200px; }
.hw-case-requirements input[type="datetime-local"] { min-width: 0; }
@media (min-width: 1600px) {
  .hw-case-requirements .hw-result-definition-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.hw-sample-images {display:flex; flex-wrap:wrap; gap:6px; max-width:240px; max-height:180px; overflow:auto; margin-top:6px;}
.hw-sample-images > div {display:grid; gap:3px; width:72px;}
.hw-sample-images img {width:64px; height:48px; object-fit:contain; background:var(--surface-soft,#f5f8fa); border-radius:4px;}
.hw-sample-images .hw-button {padding:3px 6px; font-size:inherit;}
.hw-draft-list {display:grid; gap:8px; max-height:260px; overflow:auto;}
.hw-draft-list > div {display:flex; flex-wrap:wrap; align-items:center; gap:12px;}
.hw-draft-list strong {flex:1; min-width:180px;}
.hw-evidence [hidden] {display:none;}

/* Keep destructive ledger actions distinct from opening a record. */
.hw-ledger-row-actions { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.hw-ledger-secondary-action { padding-left: 16px; border-left: 1px solid #dce5eb; }
.hw-workspace .hw-delete-action { color: #b43c40; border-color: #eccacc; background: #fff; }
.hw-workspace .hw-delete-action:hover { background: #fff1f1; border-color: #d7979a; }
