/* ==========================================================================
   QA LAB - SYSTEM DESIGN & STYLE SHEET (REFRACTORED & CLEANED)
   ========================================================================== */

/* ── 1. GLOBAL LAYOUT & SHELL ───────────────────────────────────────────── */
.app-shell {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  background: var(--page-bg);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 58px;
  padding: 0 24px;
  border-bottom: 1px solid var(--border);
  background: #ffffff;
  box-shadow: 0 1px 0 var(--border), 0 2px 12px rgba(23, 32, 31, 0.06);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
}

.topnav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.topnav a,
.project-sidebar a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 34px;
  height: 34px;
  padding: 0 12px;
  border-radius: 7px;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.topnav svg,
.project-sidebar svg {
  flex-shrink: 0;
  color: currentColor;
}

.topnav a.active,
.topnav a:hover,
.project-sidebar a.active,
.project-sidebar a:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
}

.user-pill-wrap {
  position: relative;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 8px 0 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, background 0.15s;
}

.user-pill:hover {
  border-color: var(--border-strong);
}

.user-pill-avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
}

.user-dropdown,
.user-edit-popover {
  position: absolute;
  right: 0;
  top: 40px;
  width: 260px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 8px;
}

.user-dropdown-header .avatar {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
}

.user-dropdown-header strong {
  display: block;
  font-size: 14px;
  color: var(--text-strong);
}

.user-dropdown-header span {
  font-size: 11px;
  color: var(--text-soft);
}

.user-dropdown-divider {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 6px 0;
}

.user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--text-strong);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.user-dropdown-item:hover {
  background: var(--soft-bg);
}

.user-edit-popover form {
  display: grid;
  gap: 8px;
}

.user-edit-actions {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

/* ── 2. WORKSPACE & SIDEBAR ───────────────────────────────────────────── */
.workspace {
  display: flex;
  width: min(1260px, calc(100% - 24px));
  margin: 0 auto;
  flex: 1;
}

.project-sidebar {
  position: sticky;
  top: 60px;
  width: 196px;
  height: calc(100svh - 60px);
  padding: 20px 12px 20px 0;
  border-right: 1px solid var(--border);
  flex-shrink: 0;
}

.project-context {
  display: grid;
  gap: 2px;
  margin-bottom: 16px;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.project-context span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.project-context strong {
  color: var(--text-strong);
  font-size: 13px;
}

.project-sidebar nav {
  display: grid;
  gap: 4px;
}

.project-sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  position: relative;
}

.project-sidebar a.active::before {
  content: '';
  position: absolute;
  left: -1px;
  top: 5px;
  bottom: 5px;
  width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.content {
  flex: 1;
  min-width: 0;
  padding: 28px 16px 40px 16px;
  overflow-x: hidden;
}

.project-sidebar + .content {
  padding-left: 16px;
}

/* ── 3. BUTTONS (UNIFIED) ──────────────────────────────────────────────── */
.primary-button,
.secondary-button,
.danger-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 8px;
  min-height: 38px;
  height: auto;
  padding: 8px 16px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.primary-button:focus-visible,
.secondary-button:focus-visible,
.danger-button:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.primary-button {
  background: var(--accent);
  color: #fff;
  border: 1px solid var(--accent);
  box-shadow: 0 1px 3px rgba(11, 118, 109, 0.25), 0 1px 0 rgba(255,255,255,0.08) inset;
}

.primary-button:hover:not(:disabled) {
  background: var(--accent-strong);
  border-color: var(--accent-strong);
  box-shadow: 0 2px 6px rgba(11, 118, 109, 0.30);
}

.secondary-button {
  background: var(--surface);
  color: var(--text-strong);
  border: 1px solid var(--border-strong);
  box-shadow: 0 1px 2px rgba(23, 32, 31, 0.06);
}

.secondary-button:hover:not(:disabled) {
  background: var(--soft-bg);
  border-color: var(--text-soft);
  box-shadow: 0 1px 4px rgba(23, 32, 31, 0.1);
}

.danger-button {
  background: #fff5f5;
  color: var(--danger);
  border: 1px solid #fecaca;
}

.danger-button:hover:not(:disabled) {
  background: #fee2e2;
  border-color: #fca5a5;
}

.primary-button:active:not(:disabled),
.secondary-button:active:not(:disabled),
.danger-button:active:not(:disabled) {
  transform: translateY(1px);
}

.primary-button:disabled,
.secondary-button:disabled,
.danger-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.icon-button {
  display: inline-grid;
  place-items: center;
  min-width: 32px;
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-sm);
}

/* Ghost button — low-emphasis action that blends until hovered */
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: var(--radius);
  background: transparent;
  color: var(--text-muted);
  border: 1px solid transparent;
  font-family: inherit;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.ghost-button:hover:not(:disabled) { background: var(--soft-bg); color: var(--text-strong); }
.ghost-button:active:not(:disabled) { transform: translateY(1px); }
.ghost-button:focus-visible { outline: none; box-shadow: var(--focus-ring); }

/* Consistent keyboard focus for links and icon-only controls (a11y) */
a:focus-visible,
.icon-button:focus-visible,
.row-action-btn:focus-visible,
.row-delete:focus-visible,
.modal-close:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--radius-sm);
}

/* ── 4. PAGE HEADER & TITLE BAR ───────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.page-header-copy {
  min-width: 0;
  flex: 1;
}

.page-header h1 {
  margin: 0;
  color: var(--text-strong);
  font-size: 22px;
  font-weight: 750;
  letter-spacing: -0.02em;
  line-height: 1.3;
  word-break: break-word;
}

.page-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px 4px 6px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  line-height: 1;
}
.page-back-btn:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
  border-color: var(--border-strong);
}
.page-back-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.page-header p {
  margin: 5px 0 0;
  color: var(--text-soft);
  font-size: 12.5px;
  line-height: 1.5;
  max-width: 600px;
}

.page-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}
.page-header .page-actions { align-self: center; }

.page-actions .page-actions-row {
  margin-left: auto;
}

.page-actions-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

.section-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 750;
}

/* ── 5. FORM CONTROLS ──────────────────────────────────────────────────── */
label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

input,
select,
textarea {
  width: 100%;
  height: 38px;
  padding: 0 11px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 13px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

textarea {
  height: auto;
  padding: 8px 10px;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px !important;
}

select:not(.status-select):not(.inline-select):not(.filter-active):hover {
  border-color: var(--text-soft);
  background-color: var(--soft-bg);
}

select:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

select:focus {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'><polyline points='18 15 12 9 6 15'></polyline></svg>");
}

.inline-select,
.status-select {
  background-image: none !important;
  padding-right: 8px !important;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
}

/* ── 6. COMPACT PROJECT OVERVIEW BAR (REPLACED CARD) ────────────────────── */
.project-overview-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 24px;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fafbfc;
  box-shadow: var(--shadow-sm);
}

.project-bar-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.project-bar-info h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
}

.project-bar-desc {
  font-size: 12px;
  color: var(--text-soft);
  max-width: 420px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.project-health-badge {
  display: inline-flex;
  align-items: center;
  height: 18px;
  padding: 0 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.health-badge--passed  { background: var(--status-passed-bg); color: var(--status-passed-fg); }
.health-badge--pending { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.health-badge--failed  { background: var(--status-failed-bg); color: var(--status-failed-fg); }

.project-bar-metrics {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.bar-metric {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  min-width: 64px;
}

.bar-metric-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.bar-metric-val {
  font-size: 13px;
  font-weight: 750;
  color: var(--text-strong);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-metric-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
}

/* ── 7. DATA TABLES & PAGINATION ────────────────────────────────────────── */
.panel {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: 0 1px 3px rgba(23, 32, 31, 0.06), 0 1px 0 rgba(23, 32, 31, 0.03);
  overflow: hidden;
  margin-bottom: 20px;
}

.toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 16px;
  background: #ffffff;
  border-bottom: 1px solid var(--border);
}

.toolbar input[type="search"] {
  max-width: 240px;
  flex-shrink: 0;
}

.toolbar select,
.toolbar input[type="date"] {
  width: auto;
  min-width: 120px;
  flex-shrink: 0;
}
.toolbar .filter-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.toolbar-info {
  margin-left: auto;
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
}
.filter-clear-btn {
  font-size: 11px;
  background: none;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 8px;
  cursor: pointer;
  color: var(--text-muted);
  white-space: nowrap;
}
.filter-clear-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.bulk-action-bar,
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: var(--accent-soft);
  border-bottom: 1px solid var(--border);
}

.bulk-bar {
  justify-content: space-between;
  flex-wrap: wrap;
}

.bulk-action-bar span,
.bulk-bar > span:first-child {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
}

.bulk-action-bar select,
.bulk-actions select {
  width: auto;
  height: 36px;
  min-width: 120px;
  font-size: 13px;
  border-radius: 6px;
  padding: 0 28px 0 10px;
}

.bulk-action-bar button,
.bulk-actions button {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
}

.bulk-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.bulk-divider {
  display: inline-block;
  width: 1px;
  height: 22px;
  background: var(--border);
  margin: 0 2px;
}
.bulk-folder-input {
  height: 36px;
  min-height: 36px;
  padding: 0 10px;
  font-size: 12.5px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text-strong);
  width: 150px;
}
.bulk-folder-input:focus { outline: none; border-color: var(--accent); }

.folder-modal-modules-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-strong);
  margin-bottom: 6px;
}
.folder-modal-module-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 260px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 6px 0;
}
.folder-modal-module-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-strong);
  transition: background 0.1s;
}
.folder-modal-module-item:hover:not(.folder-modal-module-item--disabled) { background: var(--soft-bg); }
.folder-modal-module-item--disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.folder-modal-module-item input[type="checkbox"] { width: 15px; height: 15px; accent-color: var(--accent); cursor: pointer; }
.folder-modal-module-item--disabled input[type="checkbox"] { cursor: not-allowed; }
.folder-modal-module-name { flex: 1; }
.folder-modal-module-tag {
  font-size: 10.5px;
  background: var(--soft-bg);
  color: var(--text-muted);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.table-wrap table {
  min-width: 100%;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  text-align: left;
}

th {
  background: #f2f4f4;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 10px 16px;
  border-bottom: 2px solid var(--border);
  white-space: nowrap;
  user-select: none;
  text-align: left;
  vertical-align: middle;
}

td {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  color: var(--text-strong);
  vertical-align: middle;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* Keep single-line formatting only where it is genuinely wanted: IDs, dates,
   numeric/count cells, and explicit nowrap columns. */
td.mono,
td.nowrap,
.tc-id,
.meta-date,
.proj-run-date,
.rpt-run-col-date {
  white-space: nowrap;
}

tbody tr {
  transition: background-color 0.12s ease;
}

tbody tr:nth-child(even) {
  background-color: #fafbfb;
}

tbody tr:hover {
  background-color: var(--accent-soft) !important;
}

/* Row checkbox styling */
.row-checkbox {
  width: 14px;
  height: 14px;
  cursor: pointer;
}

/* Row action triggers */
.row-actions {
  width: 54px;
  text-align: center;
}

.row-actions-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.row-action-btn,
.row-delete {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.row-action-btn:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
}

.row-delete:hover {
  background: #fef0f0;
  color: var(--danger);
}

/* Jira integration push button */
.jira-push-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border: 1px solid #0052cc;
  border-radius: 6px;
  background: #0052cc;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.jira-push-btn:hover {
  background: #0747a6;
  box-shadow: 0 0 0 3px rgba(0, 82, 204, 0.25);
}
.jira-push-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), 0 0 0 3px rgba(0, 82, 204, 0.25);
}
.jira-push-btn:active {
  transform: translateY(1px);
}
.jira-push-btn.mobile-card-action-btn {
  width: 100%;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
}

/* Bug table responsive — on small screens, stack action buttons */
@media (max-width: 640px) {
  .bug-col-id       { width: 12%; }
  .bug-col-title    { width: 28%; }
  .bug-col-module   { width: 12%; }
  .bug-col-severity { width: 12%; }
  .bug-col-priority { width: 12%; }
  .bug-col-status   { width: 12%; }
  .bug-col-actions  { width: 12%; }
}

/* ── Final visual consistency pass ─────────────────────────────────────────
   Keep the current Blade markup readable even where older page-specific
   selectors still exist above. These contracts intentionally live at the end
   of the cascade so the shared rhythm wins over legacy module rules. */
.page-actions {
  flex-wrap: wrap;
}

.page-actions-row {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.page-actions-row > form,
.page-actions-row > .status-pill,
.page-actions-row > .muted-meta {
  flex: 0 0 auto;
}

.table-row-actions-cell {
  text-align: right;
}

.table-row-actions-cell .table-row-actions {
  justify-content: flex-end;
  gap: 9px;
  min-width: 64px;
}

.data-table td,
.requirements-table td,
.coverage-matrix-table td,
.run-results-table td {
  white-space: normal;
}

.requirements-table,
.coverage-matrix-table,
.run-results-table {
  table-layout: fixed;
  width: 100%;
}

.requirements-table .req-col-key { width: 12%; }
.requirements-table .req-col-title { width: 38%; }
.requirements-table .req-col-priority { width: 14%; }
.requirements-table .req-col-linked { width: 14%; text-align: center; }
.requirements-table .req-col-actions { width: 22%; }

.requirements-table .req-col-title,
.coverage-matrix-table .coverage-col-requirement,
.run-results-table .run-results-col-title,
.run-results-table .run-results-col-actual {
  overflow-wrap: anywhere;
}

.requirements-table .req-col-actions .table-row-actions,
.requirements-table .req-col-actions > .table-row-actions {
  justify-content: flex-end;
}

.requirement-edit-popover {
  position: absolute;
  right: 16px;
  z-index: 20;
  width: min(420px, 90vw);
  margin-top: 8px;
  box-shadow: var(--shadow-md);
}

.coverage-matrix-table .coverage-col-requirement { width: 25%; }
.coverage-matrix-table .coverage-col-priority { width: 12%; }
.coverage-matrix-table .coverage-col-linked { width: 11%; text-align: center; }
.coverage-matrix-table .coverage-col-pass { width: 14%; }
.coverage-matrix-table .coverage-col-verdict { width: 15%; }
.coverage-matrix-table .coverage-col-cases { width: 23%; }
.coverage-matrix-table .coverage-col-cases .tag-list { gap: 5px; }

.run-results-table .run-results-col-title { width: 22%; }
.run-results-table .run-results-col-module { width: 14%; }
.run-results-table .run-results-col-status { width: 14%; }
.run-results-table .run-results-col-actual { width: 22%; }
.run-results-table .run-results-col-evidence { width: 18%; }
.run-results-table .run-results-col-bug { width: 10%; }
.run-results-table .run-results-col-actual,
.run-results-table .run-results-col-evidence {
  line-height: 1.45;
}

.mobile-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}

.status-pill--compact {
  min-width: 0;
  min-height: 18px;
  padding: 2px 7px;
  font-size: 10px;
}

.tc-folder-link {
  display: flex;
  align-items: center;
  width: 100%;
  min-width: 0;
  gap: 8px;
  color: inherit;
  text-decoration: none;
}

.tc-folder-link:hover,
.tc-folder-link:focus-visible {
  color: var(--accent);
}

@media (max-width: 720px) {
  .page-actions,
  .page-actions-row {
    width: 100%;
  }

  .page-actions-row {
    justify-content: flex-start;
  }

  .page-actions-row > .primary-button,
  .page-actions-row > .secondary-button,
  .page-actions-row > .transfer-button {
    flex: 1 1 auto;
  }

  .requirements-table .req-col-actions {
    width: 26%;
  }

  .coverage-matrix-table,
  .run-results-table {
    min-width: 700px;
  }
}

@media (max-width: 520px) {
  .requirements-table .req-col-key { width: 18%; }
  .requirements-table .req-col-title { width: 42%; }
  .requirements-table .req-col-priority { width: 18%; }
  .requirements-table .req-col-linked { display: none; }
  .requirements-table .req-col-actions { width: 22%; }

  .requirements-table tr > .req-col-linked,
  .requirements-table tr > th.req-col-linked {
    display: none;
  }

  .coverage-matrix-table tr > .coverage-col-cases,
  .coverage-matrix-table tr > th.coverage-col-cases {
    display: none;
  }
}
@media (max-width: 480px) {
  .bug-col-id       { width: 14%; }
  .bug-col-title    { width: 32%; }
  .bug-col-module   { width: 0; }
  .bug-col-severity { width: 14%; }
  .bug-col-priority { width: 14%; }
  .bug-col-status   { width: 12%; }
  .bug-col-actions  { width: 14%; }
  /* Also hide the module cells, not just the col width */
  .bug-table tr > th:nth-child(3),
  .bug-table tr > td:nth-child(3) {
    display: none;
  }
}

/* ── Active module and backup / restore alignment ────────────────────────── */
.project-sidebar nav {
  gap: 6px;
}

.project-sidebar a {
  position: relative;
  min-height: 38px;
  height: 38px;
  justify-content: flex-start;
  padding: 0 12px 0 15px;
  border: 1px solid transparent;
  border-radius: 9px;
  font-size: 12.5px;
  line-height: 1;
}

.project-sidebar a svg {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
}

.project-sidebar a.active {
  border-color: color-mix(in srgb, var(--accent) 22%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 750;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--accent) 10%, transparent);
}

.project-sidebar a.active::before {
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 3px;
}

.project-sidebar a.active::after {
  content: '';
  width: 5px;
  height: 5px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent);
}

.backup-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.85fr);
  gap: 16px;
  align-items: start;
}

.backup-panel {
  min-width: 0;
  overflow: hidden;
}

.backup-panel .section-header {
  min-height: 50px;
}

.backup-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 18px 18px 12px;
  margin: 0;
}

.backup-stat {
  display: grid;
  min-height: 66px;
  align-content: center;
  gap: 5px;
  padding: 10px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: #fafbf8;
}

.backup-stat span {
  color: var(--text-soft);
  font-size: 9.5px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1;
  text-transform: uppercase;
}

.backup-stat strong {
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 22px;
  font-weight: 680;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.backup-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 18px 18px;
  border-top: 1px solid var(--border-soft);
}

.backup-action-row--end {
  justify-content: flex-end;
  padding: 4px 0 0;
  border-top: 0;
}

.backup-note {
  margin: 0;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.backup-warning {
  padding: 9px 11px;
  border: 1px solid #ead9ae;
  border-radius: 8px;
  background: #fffaf0;
  color: #87651b;
}

.backup-restore-form {
  display: grid;
  gap: 16px;
  padding: 18px;
}

.backup-restore-form .form-field-label {
  gap: 7px;
}

.backup-restore-form select {
  min-height: 42px;
}

.backup-readonly-note {
  padding: 22px 18px;
}

.backup-readonly-note p {
  margin: 0;
}

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

@media (max-width: 520px) {
  .backup-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .backup-action-row {
    align-items: stretch;
    flex-direction: column;
  }

  .backup-action-row .transfer-button {
    width: 100%;
  }
}

/* ── Phase 1 product polish: accessible framing + resilient data views ───── */
.skip-link {
  position: fixed;
  top: 10px;
  left: 12px;
  z-index: 500;
  padding: 9px 12px;
  border: 1px solid var(--accent-strong);
  border-radius: var(--radius);
  background: var(--text-strong);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  transform: translateY(-180%);
  transition: transform 0.16s ease;
}

.skip-link:focus {
  transform: translateY(0);
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 26%, transparent);
}

#main-content:focus {
  outline: none;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-color: var(--border-strong) transparent;
}

.table-wrap table {
  min-width: 620px;
}

.activity-mobile-list {
  display: none;
}

.activity-mobile-card {
  gap: 12px;
}

.activity-mobile-when,
.activity-mobile-entity {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.activity-mobile-when time {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.activity-mobile-entity strong {
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.activity-mobile-details {
  padding-top: 4px;
  border-top: 1px solid var(--border-soft);
}

.activity-mobile-details div {
  display: grid;
  grid-template-columns: 70px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.activity-mobile-details strong {
  min-width: 0;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 550;
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .page-header {
    align-items: stretch;
    gap: 14px;
  }

  .page-header .page-actions {
    width: 100%;
    justify-content: flex-start;
  }

  .page-header .page-actions > * {
    max-width: 100%;
  }

  .toolbar-filters {
    align-items: stretch;
  }

  .toolbar-filters > input,
  .toolbar-filters > select,
  .toolbar-filters > button,
  .toolbar-filters > a {
    width: 100%;
  }

  .table-wrap {
    display: block !important;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap.has-mobile-cards {
    display: none !important;
  }

  .activity-mobile-list {
    display: grid;
    padding: 12px;
    background: var(--page-bg);
  }

  .activity-mobile-list .module-empty-state {
    min-height: 150px;
    padding: 24px 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .skip-link {
    transition: none;
  }
}

/* ── Activity history table ──────────────────────────────────────────────── */
.activities-table {
  table-layout: fixed;
  width: 100%;
}

.activities-table th,
.activities-table td {
  vertical-align: middle;
}

.activities-table th {
  white-space: nowrap;
}

.activities-table .activity-col-when {
  width: 142px;
  text-align: center;
}

.activities-table .activity-col-actor {
  width: 132px;
  text-align: center;
}

.activities-table .activity-col-action {
  width: 112px;
  text-align: center;
}

.activities-table .activity-col-entity {
  width: 245px;
  text-align: left;
}

.activities-table .activity-col-details {
  text-align: left;
  overflow-wrap: anywhere;
}

.activities-table .activity-col-when time,
.activities-table .activity-col-actor,
.activities-table .activity-col-action {
  font-variant-numeric: tabular-nums;
}

.activities-table .activity-col-when .muted-meta {
  margin-top: 3px;
}

.activities-table .status-pill {
  justify-content: center;
  min-width: 72px;
}

.activity-empty-state {
  min-height: 190px;
}

@media (max-width: 760px) {
  .activities-table {
    table-layout: auto;
  }

  .activities-table .activity-col-when {
    width: 120px;
  }

  .activities-table .activity-col-actor,
  .activities-table .activity-col-action {
    width: auto;
  }
}

@media (max-width: 560px) {
  .activities-table tr > th:nth-child(4),
  .activities-table tr > td:nth-child(4) {
    display: none;
  }

  .activities-table .activity-col-when {
    width: 112px;
  }
}

/* ── Unified settings and account controls ───────────────────────────────── */
.settings-layout {
  gap: 18px;
}

.settings-card .section-header {
  min-height: 50px;
}

.settings-card .section-header + .settings-section-body {
  min-height: 148px;
}

.settings-card .section-header h2,
.project-settings-section h2,
.profile-form-title {
  font-family: var(--display);
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 720;
  letter-spacing: -0.02em;
}

.settings-card .section-header + .settings-section-body + .section-header {
  margin-top: 0;
}

.settings-card .muted-meta,
.profile-form-description {
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
}

.settings-card .secondary-button,
.settings-card .danger-button,
.project-settings-form .primary-button,
.project-settings-form .secondary-button,
.project-settings-form .danger-button,
.profile-settings-section .primary-button,
.profile-settings-section .secondary-button,
.profile-settings-section .danger-button {
  min-height: 38px;
  height: 38px;
  padding: 0 13px;
  font-size: 12px;
  line-height: 1;
  text-transform: none;
  letter-spacing: 0;
}

.settings-inline-action {
  align-self: flex-start;
}

.settings-role-form {
  min-height: 36px;
}

.settings-role-form select {
  height: 36px;
  min-height: 36px;
  padding-top: 0;
  padding-bottom: 0;
  font-size: 12px;
}

.settings-role-form .secondary-button {
  height: 36px;
  min-height: 36px;
}

.settings-directory-table th {
  white-space: nowrap;
}

.settings-directory-table td:last-child {
  width: 92px;
  text-align: right;
}

.project-settings-form {
  padding: 24px;
}

.project-settings-form > label,
.profile-field {
  display: grid;
  align-content: start;
  gap: 7px;
}

.project-settings-form > label,
.project-settings-form .settings-subheader,
.profile-form-section {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.project-settings-form textarea,
.project-settings-form input,
.project-settings-form select,
.profile-form .text-input,
.profile-form input {
  margin: 0;
}

.project-settings-form .form-actions {
  justify-content: flex-end;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--border-soft);
}

.project-settings-form .form-actions .primary-button {
  min-width: 128px;
}

.settings-links-section {
  padding: 4px 0 2px;
}

.permission-callout {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0 0 16px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.permission-callout svg {
  flex: 0 0 auto;
  margin-top: 1px;
  color: var(--accent);
}

.project-settings-form--readonly input:disabled,
.project-settings-form--readonly textarea:disabled,
.project-settings-form--readonly select:disabled {
  opacity: 0.8;
  cursor: not-allowed;
}

.backup-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 10px 11px;
  border: 1px solid color-mix(in srgb, var(--warning) 38%, var(--border));
  border-radius: var(--radius);
  background: #fff9eb;
  color: #6e5110;
  font-size: 11.5px;
  line-height: 1.45;
}

.backup-confirmation input {
  width: 15px;
  height: 15px;
  min-height: 0;
  flex: 0 0 auto;
  margin-top: 1px;
  accent-color: var(--warning);
}

.backup-action-row button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.rpt-kpi small {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 650;
}

.report-metric-note {
  margin: -4px 18px 14px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

.report-metric-note--run-history {
  margin-bottom: 20px;
}

.settings-link-row > a {
  font-size: 12px;
  line-height: 1.45;
}

.profile-settings-section {
  margin-bottom: 16px;
}

.profile-settings-body {
  padding: 24px;
}

.profile-form-section {
  display: grid;
  gap: 0;
}

.profile-form-title {
  margin: 0;
}

.profile-form-description {
  margin: 6px 0 0;
}

.profile-form {
  display: grid;
  gap: 16px;
  margin-top: 22px;
}

.profile-form .form-label {
  display: block;
  margin: 0;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.profile-form .text-input,
.profile-delete-confirm .text-input {
  width: 100%;
  min-height: 42px;
  margin-top: 7px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: none;
  font-size: 13px;
}

.profile-form .text-input:focus,
.profile-delete-confirm .text-input:focus {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
  outline: none;
}

.input-error {
  display: grid;
  gap: 3px;
  margin: 6px 0 0;
  padding: 0;
  color: var(--danger);
  font-size: 11.5px;
  list-style: none;
}

.profile-form-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 38px;
  padding-top: 3px;
}

.profile-form-actions--end {
  justify-content: flex-end;
}

.profile-form-actions p {
  margin: 0;
  color: var(--success);
  font-size: 12px;
}

.profile-delete-confirm {
  display: grid;
  gap: 14px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #f1b6b6;
  border-radius: 11px;
  background: #fff7f7;
}

.profile-delete-confirm .profile-form-title {
  font-size: 14px;
}

.profile-delete-confirm .profile-form-description {
  margin-top: -6px;
}

.profile-delete-confirm .profile-form-actions {
  padding-top: 4px;
}

.profile-settings-section .danger-button {
  background: #b83f3b;
  border-color: #b83f3b;
  color: #fff;
}

.profile-settings-section .danger-button:hover:not(:disabled) {
  background: #96322f;
  border-color: #96322f;
}

@media (max-width: 640px) {
  .project-settings-form,
  .profile-settings-body {
    padding: 18px;
  }

  .settings-role-form {
    min-width: 190px;
  }

  .profile-form-actions--end {
    justify-content: stretch;
  }

  .profile-form-actions--end .secondary-button,
  .profile-form-actions--end .danger-button {
    flex: 1;
  }
}

/* ==========================================================================
   24. QUIET CONTROL ROOM PASS
   A warmer, more editorial surface for daily QA work. Structural classes
   stay unchanged so all Blade pages retain their existing behavior.
   ========================================================================== */

body {
  background: var(--page-bg);
  color: var(--text-muted);
}

.app-shell {
  background:
    linear-gradient(90deg, rgba(19, 120, 110, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--page-bg);
}

.topbar {
  height: 64px;
  padding: 0 28px;
  border-bottom-color: var(--border);
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 1px 0 rgba(24, 34, 31, 0.025);
  backdrop-filter: blur(12px);
}

.brand {
  gap: 10px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.015em;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.topnav {
  gap: 4px;
  margin-left: 12px;
}

.topnav a,
.project-sidebar a {
  min-height: 36px;
  height: 36px;
  border-radius: 8px;
  font-size: 12px;
  letter-spacing: 0.005em;
}

.topnav a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.topnav a:hover:not(.active),
.project-sidebar a:hover:not(.active) {
  background: rgba(237, 243, 239, 0.8);
}

.topbar-actions {
  gap: 10px;
}

.user-pill {
  height: 38px;
  padding-right: 10px;
  border-color: var(--border);
  background: rgba(255, 254, 250, 0.8);
  box-shadow: none;
}

.user-pill:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.workspace {
  width: min(1320px, calc(100% - 32px));
}

.project-sidebar {
  top: 64px;
  height: calc(100svh - 64px);
  width: 214px;
  padding: 28px 16px 28px 0;
  border-right-color: var(--border-soft);
}

.project-context {
  margin-bottom: 20px;
  padding: 12px 14px;
  border-color: var(--border);
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.78);
  box-shadow: none;
}

.project-context span,
.metric-card span,
.bar-metric-label {
  color: var(--text-soft);
}

.project-context strong {
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.project-sidebar nav {
  gap: 5px;
}

.project-sidebar a {
  justify-content: flex-start;
  padding-left: 14px;
}

.project-sidebar a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-weight: 700;
}

.content {
  padding: 36px 24px 56px;
}

.page-header {
  margin-bottom: 28px;
  gap: 24px;
}

.page-header h1 {
  font-family: var(--display);
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.page-header p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
  max-width: 620px;
}

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

.primary-button,
.secondary-button,
.danger-button {
  min-height: 40px;
  border-radius: 9px;
  font-size: 12.5px;
  letter-spacing: 0.005em;
}

.primary-button {
  box-shadow: 0 2px 0 rgba(11, 95, 88, 0.13);
}

.primary-button:hover:not(:disabled) {
  transform: translateY(-1px);
}

.panel {
  border-color: var(--border);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 1px 2px rgba(24, 34, 31, 0.035), 0 8px 24px rgba(24, 34, 31, 0.035);
}

.section-header {
  min-height: 52px;
  padding: 14px 18px;
  border-bottom-color: var(--border-soft);
}

.section-header h2 {
  font-family: var(--display);
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.toolbar {
  padding: 14px 18px;
  background: rgba(250, 251, 248, 0.86);
  border-bottom-color: var(--border-soft);
}

input,
select,
textarea {
  min-height: 40px;
  border-color: var(--border-strong);
  border-radius: 9px;
  background-color: var(--surface);
}

table thead th {
  color: var(--text-soft);
  background: #f7f9f6;
  font-size: 10px;
  letter-spacing: 0.08em;
}

table tbody tr:hover {
  background: #f8faf7;
}

.metric-grid {
  gap: 14px;
}

.metric-card {
  padding: 16px;
  border-color: var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.metric-card-value {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 680;
  line-height: 1.05;
  letter-spacing: -0.045em;
  color: var(--text-strong);
}

.metric-card-context {
  font-size: 11.5px;
  font-weight: 500;
  color: var(--text-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Tone-colored icon chips so each stat reads at a glance */
.metric-card--success .metric-card-icon { background: var(--status-passed-bg); color: var(--status-passed-fg); }
.metric-card--warning .metric-card-icon { background: var(--status-pending-bg); color: var(--status-pending-fg); }
.metric-card--danger .metric-card-icon  { background: var(--status-failed-bg); color: var(--status-failed-fg); }
.metric-card--neutral .metric-card-icon { background: var(--accent-soft); color: var(--accent-strong); }
.metric-card--danger .metric-card-value { color: var(--status-failed-fg); }

.dashboard-details-grid {
  gap: 14px;
}

.dashboard-detail-panel .section-header {
  background: rgba(250, 251, 248, 0.45);
}

.dashboard-list-item {
  padding: 13px 18px;
  border-bottom-color: var(--border-soft);
}

.list-item-title {
  font-size: 13px;
  font-weight: 650;
}

.list-item-meta {
  color: var(--text-muted);
  font-size: 11.5px;
}

.quick-actions {
  gap: 10px;
}

.quick-action-card {
  min-height: 92px;
  justify-content: center;
  border-color: var(--border);
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.72);
  color: var(--text-muted);
}

.quick-action-card:hover {
  background: var(--surface);
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  color: var(--text-strong);
  transform: translateY(-1px);
}

.qa-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
}

.dashboard-empty {
  min-height: 280px;
  border-color: var(--border-strong);
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.62);
}

.auth-backdrop {
  position: relative;
  overflow: hidden;
  background: var(--page-bg);
}

.auth-backdrop::before {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.4;
  pointer-events: none;
  background-image: linear-gradient(90deg, rgba(19, 120, 110, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

.auth-card {
  position: relative;
  max-width: 430px;
  padding: 38px;
  border-color: var(--border);
  border-radius: 18px;
  border-top: 3px solid var(--accent);
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow-lg);
}

.auth-brand {
  gap: 10px;
  margin-bottom: 26px;
  font-family: var(--display);
  font-size: 14px;
  letter-spacing: -0.01em;
}

.auth-title {
  margin-bottom: 24px;
  font-family: var(--display);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-form {
  gap: 16px;
}

.auth-form label {
  gap: 7px;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
}

.auth-form input[type='email'],
.auth-form input[type='password'],
.auth-form input[type='text'] {
  min-height: 44px;
  border-color: var(--border-strong);
  border-radius: 9px;
  font-size: 14px;
}

.auth-form input::placeholder {
  color: #9aa59f;
}

.auth-submit {
  min-height: 46px;
  margin-top: 6px;
  font-size: 13px;
}

@media (max-width: 820px) {
  .topbar {
    padding: 0 18px;
  }

  .workspace {
    width: min(100% - 24px, 720px);
  }

  .content {
    padding: 28px 16px 44px;
  }
}

@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 14px;
  }

  .topnav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-top: 4px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .topnav a {
    flex: 0 0 auto;
  }

  .user-pill-name,
  .user-pill .role-badge {
    display: none;
  }

  .project-sidebar {
    top: 0;
    height: auto;
    width: 100%;
    padding: 12px 0 0;
    border-right: 0;
  }

  .project-sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .project-sidebar nav::-webkit-scrollbar {
    display: none;
  }

  .project-sidebar a {
    flex: 0 0 auto;
  }

  .content {
    padding-top: 24px;
  }

  .page-header h1 {
    font-size: 27px;
  }

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

  .auth-card {
    padding: 30px 24px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .metric-card:hover,
  .quick-action-card:hover,
  .primary-button:hover:not(:disabled) {
    transform: none;
  }
}

/* Pagination bar */
.table-pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--surface, #fff);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  flex-wrap: wrap;
}

.table-pagination .pagination-nav,
.pagination-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 12px;
  flex-wrap: wrap;
}

.pagination-nav--simple {
  justify-content: flex-end;
}

.pagination-summary {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.4;
}

.pagination-summary strong,
.pagination-summary-bold {
  font-weight: 650;
  color: var(--text-strong);
}

.pagination-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pagination-pages {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.pagination-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 32px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 13px;
  font-weight: 550;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  user-select: none;
  box-sizing: border-box;
}

.pagination-btn:hover:not(.pagination-btn--disabled):not(.pagination-btn--active) {
  background: var(--soft-bg);
  border-color: var(--border-strong);
  color: var(--text-strong);
}

.pagination-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.pagination-btn--page {
  min-width: 32px;
  padding: 0 6px;
}

.pagination-btn--active {
  background: var(--accent) !important;
  border-color: var(--accent) !important;
  color: #fff !important;
  font-weight: 700;
  cursor: default;
}

.pagination-btn--disabled {
  opacity: 0.45;
  cursor: not-allowed;
  background: var(--surface);
  border-color: var(--border);
  color: var(--text-soft);
  pointer-events: none;
}

.pagination-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 32px;
  color: var(--text-soft);
  font-size: 13px;
  user-select: none;
}

.pagination-icon,
.table-pagination svg,
.pagination-nav svg,
.pagination-actions svg,
.pagination-btn svg {
  width: 14px !important;
  height: 14px !important;
  min-width: 14px !important;
  min-height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
  display: block;
  flex-shrink: 0;
}

.rows-per-page {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.rows-per-page select {
  height: 36px;
  width: auto;
  min-width: 82px;
  border-radius: 6px;
  font-size: 13px;
}

.pagination-actions .icon-button {
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
}

.page-indicator {
  min-width: 40px;
  text-align: center;
  font-weight: 600;
  color: var(--text-strong);
}

/* Global safeguards against unconstrained SVGs or Tailwind pagination artifacts */
svg.w-5,
svg.h-5,
svg.w-4,
svg.h-4,
svg.w-6,
svg.h-6,
nav[role="navigation"] svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.w-4 { width: 1rem !important; }
.h-4 { height: 1rem !important; }
.w-5 { width: 1.25rem !important; }
.h-5 { height: 1.25rem !important; }
.w-6 { width: 1.5rem !important; }
.h-6 { height: 1.5rem !important; }

@media (max-width: 540px) {
  .pagination-nav {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
  .pagination-summary {
    text-align: center;
  }
  .pagination-btn-label {
    display: none;
  }
  .pagination-btn--prev,
  .pagination-btn--next {
    padding: 0 8px;
  }
}

/* Ensure closed HTML5 <details> elements never leak content overridden by author display rules (e.g. .form-grid) */
details:not([open]) > :not(summary) {
  display: none !important;
}

/* Empty states */
.empty-table-row,
.panel-empty-text {
  padding: 56px 32px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  background: #fafbfb;
}

/* Flex column layout only when the empty state is a block element (e.g. a
   <div>). Applying display:flex to a <td> collapses the table cell to its
   minimum width and makes the text wrap one character per line, so table-cell
   empty rows stay as normal centered cells. */
div.empty-table-row,
.panel-empty-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.empty-table-row td {
  border-bottom: 0;
  background: #fafbfb;
}

td.empty-table-row {
  border-bottom: 0;
  background: #fafbfb;
  padding: 48px 24px;
}

/* ── 8. BADGES, PILLS, & TEXT TRUNCATION ───────────────────────────────── */
.status-pill,
.priority-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 84px;
  min-height: 24px;
  padding: 0 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  border: 1px solid transparent;
}

.priority-badge {
  min-width: 72px;
}

.status-pill--passed       { background: var(--status-passed-bg); color: var(--status-passed-fg); border-color: var(--status-passed-border); }
.status-pill--failed       { background: var(--status-failed-bg); color: var(--status-failed-fg); border-color: var(--status-failed-border); }
.status-pill--pending      { background: var(--status-pending-bg); color: var(--status-pending-fg); border-color: var(--status-pending-border); }
.status-pill--skipped      { background: var(--status-skipped-bg); color: var(--status-skipped-fg); border-color: var(--status-skipped-border); }
.status-pill--blocker      { background: var(--status-blocker-bg); color: var(--status-blocker-fg); border-color: var(--status-blocker-border); }
.status-pill--reported     { background: var(--status-reported-bg); color: var(--status-reported-fg); border-color: var(--status-reported-border); }
.status-pill--clarification{ background: var(--status-clarification-bg); color: var(--status-clarification-fg); border-color: var(--status-clarification-border); }
.status-pill--inprogress   { background: var(--status-inprogress-bg); color: var(--status-inprogress-fg); border-color: var(--status-inprogress-border); }
.status-pill--hold         { background: var(--status-hold-bg); color: var(--status-hold-fg); border-color: var(--status-hold-border); }
.status-pill--neutral      { background: var(--soft-bg); color: var(--text-muted); border-color: var(--border-strong); }

/* Status text colors (used in case list, layout bar, etc.) */
.status-text--passed       { color: var(--status-passed-fg); }
.status-text--failed       { color: var(--status-failed-fg); }
.status-text--blocker      { color: var(--status-failed-fg); }
.status-text--pending      { color: var(--text-muted); }
.status-text--skipped      { color: var(--status-skipped-fg); }
.status-text--reported     { color: var(--status-reported-fg); }
.status-text--clarification{ color: var(--status-clarification-fg); }
.status-text--inprogress   { color: var(--status-inprogress-fg); }
.status-text--hold         { color: var(--status-hold-fg); }

.priority-high { background: var(--priority-high-bg); color: var(--priority-high-fg); border-color: var(--priority-high-border); }
.priority-med,
.priority-medium { background: var(--priority-med-bg); color: var(--priority-med-fg); border-color: var(--priority-med-border); }
.priority-low  { background: var(--priority-low-bg); color: var(--priority-low-fg); border-color: var(--priority-low-border); }
.priority-none { background: var(--soft-bg); color: var(--text-soft); border-color: var(--border); }

/* Title Cell to allow clean wrap in tables */
.title-cell {
  white-space: normal !important;
  word-break: break-word;
  max-width: 360px;
}
.title-cell a,
.title-cell button {
  white-space: normal !important;
  text-align: left;
}

/* Ellipsis helper */
.tc-title-cell,
.linked-tc-cell {
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tc-title-cell a,
.linked-tc-title,
.bug-title-link,
.link-btn {
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
  transition: opacity 0.15s;
}

.tc-title-cell a:hover,
.linked-tc-title:hover,
.bug-title-link:hover,
.link-btn:hover {
  text-decoration: underline;
}

.tc-id {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  white-space: nowrap;
}

/* Test Cases table — fixed layout keeps column widths (and therefore text
   wrapping) stable regardless of which rows a sort/page brings into view.
   Without this, auto layout re-measures columns per page and the wrap point
   shifts after sorting. */
.tc-table {
  table-layout: fixed;
  width: 100%;
}
/* Column widths — all percentages summing to 100% so the table
   fits the viewport with no horizontal scroll. */
.tc-col-check    { width: 4%; }
.tc-col-id       { width: 10%; }
.tc-col-title    { width: 24%; }
.tc-col-module   { width: 12%; }
.tc-col-priority { width: 10%; }
.tc-col-assignee { width: 10%; }
.tc-col-status   { width: 15%; }
.tc-col-actions  { width: 15%; }

/* Checkbox cells — centered both horizontally and vertically */
.tc-table .checkbox-th,
.tc-table .checkbox-td {
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}
.tc-table .checkbox-th input[type="checkbox"],
.tc-table .checkbox-td input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  vertical-align: middle;
}
/* ID cell — monospace, no wrap, safely truncate if exceeding column width */
.tc-table td.mono,
.tc-table td.tc-id-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
}
/* Wrap normal text consistently; break long strings at word boundaries. */
.tc-table td {
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;
  vertical-align: middle;
}
/* Keep pills/selects from stretching or clipping inside fixed-width columns. */
.tc-table .priority-badge { white-space: nowrap; }
.tc-table .inline-select,
.tc-table .status-select {
  width: 100%;
  max-width: 100%;
}

.tc-table .tc-priority-cell {
  padding-right: 10px;
}

.tc-table .tc-status-cell {
  padding-left: 10px;
}

/* Bug Tracker table — fixed layout keeps column widths stable after sorting.
   Mirrors tc-table approach but with bug-specific column widths. */
.bug-table {
  table-layout: fixed;
  width: 100%;
}
/* Percentage widths summing to 100% so the table fits the viewport (no
   horizontal scroll); long content wraps inside its cell. */
.bug-col-id       { width: 10%; }
.bug-col-title    { width: 24%; }
.bug-col-module   { width: 12%; }
.bug-col-severity { width: 13%; }
.bug-col-priority { width: 13%; }
.bug-col-status   { width: 14%; }
.bug-col-actions  { width: 14%; }

.bug-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: middle;
}
.bug-table td.mono.tc-id { white-space: nowrap; }
.bug-table .priority-badge { white-space: nowrap; }
.bug-table .inline-select,
.bug-table .status-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}


.inline-select {
  height: 28px;
  min-width: 90px;
  font-size: 11.5px;
  padding: 0 10px;
  width: auto;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-strong);
  font-weight: 650;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.inline-select:hover { border-color: var(--border-strong); box-shadow: 0 1px 3px rgba(23, 32, 31, 0.08); }
.inline-select:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--accent);
}

/* ── 9. DASHBOARD WIDGETS & DETAILS GRID ─────────────────────────────── */
.dashboard-details-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

.dashboard-detail-panel {
  display: flex;
  flex-direction: column;
}

.dashboard-detail-panel .panel-empty-text {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 32px;
}

@media (max-width: 640px) {
  .dashboard-details-grid {
    grid-template-columns: 1fr;
  }
}


.dashboard-list {
  display: flex;
  flex-direction: column;
}

.dashboard-list-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.dashboard-list-item:last-child {
  border-bottom: 0;
}

.list-item-main {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.list-item-id {
  font-size: 10px;
  color: var(--text-soft);
  background: var(--soft-bg);
  padding: 1px 4px;
  border-radius: 4px;
}

.list-item-title {
  color: var(--text-strong);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}

.list-item-title:hover {
  color: var(--accent);
}

.list-item-title-btn {
  text-align: left;
  border: 0;
  background: transparent;
  padding: 0;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
  cursor: pointer;
}

.list-item-title-btn:hover {
  color: var(--accent);
}

.list-item-badge {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-soft);
  background: var(--page-bg);
  padding: 1px 6px;
  border-radius: 4px;
  margin-left: auto;
}

.list-item-meta {
  display: flex;
  align-items: center;
  font-size: 11.5px;
  color: var(--text-soft);
}

.meta-project {
  font-weight: 600;
  color: var(--text-muted);
}

.quick-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.quick-action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  text-decoration: none;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 650;
  text-align: center;
  transition: border-color 0.15s, background 0.15s;
}

.quick-action-card:hover {
  border-color: var(--accent);
}

.qa-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
}

.dashboard-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 40px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: #fafbfb;
  text-align: center;
}

.dashboard-empty-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 14px;
}

.dashboard-empty h2 {
  margin: 0 0 6px;
  font-size: 16px;
  color: var(--text-strong);
}

.dashboard-empty p {
  margin: 0 0 20px;
  color: var(--text-muted);
  font-size: 13px;
  max-width: 320px;
}

/* ── 10. PROJECTS GRID & DETAILS ───────────────────────────────────────── */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: all 0.15s;
}

.project-card:hover {
  border-color: var(--border-strong);
}

.project-card h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}

.project-card p {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}

.progress-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.progress-cell span {
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.progress-track {
  width: 100%;
  height: 6px;
  background: var(--soft-bg);
  border-radius: 99px;
  overflow: hidden;
}

.progress-track span {
  display: block;
  height: 100%;
  background: var(--success);
  border-radius: inherit;
}

.avatar-row {
  display: flex;
  align-items: center;
  gap: -6px;
  flex-wrap: wrap;
}

.avatar {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border: 1.5px solid var(--surface);
  margin-left: -4px;
}

.avatar:first-child {
  margin-left: 0;
}

.card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ── 11. METRIC GRID & CARDS ────────────────────────────────────────────── */
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

@media (max-width: 760px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.metric-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
}

.metric-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

.metric-card-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--soft-bg);
  color: var(--text-soft);
}

.metric-card-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }

.metric-card span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.metric-card strong {
  font-size: 26px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.metric-card--success { border-left-color: var(--success); }
.metric-card--success strong { color: var(--success); }
.metric-card--danger  { border-left-color: var(--danger); }
.metric-card--danger  strong { color: var(--danger); }
.metric-card--warning { border-left-color: var(--warning); }
.metric-card--warning strong { color: var(--warning); }
.metric-card--accent  { border-left-color: var(--accent); }

/* ── 12. EXECUTIVE ACTION INSIGHTS & REPORTS POLISH ─────────────────────── */
.insights-panel {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
}

.insights-list {
  display: flex;
  flex-direction: column;
}

.insight-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

.insight-item:last-child {
  border-bottom: 0;
}

.insight-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.insight-item--danger .insight-badge-dot { background: var(--danger); }
.insight-item--warning .insight-badge-dot { background: var(--warning); }
.insight-item--info .insight-badge-dot { background: var(--accent); }
.insight-item--success .insight-badge-dot { background: var(--success); }

.insight-content strong {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
}

.insight-content p {
  margin: 2px 0 0;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

/* Reports Split page */
.report-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

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

.chart-panel--tall {
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.chart-split {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 16px 18px;
}
@media (max-width: 520px) {
  .chart-split { flex-direction: column; align-items: stretch; }
  .chart-split .pass-ring-wrap { align-self: center; }
}

.chart-bars {
  flex: 1;
  display: grid;
  gap: 8px;
}

.chart-bars--solo {
  padding: 14px 18px;
}

/* Horizontal Bar chart styling */
.chart-bar-row {
  display: grid;
  grid-template-columns: 92px minmax(80px, 1fr) 58px;
  align-items: center;
  gap: 8px;
}

.chart-bar-label {
  min-width: 0;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-bar-track {
  height: 8px;
  background: var(--soft-bg);
  border-radius: 4px;
  overflow: hidden;
}

.chart-bar-fill {
  height: 100%;
  border-radius: inherit;
  transition: width 0.2s ease;
}

.chart-bar-fill--passed   { background: var(--success); }
.chart-bar-fill--failed   { background: var(--danger); }
.chart-bar-fill--blocker  { background: #2d0000; }
.chart-bar-fill--skipped  { background: var(--text-soft); }
.chart-bar-fill--pending  { background: var(--warning); }

.bug-status-summary {
  display: flex;
  align-items: center;
  justify-content: space-around;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: #fbfcfc;
}

.bug-status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
}

.bsc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.bsc-dot--failed { background: var(--danger); }
.bsc-dot--pending { background: var(--warning); }
.bsc-dot--passed { background: var(--success); }

/* Donut rate ring */
.pass-ring-wrap {
  position: relative;
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
}

.pass-ring-svg {
  width: 110px;
  height: 110px;
  transform: rotate(-90deg);
}

.ring-track {
  fill: none;
  stroke: var(--soft-bg);
  stroke-width: 8;
}

.ring-fill {
  fill: none;
  stroke: var(--success);
  stroke-width: 8;
  stroke-linecap: round;
  transition: stroke-dasharray 0.4s ease;
}

.pass-ring-label {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
}

.pass-ring-label strong {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-strong);
}

.pass-ring-label span {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.report-health-content {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 16px 20px;
}

@media (max-width: 520px) {
  .report-health-content {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    padding: 16px;
  }
  .report-health-ring { display: flex; justify-content: center; }
}

.report-health-details h2 {
  margin: 0 0 2px;
  font-size: 16px;
  font-weight: 700;
}

.report-health-subtitle {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--text-soft);
}

.report-health-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.report-health-stat {
  display: flex;
  flex-direction: column;
}

.report-health-stat-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.report-health-stat strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-strong);
}

.report-health-title-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 2px;
}
.report-health-title-row h2 { margin: 0; }

/* Project-wise status cards (Global Reports section 2) */
.project-status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
.project-status-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
  transition: border-color 0.15s;
}
.project-status-card:hover { border-color: var(--border-strong); }
.psc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.psc-head h3 { margin: 0; font-size: 14px; font-weight: 700; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 0; }
.psc-passrate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
}
.psc-muted { color: var(--text-soft); font-weight: 500; }
.report-progress {
  height: 6px;
  border-radius: 999px;
  background: var(--soft-bg);
  overflow: hidden;
}
.report-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--success);
}
.psc-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px 6px;
  font-size: 10.5px;
  color: var(--text-soft);
}
.psc-metrics span { display: flex; flex-direction: column; }
.psc-metrics strong { font-size: 14px; font-weight: 750; color: var(--text-strong); }
.psc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}
.psc-action {
  font-size: 11.5px;
  color: var(--text-soft);
  border-top: 1px dashed var(--border);
  padding-top: 8px;
}

/* QA process summary (Global Reports section 3) */
.process-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
  padding: 12px 16px;
}
.process-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
}
.process-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  margin-bottom: 8px;
}
.process-empty { margin: 0; font-size: 12px; }
.process-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.process-chip {
  font-size: 11px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 2px 7px;
  color: var(--text-strong);
  text-decoration: none;
}
a.process-chip:hover { border-color: var(--accent); color: var(--accent); }
.process-chip--more { color: var(--text-soft); }

.module-risk-list {
  display: flex;
  flex-direction: column;
}

.module-risk-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
}

.module-risk-row:last-child {
  border-bottom: 0;
}

.module-risk-row strong {
  font-size: 13px;
  font-weight: 650;
  color: var(--text-strong);
}

.module-risk-row span {
  display: block;
  font-size: 11px;
  color: var(--text-soft);
}

/* Report-specific table helpers */
.rpt-table td { white-space: normal; }

/* Report tables responsive - scoped by table class */
@media (max-width: 640px) {
  /* Run history (10 cols): hide Build(3), Skip(8), By(10) */
  .rpt-run-history-table tr > th:nth-child(3),
  .rpt-run-history-table tr > td:nth-child(3),
  .rpt-run-history-table tr > th:nth-child(8),
  .rpt-run-history-table tr > td:nth-child(8),
  .rpt-run-history-table tr > th:nth-child(10),
  .rpt-run-history-table tr > td:nth-child(10) {
    display: none;
  }
  /* Module breakdown (7 cols): hide Open bugs(5) */
  .rpt-module-table tr > th:nth-child(5),
  .rpt-module-table tr > td:nth-child(5) {
    display: none;
  }
}
@media (max-width: 480px) {
  /* Run history: also hide Pass rate(9) */
  .rpt-run-history-table tr > th:nth-child(9),
  .rpt-run-history-table tr > td:nth-child(9) {
    display: none;
  }
  /* Module breakdown: also hide Pass rate(6) */
  .rpt-module-table tr > th:nth-child(6),
  .rpt-module-table tr > td:nth-child(6) {
    display: none;
  }
}
.rpt-table .progress-cell { min-width: 90px; }

/* ── Test Plans & Milestones tables ───────────────────────────────────── */
.tp-table {
  table-layout: fixed;
  width: 100%;
}
.tp-col-name    { width: 28%; }
.tp-col-runs    { width: 12%; }
.tp-col-progress { width: 20%; }
.tp-col-rate    { width: 14%; }
.tp-col-status  { width: 14%; }
.tp-col-actions { width: 12%; }

.ms-table {
  table-layout: fixed;
  width: 100%;
}
.ms-col-name    { width: 28%; }
.ms-col-due     { width: 16%; }
.ms-col-plans   { width: 10%; }
.ms-col-progress { width: 20%; }
.ms-col-track   { width: 14%; }
.ms-col-actions { width: 12%; }

.tp-table td,
.ms-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: middle;
}

.tp-table .req-progress-cell,
.ms-table .req-progress-cell {
  min-width: 0;
}

.tp-table .row-actions,
.ms-table .row-actions {
  width: auto;
}

/* ── Test Plans enhanced row styles ──────────────────────────────────── */
.tp-row { position: relative; }
.tp-row td:first-child { padding-left: 20px; }
.tp-row--active td:first-child::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--accent);
  border-radius: 0 2px 2px 0;
}
.tp-row--completed td:first-child::before {
  background: var(--success);
}
.tp-row-name {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tp-row-title {
  font-size: 13.5px;
  font-weight: 700;
  line-height: 1.3;
}
.tp-row-desc {
  margin: 0;
  font-size: 11.5px;
  color: var(--text-soft);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
  max-width: 360px;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.tp-row-tags {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tp-tag {
  display: inline-flex;
  align-items: center;
  padding: 1px 7px;
  border-radius: 4px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  font-size: 10.5px;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}
.tp-tag--pending {
  background: #fef8ec;
  color: #8a5a00;
  border-color: #fde68a;
}
.tp-tag--danger {
  background: #fef0f0;
  color: #a93030;
  border-color: #fecaca;
}
.tp-tag--neutral {
  background: var(--soft-bg);
  color: var(--text-muted);
}
.tp-rate-num {
  font-size: 14px;
  font-weight: 750;
  color: var(--text-strong);
}

/* ── Quick-complete status toggle ──────────────────────────── */
.tp-status-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 26px;
  padding: 0 8px 0 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: transparent;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.tp-status-toggle--open {
  color: var(--text-muted);
  border-color: var(--border);
}
.tp-status-toggle--open:hover {
  border-color: var(--success);
  color: var(--success);
  background: color-mix(in srgb, var(--success) 5%, transparent);
}

.tp-status-toggle--done {
  color: var(--success);
  border-color: var(--success);
  background: color-mix(in srgb, var(--success) 8%, transparent);
}
.tp-status-toggle--done:hover {
  background: #fef8ec;
  border-color: var(--warning);
  color: var(--warning);
}

.tp-status-toggle--sm {
  height: 22px;
  padding: 0 6px 0 4px;
  font-size: 9.5px;
}

/* ── Summary Metrics Strip ─────────────────────────────────────────────── */
.tp-summary-strip {
  display: flex;
  align-items: center;
  gap: 0;
  padding: 16px 20px;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.tp-summary-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  flex: 1;
  min-width: 0;
  padding: 0 16px;
}
.tp-summary-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.tp-summary-value {
  font-size: 24px;
  font-weight: 800;
  color: var(--text-strong);
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.tp-summary-value--rate { color: var(--accent); }
.tp-summary-sub {
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
}
.tp-summary-divider {
  width: 1px;
  height: 36px;
  background: var(--border);
  flex-shrink: 0;
}

/* ── Segmented progress bar ──────────────────────────────────────────────── */
.seg-progress {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 90px;
}
.seg-bar {
  height: 8px;
  border-radius: 4px;
  background: var(--border);
  overflow: hidden;
  display: flex;
}
.seg-pass  { height: 100%; background: #1a6b37; flex-shrink: 0; }
.seg-fail  { height: 100%; background: #a93030; flex-shrink: 0; }
.seg-block { height: 100%; background: #b45309; flex-shrink: 0; }
.seg-pct   { font-size: 11px; color: var(--text-muted); }
.seg-no-scope { font-size: 11px; color: var(--text-muted); font-style: italic; }

/* ── Status breakdown chips ──────────────────────────────────────────────── */
.tp-row-breakdown {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 4px;
}
.tp-bd {
  font-size: 10.5px;
  padding: 1px 7px;
  border-radius: 10px;
  font-weight: 600;
  white-space: nowrap;
}
.tp-bd--pass  { background: #e9f7ee; color: #1a6b37; }
.tp-bd--fail  { background: #fef0f0; color: #a93030; }
.tp-bd--block { background: #fbe3e3; color: #7f1d1d; }
.tp-bd--bug   { background: #ede9fe; color: #6d28d9; }

/* Tab count badge */
.tab-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  line-height: 1;
}
.tab-btn--active .tab-count-badge {
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
  color: var(--accent);
}

/* ── Tab navigation */
.tab-navigation {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  width: fit-content;
  margin-bottom: 24px;
  border-bottom: 2px solid var(--border);
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 42px;
  padding: 0 12px;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 0;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  margin-bottom: -2px;
}

.tab-btn:hover:not(.tab-btn--active) {
  background: transparent;
  color: var(--text-strong);
}

.tab-btn--active {
  border: none;
  border-bottom: 2px solid var(--accent);
  background: transparent;
  color: var(--accent);
  box-shadow: none;
}

/* Test Plans page card view (mobile) */
.tp-card-list {
  display: none;
}

@media (max-width: 640px) {
  .tp-table-wrap .tp-table,
  .ms-table-wrap .ms-table {
    display: none;
  }
  .tp-card-list {
    display: flex;
    flex-direction: column;
  }
  .tp-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
  }
  .tp-card:last-child {
    border-bottom: 0;
  }
  .tp-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
  }
  .tp-card-name {
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.3;
  }
  .tp-card-desc {
    margin: 2px 0 0;
    font-size: 12px;
    color: var(--text-soft);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  .tp-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 14px;
    font-size: 12px;
    color: var(--text-muted);
  }
  .tp-card-meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
  }
  .tp-card-meta-label {
    font-size: 10px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.03em;
  }
  .tp-card-actions {
    display: flex;
    gap: 6px;
    margin-top: 4px;
  }
  .tp-card-actions .secondary-button {
    min-height: 32px;
    padding: 4px 12px;
    font-size: 12px;
  }
  .tp-card-progress {
    margin-top: 2px;
  }
}

/* ── Test Plans page responsive ───────────────────────────────────────── */
@media (max-width: 820px) {
  .tab-navigation {
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tab-navigation::-webkit-scrollbar {
    display: none;
  }
  .tab-btn {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 640px) {
  .tp-summary-strip {
    flex-wrap: wrap;
    gap: 12px;
    padding: 14px 16px;
  }
  .tp-summary-divider {
    display: none;
  }
  .tp-summary-card {
    flex: 0 0 calc(50% - 6px);
    min-width: 0;
    padding: 8px 0;
  }
  .tp-row td:first-child { padding-left: 12px; }
  .tp-row-desc { display: none; }
}

@media (max-width: 520px) {
  .tab-btn {
    padding: 0 10px;
    font-size: 12px;
  }
  .tp-summary-value {
    font-size: 20px;
  }
}

/* Module breakdown table compact widths */
.rpt-mod-col-cases   { width: 56px; }
.rpt-mod-col-pass    { width: 50px; }
.rpt-mod-col-fail    { width: 64px; }
.rpt-mod-col-bugs    { width: 64px; }
.rpt-mod-col-rate    { width: 140px; }
.rpt-mod-col-status  { width: 72px; }

/* Run history table compact widths */
.rpt-run-col-total   { width: 50px; }
.rpt-run-col-pass    { width: 50px; }
.rpt-run-col-fail    { width: 50px; }
.rpt-run-col-block   { width: 56px; }
.rpt-run-col-skip    { width: 50px; }
.rpt-run-col-rate    { width: 130px; }

/* ── 13. DETAILED VIEW LAYOUTS ─────────────────────────────────────────── */
.detail-layout {
  display: grid;
  grid-template-columns: 1fr 280px;
  gap: 18px;
  align-items: start;
}

.detail-main {
  background: var(--surface);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-aside {
  background: var(--surface);
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.detail-aside dl > div {
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}

.detail-aside dl > div:last-child {
  padding-bottom: 0;
  border-bottom: none;
}

.detail-aside .mt-md {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: center;
}

.detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.detail-title-row h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
}

.detail-content-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 10px;
}

.detail-block {
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
}

.detail-block h3 {
  margin: 0 0 6px 0;
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.detail-block p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-strong);
  line-height: 1.5;
}

@media (max-width: 640px) {
  .detail-content-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

/* TestCase steps view */
.step-list {
  counter-reset: qa-step;
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.step-list li {
  counter-increment: qa-step;
  display: grid;
  grid-template-columns: 24px 1fr;
  align-items: start;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.step-list li::before {
  content: counter(qa-step);
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 6px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10.5px;
  font-weight: 700;
}

.detail-aside dl {
  margin: 0;
  display: grid;
  gap: 14px;
}

.detail-aside dt {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.detail-aside dd {
  margin: 2px 0 0;
  font-size: 13px;
  color: var(--text-strong);
}

/* Steps Builder inside Form */
.step-builder {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.step-row {
  display: grid;
  grid-template-columns: 20px 1fr 30px;
  align-items: center;
  gap: 8px;
}

.step-num {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-align: center;
}

.step-remove {
  width: 30px;
  height: 30px;
}

.step-add {
  min-height: 32px;
  padding: 0 12px;
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--text-muted);
  border-radius: 8px;
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}

.step-add:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Bug details logs */
.bug-desc {
  margin: 4px 0 0;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.4;
  white-space: normal;
  word-break: break-word;
}

.bug-history {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.bug-history h3 {
  font-size: 13px;
  font-weight: 700;
  margin: 0 0 8px;
  color: var(--text-strong);
}

.history-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.history-entry {
  display: flex;
  flex-direction: column;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--page-bg);
  font-size: 12px;
}

.history-details {
  color: var(--text-strong);
}

.history-meta {
  font-size: 10px;
  color: var(--text-soft);
}

/* ── 14. SETTINGS PAGE (REFRACTORED TWO-COLUMN) ────────────────────────── */
.member-management-panel {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

.section-subtitle {
  display: block;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 12px;
}

.settings-member-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.settings-member-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.settings-member-item .member-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-member-item .member-name {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-strong);
}

.member-remove-btn {
  display: grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.15s;
}

.member-remove-btn:hover {
  background: #fef0f0;
  color: var(--danger);
}

.assign-controls {
  display: grid;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.control-group {
  display: grid;
  gap: 6px;
}

.control-group label {
  margin-bottom: 0;
}

.input-with-button {
  display: flex;
  gap: 8px;
}

.input-with-button input {
  flex: 1;
}

.danger-zone-panel {
  border-color: #fca5a5;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.02);
}

.danger-zone-panel .section-header {
  border-bottom-color: #fee2e2;
  background: #fff8f8;
}

.danger-zone-panel .section-header h2 {
  color: var(--danger);
}

.danger-body {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 20px;
}

.danger-text strong {
  display: block;
  font-size: 14px;
  color: var(--text-strong);
}

.danger-text p {
  margin: 2px 0 0;
  font-size: 12.5px;
  color: var(--text-soft);
}

/* ── 15. BACKUP PAGE ───────────────────────────────────────────────────── */
.backup-layout {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
  gap: 16px;
}

.backup-panel {
  padding: 16px;
}

.backup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
  gap: 8px;
  margin: 16px 0;
}

.backup-summary-grid article {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
  text-align: center;
}

.backup-summary-grid span {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.backup-summary-grid strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-strong);
}

.backup-note {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
  margin: 12px 0 0;
}

.backup-sync-note {
  margin: 10px 0 4px;
  padding: 8px 12px;
  border-radius: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  font-size: 12px;
  line-height: 1.5;
}

.backup-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100px;
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  background: transparent;
  padding: 16px;
  cursor: pointer;
  width: 100%;
}

.backup-dropzone:hover {
  border-color: var(--accent);
}

.backup-dropzone strong {
  font-size: 13px;
  color: var(--text-strong);
}

.backup-dropzone span {
  font-size: 11px;
  color: var(--text-soft);
}

.backup-dropzone input {
  display: none;
}

.backup-alert {
  margin: 12px 0;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
}

.backup-alert--danger { background: #fef0f0; color: var(--danger); border: 1px solid #fecaca; }
.backup-alert--success { background: #e9f7ee; color: var(--success); border: 1px solid #c4e8d0; }

.restore-preview {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.restore-preview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.restore-preview-header span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
}

.restore-preview-header strong {
  display: block;
  font-size: 13px;
}

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

.restore-mode label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
  cursor: pointer;
}

.restore-mode input {
  width: 14px;
  height: 14px;
  margin-top: 2px;
}

.restore-mode strong {
  display: block;
  font-size: 13px;
  color: var(--text-strong);
}

.restore-mode span span {
  font-size: 11.5px;
  color: var(--text-muted);
}

.restore-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}
.restore-actions .primary-button,
.restore-actions .secondary-button {
  min-width: 0;
  flex-shrink: 1;
}

/* ── 16. MODALS & DIALOGS ──────────────────────────────────────────────── */
.modal-backdrop,
.name-picker-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(200, 210, 208, 0.45);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 48px 24px 24px;
  z-index: 1000;
  animation: fade-in 0.2s ease;
  overflow-y: auto;
}

.modal {
  width: 100%;
  max-width: 640px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 8px 40px rgba(23, 32, 31, 0.18), 0 2px 8px rgba(23, 32, 31, 0.08);
  overflow: hidden;
  max-height: calc(100dvh - 96px);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  animation: modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal--wide {
  max-width: 860px;
}

.modal .test-case-create-modal-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  overflow-y: auto;
  padding: 18px;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.modal-header h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 750;
  color: var(--text-strong);
  line-height: 1.3;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 0;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  border-radius: 6px;
  flex: 0 0 auto;
}

.modal-close:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
}

.modal-close:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.modal-close--highlight {
  outline: 2px solid var(--danger);
  outline-offset: 2px;
  background: #fef2f2;
  color: var(--danger);
  animation: modal-close-pulse 0.2s ease-in-out alternate 4;
}

@keyframes modal-close-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(187, 59, 55, 0);
  }
  100% {
    transform: scale(1.22);
    box-shadow: 0 0 0 4px rgba(187, 59, 55, 0.18);
  }
}

.modal-form {
  overflow-y: auto;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface);
}

@media (max-width: 480px) {
  .modal-footer {
    flex-direction: column-reverse;
  }
  .modal-footer > button {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .test-case-create-modal-form {
    grid-template-columns: 1fr;
  }
}

/* Welcome name picker */
.name-picker {
  background: var(--surface);
  padding: 32px;
  border-radius: 16px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  text-align: center;
  animation: modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.name-picker-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 16px;
}

.name-picker h1 {
  margin: 0 0 6px;
  font-size: 20px;
  color: var(--text-strong);
}

.name-picker p {
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: 13.5px;
}

.name-picker input {
  height: 40px;
  font-size: 14px;
  text-align: center;
  margin-bottom: 12px;
}

.name-picker button {
  width: 100%;
  height: 40px;
  font-size: 14px;
}

/* ── 17. MISSING CLASS APPENDIX (backward-compat & omitted classes) ──── */

/* Button reset — prevents browser default outline on link-style buttons */
button { font-family: inherit; }

.link-btn {
  display: inline;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  font: inherit;
  color: var(--accent);
  font-weight: 650;
}
.link-btn:hover { text-decoration: underline; }
.link-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Chart bar aliases — Charts.jsx uses chart-bar--${tone} */
.chart-bar--passed  { background: var(--success); }
.chart-bar--failed  { background: var(--danger); }
.chart-bar--blocker { background: #7f1d1d; }
.chart-bar--skipped { background: var(--text-soft); }
.chart-bar--pending { background: var(--warning); }

.chart-bar-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-strong);
  white-space: nowrap;
}
.chart-bar-value em {
  font-style: normal;
  color: var(--text-soft);
  font-size: 10.5px;
  margin-left: 2px;
}

/* Inline status/priority pill select — colored badge layer, combined with
   .inline-select for box-model. Used across test cases, bugs, and runs. */
.status-select {
  border: 1px solid transparent;
  border-radius: 6px;
  min-width: 104px;
  height: 28px;
  padding: 0 10px;
  font: inherit;
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-align: center;
  text-align-last: center;
  line-height: 1;
  white-space: nowrap;
  box-sizing: border-box;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}
.status-select:hover { filter: brightness(0.96); border-color: var(--border-strong); }
.status-select:focus {
  outline: none;
  box-shadow: var(--focus-ring);
  border-color: var(--accent);
}

.status-select--passed        { background: var(--status-passed-bg,  #e9f7ee); color: var(--status-passed-fg,  #1a6b37); }
.status-select--failed        { background: var(--status-failed-bg,  #fef0f0); color: var(--status-failed-fg,  #a93030); }
.status-select--pending       { background: var(--status-pending-bg, #fef8ec); color: var(--status-pending-fg, #8a5a00); }
.status-select--skipped       { background: var(--status-skipped-bg, #f1f2f5); color: var(--status-skipped-fg, #4d5570); }
.status-select--blocker       { background: var(--status-blocker-bg, #fbe3e3); color: var(--status-blocker-fg, #7f1d1d); font-weight: 800; }
.status-select--reported      { background: #eff6ff; color: #1d4ed8; }
.status-select--clarification { background: #fefce8; color: #854d0e; }
.status-select--inprogress    { background: #f0fdf4; color: #166534; }
.status-select--hold          { background: #fdf4ff; color: #7e22ce; }
.status-select--neutral       { background: var(--soft-bg); color: var(--text-muted); border-color: var(--border); }

.status-select.priority-high {
  background: #fff1f1;
  color: #9f1d1d;
}
.status-select.priority-med,
.status-select.priority-medium {
  background: #fff7e0;
  color: #855800;
}
.status-select.priority-low {
  background: #eef9f1;
  color: #176534;
}

/* Utility classes */
.metric-passed { color: var(--success); }
.metric-failed  { color: var(--danger); }
.text-muted    { color: var(--text-soft); font-size: 12px; }
.mono          { font-family: var(--mono); }
.required      { color: var(--danger); }
.required-field-marker {
  color: var(--danger);
  font-weight: 800;
  margin-left: 3px;
}
.hint          { color: var(--text-soft); font-weight: 400; }
.muted-text    { color: var(--text-muted); }
.row-delete--visible { opacity: 1 !important; }
.detail-empty  { color: var(--text-soft); font-size: 13.5px; }
.text-link     { color: var(--accent); font-weight: 650; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.text-link:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* Settings page */
.settings-section    { margin-bottom: 16px; }
.settings-section:last-child { margin-bottom: 0; }
.settings-form       { display: grid; gap: 14px; padding: 20px; }
.settings-form-footer { display: flex; justify-content: flex-end; padding-top: 4px; }
.settings-body       { padding: 16px 20px 20px; }
.settings-empty      { color: var(--text-soft); font-size: 13.5px; margin: 0; }
.member-list         { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.member-list-item    { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 8px; }
.member-list-item:hover { background: var(--soft-bg); }
.member-name         { flex: 1; color: var(--text-strong); font-size: 13.5px; font-weight: 500; }
.add-member-row      { display: flex; gap: 8px; align-items: center; }
.add-member-row input { flex: 1; }

/* Member picker (ProjectsPage modal) */
.member-picker       { border: 1px solid var(--border); border-radius: 8px; padding: 12px 14px; }
.member-picker legend { padding: 0 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.member-picker-list  { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.member-check        { display: flex; align-items: center; gap: 6px; padding: 4px 10px 4px 8px; border: 1px solid var(--border); border-radius: 999px; cursor: pointer; font-size: 13px; font-weight: 500; color: var(--text-muted); transition: border-color 0.15s, background 0.15s; }
.member-check:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.member-check input  { display: none; }
.member-row          { display: flex; flex-wrap: wrap; gap: 8px; }
.member-row span     { padding: 4px 8px; border: 1px solid var(--border); border-radius: 999px; color: var(--text-muted); font-size: 12px; font-weight: 600; }

/* ── Jira Integration Settings ──────────────────────────── */
.jira-settings-body { }
.jira-settings-desc { margin-bottom: 16px; }
.jira-field-hint { font-size: 12px; color: var(--text-muted); }
.jira-disconnect-btn {
  color: var(--danger);
  border-color: #fecaca;
  background: #fff5f5;
}
.jira-disconnect-btn:hover {
  background: #fee2e2;
  border-color: #fca5a5;
  color: var(--danger);
}
.jira-active-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  align-self: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--success);
  padding: 4px 10px;
  border-radius: 6px;
  background: #e9f7ee;
  border: 1px solid #c4e8d0;
  white-space: nowrap;
}

/* ── Run setup & execution ──────────────────────────────── */
.run-setup { margin-bottom: 16px; overflow: hidden; }
.run-setup > .section-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  margin: 0;
}
.run-config {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}
.run-config label { display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 650; }
.run-module-filter-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.run-module-filter-bar select { min-width: 180px; }
.run-module-filter-bar select,
.run-module-filter-bar input[type="search"] {
  width: auto;
  flex: 1 1 180px;
  min-width: 0;
}
.run-name-display-row { display: inline-flex; align-items: center; gap: 8px; }
.run-name-edit-btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: none; border: none; cursor: pointer; padding: 4px;
  color: var(--text-muted); border-radius: 4px; opacity: 0.6;
  transition: opacity 0.15s, background 0.15s;
}
.run-name-edit-btn:hover { opacity: 1; background: var(--hover-bg, rgba(0,0,0,0.06)); }
.run-name-edit-row { display: inline-flex; align-items: center; gap: 8px; }
.run-name-input {
  font: inherit; font-size: inherit; font-weight: inherit;
  border: 2px solid var(--accent); border-radius: 6px;
  padding: 2px 8px; background: var(--surface); color: var(--text);
  min-width: 260px; outline: none;
}
.run-selection-actions,
.run-nav-actions,
.run-status-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.run-selection-actions { justify-content: flex-end; }
.run-execution-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  align-items: start;
}
.run-draft-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 10px;
  background: #fefce8;
  border: 1px solid #fde68a;
  border-radius: 8px;
  color: #8a5a00;
}
.run-draft-banner-text {
  flex: 1;
  display: grid;
  gap: 2px;
}
.run-draft-banner-text strong {
  font-size: 13px;
  font-weight: 650;
}
.run-draft-banner-text span {
  font-size: 12px;
  opacity: 0.85;
}

.run-info-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  margin-bottom: 20px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 8px;
  color: #1e40af;
}
.run-info-banner-text {
  flex: 1;
  display: grid;
  gap: 2px;
}
.run-info-banner-text strong {
  font-size: 13px;
  font-weight: 650;
}
.run-info-banner-text span {
  font-size: 12px;
  opacity: 0.85;
}

.run-case-panel,
.run-side-panel,
.run-complete-panel { padding: 20px; }
.run-case-panel h2,
.run-side-panel h2,
.run-complete-panel h2 { margin: 0 0 14px; color: var(--text-strong); font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
.run-progress-row {
  display: grid;
  grid-template-columns: auto auto minmax(120px, 1fr);
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 650;
}
.run-current-id { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.run-current-id .mono { display: inline-flex; min-height: 22px; align-items: center; padding: 0 8px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 11.5px; font-weight: 800; }
.run-case-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.run-case-meta div { padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfc; min-width: 0; }
.run-case-meta dd { margin: 4px 0 0; color: var(--text-strong); font-weight: 650; font-size: 13px; overflow-wrap: anywhere; }
.run-case-block { margin-top: 16px; padding: 14px; border: 1px solid var(--border); border-radius: 8px; background: #fbfcfc; overflow-wrap: anywhere; }
.run-case-block h3 { margin: 0 0 8px; color: var(--text-muted); font-size: 12.5px; font-weight: 750; }
.run-actual-field { margin: 14px 0; display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.run-actual-field textarea { min-height: 96px; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 8px; color: var(--text-strong); font: inherit; resize: vertical; }
.status-choice {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  min-height: 36px;
  height: auto;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}
.status-choice:hover  { border-color: var(--border-strong); }
.status-choice.active { border-color: transparent; color: #fff; }
.status-choice--passed.active       { background: var(--status-passed-fg); }
.status-choice--failed.active,
.status-choice--blocker.active      { background: var(--status-failed-fg); }
.status-choice--skipped.active      { background: var(--status-skipped-fg); }
.status-choice--reported.active     { background: var(--status-reported-fg); }
.status-choice--clarification.active{ background: var(--status-clarification-fg); }
.status-choice--inprogress.active   { background: var(--status-inprogress-fg); }
.status-choice--hold.active         { background: var(--status-hold-fg); }
.run-nav-actions { justify-content: flex-end; margin-top: 16px; }
.shortcut-hints { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; color: var(--text-muted); font-size: 11.5px; }
.shortcut-hints span { padding: 3px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--soft-bg); }

/* ── Run side panel ───────────────────────────────────────────────────────── */
.run-side-panel { overflow-y: auto; max-height: calc(100svh - 100px); }
.run-side-header { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.run-side-header h2 { margin: 0; }
.run-jump-btn { flex-shrink: 0; padding: 4px 10px; border: 1px solid var(--border); border-radius: 6px; background: var(--soft-bg); color: var(--text-muted); font: inherit; font-size: 11.5px; font-weight: 600; cursor: pointer; transition: background 0.14s; white-space: nowrap; }
.run-jump-btn:hover { background: var(--border); color: var(--text-strong); }
.run-elapsed { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; margin-bottom: 12px; border-radius: 6px; background: var(--soft-bg); font-size: 12px; color: var(--text-muted); }
.run-elapsed strong { color: var(--text-strong); font-size: 12px; font-weight: 650; }
.run-side-section { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); }
.run-side-section h3 { margin: 0 0 8px; color: var(--text-muted); font-size: 11px; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; }
.run-module-risk { display: flex; align-items: center; justify-content: space-between; padding: 6px 12px; border-bottom: 1px solid var(--border); font-size: 13px; gap: 12px; }
.run-module-risk span { flex: 1; min-width: 0; word-break: break-word; overflow-wrap: anywhere; }
.run-module-risk:last-child { border-bottom: 0; }
.run-module-risk strong { flex-shrink: 0; color: var(--danger); font-weight: 700; font-size: 13px; }

/* ── Run live summary (new design) ───────────────────────────────────────── */
.run-summary { display: grid; gap: 10px; margin-bottom: 4px; }
.run-summary-hero { display: flex; align-items: center; gap: 12px; }
.run-summary-rate-num { font-size: 36px; font-weight: 850; color: var(--text-strong); line-height: 1; letter-spacing: -0.04em; }
.run-summary-meta { display: flex; flex-direction: column; gap: 3px; }
.run-summary-meta strong { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.run-summary-meta span { font-size: 12px; color: var(--text-muted); }

.run-stacked-bar { display: flex; height: 8px; border-radius: 999px; overflow: hidden; background: var(--border); gap: 1px; }
.run-stacked-seg { display: block; min-width: 3px; transition: flex 0.3s ease; }
.run-stacked-seg--passed       { background: #22c55e; }
.run-stacked-seg--failed       { background: #ef4444; }
.run-stacked-seg--blocker      { background: #7f1d1d; }
.run-stacked-seg--reported     { background: #f97316; }
.run-stacked-seg--clarification{ background: #3b82f6; }
.run-stacked-seg--inprogress   { background: #f59e0b; }
.run-stacked-seg--hold         { background: #9ca3af; }
.run-stacked-seg--skipped      { background: #cbd5e1; }
.run-stacked-seg--pending      { background: var(--border); }
.run-stat-rows { display: grid; gap: 5px; }
.run-stat-row { display: flex; align-items: center; gap: 7px; font-size: 12.5px; }
.run-stat-dot { flex-shrink: 0; width: 8px; height: 8px; border-radius: 50%; }
.run-stat-dot--passed       { background: #22c55e; }
.run-stat-dot--failed       { background: #ef4444; }
.run-stat-dot--blocker      { background: #7f1d1d; }
.run-stat-dot--reported     { background: #f97316; }
.run-stat-dot--clarification{ background: #3b82f6; }
.run-stat-dot--inprogress   { background: #f59e0b; }
.run-stat-dot--hold         { background: #9ca3af; }
.run-stat-dot--skipped      { background: #cbd5e1; }
.run-stat-dot--pending      { background: var(--border); }
.run-stat-label { flex: 1; color: var(--text-muted); overflow-wrap: anywhere; }
.run-stat-count { font-weight: 650; color: var(--text-muted); min-width: 20px; text-align: right; }

.run-case-list { display: grid; gap: 6px; }
.run-case-list button { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-strong); text-align: left; cursor: pointer; transition: background 0.14s, border-color 0.14s; font: inherit; font-size: 12.5px; }
.run-case-list button.active { border-color: var(--accent); background: var(--accent-soft); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 12%, transparent); }
.run-case-list button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.run-case-list button strong { font-size: 11px; white-space: nowrap; }

.run-complete-panel { display: grid; justify-items: center; gap: 12px; text-align: center; }
.run-complete-mark { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 999px; background: #e9f7ee; color: var(--success); }

.run-complete-insights {
  margin: 16px 0;
  width: 100%;
  max-width: 500px;
  text-align: center;
}
.run-complete-insights h3 {
  margin: 0 0 10px 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.run-complete-insight-list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
}
.run-insight-chip {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-strong);
}
.run-insight-chip strong {
  font-weight: 600;
  margin-right: 4px;
}
.run-detail-hero { margin-bottom: 16px; }
.run-detail-hero-content { display: flex; align-items: center; gap: 28px; padding: 20px 24px; }
.run-detail-hero-stats { flex: 1; min-width: 0; }
.run-detail-health-badge { display: inline-flex; align-items: center; min-height: 20px; padding: 0 8px; border-radius: 4px; font-size: 10px; font-weight: 750; letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 10px; }
.run-detail-health-badge--passed  { background: #e9f7ee; color: #1a6b37; }
.run-detail-health-badge--pending { background: #fef8ec; color: #8a5a00; }
.run-detail-health-badge--failed  { background: #fef0f0; color: #a93030; }
.run-detail-stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.run-detail-stat span { color: var(--text-soft); font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.run-detail-stat strong { display: block; margin-top: 4px; color: var(--text-strong); font-size: 18px; font-weight: 750; letter-spacing: -0.02em; }
.run-detail-insights { margin-bottom: 16px; }

/* ── Bulk Upload Modal ────────────────────────────────── */
.bulk-modal-body { display: flex; flex-direction: column; gap: 16px; padding: 20px; overflow-y: auto; min-height: 0; }
.bulk-stepper { display: flex; align-items: center; gap: 0; padding-bottom: 4px; }
.bulk-step { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.bulk-step-dot { width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 700; background: var(--border); color: var(--text-muted); transition: background 0.2s; }
.bulk-step--active .bulk-step-dot { background: var(--accent); color: #fff; }
.bulk-step--done   .bulk-step-dot { background: var(--success); color: #fff; }
.bulk-step-label { font-size: 12px; font-weight: 600; color: var(--text-muted); }
.bulk-step--active .bulk-step-label { color: var(--text-strong); }
.bulk-step--done   .bulk-step-label { color: var(--success); }
.bulk-step-line { flex: 1; height: 1px; background: var(--border); margin: 0 8px; min-width: 20px; }
.vbadge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 4px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.vbadge--valid   { background: #e9f7ee; color: #1a6b37; }
.vbadge--invalid { background: #fef0f0; color: #a93030; }
.vbadge--warning { background: #fef8ec; color: #8a5a00; }
.bulk-upload-step { display: flex; flex-direction: column; gap: 12px; }
.bulk-file-error  { font-size: 12px; color: var(--danger); margin: 0; }
.drop-zone { border: 2px dashed var(--border-strong); border-radius: 10px; padding: 36px 24px; text-align: center; cursor: pointer; transition: border-color 0.15s, background 0.15s; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.drop-zone:hover, .drop-zone--active { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 5%, transparent); }
.drop-zone-icon { font-size: 28px; }
.drop-zone-text { font-size: 14px; color: var(--text-strong); }
.drop-zone-hint { font-size: 12px; color: var(--text-muted); }
.bulk-template-hint { font-size: 12px; color: var(--text-muted); line-height: 1.6; flex: 1; margin: 0; }
.bulk-template-row { display: flex; align-items: center; gap: 16px; justify-content: space-between; padding: 10px 14px; background: var(--soft-bg); border: 1px solid var(--border); border-radius: var(--radius); }
.bulk-file-bar { display: flex; align-items: center; justify-content: space-between; background: var(--soft-bg); border-radius: 6px; padding: 8px 12px; font-size: 13px; }
.bulk-filename { font-weight: 600; }
.bulk-counts { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.bulk-count-total { color: var(--text-muted); }
.bulk-preview-table { max-height: 320px; overflow-y: auto; }
.bulk-preview-table table { min-width: 900px; }
.bulk-row--invalid td { background: color-mix(in srgb, var(--danger) 4%, transparent); }
.bulk-row--duplicate td { background: color-mix(in srgb, var(--warning) 6%, transparent); }
.bulk-cell-truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bulk-action-select { width: 100%; min-width: 110px; }
.bulk-import-tabs { display: flex; gap: 4px; padding: 3px; border: 1px solid var(--border); border-radius: 10px; background: var(--soft-bg); }
.bulk-import-tab { flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid transparent; border-radius: 7px; background: transparent; color: var(--text-muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.15s; }
.bulk-import-tab:hover:not(.bulk-import-tab--active) { background: rgba(255,255,255,0.6); color: var(--text-strong); }
.bulk-import-tab--active { border-color: var(--border-strong); background: var(--surface); color: var(--text-strong); box-shadow: 0 1px 3px rgba(0,0,0,0.06); }
.bulk-import-tab-icon { font-size: 14px; line-height: 1; }
.gs-import { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 10px; }
.gs-label { display: grid; gap: 6px; color: var(--text-muted); font-size: 12px; font-weight: 600; }
.gs-input { width: 100%; min-width: 0; height: 34px; padding: 0 10px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); color: var(--text-strong); font: inherit; font-size: 13px; }
.gs-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.gs-loading { display: inline-flex; align-items: center; gap: 8px; color: var(--text-muted); font-size: 13px; }
.gs-spinner { display: inline-block; width: 15px; height: 15px; border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: gs-spin 0.6s linear infinite; }
@keyframes gs-spin { to { transform: rotate(360deg); } }
.bulk-summary { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 16px 0; text-align: center; }
.bulk-summary-icon { font-size: 2.2rem; }
.bulk-summary h3  { margin: 0; font-size: 16px; font-weight: 700; color: var(--text-strong); }
.bulk-summary-stats { display: flex; gap: 28px; margin: 8px 0; }
.bulk-summary-stats > div { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.bulk-summary-stats strong { font-size: 22px; font-weight: 800; }
.bulk-summary-stats span   { font-size: 11px; color: var(--text-muted); }

/* ── JUnit Import Modal ────────────────────────────────── */
.junit-modal-content {
  display: grid;
  gap: 16px;
  font-size: 13px;
  padding: 18px;
}

.junit-option-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  background: var(--page-bg);
  padding: 12px;
  border-radius: 8px;
}

.junit-checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
  white-space: nowrap;
}

.junit-checkbox {
  width: 15px;
  height: 15px;
  margin: 0;
  cursor: pointer;
  accent-color: var(--accent);
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .junit-modal-content {
    padding: 14px;
    gap: 12px;
  }
  .junit-checkbox-label {
    font-size: 12.5px;
  }
}

/* ── Empty state ──────────────────────────────────────── */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  padding: 32px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  text-align: center;
}
.empty-state h2 { margin: 0 0 6px; color: var(--text-strong); font-size: 15px; font-weight: 650; }
.empty-state p { margin: 0; color: var(--text-soft); font-size: 13px; max-width: 300px; line-height: 1.5; }

/* Shared <x-empty-state> component sub-elements */
.empty-state-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  margin-bottom: 10px;
  border-radius: 50%;
  background: var(--soft-bg);
  color: var(--text-soft);
}
.empty-state-title { color: var(--text-strong); font-size: 14px; font-weight: 650; }
.empty-state-copy { margin-top: 4px; color: var(--text-soft); font-size: 13px; max-width: 320px; line-height: 1.5; }
.empty-state-action { margin-top: 14px; }

/* ── Modal form label override (capitalize labels inside modals) */
.modal-form label { display: block; color: var(--text-soft); font-size: 11px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; margin-bottom: 0; }
.modal-form label > input,
.modal-form label > select,
.modal-form label > textarea { margin-top: 5px; }

/* ── Report insight panel ─────────────────────────────── */
.report-insight-panel { margin-bottom: 16px; }

/* ── KPI strip (project reports) ──────────────────────── */
.rpt-kpi-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}
.rpt-kpi {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.rpt-kpi-link,
.rr-stat-link,
.rr-clickable-card,
.rr-clickable-row,
.report-action-link,
.chart-link-row,
.bug-status-chip-link {
  color: inherit;
  text-decoration: none;
}
.rpt-kpi-link:hover,
.rr-stat-link:hover,
.rr-clickable-card:hover,
.rr-clickable-row:hover,
.report-action-link:hover,
.chart-link-row:hover,
.bug-status-chip-link:hover {
  border-color: var(--border-strong);
}
.rr-stat-link {
  text-decoration: none;
  color: inherit;
}
@media (max-width: 520px) {
  .rpt-kpi-strip { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 380px) {
  .rpt-kpi-strip { grid-template-columns: repeat(2, 1fr); }
}
.rpt-kpi span { font-size: 10px; font-weight: 700; color: var(--text-soft); text-transform: uppercase; letter-spacing: 0.05em; }
.rpt-kpi strong { font-size: 22px; font-weight: 800; color: var(--text-strong); }
.rpt-kpi--pass    strong { color: var(--success); }
.rpt-kpi--fail    strong { color: var(--danger); }
.rpt-kpi--blocker strong { color: #c00; }
.rpt-kpi--bug     strong { color: var(--danger); }
.rpt-kpi--coverage strong { color: var(--accent); }
.rpt-kpi--runs    strong { color: var(--text-strong); }

/* ── Run trend sparkline ────────────────────────────────── */
.run-trend-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
}
.run-trend-svg { display: block; overflow: visible; }
.run-trend-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.run-trend-latest { font-size: 20px; font-weight: 800; line-height: 1; }
.run-trend-delta  { font-size: 12px; font-weight: 700; }
.run-trend-label  { font-size: 10px; color: var(--text-soft); font-weight: 600; text-transform: uppercase; }

.rpt-trend-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 10px 0 4px;
  flex-wrap: wrap;
}
.rpt-trend-labels {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.rpt-trend-label-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
}
.rpt-trend-name {
  flex: 1;
  color: var(--text-muted);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpt-trend-label-row strong { font-size: 12px; min-width: 36px; text-align: right; }

/* ── Bar chart new tone fills ─────────────────────────── */
.chart-bar--reported      { background: #3b82f6; }
.chart-bar--inprogress    { background: #22c55e; }
.chart-bar--clarification { background: #eab308; }
.chart-bar--hold          { background: #a855f7; }

/* ── Project report cards grid ────────────────────────── */
.rpt-project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.rpt-project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.rpt-project-card:hover {
  border-color: var(--accent);
  box-shadow: 0 2px 10px color-mix(in srgb, var(--accent) 12%, transparent);
}
.rpt-card-top {
  display: flex;
  align-items: center;
  gap: 14px;
}
.rpt-card-info { flex: 1; min-width: 0; }
.rpt-card-name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 3px;
}
.rpt-card-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rpt-card-meta { font-size: 11.5px; color: var(--text-soft); margin-bottom: 6px; }
.rpt-card-stats {
  display: flex;
  gap: 10px;
  font-size: 12.5px;
  font-weight: 700;
}
.rpt-card-trend { padding: 2px 0; }
.rpt-card-bar-wrap { margin-top: 2px; }
.rpt-card-stacked-bar {
  display: flex;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  gap: 1px;
}
.rpt-card-stacked-bar span { display: block; border-radius: 2px; }

/* ── Page header responsive ───────────────────────────── */
.page-header p { color: var(--text-soft); font-size: 13px; }

/* ── Backup summary & restore old classes ──────────────── */

/* ── 17. RESPONSIVE DESIGN Polish ──────────────────────────────────────── */
@media (max-width: 820px) {
  .content {
    padding: 24px 20px 40px;
  }
  .page-header h1 {
    font-size: 24px;
  }
  .topbar {
    gap: 16px;
    padding: 0 16px;
  }

  .topnav {
    gap: 2px;
  }

  .workspace {
    flex-direction: column;
    width: 100%;
  }

  .project-sidebar {
    width: 100%;
    height: auto;
    position: static;
    padding: 12px 0;
    border-right: 0;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
  }

  .project-sidebar nav {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
  }

  .project-sidebar a {
    justify-content: center;
  }

  .project-sidebar + .content {
    padding-left: 0;
  }

  .table-wrap {
    margin-left: auto;
    margin-right: auto;
  }

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

  .member-management-panel {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .page-header {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .page-actions {
    justify-content: flex-start;
  }

  .page-actions .page-actions-row {
    margin-left: 0;
  }

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

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

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

  .run-side-panel {
    max-height: none;
  }
}

@media (max-width: 520px) {
  .page-back-btn {
    margin-bottom: 8px;
  }
  .page-back-btn .page-back-label {
    display: none;
  }
  .page-header h1 {
    font-size: 22px;
  }
  .content {
    padding: 20px 16px 32px;
  }

  .workspace {
    padding: 0;
  }

  .table-wrap {
    margin-left: auto;
    margin-right: auto;
  }

  .topbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    height: auto;
    padding: 12px 16px;
  }

  .brand {
    grid-column: 1;
    grid-row: 1;
    align-self: center;
  }

  .topbar-actions {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
  }

  .topnav {
    grid-column: 1 / span 2;
    grid-row: 2;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    white-space: nowrap;
    scrollbar-width: none;
    padding-bottom: 4px;
    width: 100%;
  }

  .topnav a {
    flex-shrink: 0;
  }

  .topnav::-webkit-scrollbar {
    display: none;
  }

  .user-pill-wrap {
    margin-top: 0;
  }

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

  .project-overview-bar {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
  }

  .project-bar-metrics {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 8px;
  }

  .bar-metric {
    align-items: flex-start;
  }

  .bar-metric-divider {
    display: none;
  }

  .table-pagination {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
  }
  .settings-body {
    padding: 12px 16px 16px;
  }

  .toolbar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 8px 12px;
  }

  .toolbar input[type="search"] {
    grid-column: 1 / span 2;
    max-width: none;
    width: 100%;
  }

  .toolbar select,
  .toolbar input[type="date"] {
    width: 100%;
    min-width: 0;
  }

  .toolbar-info {
    grid-column: 1 / span 2;
    justify-content: space-between;
    margin-left: 0;
    width: 100%;
  }

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

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

  .slack-settings-form {
    grid-template-columns: 1fr;
    align-items: stretch;
  }
}

@media (max-width: 480px) {
  .modal-footer {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 8px;
    padding: 12px 16px;
  }

  .modal-footer button {
    width: 100%;
  }

  .run-status-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px;
  }

  .status-choice {
    min-height: 40px;
    width: 100%;
    padding: 6px 8px;
    font-size: 11px;
  }

  .run-nav-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    margin-top: 12px;
  }

  .run-nav-actions button {
    width: 100%;
  }
}

@media (max-width: 380px) {
  .metric-card strong {
    font-size: 20px;
  }
}

/* ── TOUCH-FRIENDLY TARGETS (pointer: coarse) ─────────────────────────── */
/* Only apply on devices with coarse pointers (touch) to preserve
   precision on desktop/mouse.  WCAG 2.5.8 recommends 44 × 44 px. */
@media (pointer: coarse) {
  /* Nav links — sidebar & topbar */
  .topnav a,
  .project-sidebar a {
    min-height: 44px;
    padding: 0 14px;
  }

  /* Buttons */
  .primary-button,
  .secondary-button,
  .danger-button,
  .ghost-button {
    min-height: 44px;
    padding: 10px 18px;
  }

  /* Icon-only buttons */
  .icon-button {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }

  /* Row action buttons (edit / delete in tables) */
  .row-action-btn,
  .row-delete {
    width: 44px;
    height: 44px;
  }

  /* Modal close button */
  .modal-close {
    width: 44px;
    height: 44px;
  }

  /* Pagination buttons */
  .pagination-actions .icon-button {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }

  /* Back button */
  .page-back-btn {
    min-height: 44px;
    padding: 8px 14px 8px 10px;
  }

  /* Inline status / priority selects — taller tap area */
  .status-select,
  .inline-select {
    height: 36px;
    min-height: 36px;
  }

  /* Checkbox in tables */
  .row-checkbox,
  .tc-table .checkbox-td input[type="checkbox"] {
    width: 20px;
    height: 20px;
  }

  /* User pill */
  .user-pill {
    min-height: 44px;
    padding: 0 10px 0 8px;
  }

  /* Notification bell */
  .notification-bell-btn {
    min-width: 44px;
    width: 44px;
    height: 44px;
  }

  /* Presence avatars */
  .presence-avatar {
    width: 36px;
    height: 36px;
    font-size: 12px;
  }

  /* Filter clear button */
  .filter-clear-btn {
    min-height: 36px;
    padding: 6px 12px;
  }

  /* Status choice buttons (run execution) */
  .status-choice {
    min-height: 44px;
    padding: 8px 16px;
  }

  /* Link buttons */
  .link-btn {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
  }

  /* Dropdown menu items */
  .user-dropdown-item {
    min-height: 44px;
    display: flex;
    align-items: center;
  }

  /* Tab buttons */
  .tab-btn {
    min-height: 44px;
  }

  /* Jira push button — touch target */
  .jira-push-btn {
    min-height: 44px;
    padding: 8px 14px;
    font-size: 13px;
  }
  .jira-push-btn svg {
    width: 14px;
    height: 14px;
  }
}

/* ── Scroll-to-Top Button ─────────────────────────────────────────── */
.scroll-top-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: 500;
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.92);
  transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
  pointer-events: none;
}
.scroll-top-btn--visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.scroll-top-btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.scroll-top-btn:active {
  transform: translateY(0) scale(0.92);
}
.scroll-top-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring), var(--shadow-md);
}
@media (pointer: coarse) {
  .scroll-top-btn {
    width: 48px;
    height: 48px;
    bottom: 20px;
    right: 20px;
  }
}

/* ── Swipe-back visual indicator ────────────────────────────────────── */
.content {
  touch-action: pan-y;
}

/* ── 18. AUTH PAGE ──────────────────────────────────────────────────────── */
.auth-backdrop {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page-bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: modal-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  color: var(--text-strong);
  margin-bottom: 20px;
}

.auth-title {
  margin: 0 0 20px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.02em;
}

.google-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 42px;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-strong);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
  box-shadow: var(--shadow-sm);
}

.google-btn:hover:not(:disabled) {
  background: var(--soft-bg);
  border-color: var(--border-strong);
}

.google-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  color: var(--text-soft);
  font-size: 12px;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-form label {
  display: grid;
  gap: 5px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Password field with show/hide toggle */
.password-field {
  position: relative;
  display: block;
}
.password-field input {
  width: 100%;
  padding-right: 38px;
}
.password-toggle {
  position: absolute;
  top: 50%;
  right: 6px;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-muted);
  border-radius: 6px;
  cursor: pointer;
  transition: color 0.15s, background 0.15s;
}
.password-toggle:hover {
  color: var(--text-strong);
  background: var(--soft-bg);
}
.password-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
}

.auth-error {
  margin: 0;
  padding: 8px 12px;
  border-radius: 6px;
  background: var(--status-failed-bg);
  border: 1px solid var(--status-failed-border);
  color: var(--danger);
  font-size: 12.5px;
}

.auth-submit {
  width: 100%;
  height: 42px;
  margin-top: 4px;
  font-size: 14px;
}

.auth-switch {
  margin: 16px 0 0;
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.guest-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  margin-top: 4px;
}
.guest-btn:hover:not(:disabled) {
  background: var(--soft-bg);
  border-color: var(--border-strong);
  color: var(--text);
}
.guest-btn:disabled { opacity: 0.6; cursor: not-allowed; }

.auth-guest-note {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  color: var(--text-muted);
}

.user-guest-badge {
  display: inline-flex;
  align-items: center;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #92400e;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.4;
}

/* App loading */
.app-loading {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--page-bg);
}

.app-loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(15, 23, 42, 0.1);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

.app-loading-card {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: min(100%, 340px);
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.app-loading-mark {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: 0 0 auto;
  border-radius: 10px;
  background: var(--accent);
  color: white;
}

.app-loading-card strong {
  display: block;
  color: var(--text-strong);
  font-size: 1rem;
  line-height: 1.35;
}

.app-loading-text {
  margin: 0;
  color: var(--text-muted, #64748b);
  font-size: 0.9rem;
  line-height: 1.4;
}

/* Stack the conflict-recovery actions vertically, full width */
.modal-footer--stacked {
  flex-direction: column;
  align-items: stretch;
}
.modal-footer--stacked > button {
  width: 100%;
}

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

/* ── Requirement module bulk-select ───────────────────────────────────── */
.req-module-add-row { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.req-module-add-select {
  flex: 1; font-size: 12.5px; padding: 6px 10px;
  border: 1px dashed var(--accent, #2563eb); border-radius: 6px;
  background-color: var(--accent-soft, #eff6ff);
  background-image: none !important;
  color: var(--accent, #2563eb);
  cursor: pointer; font-weight: 600;
}
.req-module-add-select:hover { background-color: color-mix(in srgb, var(--accent) 14%, var(--accent-soft, #eff6ff)); }
.req-module-add-select:focus { outline: none; border-style: solid; background-image: none !important; }
.req-module-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.req-module-chip {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--accent-soft, #eff6ff); border: 1px solid color-mix(in srgb, var(--accent, #2563eb) 30%, transparent);
  border-radius: 999px; padding: 3px 8px 3px 10px; font-size: 12px;
}
.req-module-chip-name { font-weight: 600; color: var(--accent, #2563eb); }
.req-module-chip-count {
  background: var(--accent, #2563eb); color: #fff;
  border-radius: 999px; padding: 0 6px; font-size: 10px; font-weight: 700; line-height: 18px;
}
.req-module-chip-remove {
  background: none; border: none; cursor: pointer; color: var(--accent, #2563eb);
  font-size: 15px; line-height: 1; padding: 0 2px; opacity: 0.7;
  display: flex; align-items: center;
}
.req-module-chip-remove:hover { opacity: 1; }
.req-folder-chip {
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
  border-color: color-mix(in srgb, var(--accent) 25%, transparent);
}

/* ── Requirement TC picker toolbar ────────────────────────────────────── */
.req-tc-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.req-tc-search {
  flex: 1;
  min-width: 0;
  height: 34px;
  font-size: 12.5px;
}
.req-tc-module-select {
  width: auto;
  min-width: 120px;
  max-width: 180px;
  height: 34px;
  flex-shrink: 0;
  font-size: 12.5px;
}
.req-tc-module-select.filter-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
}
.req-tc-active-filter {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 6px;
  padding: 2px 8px;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}
.req-tc-filter-clear {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--accent);
  font-size: 14px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  transition: background 0.15s;
}
.req-tc-filter-clear:hover {
  background: color-mix(in srgb, var(--accent) 20%, transparent);
}
@media (max-width: 480px) {
  .req-tc-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .req-tc-module-select {
    max-width: none;
  }
}

/* Run case picker table — fixed layout so columns fit the viewport */
.run-case-picker-table {
  table-layout: fixed;
  width: 100%;
}
.rcp-col-check    { width: 4%; }
.rcp-col-id       { width: 10%; }
.rcp-col-title    { width: 35%; }
.rcp-col-module   { width: 15%; }
.rcp-col-priority { width: 12%; }
.rcp-col-status   { width: 24%; }
.run-case-picker-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}
.run-case-picker-table .inline-select,
.run-case-picker-table .status-select {
  width: 100%;
  max-width: 100%;
}

/* Run results table (detail page) — fixed layout so columns fit the viewport */
.run-results-table {
  table-layout: fixed;
  width: 100%;
}
.rr-col-title    { width: 28%; }
.rr-col-module   { width: 14%; }
.rr-col-priority { width: 12%; }
.rr-col-status   { width: 16%; }
.rr-col-actual   { width: 30%; }
.run-results-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

/* Recent runs table — fixed columns so content stays aligned and visible */
.run-list-table {
  table-layout: fixed;
  width: 100%;
  min-width: 0;
}
/* Percentages summing to 100% so it fits the viewport with no horizontal scroll. */
.rl-col-date { width: 18%; }
.rl-col-name { width: 28%; }
.rl-col-num  { width: 9%; }
.rl-col-by   { width: 18%; }
.run-list-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  vertical-align: middle;
}

.run-side-panel {
  padding: 20px;
}

.run-side-panel .run-side-section h3,
.run-side-panel .run-side-section h4 {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 750;
}

/* Run list table responsive */
@media (max-width: 640px) {
  .run-list-table tr > th:nth-child(3),
  .run-list-table tr > td:nth-child(3),
  .run-list-table tr > th:nth-child(6),
  .run-list-table tr > td:nth-child(6) {
    display: none;
  }
  .run-list-table tr > th:nth-child(1), .run-list-table tr > td:nth-child(1) { width: 22%; }
  .run-list-table tr > th:nth-child(2), .run-list-table tr > td:nth-child(2) { width: 30%; }
  .run-list-table tr > th:nth-child(4), .run-list-table tr > td:nth-child(4) { width: 12%; }
  .run-list-table tr > th:nth-child(5), .run-list-table tr > td:nth-child(5) { width: 12%; }
  .run-list-table tr > th:nth-child(7), .run-list-table tr > td:nth-child(7) { width: 24%; }
}
@media (max-width: 480px) {
  .run-list-table tr > th:nth-child(5),
  .run-list-table tr > td:nth-child(5),
  .run-list-table tr > th:nth-child(7),
  .run-list-table tr > td:nth-child(7) {
    display: none;
  }
  .run-list-table tr > th:nth-child(1), .run-list-table tr > td:nth-child(1) { width: 30%; }
  .run-list-table tr > th:nth-child(2), .run-list-table tr > td:nth-child(2) { width: 40%; }
  .run-list-table tr > th:nth-child(4), .run-list-table tr > td:nth-child(4) { width: 30%; }
}
.run-list-table th.rl-num,
.run-list-table td.rl-num { text-align: center; }

/* ── Requirements page ─────────────────────────────────── */
.req-coverage-strip {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 18px 20px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.req-coverage-summary { flex: 1; min-width: 0; }
.req-coverage-hero { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.req-coverage-rate { font-size: 36px; font-weight: 850; color: var(--text-strong); line-height: 1; letter-spacing: -0.04em; }
.req-coverage-pct { font-size: 18px; font-weight: 700; }
.req-coverage-meta strong { font-size: 11px; font-weight: 800; color: var(--text-muted); letter-spacing: 0.05em; text-transform: uppercase; }
.req-coverage-meta span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.req-coverage-bar { display: flex; height: 6px; border-radius: 999px; overflow: hidden; background: var(--border); gap: 1px; }
.req-coverage-seg { display: block; min-width: 2px; transition: flex 0.3s ease; }
.req-coverage-seg--verified    { background: #22c55e; }
.req-coverage-seg--inprogress  { background: #f59e0b; }
.req-coverage-seg--uncovered   { background: var(--border); }
.req-coverage-stats {
  display: flex;
  flex-direction: row;
  flex-shrink: 0;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.req-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  background: var(--surface);
  gap: 3px;
  min-width: 76px;
  position: relative;
}
.req-stat::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 0;
}
.req-stat--total::before     { background: var(--accent); }
.req-stat--covered::before   { background: #f59e0b; }
.req-stat--verified::before  { background: #22c55e; }
.req-stat--inprogress::before{ background: #f97316; }
.req-stat--failing::before   { background: #ef4444; }
.req-stat--uncovered::before { background: var(--border); }
.req-stat strong {
  font-size: 22px;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1;
}
.req-stat-val--good { color: #22c55e !important; }
.req-stat-val--bad  { color: #ef4444 !important; }
.req-stat-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.req-coverage-seg--failing { background: #ef4444; }
.req-table { table-layout: fixed; width: 100%; }
.req-col-key      { width: 10%; }
.req-col-title    { width: 28%; }
.req-col-priority { width: 12%; }
.req-col-coverage { width: 16%; }
.req-col-bar      { width: 14%; }
.req-col-status   { width: 12%; }
.req-col-actions  { width: 8%; }
.req-table td { white-space: normal; overflow-wrap: anywhere; vertical-align: middle; padding: 10px 14px; }
.req-table th { padding: 9px 14px; }
.req-table th, .req-table td { text-align: left; }
.req-col-priority, .req-col-bar, .req-col-status, .req-col-actions { text-align: center; }
.req-col-priority .inline-select { margin: 0 auto; }
.req-col-key-cell { padding-left: 20px; white-space: nowrap; }
.req-col-title-cell { padding-left: 4px; }
.req-table th:first-child { padding-left: 20px; }
.req-table th:last-child, .req-table td:last-child { padding-right: 20px; }
.rpt-table th:first-child, .rpt-table td:first-child { padding-left: 20px; }
.rpt-table th:last-child, .rpt-table td:last-child { padding-right: 20px; }
.req-table .inline-select,
.req-table .status-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.req-title { display: block; color: var(--text-strong); font-size: 13px; }
.req-desc { margin: 3px 0 0; font-size: 11.5px; color: var(--text-soft); line-height: 1.4; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.req-cov-none { color: var(--text-soft); font-size: 12px; }
.req-cov-text { font-size: 12px; color: var(--text-muted); }
.req-progress-cell { display: flex; align-items: center; gap: 8px; }
.req-progress-track { flex: 1; height: 5px; background: var(--soft-bg); border-radius: 99px; overflow: hidden; }
.req-progress-fill { display: block; height: 100%; border-radius: inherit; background: var(--success); transition: width 0.3s ease; }
.req-progress-pct { font-size: 11px; font-weight: 700; color: var(--text-muted); min-width: 32px; text-align: right; }
.req-empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 48px 24px; text-align: center; }
.req-empty-icon { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); margin-bottom: 16px; }
.req-empty-state h3 { margin: 0 0 4px; font-size: 15px; color: var(--text-strong); font-weight: 700; }
.req-empty-state p { margin: 0 0 16px; font-size: 13px; color: var(--text-muted); max-width: 280px; line-height: 1.5; }
.empty-table-message { display: block; text-align: center; padding: 24px; color: var(--text-soft); font-size: 13px; }

/* Requirements detail page ─ detail panel styles */
.req-detail-page { padding: 20px; }
.req-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.req-detail-header h2 {
  margin: 4px 0 0;
  font-size: 18px;
  font-weight: 750;
  color: var(--text-strong);
}
.req-detail-desc {
  margin: 6px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}
.req-detail-meta {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}
.req-detail-meta div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.req-detail-meta span {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.req-detail-meta strong {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-strong);
}
.req-detail-progress { margin-top: 16px; }
.req-detail-section-head { margin: 22px 0 10px; }
.req-detail-empty {
  padding: 24px;
  text-align: center;
  color: var(--text-soft);
  font-size: 13px;
}
@media (max-width: 640px) {
  .req-detail-header {
    flex-direction: column;
    gap: 12px;
  }
  .req-detail-meta {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}
@media (max-width: 480px) {
  .req-detail-meta {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Requirements page responsive */
@media (max-width: 900px) {
  .req-coverage-strip {
    flex-direction: column;
    gap: 14px;
    padding: 16px;
  }
  .req-coverage-stats {
    width: 100%;
    flex-wrap: wrap;
  }
  .req-stat {
    flex: 1 1 60px;
  }
}
@media (max-width: 640px) {
  .req-coverage-hero {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
  }
  /* Hide non-essential columns on small screens using nth-child
     (col-group display:none and th.req-col-* selectors do not match
      the actual th/td elements which lack those classes). */
  .req-table tr > th:nth-child(4),  /* Coverage */
  .req-table tr > td:nth-child(4),
  .req-table tr > th:nth-child(5),  /* Progress bar */
  .req-table tr > td:nth-child(5),
  .req-table tr > th:nth-child(7),  /* Actions */
  .req-table tr > td:nth-child(7) {
    display: none;
  }
  .req-table tr > th:nth-child(1), .req-table tr > td:nth-child(1) { width: 15%; }
  .req-table tr > th:nth-child(2), .req-table tr > td:nth-child(2) { width: 40%; }
  .req-table tr > th:nth-child(3), .req-table tr > td:nth-child(3) { width: 15%; }
  .req-table tr > th:nth-child(6), .req-table tr > td:nth-child(6) { width: 30%; }
}
@media (max-width: 480px) {
  /* On very small screens, also hide priority */
  .req-table tr > th:nth-child(3),  /* Priority */
  .req-table tr > td:nth-child(3) {
    display: none;
  }
  .req-table tr > th:nth-child(1), .req-table tr > td:nth-child(1) { width: 20%; }
  .req-table tr > th:nth-child(2), .req-table tr > td:nth-child(2) { width: 50%; }
  .req-table tr > th:nth-child(6), .req-table tr > td:nth-child(6) { width: 30%; }
}

/* Test Runs → requirements overview */
.run-req-overview {
  margin-bottom: 16px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.run-req-overview-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  cursor: pointer;
}
.run-req-overview-left,
.run-req-overview-right {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.run-req-overview-right { flex-wrap: wrap; justify-content: flex-end; }
.run-req-chevron { color: var(--text-soft); transform: rotate(0deg); transition: transform 0.16s ease; }
.run-req-chevron--open { transform: rotate(90deg); }
.run-req-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 20px;
  padding: 0 7px;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--text-muted);
  font-weight: 750;
}
.run-req-mini-stat { display: inline-flex; align-items: center; gap: 5px; font-weight: 650; white-space: nowrap; }
.run-req-mini-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.run-req-mini-dot--verified { background: #22c55e; }
.run-req-mini-dot--covered { background: #f59e0b; }
.run-req-overview-header h3 { margin: 0; font-size: 13px; font-weight: 750; color: var(--text-strong); }
.run-req-overview-header span { font-size: 12px; color: var(--text-soft); }
.run-req-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}
.run-req-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--page-bg);
  transition: border-color 0.15s;
  color: inherit;
  text-decoration: none;
}
.run-req-chip:hover { border-color: var(--border-strong); }
.run-req-chip-dot { flex-shrink: 0; width: 6px; height: 6px; border-radius: 50%; }
.run-req-chip-dot--verified  { background: #22c55e; }
.run-req-chip-dot--failing   { background: #ef4444; }
.run-req-chip-dot--inprogress { background: #f59e0b; }
.run-req-chip-dot--notcovered { background: var(--border); }
.run-req-chip-info { flex: 1; min-width: 0; }
.run-req-chip-title { font-size: 12.5px; font-weight: 600; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.run-req-chip-meta { font-size: 11px; color: var(--text-soft); margin-top: 1px; }
.run-req-chip-badge { flex-shrink: 0; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.run-req-chip-badge--verified  { background: #e9f7ee; color: #1a6b37; }
.run-req-chip-badge--failing   { background: #fef0f0; color: #a93030; }
.run-req-chip-badge--inprogress { background: #fef8ec; color: #8a5a00; }
.run-req-chip-badge--notcovered { background: var(--soft-bg); color: var(--text-muted); }
.run-req-empty { padding: 12px 0; font-size: 12.5px; color: var(--text-soft); text-align: center; }

.req-detail-page { padding: 20px; }
.req-detail-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border);
}
.req-detail-header h2 {
  margin: 8px 0 0;
  color: var(--text-strong);
  font-size: 22px;
  line-height: 1.2;
}
.req-detail-desc {
  margin: 8px 0 0;
  max-width: 760px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}
.req-detail-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 10px;
  margin-top: 16px;
}
.req-detail-meta div {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--page-bg);
}
.req-detail-meta span {
  display: block;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.req-detail-meta strong {
  display: block;
  margin-top: 4px;
  color: var(--text-strong);
  font-size: 15px;
}
.req-detail-progress { margin-top: 16px; }
.req-detail-section-head { margin: 22px 0 10px; }
.req-detail-empty {
  padding: 22px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  color: var(--text-soft);
  text-align: center;
}

@media (max-width: 720px) {
  .run-config { grid-template-columns: 1fr; }
  .run-req-overview-header,
  .req-detail-header {
    align-items: stretch;
    flex-direction: column;
  }
  .run-req-overview-right { justify-content: flex-start; }
  .run-selection-actions { justify-content: flex-start; }
}

/* Requirements → test-case picker */
.req-tc-picker {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 4px;
}
/* Use label.req-tc-option to beat the .modal-form label { display: block } rule (same specificity, later in source wins) */
label.req-tc-option {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 6px 8px;
  margin: 0;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  color: var(--text-strong);
  cursor: pointer;
}
label.req-tc-option:hover { background: var(--soft-bg); }
.req-tc-id { flex: none; width: 82px; min-width: 82px; font-size: 10.5px; color: var(--text-soft); padding: 0 6px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-tc-title { flex: 1; min-width: 0; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Firebase user photo */
.user-pill-photo,
.user-dropdown-photo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
}

.user-dropdown-photo {
  width: 32px;
  height: 32px;
}

/* Sign out button in dropdown */
.user-dropdown-item--danger {
  color: var(--danger);
}

.user-dropdown-item--danger:hover {
  background: #fef0f0;
}

/* ── 19. TOAST NOTIFICATIONS ────────────────────────────────────────────── */
.toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 280px;
  max-width: 400px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: var(--surface);
  box-shadow: 0 4px 20px rgba(23, 32, 31, 0.14);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-strong);
  pointer-events: all;
  animation: toast-in 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(0.97); }
  to   { opacity: 1; transform: none; }
}

.toast--success { background: var(--status-passed-bg); border-color: var(--status-passed-border); color: var(--status-passed-fg); }
.toast--error   { background: var(--status-failed-bg); border-color: var(--status-failed-border); color: var(--status-failed-fg); }
.toast--warning { background: var(--status-pending-bg); border-color: var(--status-pending-border); color: var(--status-pending-fg); }
.toast--info    { background: var(--status-clarification-bg); border-color: var(--status-clarification-border); color: var(--status-clarification-fg); }

.toast-icon { flex-shrink: 0; display: grid; place-items: center; }
.toast-message { flex: 1; line-height: 1.4; }
.toast-dismiss {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  border-radius: 4px;
  color: currentColor;
  opacity: 0.6;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
}
.toast-dismiss:hover { opacity: 1; background: rgba(0,0,0,0.06); }
.toast--leaving {
  opacity: 0;
  transform: translateX(12px) scale(0.98);
  transition: opacity 0.18s ease, transform 0.18s ease;
  pointer-events: none;
}

/* ── 19. CONFIRM DIALOG ─────────────────────────────────────────────────── */
.confirm-body {
  padding: 20px 20px 0;
}
.confirm-message {
  margin: 0;
  color: var(--text-muted);
  font-size: 13.5px;
  line-height: 1.55;
}
.confirm-details {
  margin: 12px 0 0;
  padding: 10px 14px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}
.confirm-details li {
  padding: 2px 0;
}
.confirm-type-label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 20px 0;
  font-size: 13px;
  color: var(--text-muted);
}
.confirm-type-label strong {
  color: var(--text-strong);
  font-family: monospace;
}
.confirm-type-input {
  margin-top: 2px;
}

/* ── 20. ERROR BOUNDARY ─────────────────────────────────────────────────── */
.error-boundary {
  display: grid;
  place-items: center;
  min-height: 60vh;
  padding: 40px;
}

.error-boundary-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  max-width: 400px;
}

.error-boundary-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #fef8ec;
  color: var(--warning);
}

.error-boundary-content h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-strong);
}

.error-boundary-msg {
  margin: 0;
  font-size: 13px;
  color: var(--text-soft);
  font-family: var(--mono);
  background: var(--page-bg);
  padding: 8px 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  word-break: break-word;
}

/* ── 21. STORAGE WARNING BANNER ─────────────────────────────────────────── */
.storage-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 20px;
  font-size: 12.5px;
  font-weight: 500;
}

.storage-banner--warning {
  background: #fefce8;
  color: #8a5a00;
  border-bottom: 1px solid #fde68a;
}

.storage-banner--critical {
  background: #fef0f0;
  color: #a93030;
  border-bottom: 1px solid #fecaca;
  font-weight: 600;
}

.storage-banner span { flex: 1; }

.storage-banner-link {
  font-size: 12px;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid currentColor;
  text-decoration: none;
  color: currentColor;
  opacity: 0.85;
  white-space: nowrap;
}
.storage-banner-link:hover { opacity: 1; }

.storage-banner-dismiss {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border: 0;
  background: transparent;
  color: currentColor;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.6;
  border-radius: 4px;
}
.storage-banner-dismiss:hover { opacity: 1; background: rgba(0,0,0,0.06); }

/* ── 24. ATTACHMENT FIELD ──────────────────────────────────────────────── */
.attachment-field {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fbfcfc;
}

.attachment-icon {
  flex-shrink: 0;
  font-size: 18px;
}

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

.attachment-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.attachment-size {
  font-size: 11px;
  color: var(--text-soft);
}

.attachment-item-wrap {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.attachment-preview-img {
  max-width: 100%;
  max-height: 320px;
  border-radius: 6px;
  border: 1px solid var(--border);
  object-fit: contain;
  background: var(--soft-bg);
}

.attachment-preview-link {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--accent);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  white-space: nowrap;
  font-family: inherit;
}

.attachment-preview-link:hover {
  text-decoration: underline;
}

.attachment-remove {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 16px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
}

.attachment-remove:hover {
  background: #fef0f0;
  color: var(--danger);
}

.attachment-dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 16px;
  border: 2px dashed var(--border-strong);
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.attachment-dropzone:hover,
.attachment-dropzone--active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 5%, transparent);
}

.attachment-dropzone-icon {
  font-size: 20px;
}

.attachment-dropzone-text {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
}

.attachment-dropzone-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.attachment-file-input {
  display: none;
}

.attachment-error {
  margin: 0;
  padding: 6px 10px;
  border-radius: 6px;
  background: #fef0f0;
  border: 1px solid #fecaca;
  color: var(--danger);
  font-size: 12px;
}

.attachment-drive-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px dashed var(--border);
  border-radius: 8px;
  background: none;
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  cursor: pointer;
  transition: border-color 0.15s, color 0.15s;
  align-self: flex-start;
}
.attachment-drive-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.attachment-drive-row {
  display: flex;
  gap: 6px;
  align-items: center;
}
.attachment-drive-input {
  flex: 1;
  min-width: 0;
  padding: 7px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  background: var(--surface);
  color: var(--text-strong);
  outline: none;
  transition: border-color 0.15s;
}
.attachment-drive-input:focus {
  border-color: var(--accent);
}
.attachment-drive-row .primary-button,
.attachment-drive-row .secondary-button {
  min-width: 0;
  height: auto;
  min-height: 34px;
  padding: 6px 12px;
  font-size: 12.5px;
  flex-shrink: 0;
}

.attachment-drive-preview {
  width: 100%;
  height: 360px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft-bg);
}

/* Keep app links from falling back to browser-blue underlined hypertext. */
.content a:not(.primary-button):not(.secondary-button):not(.quick-action-card) {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  text-underline-offset: 2px;
}

.content a:not(.primary-button):not(.secondary-button):not(.quick-action-card):hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.content a:not(.primary-button):not(.secondary-button):not(.quick-action-card):focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

/* ── Slack updates workspace ───────────────────────────────────────────── */
.slack-connect-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.slack-connect-main {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-width: 0;
}

.slack-connect-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft-bg);
}

.slack-connect-main h2,
.slack-project-item h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 15px;
  font-weight: 750;
}

.slack-connect-main p,
.slack-project-item p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.slack-connect-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.slack-settings-panel {
  margin-bottom: 16px;
}

.slack-settings-form {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(260px, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.slack-settings-form label {
  display: grid;
  gap: 6px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.slack-settings-form input {
  height: 38px;
  width: 100%;
}

.slack-error {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #fecaca;
  border-radius: 8px;
  background: #fff5f5;
  color: var(--danger);
  font-size: 13px;
  font-weight: 650;
}

.slack-updates-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, 0.75fr);
  gap: 16px;
}

.slack-feed-panel,
.slack-project-panel {
  min-height: 280px;
}

.slack-source-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.slack-update-list,
.slack-project-list {
  display: grid;
  gap: 0;
}

.slack-update-item {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.slack-update-item:last-child,
.slack-project-item:last-child {
  border-bottom: 0;
}

.slack-avatar {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 800;
}

.slack-update-body {
  min-width: 0;
}

.slack-update-topline,
.slack-update-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.slack-update-topline strong {
  color: var(--text-strong);
  font-size: 13.5px;
}

.slack-update-topline span,
.slack-update-meta {
  color: var(--text-soft);
  font-size: 12px;
}

.slack-update-body p {
  margin: 7px 0 0;
  color: var(--text-strong);
  font-size: 13.5px;
  line-height: 1.55;
}

.slack-tone {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
}

.slack-tone--active { background: var(--soft-bg); color: var(--text-muted); }
.slack-tone--review { background: #fef8ec; color: #8a5a00; }
.slack-tone--done { background: #e9f7ee; color: #1a6b37; }
.slack-tone--blocked { background: #fef0f0; color: #a93030; }

.slack-project-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
}

.slack-project-item .avatar-row {
  flex: 0 0 auto;
}

/* Activity table */
.activities-table {
  table-layout: fixed;
}
.activities-table th:nth-child(1) { width: 200px; }
.activities-table th:nth-child(2) { width: 120px; }
.activities-table th:nth-child(4) { width: 150px; }
.activities-table th:nth-child(5) { width: 132px; }
.activities-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

/* ── 22. SORTABLE TABLE HEADERS ─────────────────────────────────────────── */
.sortable-th {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  vertical-align: middle;
}
.sortable-th:hover { color: var(--accent); }
.sortable-th--active { color: var(--accent); }
.sortable-th svg { vertical-align: -1px; margin-left: 3px; opacity: 0.45; flex-shrink: 0; }
.sortable-th--active svg { opacity: 1; }

/* ── 25. MOBILE CARD LAYOUT (RESPONSIVE TABLES) ────────────────────────── */
.mobile-card-list {
  display: none;
}

@media (max-width: 640px) {
  .table-wrap.has-mobile-cards {
    display: none !important;
  }
  .bulk-action-bar {
    border-radius: 8px 8px 0 0;
  }
  .mobile-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 12px;
    background: var(--page-bg);
  }
  .mobile-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: var(--shadow-sm);
  }
  .mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 8px;
    flex-wrap: wrap;
  }
  .mobile-card-select-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    color: var(--text-strong);
    cursor: pointer;
  }
  .mobile-card-select-label input {
    width: 14px;
    height: 14px;
    margin: 0;
  }
  .mobile-card-title-link {
    color: var(--accent);
    font-weight: 750;
    text-decoration: none;
    min-width: 0;
    overflow-wrap: anywhere;
  }
  .mobile-card-title-link:hover {
    text-decoration: underline;
  }
  .mobile-card-header-badges {
    display: flex;
    align-items: center;
    gap: 6px;
  }
  .mobile-card-title {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: var(--text-strong);
    line-height: 1.4;
  }
  .mobile-card-title a,
  .mobile-card-title button {
    color: var(--accent);
    text-decoration: none;
    font-weight: 700;
    background: transparent;
    border: 0;
    padding: 0;
    text-align: left;
    cursor: pointer;
  }
  .mobile-card-title a:hover,
  .mobile-card-title button:hover {
    text-decoration: underline;
  }
  .mobile-card-title a:focus-visible,
  .mobile-card-title button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
    border-radius: 4px;
  }
  .mobile-card-desc {
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.45;
  }
  .mobile-card-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    padding: 10px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
  }
  .mobile-card-details > div {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }
  .mobile-card-details span {
    font-size: 9px;
    font-weight: 700;
    color: var(--text-soft);
    text-transform: uppercase;
    letter-spacing: 0.05em;
  }
  .mobile-card-details strong {
    font-size: 12px;
    color: var(--text-strong);
    font-weight: 600;
  }
  .mobile-card-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-top: 4px;
    flex-wrap: wrap;
  }
  .mobile-card-action-btn {
    flex: 1 1 60px;
    min-width: 60px;
    min-height: 32px !important;
    height: 32px !important;
    padding: 0 8px !important;
    font-size: 11px !important;
  }
}

@media (max-width: 420px) {
  .mobile-card {
    padding: 14px;
  }
  .mobile-card-details {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .mobile-card-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .mobile-card-action-btn {
    width: 100%;
  }
}

/* ── 26. SETTINGS RECENT ACTIVITY BLOCK ──────────────────────────────────── */
.settings-activity-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 8px 0;
}

.settings-activity-item {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  background: var(--soft-bg);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.settings-activity-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.settings-activity-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  min-width: 0;
  overflow-wrap: anywhere;
  flex: 1 1 200px;
}

.settings-activity-time {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--text-muted);
  flex-shrink: 0;
}

.settings-activity-meta {
  font-size: 12px;
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

/* Settings member panel responsive */
@media (max-width: 640px) {
  .settings-member-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }
  .settings-member-item .member-info {
    flex-wrap: wrap;
    width: 100%;
  }
  .settings-member-item .member-name {
    font-size: 13px;
  }
  .assign-controls {
    padding: 12px;
  }
  .input-with-button {
    flex-direction: column;
  }
  .input-with-button input {
    width: 100%;
  }
  .danger-body {
    flex-direction: column;
    text-align: center;
  }
  .danger-body .danger-button {
    width: 100%;
  }
}

/* ── 23. PRINT / PDF REPORT ──────────────────────────────────────────────── */


/* Hide desktop table when mobile cards are shown */
@media (max-width: 640px) {
  .table-wrap + .mobile-card-list ~ .table-pagination {
    margin-top: 0;
  }
}
@media print {
  /* Hide chrome */
  .topbar,
  .project-sidebar,
  .storage-banner,
  .page-actions-row,
  .toolbar,
  .bulk-action-bar,
  .table-pagination,
  .row-actions,
  .toast-container,
  .confirm-overlay { display: none !important; }

  /* Flatten layout */
  .app-shell { display: block; background: #fff; }
  .workspace { display: block; padding: 0; }
  .content { padding: 16px 0; max-width: none; }
  body { background: #fff; color: #000; font-size: 11pt; }

  /* Panels */
  .panel {
    box-shadow: none;
    border: 1px solid #ddd;
    border-radius: 4px;
    break-inside: avoid;
    margin-bottom: 16px;
  }

  /* Charts */
  .report-grid { display: block; }
  .chart-panel { page-break-inside: avoid; }

  /* Tables */
  table { width: 100%; border-collapse: collapse; font-size: 9pt; }
  th, td { border: 1px solid #ccc; padding: 4px 6px; }
  thead { background: #f5f5f5 !important; }

  /* Metric cards */
  .metric-grid { display: flex; gap: 8px; flex-wrap: wrap; }
  .metric-card { border: 1px solid #ddd; padding: 8px 12px; border-radius: 4px; }

  /* Insights */
  .insight-item { break-inside: avoid; }

  /* Project overview bar */
  .project-overview-bar { border: 1px solid #ddd; margin-bottom: 12px; }

  /* Page title */
  .page-header { margin-bottom: 12px; }

  /* Anything explicitly marked no-print (e.g. the Export PDF button itself) */
  .no-print { display: none !important; }

  /* Release readiness (global reports): keep colors, avoid ugly breaks */
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .rr-banner,
  .rr-signal-card { box-shadow: none; border: 1px solid #ddd; }
  .rr-banner,
  .rr-signal-card,
  .rr-project-row,
  .rr-project-list-head,
  .rr-risk-row,
  .rr-attention-item { break-inside: avoid; }
  .rr-signals { display: grid; grid-template-columns: repeat(4, 1fr); }
  .status-pill,
  .rr-stacked-seg,
  .rr-readiness-dot,
  .rr-mini-fill,
  .rr-risk-fill,
  .rr-attention-dot,
  .rr-sev,
  .priority-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* ── Reworked Project Status cards ─────────────────────────── */
.psc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(420px, 1fr));
  gap: 12px;
  padding: 14px 16px;
}
@media (max-width: 520px) {
  .psc-grid { grid-template-columns: 1fr; }
}
.psc-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  transition: border-color 0.15s;
}
.psc-card:hover { border-color: var(--border-strong); }
.psc-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.psc-card-identity {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 0;
}
.psc-card-name {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.psc-card-rate {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  flex-shrink: 0;
}
.psc-card-rate strong {
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
}
.psc-card-rate .psc-muted {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.psc-card-link {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s;
}
.psc-card-link:hover { background: var(--accent-soft); }
.psc-card-metrics {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
}
@media (max-width: 520px) {
  .psc-card-metrics { grid-template-columns: repeat(4, 1fr); }
}
.psc-card-metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  padding: 6px 4px;
  border-radius: 6px;
  background: var(--soft-bg);
}
.psc-card-metric-val {
  font-size: 15px;
  font-weight: 750;
  color: var(--text-strong);
  line-height: 1.1;
}
.psc-card-metric-label {
  font-size: 9px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.psc-card-metric--pass .psc-card-metric-val { color: var(--success); }
.psc-card-metric--fail .psc-card-metric-val { color: var(--danger); }
.psc-card-metric--blocker .psc-card-metric-val { color: #c00; }
.psc-card-metric--bug .psc-card-metric-val { color: var(--danger); }
.psc-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  color: var(--text-muted);
}
.psc-card-run { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.psc-card-run strong { color: var(--text-strong); font-weight: 600; }
.psc-card-action {
  flex-shrink: 0;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 3px 8px;
  border-radius: 5px;
  white-space: nowrap;
}

/* ── Reworked QA Process Summary ─────────────────────────────── */
.qa-process-body {
  padding: 14px 18px 16px;
}
.qa-process-summary-text {
  margin: 0 0 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
}
.qa-process-indicators {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}
@media (max-width: 520px) {
  .qa-process-indicators { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 380px) {
  .qa-process-indicators { grid-template-columns: 1fr; }
}
.qa-process-indicator {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}
.qa-process-ind-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
}
/* ── 27. RELEASE READINESS PAGE ─────────────────────────────────────────── */

/* Empty state */
.rr-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 320px;
  padding: 40px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: var(--surface);
  text-align: center;
}
.rr-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 10px;
  opacity: 0.7;
}
.rr-empty h2 {
  margin: 0 0 6px;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-strong);
}
.rr-empty p {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--text-muted);
  max-width: 340px;
  line-height: 1.5;
}

/* Section layout */
.rr-section {
  margin-top: 16px;
  margin-bottom: 18px;
}
.rr-section-title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border);
}
.rr-section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
}
.rr-section-head .rr-section-title {
  padding: 0;
  border-bottom: 0;
}
.rr-section-note {
  color: var(--text-soft);
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}

/* ── Header "as of" stamp (shareable in a meeting) ─────────────────── */
.rr-asof {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}

/* ── Quality signals (the QA-lead scan layer) ──────────────────────── */
.rr-signals {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}
.rr-signal-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
.rr-signal-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.rr-signal-value {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.05;
  color: var(--text-strong);
}
.rr-signal-sub {
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.4;
}
.rr-sev-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rr-sev {
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  white-space: nowrap;
  text-decoration: none;
}
.rr-sev--critical { background: #fbe3e3; color: #7f1d1d; border-color: #e7a3a3; }
.rr-sev--major    { background: #fef8ec; color: #8a5a00; border-color: #fde68a; }
.rr-sev--minor    { background: var(--soft-bg); color: var(--text-muted); border-color: var(--border-strong); }

/* ── Top risk areas (failing modules) ──────────────────────────────── */
.rr-risk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 12px;
}
.rr-risk-row {
  display: grid;
  grid-template-columns: minmax(96px, 160px) 1fr auto;
  align-items: center;
  gap: 12px;
}
.rr-risk-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rr-risk-bar {
  height: 6px;
  border-radius: 999px;
  background: var(--soft-bg);
  overflow: hidden;
}
.rr-risk-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--danger);
}
.rr-risk-fill--failed { background: var(--danger); }
.rr-risk-fill--pending { background: var(--warning); }
.rr-risk-fill--neutral { background: var(--border-strong, #a3a3a3); }
.rr-risk-count {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  white-space: nowrap;
}
@media (max-width: 520px) {
  .rr-risk-row { grid-template-columns: 1fr auto; }
  .rr-risk-bar { display: none; }
}

/* Stale latest-run emphasis (higher specificity than .rr-run-date / .rr-muted) */
.rr-run-cell .rr-run-date--stale {
  color: var(--warning);
  font-weight: 600;
}

/* ── Readiness banner ──────────────────────────────────────────────── */
.rr-banner {
  display: flex;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  padding: 16px 20px;
  margin-bottom: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
@media (max-width: 640px) {
  .rr-banner {
    flex-direction: column;
    align-items: stretch;
    gap: 14px;
    padding: 14px 16px;
  }
}
.rr-banner-status {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.rr-readiness-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rr-readiness-dot--passed  { background: var(--success); }
.rr-readiness-dot--pending { background: var(--warning); }
.rr-readiness-dot--failed  { background: var(--danger); }
.rr-readiness-dot--neutral { background: var(--text-soft); }
.rr-readiness-label {
  font-size: 15px;
  font-weight: 750;
  white-space: nowrap;
}
/* Banner stats: grid for stable alignment at all widths */
.rr-banner-stats {
  display: grid;
  grid-template-columns: repeat(4, auto);
  gap: 0 20px;
  align-items: center;
}
@media (max-width: 520px) {
  .rr-banner-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 16px;
  }
}
.rr-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4px 8px;
}
.rr-stat-val {
  font-size: 20px;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.1;
  white-space: nowrap;
}
.rr-stat-dim {
  font-size: 13px;
  font-weight: 500;
  color: var(--text-soft);
}
.rr-stat-label {
  font-size: 9px;
  font-weight: 700;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 2px;
  white-space: nowrap;
}
.rr-banner-bar {
  width: 100%;
  margin-top: 2px;
}
.rr-stacked-bar {
  display: flex;
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: var(--soft-bg);
  gap: 1px;
}
.rr-stacked-seg {
  display: block;
  min-width: 2px;
}
.rr-stacked-seg--passed  { background: var(--success); }
.rr-stacked-seg--failed  { background: var(--danger); }
.rr-stacked-seg--blocker { background: #7f1d1d; }
.rr-stacked-seg--skipped { background: var(--text-soft); }
.rr-stacked-seg--pending { background: var(--border-strong); }

/* ── Attention list ────────────────────────────────────────────────── */
.rr-attention-list {
  display: grid;
  gap: 6px;
  padding: 12px 16px;
}
.rr-attention-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-strong);
  font-weight: 500;
}
.rr-attention-dot {
  flex-shrink: 0;
  width: 6px;
  height: 6px;
  border-radius: 50%;
}
.rr-attention-dot--failed  { background: var(--danger); }
.rr-attention-dot--pending { background: var(--warning); }
.rr-attention-dot--passed  { background: var(--success); }
.rr-attention-dot--neutral { background: var(--text-soft); }
.rr-attention-text {
  min-width: 0;
  overflow-wrap: anywhere;
}

/* ── Project readiness table (desktop) ─────────────────────────────── */
.rr-project-table-wrap {
  overflow-x: auto;
  margin: 0 -4px;
  padding: 0 4px;
}
.rr-project-table {
  table-layout: fixed;
  width: 100%;
  min-width: 860px;
}
/* Column widths — sized to prevent content overlap */
.rr-pt-name   { width: 170px; }
.rr-pt-status { width: 100px; }
.rr-pt-rate   { width: 120px; }
.rr-pt-cases  { width: 64px; }
.rr-pt-fail   { width: 64px; }
.rr-pt-block  { width: 68px; }
.rr-pt-bugs   { width: 72px; }
.rr-pt-run    { width: auto; }
.rr-pt-action { width: 132px; }

.rr-project-table td,
.rr-project-table th {
  overflow: hidden;
}
.rr-project-table td {
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: normal;
  vertical-align: middle;
  padding: 10px 12px;
}
.rr-project-table th {
  white-space: nowrap;
  text-align: left;
}
.rr-project-table td.rr-pt-name,
.rr-project-table td.rr-pt-run {
  white-space: normal;
}

/* Project name — truncate cleanly */
.rr-project-link {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  min-width: 0;
}
.rr-project-link:hover {
  text-decoration: underline;
}

/* Pass rate cell with mini-bar */
.rr-rate-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
}
.rr-rate-cell > span {
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.rr-mini-bar {
  width: 100%;
  height: 4px;
  background: var(--soft-bg);
  border-radius: 999px;
  overflow: hidden;
  flex-shrink: 0;
}
.rr-mini-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  transition: width 0.3s ease;
}
.rr-mini-fill--passed  { background: var(--success); }
.rr-mini-fill--pending { background: var(--warning); }
.rr-mini-fill--failed  { background: var(--danger); }
.rr-mini-fill--neutral { background: var(--text-soft); }

/* Latest run — truncate long names */
.rr-run-info {
  font-size: 12px;
  color: var(--text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rr-run-date {
  font-size: 11px;
  color: var(--text-soft);
  white-space: nowrap;
}
.rr-muted {
  color: var(--text-soft);
  font-size: 12px;
}

/* Action link pill */
.rr-action-link {
  display: inline-flex;
  font-size: 11.5px;
  font-weight: 650;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 10px;
  border-radius: 5px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.15s;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rr-action-link:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

/* Hide desktop table on mobile, show cards */
.rr-project-cards {
  display: none;
}
@media (max-width: 860px) {
  .rr-project-table-wrap { display: none; }
  .rr-project-cards {
    display: grid;
    gap: 10px;
    padding: 12px 0;
  }
}

/* ── Project readiness cards (mobile) ──────────────────────────────── */
.rr-project-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  overflow: hidden;
}
.rr-pc-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}
.rr-pc-header .rr-project-link {
  min-width: 0;
  flex: 1 1 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rr-pc-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--text-muted);
}
.rr-pc-stats span {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}
.rr-pc-stats strong {
  font-weight: 750;
}
.rr-pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
  min-width: 0;
}
.rr-pc-footer .rr-muted {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Project readiness list (single responsive layout) ───────────────── */
.rr-project-list {
  display: grid;
  gap: 8px;
  padding-top: 12px;
}

.rr-project-list-head,
.rr-project-row {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 112px 116px 106px minmax(118px, 0.72fr) minmax(180px, 0.95fr) 132px;
  column-gap: 14px;
  row-gap: 10px;
  align-items: center;
}

.rr-project-list-head {
  padding: 0 14px 2px;
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.rr-project-row {
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.rr-project-main,
.rr-rate-cell,
.rr-run-cell,
.rr-action-cell {
  min-width: 0;
}

.rr-project-main,
.rr-run-cell {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.rr-project-main .rr-project-link {
  color: var(--text-strong);
}

.rr-project-main .rr-project-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.rr-row-subtext {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 550;
}

.rr-rate-value {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.05;
}

.rr-row-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.rr-row-metric strong {
  color: var(--text-strong);
  font-size: 16px;
  font-weight: 800;
  line-height: 1.05;
}

.rr-row-metric span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 550;
  white-space: nowrap;
}

.rr-issue-stack {
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  min-width: 0;
}

.rr-issue-stack span,
.rr-issue-stack a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  padding: 5px 8px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 650;
  line-height: 1.25;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
  text-decoration: none;
}

.rr-issue-stack strong {
  color: inherit;
  font-size: 12px;
  font-weight: 800;
  flex-shrink: 0;
}

.rr-run-cell .rr-run-info {
  color: var(--text-strong);
  font-weight: 650;
}

.rr-run-cell .rr-run-date {
  display: block;
  color: var(--text-soft);
  font-size: 11px;
}

.rr-action-cell {
  display: flex;
  justify-content: flex-end;
}

@media (max-width: 1080px) {
  .rr-project-list-head {
    display: none;
  }

  .rr-project-row {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "project status"
      "rate rate"
      "executed issues"
      "run action";
    align-items: start;
    gap: 12px;
  }

  .rr-project-main { grid-area: project; }
  .rr-project-status { grid-area: status; justify-self: end; }
  .rr-rate-cell { grid-area: rate; }
  .rr-row-metric { grid-area: executed; }
  .rr-issue-stack { grid-area: issues; }
  .rr-run-cell { grid-area: run; }
  .rr-action-cell { grid-area: action; justify-content: flex-end; }

  .rr-issue-stack {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .rr-issue-stack span {
    justify-content: center;
    text-align: center;
  }
}

@media (max-width: 560px) {
  .rr-project-row {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "project"
      "status"
      "rate"
      "executed"
      "issues"
      "run"
      "action";
  }

  .rr-project-status,
  .rr-action-cell {
    justify-self: stretch;
    justify-content: stretch;
  }

  .rr-action-link {
    width: 100%;
    justify-content: center;
  }

  .rr-issue-stack {
    grid-template-columns: 1fr;
  }
}

/* ── Print ─────────────────────────────────────────────────────────── */
@media print {
  .rr-banner { border: 1px solid #ddd; box-shadow: none; }
  .rr-project-card { break-inside: avoid; border: 1px solid #ddd; }
}
.rr-pc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--border);
  font-size: 12px;
}
.rr-pc-footer .rr-muted {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Print ─────────────────────────────────────────────────────────── */
@media print {
  .rr-banner { border: 1px solid #ddd; box-shadow: none; }
  .rr-project-card { break-inside: avoid; border: 1px solid #ddd; }
}

/* ── 25. ACTIVE PRESENCE INDICATORS ─────────────────────────────────────────── */
.project-presence {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 12px;
}

.presence-avatar-wrap {
  position: relative;
  display: inline-flex;
}

.presence-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #ffffff;
  font-size: 10px;
  font-weight: 600;
  border: 2px solid var(--surface);
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
  text-transform: uppercase;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s;
  padding: 0;
  margin: 0;
}

.presence-avatar:hover {
  transform: scale(1.15);
  box-shadow: 0 3px 6px rgba(0,0,0,0.2);
  z-index: 10;
}

.presence-tooltip {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translate(-50%, 8px) scale(0.95);
  background: #202124;
  color: #ffffff;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.presence-tooltip::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-bottom-color: #202124;
}

@media (hover: hover) {
  .presence-avatar-wrap:hover .presence-tooltip {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 8px) scale(1);
  }
}

.presence-tooltip-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
}

.presence-tooltip-status-dot {
  width: 6px;
  height: 6px;
  background: #34a853;
  border-radius: 50%;
  display: inline-block;
}

.presence-tooltip-page {
  font-size: 11px;
  color: #bdc1c6;
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Cycle colors for avatars */
.presence-avatar-wrap:nth-child(5n+1) .presence-avatar { background: #1a73e8; }
.presence-avatar-wrap:nth-child(5n+2) .presence-avatar { background: #34a853; }
.presence-avatar-wrap:nth-child(5n+3) .presence-avatar { background: #f9ab00; }
.presence-avatar-wrap:nth-child(5n+4) .presence-avatar { background: #ea4335; }
.presence-avatar-wrap:nth-child(5n+5) .presence-avatar { background: #8ab4f8; }

/* ── 26. NOTIFICATION CENTER ────────────────────────────────────────────────── */
.notification-center-wrap {
  position: relative;
  display: inline-flex;
}

.notification-bell-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 8px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: background-color 0.2s, transform 0.15s;
}

.notification-bell-btn:hover {
  background: rgba(0, 0, 0, 0.05);
}

.notification-bell-btn:active {
  transform: scale(0.95);
}

.notification-badge-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 8px;
  height: 8px;
  background: #ea4335; /* Alert Red */
  border-radius: 50%;
  border: 1.5px solid var(--surface);
}

.notification-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 8px;
  width: 320px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 1000;
  display: flex;
  flex-direction: column;
  max-height: 400px;
  overflow: hidden;
  animation: slideDownIn 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes slideDownIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.notification-header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--soft-bg);
}

.notification-header h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-strong);
}

.notification-actions {
  display: flex;
  gap: 8px;
}

.notification-actions .btn-link {
  background: transparent;
  border: none;
  font-size: 11px;
  font-weight: 500;
  color: var(--accent);
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.notification-actions .btn-link:hover {
  text-decoration: underline;
}

.notification-actions .btn-link.text-danger {
  color: #ea4335;
}

.notification-list {
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.notification-empty {
  padding: 32px 16px;
  text-align: center;
  color: #70757a;
  font-size: 13px;
}

.notification-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  cursor: pointer;
  transition: background-color 0.2s;
  position: relative;
  align-items: flex-start;
}

.notification-item:last-child {
  border-bottom: none;
}

.notification-item:hover {
  background: var(--soft-bg);
}

.notification-item.unread {
  background: rgba(26, 115, 232, 0.04);
}

.notification-item.unread:hover {
  background: rgba(26, 115, 232, 0.08);
}

.notification-item-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 50%;
  background: #f1f3f4;
  color: #5f6368;
  flex-shrink: 0;
  margin-top: 2px;
}

.notification-item.unread .notification-item-icon {
  background: rgba(26, 115, 232, 0.1);
  color: var(--accent);
}

.notification-item-icon .icon-bug {
  color: #ea4335;
}

.notification-item-icon .icon-test-case {
  color: #1a73e8;
}

.notification-item-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.notification-message {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  word-break: break-word;
}

.notification-item.unread .notification-message {
  font-weight: 500;
  color: var(--text-strong);
}

.notification-time {
  font-size: 10px;
  color: #70757a;
}

.unread-bullet {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
  position: absolute;
  top: 18px;
  right: 16px;
}

@media (max-width: 480px) {
  .notification-dropdown {
    position: fixed;
    top: 68px;
    left: 12px;
    right: 12px;
    width: auto;
    max-width: calc(100vw - 24px);
    z-index: 1001;
  }
}

/* ── 27. TAB NAVIGATION ────────────────────────────────────────────────────── */
.tab-navigation {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 20px;
  overflow-x: auto;
  white-space: nowrap;
  scrollbar-width: none; /* Firefox */
}

.tab-navigation::-webkit-scrollbar {
  display: none; /* Safari and Chrome */
}

.tab-btn {
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  padding: 10px 16px;
  font-size: 13px;
  font-weight: 550;
  color: var(--text-soft);
  cursor: pointer;
  transition: all 0.2s;
  margin-bottom: -1px;
  flex-shrink: 0;
}

.tab-btn:hover {
  color: var(--text-strong);
  background: var(--soft-bg);
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.tab-btn--active {
  color: var(--accent);
  border-bottom-color: var(--accent);
  font-weight: 600;
}

/* ── 28. SHARED STEP BUILDER & DISPLAY ──────────────────────────────────────── */
.shared-step-row {
  background: var(--page-bg);
  border: 1px dashed var(--border) !important;
  border-radius: 6px;
  padding: 8px 12px !important;
}

.shared-step-block {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shared-step-block-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.icon-shared {
  color: var(--accent);
  flex-shrink: 0;
}

.shared-badge {
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 10px;
  text-transform: uppercase;
}

.shared-step-nested-list {
  margin: 4px 0 0 20px;
  padding: 0;
  list-style-type: decimal;
  font-size: 12px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.shared-step-empty {
  font-size: 11px;
  color: var(--text-soft);
  margin-left: 20px;
  font-style: italic;
}

/* Dropdown styling for shared step picker */
.step-builder-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  align-items: center;
}

.step-add.secondary {
  background: var(--surface);
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.step-add.secondary:hover {
  background: var(--soft-bg);
}

.shared-step-selector-wrap {
  position: relative;
  display: inline-flex;
}

.shared-step-select-dropdown {
  position: absolute;
  bottom: 100%;
  left: 0;
  margin-bottom: 8px;
  width: 240px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: var(--shadow-md);
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 4px 0;
  max-height: 200px;
  overflow-y: auto;
}

.shared-step-select-dropdown .dropdown-title {
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  border-bottom: 1px solid var(--border);
  text-transform: uppercase;
  margin-bottom: 4px;
}

.shared-step-select-dropdown .dropdown-item {
  background: transparent;
  border: none;
  width: 100%;
  padding: 8px 12px;
  font-size: 12px;
  text-align: left;
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s;
}

.shared-step-select-dropdown .dropdown-item:hover {
  background: var(--soft-bg);
  color: var(--accent);
}

/* Display items in Read-Only details and run screen */
.shared-step-display-item {
  list-style: none !important;
  margin: 12px 0;
  padding: 12px 16px;
  background: var(--page-bg);
  border: 1px dashed var(--border);
  border-radius: 8px;
}

.shared-step-display-item::before {
  content: none !important;
}

.shared-step-display-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 13px;
  color: var(--text-strong);
}

.shared-step-display-list {
  margin: 4px 0 0 16px;
  padding: 0;
  list-style-type: decimal;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.shared-step-display-list li {
  line-height: 1.4;
}

.shared-step-display-list li::marker {
  color: var(--accent);
  font-weight: 600;
}

.runner-shared-step-block {
  list-style: none !important;
  margin: 10px 0;
  padding: 10px 14px;
  background: var(--page-bg);
  border: 1px dashed var(--border);
  border-radius: var(--radius-sm);
}

.runner-shared-step-block::before {
  content: none !important;
}

.runner-shared-step-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-strong);
}

.runner-shared-substeps {
  margin: 4px 0 0 16px;
  padding: 0;
  list-style-type: decimal;
  font-size: 12.5px;
  color: var(--text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.runner-shared-substeps li {
  line-height: 1.4;
}

.runner-shared-substeps li::marker {
  color: var(--primary);
  font-weight: 600;
}

/* Table row action buttons (minimal, no background box) */
.table-row-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-btn-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  padding: 4px;
  margin: 0;
  color: var(--text-soft);
  cursor: pointer;
  transition: color 0.15s ease, transform 0.1s ease;
}

.icon-btn-action:hover {
  color: var(--text-strong);
}

.icon-btn-action.text-danger:hover {
  color: var(--danger);
}

.icon-btn-action:active {
  transform: scale(0.95);
}

.icon-btn-action--run {
  color: var(--accent);
}
.icon-btn-action--run:hover {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* ── Workspace Settings Panel Redesign ─────────────────────────────────── */
.settings-container {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 28px;
  align-items: start;
  margin-top: 20px;
}

@media (max-width: 768px) {
  .settings-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

.settings-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  box-shadow: var(--shadow-sm);
}

@media (max-width: 768px) {
  .settings-nav {
    flex-direction: row;
    overflow-x: auto;
    padding: 8px;
  }
}

.settings-nav-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: none;
  background: none;
  color: var(--text-muted);
  font-size: 13.5px;
  font-weight: 550;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.settings-nav-btn:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
}

.settings-nav-btn--active {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 655;
}

.settings-view {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.settings-card-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fcfdfe;
}

.settings-card-header h3 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
}

.settings-card-body {
  padding: 20px;
}

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

.settings-grid-field {
  display: grid;
  gap: 6px;
}

.settings-grid-field label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
}

.settings-grid-field input,
.settings-grid-field select {
  width: 100%;
}

.settings-action-row {
  display: flex;
  justify-content: flex-end;
  margin-top: 8px;
}

.settings-search-bar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
}

.settings-search-input-wrap {
  position: relative;
  flex: 1;
  min-width: 240px;
}

.settings-search-input-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
}

.settings-search-input-wrap input {
  padding-left: 32px;
  width: 100%;
}

/* User Directory Grid/Flex Row */
.directory-user-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.directory-user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 650;
  font-size: 12px;
  flex-shrink: 0;
}

/* Connection Badges */
.connection-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
}

.connection-badge--cloud {
  background: #eff6ff;
  color: #1d4ed8;
}

.connection-badge--local {
  background: #f1f5f9;
  color: #475569;
}

/* Activity log formatting inside settings */
.activity-feed-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-feed-item {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  display: flex;
  gap: 12px;
  align-items: flex-start;
  transition: background 0.15s ease;
}

.activity-feed-item:last-child {
  border-bottom: none;
}

.activity-feed-item:hover {
  background: var(--soft-bg);
}

.activity-feed-icon-container {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  background: var(--soft-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  flex-shrink: 0;
  margin-top: 2px;
}

.activity-feed-content {
  flex: 1;
  display: grid;
  gap: 2px;
}

.activity-feed-title {
  font-size: 13.5px;
  color: var(--text-strong);
  font-weight: 550;
  margin: 0;
}

.activity-feed-meta {
  font-size: 11.5px;
  color: var(--text-muted);
}

.activity-feed-details {
  font-size: 12px;
  color: var(--text-soft);
  margin-top: 4px;
  background: var(--surface-hover);
  padding: 6px 10px;
  border-radius: 4px;
  border: 1px solid var(--border);
  display: inline-block;
  max-width: 100%;
  word-break: break-all;
}

/* Add member section styling */
.add-member-section {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 20px;
  box-shadow: var(--shadow-sm);
  display: grid;
  gap: 14px;
}

.add-member-form-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: end;
}

@media (max-width: 640px) {
  .add-member-form-row {
    grid-template-columns: 1fr;
  }
}

/* Role Pill Badges in Top Bar */
.role-badge {
  display: inline-flex;
  align-items: center;
  padding: 1.5px 6px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1;
}

.role-badge--lead {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.role-badge--tester {
  background: #e0f2fe;
  color: #0369a1;
  border: 1px solid #bae6fd;
}

.role-badge--developer {
  background: #f3e8ff;
  color: #7e22ce;
  border: 1px solid #e9d5ff;
}

.role-badge--viewer {
  background: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

/* ============================================================
   Landing page (public, logged-out front door) — .lp-*
   ============================================================ */
.lp {
  min-height: 100vh;
  background: var(--page-bg);
  color: var(--text-strong);
  font-family: var(--sans);
  overflow-x: hidden;
}

/* --- Top nav --- */
.lp-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) clamp(var(--space-4), 5vw, 64px);
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.lp-brand {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-strong);
  text-decoration: none;
}
.lp-brand .brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
}
.lp-nav-links {
  display: flex;
  align-items: center;
  gap: clamp(var(--space-3), 2vw, var(--space-5));
}
.lp-nav-links > a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}
.lp-nav-links > a:hover { color: var(--text-strong); }
.lp-nav-signin {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0;
}
.lp-nav-signin:hover { color: var(--text-strong); }
.lp-nav-cta { padding: 8px 16px; }

/* --- Layout shell --- */
.lp-main {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 clamp(var(--space-4), 5vw, 48px);
}
.lp-section { padding: clamp(56px, 9vw, 104px) 0; }
.lp-section-head {
  max-width: 640px;
  margin: 0 auto clamp(var(--space-5), 5vw, 56px);
  text-align: center;
}
.lp-section-head h2 {
  font-size: clamp(1.5rem, 3.2vw, 2.1rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-3);
}
.lp-section-head p {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.02rem;
}

/* --- Hero --- */
.lp-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(var(--space-5), 5vw, 64px);
  align-items: center;
  padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px);
}
.lp-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent-strong);
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  padding: 5px 11px;
  border-radius: 999px;
  margin-bottom: var(--space-4);
}
.lp-h1 {
  font-size: clamp(2.1rem, 5.2vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 var(--space-4);
  font-weight: 750;
}
.lp-sub {
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 var(--space-5);
  max-width: 36ch;
}
.lp-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}
.lp-cta-primary { padding: 12px 22px; font-size: 0.98rem; }
.lp-cta-secondary { padding: 12px 22px; font-size: 0.98rem; }
.lp-trust {
  margin: var(--space-4) 0 0;
  font-size: 0.85rem;
  color: var(--text-soft);
}

/* --- Hero snapshot (real-component-style preview) --- */
.lp-hero-visual { display: flex; justify-content: center; }
.lp-snap {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: var(--space-5);
  transform: rotate(0.4deg);
}
.lp-snap-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}
.lp-snap-head strong { font-size: 0.98rem; }
.lp-snap-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--text-soft);
}
.lp-snap-dot--ok { background: var(--success); }
.lp-snap-verdict {
  margin-left: auto;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--success);
  background: color-mix(in srgb, var(--success) 12%, transparent);
  padding: 3px 9px;
  border-radius: 999px;
}
.lp-snap-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}
.lp-snap-stats > div {
  background: var(--soft-bg);
  border-radius: var(--radius);
  padding: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.lp-snap-stats span { font-size: 0.74rem; color: var(--text-muted); }
.lp-snap-stats strong { font-size: 1.25rem; letter-spacing: -0.02em; }
.lp-snap-bar {
  display: flex;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: var(--space-4);
  background: var(--border);
}
.lp-snap-rows { display: flex; flex-direction: column; gap: var(--space-2); }
.lp-snap-rows > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.84rem;
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--border);
}
.lp-snap-rows > div:last-child { border-bottom: none; padding-bottom: 0; }
.lp-snap-rows span { color: var(--text-strong); }
.lp-snap-rows em { font-style: normal; font-weight: 600; font-size: 0.78rem; }
.lp-snap-pass { color: var(--success); }
.lp-snap-review { color: var(--warning); }

/* --- Pillars --- */
.lp-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
  padding: clamp(32px, 5vw, 56px) 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.lp-pillar { padding: var(--space-2) 0; }
.lp-pillar-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
  margin-bottom: var(--space-3);
}
.lp-pillar h3 { font-size: 1.02rem; margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
.lp-pillar p { margin: 0; color: var(--text-muted); font-size: 0.9rem; line-height: 1.5; }

/* --- Features --- */
.lp-feature-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.lp-feature {
  display: flex;
  gap: var(--space-4);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}
.lp-feature:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  border-color: var(--border-strong);
}
.lp-feature-icon {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-strong);
}
.lp-feature h3 { font-size: 1.05rem; margin: 0 0 var(--space-2); letter-spacing: -0.01em; }
.lp-feature p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.55; }

/* --- How it works --- */
.lp-how {
  background: var(--soft-bg);
  border-radius: var(--radius-lg);
}
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  max-width: 880px;
  margin: 0 auto;
}
.lp-step { text-align: center; padding: 0 var(--space-2); }
.lp-step-n {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  margin-bottom: var(--space-3);
}
.lp-step h3 { font-size: 1.05rem; margin: 0 0 var(--space-2); }
.lp-step p { margin: 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.5; }

/* --- Wedge band --- */
.lp-wedge {
  text-align: center;
  background: var(--accent);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(48px, 7vw, 80px) clamp(var(--space-5), 6vw, 64px);
  margin: clamp(32px, 5vw, 48px) 0;
}
.lp-wedge h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-4);
  max-width: 22ch;
  margin-inline: auto;
}
.lp-wedge p {
  margin: 0 auto;
  max-width: 56ch;
  font-size: 1.05rem;
  line-height: 1.6;
  color: color-mix(in srgb, #fff 88%, transparent);
}

/* --- Final CTA --- */
.lp-final {
  text-align: center;
  padding: clamp(48px, 8vw, 96px) 0;
}
.lp-final h2 {
  font-size: clamp(1.6rem, 3.6vw, 2.4rem);
  letter-spacing: -0.02em;
  margin: 0 0 var(--space-5);
}

/* --- Footer --- */
.lp-footer {
  border-top: 1px solid var(--border);
  padding: var(--space-5) clamp(var(--space-4), 5vw, 48px);
  max-width: 1120px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  flex-wrap: wrap;
}
.lp-footer .lp-brand { font-size: 0.95rem; }
.lp-footer-note { color: var(--text-soft); font-size: 0.85rem; }

/* --- Auth back link (returns to landing) --- */
.auth-back {
  display: flex;
  width: fit-content;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  padding: 0;
  margin-bottom: var(--space-3);
}
.auth-back:hover { color: var(--text-strong); }

/* ============================================================
   Tags — TagInput editor + TagList chips
   ============================================================ */
.tag-input {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  min-height: 38px;
}
.tag-input:focus-within {
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}
.tag-input-field {
  flex: 1;
  min-width: 120px;
  border: none !important;
  outline: none;
  padding: 2px 0 !important;
  background: transparent;
  font: inherit;
  box-shadow: none !important;
}

.tag-chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
}
.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
  background: var(--accent-soft);
  color: var(--accent-strong);
  border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
  white-space: nowrap;
}
.tag-chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
  opacity: 0.7;
  border-radius: 50%;
}
.tag-chip-remove:hover { opacity: 1; }
.tag-chip--button {
  cursor: pointer;
  transition: background 0.12s ease, border-color 0.12s ease;
}
.tag-chip--button:hover {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}
.tag-chip--active {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}

/* --- Landing responsive --- */
@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-hero-visual { order: -1; }
  .lp-pillars { grid-template-columns: 1fr 1fr; }
  .lp-feature-grid { grid-template-columns: 1fr; }
  .lp-steps { grid-template-columns: 1fr; gap: var(--space-4); max-width: 420px; }
}
@media (max-width: 560px) {
  .lp-nav-links > a { display: none; }
  .lp-pillars { grid-template-columns: 1fr; }
  .lp-sub { max-width: none; }
  .lp-cta-row { flex-direction: column; align-items: stretch; }
  .lp-cta-row .primary-button,
  .lp-cta-row .secondary-button { width: 100%; }
}

/* ── Coverage Matrix Page ──────────────────────────────────────────────── */
.cov-matrix-table {
  table-layout: fixed;
  width: 100%;
}
.cov-col-key      { width: 8%; }
.cov-col-title    { width: 26%; }
.cov-col-priority { width: 10%; }
.cov-col-cases    { width: 8%; }
.cov-col-statuses { width: 26%; }
.cov-col-progress { width: 12%; }
.cov-col-verdict  { width: 10%; }

.cov-matrix-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: middle;
}

.cov-row--uncovered td {
  background: color-mix(in srgb, var(--danger) 3%, transparent);
}

.cov-status-chips {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
}

.cov-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 650;
  white-space: nowrap;
}
.cov-chip--passed { background: #e9f7ee; color: #1a6b37; }
.cov-chip--failed { background: #fef0f0; color: #a93030; }
.cov-chip--blocker { background: #fbe3e3; color: #7f1d1d; }
.cov-chip--pending { background: #fef8ec; color: #8a5a00; }

.cov-chip-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}
.cov-chip-dot--passed { background: #22c55e; }
.cov-chip-dot--failed { background: #ef4444; }
.cov-chip-dot--blocker { background: #7f1d1d; }
.cov-chip-dot--pending { background: #d97706; }

/* Linked TC details section */
.cov-matrix-details {
  padding: 16px 18px;
  border-top: 1px solid var(--border);
}
.cov-details-heading {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-strong);
}
.cov-req-detail-block {
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.cov-req-detail-block:last-child {
  margin-bottom: 0;
}
.cov-req-detail-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.cov-tc-table {
  table-layout: fixed;
  width: 100%;
}
.cov-tc-table td {
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .cov-matrix-table tr > th:nth-child(4),
  .cov-matrix-table tr > td:nth-child(4),
  .cov-matrix-table tr > th:nth-child(5),
  .cov-matrix-table tr > td:nth-child(5),
  .cov-matrix-table tr > th:nth-child(6),
  .cov-matrix-table tr > td:nth-child(6) {
    display: none;
  }
  .cov-col-key      { width: 15%; }
  .cov-col-title    { width: 50%; }
  .cov-col-priority { width: 15%; }
  .cov-col-verdict  { width: 20%; }
}

@media (max-width: 480px) {
  .cov-matrix-table tr > th:nth-child(3),
  .cov-matrix-table tr > td:nth-child(3) {
    display: none;
  }
  .cov-col-key      { width: 20%; }
  .cov-col-title    { width: 55%; }
  .cov-col-verdict  { width: 25%; }
}

/* ── Coverage Matrix enhancements ─────────────────────────────────────────── */
.cov-chip {
  text-decoration: none;
  cursor: default;
  transition: opacity 0.15s;
}
a.cov-chip, .cov-chip[href] {
  cursor: pointer;
}
a.cov-chip:hover {
  opacity: 0.75;
  text-decoration: none;
}

/* Row-level verdict coloring */
.cov-row--failing td { background: color-mix(in srgb, #ef4444 4%, transparent); }
.cov-row--verified td { background: color-mix(in srgb, #22c55e 3%, transparent); }

/* Verdict cell with expand toggle */
.cov-verdict-cell {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;
}
.cov-expand-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 9px;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 0.15s;
  padding: 0;
}
.cov-expand-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

/* Expanded TC row */
.cov-expanded-row > td {
  padding: 0 !important;
  background: var(--soft-bg);
  border-bottom: 2px solid var(--border);
}
.cov-expanded-inner {
  padding: 12px 20px 16px;
  border-top: 2px solid var(--accent);
}
.cov-expanded-inner .cov-tc-table {
  background: var(--surface);
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.cov-tc-row--fail td { background: color-mix(in srgb, #ef4444 6%, transparent); }
.cov-tc-row--block td { background: color-mix(in srgb, #7f1d1d 5%, transparent); }
.cov-tc-row--pass td { background: color-mix(in srgb, #22c55e 3%, transparent); }

/* Clickable summary strip cards */
.cov-filter-card {
  border: none;
  font: inherit;
  cursor: pointer;
  transition: all 0.15s;
  border-radius: 8px;
  background: transparent;
}
.cov-filter-card:hover {
  background: color-mix(in srgb, var(--accent) 6%, transparent);
}
.cov-filter-card--active {
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent);
  outline-offset: -2px;
}
.cov-summary-strip {
  cursor: default;
}

/* Coverage Matrix health indicator banner */
.cov-health-banner {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 20px;
  margin-bottom: 0;
}
.cov-health-banner--healthy {
  background: color-mix(in srgb, #22c55e 8%, white);
  border-bottom: 1px solid color-mix(in srgb, #22c55e 25%, transparent);
}
.cov-health-banner--at-risk {
  background: color-mix(in srgb, #f59e0b 8%, white);
  border-bottom: 1px solid color-mix(in srgb, #f59e0b 25%, transparent);
}
.cov-health-banner--critical {
  background: color-mix(in srgb, #ef4444 8%, white);
  border-bottom: 1px solid color-mix(in srgb, #ef4444 25%, transparent);
}
.cov-health-icon {
  font-size: 12px;
  font-weight: 900;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cov-health-banner--healthy .cov-health-icon { color: #15803d; background: color-mix(in srgb, #22c55e 18%, white); }
.cov-health-banner--at-risk .cov-health-icon { color: #b45309; background: color-mix(in srgb, #f59e0b 18%, white); }
.cov-health-banner--critical .cov-health-icon { color: #b91c1c; background: color-mix(in srgb, #ef4444 18%, white); }
.cov-health-text { flex: 1; }
.cov-health-text strong { display: block; font-size: 13px; font-weight: 700; }
.cov-health-banner--healthy .cov-health-text strong { color: #15803d; }
.cov-health-banner--at-risk .cov-health-text strong { color: #b45309; }
.cov-health-banner--critical .cov-health-text strong { color: #b91c1c; }
.cov-health-text span { font-size: 12px; color: var(--text-muted); }
.cov-health-bar { width: 100px; height: 4px; border-radius: 2px; background: rgba(0,0,0,0.1); overflow: hidden; flex-shrink: 0; }
.cov-health-bar-fill { display: block; height: 100%; border-radius: 2px; transition: width 0.4s ease; }
.cov-health-banner--healthy .cov-health-bar-fill { background: #22c55e; }
.cov-health-banner--at-risk .cov-health-bar-fill { background: #f59e0b; }
.cov-health-banner--critical .cov-health-bar-fill { background: #ef4444; }

/* ── Reports page stacked bar legend ─────────────────────────────────────── */
.rr-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}
.rr-bar-leg {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  transition: opacity 0.15s;
}
a.rr-bar-leg:hover { opacity: 0.75; color: var(--text-strong); }
.rr-bar-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.rr-bar-dot--passed  { background: #1a6b37; }
.rr-bar-dot--failed  { background: #a93030; }
.rr-bar-dot--blocker { background: #7f1d1d; }
.rr-bar-dot--skipped { background: #4d5570; }
.rr-bar-dot--pending { background: #d97706; }
.rr-bar-leg--passed  { color: #1a6b37; }
.rr-bar-leg--failed  { color: #a93030; }
.rr-bar-leg--blocker { color: #7f1d1d; }

/* Stacked bar link segments */
.rr-stacked-seg--link {
  cursor: pointer;
  transition: opacity 0.15s;
  text-decoration: none;
}
.rr-stacked-seg--link:hover {
  opacity: 0.75;
}


/* ── Comments Panel ─────────────────────────────────────────────── */
.comments-panel { display: flex; flex-direction: column; gap: 16px; }
.comments-list { display: flex; flex-direction: column; gap: 12px; }
.comments-empty { color: var(--text-muted); font-size: 13px; margin: 0; }
.comment-item { display: flex; gap: 10px; align-items: flex-start; }
.comment-avatar {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--accent, #1a73e8);
  color: #fff;
  font-size: 11px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
}
.comment-body { flex: 1; min-width: 0; }
.comment-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.comment-meta strong { font-size: 13px; }
.comment-time { font-size: 11px; color: var(--text-muted); }
.comment-delete {
  margin-left: auto; background: none; border: none; cursor: pointer;
  color: var(--text-muted); font-size: 16px; line-height: 1; padding: 0 2px;
}
.comment-delete:hover { color: var(--danger); }
.comment-text { margin: 0; font-size: 13px; line-height: 1.5; white-space: pre-wrap; }
.comment-form { display: flex; flex-direction: column; gap: 8px; }
.comment-input {
  width: 100%; box-sizing: border-box;
  padding: 8px 10px; border: 1px solid var(--border); border-radius: 6px;
  font-size: 13px; resize: vertical; font-family: inherit;
  background: var(--surface);
}
.comment-input:focus { outline: none; border-color: var(--accent, #1a73e8); }
.comment-form-footer { display: flex; align-items: center; justify-content: space-between; }
.comment-hint { font-size: 11px; color: var(--text-muted); }

/* ── Bulk pass/fail in execute mode ─────────────────────────────── */
.run-bulk-actions {
  display: flex; gap: 6px; margin-bottom: 8px;
}

/* ── @mention ────────────────────────────────────────────────────── */
.comment-mention { background: #eff6ff; color: #1d4ed8; border-radius: 3px; padding: 1px 4px; font-weight: 600; }
.mention-suggestions {
  position: absolute; bottom: calc(100% + 4px); left: 0; right: 0;
  background: var(--surface); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,.12); z-index: 100; overflow: hidden;
}
.mention-suggestion-item {
  display: flex; align-items: center; gap: 8px; width: 100%;
  padding: 8px 12px; background: none; border: none; cursor: pointer;
  font-size: 13px; text-align: left; color: var(--text-strong);
}
.mention-suggestion-item:hover { background: var(--hover-bg, #f1f5f9); }
.mention-suggestion-avatar {
  width: 24px; height: 24px; border-radius: 50%; background: var(--accent, #1a73e8);
  color: #fff; font-size: 10px; font-weight: 700;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}

/* ── Trend line chart ────────────────────────────────────────────── */
.trend-chart-wrap { display: flex; flex-direction: column; gap: 12px; }
.trend-chart-svg { width: 100%; height: auto; display: block; }
.trend-chart-legend { display: flex; align-items: baseline; gap: 12px; padding-top: 4px; }
.trend-chart-stats {
  display: flex; flex-wrap: wrap; align-items: stretch; gap: 0;
  background: var(--soft-bg); border: 1px solid var(--border);
  border-radius: var(--radius); overflow: hidden;
}
.trend-stat {
  flex: 1 1 96px; display: flex; flex-direction: column; align-items: center;
  padding: 10px 12px; gap: 2px; min-width: 0;
}
.trend-stat-label {
  font-size: 11px; font-weight: 500; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--text-muted); white-space: nowrap;
}
.trend-stat-value { font-size: 18px; font-weight: 700; color: var(--text-strong); line-height: 1.1; white-space: nowrap; }
.trend-stat-divider { width: 1px; align-self: stretch; background: var(--border); flex-shrink: 0; }
@media (max-width: 620px) {
  .trend-stat { flex: 1 1 33.33%; }
  .trend-stat-divider { display: none; }
}

/* ── Public Report Page ──────────────────────────────────────────── */
.pub-report-loading {
  min-height: 100vh; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px;
  background: #f8fafc; color: var(--text-muted);
}
.pub-report {
  max-width: 960px; margin: 0 auto; padding: 32px 20px 64px;
  font-family: var(--font, system-ui, sans-serif);
  background: var(--bg, #f8fafc); min-height: 100vh;
}
.pub-report-header { margin-bottom: 28px; }
.pub-report-brand {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; color: var(--accent, #1a73e8);
  margin-bottom: 12px;
}
.pub-report-title-block { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.pub-report-title-block h1 { margin: 0; font-size: 26px; font-weight: 800; color: var(--text-strong, #0f172a); }
.pub-report-meta { margin: 6px 0 0; font-size: 12px; color: var(--text-muted, #64748b); }
.pub-report-kpi-strip {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 12px; margin-bottom: 20px;
}
.pub-kpi {
  background: #fff; border: 1px solid var(--border, #e2e8f0); border-radius: 10px;
  padding: 14px 16px; display: flex; flex-direction: column; gap: 4px;
}
.pub-kpi span { font-size: 11px; color: var(--text-muted, #64748b); text-transform: uppercase; letter-spacing: .04em; }
.pub-kpi strong { font-size: 22px; font-weight: 800; color: var(--text-strong, #0f172a); }
.pub-kpi--pass strong { color: #10b981; }
.pub-kpi--warn strong { color: #f59e0b; }
.pub-kpi--fail strong { color: #ef4444; }
.pub-report-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .pub-report-grid { grid-template-columns: 1fr; } }
.pub-report-panel {
  background: #fff; border: 1px solid var(--border, #e2e8f0);
  border-radius: 12px; padding: 20px;
}
.pub-report-panel h2 { margin: 0 0 16px; font-size: 14px; font-weight: 700; color: var(--text-strong, #0f172a); }
.pub-report-footer {
  margin-top: 40px; text-align: center; font-size: 12px;
  color: var(--text-muted, #94a3b8);
}

/* ── 21. ONBOARDING WIZARD ───────────────────────────────────────────────── */
.onboarding-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(200, 210, 208, 0.45);
  backdrop-filter: blur(8px) saturate(1.4);
  -webkit-backdrop-filter: blur(8px) saturate(1.4);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  padding: 24px;
  animation: fade-in 0.3s ease;
}

.onboarding-card {
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(23, 32, 31, 0.18), 0 4px 16px rgba(23, 32, 31, 0.08);
  overflow: hidden;
  animation: modal-in 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.onboarding-header {
  padding: 28px 28px 0;
  text-align: center;
}

.onboarding-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 14px;
  color: var(--text-strong);
  margin-bottom: 16px;
}

.onboarding-header h1 {
  margin: 0 0 6px;
  font-size: 20px;
  font-weight: 750;
  color: var(--text-strong);
}

.onboarding-header p {
  margin: 0;
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Step indicator */
.onboarding-steps {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 20px 28px 0;
}

.onboarding-step {
  display: flex;
  align-items: center;
}

.onboarding-step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  border: 2px solid var(--border);
  color: var(--text-soft);
  background: var(--surface);
  transition: all 0.2s ease;
}

.onboarding-step.active .onboarding-step-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
}

.onboarding-step.done .onboarding-step-dot {
  border-color: var(--success);
  background: var(--success);
  color: #fff;
}

.onboarding-step-line {
  width: 32px;
  height: 2px;
  background: var(--border);
  margin: 0 4px;
}

.onboarding-step.done .onboarding-step-line {
  background: var(--success);
}

/* Form body */
.onboarding-body {
  padding: 24px 28px;
}

.onboarding-form {
  display: grid;
  gap: 14px;
}

.onboarding-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 8px;
}

/* Mode toggle */
.onboarding-mode-toggle {
  display: flex;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--soft-bg);
  margin-bottom: 12px;
}

.onboarding-mode-toggle button {
  flex: 1;
  padding: 8px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.onboarding-mode-toggle button.active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.onboarding-hint {
  margin: 0 0 14px;
  font-size: 12.5px;
  color: var(--text-soft);
  line-height: 1.5;
}

/* Item list */
.onboarding-items {
  display: grid;
  gap: 8px;
  margin-bottom: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.onboarding-item {
  display: flex;
  gap: 6px;
  align-items: center;
}

.onboarding-item input {
  flex: 1;
  height: 36px;
}

.onboarding-item-remove {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text-soft);
  font-size: 18px;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: all 0.15s;
}

.onboarding-item-remove:hover {
  background: #fef0f0;
  color: var(--danger);
}

/* Member list */
.onboarding-member-list {
  display: grid;
  gap: 6px;
  margin-top: 12px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--soft-bg);
}

.onboarding-member {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
}

.onboarding-member-avatar {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.onboarding-member-name {
  font-weight: 600;
  color: var(--text-strong);
}

.onboarding-member-role {
  margin-left: auto;
  font-size: 11px;
  color: var(--text-soft);
}

/* Final step */
.onboarding-final {
  text-align: center;
}

.onboarding-final-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #e9f7ee;
  color: var(--success);
  display: grid;
  place-items: center;
  margin: 0 auto 16px;
}

.onboarding-final h3 {
  margin: 0 0 8px;
  font-size: 18px;
  color: var(--text-strong);
}

.onboarding-final p {
  margin: 0 0 16px;
  font-size: 13.5px;
  color: var(--text-muted);
}

.onboarding-checklist {
  text-align: left;
  margin: 0 auto 20px;
  padding: 14px 18px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.8;
}

.onboarding-checklist li {
  padding: 2px 0;
}

/* Footer */
.onboarding-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 28px 16px;
}

/* ── Test Cases folder sidebar layout ───────────────────────────────────── */
.tc-page-layout {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}
.tc-folder-sidebar {
  width: 270px;
  flex-shrink: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  position: sticky;
  top: 74px;
  max-height: calc(100vh - 90px);
  overflow-y: auto;
}
.tc-main-panel {
  flex: 1;
  min-width: 0;
}
.tc-folder-sidebar-header {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid var(--border);
}
.tc-folder-sidebar-title {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: var(--text-strong);
}
.tc-folder-sidebar-subtitle {
  display: block;
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 11px;
}
.tc-folder-new-button {
  width: 100%;
  min-height: 36px;
  padding: 7px 12px;
  font-size: 12px;
}
.tc-folder-tree {
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.tc-folder-all {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-strong);
  cursor: pointer;
  border-radius: 0;
  transition: background 0.12s;
}
.tc-folder-all:hover { background: var(--soft-bg); }
.tc-folder-all--active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.tc-folder-group { list-style: none; }
.tc-folder-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-strong);
  cursor: pointer;
  transition: background 0.12s;
  user-select: none;
}
.tc-folder-header:hover { background: var(--soft-bg); }
.tc-folder-header--active { background: var(--accent-soft); color: var(--accent); font-weight: 650; }
.tc-folder-row {
  display: flex;
  align-items: center;
  min-width: 0;
  padding-right: 6px;
}
.tc-folder-row .tc-folder-header { flex: 1; min-width: 0; }
.tc-folder-controls {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 2px;
  padding: 0;
}
.tc-folder-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.tc-folder-action:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent-strong);
}
.tc-folder-action:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}
.tc-folder-action:active { transform: translateY(1px); }
.tc-folder-action:disabled,
.tc-folder-action--danger:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}
.tc-folder-action--danger {
  border-color: #fecaca;
  background: #fff5f5;
  color: var(--danger);
}
.tc-folder-action--danger:hover {
  border-color: #fca5a5;
  background: #fee2e2;
  color: var(--danger);
}
.tc-folder-inline-form { display: inline-flex; margin: 0; }
.tc-folder-child-list { padding-left: 12px; }
.tc-folder-icon { flex-shrink: 0; font-size: 13px; }
.tc-folder-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-folder-count {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  background: var(--border);
  color: var(--text-muted);
  border-radius: 10px;
  padding: 1px 6px;
  min-width: 18px;
  text-align: center;
}
.tc-folder-all--active .tc-folder-count,
.tc-folder-header--active .tc-folder-count { background: color-mix(in srgb, var(--accent) 15%, transparent); color: var(--accent); }
.tc-folder-empty-state {
  display: grid;
  gap: 5px;
  margin: 8px 10px;
  padding: 14px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: var(--soft-bg);
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}
.tc-folder-empty-state strong { color: var(--text-strong); font-size: 12px; }
.tc-folder-empty-action {
  width: 100%;
  min-height: 32px;
  margin-top: 4px;
  padding: 5px 9px;
  font-size: 11px;
}
.modal--folder { max-width: 540px; }
.tc-folder-modal-form { gap: 16px; }
.tc-folder-modal-form > label {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}
.tc-folder-modal-form input,
.tc-folder-modal-form select {
  min-height: 42px;
  font-size: 13px;
}
.tc-folder-field-hint {
  margin-top: -2px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.4;
}
.tc-folder-modal-note {
  margin: -4px 0 0;
  padding: 10px 12px;
  border-left: 3px solid var(--border-strong);
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.45;
}
.tc-folder-modal-form .modal-footer {
  margin: 0 -18px -18px;
}
.tc-module-list {
  list-style: none;
  margin: 0;
  padding: 0 0 4px 12px;
}
.tc-module-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px 5px 8px;
  font-size: 12px;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: background 0.12s;
  user-select: none;
}
.tc-module-item:hover { background: var(--soft-bg); color: var(--text-strong); }
.tc-module-item--active { background: color-mix(in srgb, var(--accent) 8%, transparent); color: var(--accent); font-weight: 650; }
.tc-module-icon { flex-shrink: 0; font-size: 12px; }
.tc-module-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Bulk upload multi-sheet styles */
.bulk-sheet-info {
  font-size: 12px;
  color: var(--text-muted);
  flex: 1;
}
.bulk-folder-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  background: #e8f0fe;
  color: #1d4ed8;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}

@media (max-width: 700px) {
  .tc-page-layout { flex-direction: column; }
  .tc-folder-sidebar { width: 100%; position: static; max-height: none; }
}

@media (max-width: 520px) {
  .onboarding-card { margin: 8px; }
  .onboarding-header { padding: 20px 20px 0; }
  .onboarding-steps { padding: 16px 20px 0; }
  .onboarding-body { padding: 20px; }
}

/* ── MILESTONE CARD GRID ──────────────────────────────────────────────────── */
.ms-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.ms-card {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.15s, border-color 0.15s;
}
.ms-card:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border-color: var(--border-strong);
}

.ms-card-hdr {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}
.ms-card--success .ms-card-hdr,
.ms-card--warning .ms-card-hdr,
.ms-card--danger  .ms-card-hdr,
.ms-card--neutral .ms-card-hdr { background: var(--soft-bg); }

.ms-card-left  { display: flex; flex-direction: column; gap: 2px; }
.ms-card-right { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }

.ms-card-countdown {
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -0.5px;
  line-height: 1;
}
.ms-card--success .ms-card-countdown { color: var(--success); }
.ms-card--warning .ms-card-countdown { color: var(--warning); }
.ms-card--danger  .ms-card-countdown { color: var(--danger); }
.ms-card--neutral .ms-card-countdown { color: var(--text-muted); }

.ms-card-countdown-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ms-card-no-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  padding-top: 6px;
}

.ms-card-hdr-actions {
  display: flex;
  gap: 2px;
  opacity: 0;
  transition: opacity 0.15s;
}
.ms-card:hover .ms-card-hdr-actions { opacity: 1; }
@media (hover: none) { .ms-card-hdr-actions { opacity: 1 !important; } }

.ms-card-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.ms-card-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  text-align: left;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  line-height: 1.3;
}
.ms-card-name:hover { color: var(--accent); }

.ms-card-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-card-meta-row {
  display: flex;
  gap: 12px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

.ms-card-plan-dots {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}
.ms-card-plan-dots-label {
  font-size: 10.5px;
  color: var(--text-muted);
  font-weight: 600;
}
.ms-plan-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
  cursor: default;
  transition: transform 0.1s;
}
.ms-plan-dot:hover { transform: scale(1.5); }
.ms-plan-dot--pass  { background: var(--success); }
.ms-plan-dot--fail  { background: var(--danger); }
.ms-plan-dot--block { background: var(--warning); }
.ms-plan-dot--none  { background: var(--border); }

.ms-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* ── MILESTONE READINESS BANNER (detail page) ─────────────────────────────── */
.ms-readiness-banner {
  display: flex;
  align-items: stretch;
  border-radius: 12px;
  margin-bottom: 20px;
  border: 1px solid;
  overflow: hidden;
}
.ms-readiness-banner--success,
.ms-readiness-banner--warning,
.ms-readiness-banner--danger  { background: var(--soft-bg); border-color: var(--border); }

.ms-readiness-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px 24px;
  gap: 4px;
  min-width: 90px;
}
.ms-readiness-big {
  font-size: 38px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -1.5px;
}
.ms-readiness-banner--success .ms-readiness-big { color: var(--success); }
.ms-readiness-banner--warning .ms-readiness-big { color: var(--warning); }
.ms-readiness-banner--danger  .ms-readiness-big { color: var(--danger); }

.ms-readiness-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.ms-readiness-divider {
  width: 1px;
  background: var(--border);
  align-self: stretch;
  flex-shrink: 0;
}

.ms-readiness-right {
  margin-left: auto;
  flex-shrink: 0;
}

/* ── PLAN HEALTH CARDS (milestone detail) ─────────────────────────────────── */
.ms-plan-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 12px;
  margin-top: 12px;
}
.ms-plan-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 16px;
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow 0.15s;
}
.ms-plan-card:hover { box-shadow: 0 2px 10px rgba(0,0,0,0.07); }

.ms-plan-card-hdr {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.ms-plan-card-name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-strong);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  line-height: 1.3;
}
.ms-plan-card-name:hover { color: var(--accent); }
.ms-plan-card-stat {
  display: flex;
  gap: 10px;
  font-size: 11.5px;
  color: var(--text-muted);
  flex-wrap: wrap;
}

/* ── TEST PLAN SCOPE CALLOUT ─────────────────────────────────────────────── */
.tp-scope-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  padding: 11px 16px;
  margin-bottom: 16px;
}
.tp-scope-icon { font-size: 16px; flex-shrink: 0; }
.tp-scope-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tp-scope-text strong { font-size: 13px; color: var(--text-strong); }
.tp-scope-text span  { font-size: 12px; color: var(--text-muted); }

/* ── ENHANCED PLAN TABLE CHIPS ───────────────────────────────────────────── */
.tp-milestone-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  color: var(--accent);
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
}
.tp-req-chip {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #eff6ff;
  color: #2563eb;
  border: 1px solid #bfdbfe;
  border-radius: 4px;
  padding: 2px 7px;
  font-size: 10.5px;
  font-weight: 700;
}
.tp-rate-num--good { color: #16a34a; }
.tp-rate-num--warn { color: #d97706; }
.tp-rate-num--bad  { color: #dc2626; }

/* ── CONCEPT HINT LABEL (section header) ─────────────────────────────────── */
.tp-concept-hint {
  font-size: 11.5px;
  color: var(--text-muted);
  font-style: italic;
  margin-left: 2px;
  flex: 1;
}

/* ── RESPONSIVE ─────────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .ms-card-grid { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
  .ms-plan-cards { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .ms-card-grid { grid-template-columns: 1fr; }
  .ms-readiness-banner { flex-wrap: wrap; }
  .ms-readiness-block { padding: 14px 18px; min-width: 70px; }
  .ms-readiness-big { font-size: 28px; }
  .ms-readiness-right { width: 100%; border-top: 1px solid var(--border); }
  .tp-concept-hint { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECTS PAGE — cards
   ═══════════════════════════════════════════════════════════════════════════ */
.proj-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.proj-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.15s;
}
.proj-card:hover {
  border-color: var(--border-strong);
}

/* Header row: initial badge + name + health pill */
.proj-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}
.proj-card-initial {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: 16px;
  font-weight: 800;
  color: var(--accent);
  background: var(--accent-soft);
  flex-shrink: 0;
  letter-spacing: -0.5px;
}
.proj-card-head-text {
  flex: 1;
  min-width: 0;
}
.proj-card-name {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  line-height: 1.3;
}
.proj-card-desc {
  margin: 3px 0 0;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Stat row: 3 cells separated by border */
.proj-card-stats {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--soft-bg);
}
.proj-card-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 8px 10px;
  border-right: 1px solid var(--border);
}
.proj-card-stat:last-child { border-right: none; }
.proj-card-stat strong {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.1;
}
.proj-card-stat span {
  font-size: 10px;
  color: var(--text-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}
.proj-stat-danger { color: var(--danger) !important; }

/* Pass rate bar */
.proj-card-rate {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.proj-card-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.proj-card-rate-label {
  font-size: 12px;
  color: var(--text-muted);
}
.proj-card-rate-val {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-strong);
}
.proj-card-bar-track {
  height: 5px;
  background: var(--soft-bg);
  border-radius: 99px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.proj-card-bar-fill {
  height: 100%;
  background: var(--success);
  border-radius: inherit;
  transition: width 0.3s ease;
}

/* Footer */
.proj-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: auto;
  gap: 8px;
}
.proj-card-footer-left {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.proj-card-footer-right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.proj-avatar-extra {
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 9.5px;
  font-weight: 700;
}
.proj-card-live {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--warning);
}
.proj-card-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--warning);
  animation: proj-pulse 1.6s infinite;
}
@keyframes proj-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}
.proj-card-last-run {
  font-size: 11px;
  color: var(--text-soft);
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROJECT DASHBOARD PAGE
   ═══════════════════════════════════════════════════════════════════════════ */

/* Stats strip */
.proj-stats-strip {
  display: flex;
  align-items: stretch;
  gap: 0;
  padding: 0;
  margin-bottom: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.proj-stats-divider {
  width: 1px;
  background: var(--border);
  flex-shrink: 0;
}
.proj-stat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 16px 20px;
  flex: 1;
  min-width: 0;
  position: relative;
}
.proj-stat-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}
.proj-stat-card--good::before   { background: var(--success); }
.proj-stat-card--warn::before   { background: var(--warning); }
.proj-stat-card--bad::before    { background: var(--danger); }
.proj-stat-card--neutral::before { background: transparent; }

.proj-stat-value {
  font-size: 24px;
  font-weight: 900;
  color: var(--text-strong);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.proj-stat-card--good .proj-stat-value { color: var(--success); }
.proj-stat-card--bad  .proj-stat-value { color: var(--danger); }

.proj-stat-label {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.proj-stat-sub {
  font-size: 11px;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.3;
}

/* In-progress runs banner */
.proj-active-runs {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--warning);
  background: var(--soft-bg);
  border-radius: 8px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}
.proj-active-runs-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: var(--warning);
  white-space: nowrap;
  flex-shrink: 0;
}
.proj-active-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--warning);
  animation: pulse-dot 1.4s infinite;
}
.proj-active-runs-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.proj-active-run-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  text-decoration: none;
  transition: border-color 0.12s;
}
.proj-active-run-chip:hover { border-color: var(--border-strong); }
.proj-active-run-name { font-size: 12.5px; font-weight: 700; color: var(--text-strong); max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.proj-active-run-build { font-size: 11px; color: var(--text-muted); background: var(--soft-bg); padding: 1px 5px; border-radius: 3px; }
.proj-active-run-date { font-size: 11px; color: var(--text-muted); }

/* Dashboard two-column grid */
.proj-dash-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 20px;
}
.proj-dash-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.proj-dash-panel {
  margin-bottom: 0 !important;
}
.proj-dash-empty {
  padding: 28px 16px;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
}

/* Recent runs list */
.proj-run-list { display: flex; flex-direction: column; padding: 0 16px; }
.proj-run-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.proj-run-row:last-child { border-bottom: none; }
.proj-run-row-main { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.proj-run-name {
  font-size: 13px; font-weight: 600;
  color: var(--text-strong);
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-run-build {
  font-size: 10.5px; color: var(--text-muted);
  background: var(--soft-bg); border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px;
  white-space: nowrap; flex-shrink: 0;
}
.proj-run-row-meta { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.proj-run-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Milestones list */
.proj-milestone-list { display: flex; flex-direction: column; padding: 4px 16px; }
.proj-milestone-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.proj-milestone-row:last-child { border-bottom: none; }
.proj-milestone-row-main { flex: 1; display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.proj-milestone-name {
  font-size: 13px; font-weight: 700;
  color: var(--text-strong);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.proj-milestone-bar-wrap { display: flex; align-items: center; gap: 8px; }
.proj-milestone-bar { flex: 1; height: 4px; background: var(--soft-bg); border-radius: 99px; overflow: hidden; }
.proj-milestone-bar span { display: block; height: 100%; border-radius: inherit; }
.proj-milestone-pct { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; min-width: 28px; text-align: right; }
.proj-milestone-row-right { display: flex; flex-direction: column; align-items: flex-end; gap: 5px; flex-shrink: 0; padding-top: 1px; }
.proj-milestone-due { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* Bug list */
.proj-bug-list { display: flex; flex-direction: column; padding: 0 16px; }
.proj-bug-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
}
.proj-bug-row:last-child { border-bottom: none; }
.proj-bug-row-main { flex: 1; min-width: 0; display: flex; align-items: flex-start; gap: 7px; }
.proj-bug-title {
  font-size: 13px; font-weight: 600;
  color: var(--text-strong);
  flex: 1; min-width: 0;
  line-height: 1.4;
  overflow-wrap: break-word;
  word-break: break-word;
}
.proj-bug-date { font-size: 11px; color: var(--text-muted); white-space: nowrap; flex-shrink: 0; padding-top: 3px; }

/* Coverage snapshot */
.proj-coverage-rows { display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 14px; margin-bottom: 0; }
.proj-coverage-row { display: flex; align-items: center; gap: 12px; }
.proj-cov-label { font-size: 12px; color: var(--text-muted); width: 96px; flex-shrink: 0; }
.proj-cov-bar-wrap { flex: 1; min-width: 0; }
.proj-cov-bar { height: 6px; background: var(--soft-bg); border-radius: 99px; overflow: hidden; display: flex; }
.proj-cov-bar span { height: 100%; display: block; }
.proj-cov-pct { font-size: 12px; font-weight: 700; color: var(--text-strong); white-space: nowrap; flex-shrink: 0; text-align: right; }
.proj-coverage-chips {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}
.proj-cov-chip {
  font-size: 11px; font-weight: 600;
  padding: 2px 8px; border-radius: 20px;
  background: var(--soft-bg); border: 1px solid var(--border); color: var(--text-muted);
}
.proj-cov-chip--pass  { background: var(--accent-soft); color: var(--success); border-color: var(--border); }
.proj-cov-chip--fail  { background: var(--soft-bg); color: var(--danger); border-color: var(--border); }
.proj-cov-chip--block { background: var(--soft-bg); color: var(--warning); border-color: var(--border); }

/* Quick navigation grid */
.proj-qnav-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.proj-qnav-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  text-decoration: none;
  color: var(--text-strong);
  transition: border-color 0.15s, background 0.15s;
}
.proj-qnav-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.proj-qnav-icon-box {
  width: 40px; height: 40px;
  border-radius: 9px;
  background: var(--soft-bg);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--text-muted);
  transition: background 0.15s, color 0.15s;
}
.proj-qnav-card:hover .proj-qnav-icon-box {
  background: var(--accent-soft);
  color: var(--accent);
}
.proj-qnav-body { flex: 1; min-width: 0; }
.proj-qnav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 3px;
}
.proj-qnav-label { font-size: 13px; font-weight: 700; color: var(--text-strong); }
.proj-qnav-card:hover .proj-qnav-label { color: var(--accent); }
.proj-qnav-badge {
  font-size: 11px; font-weight: 700;
  color: var(--text-muted);
  background: var(--soft-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 1px 7px;
  white-space: nowrap;
  flex-shrink: 0;
}
.proj-qnav-desc {
  font-size: 11px;
  color: var(--text-muted);
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Responsive */
@media (max-width: 820px) {
  .proj-dash-grid { grid-template-columns: 1fr; }
  .proj-qnav-grid { grid-template-columns: repeat(2, 1fr); }
  .proj-stats-strip { flex-wrap: wrap; }
  .proj-stats-divider { display: none; }
  .proj-stat-card { flex: 0 0 calc(33.33% - 1px); min-width: 0; }
}
@media (max-width: 640px) {
  .proj-grid { grid-template-columns: 1fr; }
  .proj-stat-card { flex: 0 0 calc(50% - 1px); }
  .proj-stats-strip { border-radius: 10px; }
}
@media (max-width: 480px) {
  .proj-qnav-grid { grid-template-columns: 1fr; }
}

/* ── Final cascade for the quiet control-room pass ───────────────────────── */
.app-shell {
  background:
    linear-gradient(90deg, rgba(19, 120, 110, 0.035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--page-bg);
}

.topbar {
  height: 64px;
  padding: 0 28px;
  background: rgba(255, 254, 250, 0.94);
  border-bottom-color: var(--border);
  box-shadow: 0 1px 0 rgba(24, 34, 31, 0.025);
  backdrop-filter: blur(12px);
}

.topnav {
  gap: 4px;
  margin-left: 12px;
}

.topnav a.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.workspace {
  width: min(1320px, calc(100% - 32px));
}

.project-sidebar {
  top: 64px;
  height: calc(100svh - 64px);
  width: 214px;
  padding-top: 28px;
}

.project-context {
  padding: 12px 14px;
  border-left-width: 4px;
  border-radius: 10px;
  background: rgba(255, 254, 250, 0.78);
  box-shadow: none;
}

.project-context strong,
.page-header h1,
.section-header h2,
.metric-card strong,
.auth-title {
  font-family: var(--display);
}

.project-sidebar a {
  justify-content: flex-start;
  padding-left: 14px;
  border-radius: 8px;
}

.content {
  padding: 36px 24px 56px;
}

.page-header {
  margin-bottom: 28px;
}

.page-header h1 {
  font-size: clamp(25px, 2.4vw, 34px);
  font-weight: 720;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.page-header p {
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 13px;
}

.panel {
  border-radius: 14px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: 0 1px 2px rgba(24, 34, 31, 0.035), 0 8px 24px rgba(24, 34, 31, 0.035);
}

.section-header {
  min-height: 52px;
  padding: 14px 18px;
  border-bottom-color: var(--border-soft);
}

.section-header h2 {
  font-size: 14px;
  font-weight: 720;
  letter-spacing: -0.015em;
}

.metric-grid,
.dashboard-details-grid {
  gap: 14px;
}

.metric-card {
  min-height: 112px;
  justify-content: space-between;
  padding: 17px 18px 16px;
  border-left-width: 4px;
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.94);
  box-shadow: none;
}

.metric-card:hover,
.quick-action-card:hover {
  transform: translateY(-1px);
}

.metric-card strong {
  font-size: 32px;
  font-weight: 680;
  letter-spacing: -0.055em;
}

.quick-action-card {
  min-height: 92px;
  justify-content: center;
  border-radius: 12px;
  background: rgba(255, 254, 250, 0.72);
}

.dashboard-list-item {
  padding: 13px 18px;
  border-bottom-color: var(--border-soft);
}

.auth-backdrop {
  position: relative;
  overflow: hidden;
  background: var(--page-bg);
}

.auth-card {
  position: relative;
  max-width: 430px;
  padding: 38px;
  border-top: 3px solid var(--accent);
  border-radius: 18px;
  background: rgba(255, 254, 250, 0.96);
  box-shadow: var(--shadow-lg);
}

.auth-title {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.auth-form {
  gap: 16px;
}

.auth-form input[type='email'],
.auth-form input[type='password'],
.auth-form input[type='text'] {
  min-height: 44px;
  border-radius: 9px;
  font-size: 14px;
}

.auth-submit {
  min-height: 46px;
  margin-top: 6px;
}

@media (max-width: 820px) {
  .topbar { padding: 0 18px; }
  .workspace { width: min(100% - 24px, 720px); }
  .content { padding: 28px 16px 44px; }
}

@media (max-width: 640px) {
  .topbar {
    height: auto;
    min-height: 64px;
    padding: 12px 14px;
  }

  .topnav {
    order: 3;
    flex-basis: 100%;
    margin-left: 0;
    overflow-x: auto;
    padding-top: 4px;
    scrollbar-width: none;
  }

  .topnav::-webkit-scrollbar { display: none; }
  .topnav a { flex: 0 0 auto; }
  .user-pill-name, .user-pill .role-badge { display: none; }

  .project-sidebar {
    top: 0;
    height: auto;
    width: 100%;
    padding: 12px 0 0;
    border-right: 0;
  }

  .project-sidebar nav {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
    scrollbar-width: none;
  }

  .project-sidebar nav::-webkit-scrollbar { display: none; }
  .project-sidebar a { flex: 0 0 auto; }
  .content { padding-top: 24px; }
  .page-header h1 { font-size: 27px; }
  .quick-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .auth-card { padding: 30px 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .metric-card:hover,
  .quick-action-card:hover { transform: none; }
}

/* ── Plans, bugs, and settings polish ───────────────────────────────────── */
.tp-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.tp-panel {
  min-width: 0;
}

.tp-workflow-guide {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin: 18px 0 20px;
  padding: 13px 16px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.tp-inner-nav {
  display: flex;
  gap: 6px;
  margin: 18px 0 0;
  padding: 5px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--soft-bg);
}

.tp-inner-nav a {
  display: grid;
  gap: 2px;
  min-width: 170px;
  padding: 9px 14px;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text-muted);
  text-decoration: none;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.tp-inner-nav a:hover,
.tp-inner-nav a:focus-visible {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text-strong);
}

.tp-inner-nav a.is-active {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: 0 1px 2px rgba(27, 40, 30, 0.06);
}

.tp-inner-nav a span {
  font-size: 12px;
  font-weight: 750;
}

.tp-inner-nav a small {
  color: var(--text-soft);
  font-size: 10px;
}

.tp-detail-hero {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  margin-top: 20px;
  padding: 22px 24px;
}

.tp-detail-hero-copy {
  min-width: 0;
  flex: 1;
}

.tp-detail-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 9px;
}

.tp-detail-title-row h2 {
  margin: 5px 0 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(20px, 2vw, 27px);
  font-weight: 760;
  letter-spacing: -0.025em;
}

.tp-detail-title-row > strong {
  color: var(--text-strong);
  font-size: 13px;
}

.tp-detail-hero-copy > p {
  max-width: 68ch;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.tp-detail-meta {
  margin-left: 0;
}

.tp-detail-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(72px, 1fr));
  align-self: center;
  min-width: min(48%, 430px);
  border-left: 1px solid var(--border);
}

.tp-detail-stats div {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 0 14px;
  border-right: 1px solid var(--border-soft);
}

.tp-detail-stats div:last-child {
  border-right: 0;
}

.tp-detail-stats strong {
  color: var(--text-strong);
  font-size: 19px;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.tp-detail-stats span {
  color: var(--text-soft);
  font-size: 10px;
  line-height: 1.25;
}

.tp-detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 20px;
  margin-top: 20px;
}

.tp-detail-panel {
  min-width: 0;
}

.tp-detail-panel .section-header {
  align-items: flex-start;
  padding: 16px 18px;
}

.tp-detail-panel .section-header h2 {
  margin-top: 3px;
  font-size: 16px;
}

.tp-detail-list {
  display: grid;
  gap: 1px;
  padding: 7px;
  background: var(--border-soft);
}

.tp-detail-list-item,
.tp-milestone-plan-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-width: 0;
  padding: 13px 12px;
  background: var(--surface);
}

.tp-detail-list-item > div:first-child,
.tp-milestone-plan-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.tp-detail-list-item strong,
.tp-milestone-plan-copy strong {
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.tp-detail-list-item span:not(.status-pill),
.tp-milestone-plan-copy > span {
  color: var(--text-muted);
  font-size: 10.5px;
}

.tp-detail-empty {
  display: grid;
  justify-items: start;
  gap: 7px;
  padding: 24px 20px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.tp-detail-empty strong {
  color: var(--text-strong);
  font-size: 13px;
}

.tp-detail-empty .primary-button {
  margin-top: 5px;
}

.tp-run-list-item,
.tp-milestone-plan-row {
  color: inherit;
  text-decoration: none;
  transition: background 140ms ease;
}

.tp-run-list-item:hover,
.tp-run-list-item:focus-visible,
.tp-milestone-plan-row:hover,
.tp-milestone-plan-row:focus-visible {
  background: color-mix(in srgb, var(--accent) 5%, var(--surface));
}

.tp-run-list-result {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 9px;
}

.tp-run-list-result > strong {
  min-width: 34px;
  text-align: right;
}

.tp-milestone-plans-panel {
  margin-top: 20px;
}

.tp-milestone-plan-progress {
  display: grid;
  grid-template-columns: minmax(100px, 180px) auto;
  align-items: center;
  gap: 8px;
  flex: 0 1 240px;
}

.tp-milestone-plan-progress strong {
  min-width: 33px;
  text-align: right;
}

.tp-record-arrow {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 15px;
  transition: color 140ms ease, transform 140ms ease;
}

.tp-milestone-plan-row:hover .tp-record-arrow,
.tp-milestone-plan-row:focus-visible .tp-record-arrow {
  color: var(--accent);
  transform: translate(2px, -2px);
}

.tp-workflow-guide-copy {
  display: grid;
  gap: 3px;
  min-width: 190px;
}

.tp-workflow-guide-copy strong {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 700;
}

.tp-workflow-steps {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 0;
  color: var(--text-muted);
  font-size: 11px;
  list-style: none;
}

.tp-workflow-steps li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.tp-workflow-steps li[aria-hidden="true"] {
  color: var(--text-soft);
  font-size: 15px;
}

.tp-workflow-steps b {
  display: grid;
  place-items: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}

.tp-panel-header {
  align-items: flex-start;
  min-height: 82px;
  padding: 16px 18px 14px;
}

.tp-panel-header > div {
  min-width: 0;
}

.tp-panel-header h2 {
  margin-top: 3px;
  font-size: 16px;
}

.tp-panel-header p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.4;
}

.tp-section-kicker {
  display: block;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

.tp-panel-header .status-pill {
  flex: 0 0 auto;
  margin-top: 2px;
}

.tp-create-disclosure {
  padding: 12px 18px 0;
}

.tp-create-disclosure > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  cursor: pointer;
  list-style: none;
}

.tp-create-disclosure > summary::-webkit-details-marker {
  display: none;
}

.tp-create-disclosure > summary::after {
  content: '▾';
  color: var(--text-soft);
  font-size: 11px;
  transform: rotate(-90deg);
  transition: transform 140ms ease;
}

.tp-create-disclosure[open] > summary::after {
  transform: rotate(0deg);
}

.tp-add-symbol {
  color: var(--accent);
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}

.tp-create-disclosure .tp-create-form {
  margin: 12px -18px 0;
  border-top: 1px solid var(--border-soft);
}

.tp-field-hint {
  display: block;
  margin-top: 5px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.35;
}

.tp-field-label {
  display: block;
  margin-bottom: 6px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.tp-requirement-picker {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.tp-picker-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 9px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--soft-bg);
}

.tp-picker-search {
  margin: 0;
}

.tp-picker-search input {
  min-height: 34px;
  margin: 0;
  padding: 7px 10px;
  border-color: var(--border);
  background: var(--surface);
  font-size: 12px;
}

.tp-picker-toolbar strong {
  color: var(--text-muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.tp-requirement-list {
  display: grid;
  gap: 3px;
  max-height: 248px;
  overflow-y: auto;
  padding: 6px;
}

.tp-requirement-option {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.35;
}

.tp-requirement-option:hover,
.tp-requirement-option.is-selected {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.tp-requirement-option > input {
  width: auto;
  min-width: 15px;
  height: 15px;
  flex: 0 0 auto;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.tp-requirement-option-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.tp-requirement-option-copy strong {
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-weight: 650;
}

.tp-requirement-key {
  color: var(--accent);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.03em;
}

.tp-picker-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  padding: 7px 10px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-soft);
  font-size: 10.5px;
}

.tp-picker-actions {
  display: flex;
  gap: 10px;
}

.tp-picker-actions button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
}

.tp-picker-actions button:hover {
  text-decoration: underline;
}

.tp-picker-empty {
  padding: 18px 14px;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

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

.tp-create-form {
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  background: rgba(250, 251, 248, 0.62);
}

.tp-form-wide {
  grid-column: 1 / -1;
}

.tp-create-form .form-actions {
  justify-content: flex-start;
}

.tp-item-list {
  min-height: 172px;
}

.tp-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.tp-item:last-child {
  border-bottom: 0;
}

.tp-item-main {
  min-width: 0;
  flex: 1;
}

.tp-item-description {
  max-width: 68ch;
  margin: 8px 0 0 36px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.tp-item-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 12px;
  margin: 8px 0 0 36px;
  color: var(--text-muted);
  font-size: 11px;
}

.tp-item-meta > span:not(.tp-milestone-chip)::before {
  content: '·';
  margin-right: 7px;
  color: var(--text-soft);
}

.tp-item-meta > span:first-child::before,
.tp-item-meta > .tp-milestone-chip::before {
  content: none;
  margin: 0;
}

.tp-progress-row {
  display: grid;
  grid-template-columns: minmax(120px, 1fr) auto auto auto;
  align-items: center;
  gap: 8px;
  max-width: 620px;
  margin: 12px 0 0 36px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.tp-progress-row strong {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

.tp-progress-track {
  height: 6px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--soft-bg);
}

.tp-progress-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.tp-not-started {
  margin: 11px 0 0 36px;
  color: var(--text-soft);
  font-size: 10.5px;
  font-style: italic;
}

.tp-item-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.tp-item-title-row strong {
  min-width: 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 14px;
  font-weight: 720;
}

.tp-record-link {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  gap: 5px;
  color: inherit;
  text-decoration: none;
}

.tp-record-link > strong {
  overflow-wrap: anywhere;
}

.tp-record-link > span {
  color: var(--text-soft);
  font-size: 12px;
  opacity: 0;
  transform: translate(-2px, 2px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.tp-record-link:hover > strong,
.tp-record-link:focus-visible > strong {
  color: var(--accent);
}

.tp-record-link:hover > span,
.tp-record-link:focus-visible > span {
  opacity: 1;
  transform: translate(0, 0);
}

.tp-item-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}

.tp-item .muted-meta {
  margin: 5px 0 0 36px;
}

.tp-item-actions {
  flex: 0 0 auto;
}

.tp-item-row-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  width: auto;
  gap: 10px;
  text-align: left;
}

.tp-item-row-actions .primary-button,
.tp-item-row-actions .secondary-button {
  white-space: nowrap;
}

.tp-detail-actions {
  justify-content: flex-end;
  gap: 12px;
}

.tp-detail-actions .primary-button {
  margin-left: 4px;
}

.tp-empty-state,
.module-empty-state {
  display: grid;
  justify-items: center;
  gap: 6px;
  min-height: 172px;
  padding: 28px 20px;
  color: var(--text-soft);
  text-align: center;
}

.tp-empty-state strong,
.module-empty-state strong {
  color: var(--text-strong);
  font-size: 13px;
}

.tp-empty-state > span:last-child,
.module-empty-state > span:not(.tp-empty-icon):not(.module-empty-icon) {
  max-width: 250px;
  font-size: 11.5px;
  line-height: 1.45;
}

.tp-empty-icon,
.module-empty-icon {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 3px;
  border-radius: 10px;
  background: var(--soft-bg);
  color: var(--accent);
}

.module-empty-state .secondary-button {
  margin-top: 5px;
}

.bug-filters {
  flex: 1 1 auto;
}

.bug-table th,
.bug-table td {
  vertical-align: middle;
}

.bug-table td:last-child {
  width: 88px;
  text-align: right;
}

.bug-table .status-pill {
  white-space: nowrap;
}

.settings-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 16px;
  align-items: start;
}

.settings-card {
  min-width: 0;
}

.settings-section-body {
  display: grid;
  gap: 12px;
}

.settings-code {
  display: block;
  width: 100%;
  margin: 0;
  padding: 11px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--soft-bg);
  color: var(--text-strong);
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.settings-inline-action {
  justify-self: start;
  margin-top: 2px;
}

.settings-profile-row {
  display: flex;
  align-items: center;
  gap: 11px;
}

.settings-profile-row strong {
  color: var(--text-strong);
  font-size: 14px;
}

.settings-profile-row p {
  margin: 3px 0 0;
}

.settings-avatar {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 11px;
  background: var(--accent);
  color: #fff;
  font-size: 14px;
  font-weight: 750;
}

.settings-directory-table th,
.settings-directory-table td {
  vertical-align: middle;
}

.settings-role-form {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 180px;
}

.settings-role-form select {
  min-width: 112px;
  height: 34px;
}

.settings-role-form .secondary-button {
  min-height: 34px;
  padding: 6px 10px;
}

.project-settings-form {
  gap: 18px 16px;
}

.project-settings-section {
  padding-top: 4px;
}

.settings-subheader {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 9px;
  border-bottom: 1px solid var(--border-soft);
}

.settings-subheader h2 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 14px;
}

.settings-subheader span {
  color: var(--text-soft);
  font-size: 11.5px;
}

.member-picker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
  gap: 8px;
  padding-top: 12px;
}

.member-picker-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
}

.ci-gate-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  padding-top: 12px;
}

.ci-gate-help {
  margin: 8px 0 0;
}

.member-picker-option:hover {
  border-color: var(--accent);
  background: var(--soft-bg);
}

.member-picker-option input {
  width: 15px;
  height: 15px;
  min-height: 0;
  accent-color: var(--accent);
}

.settings-links-section {
  display: grid;
  gap: 12px;
}

.settings-link-row {
  display: grid;
  gap: 6px;
}

.settings-link-row > span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.settings-link-row > a {
  overflow-wrap: anywhere;
}

.ci-integration-panel .section-header {
  align-items: flex-start;
}

.ci-integration-body {
  display: grid;
  gap: 16px;
}

.ci-token-reveal {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--accent);
  border-radius: 9px;
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  background-color: var(--soft-bg);
  background-color: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.ci-token-value,
.ci-integration-code {
  display: block;
  overflow-x: auto;
  padding: 10px 12px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background-color: var(--soft-bg);
  color: var(--text-strong);
  font-size: 11px;
  line-height: 1.65;
  white-space: pre;
}

.capture-token-modal__panel {
  max-width: 560px;
}

.capture-token-modal__body {
  display: grid;
  gap: 14px;
}

.capture-token-modal__value {
  overflow-wrap: anywhere;
  white-space: pre-wrap;
  user-select: all;
}

.capture-token-modal__actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.ci-token-status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.ci-token-status > div {
  display: grid;
  gap: 3px;
}

@media (max-width: 640px) {
  .ci-gate-grid {
    grid-template-columns: 1fr;
  }

  .ci-token-status {
    align-items: stretch;
    flex-direction: column;
  }
}

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

@media (max-width: 640px) {
  .tp-inner-nav {
    margin-top: 14px;
  }

  .tp-inner-nav a {
    min-width: 0;
    flex: 1 1 0;
    padding: 8px 10px;
  }

  .tp-detail-hero {
    flex-direction: column;
    gap: 18px;
    margin-top: 14px;
    padding: 18px;
  }

  .tp-detail-stats {
    width: 100%;
    min-width: 0;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }

  .tp-detail-stats div {
    padding: 0 8px;
  }

  .tp-detail-stats strong {
    font-size: 16px;
  }

  .tp-detail-list-item,
  .tp-milestone-plan-row {
    align-items: flex-start;
    flex-wrap: wrap;
    padding: 12px 10px;
  }

  .tp-run-list-result {
    width: 100%;
    justify-content: space-between;
    padding-left: 0;
  }

  .tp-milestone-plan-copy {
    flex: 1 1 180px;
  }

  .tp-milestone-plan-progress {
    flex: 1 1 100%;
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .tp-workflow-guide {
    align-items: flex-start;
    flex-direction: column;
    gap: 12px;
    margin-top: 14px;
  }

  .tp-workflow-guide-copy {
    min-width: 0;
  }

  .tp-workflow-steps {
    width: 100%;
    justify-content: space-between;
    gap: 5px;
    font-size: 10px;
  }

  .tp-workflow-steps li[aria-hidden="true"] {
    font-size: 12px;
  }

  .tp-panel-header {
    gap: 10px;
    padding: 14px;
  }

  .tp-panel-header p {
    max-width: 230px;
  }

  .tp-create-disclosure {
    padding-right: 14px;
    padding-left: 14px;
  }

  .tp-create-disclosure .tp-create-form {
    margin-right: -14px;
    margin-left: -14px;
  }

  .tp-form-wide {
    grid-column: auto;
  }

  .tp-item-description,
  .tp-item-meta,
  .tp-progress-row,
  .tp-not-started {
    margin-left: 0;
  }

  .tp-progress-row {
    grid-template-columns: 1fr auto;
  }

  .tp-progress-track {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .tp-progress-row strong,
  .tp-progress-row span {
    grid-row: 2;
  }

  .tp-item-actions {
    align-self: flex-end;
  }

  .tp-item {
    flex-direction: column;
  }

  .settings-role-form {
    min-width: 0;
  }

  .settings-role-form select {
    min-width: 0;
    flex: 1;
  }

  .settings-subheader {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
}

/* ── Project report result cards ─────────────────────────────────────────── */
.report-section-header {
  align-items: center;
}

.report-section-heading {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.report-section-heading > span {
  overflow: hidden;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chart-split {
  align-items: center;
  gap: 22px;
  min-height: 280px;
  padding: 22px 20px;
}

.report-result-ring {
  display: grid;
  flex: 0 0 136px;
  justify-items: center;
  gap: 7px;
  padding-right: 20px;
  border-right: 1px solid var(--border-soft);
}

.report-result-ring svg {
  display: block;
  width: 120px;
  height: 120px;
}

.report-result-ring > span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.chart-bars {
  min-width: 0;
  gap: 9px;
}

.chart-bars--solo {
  min-height: 176px;
  justify-content: center;
  padding: 20px;
}

.chart-bar-row {
  grid-template-columns: minmax(88px, 108px) minmax(60px, 1fr) 32px;
  gap: 10px;
  min-height: 22px;
}

.chart-bar-label {
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.2;
  text-align: left;
}

.chart-bar-value {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 750;
  line-height: 1;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chart-bar-row .progress-track {
  height: 8px;
  background: var(--soft-bg);
}

.chart-bar-row .progress-track > span {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
  background: var(--accent);
}

.chart-bar-row .progress-fill--passed { background: var(--success); }
.chart-bar-row .progress-fill--failed { background: var(--danger); }
.chart-bar-row .progress-fill--blocker { background: #7f1d1d; }
.chart-bar-row .progress-fill--reported { background: #3b82f6; }
.chart-bar-row .progress-fill--inprogress { background: #2b9b82; }
.chart-bar-row .progress-fill--clarification { background: #c58a18; }
.chart-bar-row .progress-fill--hold { background: #8c67b5; }
.chart-bar-row .progress-fill--skipped { background: var(--text-soft); }
.chart-bar-row .progress-fill--pending { background: var(--warning); }

.chart-link-row {
  display: block;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 8px;
}

.chart-link-row:hover {
  border-color: var(--border);
  background: var(--soft-bg);
}

.chart-empty-state {
  display: grid;
  justify-items: center;
  gap: 5px;
  min-height: 176px;
  padding: 28px 20px;
  text-align: center;
}

.chart-empty-state-icon {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  margin-bottom: 4px;
  border-radius: 50%;
  background: #eff9f2;
  color: var(--success);
  font-size: 16px;
  font-weight: 800;
}

.chart-empty-state strong {
  color: var(--text-strong);
  font-size: 13px;
}

.chart-empty-state > span:last-child {
  max-width: 230px;
  color: var(--text-soft);
  font-size: 11.5px;
  line-height: 1.45;
}

.bug-status-summary {
  margin-top: auto;
  border-top-color: var(--border-soft);
  background: #fafbf8;
}

.bug-status-chip {
  color: var(--text-muted);
  font-size: 11.5px;
}

.bug-status-chip strong {
  color: var(--text-strong);
  font-variant-numeric: tabular-nums;
}

@media (max-width: 520px) {
  .chart-split {
    min-height: 0;
    flex-direction: column;
    gap: 16px;
    padding: 20px 16px;
  }

  .report-result-ring {
    flex-basis: auto;
    padding: 0 0 16px;
    border-right: 0;
    border-bottom: 1px solid var(--border-soft);
  }

  .chart-bars,
  .chart-bars--solo {
    width: 100%;
  }

  .chart-bar-row {
    grid-template-columns: minmax(82px, 96px) minmax(48px, 1fr) 28px;
    gap: 8px;
  }
}

/* ── Final responsive data-view overrides ───────────────────────────────── */
.requirements-mobile-list {
  display: none;
}

.requirement-mobile-card {
  gap: 12px;
}

.requirement-mobile-key {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
}

.requirement-mobile-title {
  display: grid;
  gap: 3px;
}

.requirement-mobile-title strong {
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.mobile-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 2px;
}

.requirement-mobile-edit {
  width: min(420px, calc(100vw - 56px));
  margin-top: 8px;
}

@media (max-width: 640px) {
  .table-wrap {
    display: block !important;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .table-wrap.has-mobile-cards {
    display: none !important;
  }

  .activity-mobile-list,
  .requirements-mobile-list {
    display: grid;
    padding: 12px;
    background: var(--page-bg);
  }

  .activity-mobile-list .module-empty-state,
  .requirements-mobile-list .module-empty-state {
    min-height: 150px;
    padding: 24px 12px;
  }
}

/* ── CI trend report ─────────────────────────────────────────────────────── */
.ci-trends-panel {
  overflow: hidden;
}

.ci-trends-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1px;
  margin: 0 18px;
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  background: var(--border);
}

.ci-trend-stat {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px 13px;
  background: var(--surface);
}

.ci-trend-stat span,
.ci-trends-card-heading span {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  line-height: 1.25;
  text-transform: uppercase;
}

.ci-trend-stat strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 18px;
  font-weight: 800;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-trend-chart-wrap {
  display: grid;
  gap: 6px;
  padding: 22px 18px 16px;
}

.ci-trend-chart-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.ci-trend-chart-heading strong {
  color: var(--text-strong);
  font-size: 13px;
}

.ci-trend-chart-heading span {
  color: var(--text-soft);
  font-size: 11px;
}

.ci-trend-chart {
  display: block;
  width: 100%;
  min-height: 160px;
  overflow: visible;
}

.ci-trend-gridline {
  stroke: var(--border-soft);
  stroke-width: 1;
}

.ci-trend-axis-label {
  fill: var(--text-soft);
  font-size: 10px;
}

.ci-trend-line {
  fill: none;
  stroke: var(--accent);
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 3;
}

.ci-trend-point {
  fill: var(--surface);
  stroke: var(--accent);
  stroke-width: 3;
}

.ci-trend-point--failed {
  stroke: var(--danger);
}

.ci-trend-labels {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 0 8px 0 38px;
  color: var(--text-soft);
  font-size: 10px;
}

.ci-trend-labels span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-trends-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  padding: 0 18px 18px;
}

.ci-trends-card {
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.ci-trends-card--branches {
  grid-column: 1 / -1;
}

.ci-trends-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.ci-trends-card-heading h3 {
  margin: 0 0 4px;
  color: var(--text-strong);
  font-size: 13px;
}

.ci-trend-test-row,
.ci-branch-row {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 0;
  border-bottom: 1px solid var(--border-soft);
}

.ci-trend-test-row:last-child,
.ci-branch-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.ci-trend-test-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
}

.ci-trend-test-copy strong {
  overflow: hidden;
  color: var(--text-strong);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-trend-test-copy span,
.ci-trend-test-metrics,
.ci-branch-row > span:not(.mono),
.ci-branch-row small {
  color: var(--text-soft);
  font-size: 11px;
}

.ci-trend-test-metrics {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

.ci-branch-row > .mono {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  color: var(--text-strong);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-branch-row > strong {
  min-width: 48px;
  text-align: right;
}

.ci-branch-row small {
  min-width: 68px;
  text-align: right;
}

.ci-pr-detail {
  display: grid;
  gap: 3px;
}

.ci-pr-detail span,
.run-pr-title {
  color: var(--text-soft);
  font-size: 11px;
}

.run-pr-title {
  display: block;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ci-trends-empty,
.ci-trends-empty-panel p {
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.ci-trends-empty {
  padding-top: 14px;
}

.ci-trends-empty-panel {
  display: grid;
  gap: 12px;
  padding: 18px;
}

.ci-trends-empty-panel p {
  margin: 0;
}

@media (max-width: 900px) {
  .ci-trends-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .ci-trends-summary,
  .ci-trends-grid {
    grid-template-columns: 1fr;
  }

  .ci-trends-card--branches {
    grid-column: auto;
  }

  .ci-trend-chart-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }

  .ci-trend-labels span:nth-child(even) {
    display: none;
  }
}

/* ── Project resources hub ───────────────────────────────────────────────── */
.resource-hub-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: linear-gradient(135deg, var(--surface), var(--soft-bg));
}

.resource-eyebrow,
.resource-card-kicker {
  display: block;
  margin-bottom: 6px;
  color: var(--accent);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.resource-hub-intro h2,
.resource-card-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 20px;
}

.resource-hub-intro p,
.resource-card-header p {
  margin: 6px 0 0;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
}

.resource-intro-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
}

.resource-intro-stats span {
  display: grid;
  gap: 2px;
  min-width: 72px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 10px;
  text-transform: uppercase;
}

.resource-intro-stats strong {
  color: var(--text-strong);
  font-size: 17px;
  line-height: 1;
}

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

.resource-card--wide {
  grid-column: 1 / -1;
}

.resource-card {
  min-width: 0;
  overflow: hidden;
}

.resource-card-header {
  align-items: flex-start;
}

.resource-card-header > svg {
  flex-shrink: 0;
  color: var(--accent);
}

.resource-card-body {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.resource-access-layout {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.resource-column,
.resource-list,
.resource-link-list,
.resource-runbook-list {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.resource-subheader,
.resource-form-heading,
.resource-credential-heading,
.resource-runbook-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.resource-subheader {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-soft);
}

.resource-subheader h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
}

.resource-subheader span,
.resource-credential-heading span,
.resource-runbook-heading span {
  color: var(--text-soft);
  font-size: 11px;
}

.resource-list-item,
.resource-credential-item,
.resource-link-item,
.resource-runbook-item {
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--surface);
}

.resource-list-item,
.resource-link-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.resource-list-copy {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 4px;
}

.resource-list-copy strong,
.resource-credential-heading strong,
.resource-runbook-heading strong {
  color: var(--text-strong);
  font-size: 12px;
}

.resource-list-copy > span:not(.resource-url),
.resource-link-item .resource-list-copy > span:not(.resource-url) {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

.resource-url {
  overflow: hidden;
  color: var(--accent);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.resource-list-meta {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: 8px;
  color: var(--text-soft);
  font-size: 10px;
}

.resource-list-meta form {
  margin: 0;
}

.resource-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--text-soft);
  cursor: pointer;
  font-size: 17px;
}

.resource-icon-button:hover {
  background: var(--soft-bg);
  color: var(--danger);
}

.resource-empty {
  padding: 18px 12px;
  border: 1px dashed var(--border-strong);
  border-radius: 8px;
  color: var(--text-soft);
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
}

.resource-form {
  display: grid;
  gap: 12px;
  padding: 13px;
  border: 1px solid var(--border-soft);
  border-radius: 9px;
  background: var(--soft-bg);
}

.resource-form-heading strong {
  color: var(--text-strong);
  font-size: 12px;
}

.resource-form-note {
  margin: -4px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.45;
}

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

.resource-form-grid label {
  display: grid;
  gap: 5px;
  color: var(--text-muted);
  font-size: 11px;
}

.resource-form-grid .span-2 {
  grid-column: 1 / -1;
}

.resource-form-grid input,
.resource-form-grid select,
.resource-form-grid textarea {
  width: 100%;
  min-height: 36px;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background-color: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 12px;
}

.resource-form-grid textarea {
  min-height: 130px;
  resize: vertical;
}

.resource-credential-item,
.resource-runbook-item {
  display: grid;
  gap: 10px;
}

.resource-secret-actions {
  display: flex;
  align-items: center;
  gap: 7px;
}

.resource-secret-mask {
  flex: 1;
  min-width: 0;
  padding: 7px 9px;
  border: 1px dashed var(--border-strong);
  border-radius: 7px;
  color: var(--text-soft);
  font-family: var(--mono);
  font-size: 10px;
  overflow-wrap: anywhere;
}

.resource-secret-button {
  min-height: 31px;
  padding: 5px 9px;
  font-size: 11px;
}

.resource-secret-locked {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-soft);
  font-size: 11px;
}

.resource-link-icon {
  display: grid;
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 7px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 15px;
  font-weight: 800;
}

.resource-link-title-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
}

.resource-tag {
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft);
  font-size: 9px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.resource-runbook-heading > div:first-child {
  display: grid;
  gap: 3px;
}

.resource-markdown {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
}

.resource-markdown > :first-child {
  margin-top: 0;
}

.resource-markdown > :last-child {
  margin-bottom: 0;
}

.resource-markdown h1,
.resource-markdown h2,
.resource-markdown h3 {
  color: var(--text-strong);
  font-size: 13px;
}

.resource-markdown code {
  padding: 2px 4px;
  border-radius: 4px;
  background: var(--soft-bg);
  font-family: var(--mono);
  font-size: 10px;
}

.resource-markdown pre {
  overflow-x: auto;
  padding: 10px;
  border-radius: 7px;
  background: var(--soft-bg);
}

.resource-markdown a {
  color: var(--accent);
}

@media (max-width: 900px) {
  .resource-hub-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .resource-intro-stats {
    justify-content: flex-start;
  }

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

@media (max-width: 640px) {
  .resource-hub-grid,
  .resource-form-grid {
    grid-template-columns: 1fr;
  }

  .resource-card--wide {
    grid-column: auto;
  }

  .resource-form-grid .span-2 {
    grid-column: auto;
  }

  .resource-secret-actions {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .resource-secret-mask {
    flex-basis: 100%;
  }
}

/* ── In-run resource drawer ──────────────────────────────────────────────── */
.resource-modal-backdrop {
  z-index: 1100;
}

.resource-modal {
  width: min(760px, calc(100vw - 32px));
  max-height: min(760px, calc(100vh - 32px));
  overflow: hidden;
}

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

.resource-modal .modal-header h2 {
  margin: 0;
  color: var(--text-strong);
  font-size: 18px;
}

.resource-modal-body {
  display: grid;
  gap: 18px;
  max-height: calc(100vh - 140px);
  padding: 16px 18px 20px;
  overflow-y: auto;
}

.resource-modal-section {
  display: grid;
  gap: 10px;
}

.resource-modal-environments,
.resource-modal-credentials,
.resource-modal-links,
.resource-modal-notes {
  display: grid;
  gap: 8px;
}

.resource-modal-environment,
.resource-modal-credential,
.resource-modal-links a,
.resource-modal-notes details {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.resource-modal-environment,
.resource-modal-links a {
  display: grid;
  gap: 3px;
}

.resource-modal-environment strong,
.resource-modal-credential strong {
  color: var(--text-strong);
  font-size: 12px;
}

.resource-modal-environment span,
.resource-modal-credential > div span,
.resource-modal-notes summary span {
  color: var(--text-soft);
  font-size: 10px;
}

.resource-modal-credential {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resource-modal-credential > div {
  display: grid;
  flex: 1;
  min-width: 0;
  gap: 3px;
}

.resource-modal-credential .resource-secret-mask {
  max-width: 190px;
}

.resource-modal-links a {
  align-items: center;
  grid-template-columns: max-content minmax(0, 1fr);
  color: var(--accent);
  font-size: 12px;
}

.resource-modal-notes details {
  color: var(--text-muted);
  font-size: 12px;
}

.resource-modal-notes summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  color: var(--text-strong);
  font-weight: 700;
}

.resource-modal-notes p {
  margin: 10px 0 0;
  line-height: 1.5;
  white-space: pre-wrap;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 640px) {
  .resource-modal-credential {
    align-items: stretch;
    flex-wrap: wrap;
  }

  .resource-modal-credential .resource-secret-mask {
    flex-basis: 100%;
    max-width: none;
  }
}

/* ── UI polish overrides: responsive contracts and touch targets ─────────── */
@media (max-width: 640px) {
  .run-module-filter-bar select,
  .run-module-filter-bar input[type="search"] {
    width: 100%;
    flex-basis: 100%;
  }

  .run-progress-row {
    grid-template-columns: auto 1fr;
  }

  .run-progress-row .progress-track {
    grid-column: 1 / -1;
  }

  .run-case-meta {
    grid-template-columns: 1fr;
  }

  .run-list-table,
  .rpt-run-history-table,
  .rpt-module-table {
    min-width: 0;
  }

  .ci-trend-labels span:nth-child(even):not(:last-child) {
    display: none;
  }

  .notification-dropdown {
    top: 104px;
  }
}

@media (pointer: coarse) {
  .resource-secret-button,
  .resource-icon-button {
    min-height: 44px;
  }

  .resource-icon-button {
    width: 44px;
    height: 44px;
  }
}

.resource-credential-heading > div:first-child {
  min-width: 0;
}

.resource-credential-heading > div:first-child strong,
.resource-credential-heading > div:first-child span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Test-case linked bugs alignment ─────────────────────────────────────── */
.tc-detail-linked-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.tc-detail-linked-header h2 {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.tc-detail-linked-header .count-badge {
  display: inline-flex;
  min-width: 24px;
  height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 7px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
}

.tc-detail-linked-table {
  overflow: hidden;
}

.tc-detail-linked-table table {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.tc-detail-linked-table th,
.tc-detail-linked-table td {
  padding: 12px 10px;
  text-align: center;
  vertical-align: middle;
}

.tc-detail-linked-table th {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tc-detail-linked-table td:nth-child(1) {
  width: 18%;
}

.tc-detail-linked-table td:nth-child(2) {
  width: 42%;
}

.tc-detail-linked-table td:nth-child(3),
.tc-detail-linked-table td:nth-child(4) {
  width: 20%;
}

.tc-detail-linked-table td:nth-child(2) a {
  display: block;
  overflow-wrap: anywhere;
}

.tc-detail-linked-table .empty-table-row {
  display: table-cell;
  width: 100%;
  min-height: 0;
  padding: 34px 18px;
  background: var(--soft-bg);
  color: var(--text-soft);
  text-align: center;
  vertical-align: middle;
}

@media (max-width: 640px) {
  .tc-detail-linked-table th,
  .tc-detail-linked-table td {
    padding: 10px 6px;
    font-size: 11px;
  }

  .tc-detail-linked-table th {
    font-size: 9px;
  }
}

/* ── Shipped UI contract overrides ─────────────────────────────────────────
   Final selectors for the current Blade tables and shared action groups. */
.page-actions { flex-wrap: wrap; }
.page-actions-row { align-items: center; gap: 10px; }
.page-actions-row > form,
.page-actions-row > .status-pill,
.page-actions-row > .muted-meta { flex: 0 0 auto; }

.requirements-table,
.coverage-matrix-table,
.run-results-table {
  table-layout: fixed;
  width: 100%;
}

.requirements-table td,
.coverage-matrix-table td,
.run-results-table td,
.requirements-table th,
.coverage-matrix-table th,
.run-results-table th {
  white-space: normal;
}

.requirements-table .req-col-key { width: 12%; }
.requirements-table .req-col-title { width: 38%; overflow-wrap: anywhere; }
.requirements-table .req-col-priority { width: 14%; }
.requirements-table .req-col-linked { width: 14%; text-align: center; }
.requirements-table .req-col-actions { width: 22%; text-align: right; }

.coverage-matrix-table .coverage-col-requirement { width: 25%; overflow-wrap: anywhere; }
.coverage-matrix-table .coverage-col-priority { width: 12%; }
.coverage-matrix-table .coverage-col-linked { width: 11%; text-align: center; }
.coverage-matrix-table .coverage-col-pass { width: 14%; }
.coverage-matrix-table .coverage-col-verdict { width: 15%; }
.coverage-matrix-table .coverage-col-cases { width: 23%; }

.run-results-table .run-results-col-title { width: 22%; overflow-wrap: anywhere; }
.run-results-table .run-results-col-module { width: 14%; }
.run-results-table .run-results-col-status { width: 14%; }
.run-results-table .run-results-col-actual { width: 22%; overflow-wrap: anywhere; line-height: 1.45; }
.run-results-table .run-results-col-evidence { width: 18%; overflow-wrap: anywhere; line-height: 1.45; }
.run-results-table .run-results-col-bug { width: 10%; }

.table-row-actions-cell { text-align: right; }
.table-row-actions-cell .table-row-actions { justify-content: flex-end; gap: 9px; min-width: 64px; }
.requirement-edit-popover {
  position: absolute;
  right: 16px;
  z-index: 20;
  width: min(420px, 90vw);
  margin-top: 8px;
  box-shadow: var(--shadow-md);
}
.mobile-card-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px 10px;
  margin-top: 8px;
  color: var(--text-muted);
  font-size: 11px;
}
.status-pill--compact { min-width: 0; min-height: 18px; padding: 2px 7px; font-size: 10px; }

@media (max-width: 720px) {
  .page-actions,
  .page-actions-row { width: 100%; }
  .page-actions-row { justify-content: flex-start; }
  .page-actions-row > .primary-button,
  .page-actions-row > .secondary-button,
  .page-actions-row > .transfer-button { flex: 1 1 auto; }
  .coverage-matrix-table,
  .run-results-table { min-width: 700px; }
}

@media (max-width: 520px) {
  .requirements-table .req-col-key { width: 18%; }
  .requirements-table .req-col-title { width: 42%; }
  .requirements-table .req-col-priority { width: 18%; }
  .requirements-table .req-col-actions { width: 22%; }
  .requirements-table tr > .req-col-linked,
  .requirements-table tr > th.req-col-linked,
  .coverage-matrix-table tr > .coverage-col-cases,
  .coverage-matrix-table tr > th.coverage-col-cases { display: none; }
}

@media (max-width: 480px) {
  .bug-table .bug-col-severity,
  .bug-table th.bug-col-severity,
  .bug-table .bug-col-status,
  .bug-table th.bug-col-status { display: table-cell; }
  .bug-table .bug-col-assignee,
  .bug-table th.bug-col-assignee { display: none; }

  .rpt-run-history-table .rpt-run-col-block,
  .rpt-run-history-table th.rpt-run-col-block,
  .rpt-run-history-table .rpt-run-col-by,
  .rpt-run-history-table th.rpt-run-col-by { display: none; }
}

@media (max-width: 640px) {
  .rpt-run-history-table .rpt-run-col-block,
  .rpt-run-history-table th.rpt-run-col-block,
  .rpt-run-history-table .rpt-run-col-rate,
  .rpt-run-history-table th.rpt-run-col-rate { display: table-cell !important; }
}

@media (max-width: 480px) {
  .rpt-run-history-table .rpt-run-col-rate,
  .rpt-run-history-table th.rpt-run-col-rate { display: table-cell !important; }
  .rpt-run-history-table .rpt-run-col-by,
  .rpt-run-history-table th.rpt-run-col-by { display: none !important; }
}

@media (min-width: 901px) {
  .tc-table { min-width: 0; }
}

@media (max-width: 800px) {
  .tc-page-layout { flex-direction: column; }
  .tc-folder-sidebar {
    width: 100%;
    position: static;
    max-height: none;
  }
  .tc-main-panel .table-wrap.has-mobile-cards { display: none !important; }
  .tc-main-panel .mobile-card-list {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    background: var(--page-bg);
  }
}

/* ── Full-page scroll + bug table contract ───────────────────────────────── */
html,
body {
  overflow-y: auto;
}

.workspace {
  min-height: 0;
  align-items: flex-start;
}

.content {
  min-height: max-content;
  padding-bottom: clamp(72px, 10vh, 144px) !important;
  overflow-x: clip;
  overflow-y: visible;
}

.bug-table {
  table-layout: fixed;
  width: 100%;
}

.bug-table td {
  white-space: normal;
  overflow-wrap: anywhere;
}

.bug-table .bug-col-id { width: 12%; }
.bug-table .bug-col-title { width: 34%; }
.bug-table .bug-col-severity { width: 15%; }
.bug-table .bug-col-status { width: 15%; }
.bug-table .bug-col-assignee { width: 16%; }
.bug-table .bug-col-actions { width: 8%; text-align: right; }
.bug-table .bug-col-id,
.bug-table .bug-col-severity,
.bug-table .bug-col-status,
.bug-table .bug-col-actions { white-space: nowrap; }

.bug-table .table-row-actions-cell .table-row-actions {
  justify-content: flex-end;
}

@media (max-width: 640px) {
  .bug-table {
    min-width: 0;
  }
}

/* ── Shared step libraries ─────────────────────────────────────────────────── */
.shared-step-library-panel {
  overflow: hidden;
}

.shared-step-library-header {
  align-items: flex-start;
  gap: 16px;
}

.shared-step-library-header h2 {
  margin: 2px 0 4px;
}

.shared-step-library-header p {
  max-width: 720px;
  margin: 0;
}

.shared-step-create-form {
  margin: 0;
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.shared-step-library-body {
  display: grid;
  gap: 28px;
  padding: 24px;
}

.shared-step-library-section {
  display: grid;
  gap: 14px;
}

.shared-step-library-section-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.shared-step-library-section-header h3 {
  margin: 0 0 2px;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 18px;
}

.shared-step-library-section-header p {
  margin: 0;
}

.shared-step-library-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.shared-step-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.shared-step-card--archived {
  background: var(--soft-bg);
  opacity: .82;
}

.shared-step-card-header,
.shared-step-card-title-row,
.shared-step-card-footer {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.shared-step-card-header {
  justify-content: space-between;
}

.shared-step-card-title-row {
  flex-wrap: wrap;
  align-items: center;
}

.shared-step-card h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 16px;
  line-height: 1.3;
}

.shared-step-card-description {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.5;
}

.shared-scope-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.shared-scope-badge--global {
  color: var(--accent-strong);
  border-color: #b9ded5;
  background: var(--accent-soft);
}

.shared-scope-badge--project {
  color: var(--text-muted);
  border-color: var(--border);
  background: var(--soft-bg);
}

.shared-scope-badge--archived {
  color: var(--warning);
  border-color: #ead7a6;
  background: #fff8e7;
}

.shared-step-card-body {
  display: grid;
  gap: 8px;
}

.shared-step-card-body h4 {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin: 0;
  color: var(--text-strong);
  font-size: 12px;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.shared-step-card-body h4 span {
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
}

.shared-step-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0 0 0 28px;
  color: var(--text-muted);
  font-size: 13px;
}

.shared-step-list li {
  padding-left: 4px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.shared-step-list li::marker {
  color: var(--accent);
  font-weight: 700;
}

.shared-step-empty,
.shared-step-library-empty {
  margin: 0;
  color: var(--text-soft);
  font-size: 13px;
  font-style: italic;
}

.shared-step-card-actions {
  position: relative;
  flex: 0 0 auto;
}

.shared-step-card-actions > summary {
  cursor: pointer;
  list-style: none;
}

.shared-step-card-actions > summary::-webkit-details-marker {
  display: none;
}

.shared-step-edit-form {
  position: absolute;
  z-index: 2;
  top: calc(100% + 8px);
  right: 0;
  display: grid;
  min-width: min(360px, calc(100vw - 48px));
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-md);
}

.shared-step-edit-form label {
  display: grid;
  gap: 5px;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 600;
}

.shared-step-edit-form input,
.shared-step-edit-form textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-strong);
  font-size: 13px;
}

.shared-step-edit-form textarea {
  resize: vertical;
}

.shared-step-card-footer {
  justify-content: flex-end;
  padding-top: 2px;
  border-top: 1px solid var(--border-soft);
}

.shared-step-picker-wrap {
  display: flex;
  align-items: end;
  gap: 8px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}

.shared-step-picker-label {
  display: grid;
  gap: 4px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
}

.shared-step-picker-controls {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  width: 100%;
}

.shared-step-picker-wrap select {
  flex: 1 1 280px;
  min-width: min(300px, 100%);
}

.shared-step-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--border-soft);
  background: var(--surface);
  flex-wrap: wrap;
}

.shared-step-scope-tabs {
  display: inline-flex;
  gap: 4px;
  background: var(--soft-bg);
  padding: 3px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-soft);
}

.scope-tab-btn {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s ease;
}

.scope-tab-btn:hover {
  color: var(--text-strong);
}

.scope-tab-btn.active {
  background: var(--surface);
  color: var(--text-strong);
  box-shadow: var(--shadow-sm);
}

.shared-step-search-wrap input {
  padding: 7px 12px;
  font-size: 13px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  min-width: 240px;
}

.shared-step-search-wrap input:focus {
  outline: none;
  border-color: var(--primary);
}

.shared-step-create-container {
  background: var(--soft-bg);
  border-bottom: 1px solid var(--border);
}

.shared-step-form-heading h3 {
  margin: 0 0 4px;
  font-size: 16px;
  font-family: var(--display);
  color: var(--text-strong);
}

.shared-step-form-heading p {
  margin: 0;
}

.shared-step-card-steps-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.copy-steps-btn {
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  cursor: pointer;
  transition: all .15s ease;
}

.copy-steps-btn:hover {
  background: var(--soft-bg);
  color: var(--text-strong);
}

.copy-steps-btn.btn-copied {
  background: #10b981;
  color: #fff;
  border-color: #10b981;
}

.count-badge--global {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.count-badge--project {
  background: rgba(6, 182, 212, 0.15);
  color: #06b6d4;
}

@media (max-width: 640px) {
  .shared-step-library-body {
    padding: 16px;
  }

  .shared-step-library-header,
  .shared-step-library-section-header {
    flex-direction: column;
  }

  .shared-step-library-header .secondary-button {
    width: 100%;
  }

  .shared-step-library-grid {
    grid-template-columns: 1fr;
  }

  .shared-step-card-header {
    flex-direction: column;
  }

  .shared-step-card-actions {
    align-self: flex-start;
  }

  .shared-step-edit-form {
    position: static;
    min-width: 0;
    margin-top: 8px;
    box-shadow: none;
  }

  .shared-step-picker-wrap select,
  .shared-step-picker-wrap .secondary-button {
    flex: 1 1 100%;
  }
}

/* ── Interactive Numbered Step Editor ───────────────────────────────────── */
.tc-step-builder-card {
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  background: var(--surface);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tc-step-builder-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border-soft);
}

.tc-step-builder-title {
  font-size: 14.5px;
  font-weight: 650;
  color: var(--ink);
  display: block;
}

.tc-steps-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.tc-step-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid var(--border-soft);
  background: var(--surface-card, #ffffff);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.tc-step-row:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 2.5px rgba(37, 99, 235, 0.1);
}

.tc-step-badge-col {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  padding-top: 6px;
  flex-shrink: 0;
}

.tc-step-num-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background: var(--bg-muted, #f1f5f9);
  font-size: 12px;
  font-weight: 700;
  color: var(--ink);
}

.tc-step-num-badge--shared {
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
}

.tc-step-body-col {
  flex: 1;
  min-width: 0;
}

.tc-step-textarea {
  width: 100%;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13.5px;
  font-family: inherit;
  line-height: 1.45;
  resize: vertical;
  min-height: 52px;
  box-sizing: border-box;
  background: transparent;
  color: var(--ink);
}

.tc-step-textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.tc-step-actions-col {
  display: flex;
  flex-direction: column;
  gap: 3px;
  align-items: center;
  flex-shrink: 0;
  padding-top: 2px;
}

.tc-step-btn {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  color: var(--ink-secondary);
  font-size: 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s ease;
  line-height: 1;
  padding: 0;
}

.tc-step-btn:hover {
  background: var(--bg-hover, #e2e8f0);
  color: var(--ink);
}

.tc-step-btn--del:hover {
  background: #fee2e2;
  color: #dc2626;
  border-color: #fca5a5;
}

.tc-step-row--shared {
  background: rgba(139, 92, 246, 0.04);
  border-color: rgba(139, 92, 246, 0.3);
  border-left: 3px solid #8b5cf6;
}

.tc-step-shared-content {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 4px 0;
}

.tc-step-shared-top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tc-step-shared-tag {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: rgba(139, 92, 246, 0.15);
  color: #8b5cf6;
  padding: 2px 6px;
  border-radius: 4px;
}

.tc-step-shared-title {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.tc-step-btn-unlink {
  font-size: 11.5px;
  padding: 3px 8px;
  margin-left: auto;
}

.tc-step-shared-ol {
  margin: 4px 0 0 20px;
  padding: 0;
  font-size: 12.5px;
  color: var(--ink-secondary);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.tc-steps-add-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 4px;
}

/* ── MILESTONE DETAIL (test plans › milestone) ─────────────────────────── */
.mst-flow {
  padding: 16px 0 0;
}

.mst-flow-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding: 0 20px;
}

.mst-flow-hint {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
}

.mst-switch {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}

.mst-switch form {
  margin: 0;
}

.mst-switch-label {
  margin-right: 2px;
  color: var(--text-soft);
  font-size: 11px;
}

.mst-switch-btn {
  min-height: 26px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.mst-switch-btn:hover,
.mst-switch-btn:focus-visible {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mst-track {
  display: flex;
  align-items: flex-start;
  margin: 6px 0 0;
  padding: 10px 20px 18px;
  list-style: none;
}

.mst-step {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  flex: 0 0 auto;
  width: 118px;
  text-align: center;
}

.mst-step:not(:last-child)::after {
  content: '';
  position: absolute;
  top: 13px;
  left: calc(50% + 18px);
  width: calc(100% - 36px);
  height: 1px;
  background: var(--border);
}

.mst-step.is-done::after,
.mst-step.is-current::after {
  background: color-mix(in srgb, var(--accent) 42%, var(--border));
}

.mst-step-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border: 1px solid var(--border-strong);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.mst-step.is-done .mst-step-dot {
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mst-step.is-current .mst-step-dot {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 12%, transparent);
}

.mst-step-label {
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.3;
}

.mst-step.is-current .mst-step-label {
  color: var(--text-strong);
  font-weight: 700;
}

.mst-hero {
  margin-top: 20px;
}

.mst-scope {
  max-width: 68ch;
  margin: 12px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.55;
}

.mst-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  margin-top: 16px;
}

.mst-fact {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 11.5px;
}

.mst-fact svg {
  flex: 0 0 auto;
  color: var(--text-soft);
}

.mst-fact-label {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.mst-fact strong {
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 650;
}

.mst-progress {
  display: grid;
  grid-template-columns: minmax(90px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  max-width: 520px;
  margin-top: 18px;
}

.mst-progress .tp-progress-track {
  height: 6px;
}

.mst-progress strong {
  color: var(--text-strong);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.mst-progress > span {
  color: var(--text-soft);
  font-size: 11px;
  white-space: nowrap;
}

.mst-progress-empty {
  margin: 16px 0 0;
  color: var(--text-soft);
  font-size: 11.5px;
}

.tp-detail-stats strong.mst-num--danger {
  color: var(--danger);
}

.tp-detail-stats strong.mst-num--warning {
  color: var(--warning);
}

.mst-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
  align-items: start;
  gap: 20px;
  margin-top: 20px;
}

.mst-grid > .panel,
.mst-stack > .panel {
  margin-bottom: 0;
}

.mst-stack {
  display: grid;
  gap: 20px;
  min-width: 0;
}

.mst-signoff-body {
  display: grid;
  gap: 16px;
  padding: 18px 20px 20px;
}

.mst-signer {
  display: flex;
  align-items: center;
  gap: 11px;
}

.mst-signer-mark {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, transparent);
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.mst-signer strong {
  display: block;
  color: var(--text-strong);
  font-size: 13px;
}

.mst-signer span {
  color: var(--text-soft);
  font-size: 11px;
}

.mst-ledger {
  display: grid;
  margin: 0;
  border-top: 1px solid var(--border-soft);
}

.mst-ledger-row {
  display: grid;
  grid-template-columns: minmax(110px, 32%) minmax(0, 1fr);
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border-soft);
}

.mst-ledger-row:last-child {
  padding-bottom: 2px;
  border-bottom: 0;
}

.mst-ledger dt {
  color: var(--text-soft);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.06em;
  line-height: 1.7;
  text-transform: uppercase;
}

.mst-ledger dd {
  margin: 0;
  color: var(--text-muted);
  font-size: 12.5px;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.mst-signoff-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mst-rule {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 2px solid var(--accent);
  border-radius: 0 8px 8px 0;
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.mst-warning {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--status-pending-border);
  border-radius: 8px;
  background: var(--status-pending-bg);
  color: var(--status-pending-fg);
  font-size: 12px;
  line-height: 1.5;
}

.mst-warning svg {
  flex: 0 0 auto;
  margin-top: 1px;
}

.mst-warning strong {
  font-weight: 750;
}

.mst-history {
  border-top: 1px solid var(--border-soft);
  padding: 0 20px 16px;
}

.mst-history > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 0 0;
  color: var(--text-muted);
  font-size: 11.5px;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.mst-history > summary::-webkit-details-marker,
.mst-plans > summary::-webkit-details-marker {
  display: none;
}

.mst-history > summary::after {
  content: 'Show';
  color: var(--accent);
  font-size: 11px;
  font-weight: 650;
}

.mst-history[open] > summary::after {
  content: 'Hide';
}

.mst-history-list {
  display: grid;
  gap: 10px;
  padding-top: 12px;
}

.mst-history-card {
  display: grid;
  gap: 6px;
  padding: 12px 14px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--table-stripe);
}

.mst-history-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.mst-history-head .status-pill {
  min-width: 0;
}

.mst-history-meta {
  color: var(--text-soft);
  font-size: 11px;
}

.mst-history-line {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.mst-history-line strong {
  color: var(--text-strong);
  font-weight: 650;
}

.mst-history-reopen {
  margin: 2px 0 0;
  color: var(--status-failed-fg);
  font-size: 11.5px;
  line-height: 1.5;
}

.mst-queue-note {
  margin: 0;
  padding: 12px 20px 0;
  color: var(--text-muted);
  font-size: 11.5px;
  line-height: 1.5;
}

.mst-queue-note strong {
  color: var(--text-strong);
}

.mst-queue-list {
  display: grid;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--border-soft);
}

.mst-queue-item {
  display: grid;
  gap: 7px;
  padding: 12px 20px;
  border-bottom: 1px solid var(--border-soft);
  transition: background 140ms ease;
}

.mst-queue-item:last-child {
  border-bottom: 0;
}

.mst-queue-item:hover {
  background: color-mix(in srgb, var(--accent) 4%, var(--surface));
}

.mst-queue-link {
  display: flex;
  align-items: baseline;
  gap: 9px;
  min-width: 0;
  color: inherit;
  text-decoration: none;
}

.mst-queue-id {
  flex: 0 0 auto;
  color: var(--text-soft);
  font-size: 10.5px;
}

.mst-queue-link strong {
  min-width: 0;
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

.mst-queue-link:hover strong,
.mst-queue-link:focus-visible strong {
  color: var(--accent-strong);
}

.mst-queue-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mst-queue-meta .status-pill {
  min-width: 0;
  min-height: 20px;
  padding: 0 7px;
  font-size: 10px;
}

.mst-queue-fix {
  color: var(--text-soft);
  font-size: 11px;
}

.mst-plans > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 18px;
  cursor: pointer;
  list-style: none;
}

.mst-plans > summary:hover {
  background: var(--soft-bg);
}

.mst-plans[open] > summary {
  border-bottom: 1px solid var(--border);
}

.mst-plans > summary h2 {
  margin: 3px 0 0;
  color: var(--text-strong);
  font-size: 14px;
  font-weight: 750;
}

.mst-bugs-head {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.mst-bug-id {
  font-size: 11px;
  color: var(--text-soft);
  white-space: nowrap;
}

/* Content links inherit the app-wide accent colour; only rhythm is set here. */
.mst-bugs-table .mst-bug-link {
  display: block;
  font-size: 12.5px;
  font-weight: 650;
  line-height: 1.4;
}

.mst-bugs-table .mst-bug-link:hover,
.mst-bugs-table .mst-bug-link:focus-visible {
  text-decoration: underline;
}

.mst-bug-tc {
  margin-top: 3px;
  color: var(--text-soft);
  font-size: 10.5px;
}

.mst-bug-owner {
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
}

.mst-bugs-table .mst-col-action {
  width: 1%;
  text-align: right;
  white-space: nowrap;
}

.mst-bugs-table .status-pill {
  min-width: 0;
}

.mst-row-btn {
  min-height: 26px;
  padding: 0 10px;
  font-size: 11px;
}

.mst-modal-form {
  display: grid;
  gap: 14px;
  padding: 20px;
}

.mst-modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 4px;
}

@media (max-width: 1100px) {
  .mst-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .mst-hero {
    flex-direction: column;
  }

  .mst-hero .tp-detail-stats {
    min-width: 0;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid var(--border);
    border-left: 0;
  }
}

@media (max-width: 720px) {
  .mst-flow-head {
    padding: 0 14px;
  }

  .mst-track {
    padding: 10px 14px 16px;
    overflow-x: auto;
  }

  .mst-step {
    width: 96px;
  }

  .mst-ledger-row {
    grid-template-columns: minmax(0, 1fr);
    gap: 4px;
  }

  .mst-signoff-body,
  .mst-history,
  .mst-queue-note {
    padding-right: 14px;
    padding-left: 14px;
  }

  .mst-queue-item {
    padding: 12px 14px;
  }

  .mst-progress {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .mst-progress > span {
    display: none;
  }
}
