/* ==========================================================================
   QA LAB — BLADE SHIMS
   The React app used JS state for dropdowns; the Blade monolith uses native
   <details>/<summary>. These rules make the disclosure widgets look identical
   to the original React markup. Load this AFTER qa-lab.css.
   ========================================================================== */

/* ── Disclosure widgets (user pill, notification bell) ──────────────────── */
.disclosure {
  position: relative;
}

.disclosure > summary {
  list-style: none;
  cursor: pointer;
}

.disclosure > summary::-webkit-details-marker,
.disclosure > summary::marker {
  display: none;
  content: '';
}

.disclosure > summary:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.disclosure-chevron {
  transition: transform 0.2s ease;
  margin-right: 4px;
  flex-shrink: 0;
}

.disclosure[open] .disclosure-chevron {
  transform: rotate(180deg);
}

/* Anchors reused as dropdown rows must not pick up link underlines */
.user-dropdown-item,
.user-dropdown-item:hover {
  text-decoration: none;
}

.user-dropdown-item--danger {
  color: var(--danger);
}

/* Logout lives in a POST form, so the row is a nested button */
.user-dropdown-form {
  margin: 0;
}

/* ── Flash messages (match React fixed toast-container) ─────────────────── */
.flash-stack {
  position: fixed;
  top: 72px;
  right: 20px;
  z-index: 1100;
  display: grid;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  margin: 0;
  pointer-events: none;
}

.flash-stack .toast {
  min-width: 0;
  width: 100%;
  max-width: none;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
}

.flash-stack .toast ul {
  margin: 0;
  padding-left: 18px;
}

/* ── Inline create form (Projects page) ─────────────────────────────────── */
.panel-body {
  padding: 16px;
}

.inline-form {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 2fr) auto;
  align-items: end;
  gap: 12px;
}

.inline-form label {
  margin-bottom: 0;
}

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

/* Links standing in for buttons — React set text-decoration inline. */
a.primary-button,
a.secondary-button,
a.danger-button,
a.ghost-button,
a.icon-button,
a.page-back-btn,
a.proj-active-run-chip,
a.proj-qnav-card,
a.quick-action-card,
a.mobile-card-title-link {
  text-decoration: none;
}

/* ── Text tone utilities used by the dashboard list badges ──────────────── */
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }

/* ── Blade form / detail helpers (React used component-local styles) ─────── */
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.form-grid label {
  display: grid;
  gap: 4px;
  line-height: 1.3;
  font-size: 13px;
  color: var(--text-muted);
}

.form-grid .span-2 { grid-column: 1 / -1; }

.form-grid input,
.form-grid select,
.form-grid textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  padding: 8px 10px;
  color: var(--text-strong);
}

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

/* Prefer qa-lab.css .toolbar; only add Blade form helpers here */
.toolbar-filters,
.toolbar-import {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.toolbar-filters input,
.toolbar-filters select,
.toolbar-import input[type="file"] {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 7px 10px;
  background: var(--surface);
  font-size: 13px;
}

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

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.tag-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft-bg);
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
}

.priority-chip {
  display: inline-flex;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  background: var(--soft-bg);
  color: var(--text-muted);
}

/* Priority chip colors live in qa-lab.css and are driven by the
   --priority-* tokens in tokens.css (single source of truth). */

.detail-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(280px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.detail-dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px 16px;
  margin: 0 0 16px;
  padding: 0 16px;
}

.detail-dl dt {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-soft);
}

.detail-dl dd {
  margin: 2px 0 0;
  color: var(--text-strong);
  font-weight: 600;
}

.detail-tags { padding: 0 16px 12px; }

/* Test-case detail view: calm hierarchy, readable metadata, and aligned text blocks. */
.tc-detail-page {
  display: grid;
  gap: 16px;
}

.tc-detail-hero {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  padding: 24px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(255, 254, 250, 0.98), rgba(237, 243, 239, 0.72));
}

.tc-detail-hero-copy {
  min-width: 0;
}

.tc-detail-eyebrow,
.tc-detail-section-kicker {
  display: block;
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tc-detail-hero-copy h2 {
  max-width: 780px;
  margin: 7px 0 0;
  color: var(--text-strong);
  font-family: var(--display);
  font-size: clamp(25px, 3vw, 38px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.tc-detail-hero-copy p {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.55;
}

.tc-detail-hero-status {
  display: flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 10px;
  padding-top: 2px;
}

.tc-detail-layout {
  grid-template-columns: minmax(0, 1.8fr) minmax(260px, 0.82fr);
  gap: 20px;
}

.tc-detail-main-panel,
.tc-detail-aside {
  min-width: 0;
}

.tc-detail-section-header {
  align-items: flex-end;
  min-height: 62px;
  padding: 13px 18px;
}

.tc-detail-section-header h2 {
  margin-top: 3px;
}

.tc-detail-meta {
  gap: 0;
  margin: 0;
  padding: 0;
  border-bottom: 1px solid var(--border-soft);
}

.tc-detail-meta > div {
  min-width: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border-soft);
}

.tc-detail-meta > div:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.tc-detail-meta dt {
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.tc-detail-meta dd {
  min-height: 21px;
  margin-top: 5px;
  font-size: 13px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.tc-detail-main-panel .detail-tags {
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 14px 18px 2px;
}

.tc-detail-main-panel .detail-tags .tag-chip {
  min-height: 24px;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border-soft);
  background: var(--soft-bg);
  line-height: 1.2;
}

.tc-detail-main-panel .tc-detail-block + .tc-detail-block {
  margin-top: 14px;
}

.tc-detail-main-panel > .tc-detail-block:last-of-type {
  margin-bottom: 18px;
}

.tc-detail-block {
  margin: 14px 18px 0;
  padding: 15px 16px;
  border-color: var(--border-soft);
  background: rgba(250, 251, 248, 0.8);
}

.tc-detail-block h3 {
  color: var(--text-strong);
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.tc-detail-block p {
  margin: 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
}

.tc-detail-block--steps {
  background: var(--surface);
  margin-top: 18px;
  padding: 18px;
}

.tc-detail-block--steps .step-list {
  gap: 7px;
}

.tc-detail-block--steps .step-list li {
  gap: 8px;
  padding: 7px 10px;
  font-size: 12.5px;
  line-height: 1.45;
}

.tc-detail-block--steps .step-list li::before {
  width: 18px;
  height: 18px;
  font-size: 10px;
}

.tc-detail-block--remarks {
  border-left: 3px solid var(--accent);
}

.tc-detail-linked-header {
  margin-top: 22px;
  border-top: 1px solid var(--border-soft);
}

.tc-detail-linked-table {
  margin: 0 18px 18px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.tc-detail-aside .comments-list,
.tc-detail-aside .comment-form,
.tc-detail-aside .history-list {
  padding-left: 18px;
  padding-right: 18px;
}

.test-case-steps-input {
  min-height: 112px;
  max-height: 180px;
  resize: vertical;
  line-height: 1.5;
}

.tc-detail-aside .comment-item {
  padding: 14px 0;
}

.tc-detail-aside .comment-item p {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.tc-detail-history-header {
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
}

.tc-detail-aside .history-list li {
  padding: 9px 0;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (max-width: 720px) {
  .tc-detail-hero {
    flex-direction: column;
    padding: 18px;
  }

  .tc-detail-hero-status {
    width: 100%;
    padding-top: 0;
  }

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

  .tc-detail-meta > div,
  .tc-detail-meta > div:nth-last-child(-n + 2) {
    border-bottom: 1px solid var(--border-soft);
  }

  .tc-detail-meta > div:last-child {
    border-bottom: 0;
  }

  .tc-detail-block {
    margin-left: 12px;
    margin-right: 12px;
  }

  .tc-detail-linked-table {
    margin-left: 12px;
    margin-right: 12px;
  }
}

.step-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.comments-list,
.comment-form,
.history-list {
  padding: 0 16px 16px;
}

.comment-item {
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.comment-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
}

.comment-meta span,
.history-list .muted-meta {
  color: var(--text-soft);
  font-size: 12px;
}

.comment-form {
  display: grid;
  gap: 8px;
}

.comment-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 8px 10px;
}

.history-list {
  list-style: none;
  margin: 0;
  display: grid;
  gap: 10px;
}

.history-list li {
  display: grid;
  gap: 2px;
  font-size: 13px;
}

.history-list-wrap {
  display: flex;
  flex-direction: column;
}

.history-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 7px 12px;
  font-size: 12.5px;
  font-weight: 500;
  font-family: inherit;
  color: var(--text-muted);
  background: var(--soft-bg, #f8fafc);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
}

.history-toggle-btn:hover {
  color: var(--text-strong);
  background: var(--surface-hover, #f1f5f9);
  border-color: var(--border-strong, #cbd5e1);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.history-toggle-btn:focus-visible {
  outline: 2px solid var(--accent, #4f46e5);
  outline-offset: 2px;
}

.history-toggle-btn .history-chevron {
  flex-shrink: 0;
  transition: transform .2s ease;
}

.history-toggle-btn.is-expanded .history-chevron {
  transform: rotate(180deg);
}

.run-case-list-item {
  display: grid;
  grid-template-columns: minmax(max-content, 86px) 1fr auto;
  gap: 8px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  padding: 8px 4px;
  cursor: pointer;
  font: inherit;
  color: var(--text-muted);
}

.run-case-list-item.active {
  background: var(--accent-soft);
  color: var(--text-strong);
}

/* .mt-lg lives in tokens.css with the other spacing utilities. */

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

/* ── Auth (guest layout using React design system) ──────────────────────── */
.auth-form label {
  display: grid;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px 12px;
  background: var(--surface);
  color: var(--text-strong);
}

.password-field {
  position: relative;
  display: grid;
}

.password-field input {
  padding-right: 64px;
}

.password-toggle {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  border: 0;
  background: transparent;
  color: var(--accent);
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.auth-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  min-height: 0;
}

.auth-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: var(--text-muted);
  line-height: 1.2;
  margin: 0;
}

.auth-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.auth-row .link-btn {
  font-size: 12.5px;
  font-weight: 600;
}

/* Honour HTML hidden even when components set display:flex/grid */
[hidden] {
  display: none !important;
}

.run-log-bug-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0;
}


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

.link-btn {
  color: var(--accent);
  font-weight: 650;
  text-decoration: none;
}

/* .auth-error is defined once below with the icon + flex layout. */

.auth-submit {
  width: 100%;
  justify-content: center;
}

/* ── Quiet control-room refinements ─────────────────────────────────────── */
.notification-item-link {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  flex: 1;
  color: inherit;
  text-decoration: none;
}

.notification-item-link:hover {
  text-decoration: none;
}

.auth-copy {
  margin: -8px 0 22px;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.65;
}

.auth-success {
  margin: -4px 0 16px;
  padding: 10px 12px;
  border: 1px solid #bfe2cc;
  border-radius: 9px;
  background: #eff9f2;
  color: var(--success);
  font-size: 12.5px;
  line-height: 1.45;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 22px;
}

.auth-actions form:first-child {
  flex: 1;
}

.auth-actions .primary-button {
  width: 100%;
}

@media (max-width: 480px) {
  .auth-actions {
    align-items: stretch;
    flex-direction: column;
  }
}

/* ── Import / export controls ────────────────────────────────────────────── */
.transfer-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 13px;
  border: 1px solid var(--border-strong);
  border-radius: 9px;
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, transform 0.16s ease, box-shadow 0.16s ease;
}

.transfer-button svg {
  flex: 0 0 auto;
}

.transfer-button:hover {
  border-color: var(--accent);
  background: var(--soft-bg);
  color: var(--accent-strong);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  transform: translateY(-1px);
}

.transfer-button:active {
  transform: translateY(0);
}

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

.transfer-button--export {
  background: var(--surface);
  color: var(--text-strong);
}

.transfer-button--export svg {
  color: var(--accent);
}

.transfer-button--import {
  border-color: color-mix(in srgb, var(--accent) 30%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.transfer-button--import:hover {
  border-color: var(--accent);
  background: #d2ebe4;
}

.transfer-button--strong {
  min-height: 42px;
  padding-inline: 16px;
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  box-shadow: 0 2px 0 rgba(11, 95, 88, 0.14);
}

.transfer-button--strong svg {
  color: currentColor;
}

.transfer-button--strong:hover {
  border-color: var(--accent-strong);
  background: var(--accent-strong);
  color: #fff;
}

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

.file-picker {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  min-height: 40px;
  margin: 0;
  padding: 6px 9px;
  border: 1px dashed var(--border-strong);
  border-radius: 9px;
  background: rgba(255, 254, 250, 0.86);
  color: var(--text-muted);
  cursor: pointer;
  overflow: hidden;
  text-transform: none;
  letter-spacing: 0;
  transition: border-color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.file-picker:hover,
.file-picker:focus-within {
  border-color: var(--accent);
  background: var(--accent-soft);
  box-shadow: var(--focus-ring);
}

.file-picker-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  flex: 0 0 auto;
  border-radius: 7px;
  background: var(--soft-bg);
  color: var(--accent);
}

.file-picker-copy {
  display: grid;
  min-width: 0;
  gap: 2px;
  line-height: 1.15;
}

.file-picker-copy strong {
  color: var(--text-strong);
  font-size: 11.5px;
  font-weight: 750;
}

.file-picker-copy span {
  max-width: 150px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 10.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-picker-action {
  margin-left: auto;
  padding: 5px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 750;
}

.file-picker input[type='file'] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  opacity: 0;
  cursor: pointer;
}

.import-modal-description {
  margin: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 12.5px;
  line-height: 1.5;
}

.capture-attachment-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  margin-top: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface-subtle, var(--surface));
}

.bug-capture-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 5px;
  color: var(--text-muted);
  font-size: 10.5px;
}

.bug-capture-summary span {
  padding: 2px 6px;
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  background: var(--surface-subtle, var(--surface));
}

.capture-attachment-preview {
  display: block;
  width: 100%;
  max-width: 680px;
  height: auto;
  max-height: 420px;
  object-fit: contain;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm, 8px);
  background: #101318;
}

.capture-attachment-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.capture-attachment-meta > div {
  display: grid;
  gap: 3px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.capture-attachment-meta strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.capture-attachment-details summary {
  overflow-wrap: anywhere;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 650;
}

.capture-diagnostics-group {
  display: grid;
  gap: 7px;
  margin-top: 12px;
}

.capture-diagnostics-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.capture-diagnostics-list li {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.capture-diagnostics-list code {
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

.capture-step-list {
  padding-left: 0;
}

.import-modal-field {
  display: grid;
  gap: 7px;
  min-width: 0;
}

.import-modal-label {
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
}

.import-modal-field > input[type='url'] {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text-strong);
  font: inherit;
  font-size: 13px;
}

.import-modal-field > input[type='url']:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: var(--focus-ring);
}

.import-modal-form .modal-footer,
.import-cases-form .modal-footer {
  margin: 4px -18px -18px;
}

.import-cases-form {
  display: grid;
  gap: 12px;
}

.import-preview-body {
  display: grid;
  gap: 14px;
}

.import-preview-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.import-preview-stat {
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--soft-bg);
}

.import-preview-stat strong {
  color: var(--text-strong);
  font-size: 20px;
  line-height: 1;
}

.import-preview-stat span,
.import-preview-section-heading > span {
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.35;
}

.import-preview-stat--valid {
  border-color: color-mix(in srgb, var(--success) 28%, var(--border));
}

.import-preview-stat--invalid {
  border-color: color-mix(in srgb, var(--danger) 28%, var(--border));
}

.import-preview-section {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.import-preview-section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.import-preview-section-heading h3 {
  margin: 0;
  color: var(--text-strong);
  font-size: 12px;
  font-weight: 750;
}

.import-preview-list,
.import-preview-error-list,
.import-preview-row-errors {
  margin: 0;
  padding: 0;
}

.import-preview-list {
  display: grid;
  gap: 5px;
  list-style: none;
  max-height: 150px;
  overflow-y: auto;
}

.import-preview-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 9px;
  border: 1px solid var(--border-soft);
  border-radius: 6px;
  background: var(--surface);
}

.import-preview-path {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--text-strong);
  font-size: 12px;
}

.import-preview-badge {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.import-preview-badge--create {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.import-preview-badge--reuse {
  background: var(--soft-bg);
  color: var(--text-muted);
}

.import-preview-errors {
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--danger) 28%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--danger) 4%, var(--surface));
}

.import-preview-error-list {
  display: grid;
  gap: 3px;
  padding-left: 18px;
  color: var(--danger);
  font-size: 12px;
  line-height: 1.4;
}

.import-preview-row-errors {
  display: grid;
  gap: 8px;
  max-height: 190px;
  overflow-y: auto;
  padding-left: 21px;
  color: var(--text-strong);
  font-size: 12px;
}

.import-preview-row-errors > li {
  padding-left: 2px;
}

.import-preview-empty {
  margin: 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.45;
}

.import-preview-form .modal-footer {
  margin: 0 -18px -18px;
}

.form-field-label {
  display: grid;
  gap: 7px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.form-field-label > span {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
}

.form-grid .file-picker {
  display: flex;
  width: 100%;
  min-height: 52px;
  font-size: inherit;
}

.form-grid .file-picker-copy span {
  max-width: none;
}

@media (max-width: 720px) {
  .toolbar-import {
    width: 100%;
    flex-direction: column;
  }

  .toolbar-import .file-picker,
  .toolbar-import .transfer-button {
    width: 100%;
  }

  .import-preview-summary {
    grid-template-columns: 1fr;
  }

  .import-preview-section-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 3px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .transfer-button:hover,
  .transfer-button:active {
    transform: none;
  }
}

/* ── Shared form density pass ────────────────────────────────────────────── */
.form-grid > .form-actions {
  grid-column: 1 / -1;
  align-items: center;
  margin-top: 2px;
  padding-top: 10px;
  border-top: 1px solid var(--border-soft);
}

.form-grid select[multiple] {
  height: auto;
  min-height: 112px;
  max-height: 180px;
  overflow-y: auto;
  padding: 6px 10px !important;
  background-image: none;
}

.modal .test-case-create-modal-form {
  gap: 12px;
}

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

.modal .test-case-create-modal-form .modal-footer {
  grid-column: 1 / -1;
  margin: 2px -18px -18px;
}

.modal .bug-create-modal-form .modal-footer {
  grid-column: 1 / -1;
  margin: 2px -18px -18px;
}

.modal-form label.member-check,
.modal-form label.folder-modal-module-item,
.modal-form label.req-tc-option,
.modal-form label.file-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  letter-spacing: 0;
  text-transform: none;
}

.modal-form label.import-modal-field {
  display: grid;
  gap: 7px;
  margin: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0;
  text-transform: none;
}

.modal-form label.folder-modal-module-item,
.modal-form label.req-tc-option {
  padding: 6px 8px;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-strong);
}

.inline-action-form {
  display: inline-flex;
  width: auto;
  margin: 0;
  align-items: center;
}

.requirements-panel {
  overflow: visible;
}

.profile-settings-body > .profile-form,
.profile-settings-body > .profile-delete-confirm {
  max-width: 680px;
}

.profile-form {
  gap: 12px;
  margin-top: 18px;
}

.profile-field {
  gap: 4px;
}

.profile-form .text-input,
.profile-delete-confirm .text-input {
  margin-top: 0;
}

.auth-backdrop {
  overflow-y: auto;
}

.toolbar > form {
  min-width: 0;
}

@media (max-width: 720px) {
  .toolbar > .toolbar-filters,
  .toolbar > .toolbar-import {
    width: 100%;
  }

  .run-setup .section-header {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .run-setup .section-header h2 {
    flex: 1 1 100%;
  }

  .run-selection-actions {
    width: 100%;
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .toolbar {
    display: flex;
    flex-direction: column;
    align-items: stretch;
  }

  .toolbar > form,
  .toolbar .file-picker {
    width: 100%;
    min-width: 0;
  }
}

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

  .modal .bug-create-modal-form {
    grid-template-columns: 1fr;
  }
}

/* ── Checkbox cleanup ──────────────────────────────────────────────────────
   Keep native behavior, but give every checkbox the same quiet control-room
   treatment. No scaling or jumping on hover; selection is shown by color and
   a compact checkmark instead. */
input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  display: inline-grid;
  place-content: center;
  width: 16px !important;
  height: 16px !important;
  min-width: 16px;
  min-height: 16px !important;
  flex: 0 0 16px;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--border-strong) !important;
  border-radius: 4px !important;
  background: var(--surface) !important;
  box-shadow: none !important;
  color: #fff;
  cursor: pointer;
  vertical-align: middle;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

input[type="checkbox"]::before {
  content: "";
  width: 7px;
  height: 4px;
  border: solid currentColor;
  border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg) scale(0);
  transition: transform 0.12s ease;
}

input[type="checkbox"]:hover {
  border-color: var(--accent) !important;
  background: var(--accent-soft) !important;
}

input[type="checkbox"]:focus-visible {
  outline: none;
  border-color: var(--accent) !important;
  box-shadow: var(--focus-ring) !important;
}

input[type="checkbox"]:checked {
  border-color: var(--accent) !important;
  background: var(--accent) !important;
}

input[type="checkbox"]:checked::before {
  transform: translateY(-1px) rotate(-45deg) scale(1);
}

input[type="checkbox"]:checked:hover {
  border-color: var(--accent-strong) !important;
  background: var(--accent-strong) !important;
}

input[type="checkbox"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

/* Selection rows should feel like a single clickable control. */
.member-check,
.member-picker-option,
.folder-modal-module-item,
.req-tc-option,
.backup-confirmation,
.junit-checkbox-label {
  transition: background-color 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.member-check:hover,
.member-picker-option:hover,
.folder-modal-module-item:hover,
.req-tc-option:hover,
.backup-confirmation:hover {
  background: var(--soft-bg);
}

.member-check:has(input:checked),
.member-picker-option:has(input:checked) {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--border));
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.member-check:focus-within,
.member-picker-option:focus-within,
.folder-modal-module-item:focus-within,
.req-tc-option:focus-within,
.backup-confirmation:focus-within,
.junit-checkbox-label:focus-within {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* Re-enable the project-member checkbox; the old pill hid it entirely. */
.member-check input[type="checkbox"] {
  display: inline-grid;
}

/* Table selection should stay stable rather than bounce on hover/tap. */
.row-checkbox,
.row-checkbox:hover,
.row-checkbox:active,
.tc-table .checkbox-th input[type="checkbox"]:hover,
.tc-table .checkbox-td input[type="checkbox"]:hover {
  transform: none !important;
  transition: background-color 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease !important;
}

/* ── Humanist typography pass ────────────────────────────────────────────── */
body,
button,
input,
select,
textarea {
  font-family: var(--sans);
}

h1,
h2,
h3,
h4,
h5,
h6,
.page-header h1,
.section-header h2,
.auth-title,
.metric-card strong,
.project-context strong,
.modal-header h2 {
  font-family: var(--display);
  font-synthesis: none;
}

.page-header h1,
.section-header h2,
.auth-title,
.metric-card strong,
.project-context strong,
.modal-header h2 {
  letter-spacing: -0.018em;
}

/* ── Auth card & Sign-up page enhancements ─────────────────────────────────── */
.auth-card {
  width: 100%;
  max-width: 440px;
}

.auth-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.auth-header-row .auth-brand {
  margin-bottom: 0;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-soft);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  padding: 5px 9px;
  border-radius: 7px;
  border: 1px solid var(--border-soft);
  background: var(--surface);
  transition: all 0.15s ease;
}

.auth-back-link:hover {
  color: var(--text-strong);
  border-color: var(--border-strong);
  background: var(--soft-bg);
  text-decoration: none;
  transform: translateX(-1px);
}

.auth-label-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-strong);
  letter-spacing: normal;
  text-transform: none;
}

.auth-label-title .required-field-marker {
  color: var(--danger);
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
}

.auth-field-hint {
  font-size: 11.5px;
  color: var(--text-soft);
  font-weight: 450;
  line-height: 1.35;
  text-transform: none;
  letter-spacing: normal;
}

.auth-workspace-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 13px;
  border: 1px solid color-mix(in srgb, var(--accent) 25%, var(--border));
  border-radius: 9px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 12px;
  line-height: 1.4;
}

.auth-workspace-hint svg {
  flex-shrink: 0;
  color: var(--accent);
}

.auth-error {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 18px;
  padding: 11px 14px;
  border-radius: 9px;
  background: var(--status-failed-bg);
  border: 1px solid var(--status-failed-border);
  color: var(--status-failed-fg);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
}

.auth-error svg {
  flex-shrink: 0;
}

.auth-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
}

.auth-form .auth-check {
  display: inline-flex !important;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  cursor: pointer;
  text-transform: none;
  letter-spacing: normal;
  font-size: 13px;
  color: var(--text-muted);
}

.auth-form .auth-row {
  margin-top: -2px;
  margin-bottom: 4px;
}

/* ── Text overflow & container collision fixes ───────────────────────────── */

/* 1. Test case table layout & column spacing */
.tc-table {
  min-width: 900px;
  width: 100%;
  table-layout: fixed;
}

.tc-col-check {
  width: 44px !important;
}

.tc-col-id {
  width: 140px !important;
  min-width: 125px !important;
}

.tc-col-title {
  width: auto !important;
  min-width: 220px !important;
}

.tc-col-module {
  width: 150px !important;
  min-width: 130px !important;
}

.tc-col-priority {
  width: 105px !important;
  min-width: 95px !important;
}

.tc-col-status {
  width: 145px !important;
  min-width: 135px !important;
}

.tc-col-actions {
  width: 120px !important;
  min-width: 100px !important;
}

.tc-table td {
  padding: 10px 12px;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: break-word;
}

.tc-table td.mono,
.tc-table td.tc-id-cell {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  padding-right: 12px;
}

.tc-table td.tc-id-cell a.tc-id-link,
.tc-table td.mono a {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: inherit;
  text-decoration: none;
}

.tc-table td.tc-id-cell a.tc-id-link:hover,
.tc-table td.mono a:hover {
  text-decoration: underline;
  color: var(--accent);
}

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

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

.tc-table td.tc-title-cell {
  padding-right: 18px;
  word-break: break-word;
  overflow-wrap: break-word;
}

.tc-table td.tc-title-cell a.tc-title-link {
  word-break: break-word;
  overflow-wrap: break-word;
  line-height: 1.45;
  display: block;
}

.tc-table td.tc-module-cell {
  word-break: break-word;
  overflow-wrap: break-word;
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.35;
}

.tc-table td.tc-actions-cell {
  padding: 8px 12px !important;
  text-align: right;
}

.tc-th-actions {
  text-align: right !important;
  padding-right: 14px !important;
}

.tc-actions-cell .table-row-actions {
  justify-content: flex-end;
  gap: 6px;
  padding: 0 2px;
}

.tc-actions-cell .icon-btn-action {
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 6px;
}

.tc-actions-cell .icon-btn-action:hover,
.tc-actions-cell .icon-btn-action:focus-visible {
  border-color: var(--border);
  background: var(--soft-bg);
}

/* 2. Backup summary grid & stat card overflow */
.backup-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)) !important;
  gap: 10px !important;
}

.backup-stat {
  display: flex !important;
  flex-direction: column !important;
  justify-content: center !important;
  min-height: 72px !important;
  padding: 10px 12px !important;
  overflow: hidden !important;
  gap: 4px !important;
}

.backup-stat span {
  font-size: 10px !important;
  font-weight: 700 !important;
  letter-spacing: 0.02em !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
}

.backup-stat strong {
  line-height: 1.1 !important;
}

.backup-action-row .backup-note {
  flex: 1;
  min-width: 0;
}

/* 3. Empty table cell full-width fix */
.run-list-table tr > td[colspan],
.table-wrap table tr > td[colspan] {
  width: 100% !important;
  text-align: center !important;
  padding: 24px 16px !important;
  color: var(--text-soft);
}

/* 4. Form label inline required asterisk */
.run-setup-grid label,
.form-grid label {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.label-text {
  display: inline-flex !important;
  align-items: center !important;
  font: inherit !important;
  color: inherit !important;
  gap: 3px !important;
}

.required-field-marker {
  color: var(--danger) !important;
  font-weight: 800 !important;
  display: inline !important;
  margin-left: 2px !important;
}

/* 5. User pill name truncation */
.user-pill-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 6. Project overview bar responsiveness */
.project-bar-info {
  min-width: 0;
  flex: 1;
}

.project-bar-desc {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 7. Metric card text protection */
.metric-card span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 8. Responsive topbar navigation — prevent collision between brand, links, bell, and profile */
/* Mid-size laptops: tighten before links and the search box start to overlap. */
@media (max-width: 1240px) {
  .topbar { gap: 12px !important; }
  .topnav { min-width: 0; gap: 2px !important; }
  .topnav a { padding: 8px 9px !important; }
  .user-pill .role-badge { display: none !important; }
  .topbar-actions #topbar-search-query { width: 120px !important; }
}

@media (max-width: 1100px) {
  .topnav a span {
    display: none !important;
  }
}

@media (max-width: 980px) {
  .topbar {
    padding: 0 16px !important;
    gap: 10px !important;
  }

  .user-pill .role-badge {
    display: none !important;
  }

  .user-pill-name {
    max-width: 90px !important;
  }

  .topnav {
    gap: 4px !important;
  }

  .topnav a span {
    display: none !important;
  }

  .topnav a {
    padding: 8px 10px !important;
  }
}

@media (max-width: 640px) {
  .user-pill-name {
    display: none !important;
  }

  .topnav a span {
    display: inline !important;
  }
}

/* 9. Sidebar and layout responsive alignment — prevent vertical gap on tablet viewports */
@media (max-width: 860px) {
  .workspace {
    flex-direction: column !important;
    width: 100% !important;
    padding: 0 16px !important;
  }

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

  .project-sidebar nav {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 6px !important;
  }

  .project-sidebar a {
    flex: 0 0 auto !important;
    padding: 6px 12px !important;
  }

  .content {
    width: 100% !important;
    padding: 12px 0 36px !important;
  }
}

/* ── Navigation refresh: utility access + grouped project sections ─────────── */
.utility-menu {
  position: relative;
  display: inline-flex;
}

.utility-menu-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.005em;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.utility-menu-trigger:hover,
.utility-menu-trigger.active,
.utility-menu[open] > .utility-menu-trigger {
  border-color: var(--border);
  background: var(--soft-bg);
  color: var(--text-strong);
}

.utility-menu-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  z-index: 200;
  width: 180px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.utility-menu-item {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--text-strong);
  font-size: 12.5px;
  font-weight: 550;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}

.utility-menu-item:hover,
.utility-menu-item.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
  text-decoration: none;
}

.utility-menu-item.active {
  font-weight: 700;
}

.project-context {
  gap: 5px;
}

.project-switcher {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: fit-content;
  margin: -2px 0 2px;
  color: var(--text-soft);
  font-size: 11px;
  font-weight: 650;
  text-decoration: none;
}

.project-switcher:hover {
  color: var(--accent-strong);
  text-decoration: none;
}

.project-switcher:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 5px;
}

.project-switcher-icon {
  transform: rotate(180deg);
}

.project-context .project-switcher span {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: normal;
  text-transform: none;
}

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

.project-nav-group {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.project-nav-group-title {
  margin: 0 12px 2px;
  color: var(--text-soft);
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  line-height: 1.2;
  text-transform: uppercase;
}

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

.project-nav-group a {
  width: 100%;
}

@media (max-width: 980px) {
  .utility-menu-trigger > span,
  .utility-menu-trigger .disclosure-chevron {
    display: none;
  }

  .utility-menu-trigger {
    min-width: 36px;
    justify-content: center;
    padding: 0 8px;
  }
}

@media (max-width: 860px) {
  .project-sidebar nav {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: flex-start;
    gap: 18px !important;
    overflow-x: auto;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

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

  .project-nav-group {
    flex: 0 0 auto;
    min-width: 138px;
  }

  .project-nav-group a {
    flex: 0 0 auto !important;
    justify-content: flex-start !important;
  }
}

@media (max-width: 640px) {
  .utility-menu-trigger > span {
    display: inline;
  }

  .utility-menu-trigger {
    min-width: 0;
    padding: 0 7px;
    font-size: 11px;
  }

  .project-nav-group {
    min-width: 132px;
  }
}

/* Bug detail view: keep metadata, content blocks, and discussion on one rhythm. */
.bug-detail-layout {
  gap: 24px;
}

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

.bug-detail-actions > form {
  display: flex;
  margin: 0;
}

.bug-detail-panel,
.bug-comments-panel {
  margin-bottom: 0;
}

.bug-detail-panel .section-header,
.bug-comments-panel .section-header {
  padding: 16px 20px;
}

.bug-detail-panel .detail-dl {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px 24px;
  margin-bottom: 20px;
  padding: 20px 20px 0;
}

.bug-detail-panel .detail-tags {
  padding: 0 20px 4px;
}

.bug-detail-panel .run-case-block {
  min-width: 0;
  margin: 16px 20px 0;
  padding: 16px;
}

.bug-detail-panel .run-case-block p,
.bug-detail-panel .run-case-block a,
.bug-detail-panel .detail-dl dd {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/*
 * Multiline detail fields: keep saved line breaks / blank lines as plain text.
 * No list conversion, no Markdown, no raw HTML. Scoped — do not use on tables,
 * buttons, or single-line labels.
 */
.multiline-text {
  display: block;
  margin: 0;
  max-width: 100%;
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

.bug-detail-panel,
.bug-detail-panel .run-case-block,
.task-bug-remarks,
.page-header-copy {
  min-width: 0;
}

.bug-detail-panel .run-case-block .multiline-text + .multiline-text,
.task-bug-remarks .multiline-text + .multiline-text {
  margin-top: 6px;
}

.bug-detail-panel .run-case-block h3 {
  margin: 0 0 6px;
}

.page-header-copy > .multiline-text {
  max-width: 100%;
}

/* Evidence / other real anchors next to report text must wrap, not stretch. */
.bug-detail-panel .evidence-list a,
.bug-detail-panel .run-case-block a {
  overflow-wrap: anywhere;
  word-break: break-word;
}

/* Intake preview: same wrap rules as detail pages (already uses pre-wrap). */
.intake-body p {
  overflow-wrap: anywhere;
  word-break: break-word;
  line-height: 1.55;
}

/*
 * Structured test-case steps keep a single CSS counter badge. pre-wrap only
 * preserves newlines inside each step string — it does not add extra numbers.
 */
.tc-detail-block--steps .step-list > li,
.shared-step-display-list > li {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: pre-wrap;
}

@media print {
  .multiline-text,
  .intake-body p,
  .tc-detail-block--steps .step-list > li,
  .shared-step-display-list > li {
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    word-break: break-word;
    line-height: 1.45;
    color: #000;
  }

  .bug-detail-panel .run-case-block {
    break-inside: avoid;
  }
}

.bug-detail-panel > .run-case-block:last-child {
  margin-bottom: 20px;
}

.bug-comments-panel {
  gap: 0;
  overflow: visible;
}

.tc-detail-aside {
  overflow: visible;
}

.bug-comments-panel .comments-list {
  padding: 18px 20px 0;
}

.bug-comments-panel .comment-form {
  margin-top: 18px;
  padding: 0 20px 20px;
}

.bug-comments-panel .comment-mention-hint {
  margin: -2px 0 0;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

/* Discussion cards: keep shared comment and test-plan styles unchanged. */
:is(.bug-comments-panel, .tc-detail-aside) .comment-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
  padding: 12px;
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  background: var(--surface);
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-avatar {
  flex: 0 0 28px;
  width: 28px;
  height: 28px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 10px;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-body {
  flex: 1;
  min-width: 0;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 2px 10px;
  margin-bottom: 8px;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta > strong {
  grid-column: 1;
  grid-row: 1;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta > span {
  grid-column: 1;
  grid-row: 2;
  color: var(--text-soft);
  font-size: 11px;
  line-height: 1.4;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta > .inline-action-form {
  grid-column: 2;
  grid-row: 1 / span 2;
  margin: 0;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta .btn-link {
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  line-height: 1.4;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta .btn-link:hover,
:is(.bug-comments-panel, .tc-detail-aside) .comment-meta .btn-link:focus-visible {
  color: var(--danger);
  text-decoration: underline;
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-meta .btn-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

:is(.bug-comments-panel, .tc-detail-aside) .comment-item .comment-text {
  margin: 0;
  color: var(--text-strong);
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.comment-mention-editor {
  position: relative;
}

.comment-mention-editor .comment-input,
.comment-mention-editor textarea {
  display: block;
}

.mention-suggestions {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  bottom: auto;
  left: 0;
  z-index: 20;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 8px 24px rgba(23, 32, 31, 0.14);
}

.app-confirm-dialog {
  position: fixed !important;
  inset: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 20px;
  background: rgba(20, 27, 26, 0.42);
}

.app-confirm-dialog__panel {
  width: min(100%, 360px);
  margin: 0;
  align-self: center;
  justify-self: center;
  box-shadow: 0 18px 50px rgba(23, 32, 31, 0.24);
}

.app-confirm-dialog__panel .modal-header {
  min-height: 0;
  padding: 14px 16px;
}

.app-confirm-dialog__panel .modal-header h2 {
  font-size: 16px;
}

.app-confirm-dialog__panel .confirm-body {
  padding: 14px 16px 2px;
}

.app-confirm-dialog__panel .confirm-message {
  font-size: 12.5px;
  line-height: 1.45;
}

.app-confirm-dialog__eyebrow {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.app-confirm-dialog__footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 16px 16px;
}

.mention-suggestion-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 0;
  border-bottom: 1px solid var(--border-soft);
  background: transparent;
  color: var(--text-strong);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

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

.mention-suggestion-item:hover,
.mention-suggestion-item.is-active {
  background: var(--accent-soft);
}

.mention-suggestion-avatar {
  display: inline-flex;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 10px;
  font-weight: 750;
}

.mention-suggestion-copy {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.mention-suggestion-copy strong,
.mention-suggestion-copy span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mention-suggestion-copy strong {
  font-size: 12px;
}

.mention-suggestion-copy span {
  color: var(--text-muted);
  font-size: 11px;
}

.bug-comments-panel .bug-history-header {
  margin-top: 4px;
}

.bug-comments-panel .history-list {
  padding: 14px 20px 20px;
}

@media (max-width: 640px) {
  .bug-detail-actions {
    justify-content: flex-start;
  }

  .bug-detail-actions > * {
    flex: 0 1 auto;
    max-width: 100%;
  }

  .capture-attachment-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .capture-attachment-meta .text-link {
    align-self: flex-start;
  }

  .bug-detail-panel .detail-dl {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 18px 16px 0;
  }

  .bug-detail-panel .detail-tags {
    padding-right: 16px;
    padding-left: 16px;
  }

  .bug-detail-panel .run-case-block {
    margin-right: 16px;
    margin-left: 16px;
  }

  .bug-comments-panel .comments-list,
  .bug-comments-panel .comment-form,
  .bug-comments-panel .history-list {
    padding-right: 16px;
    padding-left: 16px;
  }
}

/* ---------- Dev workflow: bug status actions and dev tasks ---------- */
.workflow-panel { border: 1px solid var(--border); border-radius: 10px; padding: 14px; background: var(--soft-bg); }
.workflow-form { display: grid; gap: 10px; margin-top: 8px; }
.workflow-form label { display: grid; gap: 4px; font-size: 13px; color: var(--text-muted); }
.workflow-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.status-control { gap: 10px; }
.status-control-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.status-control-label {
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .03em;
    text-transform: uppercase;
    color: var(--text-muted);
}
.status-control-field { display: grid; gap: 4px; margin: 0; }
.status-control-help { margin: -4px 0 0; font-size: 12px; }
.status-control select,
.status-control textarea,
.status-control input[type="text"] {
    width: 100%;
    max-width: 420px;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-strong);
    font: inherit;
}
.status-control-select--dirty {
    border-color: var(--accent, #2f6f68);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--accent, #2f6f68) 35%, transparent);
}
.status-control-explain,
.status-control-task-effect {
    margin: 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}
.status-control-explain {
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text-strong);
}
.status-control-task-effect {
    background: color-mix(in srgb, var(--status-inprogress-bg, #e8f1fb) 80%, white);
    border: 1px solid var(--status-inprogress-border, #9bb8d9);
    color: var(--status-inprogress-fg, #1d4f8c);
}
.status-control-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.status-control-actions .primary-button:disabled,
.status-control-actions .secondary-button:disabled {
    opacity: .55;
    cursor: not-allowed;
}
.status-control-feedback { margin: 0; font-size: 12.5px; color: var(--text-muted); }
.status-control-feedback.is-error { color: var(--danger); }
.status-control-feedback.is-success { color: var(--success, #1a7f4b); }
.status-control--compact select,
.status-control--compact textarea,
.status-control--compact input[type="text"] { max-width: 100%; }
.status-control--compact .status-control-actions .primary-button,
.status-control--compact .status-control-actions .secondary-button {
    padding: 5px 10px;
    font-size: 12.5px;
}
@media (max-width: 640px) {
    .status-control select,
    .status-control textarea,
    .status-control input[type="text"] { max-width: 100%; }
    .status-control-actions { width: 100%; }
    .status-control-actions .primary-button,
    .status-control-actions .secondary-button { flex: 1 1 auto; }
}
.workflow-banner { margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--status-pending-border); border-radius: 10px; background: var(--status-pending-bg); color: var(--status-pending-fg); font-size: 14px; }
.workflow-banner--qa { border-color: var(--status-clarification-border); background: var(--status-clarification-bg); color: var(--status-clarification-fg); }

.bug-table col.bug-col-select, .bug-table th.bug-col-select, .bug-table td.bug-col-select { width: 40px; }
.bug-table td.bug-col-select input { margin: 0; }
/* Keep the edit icon fully visible on narrower screens. */
.bug-table col.bug-col-actions, .bug-table th.bug-col-actions, .bug-table td.bug-col-actions { width: 84px; min-width: 84px; }
.bug-table col.bug-col-id { width: 116px; }
.bug-table col.bug-col-status { width: 128px; }
.bug-status-stack { display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.bug-task-chip { display: inline-block; padding: 1px 6px; white-space: nowrap; border: 1px solid var(--border); border-radius: 6px; font-size: 11px; color: var(--text-muted); text-decoration: none; }
.bug-task-chip:hover { border-color: var(--accent); color: var(--accent-strong); }

.task-board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; padding-bottom: 8px; }
.task-column { display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--soft-bg); }
.task-column-header { display: flex; align-items: center; justify-content: space-between; }
.task-column-header h2 { margin: 0; font-size: 13px; font-weight: 600; color: var(--text-strong); text-transform: uppercase; letter-spacing: .03em; }
.task-column-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 12px; text-align: center; color: var(--text-muted); }
.task-column-empty { margin: 4px 0; font-size: 12px; color: var(--text-soft); }
.task-card { display: grid; gap: 6px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: inherit; text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.task-card:hover, .task-card:focus-visible { border-color: var(--accent); box-shadow: 0 2px 8px rgba(19, 120, 110, .12); }
.task-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-width: 0; font-size: 12px; color: var(--text-muted); }
.task-card-key { flex-shrink: 0; white-space: nowrap; }
.task-card-scrum { min-width: 0; max-width: 60%; padding: 0 6px; border-radius: 6px; background: var(--info-soft); color: var(--info); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-card-title { font-size: 14px; line-height: 1.35; color: var(--text-strong); }
.task-card-meta { display: grid; gap: 2px; font-size: 12px; color: var(--text-muted); }
.task-card-assignee { display: flex; align-items: center; gap: 4px; color: var(--text-strong); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-card-due { font-size: 12px; color: var(--text-muted); display: flex; align-items: center; gap: 4px; }
.task-card-due.is-overdue { color: var(--danger); font-weight: 600; }

.task-progress { height: 6px; border-radius: 999px; background: var(--border); overflow: hidden; }
.task-progress > span { display: block; height: 100%; background: var(--accent); }
.task-progress--lg { height: 8px; margin: 4px 0 16px; }

.task-bug-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.task-bug-row { display: grid; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.task-bug-main { display: flex; flex-direction: column; gap: 8px; width: 100%; min-width: 0; }
.task-bug-header-line { display: flex; align-items: baseline; gap: 10px; min-width: 0; width: 100%; }
.task-bug-header-line .mono { flex-shrink: 0; font-size: 13px; font-weight: 600; }
.task-bug-title { flex: 1 1 auto; min-width: 0; font-size: 14px; font-weight: 600; color: var(--text-strong); line-height: 1.35; text-decoration: none; }
.task-bug-title:hover { text-decoration: underline; }
.task-bug-meta-line { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; width: 100%; min-width: 0; }
.task-bug-tags { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.task-bug-aside { display: flex; align-items: center; gap: 12px; margin-left: auto; flex-shrink: 0; }
.task-bug-remarks {
  min-width: 0;
}

.task-bug-remarks .multiline-text,
.task-bug-remarks p {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
}
.task-bug-actions > summary, .task-add-bugs > summary { display: inline-flex; width: auto; align-self: flex-start; cursor: pointer; list-style: none; }
/* Block layout: Chrome sizes <details> content oddly when the element is a grid. */
.task-bug-actions { display: block; }
.task-bug-actions[open] > summary { margin-bottom: 10px; }
.task-bug-actions > form + form { margin-top: 10px; }
.task-bug-actions .workflow-form,
.task-bug-actions .workflow-form label,
.task-bug-actions .workflow-form textarea { width: 100%; box-sizing: border-box; }
.task-bug-actions .btn-link { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.task-bug-actions .btn-link.text-danger { color: var(--danger); }
.task-bug-actions .btn-link:hover { text-decoration: underline; }
.task-bug-actions > summary::-webkit-details-marker, .task-add-bugs > summary::-webkit-details-marker { display: none; }

.task-add-bugs { margin-top: 16px; }
.task-add-bugs[open] > form { margin-top: 12px; }

.task-bug-picker { min-width: 0; border: 1px solid var(--border); border-radius: 10px; padding: 8px 12px 12px; margin: 0; }
.task-bug-picker legend { padding: 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.task-bug-picker-help { margin: 0 0 8px; font-size: 12px; color: var(--text-soft); }
.task-bug-picker-list { display: grid; gap: 2px; max-height: 260px; overflow-y: auto; }
.task-bug-option { display: flex; align-items: center; gap: 10px; min-width: 0; padding: 6px 8px; border-radius: 8px; text-align: left; }
.task-bug-option:hover { background: var(--soft-bg); }
.task-bug-option input[type="checkbox"] { flex-shrink: 0; width: 16px; height: 16px; margin: 0; }
/* Reset the uppercase, stacked label style that .modal-form applies to every label. */
.modal-form .task-bug-option-label,
.form-grid .task-bug-option-label,
.task-bug-option-label { display: flex !important; flex: 1; flex-direction: row !important; align-items: center !important; gap: 10px !important; min-width: 0; margin: 0; font-size: 13px; font-weight: 400; letter-spacing: normal; text-transform: none; color: var(--text-strong); cursor: pointer; }
.task-bug-option-id { flex-shrink: 0; font-size: 12px; color: var(--text-muted); }
.task-bug-option-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.task-bug-option .status-pill { flex-shrink: 0; }

.handoff-summary { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 6px; max-height: 200px; overflow-y: auto; font-size: 13px; }

@media (max-width: 900px) {
    .task-board { grid-template-columns: repeat(5, 240px); }
}

/* Workspace directory: unverified email badge and lead action */
.member-verify-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 4px; }
.member-verify-row .btn-link { padding: 0; border: 0; background: none; font: inherit; font-size: 12px; color: var(--accent-strong); cursor: pointer; }
.member-verify-row .btn-link:hover { text-decoration: underline; }

/* Bug intake: paste box and preview */
.paste-bugs-text { min-height: 220px; font-family: var(--font-mono, ui-monospace, SFMono-Regular, Consolas, monospace); font-size: 13px; line-height: 1.5; }
.paste-bugs-defaults-hint { margin: 4px 0 -4px; }
.intake-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; margin-bottom: 16px; }
.intake-summary-counts { display: flex; flex-wrap: wrap; gap: 18px; font-size: 14px; }
.intake-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; }
.intake-list { display: grid; gap: 12px; }
.intake-card { padding: 16px 18px; }
.intake-card--invalid { border-color: var(--status-failed-border); background: var(--status-failed-bg); }
.intake-card-header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.intake-card-label { font-size: 12px; color: var(--text-muted); }
.intake-card-title { flex: 1 1 320px; margin: 0; font-size: 15px; color: var(--text-strong); }
.intake-card-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.intake-errors { margin: 10px 0 0; padding-left: 18px; color: var(--status-failed-fg); font-size: 13px; }
.intake-meta { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 10px 0 0; font-size: 13px; }
.intake-meta div { display: flex; gap: 6px; }
.intake-meta dt { color: var(--text-muted); }
.intake-meta dd { margin: 0; color: var(--text-strong); }
.intake-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 20px; margin-top: 12px; }
.intake-body h3 { margin: 0 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.intake-body p { margin: 0; font-size: 13px; white-space: pre-wrap; color: var(--text-strong); }
.intake-body .intake-missing { color: var(--text-soft); font-style: italic; }

/* Branch-wise testing and retest runs */
.workflow-banner--qa { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.workflow-banner-action { margin: 0; }
.modal-form .handoff-retest { display: flex !important; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 500; letter-spacing: normal; text-transform: none; color: var(--text-strong); }
.handoff-retest input[type="checkbox"] { width: 16px; height: 16px; margin: 2px 0 0; flex-shrink: 0; }
.handoff-retest span { display: grid; gap: 2px; }
.task-retest-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 13px; }
.task-retest-list li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.run-branch { font-size: 12px; }
.run-task-link { display: block; }
.run-branch-filter { margin: 0; }
.run-context { display: flex; flex-wrap: wrap; gap: 8px 24px; padding: 12px 18px; font-size: 14px; }

/* Desktop notifications (profile) and Slack (project settings) */
.push-status { margin: 12px 0 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--soft-bg); font-size: 13px; color: var(--text-strong); }
.push-status--on { border-color: var(--status-passed-border); background: var(--status-passed-bg); color: var(--status-passed-fg); }
.push-status--off { border-color: var(--status-pending-border); background: var(--status-pending-bg); color: var(--status-pending-fg); }
.push-actions { flex-wrap: wrap; gap: 8px; }
.push-types fieldset, .slack-events { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px 12px; margin: 14px 0 6px; }
.push-types legend, .slack-events legend { padding: 0 4px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.push-type-option, .slack-event-option { display: flex !important; align-items: center; gap: 8px; padding: 4px 0; font-size: 13px; font-weight: 400; text-transform: none; letter-spacing: normal; color: var(--text-strong); cursor: pointer; }
.push-type-option input, .slack-event-option input { width: 16px; height: 16px; margin: 0; flex-shrink: 0; }
/* .form-grid stacks and centres labels; keep these as left-aligned checkbox rows. */
.form-grid .slack-event-option, .form-grid .push-type-option { flex-direction: row !important; align-items: center !important; justify-content: flex-start !important; gap: 8px !important; text-align: left; }
/* No visible buttons (unsupported or blocked browser): don't leave an empty gap. */
.push-actions:not(:has(button:not([hidden]))) { display: none; }
.push-browsers { margin-top: 16px; }
.push-browsers h3 { margin: 0 0 6px; font-size: 13px; color: var(--text-muted); }
.push-browsers ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.push-browsers li { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 13px; }
.push-browsers .btn-link, .slack-actions .btn-link { padding: 0; border: 0; background: none; font: inherit; font-size: 13px; cursor: pointer; }
.slack-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; }
.slack-connected { color: var(--status-passed-fg); font-size: 13px; }

/* User stories on bugs, stories and milestones */
.bug-story-field { display: grid; gap: 6px; min-width: 0; }
.bug-story-label { font-size: 13px; line-height: 1.3; color: var(--text-muted); }
.story-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.story-chip { display: inline-block; max-width: 220px; padding: 1px 7px; border: 1px solid var(--border); border-radius: 999px; background: var(--soft-bg); font-size: 11px; line-height: 1.5; color: var(--text-muted); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
a.story-chip:hover { border-color: var(--accent); color: var(--accent-strong); }
.story-chip--more { background: transparent; border-style: dashed; }
.detail-dl .detail-wide { grid-column: 1 / -1; }
.detail-dl .detail-wide dd { display: flex; flex-wrap: wrap; gap: 6px; }
.detail-dl .detail-wide .story-chip { max-width: 100%; font-size: 12px; padding: 2px 9px; }

/* User stories page */
.story-summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; padding: 12px 18px; margin-bottom: 14px; font-size: 14px; }
.story-summary-states { display: flex; flex-wrap: wrap; gap: 6px 10px; }
.story-state-link { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border: 1px solid transparent; border-radius: 999px; color: var(--text-strong); text-decoration: none; font-size: 13px; }
.story-state-link:hover, .story-state-link.is-active { border-color: var(--border-strong); background: var(--soft-bg); }
.story-filters .text-link { align-self: center; font-size: 13px; }
.story-table { width: 100%; border-collapse: collapse; }
.story-table th { text-align: left; font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--text-muted); }
.story-table th, .story-table td { padding: 10px 12px; vertical-align: top; border-bottom: 1px solid var(--border); }
.story-col-story { width: 34%; min-width: 220px; }
.story-col-milestone { width: 14%; min-width: 110px; }
.story-col-priority, .story-col-state, .story-col-tests, .story-col-bugs { white-space: nowrap; }
.story-col-actions { width: 1%; white-space: nowrap; text-align: right; }
.story-key { display: inline-block; margin-right: 6px; padding: 0 6px; border-radius: 6px; background: var(--soft-bg); font-size: 12px; color: var(--text-muted); }
.story-title { color: var(--text-strong); font-weight: 600; overflow-wrap: anywhere; }
.story-ac { margin-top: 6px; font-size: 12px; color: var(--text-muted); }
.story-ac summary { cursor: pointer; width: fit-content; }
.story-ac div { margin-top: 4px; white-space: pre-wrap; color: var(--text-strong); }
.story-fail { display: block; font-size: 12px; color: var(--status-failed-fg); }

/* Milestone: user stories and sign-off warning */
.mst-stories { margin-bottom: 16px; }
.story-table--compact th, .story-table--compact td { padding: 8px 12px; }
.story-table--compact .story-col-story { width: 52%; }
.mst-story-warning { display: grid; gap: 6px; margin-bottom: 14px; padding: 12px 14px; border: 1px solid var(--status-pending-border); border-radius: 10px; background: var(--status-pending-bg); color: var(--status-pending-fg); font-size: 13px; }
.mst-story-warning ul { margin: 0; padding-left: 18px; }
.mst-story-warning span { color: var(--text-muted); }
.task-bug-option-stories { flex-shrink: 0; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--text-soft); }
.task-bug-row .story-chips { margin-top: 0; }
.import-section-title { margin: 4px 0 0; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.import-csv-form { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--border); }
.import-csv-form .import-modal-field { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.task-developers { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.task-developers legend { padding: 0; margin-bottom: 6px; font-size: 13px; font-weight: 500; }
.form-grid .task-developers .task-developer-option { display: flex !important; flex-direction: row !important; align-items: center; gap: 8px; font-weight: 400; }
.task-developers .task-developer-option input { width: auto; margin: 0; }
.resource-form { scroll-margin-top: 90px; }
.resource-form--editing { outline: 2px solid var(--accent, #4f46e5); outline-offset: 4px; border-radius: 10px; background: color-mix(in srgb, var(--accent, #4f46e5) 5%, transparent); }
/* Milestone release summary ("Can we release?") */
.release-summary { display: flex; flex-direction: column; gap: 14px; }
.release-summary-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.release-summary-head h2 { margin: 2px 0 4px; }
.release-summary-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; }
.release-summary-item { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 12px 14px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; color: inherit; text-decoration: none; background: var(--surface, #fff); }
.release-summary-item:hover { border-color: var(--accent, #13786e); }
.release-summary-item strong { font-size: 22px; line-height: 1.1; }
.release-summary-label { font-weight: 600; font-size: 13px; }
.release-summary-hint { font-size: 12px; color: var(--text-muted); }
.release-summary-item--good { border-left-color: var(--success, #1f8a4c); }
.release-summary-item--warn { border-left-color: var(--warning, #c58a00); }
.release-summary-item--bad { border-left-color: var(--danger, #c0392b); }
.release-summary-item--neutral { border-left-color: var(--border-strong, #9aa5a1); }
.task-bug-owner {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    margin-left: 0;
}
.task-bug-owner-label {
    color: var(--text-soft);
    font-weight: normal;
}
.task-bug-owner-name {
    font-weight: 500;
}
.task-bug-owner--none .task-bug-owner-name {
    color: var(--warning, #c58a00);
    font-weight: 600;
}
.task-bug-row-actions {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-left: 0;
}
.task-bug-row-actions form {
    display: inline-flex;
    align-items: center;
    margin: 0;
}
.task-bug-row-actions .bug-update-trigger {
    padding: 5px 10px;
    font-size: 12.5px;
}
.task-bug-row-actions .task-bug-remove-btn,
.task-bug-row-actions .btn-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    font-size: 12.5px;
    line-height: 1.2;
    font-family: inherit;
    font-weight: 500;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease, box-shadow .15s ease;
    white-space: nowrap;
}
.task-bug-row-actions .task-bug-remove-btn:hover,
.task-bug-row-actions .btn-link:hover {
    color: var(--danger, #c0392b);
    background: #fff5f5;
    border-color: #fecaca;
    box-shadow: 0 1px 2px rgba(192, 57, 43, 0.08);
    text-decoration: none;
}
.task-bug-row-actions .task-bug-remove-btn:focus-visible,
.task-bug-row-actions .btn-link:focus-visible {
    outline: 2px solid var(--danger, #c0392b);
    outline-offset: 2px;
}
.task-bug-row-actions .task-bug-remove-btn svg {
    flex-shrink: 0;
    opacity: .75;
    transition: opacity .15s ease;
}
.task-bug-row-actions .task-bug-remove-btn:hover svg {
    opacity: 1;
}
.bug-update-panel-row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.bug-update-panel-row h3 { margin: 0 0 4px; }
.bug-update-panel-row .muted-meta { margin: 0; }
.bug-update-modal { width: min(100%, 440px); }
.bug-update-modal:focus { outline: none; }
.bug-update-form[aria-busy="true"] .bug-update-field { opacity: .7; }
.bug-update-form { display: grid; gap: 12px; }
.bug-update-current {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}
.bug-update-field { display: grid; gap: 4px; margin: 0; }
.bug-update-field select,
.bug-update-field textarea,
.bug-update-field input[type="text"] {
    width: 100%;
    box-sizing: border-box;
    padding: 7px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-strong);
    font: inherit;
}
@media (max-width: 640px) {
    .task-bug-header-line { flex-wrap: wrap; gap: 6px 10px; }
    .task-bug-meta-line { flex-direction: column; align-items: flex-start; gap: 10px; }
    .task-bug-tags { width: 100%; }
    .task-bug-aside { width: 100%; margin-left: 0; justify-content: space-between; }
    .task-bug-owner { margin-left: 0; }
    .task-bug-row-actions { margin-left: auto; }
    .bug-update-panel-row { align-items: stretch; }
    .bug-update-panel-row .bug-update-trigger { width: 100%; }
}
.task-bug-assign {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}
.task-bug-assign-field {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-muted);
}
.task-bug-assign-label { white-space: nowrap; }
.task-bug-assign select,
.task-bug-assign input[type="text"] {
    min-width: 0;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-strong);
    font: inherit;
    font-size: 12.5px;
}
.task-bug-assign select { min-width: 140px; }
.task-bug-assign-note { flex: 1 1 160px; min-width: 140px; }
.task-bug-assign-note input { width: 100%; }
.task-bug-assign .secondary-button {
    padding: 5px 10px;
    font-size: 12.5px;
    line-height: 1.2;
}
.task-bug-assign .secondary-button:disabled {
    opacity: .65;
    cursor: wait;
}
.task-bug-assign-feedback {
    flex: 1 1 100%;
    margin: 0;
    font-size: 12px;
    color: var(--text-muted);
}
.task-bug-assign-feedback.is-error { color: var(--danger); }
.task-bug-assign-feedback.is-success { color: var(--success, #1a7f4b); }
@media (max-width: 640px) {
    .task-bug-owner { margin-left: 0; width: 100%; }
    .task-bug-assign { width: 100%; }
    .task-bug-assign select { flex: 1 1 auto; min-width: 0; }
    .task-bug-assign-note { flex: 1 1 100%; }
}
button[data-create-task-button]:disabled { opacity: .55; cursor: not-allowed; }
/* Dashboard quick actions that ask which project */
.quick-action-picker { position: relative; padding: 0; }
.quick-action-picker > summary { list-style: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 100%; padding: inherit; cursor: pointer; }
.quick-action-picker > summary::-webkit-details-marker { display: none; }
.quick-action-picker[open] { z-index: 20; }
.quick-action-menu { position: absolute; top: calc(100% + 6px); left: 0; right: 0; min-width: 200px; max-height: 280px; overflow-y: auto; display: flex; flex-direction: column; padding: 6px; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 10px; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.12)); text-align: left; }
.quick-action-menu-title { padding: 6px 8px; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--text-muted); }
.quick-action-menu a { padding: 8px; border-radius: 6px; color: inherit; text-decoration: none; font-size: 13px; }
.quick-action-menu a:hover, .quick-action-menu a:focus { background: var(--surface-muted, #f1f4f2); }
/* Compact paired fields on mobile project cards */
.dash-mobile-pairs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; }
.dash-mobile-pairs > div { display: flex; justify-content: space-between; gap: 6px; }
/* Coverage matrix: seven columns (Bugs was added later and had no width, so it collapsed to 0px). */
.coverage-matrix-table .coverage-col-requirement { width: 26%; }
.coverage-matrix-table .coverage-col-priority { width: 10%; }
.coverage-matrix-table .coverage-col-linked { width: 9%; text-align: center; }
.coverage-matrix-table .coverage-col-pass { width: 13%; }
.coverage-matrix-table .coverage-col-verdict { width: 13%; }
.coverage-matrix-table .coverage-col-bugs { width: 10%; }
.coverage-matrix-table .coverage-col-cases { width: 19%; }
.coverage-matrix-table td { vertical-align: middle; }
.coverage-matrix-table .coverage-col-bugs a,
.coverage-matrix-table .coverage-col-bugs .muted-meta { display: block; white-space: nowrap; }
.coverage-matrix-table .coverage-col-requirement strong { display: block; font-family: var(--font-mono, monospace); font-size: 12px; color: var(--text-muted); }
.coverage-matrix-table .coverage-col-cases .tag-chip { white-space: nowrap; }
@media (max-width: 520px) {
  /* Cases are hidden on phones; give their share to the story title. */
  .coverage-matrix-table .coverage-col-requirement { width: 34%; }
  .coverage-matrix-table .coverage-col-bugs { width: 13%; }
  .coverage-matrix-table .coverage-col-verdict { width: 15%; }
  .coverage-matrix-table col.coverage-col-cases { width: 0; }
}
.coverage-mobile-card .coverage-mobile-title { display: block; margin: 6px 0 8px; font-size: 14px; line-height: 1.35; }
.coverage-mobile-card .coverage-mobile-cases { margin-top: 10px; gap: 5px; }
/* Story summary: count lives inside its state chip so each pair reads as one item. */
.story-summary-states { gap: 8px; }
.story-state-link { padding: 0; border: 0; border-radius: 999px; }
.story-state-link:hover, .story-state-link.is-active { background: none; border: 0; }
.story-state-link .story-state-pill { gap: 6px; min-width: 0; padding: 4px 10px; white-space: nowrap; }
.story-state-link .story-state-count { font-size: 13px; font-weight: 700; letter-spacing: 0; }
.story-state-link:hover .story-state-pill { filter: brightness(.96); }
.story-state-link.is-active .story-state-pill { box-shadow: 0 0 0 2px var(--accent, #13786e); }
/* Search pickers */
.search-picker { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.search-picker-selected { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; min-height: 24px; }
.search-picker-chip { display: inline-flex; align-items: center; gap: 4px; max-width: 100%; padding: 3px 4px 3px 9px; border: 1px solid var(--border); border-radius: 999px; background: var(--soft-bg, #f1f4f2); font-size: 12px; }
.search-picker-chip-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 320px; }
.search-picker-remove { border: 0; background: none; cursor: pointer; font-size: 15px; line-height: 1; padding: 0 4px; color: var(--text-muted); }
.search-picker-remove:hover { color: var(--danger, #c0392b); }
.search-picker-field { position: relative; }
.search-picker-input { width: 100%; }
.search-picker-results { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0; max-height: 260px; overflow-y: auto; margin: 0; padding: 4px; list-style: none; background: var(--surface, #fff); border: 1px solid var(--border); border-radius: 8px; box-shadow: var(--shadow-md, 0 8px 24px rgba(0,0,0,.12)); }
.search-picker-option { display: flex; flex-direction: column; gap: 1px; padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 13px; }
.search-picker-option small { color: var(--text-muted); font-size: 11px; }
.search-picker-option.is-active, .search-picker-option:hover { background: var(--soft-bg, #f1f4f2); }
.search-picker-none { padding: 8px 9px; color: var(--text-muted); font-size: 13px; }
/* Next-step guidance and status-move dialog */
.next-step { display: flex; gap: 10px; align-items: baseline; margin: 0 0 14px; padding: 10px 14px; border: 1px solid var(--border); border-left: 4px solid var(--accent, #13786e); border-radius: 8px; background: var(--soft-bg, #f4f7f5); font-size: 13.5px; line-height: 1.45; }
.next-step-label { flex: none; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent, #13786e); }
.next-step--small { margin: 8px 0; padding: 7px 10px; font-size: 12.5px; }
.transition-dialog { width: min(100%, 520px); }
.transition-eyebrow { display: block; font-size: 12px; color: var(--text-muted); margin-bottom: 2px; word-break: break-word; }
.transition-flow { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.transition-explain { display: flex; flex-direction: column; gap: 10px; padding: 12px 14px; border-radius: 8px; background: var(--soft-bg, #f4f7f5); font-size: 13.5px; line-height: 1.5; }
.transition-explain strong { display: block; font-size: 11px; letter-spacing: .05em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 2px; }
.transition-explain p { margin: 0; }
.transition-form textarea:required { border-color: var(--warning, #c58a00); }
.confirm-details { margin: 12px 0 0; padding-left: 18px; font-size: 13px; line-height: 1.55; color: var(--text); }
.confirm-details li + li { margin-top: 4px; }
.handoff-warning { padding: 10px 14px; border: 1px solid #e6b8b0; border-left: 4px solid var(--danger, #c0392b); border-radius: 8px; background: #fdf1ef; font-size: 13.5px; line-height: 1.45; }
.handoff-ready-badge { display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 999px; background: #fff4d6; color: #8a5a00; font-size: 11px; font-weight: 600; }
.sign-off-gate { padding: 12px 14px; border: 1px solid #e6b8b0; border-left: 4px solid var(--danger, #c0392b); border-radius: 8px; background: #fdf1ef; font-size: 13.5px; line-height: 1.5; }
.sign-off-gate label { display: flex; flex-direction: row; gap: 8px; align-items: flex-start; margin-top: 8px; font-weight: 600; }
.sign-off-gate input[type=checkbox] { width: auto; margin-top: 3px; }

/* ── Project dashboard: headline, attention, pipeline, queues ────────────── */
.proj-headline { margin: 0 0 12px; font-size: 15px; color: var(--text-strong); }
.attention-strip { display: flex; align-items: flex-start; gap: 14px; flex-wrap: wrap; padding: 12px 16px; margin-bottom: 14px; border: 1px solid var(--border); border-left: 4px solid var(--warning, #b7791f); border-radius: 10px; background: var(--surface); }
.attention-strip--clear { border-left-color: var(--success, #2f855a); align-items: center; }
.attention-strip-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); padding-top: 5px; white-space: nowrap; }
.attention-strip--clear .attention-strip-title { padding-top: 0; color: var(--success, #2f855a); }
.attention-strip-clear-text { font-size: 13px; color: var(--text-muted); }
.attention-strip-items { display: flex; flex-wrap: wrap; gap: 8px; flex: 1; min-width: 0; }
.attention-chip { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; border: 1px solid var(--border); background: var(--soft-bg); color: var(--text-strong); font-size: 12.5px; font-weight: 600; text-decoration: none; max-width: 100%; transition: border-color .15s, background .15s; }
.attention-chip:hover { border-color: var(--accent); background: var(--accent-soft); }
.attention-chip-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--text-muted); }
.attention-chip--bad .attention-chip-dot { background: var(--danger, #c0392b); }
.attention-chip--warn .attention-chip-dot { background: var(--warning, #d69e2e); }
.attention-chip--info .attention-chip-dot { background: var(--accent); }
.attention-chip-arrow { color: var(--text-muted); }

.pipeline-panel { margin-bottom: 16px; }
.pipeline-bar { display: flex; gap: 3px; height: 30px; border-radius: 8px; overflow: hidden; }
.pipeline-bar--small { height: 8px; gap: 2px; border-radius: 4px; }
.pipeline-seg { display: flex; align-items: center; justify-content: center; min-width: 26px; color: #fff; font-size: 12px; font-weight: 700; text-decoration: none; }
.pipeline-bar--small .pipeline-seg { min-width: 4px; }
.pipeline-seg--fix { background: var(--danger, #c0392b); }
.pipeline-seg--retest { background: var(--warning, #d69e2e); }
.pipeline-seg--decided { background: #8a94a6; }
.pipeline-seg--closed { background: var(--success, #2f855a); }
a.pipeline-seg:hover { filter: brightness(1.1); }
.pipeline-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 10px; font-size: 12.5px; color: var(--text-muted); }
.pipeline-legend-item { display: inline-flex; align-items: center; gap: 6px; color: inherit; text-decoration: none; }
.pipeline-legend-item:hover { color: var(--text-strong); }
.pipeline-legend-item strong { color: var(--text-strong); }
.pipeline-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; }

.retest-list, .task-mini-list { display: flex; flex-direction: column; }
.retest-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.retest-row:last-child { border-bottom: none; }
.retest-row-main { flex: 1; min-width: 200px; }
.retest-row-title { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; }
.retest-row-title a { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.retest-row-meta { margin-top: 3px; font-size: 12px; color: var(--text-muted); display: flex; gap: 5px; flex-wrap: wrap; }
.retest-row .workflow-buttons button { padding: 4px 12px; font-size: 12.5px; }

.task-mini-counts { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 10px; font-size: 12px; color: var(--text-muted); }
.task-mini-counts strong { color: var(--text-strong); }
.task-mini-row { display: block; padding: 10px 0; border-bottom: 1px solid var(--border); text-decoration: none; color: inherit; }
.task-mini-row:last-child { border-bottom: none; }
.task-mini-row:hover .task-mini-title { color: var(--accent); }
.task-mini-top { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.task-mini-key { font-size: 11.5px; color: var(--text-muted); }
.task-mini-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: 13.5px; color: var(--text-strong); }
.task-mini-status { font-size: 11px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--soft-bg); border: 1px solid var(--border); color: var(--text-muted); white-space: nowrap; }
.task-mini-meta { margin-top: 5px; font-size: 12px; color: var(--text-muted); }
.task-mini-meta .handoff-ready-badge { margin: 0 0 0 6px; }

.activity-mini-list { list-style: none; margin: 0; padding: 0; }
.activity-mini-list li { padding: 8px 0; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 2px; }
.activity-mini-list li:last-child { border-bottom: none; }
.activity-mini-title { font-size: 13px; color: var(--text-strong); }
.activity-mini-meta { font-size: 11.5px; color: var(--text-muted); }

/* ── Projects list ───────────────────────────────────────────────────────── */
.proj-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 16px; }
.proj-search { flex: 1 1 220px; max-width: 320px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-strong); font-size: 13.5px; }
.proj-sort { display: flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; color: var(--text-muted); }
.proj-sort select { padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text-strong); font-size: 12.5px; }
.proj-card[hidden] { display: none; }
.proj-card-name a { color: inherit; text-decoration: none; }
.proj-card-name a:hover { color: var(--accent); }
.proj-card-pipeline { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 640px) {
  .proj-sort { margin-left: 0; }
}

/* Panel content padding for the new dashboard blocks */
.pipeline-panel .pipeline-bar, .pipeline-panel .pipeline-legend, .pipeline-panel > .muted-meta { margin-left: 18px; margin-right: 18px; }
.pipeline-panel { padding-bottom: 16px; }
.proj-dash-panel .retest-list, .proj-dash-panel .task-mini-counts, .proj-dash-panel .task-mini-list, .proj-dash-panel .activity-mini-list, .proj-dash-panel > .muted-meta { padding-left: 18px; padding-right: 18px; }
.proj-dash-panel > .muted-meta { padding-top: 10px; }
.proj-dash-panel .task-mini-counts { padding-top: 12px; }
.proj-dash-panel .activity-mini-list, .proj-dash-panel .retest-list, .proj-dash-panel .task-mini-list { padding-bottom: 6px; }

/* fixes after browser check */
a.pipeline-seg, .pipeline-seg { color: #fff !important; }

/* Simplified projects list */
.proj-toolbar { align-items: center; gap: 12px; }
.proj-summary { margin: 0 auto 0 0; font-size: 14px; color: var(--text-muted); }
.proj-sort { margin-left: 0; }
.proj-no-match { padding: 24px; text-align: center; color: var(--text-muted); }
.proj-grid { gap: 18px; }
.proj-card { gap: 12px; }
.proj-card-desc { display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.proj-card-status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-height: 28px; }
.proj-card-status .attention-chip { font-size: 12px; padding: 3px 10px; }
.proj-card-quiet, .proj-card-more { font-size: 12.5px; color: var(--text-muted); }
.proj-card-pipeline-text { font-size: 12px; color: var(--text-muted); }
.proj-card-facts { margin: 0; font-size: 13px; color: var(--text-strong); }

/* Simplified dashboard */
.proj-headline { margin: 4px 0 14px; }
.attention-strip { margin-bottom: 16px; }

/* Multi-select pickers list their matches inline, so a long form never clips them */
.search-picker[data-multiple="1"] .search-picker-results { position: static; margin-top: 6px; max-height: 240px; box-shadow: none; }
.search-picker-all { padding: 7px 9px; border-radius: 6px; cursor: pointer; font-size: 12.5px; font-weight: 700; color: var(--accent); border-bottom: 1px solid var(--border); margin-bottom: 2px; }
.search-picker-all:hover { background: var(--accent-soft); }

/* Deleted projects */
.deleted-projects { padding: 4px 20px; }
.deleted-project-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--border); }
.deleted-project-row:last-child { border-bottom: 0; }
.deleted-project-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.deleted-project-name { font-size: 15px; color: var(--text-strong); }
.deleted-project-desc, .deleted-project-meta { font-size: 12.5px; color: var(--text-muted); }
.danger-button:disabled { opacity: .45; cursor: not-allowed; }
.field-error { margin: 0; color: var(--danger); font-size: 12.5px; }

/* Notification bell: count badge, richer rows, footer, full page */
.notification-badge-count { position: absolute; top: 1px; right: 0; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #ea4335; color: #fff; border: 2px solid var(--surface); font-size: 10px; font-weight: 700; line-height: 13px; text-align: center; box-sizing: border-box; }
.notification-badge-count[hidden] { display: none; }
.notification-bell-btn.is-ringing svg { animation: bellRing .8s ease-in-out; transform-origin: 50% 0; }
@keyframes bellRing { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(14deg); } 30% { transform: rotate(-12deg); } 45% { transform: rotate(8deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
.notification-dropdown { width: 380px; max-height: 520px; }
.notification-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; color: var(--text-muted); }
.notification-kind { font-weight: 700; color: var(--text-strong); }
.notification-project::before { content: "·"; margin-right: 6px; }
.notification-meta .notification-time { margin-left: auto; font-size: 11px; }
.notification-item-icon--blue { color: #2f6fba; }
.notification-item-icon--amber { color: var(--warning); }
.notification-item-icon--green { color: var(--success); }
.notification-item-icon--red { color: var(--danger); }
.notification-item-icon--purple { color: #7b4fbf; }
.notification-empty { display: flex; flex-direction: column; gap: 4px; }
.notification-empty strong { color: var(--text-strong); font-size: 14px; }
.notification-footer { display: flex; flex-direction: column; border-top: 1px solid var(--border); background: var(--soft-bg); }
.notification-footer a { padding: 10px 16px; font-size: 12.5px; font-weight: 600; text-decoration: none; color: var(--accent); }
.notification-footer a:hover { background: var(--accent-soft); }
.notification-desktop-nudge { display: flex; align-items: center; gap: 8px; border-bottom: 1px solid var(--border); color: var(--warning) !important; }
.notification-see-all { text-align: center; }
.notification-tabs { display: flex; gap: 6px; margin-bottom: 14px; }
.notification-tab { padding: 6px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); color: var(--text-muted); font-size: 13px; font-weight: 600; text-decoration: none; }
.notification-tab.is-active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.notification-tab-count { margin-left: 4px; padding: 0 6px; border-radius: 999px; background: #ea4335; color: #fff; font-size: 11px; }
.notification-page-list { padding: 0; overflow: hidden; }
.notification-page-list .notification-item { padding: 14px 20px; }
.notification-page-list .notification-message { font-size: 13.5px; }
.notification-pagination { margin-top: 14px; }
@media (max-width: 480px) { .notification-dropdown { width: auto; } }

/* Unread rows are already highlighted; a small round tick marks one read */
.notification-item .unread-bullet { display: none; }
.notification-mark-read { align-self: center; margin: 0; }
.notification-mark-read button { width: 26px; height: 26px; padding: 0; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--text-muted); font-size: 13px; line-height: 1; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.notification-mark-read button:hover { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }

/* Release summary ("Can we release?"): room to breathe */
.release-summary { padding: 24px 26px 26px; gap: 22px; }
.release-summary-head { gap: 20px; align-items: flex-start; }
.release-summary-head .tp-section-kicker { display: block; margin-bottom: 8px; }
.release-summary-head h2 { margin: 0 0 8px; font-size: 26px; line-height: 1.15; }
.release-summary-head .muted-meta { margin: 0; font-size: 14px; line-height: 1.5; }
.release-summary-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.release-summary-item { gap: 6px; padding: 18px 20px; border-radius: 12px; color: var(--text-strong); transition: border-color .15s, box-shadow .15s; }
.release-summary-item:hover { box-shadow: 0 2px 10px rgba(23, 32, 31, .08); }
.release-summary-item strong { font-size: 30px; line-height: 1; margin-bottom: 4px; color: var(--success); }
.release-summary-item--warn strong { color: var(--warning); }
.release-summary-item--bad strong { color: var(--danger); }
.release-summary-item--neutral strong { color: var(--text-muted); }
.release-summary-label { font-size: 14px; font-weight: 700; color: var(--text-strong); }
.release-summary-hint { font-size: 12.5px; line-height: 1.45; color: var(--text-muted); }
@media (max-width: 900px) { .release-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .release-summary { padding: 18px; } .release-summary-grid { grid-template-columns: 1fr; gap: 12px; } .release-summary-head { flex-direction: column-reverse; gap: 12px; } }

/* Sign-off scope vs. run results */
.mst-scope-box { margin: 14px 0 6px; padding: 14px 16px; border: 1px solid var(--border); border-left-width: 4px; border-radius: 10px; background: var(--soft-bg); display: flex; flex-direction: column; gap: 6px; font-size: 13.5px; line-height: 1.5; }
.mst-scope-box p { margin: 0; }
.mst-scope-box--release { border-left-color: var(--success); }
.mst-scope-box--fixes { border-left-color: var(--warning); }
.mst-scope-box--unknown { border-left-color: var(--border-strong, #9aa5a1); }
.mst-scope-badge { align-self: flex-start; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--border); color: var(--text-strong); }
.mst-scope-box--release .mst-scope-badge { color: var(--success); }
.mst-scope-box--fixes .mst-scope-badge { color: var(--warning); }
.mst-scope-warning { color: var(--danger); }
.mst-run-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.mst-run-item { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--border); }
.mst-run-item > div { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sign-off-scope { margin: 0 0 4px; padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; display: flex; flex-direction: column; gap: 10px; }
.sign-off-scope legend { padding: 0 6px; font-weight: 700; font-size: 13px; }
.sign-off-scope-option { display: flex; flex-direction: row; gap: 10px; align-items: flex-start; font-weight: 400; }
.sign-off-scope-option input { width: auto; margin-top: 4px; }
.sign-off-scope-option strong { display: block; }

/* Spacing for the unfinished-run blocker and the run-results list */
.run-plan-conflict { padding: 22px 26px; margin-bottom: 18px; display: flex; flex-direction: column; gap: 12px; border-left: 4px solid var(--warning); }
.run-plan-conflict h2 { margin: 0; font-size: 20px; }
.run-plan-conflict p { margin: 0; line-height: 1.55; }
.run-plan-conflict .page-actions-row { margin-top: 2px; }
.mst-runs .mst-queue-note { padding: 0 18px; }
.mst-runs .mst-run-list { padding: 0 18px 6px; margin-top: 6px; }
.mst-runs .mst-run-item:first-child { border-top: 0; }

/* ── UI audit fixes ───────────────────────────────────────────────────────── */

/* Test cases: the table fits the panel at laptop widths, and never clips silently */
.tc-table { min-width: 700px; }
.tc-col-id { width: 108px !important; min-width: 96px !important; }
.tc-col-title { min-width: 170px !important; }
.tc-col-module { width: 124px !important; min-width: 100px !important; }
.tc-col-priority { width: 90px !important; min-width: 82px !important; }
.tc-col-status { width: 132px !important; min-width: 120px !important; }
.tc-col-actions { width: 104px !important; min-width: 96px !important; }
.table-wrap:has(.tc-table) { overflow-x: auto; }

/* Dev tasks: five columns fit more screens, and scroll visibly when they cannot */
.task-board { grid-template-columns: repeat(5, minmax(168px, 1fr)); scrollbar-width: thin; }

/* Recent runs: filters sit in one wrapping row; CI names stay readable */
.section-header:has(.run-branch-filter) { flex-wrap: wrap; gap: 12px 16px; align-items: center; }
.section-header .run-branch-filter { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; flex: 1 1 420px; min-width: 0; }
.section-header .run-branch-filter input[type="search"] { flex: 1 1 200px; width: auto; min-width: 150px; max-width: 280px; }
.section-header .run-branch-filter select { flex: 0 1 auto; width: auto; min-width: 120px; max-width: 200px; }
.section-header .run-branch-filter .secondary-button { flex: 0 0 auto; }
.run-name-link { overflow-wrap: anywhere; }

/* Run detail: a stack trace is one line until you open it */
.run-results-col-actual { min-width: 0; }
.run-actual summary { cursor: pointer; list-style: none; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-strong); }
.run-actual summary::-webkit-details-marker { display: none; }
.run-actual summary::before { content: "▸ "; color: var(--text-muted); }
.run-actual[open] summary::before { content: "▾ "; }
.run-actual[open] summary { white-space: normal; }
.run-actual pre { margin: 8px 0 0; padding: 10px 12px; max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; background: var(--soft-bg); font-size: 12px; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }

/* Live run summary: all statuses shown, unused ones quiet */
.run-stat-row--zero { opacity: .55; }

/* Settings: copy buttons */
.copy-row { display: flex; align-items: center; gap: 10px; min-width: 0; }
.copy-row .settings-code { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.copy-row--head { justify-content: space-between; margin-bottom: 8px; }
.copy-btn { flex: 0 0 auto; padding: 5px 12px; font-size: 12.5px; }

/* Coverage matrix: darker text for the quiet columns */
.coverage-matrix-table th { color: var(--text-strong); }
.coverage-matrix-table td { color: var(--text-strong); }
.coverage-matrix-table td.coverage-col-bugs, .coverage-matrix-table td.coverage-col-linked { color: #3d4a46; }

/* Resources: the four counters stay on one row */
.resource-intro-stats { display: grid; grid-template-columns: repeat(4, minmax(84px, auto)); gap: 8px; }
.resource-intro-stats span { white-space: nowrap; }
@media (max-width: 760px) { .resource-intro-stats { grid-template-columns: repeat(2, minmax(84px, 1fr)); } }

/* Test cases: priority and status pills no longer touch */
.tc-table td.tc-priority-cell { padding-right: 16px; }
.tc-table td.tc-status-cell { padding-left: 4px; padding-right: 8px; }

/* AI assistant access (profile) */
.api-token-reveal { margin: 14px 0 18px; padding: 16px 18px; border: 1px solid var(--warning); border-left-width: 4px; border-radius: 10px; background: var(--soft-bg); display: flex; flex-direction: column; gap: 10px; }
.api-token-form { margin-top: 6px; }
.api-token-form .form-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.api-token-list { margin-top: 18px; }
