:root {
  color-scheme: light;
  --page: #f5f7fb;
  --surface: #ffffff;
  --surface-strong: #eef3fb;
  --text: #172033;
  --muted: #647089;
  --line: #d8dfeb;
  --accent: #1f6feb;
  --accent-strong: #174ea6;
  --good: #0f8b5f;
  --warn: #b86b00;
  --danger: #bb2d3b;
  --shadow: 0 12px 30px rgba(32, 45, 72, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

button,
input,
select,
textarea {
  font: inherit;
}

.app-shell {
  min-height: 100vh;
  padding: 28px;
}

.workspace {
  width: min(1280px, 100%);
  margin: 0 auto;
}

.topbar,
.result-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.topbar {
  margin-bottom: 20px;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.app-logo {
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 7px 12px rgba(23, 32, 51, 0.12));
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.topbar-status-stack {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.snapshot-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.sync-button {
  min-height: 28px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
}

.sync-button:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.1;
}

h2 {
  font-size: 20px;
  line-height: 1.25;
}

.status-pill {
  min-width: 98px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-size: 13px;
  font-weight: 700;
}

.status-pill.busy {
  color: var(--warn);
}

.status-pill.good {
  color: var(--good);
}

.status-pill.bad {
  color: var(--danger);
}

.mode-toggle {
  display: inline-flex;
  gap: 6px;
  margin: 0 0 18px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.mode-tab {
  min-height: 38px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
}

.mode-tab.active {
  background: var(--accent);
  color: #ffffff;
}

.module-workspace[hidden] {
  display: none;
}

.lookup-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(320px, 1.25fr);
  gap: 16px;
  margin-bottom: 18px;
}

.lookup-grid.compact {
  grid-template-columns: minmax(320px, 720px);
}

.panel,
.result-band {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel {
  margin: 0;
  padding: 18px;
}

.panel legend {
  padding: 0 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.query-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
}

.dsr-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.dsr-row {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.dsr-row:last-of-type {
  border-bottom: 0;
  padding-bottom: 0;
}

.row-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 180px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
}

input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

select {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
}

select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

select:disabled {
  color: var(--muted);
  cursor: not-allowed;
  opacity: 0.7;
}

textarea {
  width: 100%;
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  background: #fbfcff;
  color: var(--text);
  outline: none;
  resize: vertical;
}

textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.15);
}

.version-combo {
  position: relative;
}

.version-menu {
  display: none;
  position: absolute;
  z-index: 30;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  max-height: 280px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 18px 35px rgba(32, 45, 72, 0.14);
}

.version-menu.open {
  display: block;
}

.version-option {
  width: 100%;
  min-height: 40px;
  border: 0;
  border-bottom: 1px solid #edf1f7;
  border-radius: 0;
  padding: 9px 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  font-weight: 700;
}

.version-option:last-child {
  border-bottom: 0;
}

.version-option:hover,
.version-option.active {
  background: #eef3fb;
}

.version-empty {
  padding: 12px;
  color: var(--muted);
  font-weight: 700;
}

.actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.main-actions {
  padding-top: 4px;
}

.defect-panel {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}

.defect-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.defect-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(140px, 1fr));
  gap: 10px;
}

.defect-metrics span {
  display: grid;
  gap: 6px;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.defect-metrics b {
  color: var(--text);
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.defect-status {
  min-height: 20px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.defect-status.busy {
  color: var(--warn);
}

.defect-status.good {
  color: var(--good);
}

.defect-status.warn {
  color: var(--warn);
  white-space: pre-wrap;
}

.defect-status.bad {
  color: var(--danger);
  white-space: pre-wrap;
}

.upload-panel {
  display: grid;
  gap: 18px;
  margin-bottom: 18px;
}

.upload-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.upload-defaults {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.upload-defaults span {
  min-height: 30px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fbfcff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-header-guide {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.upload-header-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.upload-header-guide h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.upload-header-scroll {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
}

.upload-header-table {
  min-width: 1120px;
}

.upload-header-row {
  display: grid;
  grid-template-columns: 110px 150px 170px 150px 190px 190px 130px 140px;
}

.upload-header-row span {
  min-height: 42px;
  display: flex;
  align-items: center;
  padding: 9px 12px;
  border-right: 1px solid var(--line);
  color: #40506d;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.upload-header-row span:last-child {
  border-right: 0;
}

.upload-step-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(220px, 0.75fr) minmax(220px, 0.75fr);
  gap: 14px;
}

.create-folder-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
}

.upload-file-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) auto;
  gap: 14px;
  align-items: end;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.file-drop {
  min-height: 76px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcff;
}

.file-drop input {
  min-height: 0;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  color: var(--muted);
}

.file-drop input:focus {
  box-shadow: none;
}

.file-drop strong {
  color: var(--text);
  overflow-wrap: anywhere;
}

.file-name-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 4px;
}

.file-name-row strong {
  min-width: 0;
}

.file-clear-button {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.file-clear-button[hidden] {
  display: none;
}

.file-clear-button:hover {
  color: var(--danger);
  border-color: #f0b3b3;
  background: #fff7f7;
}

.upload-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  min-width: 270px;
}

.upload-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.upload-status {
  min-height: 22px;
  margin: 4px 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: pre-wrap;
}

.upload-status.busy {
  color: var(--warn);
}

.upload-status.good {
  color: var(--good);
}

.upload-status.bad {
  color: var(--danger);
}

.upload-message {
  min-height: 92px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcff;
  color: var(--muted);
  text-align: center;
  font-size: 14px;
  font-weight: 900;
  line-height: 1.4;
  white-space: pre-wrap;
}

.upload-message.success {
  border-color: rgba(15, 139, 95, 0.28);
  background: #effaf4;
  color: var(--good);
}

.upload-progress-card {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.upload-progress-card.complete {
  border-color: rgba(15, 139, 95, 0.28);
  background: #effaf4;
}

.upload-progress-card.failed {
  border-color: rgba(194, 45, 58, 0.3);
  background: #fff8f8;
}

.upload-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.upload-progress-head h3 {
  margin: 0;
  color: var(--text);
  font-size: 17px;
}

.upload-progress-head > strong {
  color: var(--accent);
  font-size: 24px;
}

.upload-progress-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e7edf7;
}

.upload-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 240ms ease;
}

.upload-progress-card.complete .upload-progress-track span {
  background: var(--good);
}

.upload-progress-card.failed .upload-progress-track span {
  background: var(--danger);
}

.upload-progress-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(100px, 1fr));
  gap: 10px;
}

.upload-progress-metrics span {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.upload-progress-metrics b {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 18px;
}

.upload-progress-current {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.upload-resume-button {
  justify-self: start;
}

.mapping-list {
  display: grid;
  gap: 8px;
  padding: 12px 15px;
}

.mapping-list span {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #edf1f7;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.mapping-list span:last-child {
  border-bottom: 0;
}

.mapping-list b {
  color: var(--text);
  text-align: right;
}

.upload-log {
  border-top: 1px solid var(--line);
  background: #fbfcff;
  padding: 14px 15px;
}

.upload-log h3 {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.upload-log ol {
  display: grid;
  gap: 8px;
  margin: 0;
  padding-left: 22px;
}

.upload-log li {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.4;
  white-space: pre-wrap;
}

.log-level {
  display: inline-flex;
  align-items: center;
  min-width: 58px;
  margin-right: 8px;
  color: var(--muted);
  text-transform: uppercase;
}

.log-level.error {
  color: var(--danger);
}

.log-level.success {
  color: var(--good);
}

.log-level.warning {
  color: var(--warn);
}

.sheet-report-list {
  display: grid;
  gap: 10px;
  border-top: 1px solid var(--line);
  background: #ffffff;
  padding: 14px 15px;
}

.sheet-report-list h3 {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0;
}

.sheet-report {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-left: 4px solid var(--good);
  border-radius: 8px;
  background: #fbfcff;
  padding: 12px;
}

.sheet-report.error {
  border-left-color: var(--danger);
  background: #fff8f8;
}

.sheet-report strong {
  display: block;
  color: var(--text);
  font-size: 14px;
  line-height: 1.3;
}

.sheet-report span,
.sheet-report p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.sheet-report.error p:first-of-type {
  color: var(--danger);
}

button {
  min-height: 42px;
  border: 1px solid transparent;
  border-radius: 7px;
  padding: 9px 14px;
  cursor: pointer;
  font-weight: 800;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  min-width: 42px;
  min-height: 42px;
  place-items: center;
  border-color: var(--line);
  border-radius: 50%;
  padding: 0;
  background: var(--surface);
  color: #31405c;
  font-size: 20px;
}

.icon-button:hover:not(:disabled) {
  border-color: #b8c5d9;
  background: var(--surface-strong);
}

.shutdown-button {
  border-color: rgba(187, 45, 59, 0.24);
  background: #fff5f6;
  color: #bb2d3b;
  font-size: 22px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(187, 45, 59, 0.08);
}

.shutdown-button:hover:not(:disabled) {
  border-color: #bb2d3b;
  background: #bb2d3b;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(187, 45, 59, 0.22);
}

.shutdown-button:focus-visible {
  outline: 3px solid rgba(187, 45, 59, 0.22);
  outline-offset: 3px;
}

.close-button {
  border-color: rgba(187, 45, 59, 0.24);
  background: #fff5f6;
  color: #bb2d3b;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(187, 45, 59, 0.08);
}

.close-button:hover:not(:disabled) {
  border-color: #bb2d3b;
  background: #bb2d3b;
  color: #ffffff;
  box-shadow: 0 10px 22px rgba(187, 45, 59, 0.22);
}

.close-button:focus-visible {
  outline: 3px solid rgba(187, 45, 59, 0.22);
  outline-offset: 3px;
}

.primary-button {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--accent);
  color: #ffffff;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
}

.button-icon {
  display: inline-grid;
  width: 18px;
  height: 18px;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}

.ghost-button {
  border-color: var(--line);
  background: var(--surface-strong);
  color: #31405c;
}

.ghost-button:hover:not(:disabled) {
  border-color: #b8c5d9;
  background: #e5edf9;
}

.small {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 13px;
}

.result-band {
  padding: 18px;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.metric {
  min-height: 86px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: #fbfcff;
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.metric strong {
  display: block;
  margin-top: 8px;
  font-size: 30px;
  line-height: 1;
}

.status-pass {
  border-left: 4px solid #0f8b5f;
}

.status-fail {
  border-left: 4px solid #bb2d3b;
}

.status-blocked {
  border-left: 4px solid #6b7280;
}

.status-wip {
  border-left: 4px solid #b86b00;
}

.excel-status {
  min-height: 22px;
  margin: 4px 0 12px;
  color: var(--good);
  font-size: 13px;
  font-weight: 800;
}

.result-list {
  display: grid;
  gap: 14px;
}

.result-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px;
  border-bottom: 1px solid var(--line);
}

.card-head h3 {
  margin: 0;
  font-size: 18px;
  line-height: 1.25;
}

.card-head strong {
  font-size: 30px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.mini-metrics {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  padding: 12px 15px;
  background: #fbfcff;
  border-bottom: 1px solid var(--line);
}

.mini-metrics span {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 6px;
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
}

.mini-metrics b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.notice-list {
  display: grid;
  gap: 8px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--line);
  background: #fff8e6;
  color: #7a4b00;
  font-size: 13px;
  font-weight: 800;
}

.notice-list p {
  margin: 0;
}

.split-tables {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 0.75fr);
  gap: 14px;
  padding: 15px;
}

.split-tables table {
  min-width: 0;
}

.date-trajectory {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.date-trajectory table {
  min-width: 0;
}

.trajectory-panel {
  display: grid;
  gap: 12px;
  min-height: 330px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: #fbfcff;
}

.trajectory-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trajectory-head h3 {
  margin: 0;
  font-size: 17px;
  line-height: 1.2;
}

.trajectory-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: flex-start;
  gap: 8px;
}

.trajectory-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef3fb;
}

.trajectory-toggle button {
  min-height: 32px;
  border: 0;
  border-radius: 0;
  padding: 7px 10px;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.trajectory-toggle button + button {
  border-left: 1px solid var(--line);
}

.trajectory-toggle button.active {
  background: #ffffff;
  color: var(--text);
  box-shadow: inset 0 0 0 1px rgba(31, 111, 235, 0.12);
}

.trajectory-kpis {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.trajectory-kpis span {
  display: grid;
  gap: 2px;
  min-width: 70px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 7px 9px;
  background: #ffffff;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.trajectory-kpis span.expected-tce {
  min-width: 98px;
}

.trajectory-kpis b {
  color: var(--text);
  font-size: 17px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.trajectory-svg {
  width: 100%;
  min-height: 230px;
  overflow: visible;
}

.trajectory-grid-line {
  stroke: #dfe6f2;
  stroke-width: 1;
}

.trajectory-axis-line {
  stroke: #aeb9cc;
  stroke-width: 1.2;
}

.trajectory-axis-label {
  fill: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.trajectory-area {
  fill: url("#trajectoryFill");
}

.trajectory-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trajectory-point {
  fill: #ffffff;
  stroke: var(--accent);
  stroke-width: 4;
}

.trajectory-bar {
  fill: rgba(31, 111, 235, 0.72);
  stroke: var(--accent);
  stroke-width: 1.5;
}

.defect-trajectory .trajectory-area {
  fill: url("#defectRaisedFill");
}

.defect-trajectory .trajectory-line,
.defect-trajectory .trajectory-point {
  stroke: var(--danger);
}

.defect-trajectory .trajectory-bar {
  fill: rgba(187, 45, 59, 0.72);
  stroke: var(--danger);
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.compact-table {
  border: 0;
  border-radius: 0;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: var(--surface);
}

.split-tables table,
.date-trajectory table {
  min-width: 0;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-strong);
  color: #40506d;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

td.number {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
}

tr:last-child td {
  border-bottom: 0;
}

.empty-state {
  height: 92px;
  color: var(--muted);
  text-align: center;
}

.standalone {
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: #fbfcff;
}

.error-line {
  color: var(--danger);
  font-weight: 800;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 14px;
  background: rgba(23, 32, 51, 0.36);
}

.modal-backdrop[hidden] {
  display: none;
}

.manager-dialog {
  width: min(1500px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--page);
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.25);
}

.manager-header,
.manager-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px;
  background: var(--surface);
}

.manager-header h2 {
  font-size: 22px;
  line-height: 1.15;
}

.manager-header {
  position: sticky;
  z-index: 2;
  top: 0;
  border-bottom: 1px solid var(--line);
}

.manager-footer {
  position: sticky;
  bottom: 0;
  border-top: 1px solid var(--line);
}

.manager-body {
  padding: 18px;
}

.manager-status {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.manager-status.good {
  color: var(--good);
}

.manager-status.warn {
  color: var(--warn);
}

.manager-snapshot {
  display: grid;
  gap: 16px;
}

.manager-title-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.manager-title-row h1 {
  font-size: 32px;
}

.manager-title-row p {
  margin: 5px 0 0;
  color: var(--muted);
  font-weight: 800;
}

.manager-notice {
  display: grid;
  gap: 7px;
  border: 1px solid #f0d59a;
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff8e6;
  color: #7a4b00;
  font-weight: 800;
}

.manager-notice p {
  margin: 0;
}

.manager-section {
  display: grid;
  align-content: start;
  gap: 10px;
}

.manager-section h2 {
  font-size: 19px;
}

.manager-inline-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
}

.manager-inline-note.error {
  color: var(--danger);
}

.manager-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(142px, 1fr));
  gap: 10px;
}

.manager-defect-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.manager-trend-grid {
  --manager-trend-height: 560px;
  display: grid;
  grid-template-columns: minmax(260px, 0.55fr) minmax(420px, 1fr);
  gap: 12px;
  align-items: stretch;
}

.manager-trend-grid .trajectory-panel {
  grid-template-rows: auto minmax(0, 1fr);
  height: var(--manager-trend-height);
  min-height: var(--manager-trend-height);
  overflow: hidden;
}

.manager-trend-grid .trajectory-svg {
  height: 100%;
  min-height: 0;
}

.manager-metric {
  --metric-accent: #1468df;
  --metric-soft: #edf5ff;
  --metric-tint: #f8fbff;
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  grid-template-rows: auto auto;
  align-items: center;
  column-gap: 8px;
  min-height: 78px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px 10px;
  background:
    linear-gradient(135deg, var(--metric-tint) 0%, #ffffff 64%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.manager-metric-icon {
  display: grid;
  width: 36px;
  height: 36px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 10px;
  background: var(--metric-soft);
  box-shadow:
    inset 0 0 0 1px rgba(23, 32, 51, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.72);
  color: var(--metric-accent);
  font-size: 19px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
}

.manager-metric span {
  display: block;
  min-width: 0;
  max-width: 100%;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.manager-metric strong {
  display: block;
  min-width: 0;
  max-width: 100%;
  margin-top: 5px;
  color: var(--text);
  font-size: 28px;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.manager-metric.metric-tone-blue {
  --metric-accent: #1468df;
  --metric-soft: #eaf3ff;
  --metric-tint: #f8fbff;
}

.manager-metric.metric-tone-green {
  --metric-accent: #0f8b5f;
  --metric-soft: #e9f8f1;
  --metric-tint: #f7fcfa;
}

.manager-metric.metric-tone-red {
  --metric-accent: #bb2d3b;
  --metric-soft: #fff0f2;
  --metric-tint: #fff9fa;
}

.manager-metric.metric-tone-amber,
.manager-metric.metric-tone-orange {
  --metric-accent: #b86b00;
  --metric-soft: #fff5df;
  --metric-tint: #fffaf0;
}

.manager-metric.metric-tone-slate {
  --metric-accent: #52627a;
  --metric-soft: #eef3f8;
  --metric-tint: #f8fafc;
}

.manager-metric.metric-tone-violet {
  --metric-accent: #6a5fd1;
  --metric-soft: #f0efff;
  --metric-tint: #faf9ff;
}

.manager-scope-list {
  display: grid;
  gap: 10px;
}

.manager-scope-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.manager-scope-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
}

.manager-scope-head h3 {
  margin: 0;
  font-size: 17px;
}

.manager-scope-head strong {
  font-size: 28px;
  font-variant-numeric: tabular-nums;
}

.manager-inline-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  padding: 10px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.manager-inline-metrics b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.manager-two-column {
  display: grid;
  grid-template-columns: minmax(280px, 0.95fr) minmax(360px, 1fr);
  align-items: start;
  gap: 16px;
}

.manager-table-wrap {
  overflow: auto;
  border: 0.5px solid rgba(117, 139, 171, 0.24);
  border-radius: 6px;
  background: var(--surface);
}

.manager-table-scroll {
  max-height: 320px;
  overflow-y: auto;
}

.defect-trend-table-scroll {
  align-self: stretch;
  height: var(--manager-trend-height);
  max-height: var(--manager-trend-height);
  min-height: var(--manager-trend-height);
  overflow-y: auto;
}

.manager-table-scroll .manager-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface-strong);
}

.manager-table {
  min-width: 0;
}

.manager-table th,
.manager-table td {
  padding: 8px 14px;
  border-bottom-width: 0.5px;
  border-bottom-color: rgba(117, 139, 171, 0.24);
  font-size: 14px;
}

.manager-table th {
  height: 40px;
  font-size: 12px;
}

.unmapped-resource-row td {
  background: #fff8e6;
  color: #7a4b00;
  font-weight: 800;
}

.manager-sort-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-transform: inherit;
  cursor: pointer;
}

.manager-sort-button.active {
  color: var(--text);
}

.manager-sort-arrow {
  color: var(--muted);
  font-size: 10px;
  line-height: 1;
}

.manager-empty {
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 18px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
  text-align: center;
}

.failed-review-shell {
  display: grid;
  gap: 10px;
}

.failed-review-grid {
  grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
}

.failed-review-cycles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.failed-review-cycles span {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.failed-review-cycles b {
  color: var(--text);
}

.failed-review-state,
.failed-review-error {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface);
  color: var(--muted);
  font-weight: 800;
}

.failed-review-error {
  display: grid;
  gap: 6px;
  border-color: rgba(187, 45, 59, 0.35);
  background: #fff5f6;
  color: var(--danger);
}

.failed-review-error span {
  color: #8f1f2a;
  white-space: pre-wrap;
}

.failed-review-table {
  max-height: 380px;
}

.failed-review-table .manager-table {
  min-width: 1320px;
}

.failed-review-table .manager-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface-strong);
}

.failed-review-table td {
  max-width: 240px;
}

.failed-review-table td:nth-child(2),
.failed-review-table td:nth-child(7),
.failed-review-table td:nth-child(11) {
  white-space: normal;
}

.failed-test-cases-dialog {
  width: min(1700px, calc(100vw - 24px));
}

.failed-test-cases-shell {
  display: grid;
  gap: 14px;
}

.failed-test-cases-shell .manager-notice {
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 14px;
}

.failed-test-cases-shell .manager-notice strong {
  color: var(--text);
  font-size: 15px;
}

.failed-test-cases-grid {
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
}

.failed-test-cases-table {
  max-height: 520px;
}

.failed-test-cases-table .manager-table {
  min-width: 1360px;
}

.failed-test-cases-table .manager-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: var(--surface-strong);
}

.failed-test-cases-table td {
  max-width: 260px;
  white-space: normal;
}

.failed-review-status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border: 1px solid rgba(187, 45, 59, 0.28);
  border-radius: 999px;
  padding: 3px 8px;
  background: #fff5f6;
  color: var(--danger);
  font-size: 12px;
  font-weight: 900;
}

.settings-dialog {
  width: min(880px, 100%);
  max-height: min(760px, calc(100vh - 48px));
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 28px 70px rgba(23, 32, 51, 0.25);
}

.settings-header,
.settings-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 18px;
}

.settings-header {
  border-bottom: 1px solid var(--line);
}

.settings-tabs {
  display: flex;
  gap: 8px;
  padding: 14px 18px 0;
  border-bottom: 1px solid var(--line);
}

.settings-tab {
  min-height: 38px;
  border-bottom-color: transparent;
  border-radius: 7px 7px 0 0;
  background: transparent;
  color: var(--muted);
}

.settings-tab.active {
  border-color: var(--line);
  border-bottom-color: var(--surface);
  background: var(--surface);
  color: var(--text);
}

.settings-panel {
  display: none;
  padding: 18px;
}

.settings-panel.active {
  display: block;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-grid.single {
  grid-template-columns: 1fr;
}

.settings-grid label.has-error input {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px rgba(187, 45, 59, 0.12);
}

.field-error {
  display: block;
  min-height: 18px;
  margin-top: 6px;
  color: var(--danger);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.settings-note,
.settings-preview,
.help-block p,
.help-block li {
  color: var(--muted);
  line-height: 1.5;
}

.settings-note {
  margin: 0 0 14px;
  font-weight: 700;
}

.settings-preview {
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fbfcff;
}

.settings-preview span {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.settings-preview strong {
  display: block;
  overflow-wrap: anywhere;
  color: var(--text);
}

.settings-footer {
  border-top: 1px solid var(--line);
}

.settings-status {
  margin-right: auto;
  color: var(--muted);
  font-weight: 800;
}

.settings-status.busy {
  color: var(--warn);
}

.settings-status.good {
  color: var(--good);
}

.settings-status.bad {
  color: var(--danger);
}

.help-block {
  margin-bottom: 18px;
}

.help-block h3 {
  margin: 0 0 8px;
  font-size: 16px;
}

.help-block ul,
.help-block ol {
  margin: 8px 0 0;
  padding-left: 22px;
}

.help-block a {
  color: var(--accent);
  font-weight: 800;
}

.defect-insight-dialog {
  width: min(1640px, calc(100vw - 24px));
  background: #f8fbff;
}

.defect-insight-body {
  padding: 18px;
  background: #f8fbff;
}

.defect-insight-modal-header {
  align-items: flex-start;
}

.defect-insight-header-actions {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
}

.defect-insight-dashboard {
  display: grid;
  gap: 14px;
  color: #081a42;
}

.defect-insight-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 350px);
  gap: 16px;
  align-items: start;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 16px 40px rgba(25, 48, 91, 0.08);
}

.defect-insight-hero h2 {
  margin: 0;
  color: #061947;
  font-size: clamp(26px, 2.4vw, 38px);
  font-weight: 900;
  letter-spacing: 0.02em;
  line-height: 1.12;
  text-transform: uppercase;
}

.defect-insight-date {
  margin: 8px 0 0;
  color: #1f4e9f;
  font-size: 18px;
  font-weight: 800;
}

.defect-insight-total-card {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 18px;
  border: 2px solid #6157ff;
  border-radius: 10px;
  background: linear-gradient(180deg, #ffffff, #f3f2ff);
  text-align: center;
  text-transform: uppercase;
}

.defect-insight-total-card span {
  color: #061947;
  font-size: 14px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.defect-insight-total-card strong {
  color: #4d39f5;
  font-size: 42px;
  line-height: 1;
}

.defect-movement-strip {
  display: grid;
  grid-template-columns: 1.35fr repeat(2, 1fr);
  align-items: center;
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
}

.movement-title,
.movement-cell {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 10px 14px;
  border-right: 1px solid var(--line);
  color: #061947;
  font-size: 16px;
  font-weight: 850;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.movement-cell:last-child {
  border-right: 0;
}

.movement-cell strong {
  font-size: 24px;
}

.movement-cell.good strong {
  color: #0f9f55;
}

.movement-cell.bad strong {
  color: #df1022;
}

.movement-cell.neutral strong {
  color: var(--ink);
}

.di-three-grid {
  display: grid;
  grid-template-columns: 1.08fr 1fr 1fr;
  gap: 14px;
}

.di-panel,
.di-checkpoints,
.defect-insight-error {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(25, 48, 91, 0.07);
}

.di-panel {
  min-height: 245px;
  padding: 18px;
}

.di-panel h3,
.di-checkpoints h3 {
  margin: 0 0 16px;
  color: #061947;
  font-size: 20px;
  font-weight: 880;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.di-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 0 0 16px;
}

.di-panel-title h3 {
  margin: 0;
}

.di-subpanel-title {
  margin: 24px 0 12px;
  color: #061947;
  font-size: 14px;
  font-weight: 800;
  line-height: 1.3;
}

.di-info-tooltip {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  border: 1px solid #b8c5dc;
  border-radius: 999px;
  background: #f7faff;
  color: #2352a2;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  cursor: help;
}

.di-info-tooltip:focus {
  outline: 2px solid rgba(35, 82, 162, 0.28);
  outline-offset: 2px;
}

.di-tooltip-content {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  display: none;
  width: min(430px, 72vw);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(25, 48, 91, 0.18);
  color: #061947;
  text-align: left;
}

.defect-insight-tooltip-content {
  top: 0;
  right: calc(100% + 12px);
  width: min(430px, calc(100vw - 96px));
}

.di-info-tooltip:hover .di-tooltip-content,
.di-info-tooltip:focus .di-tooltip-content,
.di-info-tooltip:focus-within .di-tooltip-content {
  display: grid;
  gap: 9px;
}

.di-tooltip-content::before {
  content: "";
  position: absolute;
  top: -6px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-left: 1px solid var(--line);
  border-top: 1px solid var(--line);
  background: #ffffff;
  transform: rotate(45deg);
}

.defect-insight-tooltip-content::before {
  top: 8px;
  right: -6px;
  border-top: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-bottom: 0;
  border-left: 0;
}

.di-tooltip-content span {
  display: grid;
  gap: 3px;
}

.di-tooltip-content strong {
  color: #061947;
  font-size: 12px;
  font-weight: 900;
}

.di-tooltip-content em {
  color: #4f5f7a;
  font-size: 12px;
  font-style: normal;
  font-weight: 650;
  line-height: 1.35;
}

.di-stack {
  display: flex;
  overflow: hidden;
  height: 34px;
  border-radius: 8px;
  background: #eef2f7;
}

.di-stack-segment {
  min-width: 2px;
}

.di-stack-segment.green,
.di-cycle-fill.green {
  background: linear-gradient(90deg, #08b768, #07904f);
}

.di-stack-segment.red,
.di-cycle-fill.red {
  background: linear-gradient(90deg, #ff0f28, #d7091b);
}

.di-stack-segment.blue,
.di-cycle-fill.blue {
  background: linear-gradient(90deg, #3f36ff, #2e2ae8);
}

.di-stack-segment.orange,
.di-cycle-fill.orange {
  background: linear-gradient(90deg, #ff9c12, #f27900);
}

.di-stack-segment.purple,
.di-cycle-fill.purple {
  background: linear-gradient(90deg, #c62cff, #9a11d7);
}

.di-stack-segment.amber,
.di-cycle-fill.amber {
  background: linear-gradient(90deg, #fbbf24, #d97706);
}

.di-stack-segment.slate,
.di-cycle-fill.slate {
  background: linear-gradient(90deg, #94a3b8, #64748b);
}

.di-legend {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 14px;
  margin-top: 16px;
}

.di-legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #061947;
  font-size: 14px;
  font-weight: 760;
}

.di-dot {
  width: 13px;
  height: 13px;
  flex: 0 0 auto;
  border-radius: 999px;
  box-shadow: 0 4px 10px rgba(23, 32, 51, 0.16);
}

.di-dot.green {
  background: #06ae61;
}

.di-dot.red {
  background: #ef1025;
}

.di-dot.blue {
  background: #3834f4;
}

.di-dot.orange {
  background: #ff9109;
}

.di-dot.purple {
  background: #b319e9;
}

.di-dot.amber {
  background: #d97706;
}

.di-dot.slate {
  background: #64748b;
}

.di-cycle-list {
  display: grid;
  gap: 12px;
}

.di-cycle-row {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr) 42px;
  align-items: center;
  gap: 10px;
  color: #061947;
  font-size: 13px;
  font-weight: 760;
}

.di-cycle-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.di-cycle-fill {
  display: block;
  height: 100%;
  min-width: 6px;
  border-radius: 999px;
}

.di-cycle-row strong {
  font-size: 15px;
  text-align: right;
}

.di-note {
  margin: 14px 0 0;
  color: #2352a2;
  font-size: 12px;
  font-weight: 700;
}

.di-age-badge {
  width: fit-content;
  margin: 2px auto 18px;
  padding: 8px 30px;
  border: 2px solid #6157ff;
  border-radius: 8px;
  color: #061947;
  font-size: 20px;
  font-weight: 850;
  text-transform: uppercase;
}

.di-checkpoints {
  padding: 18px;
}

.di-status-classification {
  padding: 14px 18px 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(25, 48, 91, 0.07);
}

.di-status-classification h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  color: #061947;
  font-size: 18px;
  font-weight: 880;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.di-status-classification-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.di-status-classification-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-content: start;
  gap: 8px;
  min-height: 66px;
  padding: 2px 12px;
  border-right: 1px solid var(--line);
}

.di-status-classification-item:first-child {
  padding-left: 0;
}

.di-status-classification-item:last-child {
  padding-right: 0;
  border-right: 0;
}

.di-status-classification-item .di-dot {
  margin-top: 3px;
  width: 12px;
  height: 12px;
}

.di-status-classification-item strong,
.di-status-classification-item span {
  display: block;
}

.di-status-classification-item strong {
  color: #061947;
  font-size: 12px;
  font-weight: 900;
  line-height: 1.2;
}

.di-status-classification-item div > span {
  margin-top: 7px;
  color: #4f5f7a;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.35;
}

.di-checkpoints h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
}

.di-alert-icon {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
}

.di-alert-icon svg {
  width: 30px;
  height: 30px;
  filter: drop-shadow(0 4px 10px rgba(239, 35, 60, 0.18));
}

.di-alert-shape {
  fill: #ef233c;
}

.di-alert-line {
  fill: none;
  stroke: #ffffff;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.di-alert-dot {
  fill: none;
  stroke: #ffffff;
  stroke-width: 3;
  stroke-linecap: round;
}

.di-checkpoint-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.di-checkpoint {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 78px;
  padding: 12px 14px;
  border: 1px solid;
  border-left-width: 6px;
  border-radius: 10px;
}

.di-checkpoint.red {
  border-color: #ff2d3f;
  background: linear-gradient(90deg, rgba(255, 18, 40, 0.11), #ffffff);
}

.di-checkpoint.orange {
  border-color: #ff970e;
  background: linear-gradient(90deg, rgba(255, 151, 14, 0.14), #ffffff);
}

.di-checkpoint.amber {
  border-color: #ff6f1a;
  background: linear-gradient(90deg, rgba(255, 111, 26, 0.14), #ffffff);
}

.di-checkpoint.green {
  border-color: #0aab5b;
  background: linear-gradient(90deg, rgba(10, 171, 91, 0.13), #ffffff);
}

.di-icon {
  position: relative;
  display: inline-flex;
  align-self: center;
  justify-self: center;
  width: 36px;
  height: 36px;
  box-sizing: border-box;
  border: 2px solid currentColor;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 850;
  line-height: 1;
}

.di-icon svg {
  position: absolute;
  top: 50%;
  left: 50%;
  display: block;
  width: 22px;
  height: 22px;
  transform: translate(-50%, -50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.di-checkpoint.red,
.di-checkpoint.red strong {
  color: #e80d20;
}

.di-checkpoint.orange,
.di-checkpoint.orange strong,
.di-checkpoint.amber,
.di-checkpoint.amber strong {
  color: #f37c00;
}

.di-checkpoint.green,
.di-checkpoint.green strong {
  color: #099c53;
}

.di-checkpoint strong {
  display: block;
  font-size: 28px;
  line-height: 0.95;
}

.di-checkpoint span {
  display: block;
  color: #061947;
  font-size: 13px;
  font-weight: 850;
}

.di-checkpoint small {
  display: block;
  margin-top: 4px;
  color: #061947;
  font-size: 12px;
  font-weight: 680;
}

.defect-insight-error {
  padding: 24px;
}

.defect-insight-error h2 {
  color: var(--danger);
  font-size: 24px;
}

@media (max-width: 1200px) {
  .defect-insight-hero,
  .di-three-grid,
  .di-checkpoint-grid {
    grid-template-columns: 1fr;
  }

  .defect-movement-strip {
    grid-template-columns: 1fr 1fr;
  }

  .movement-title {
    grid-column: 1 / -1;
  }

  .di-legend {
    grid-template-columns: 1fr;
  }

  .di-status-classification-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    row-gap: 14px;
  }

  .di-status-classification-item:nth-child(3n) {
    padding-right: 0;
    border-right: 0;
  }

  .di-status-classification-item:nth-child(3n + 1) {
    padding-left: 0;
  }
}

@media (max-width: 900px) {
  .app-shell {
    padding: 18px;
  }

  .lookup-grid,
  .metric-grid,
  .defect-metrics,
  .upload-step-grid,
  .upload-summary-grid,
  .upload-progress-metrics,
  .manager-trend-grid,
  .manager-two-column {
    grid-template-columns: 1fr;
  }

  .manager-trend-grid {
    --manager-trend-height: 420px;
  }

  .dsr-row {
    grid-template-columns: 1fr;
  }

  .row-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .split-tables {
    grid-template-columns: 1fr;
  }

  .create-folder-row,
  .upload-file-row {
    grid-template-columns: 1fr;
  }

  .upload-actions {
    justify-content: flex-start;
    min-width: 0;
  }

  .topbar,
  .result-header,
  .upload-hero,
  .upload-header-guide-head,
  .manager-header,
  .manager-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .defect-insight-modal-header {
    align-items: flex-start;
    flex-direction: row;
  }

  .di-status-classification-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .di-status-classification-item,
  .di-status-classification-item:first-child,
  .di-status-classification-item:last-child,
  .di-status-classification-item:nth-child(3n),
  .di-status-classification-item:nth-child(3n + 1) {
    min-height: 0;
    padding: 0 0 12px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .di-status-classification-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
  }

  .manager-dialog {
    width: calc(100vw - 24px);
    max-height: calc(100vh - 24px);
  }

  .topbar-actions {
    width: 100%;
    justify-content: space-between;
  }

  .topbar-status-stack {
    align-items: flex-start;
  }

  .defect-header {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-footer {
    align-items: stretch;
    flex-direction: column;
  }
}

/* Premium Failed Test Cases surface; scoped to keep the other views unchanged. */
.failed-test-cases-dialog {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-color: #cbd5e1;
  background: #f6f8fc;
  box-shadow: 0 30px 80px rgba(9, 30, 66, 0.35);
}

.failed-test-cases-dialog:not(.defects-without-tc-dialog) {
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
}

.failed-test-cases-dialog .manager-header {
  flex: 0 0 auto;
  position: relative;
  padding: 16px 22px;
  background: #09245a;
  color: #ffffff;
  border-bottom: 0;
}

.failed-test-cases-dialog .manager-header h2 {
  color: #ffffff;
  font-size: 22px;
  letter-spacing: 0;
}

.failed-test-cases-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.failed-test-cases-refresh {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 0;
  padding: 7px 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
}

.failed-test-cases-refresh span {
  font-size: 21px;
  line-height: 1;
}

.failed-test-cases-refresh:hover {
  color: #b9d5ff;
}

.failed-test-cases-header-divider {
  width: 1px;
  height: 25px;
  background: rgba(255, 255, 255, 0.35);
}

.failed-test-cases-dialog .manager-header .icon-button {
  width: 32px;
  height: 32px;
  border-color: transparent;
  color: #ffffff;
  background: transparent;
  font-size: 27px;
}

.failed-test-cases-dialog .manager-header .icon-button:hover {
  border-color: rgba(255, 255, 255, 0.34);
  background: rgba(255, 255, 255, 0.1);
}

.failed-test-cases-dialog .manager-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 0;
  background: #f6f8fc;
}

.failed-test-cases-dialog .manager-body::-webkit-scrollbar {
  width: 9px;
}

.failed-test-cases-dialog .manager-body::-webkit-scrollbar-track {
  background: #edf2f8;
}

.failed-test-cases-dialog .manager-body::-webkit-scrollbar-thumb {
  border: 2px solid #edf2f8;
  border-radius: 999px;
  background: #9aaac1;
}

.failed-test-cases-dialog .manager-body {
  scrollbar-color: #9aaac1 #edf2f8;
  scrollbar-width: thin;
}

.failed-test-cases-shell {
  gap: 12px;
  padding: 16px 18px 18px;
}

.failed-test-cases-intro {
  display: grid;
  gap: 4px;
  padding: 0 2px;
  color: #52627d;
  font-size: 13px;
  line-height: 1.35;
}

.failed-test-cases-intro p,
.failed-test-cases-intro span {
  margin: 0;
}

.failed-test-cases-intro p {
  color: #1c2d50;
  font-weight: 800;
}

.failed-test-cases-kpi-rail {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(32, 55, 95, 0.05);
}

.failed-kpi {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 12px 14px;
  border-right: 1px solid #e3e8f1;
}

.failed-kpi:last-child {
  border-right: 0;
}

.failed-kpi-icon {
  display: grid;
  flex: 0 0 26px;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-size: 15px;
  font-weight: 900;
}

.failed-kpi > div {
  min-width: 0;
}

.failed-kpi > div > span {
  display: block;
  overflow: hidden;
  color: #52627d;
  font-size: 10px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}

.failed-kpi strong {
  display: block;
  margin-top: 5px;
  color: #172746;
  font-size: 23px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.failed-kpi.blue { color: #2563d9; }
.failed-kpi.violet { color: #7046e8; }
.failed-kpi.amber { color: #c77700; }
.failed-kpi.red { color: #e33444; }
.failed-kpi.green { color: #139263; }
.failed-kpi.muted { color: #73819a; }

.failed-test-cases-workspace {
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.failed-test-cases-filters {
  height: clamp(360px, calc(100vh - 300px), 680px);
  max-height: clamp(360px, calc(100vh - 300px), 680px);
  overflow-x: hidden;
  overflow-y: auto;
  scrollbar-gutter: stable;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(32, 55, 95, 0.04);
}

.failed-test-cases-filters::-webkit-scrollbar {
  width: 8px;
}

.failed-test-cases-filters::-webkit-scrollbar-track {
  background: #f3f6fb;
}

.failed-test-cases-filters::-webkit-scrollbar-thumb {
  border: 2px solid #f3f6fb;
  border-radius: 999px;
  background: #a7b6cc;
}

.failed-test-cases-filters {
  scrollbar-color: #a7b6cc #f3f6fb;
  scrollbar-width: thin;
}

.failed-filters-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 13px;
  border-bottom: 1px solid #e3e8f1;
  color: #172746;
}

.failed-filters-heading button {
  border: 0;
  border-bottom: 1px solid #8bb2f8;
  padding: 0 0 2px;
  background: transparent;
  color: #2563d9;
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.failed-filter-group {
  padding: 6px 10px 5px;
  border-bottom: 1px solid #e7ebf2;
}

.failed-filter-group:last-child {
  border-bottom: 0;
}

.failed-filter-group header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
  color: #1c2d50;
  font-size: 11px;
}

.failed-filter-group header span {
  color: #657695;
  font-size: 16px;
}

.failed-filter-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 20px;
  color: #2e3d5b;
  font-size: 10px;
}

.failed-filter-option > span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.failed-filter-option > span > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.failed-filter-option input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: #2878d8;
}

.failed-filter-option b {
  min-width: 24px;
  padding: 2px 5px;
  border-radius: 4px;
  background: #f0f3f8;
  color: #52627d;
  font-size: 10px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.failed-filter-all {
  margin-bottom: 3px;
  font-weight: 800;
}

.failed-filter-all b {
  background: #eaf0fb;
  color: #1d4f9d;
}

.failed-filter-options {
  display: grid;
  gap: 1px;
}

.failed-filter-search {
  position: relative;
  display: block;
  margin-bottom: 5px;
}

.failed-filter-search input {
  width: 100%;
  border: 1px solid #d7e0ec;
  border-radius: 6px;
  padding: 5px 28px 5px 9px;
  background: #fbfcfe;
  color: #172746;
  font: inherit;
  font-size: 11px;
}

.failed-filter-search span {
  position: absolute;
  top: 5px;
  right: 8px;
  color: #73819a;
  font-size: 17px;
}

.failed-filter-empty {
  color: #73819a;
  font-size: 11px;
}

.failed-test-cases-results {
  min-width: 0;
}

.failed-test-cases-table {
  max-height: none;
  overflow-x: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(32, 55, 95, 0.04);
}

.failed-test-cases-table .manager-table {
  width: 1360px;
  min-width: 1360px;
  table-layout: fixed;
}

.failed-test-cases-table .manager-table th:nth-child(1),
.failed-test-cases-table .manager-table td:nth-child(1) { width: 260px; }

.failed-test-cases-table .manager-table th:nth-child(2),
.failed-test-cases-table .manager-table td:nth-child(2) { width: 140px; }

.failed-test-cases-table .manager-table th:nth-child(3),
.failed-test-cases-table .manager-table td:nth-child(3) { width: 270px; }

.failed-test-cases-table .manager-table th:nth-child(4),
.failed-test-cases-table .manager-table td:nth-child(4) { width: 100px; }

.failed-test-cases-table .manager-table th:nth-child(5),
.failed-test-cases-table .manager-table td:nth-child(5) { width: 170px; }

.failed-test-cases-table .manager-table th:nth-child(6),
.failed-test-cases-table .manager-table td:nth-child(6) { width: 190px; }

.failed-test-cases-table .manager-table th:nth-child(7),
.failed-test-cases-table .manager-table td:nth-child(7) { width: 230px; }

.failed-test-cases-table .manager-table th:nth-child(6),
.failed-test-cases-table .manager-table th:nth-child(7) {
  white-space: nowrap;
}

.failed-test-cases-table .manager-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #edf3fb;
  color: #415475;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.failed-test-cases-table .manager-table th .manager-sort-button {
  width: 100%;
  justify-content: flex-start;
  text-align: left;
}

.failed-test-cases-table .manager-table th:nth-child(2),
.failed-test-cases-table .manager-table td:nth-child(2) {
  width: 140px;
  min-width: 140px;
  white-space: nowrap;
}

.failed-test-cases-table .manager-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.failed-test-cases-table .manager-table tbody tr:hover td {
  background: #f0f6ff;
}

.failed-test-cases-table td {
  max-width: 280px;
  color: #1e2d49;
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
}

.failed-test-case-link {
  color: #1f63c9;
  font-weight: 900;
}

.failed-test-case-status,
.failed-test-case-defect-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border: 1px solid rgba(224, 52, 68, 0.35);
  border-radius: 6px;
  padding: 3px 8px;
  background: #fff7f7;
  color: #d32f40;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

.failed-test-case-status.blocked {
  border-color: rgba(199, 119, 0, 0.38);
  background: #fff8ed;
  color: #a56000;
}

.failed-test-case-defect-status {
  margin: 1px 0;
  border-color: rgba(19, 146, 99, 0.32);
  background: #f1fbf6;
  color: #12845b;
}

.failed-test-case-muted {
  color: #687893;
}

.failed-table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 8px 0;
  color: #52627d;
  font-size: 12px;
}

.failed-pagination-controls {
  display: flex;
  align-items: center;
  gap: 3px;
}

.failed-page-button {
  min-width: 28px;
  height: 28px;
  border: 1px solid #d4deec;
  border-radius: 5px;
  padding: 0 7px;
  background: #ffffff;
  color: #304467;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.failed-page-button:hover:not(:disabled),
.failed-page-button.active {
  border-color: #6c9cec;
  background: #edf4ff;
  color: #1d57b3;
}

.failed-page-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.failed-page-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 8px;
  white-space: nowrap;
}

.failed-page-size select {
  border: 1px solid #d4deec;
  border-radius: 5px;
  padding: 5px 7px;
  background: #ffffff;
  color: #304467;
  font: inherit;
  font-size: 12px;
}

.failed-test-cases-dialog .manager-footer {
  flex: 0 0 auto;
  padding: 12px 18px;
  background: #ffffff;
}

.defects-without-tc-dialog {
  width: min(1300px, calc(100vw - 24px));
}

.defects-without-tc-shell {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.defects-without-tc-intro {
  display: grid;
  gap: 4px;
  color: #52627d;
  font-size: 13px;
  line-height: 1.35;
}

.defects-without-tc-intro p,
.defects-without-tc-intro span {
  margin: 0;
}

.defects-without-tc-intro p {
  color: #1c2d50;
  font-weight: 800;
}

.defects-without-tc-table {
  max-height: min(700px, calc(100vh - 330px));
  overflow: auto;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 5px 18px rgba(32, 55, 95, 0.04);
}

.defects-without-tc-table .manager-table {
  min-width: 860px;
}

.defects-without-tc-table .manager-table thead th {
  position: sticky;
  z-index: 1;
  top: 0;
  background: #edf3fb;
  color: #415475;
  font-size: 11px;
  letter-spacing: 0.02em;
}

.defects-without-tc-table .manager-table tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.defects-without-tc-table .manager-table tbody tr:hover td {
  background: #f0f6ff;
}

.defects-without-tc-table td {
  color: #1e2d49;
  font-size: 13px;
  line-height: 1.3;
  white-space: normal;
}

.defects-without-tc-status {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border: 1px solid #cbd9ed;
  border-radius: 6px;
  padding: 3px 8px;
  background: #f4f7fc;
  color: #3c5680;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

/* Shared outer frame for report dialogs; each report owns its inner layout. */
.report-modal-dialog {
  width: min(1700px, calc(100vw - 24px));
  height: calc(100vh - 24px);
  max-height: calc(100vh - 24px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.report-modal-dialog .manager-header,
.report-modal-dialog .manager-footer {
  flex: 0 0 auto;
}

.report-modal-dialog .manager-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

.failed-test-cases-dialog .manager-footer .manager-status.warn {
  color: #bd6a00;
}

@media (max-width: 1100px) {
  .failed-test-cases-kpi-rail {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .failed-kpi:nth-child(4) {
    border-right: 0;
  }

  .failed-kpi:nth-child(-n + 4) {
    border-bottom: 1px solid #e3e8f1;
  }

  .failed-test-cases-workspace {
    grid-template-columns: 220px minmax(0, 1fr);
  }
}

@media (max-width: 760px) {
  .failed-test-cases-dialog .manager-header {
    align-items: center;
    flex-direction: row;
  }

  .failed-test-cases-dialog .manager-footer {
    align-items: center;
    flex-direction: row;
  }

  .failed-test-cases-kpi-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .failed-kpi:nth-child(odd) {
    border-right: 1px solid #e3e8f1;
  }

  .failed-kpi:nth-child(even) {
    border-right: 0;
  }

  .failed-kpi:nth-child(n) {
    border-bottom: 1px solid #e3e8f1;
  }

  .failed-kpi:last-child {
    border-bottom: 0;
  }

  .failed-test-cases-workspace {
    grid-template-columns: 1fr;
  }

  .failed-table-pagination {
    align-items: flex-start;
    flex-direction: column;
  }
}

/* Main DSR workspace theme. Report dialogs intentionally keep their own styling. */
.app-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 0 32px 0;
  background: #031a38;
}

.workspace {
  width: min(1460px, 100%);
  flex: 1 0 auto;
}

#dsrWorkspace {
  color: #122749;
}

.dsr-app-header {
  width: 100vw;
  min-height: 72px;
  margin-left: calc(50% - 50vw);
  margin-bottom: 0;
  padding: 10px max(22px, calc((100vw - 1460px) / 2 + 32px));
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
  background: #8f1730;
  color: #ffffff;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.08) inset;
}

.dsr-app-header .brand-lockup {
  align-items: center;
  gap: 12px;
}

.header-menu-button {
  display: inline-grid;
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 7px;
  padding: 0;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 18px;
  font-weight: 800;
}

.brand-text {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 1px;
}

.brand-text strong {
  color: #ffffff;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
}

.brand-text span {
  color: rgba(255, 255, 255, 0.86);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.dsr-app-header .app-logo {
  width: 62px;
  height: 62px;
  padding: 4px;
  border-radius: 8px;
  background: #ffffff;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, 0.25));
}

.dsr-app-header .app-logo.organization-logo {
  width: 38px;
  height: 38px;
  padding: 4px;
  border-radius: 7px;
  object-fit: contain;
}

.dsr-app-header .app-logo.click-dsr-logo {
  width: 240px;
  height: 66px;
  max-width: min(240px, 100%);
  padding: 0;
  border-radius: 10px;
  object-fit: contain;
  background: #ffffff;
}

.dsr-app-header .eyebrow {
  margin-bottom: 5px;
  color: #9ebce0;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.dsr-app-header h1 {
  color: #ffffff;
  font-size: 30px;
  font-weight: 850;
  line-height: 1;
}

.dsr-app-header .topbar-actions {
  align-items: center;
  gap: 12px;
}

.dsr-app-header #connectionStatus {
  display: none;
}

.dsr-app-header .topbar-status-stack {
  align-items: center;
  gap: 0;
}

.dsr-app-header .snapshot-refresh {
  min-height: 38px;
}

.dsr-app-header .status-pill {
  min-width: 88px;
  border-color: rgba(145, 188, 235, 0.38);
  background: transparent;
  color: #dbeafe;
}

.dsr-app-header .snapshot-refresh {
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
}

.dsr-app-header .sync-button {
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.dsr-app-header .icon-button {
  width: 38px;
  min-width: 38px;
  min-height: 38px;
  border-color: rgba(255, 255, 255, 0.28);
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff;
  font-size: 18px;
}

.dsr-app-header .shutdown-button {
  color: #ffd1d7;
}

.app-footer {
  width: 100vw;
  margin-top: 28px;
  margin-left: calc(50% - 50vw);
  padding: 18px 28px;
  background: #171d20;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  text-align: center;
}

.mode-toggle {
  display: flex;
  width: 100%;
  gap: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
  border-bottom: 1px solid rgba(155, 190, 234, 0.2);
  border-radius: 0;
  background: transparent;
}

.mode-tab {
  position: relative;
  min-height: 56px;
  padding: 0 26px;
  border-radius: 0;
  color: #b4c9e5;
  font-size: 15px;
  font-weight: 800;
}

.mode-tab::before {
  display: inline-block;
  margin-right: 10px;
  color: #6f9ddd;
  content: "▥";
  font-size: 18px;
  vertical-align: -1px;
}

.mode-tab:nth-child(2)::before {
  content: "⌃";
  font-size: 22px;
}

.mode-tab.active {
  background: transparent;
  color: #1f82ff;
}

.mode-tab.active::after {
  position: absolute;
  right: 10px;
  bottom: -1px;
  left: 10px;
  height: 4px;
  border-radius: 4px 4px 0 0;
  background: #2185ff;
  content: "";
}

#dsrWorkspace .panel,
#dsrWorkspace .result-band {
  border-color: #d5e0ef;
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(4, 22, 50, 0.16);
}

#dsrWorkspace #checkAll {
  background: #0b3774;
  border-color: #0b3774;
  box-shadow: 0 8px 18px rgba(11, 55, 116, 0.2);
}

#dsrWorkspace #checkAll:hover:not(:disabled) {
  background: #174ea6;
  border-color: #174ea6;
}

#dsrWorkspace .dsr-panel {
  gap: 0;
  margin-bottom: 20px;
  padding: 26px 28px 20px;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 12px;
}

.section-heading h2,
#dsrWorkspace .defect-header h2 {
  color: #112854;
  font-size: 23px;
  font-weight: 850;
}

.section-heading .eyebrow,
#dsrWorkspace .defect-header .eyebrow {
  color: #58749c;
}

.section-caption {
  color: #6b7f9e;
  font-size: 12px;
  font-weight: 700;
}

#dsrWorkspace .dsr-row {
  display: grid;
  grid-template-columns: 230px minmax(300px, 1fr) minmax(290px, 350px);
  gap: 22px;
  align-items: center;
  min-height: 100px;
  padding: 15px 0;
  border-bottom: 1px solid #dce5f1;
}

#dsrWorkspace .dsr-row:last-of-type {
  border-bottom: 0;
}

.cycle-identity {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.cycle-icon {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 58px;
  place-items: center;
  border: 2px solid #a9c8f6;
  border-radius: 7px;
  background: #f4f8ff;
  color: #1d68da;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
}

.cycle-icon-regression {
  border-color: #bdb9ff;
  background: #f7f6ff;
}

.cycle-icon-automation {
  border-color: #9bc4f5;
  background: #f1f7ff;
  font-size: 28px;
}

.cycle-identity div {
  display: grid;
  gap: 3px;
}

.cycle-kicker {
  color: #5f7396;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.cycle-identity strong {
  color: #142a55;
  font-size: 18px;
  font-weight: 850;
}

#dsrWorkspace .cycle-selector {
  min-width: 0;
}

#dsrWorkspace .version-combo input {
  min-height: 56px;
  border-color: #c7d4e7;
  border-radius: 7px;
  padding: 0 18px;
  background: #ffffff;
  color: #243654;
  font-size: 16px;
  font-weight: 650;
  box-shadow: inset 0 1px 2px rgba(24, 51, 87, 0.03);
}

#dsrWorkspace .version-combo input::placeholder {
  color: #7c8796;
  font-weight: 700;
}

#dsrWorkspace .version-combo input:focus {
  border-color: #4e91ed;
  box-shadow: 0 0 0 3px rgba(31, 111, 235, 0.14);
}

.cycle-state {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-width: 0;
}

.cycle-ready {
  display: inline-flex;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #9bd5c1;
  border-radius: 7px;
  padding: 0 13px;
  background: #f4fffa;
  color: #148b61;
  font-size: 14px;
  font-weight: 850;
  white-space: nowrap;
}

.cycle-ready::before {
  display: inline-grid;
  width: 21px;
  height: 21px;
  margin-right: 7px;
  place-items: center;
  border-radius: 50%;
  background: #168e63;
  color: #ffffff;
  content: "✓";
  font-size: 13px;
}

.cycle-ready.pending {
  border-color: #c8d4e5;
  background: #f5f8fc;
  color: #72819a;
}

.cycle-ready.pending::before {
  background: #7d8ba1;
  content: "–";
}

#dsrWorkspace .cycle-refresh-button {
  display: inline-flex;
  position: relative;
  width: 100%;
  min-width: 0;
  min-height: 40px;
  align-items: center;
  justify-content: center;
  border: 1px solid #c3d0e4;
  border-radius: 7px;
  padding: 0 14px;
  background: #ffffff;
  color: #263a5c;
  font-size: 15px;
  font-weight: 800;
}

#dsrWorkspace .cycle-count-content {
  position: absolute;
  top: 50%;
  left: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  white-space: nowrap;
  transform: translate(-50%, -50%);
}

#dsrWorkspace .cycle-refresh-button:hover {
  border-color: #5b96e9;
  background: #f4f8ff;
  color: #125fc4;
}

#dsrWorkspace .cycle-refresh-button .button-icon {
  width: 32px;
  height: 32px;
  line-height: 1;
  color: #1e68da;
  font-size: 23px;
}

#dsrWorkspace .cycle-refresh-button b {
  line-height: 1;
}

#dsrWorkspace .main-actions {
  gap: 10px;
  padding-top: 18px;
  border-top: 1px solid #dce5f1;
}

#dsrWorkspace .main-actions button {
  min-height: 44px;
  border-radius: 6px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 800;
}

#dsrWorkspace .main-actions .primary-button {
  background: #1468df;
  box-shadow: 0 6px 12px rgba(20, 104, 223, 0.2);
}

#dsrWorkspace .main-actions .ghost-button {
  border-color: #c2d0e4;
  background: #ffffff;
  color: #2c3f60;
}

#dsrWorkspace .main-actions .ghost-button:hover {
  border-color: #5c97e9;
  background: #f4f8ff;
  color: #145fc3;
}

.action-button-with-icon {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}

.action-button-with-icon > span {
  color: #275fbc;
  font-size: 20px;
  line-height: 1;
}

#dsrWorkspace .defect-panel {
  gap: 18px;
  margin-bottom: 20px;
  padding: 26px 28px 22px;
}

#dsrWorkspace .defect-header {
  align-items: center;
}

#dsrWorkspace .defect-header .ghost-button {
  min-height: 42px;
  border-color: #6d9de8;
  background: #ffffff;
  color: #1b63ca;
  font-weight: 850;
}

#dsrWorkspace .defect-panel > label {
  gap: 6px;
  color: #61779b;
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.jql-field {
  position: relative;
}

#dsrWorkspace .jql-field textarea {
  min-height: 58px;
  padding: 15px 48px 12px 16px;
  border-color: #c4d2e6;
  border-radius: 7px;
  background: #ffffff;
  color: #283b5d;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 14px;
  font-weight: 650;
}

.jql-copy {
  position: absolute;
  top: 14px;
  right: 12px;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #526b8e;
  cursor: pointer;
  font-size: 21px;
}

.jql-copy:hover {
  background: #eef5ff;
  color: #1b63ca;
}

#dsrWorkspace .defect-metrics {
  grid-template-columns: repeat(6, minmax(145px, 1fr));
  gap: 12px;
}

#dsrWorkspace .defect-metric-card {
  --metric-soft: #edf5ff;
  --metric-tint: #f8fbff;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  grid-template-rows: auto auto;
  min-height: 100px;
  align-items: center;
  column-gap: 11px;
  border-color: #d4dfed;
  border-radius: 7px;
  padding: 14px 15px;
  background:
    linear-gradient(135deg, var(--metric-tint) 0%, #ffffff 68%);
  text-transform: none;
}

#dsrWorkspace .defect-metric-card i {
  display: grid;
  width: 38px;
  height: 38px;
  grid-row: 1 / span 2;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 10px;
  background: var(--metric-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
  font-size: 24px;
  font-style: normal;
  font-weight: 700;
}

#dsrWorkspace .defect-metric-card em {
  color: #506586;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
  line-height: 1.15;
  text-align: center;
}

#dsrWorkspace .defect-metric-card b {
  color: #142a55;
  font-size: 26px;
  line-height: 1;
  text-align: center;
}

#dsrWorkspace .metric-blue {
  --metric-soft: #eaf3ff;
  --metric-tint: #f8fbff;
  color: #1468df;
}

#dsrWorkspace .metric-amber {
  --metric-soft: #fff5df;
  --metric-tint: #fffaf0;
  color: #b86b00;
}

#dsrWorkspace .metric-green {
  --metric-soft: #e9f8f1;
  --metric-tint: #f7fcfa;
  color: #13945f;
}

#dsrWorkspace .metric-red {
  --metric-soft: #fff0f2;
  --metric-tint: #fff9fa;
  color: #e23845;
}

#dsrWorkspace .metric-orange {
  --metric-soft: #fff5df;
  --metric-tint: #fffaf0;
  color: #b86b00;
}

#dsrWorkspace .defect-status {
  min-height: 18px;
  color: #4a8c73;
}

#dsrWorkspace .result-band {
  margin-bottom: 0;
}

#dsrWorkspace .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 1180px) {
  #dsrWorkspace .dsr-row {
    grid-template-columns: 210px minmax(240px, 1fr) 250px;
    gap: 14px;
  }

  #dsrWorkspace .defect-metrics {
    grid-template-columns: repeat(3, minmax(145px, 1fr));
  }
}

@media (max-width: 820px) {
  .app-shell {
    padding: 18px 14px 32px;
  }

  .dsr-app-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
  }

  .dsr-app-header .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .dsr-app-header .app-logo.click-dsr-logo {
    width: 210px;
    height: 58px;
  }

  .dsr-app-header .app-logo.organization-logo {
    width: 58px;
    height: 58px;
  }

  #dsrWorkspace .dsr-row {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 18px 0;
  }

  .cycle-state {
    grid-template-columns: minmax(100px, auto) minmax(0, 1fr);
  }

  #dsrWorkspace .main-actions button {
    flex: 1 1 190px;
  }

  #dsrWorkspace .defect-metrics {
    grid-template-columns: repeat(2, minmax(145px, 1fr));
  }
}

@media (max-width: 520px) {
  .section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  #dsrWorkspace .dsr-panel,
  #dsrWorkspace .defect-panel {
    padding: 20px 16px;
  }

  #dsrWorkspace .defect-header {
    align-items: flex-start;
    flex-direction: column;
  }

  #dsrWorkspace .defect-header button {
    width: 100%;
  }

  #dsrWorkspace .defect-metrics {
    grid-template-columns: 1fr;
  }
}
