/* Match the workbench's warm canvas, flat metrics and expandable rows. */
#assignProgressArea {
  --ap-ink: var(--w-ink, #1c1917);
  --ap-soft: var(--w-ink-soft, #57534e);
  --ap-faint: var(--w-ink-faint, #a8a29e);
  --ap-line: var(--w-hairline, rgba(28, 25, 23, .09));
  --ap-surface: var(--w-surface, #fbfaf8);
  --ap-accent: var(--w-accent, #6d6cf5);
  color: var(--ap-ink);
}
.assign-progress-panel { margin-top: 28px; }
.assign-progress-panel-heading { display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px 16px; margin-bottom: 22px; }
.assign-progress-panel-heading h3 { margin: 0; font-size: 20px; letter-spacing: -.025em; }
.assign-progress-panel-heading p { margin: 0; color: var(--w-ink-soft, #57534e); font-size: 12px; }
.assign-progress-metrics { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); margin: 4px 0 22px; }
.assign-progress-metric { display: flex; flex-direction: column; gap: 6px; padding: 2px 18px; border-left: 1px solid var(--ap-line); }
.assign-progress-metric:first-child { padding-left: 0; border-left: 0; }
.assign-progress-metric-value { color: var(--ap-ink); font-size: 30px; line-height: 1.15; letter-spacing: -.04em; font-weight: 650; font-variant-numeric: tabular-nums; }
.assign-progress-metric-label { color: var(--ap-soft); font-size: 11px; }
.assign-progress-metric.danger .assign-progress-metric-value, .assign-progress-danger { color: #b4232a; }
.assign-progress-metric.warning .assign-progress-metric-value, .assign-progress-warning { color: #9a6700; }
.assign-progress-toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; padding: 14px 16px; border: 1px solid var(--ap-line); border-radius: 12px; background: var(--ap-surface); }
.assign-progress-toolbar label { display: flex; flex-direction: column; gap: 6px; font-size: 11px; font-weight: 500; }
.assign-progress-toolbar label:first-child { flex: 1 1 240px; }
.assign-progress-toolbar label:not(:first-child) { flex: 0 1 165px; }
.assign-progress-toolbar input, .assign-progress-toolbar select { width: 100%; min-width: 0; box-sizing: border-box; margin: 0; }
#assignProgressCount { margin-bottom: 9px; color: var(--ap-faint) !important; font-size: 11px; white-space: nowrap; }
.assign-progress-retest-summary { margin: 14px 0 24px; padding: 10px 0; border-bottom: 1px solid var(--ap-line); font-size: 12px; }
.assign-progress-retest-summary > summary, .assign-progress-owner > summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; color: var(--ap-soft); }
.assign-progress-retest-summary > summary::-webkit-details-marker, .assign-progress-owner > summary::-webkit-details-marker { display: none; }
.assign-progress-retest-summary > summary::before, .assign-progress-owner > summary::before { content: ''; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 180ms ease; margin: 0 3px; flex-shrink: 0; }
.assign-progress-retest-summary[open] > summary::before, .assign-progress-owner[open] > summary::before { transform: rotate(45deg); }
.assign-progress-retest-summary > div { padding: 12px 16px 2px; }
.assign-progress-caption { color: var(--ap-faint); font-size: 11px; }
.assign-progress-group-count { color: var(--ap-soft); font-size: 11px; font-weight: 400; padding: 2px 7px; border-radius: 999px; border: 1px solid var(--ap-line); font-variant-numeric: tabular-nums; }
.assign-progress-owner { margin: 22px 0; min-width: 0; }
.assign-progress-owner > summary { padding: 0 0 12px; font-size: 14px; font-weight: 650; color: var(--ap-ink); flex-wrap: wrap; }
.assign-progress-owner-name { display: inline-flex; align-items: center; gap: 8px; }
.assign-progress-owner-stats { display: inline-flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.assign-progress-owner-avatar { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--w-accent-soft, rgba(109, 108, 245, .09)); color: var(--ap-accent); font-size: 11px; }
.assign-progress-owner-body { min-width: 0; }
.assign-progress-req { position: relative; min-width: 0; border-radius: 12px; border-bottom: 1px solid var(--ap-line); transition: background 180ms ease; }
.assign-progress-req::before { content: ''; position: absolute; left: 0; top: 20px; height: 36px; width: 3px; border-radius: 3px; background: var(--w-aurora, linear-gradient(120deg, #5b8cff, #8b5cf6, #d946a0)); opacity: 0; transition: opacity 180ms ease; pointer-events: none; }
.assign-progress-req:hover::before { opacity: 1; }
.assign-progress-req:hover, .assign-progress-req.is-open { background: rgba(28, 25, 23, .025); }
.assign-progress-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 18px; padding: 18px 16px; }
.assign-progress-final-test .assign-progress-row { grid-template-columns: minmax(0, 1fr); }
.assign-progress-identity { min-width: 0; }
.assign-progress-title { display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; font-size: 14px; font-weight: 650; line-height: 1.6; overflow-wrap: anywhere; }
.assign-progress-title > span { min-width: 0; }
.assign-progress-title .qa-preview-btn { align-self: center; flex-shrink: 0; margin-left: 0; }
.assign-progress-row-meta { display: flex; align-items: center; flex-wrap: wrap; gap: 5px; margin-top: 7px; font-size: 11px; font-weight: 400; }
.assign-progress-badge { display: inline-block; border: 1px solid var(--ap-line); border-radius: 999px; padding: 2px 7px; margin: 0; background: var(--ap-surface); color: var(--ap-soft); font-size: 11px; font-weight: 500; line-height: 1.6; white-space: normal; }
.assign-progress-badge.success { color: #186a3b; background: #f3faf5; border-color: rgba(45, 159, 91, .2); }
.assign-progress-badge.warning { color: #9a6700; background: #fff9ed; border-color: rgba(180, 127, 25, .2); }
.assign-progress-badge.danger { color: #b4232a; background: #fff5f5; border-color: rgba(217, 44, 44, .22); }
.assign-progress-badge.case-pending { color: #854d0e; background: #fef3c7; border-color: #dfb451; font-weight: 700; }
.assign-progress-badge.test-pending { color: #b4232a; background: #ffe4e6; border-color: #ed9da5; font-weight: 700; }
.assign-progress-badge.case-pending::before, .assign-progress-badge.test-pending::before { content: ''; display: inline-block; width: 5px; height: 5px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 1px; }
.assign-progress-summary { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 12px; color: var(--ap-soft); }
.assign-progress-counts { display: grid; grid-template-columns: repeat(3, minmax(60px, auto)); gap: 18px; }
.assign-progress-counts > div { display: flex; flex-direction: column; gap: 3px; font-size: 10px; color: var(--ap-faint); }
.assign-progress-counts strong { color: var(--ap-ink); font-size: 18px; font-weight: 600; line-height: 1.3; font-variant-numeric: tabular-nums; }
.assign-progress-counts i { font-size: 12px; font-style: normal; color: var(--ap-faint); font-weight: 400; }
.assign-progress-counts small { font-size: 10px; white-space: nowrap; }
#assignProgressArea .assign-progress-expand { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 11px; white-space: nowrap; }
.assign-progress-chevron { width: 5px; height: 5px; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); transition: transform 180ms ease; }
.assign-progress-expand[aria-expanded="true"] .assign-progress-chevron { transform: rotate(225deg); }
/* Existing global button themes use !important; entity IDs stay link-like. */
#assignProgressArea button.assign-progress-link { padding: 0; border: 0; border-radius: 0 !important; background: transparent !important; color: var(--ap-accent) !important; font: inherit; font-weight: 650; cursor: pointer; box-shadow: none !important; min-height: 0; }
#assignProgressArea button.assign-progress-link:hover { text-decoration: underline; background: transparent !important; transform: none !important; }
.assign-progress-detail { margin: 0 16px; padding: 16px 0 20px; border-top: 1px solid var(--ap-line); min-width: 0; }
.assign-progress-detail[hidden] { display: none !important; }
.assign-progress-detail-toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.assign-progress-detail-label { color: var(--ap-faint); font-size: 11px; letter-spacing: .04em; }
.assign-progress-detail-toolbar button, .assign-progress-pager button { font-size: 11px; }
.assign-progress-records { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 9px; font-size: 11px; color: var(--ap-soft); }
.assign-progress-detail-nav { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 10px; }
.assign-progress-detail-nav button { font-size: 12px; }
.assign-progress-explanation { margin: 10px 0 18px; color: var(--ap-faint); font-size: 11px; }
.assign-progress-explanation summary { cursor: pointer; }
.assign-progress-explanation p { color: var(--ap-soft); line-height: 1.7; }
.assign-progress-section { margin-top: 22px; min-width: 0; scroll-margin-top: 80px; }
.assign-progress-section h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; color: var(--ap-ink); font-weight: 650; }
.assign-progress-section h4 > span { padding: 2px 6px; border: 1px solid var(--ap-line); border-radius: 999px; font-size: 10px; font-weight: 400; }
.assign-progress-scroll { overflow-x: auto; max-width: 100%; min-width: 0; }
.assign-progress-section table { width: 100%; min-width: 760px; margin: 0; table-layout: fixed; }
.assign-progress-section th:first-child { width: 30%; }
.assign-progress-section th:last-child { width: 20%; }
.assign-progress-section td { vertical-align: top; padding: 12px 10px; font-size: 12px; line-height: 1.6; overflow-wrap: anywhere; }
.assign-progress-section small { display: block; margin-top: 4px; font-size: 10px; line-height: 1.7; color: var(--ap-soft); }
.assign-progress-section .assign-progress-badge { margin: 2px 4px 2px 0; }
#assignProgressArea .assign-progress-section tbody tr { background: transparent !important; }
.assign-progress-pager { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding-top: 12px; font-size: 11px; color: var(--ap-faint); }
.assign-progress-empty { text-align: center; color: var(--ap-faint); padding: 22px 12px; font-size: 12px; }
.assign-progress-footnote { margin-top: 18px; font-size: 10px; color: var(--ap-faint); line-height: 1.7; }
.assign-progress-alert { border-left: 3px solid #c58a24; border-radius: 6px; background: #fff9ed; color: #9a6700; padding: 10px 12px; margin: 12px 0; font-size: 12px; white-space: normal; }
.assign-progress-task-dialog { width: min(600px, calc(100vw - 40px)); max-height: 85vh; overflow: auto; border: 1px solid var(--w-hairline, rgba(28, 25, 23, .09)); border-radius: 18px; padding: 24px; box-sizing: border-box; background: var(--w-surface, #fbfaf8); color: var(--w-ink, #1c1917); box-shadow: 0 24px 64px rgba(28, 25, 23, .22); }
.assign-progress-task-dialog::backdrop { background: rgba(28, 25, 23, .32); backdrop-filter: blur(2px); }
.assign-progress-task-description { white-space: pre-wrap; overflow-wrap: anywhere; color: var(--w-ink-soft, #57534e); }
@media (min-width: 741px) {
  .assign-progress-final-test .assign-progress-metrics { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .assign-progress-metric { padding: 2px 12px; }
  .assign-progress-row { grid-template-columns: minmax(0, 1fr) auto; gap: 14px; }
  .assign-progress-identity { grid-column: 1 / -1; }
  .assign-progress-counts { grid-template-columns: repeat(3, minmax(68px, auto)); gap: 24px; }
}
@media (max-width: 740px) {
  .assign-progress-metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px 0; }
  .assign-progress-metric:nth-child(5) { border-left: 0; padding-left: 0; }
  .assign-progress-metric-value { font-size: 26px; }
  .assign-progress-toolbar { padding: 12px; gap: 12px; }
  .assign-progress-toolbar label:first-child { flex-basis: 100%; }
  .assign-progress-toolbar label:not(:first-child) { flex: 1 1 130px; }
  .assign-progress-row { padding: 16px 12px; }
  .assign-progress-detail { margin: 0 12px; }
}
@media (max-width: 440px) {
  .assign-progress-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .assign-progress-metric:nth-child(odd) { border-left: 0; padding-left: 0; }
  .assign-progress-metric:nth-child(even) { border-left: 1px solid var(--ap-line); padding-left: 18px; }
  .assign-progress-row { grid-template-columns: minmax(0, 1fr); }
  .assign-progress-counts { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .assign-progress-expand { justify-self: start; }
  .assign-progress-toolbar label:not(:first-child) { flex-basis: 100%; }
  .assign-progress-pager { justify-content: flex-start; flex-wrap: wrap; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .assign-progress-req, .assign-progress-req::before, .assign-progress-chevron { transition: none; }
}
