:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-soft: #dbeafe;
  --success: #16a34a;
  --success-soft: #dcfce7;
  --warning: #d97706;
  --warning-soft: #fef3c7;
  --danger: #dc2626;
  --danger-soft: #fee2e2;
  --info: #0891b2;
  --info-soft: #cffafe;
  --shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: var(--bg);
}

a {
  color: inherit;
}

.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 26px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.16);
  padding: 28px;
}

.badge,
.pill,
.hint-icon {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
}

.badge,
.pill.primary,
.hint-icon {
  color: var(--primary);
  background: var(--primary-soft);
}

.pill.success {
  color: var(--success);
  background: var(--success-soft);
}

.pill.warning {
  color: var(--warning);
  background: var(--warning-soft);
}

.pill.danger {
  color: var(--danger);
  background: var(--danger-soft);
}

.login-card h1 {
  margin: 12px 0 8px;
  font-size: 28px;
}

.login-card p,
.help-text,
.subline,
.chart-title,
.chart-note,
.section p {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.login-form input,
.field input,
.field textarea,
.field select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 14px;
  background: #fff;
}

.login-form label,
.field label {
  font-size: 14px;
  font-weight: 700;
}

.btn {
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn.primary {
  background: var(--primary);
  color: #fff;
}

.btn.secondary {
  background: #fff;
  color: var(--text);
  border: 1px solid var(--line);
}

.btn.danger {
  background: #dc2626;
  color: #fff;
}

.error-box {
  background: #fff1f2;
  color: #be123c;
  border: 1px solid #fecdd3;
  border-radius: 14px;
  padding: 12px 14px;
  margin-top: 14px;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  min-height: 100vh;
}

@media (min-width: 1701px) {
  html {
    zoom: 0.9;
  }
}

.sidebar {
  background: #111827;
  color: #fff;
  padding: 28px 20px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.sidebar-toggle,
.sidebar-backdrop {
  display: none;
}

.sidebar-toggle {
  position: fixed;
  top: 20px;
  left: 14px;
  z-index: 1002;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(229, 231, 235, 0.9);
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.14);
  cursor: pointer;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  align-items: center;
  justify-content: center;
}

.sidebar-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(15, 23, 42, 0.46);
}

.brand {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand strong {
  font-size: 22px;
}

.brand span,
.nav small,
.hint,
.user-box span {
  color: rgba(255, 255, 255, 0.68);
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.nav a {
  color: #fff;
  text-decoration: none;
  padding: 12px 14px;
  border-radius: 12px;
  font-weight: 600;
}

.nav a.active,
.nav a:hover {
  background: rgba(255, 255, 255, 0.1);
}

.sidebar-bottom {
  margin-top: auto;
  display: grid;
  gap: 14px;
}

.user-box {
  padding: 14px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
}

.ghost-link {
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
}

.main {
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.topbar,
.actions,
.section-header-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.section-header-row {
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 18px;
}

.card,
.form-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.section,
.form-card {
  padding: 22px;
}

.section h2,
.form-card h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: visible;
}

.table-wrap table {
  width: 100%;
  min-width: 0;
  border-collapse: separate;
  border-spacing: 0;
  table-layout: auto;
  font-size: 14px;
}

.table-wrap th,
.table-wrap td {
  border-bottom: 1px solid var(--line);
}

.table-wrap th {
  padding: 16px 14px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  vertical-align: top;
}

.table-wrap td {
  padding: 16px 14px;
  vertical-align: top;
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table-wrap th {
  min-width: 0;
  max-width: 100%;
  white-space: normal;
  overflow-wrap: anywhere;
}

#qa-cycle-table,
#pretest-tasks-table {
  width: 100% !important;
  min-width: 0 !important;
  table-layout: fixed !important;
}

#qa-cycle-table .col-link,
#qa-cycle-table .qa-link-cell {
  width: 210px !important;
  min-width: 210px !important;
  max-width: 210px !important;
}

#qa-cycle-table .col-release-task,
#qa-cycle-table .cell-release-task,
#qa-cycle-table .col-sprint-task,
#qa-cycle-table .cell-sprint-task {
  width: 200px !important;
  min-width: 200px !important;
  max-width: 200px !important;
}

#qa-cycle-table .col-reopen,
#qa-cycle-table .qa-reopen-cell {
  width: 64px !important;
  min-width: 64px !important;
  max-width: 64px !important;
}

#qa-cycle-table .col-metric,
#qa-cycle-table .qa-metric-cell {
  width: 106px !important;
  min-width: 106px !important;
  max-width: 106px !important;
}

#qa-cycle-table .col-actions,
#qa-cycle-table .qa-actions-cell {
  width: 118px !important;
  min-width: 118px !important;
  max-width: 118px !important;
}

#pretest-tasks-table .pretest-drag-cell {
  width: 18px !important;
  min-width: 18px !important;
  max-width: 18px !important;
}

#pretest-tasks-table .pretest-task-cell {
  width: 220px !important;
  min-width: 220px !important;
  max-width: 220px !important;
}

#pretest-tasks-table .pretest-status-cell {
  width: 140px !important;
  min-width: 140px !important;
  max-width: 140px !important;
}

#pretest-tasks-table .pretest-estimate-cell {
  width: 165px !important;
  min-width: 165px !important;
  max-width: 165px !important;
}

#pretest-tasks-table .pretest-stage-cell {
  width: 128px !important;
  min-width: 128px !important;
  max-width: 128px !important;
}

#pretest-tasks-table .pretest-actions-cell {
  width: 110px !important;
  min-width: 110px !important;
  max-width: 110px !important;
}

#pretest-tasks-table th:nth-child(2) {
  width: 220px !important;
}

#pretest-tasks-table th:nth-child(3) {
  width: 140px !important;
}

#pretest-tasks-table th:nth-child(4),
#pretest-tasks-table th:nth-child(5) {
  width: 165px !important;
}

#pretest-tasks-table th:nth-child(6),
#pretest-tasks-table th:nth-child(7),
#pretest-tasks-table th:nth-child(8),
#pretest-tasks-table th:nth-child(9),
#pretest-tasks-table th:nth-child(10) {
  width: 128px !important;
}

#pretest-tasks-table th:nth-child(11) {
  width: 110px !important;
}

#pretest-tasks-table,
#qa-cycle-table {
  font-size: 14px !important;
}

#pretest-tasks-table thead th,
#qa-cycle-table thead th {
  font-size: 12px !important;
  line-height: 1.25 !important;
}

#pretest-tasks-table tbody td,
#qa-cycle-table tbody td {
  font-size: 14px !important;
  line-height: 1.3 !important;
}

#pretest-tasks-table .pretest-task-title,
#qa-cycle-table .qa-link-title,
#qa-cycle-table .qa-task-title {
  font-size: 14px !important;
  line-height: 1.3 !important;
}

#pretest-tasks-table .pretest-estimate-row,
#qa-cycle-table .qa-metric-box {
  padding-left: 5px !important;
  padding-right: 5px !important;
  font-size: 13px !important;
  line-height: 1.25 !important;
}

#pretest-tasks-table .pretest-estimate-row .value,
#pretest-tasks-table .pretest-stage-box .value,
#qa-cycle-table .qa-metric-box .value,
#qa-cycle-table .qa-reopen-box .value,
#qa-cycle-table .metric-line {
  display: block !important;
  max-width: 100% !important;
  white-space: nowrap !important;
  font-size: 14px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

#pretest-tasks-table .pretest-action,
#qa-cycle-table .qa-action-link,
#qa-cycle-table .link-action {
  min-height: 24px !important;
  font-size: 14px !important;
  line-height: 1.25 !important;
}

#pretest-tasks-table .pretest-action svg,
#qa-cycle-table .qa-action-link svg {
  width: 18px !important;
  height: 18px !important;
}

.th-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  line-height: 1.25;
}

.th-center {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.cell-link,
.cell-release-task,
.cell-sprint-task {
  word-break: break-word;
  overflow-wrap: anywhere;
}

.cell-status {
  text-align: center;
  vertical-align: middle !important;
}

.cell-center {
  text-align: center;
  white-space: nowrap;
  vertical-align: middle !important;
}

.cell-actions {
  vertical-align: middle !important;
}

.col-link {
  width: 16%;
}

.col-release-task {
  width: 18%;
}

.col-release-status {
  width: 12%;
}

.col-sprint-task {
  width: 18%;
}

.col-sprint-status {
  width: 12%;
}

.col-reopen {
  width: 5%;
}

.col-metric {
  width: 9%;
}

.col-actions {
  width: 10%;
}

.link-title {
  font-weight: 700;
  margin-bottom: 4px;
  line-height: 1.3;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.subline {
  display: inline-block;
  margin-top: 4px;
  line-height: 1.35;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.preview-inline-form {
  margin: 2px 0 0;
}

.preview-link-action {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent;
  color: #2563eb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
  cursor: pointer;
  text-align: left;
}

.preview-link-action:hover {
  color: #1d4ed8;
  text-decoration: underline;
}

.preview-link-action-icon {
  font-size: 12px;
  line-height: 1;
  flex: 0 0 auto;
}

.preview-status-inline {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 2px;
  color: #15803d;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.preview-status-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #dcfce7;
  color: #15803d;
  font-size: 11px;
  font-weight: 800;
  flex: 0 0 16px;
}

.pretest-row-critical {
  background: rgba(254, 226, 226, 0.38);
}

.pretest-row-warning {
  background: rgba(254, 243, 199, 0.38);
}

.pretest-row-info {
  background: rgba(236, 254, 255, 0.6);
}

.row-alert-marker {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  vertical-align: middle;
}

.row-alert-marker.alert-critical {
  background: #fee2e2;
  color: #dc2626;
}

.row-alert-marker.alert-warning {
  background: #fef3c7;
  color: #d97706;
}

.row-alert-marker.alert-info {
  background: #cffafe;
  color: #0891b2;
}

.metric-stack {
  display: grid;
  gap: 6px;
  justify-items: center;
}

.metric-line {
  line-height: 1.25;
}

.metric-line.muted {
  color: var(--muted);
  font-size: 12px;
}

.estimate-check-form {
  margin: 0;
}

.estimate-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #374151;
  cursor: pointer;
}

.estimate-check input {
  margin: 0;
}

.formula-box {
  padding: 14px 16px;
  border: 1px solid #dbeafe;
  background: #f8fbff;
  border-radius: 14px;
}

.formula-box strong {
  display: block;
  margin-bottom: 8px;
}

.formula-box ul {
  margin: 0;
  padding-left: 18px;
}

.pretest-details-modal {
  width: min(1100px, 100%);
}

.detail-text-grid {
  display: grid;
  gap: 8px;
  font-size: 14px;
  line-height: 1.45;
}

.process-chart-grid {
  display: grid;
  gap: 12px;
}

.process-chart-row {
  display: grid;
  grid-template-columns: 260px 1fr 130px;
  gap: 12px;
  align-items: center;
}

.process-chart-label {
  font-size: 14px;
}

.process-chart-bar {
  width: 100%;
  height: 12px;
  background: #eef2ff;
  border-radius: 999px;
  overflow: hidden;
}

.process-chart-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: 999px;
}

.process-chart-value {
  font-weight: 700;
}

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

.alert-item {
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.4;
}

.alert-item.critical {
  background: #fff1f2;
  color: #b91c1c;
  border: 1px solid #fecdd3;
}

.alert-item.warning {
  background: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
}

.alert-item.info {
  background: #ecfeff;
  color: #0e7490;
  border: 1px solid #a5f3fc;
}

.two-cols {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 18px;
  background: #fff;
}

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

.chart-value {
  font-size: 28px;
  font-weight: 800;
}

.page-shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 28px;
}

.page-header-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}

.form-stack {
  display: grid;
  gap: 20px;
}

.form-grid {
  display: grid;
  gap: 16px;
}

.form-grid.one {
  grid-template-columns: 1fr;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.form-grid.five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.full {
  grid-column: 1 / -1;
}

.toggle-grid {
  display: grid;
  gap: 12px;
}

.toggle-row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
}

.toggle-row strong {
  display: block;
  margin-bottom: 4px;
}

.toggle-row span {
  font-size: 13px;
  color: var(--muted);
}

.form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  background: #111827;
  color: #fff;
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s ease;
  z-index: 9999;
}

.toast.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.hint-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #2563eb;
  background: #dbeafe;
  cursor: help;
  text-decoration: none;
  user-select: none;
  flex: 0 0 18px;
}

.row-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 88px;
}

.row-actions .link-action {
  width: 100%;
}

.link-action {
  border: 0;
  background: transparent;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.link-action.open {
  color: #2563eb;
}

.link-action.delete {
  color: #dc2626;
}

.link-action:hover {
  text-decoration: underline;
}

.pill-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: normal;
  word-break: break-word;
  overflow-wrap: anywhere;
  line-height: 1.25;
  width: 100%;
  max-width: 170px;
  min-height: 42px;
  padding: 9px 12px;
  box-sizing: border-box;
}

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.52);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  z-index: 1000;
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow: auto;
  background: #ffffff;
  border-radius: 24px;
  box-shadow: 0 28px 60px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(229, 231, 235, 0.9);
}

.details-modal {
  width: min(1040px, 100%);
}

.delete-modal {
  width: min(560px, 100%);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 24px 24px 10px;
}

.modal-header h3 {
  margin: 0;
  font-size: 26px;
}

.modal-header p {
  margin: 6px 0 0;
  color: #6b7280;
  line-height: 1.45;
}

.modal-content {
  padding: 14px 24px 24px;
  display: grid;
  gap: 18px;
}

.close {
  border: 0;
  background: #f3f4f6;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  font-size: 20px;
  cursor: pointer;
  flex: 0 0 auto;
}

.delete-note {
  padding: 14px 16px;
  border: 1px solid #fee2e2;
  background: #fff7f7;
  color: #7f1d1d;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
  flex-wrap: wrap;
}

.page-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 700;
  color: #2563eb;
  background: #dbeafe;
  padding: 6px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
}

.details-task-card {
  border: 1px solid #e5e7eb;
  border-radius: 18px;
  padding: 18px;
  background: #ffffff;
}

.details-task-card h4 {
  margin: 0 0 8px;
  font-size: 18px;
}

.details-task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.details-task-meta span {
  font-size: 13px;
  color: #6b7280;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 6px 10px;
}

.details-timeline {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.details-timeline-row {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr) 110px;
  gap: 12px;
  align-items: center;
  font-size: 14px;
}

.details-timeline-row > div:first-child {
  min-width: 0;
  line-height: 1.35;
}

.details-timeline-row > strong {
  display: block;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.details-bar {
  width: 100%;
  height: 10px;
  background: #eef2ff;
  border-radius: 999px;
  overflow: hidden;
  align-self: center;
}

.details-bar > div {
  height: 100%;
  background: linear-gradient(90deg, #60a5fa, #2563eb);
  border-radius: 999px;
}

.details-metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.details-metric-box {
  padding: 14px;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  background: #f9fafb;
}

.details-metric-box .label {
  color: #6b7280;
  font-size: 13px;
  margin-bottom: 6px;
}

.details-metric-box .value {
  font-size: 24px;
  font-weight: 800;
}

.field-hint {
  font-size: 12px;
  color: #6b7280;
  line-height: 1.4;
}

.inline-warning {
  min-height: 20px;
  margin-bottom: 12px;
  font-size: 13px;
  color: #b45309;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.inline-warning.show {
  opacity: 1;
}

.status-default {
  background: #f3f4f6;
  color: #374151;
}

.status-reopened {
  background: #fce7f3;
  color: #c026d3;
}

.status-in-progress {
  background: #dbeafe;
  color: #2563eb;
}

.status-cannot-reproduce {
  background: #fee2e2;
  color: #dc2626;
}

.status-pending {
  background: #fef3c7;
  color: #d97706;
}

.status-pause {
  background: #e0f2fe;
  color: #0369a1;
}

.status-upload-to-test-bench {
  background: #ccfbf1;
  color: #0f766e;
}

.status-to-test {
  background: #ede9fe;
  color: #7c3aed;
}

.status-testing {
  background: #fef3c7;
  color: #ca8a04;
}

.status-product-review {
  background: #ffedd5;
  color: #ea580c;
}

.status-publish {
  background: #dcfce7;
  color: #16a34a;
}

.status-closed {
  background: #dcfce7;
  color: #166534;
}

.release-status-testing {
  background: #ede9fe;
  color: #7c3aed;
}

.release-status-bugs {
  background: #fee2e2;
  color: #dc2626;
}

.release-status-product-review {
  background: #ffedd5;
  color: #ea580c;
}

.release-status-release {
  background: #dcfce7;
  color: #16a34a;
}

.release-status-ready-for-test {
  background: #dbeafe;
  color: #2563eb;
}

.release-status-pending-product {
  background: #fef3c7;
  color: #d97706;
}

.release-status-pause {
  background: #e0f2fe;
  color: #0369a1;
}

.release-status-fallback {
  background: #fce7f3;
  color: #c026d3;
}

@media (max-width: 1700px) {
  html {
    zoom: 0.8;
  }

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 1001;
    width: 280px;
    transform: translateX(-100%);
    transition: transform 0.18s ease;
    box-shadow: 18px 0 40px rgba(15, 23, 42, 0.22);
  }

  body.sidebar-open .sidebar {
    transform: translateX(0);
  }

  .sidebar-toggle {
    display: inline-flex;
  }

  body.sidebar-open .sidebar-toggle {
    display: none;
  }

  body.sidebar-open .sidebar-backdrop {
    display: block;
  }

  .main {
    padding: 20px;
    gap: 18px;
  }

  .topbar {
    min-height: 42px;
    padding-left: 52px;
    align-items: center;
  }

  .section,
  .form-card {
    padding: 18px;
  }

  .table-wrap table {
    font-size: 13px;
  }

  .table-wrap th {
    padding: 12px 8px;
    font-size: 12px;
  }

  .table-wrap td {
    padding: 12px 8px;
  }

  #qa-cycle-table .col-link,
  #qa-cycle-table .qa-link-cell {
    width: 158px !important;
    min-width: 158px !important;
    max-width: 158px !important;
  }

  #qa-cycle-table .col-release-task,
  #qa-cycle-table .cell-release-task,
  #qa-cycle-table .col-sprint-task,
  #qa-cycle-table .cell-sprint-task {
    width: 178px !important;
    min-width: 178px !important;
    max-width: 178px !important;
  }

  #qa-cycle-table .col-reopen,
  #qa-cycle-table .qa-reopen-cell {
    width: 44px !important;
    min-width: 44px !important;
    max-width: 44px !important;
  }

  #qa-cycle-table .col-metric,
  #qa-cycle-table .qa-metric-cell {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }

  #qa-cycle-table .col-actions,
  #qa-cycle-table .qa-actions-cell {
    width: 92px !important;
    min-width: 92px !important;
    max-width: 92px !important;
  }

  .qa-task-summary {
    min-height: 104px;
    gap: 8px;
  }

  .qa-task-title {
    min-height: 54px;
    font-size: 12px;
  }

  .qa-task-status .pill {
    width: 144px;
    min-width: 0;
    max-width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    font-size: 12px;
    word-break: normal;
    overflow-wrap: normal;
  }

  .qa-metric-box {
    min-height: 76px;
    padding: 8px 4px;
    gap: 7px;
    font-size: 14px;
  }

  .qa-metric-box .value,
  .qa-reopen-box .value,
  .metric-line {
    white-space: nowrap;
    font-size: 13px;
    font-weight: 500;
  }

  .qa-metric-box svg {
    width: 17px;
    height: 17px;
  }

  #pretest-tasks-table .pretest-drag-cell {
    width: 12px !important;
    min-width: 12px !important;
    max-width: 12px !important;
  }

  #pretest-tasks-table .pretest-task-cell {
    width: 164px !important;
    min-width: 164px !important;
    max-width: 164px !important;
  }

  #pretest-tasks-table .pretest-status-cell {
    width: 126px !important;
    min-width: 126px !important;
    max-width: 126px !important;
  }

  #pretest-tasks-table .pretest-estimate-cell {
    width: 128px !important;
    min-width: 128px !important;
    max-width: 128px !important;
  }

  #pretest-tasks-table .pretest-stage-cell {
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
  }

  #pretest-tasks-table .pretest-actions-cell {
    width: 76px !important;
    min-width: 76px !important;
    max-width: 76px !important;
  }

  #pretest-tasks-table th:nth-child(1) {
    width: 12px !important;
  }

  #pretest-tasks-table th:nth-child(2) {
    width: 164px !important;
  }

  #pretest-tasks-table th:nth-child(3) {
    width: 126px !important;
  }

  #pretest-tasks-table th:nth-child(4),
  #pretest-tasks-table th:nth-child(5) {
    width: 128px !important;
  }

  #pretest-tasks-table th:nth-child(6),
  #pretest-tasks-table th:nth-child(7),
  #pretest-tasks-table th:nth-child(8),
  #pretest-tasks-table th:nth-child(9),
  #pretest-tasks-table th:nth-child(10) {
    width: 112px !important;
  }

  #pretest-tasks-table th:nth-child(11) {
    width: 76px !important;
  }

  .pretest-task-title {
    font-size: 13px;
  }

  .pretest-status-cell .pill {
    width: 112px !important;
    min-height: 30px;
    padding: 5px 7px;
    font-size: 11px;
    line-height: 1.15;
    word-break: normal;
    overflow-wrap: normal;
  }

  .pretest-estimate-box {
    min-height: 106px;
    padding: 9px 8px;
    gap: 7px;
  }

  #pretest-tasks-table .pretest-estimate-row {
    grid-template-columns: 1fr !important;
    gap: 2px !important;
    font-size: 13px !important;
  }

  #pretest-tasks-table .pretest-estimate-row .label {
    min-width: 0 !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
  }

  #pretest-tasks-table .pretest-estimate-row .value {
    min-width: 0 !important;
    font-size: 15px !important;
    font-weight: 500 !important;
    text-align: left !important;
    white-space: nowrap !important;
  }

  .pretest-check-line {
    font-size: 11px;
  }

  .pretest-stage-box {
    min-height: 98px;
    padding: 9px 7px;
    gap: 7px;
  }

  .pretest-stage-box svg {
    width: 16px;
    height: 16px;
  }

  .pretest-stage-box .value {
    font-size: 15px;
    font-weight: 500;
  }

  .pretest-actions,
  .row-actions,
  .qa-row-actions {
    gap: 8px;
  }

  .pretest-action,
  .link-action,
  .qa-action-link {
    font-size: 12px;
  }
}

@media (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .charts-grid,
  .form-grid.five,
  .form-grid.four,
  .form-grid.three,
  .form-grid.two {
    grid-template-columns: 1fr 1fr;
  }

  .details-metrics-grid {
    grid-template-columns: 1fr 1fr;
  }

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

  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .table-wrap,
  .qa-cycle-table-wrap,
  .pretest-section-table-wrap {
    overflow-x: visible !important;
    width: 100%;
  }

  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap th,
  .table-wrap td {
    display: block !important;
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
  }

  .table-wrap table {
    min-width: 0 !important;
    border-collapse: separate !important;
    border-spacing: 0 12px !important;
    table-layout: fixed;
  }

  .table-wrap thead {
    display: none !important;
  }

  .table-wrap tbody tr {
    margin: 0 0 12px !important;
    border: 1px solid var(--line) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05) !important;
    overflow: hidden !important;
  }

  .table-wrap tbody td,
  #qa-cycle-table tbody td,
  #pretest-tasks-table tbody td {
    display: grid !important;
    grid-template-columns: minmax(120px, 30%) minmax(0, 1fr) !important;
    gap: 12px !important;
    align-items: start !important;
    padding: 12px 14px !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
    border-radius: 0 !important;
    background: transparent !important;
    text-align: left !important;
    white-space: normal !important;
    word-break: break-word !important;
    overflow-wrap: anywhere !important;
    transform: none !important;
  }

  .table-wrap tbody td:last-child,
  #qa-cycle-table tbody td:last-child,
  #pretest-tasks-table tbody td:last-child {
    border-bottom: 0 !important;
  }

  .table-wrap tbody td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.35;
    text-align: left;
  }

  .table-wrap tbody td[colspan] {
    display: block !important;
    text-align: center !important;
  }

  .table-wrap tbody td[colspan]::before {
    content: none;
  }

  .table-wrap .cell-center,
  .table-wrap .cell-status,
  .table-wrap .cell-actions,
  .table-wrap .qa-actions-cell,
  .table-wrap .pretest-actions-cell {
    text-align: left !important;
    vertical-align: top !important;
  }

  .table-wrap .pill-wrap,
  .table-wrap .qa-task-status .pill,
  .table-wrap .pretest-status-cell .pill,
  .table-wrap .pretest-status-placeholder {
    width: auto !important;
    min-width: 0 !important;
    max-width: 100% !important;
    transform: none !important;
  }

  .table-wrap .qa-task-summary,
  .table-wrap .pretest-estimate-box,
  .table-wrap .pretest-stage-box,
  .table-wrap .qa-metric-box,
  .table-wrap .regression-testing-box {
    min-height: 0 !important;
  }

  .table-wrap .qa-task-summary,
  .table-wrap .qa-row-actions,
  .table-wrap .qa-primary-actions,
  .table-wrap .qa-secondary-actions,
  .table-wrap .pretest-actions,
  .table-wrap .row-actions,
  .table-wrap .metric-stack {
    align-items: start !important;
    justify-items: start !important;
    text-align: left !important;
  }

  .table-wrap .qa-task-title,
  .table-wrap .pretest-task-title {
    min-height: 0 !important;
    text-align: left !important;
    -webkit-line-clamp: unset !important;
  }

  .table-wrap .qa-task-status {
    justify-content: flex-start !important;
    min-height: 0 !important;
  }

  .table-wrap .pretest-drag-cell {
    display: none !important;
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100%;
    overflow-x: hidden;
  }

  .main,
  .page-shell {
    padding: 18px;
  }

  .charts-grid,
  .form-grid.five,
  .form-grid.four,
  .form-grid.three,
  .form-grid.two,
  .details-metrics-grid {
    grid-template-columns: 1fr;
  }

  .page-header-row,
  .form-actions,
  .modal-actions,
  .modal-header,
  .section-header-row {
    flex-direction: column;
  }

  .form-actions .btn,
  .page-header-row .btn,
  .modal-actions .btn,
  .section-header-row .btn {
    width: 100%;
  }

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

  .details-timeline-row > strong {
    text-align: left;
  }

  .table-wrap tbody td,
  #qa-cycle-table tbody td,
  #pretest-tasks-table tbody td {
    grid-template-columns: minmax(96px, 38%) minmax(0, 1fr) !important;
  }
}
