/* qa — QA review queue, review screen and read-only chart summary (chartView.js) */
.qa-subtitle { color: var(--text-2); font-size: 14px; margin-top: 4px; }
.qa-head-tools { display: flex; gap: 10px; align-items: center; }
.qa-search-wrap { position: relative; width: 380px; max-width: 60vw; }
.qa-search-wrap .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.qa-search-wrap .input { padding-left: 36px; height: 42px; }
.qa-tab-count { display: inline-block; min-width: 22px; margin-left: 8px; padding: 1px 7px; border-radius: 10px; background: #e3e8ec; color: var(--text-2); font-size: 12px; text-align: center; }
.tabs-inline .active .qa-tab-count { background: var(--navy); color: #fff; }
.qa-tab-count.hot { background: var(--blue); color: #fff; }
.qa-queue-table td { vertical-align: middle; }
.qa-dim { color: var(--muted); font-size: 12px; }
.qa-foot { color: var(--text-2); font-size: 13px; padding: 12px 4px; }
.qa-score { display: inline-block; font-weight: 700; font-size: 13px; padding: 2px 8px; border-radius: 3px; }
.qa-score.good { background: #dcefe3; color: #1e7a45; } .qa-score.warn { background: #fff3cd; color: #8a6d00; } .qa-score.bad { background: #fde2df; color: #b03a2e; }

/* review screen */
.qa-back { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; font-weight: 600; font-size: 14px; margin-bottom: 8px; }
.qa-review-page .page-head h1 { font-size: 24px; }
.qa-left { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.qa-auto .panel-head .ico { color: var(--blue); vertical-align: -3px; }
.qa-auto-summary { display: flex; gap: 8px; flex-wrap: wrap; }
.qa-pill { font-size: 12px; font-weight: 700; padding: 3px 10px; border-radius: 12px; }
.qa-pill.good { background: #dcefe3; color: #1e7a45; } .qa-pill.bad { background: #fde2df; color: #b03a2e; }
.qa-auto-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 1250px) { .qa-auto-grid { grid-template-columns: 1fr; } }
.qa-auto-title { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); margin-bottom: 8px; }
.qa-mt { margin-top: 16px; }
.qa-pad { padding: 6px 0; }
.qa-issues, .qa-measures { list-style: none; margin: 0; padding: 0; }
.qa-issues li { display: grid; grid-template-columns: 112px 1fr; gap: 2px 10px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.qa-issues li .qa-dim { grid-column: 2; }
.qa-issue-type { background: var(--red); color: #fff; font-size: 11px; font-weight: 700; text-align: center; padding: 3px 6px; border-radius: 2px; text-transform: uppercase; letter-spacing: .3px; }
.qa-issue-type.seq { background: #e67e22; }
.qa-ok-line { display: flex; align-items: center; gap: 8px; color: #1e7a45; font-size: 14px; padding: 6px 0; }
.qa-ok-line .ico { color: var(--green); width: 22px; height: 22px; }
.qa-measures li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.qa-mark { width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none; color: #fff; }
.qa-mark .ico { width: 14px; height: 14px; }
.qa-measures li.pass .qa-mark { background: var(--green); }
.qa-measures li.fail .qa-mark { background: var(--red); }
.qa-measures li.na .qa-mark { background: #b3bec7; }
.qa-measures li.warn .qa-mark { background: #e67e22; }
.qa-measures li.warn .qa-m-name { color: #a85a12; }
.qa-measures li.fail .qa-m-name { color: #b03a2e; font-weight: 600; }
.qa-m-name { flex: 1; }
.qa-m-target { color: var(--text-2); font-size: 12px; white-space: nowrap; }

/* reviewer form */
.qa-form { max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.qa-form .panel-body { overflow-y: auto; flex: 1 1 auto; min-height: 0; }
.qa-score-box { display: flex; align-items: center; gap: 18px; background: var(--bg-soft); border-radius: 4px; padding: 12px 16px; }
.qa-score-big { font-size: 38px; font-weight: 300; line-height: 1.1; color: var(--muted); min-width: 96px; }
.qa-score-big.good { color: var(--green-dark); } .qa-score-big.warn { color: #c49a00; } .qa-score-big.bad { color: var(--red); }
.qa-score-right { flex: 1; }
.qa-score-right .bar { margin: 0 0 6px; height: 10px; background: #dde3e8; }
.qa-score-right .bar > span { transition: width .2s; }
.qa-score-right .bar > span.good { background: var(--green); } .qa-score-right .bar > span.warn { background: var(--yellow); } .qa-score-right .bar > span.bad { background: var(--red); }
.qa-score-counts { font-size: 12px; color: var(--text-2); }
.qa-label { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-2); }
.qa-section-head { display: flex; justify-content: space-between; align-items: center; margin: 18px 0 6px; }
.qa-quick { font-size: 13px; color: var(--muted); }
.qa-checklist .check-row { padding: 8px 0; }
.qa-check-label { font-size: 14px; flex: 1; }
.qa-checklist .seg button { padding: 5px 10px; min-width: 44px; }
.qa-flags .chip { font-family: inherit; }
.qa-flags .chip .ico { width: 14px; height: 14px; }
.qa-comments { font-size: 14px; }
.qa-invalid { border-color: var(--red) !important; box-shadow: 0 0 0 2px rgba(231, 76, 60, .2) !important; }
.qa-warn { display: flex; gap: 8px; align-items: center; background: #fff8e1; border-left: 3px solid var(--yellow); padding: 8px 10px; font-size: 13px; margin-top: 12px; }
.qa-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--line); background: #fff; flex: none; box-shadow: 0 -4px 10px rgba(20, 30, 45, .05); }
.qa-actions .btn { padding: 8px 10px; font-size: 14px; }
.qa-actions .qa-approve { grid-column: 1 / -1; }
.qa-history { display: flex; flex-direction: column; gap: 8px; }
.qa-hist-item { border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; font-size: 13px; }
.qa-hist-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.qa-hist-top .qa-score { margin-left: auto; }
.qa-hist-flags { margin-top: 6px; display: flex; gap: 4px; flex-wrap: wrap; }
.qa-mini-flag { font-size: 11px; background: #fde2df; color: #b03a2e; padding: 1px 7px; border-radius: 9px; }
.qa-mini-flag.good { background: #dcefe3; color: #1e7a45; }
.qa-hist-comment { margin-top: 6px; color: var(--text); white-space: pre-wrap; background: var(--bg-soft); padding: 6px 8px; border-radius: 3px; }

/* ---------- chart summary (chartView.js) ---------- */
.qa-cv { border: 1px solid var(--line); border-radius: 4px; background: #fff; overflow: hidden; }
.qa-cv-header { display: flex; justify-content: space-between; gap: 16px; padding: 16px 18px; background: var(--navy); color: #fff; flex-wrap: wrap; }
.qa-cv-inc { font-size: 20px; font-weight: 700; }
.qa-cv-pt { font-size: 18px; font-weight: 600; text-align: right; }
.qa-cv-header .qa-cv-sub { color: #c8d3dc; font-size: 13px; margin-top: 2px; }
.qa-cv-header-right .qa-cv-sub { text-align: right; }
.qa-cv-section { border-top: 1px solid var(--line); }
.qa-cv-title { margin: 0; font-size: 13px; text-transform: uppercase; letter-spacing: .6px; background: var(--bg-soft); color: var(--navy); padding: 8px 18px; border-bottom: 1px solid var(--line); border-left: 4px solid var(--blue); }
.qa-cv-body { padding: 12px 18px 16px; }
.qa-cv-kv { display: grid; gap: 10px 18px; }
@media (max-width: 1250px) { .qa-cv-kv { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
.qa-cv-kv-item { min-width: 0; }
.qa-cv-k { display: block; font-size: 11px; color: var(--text-2); text-transform: uppercase; font-weight: 600; letter-spacing: .3px; }
.qa-cv-v { display: block; font-size: 14px; overflow-wrap: anywhere; }
.qa-cv-v.blank { color: var(--muted); }
.qa-cv-sub-head { font-weight: 700; color: var(--navy); font-size: 13px; margin: 14px 0 6px; padding-bottom: 4px; border-bottom: 1px dotted var(--line-2); }
.qa-cv-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.qa-cv-table th { text-align: left; font-size: 11px; text-transform: uppercase; color: var(--text-2); letter-spacing: .3px; padding: 6px 8px; border-bottom: 2px solid var(--line); white-space: nowrap; }
.qa-cv-table td { padding: 6px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.qa-cv-table tr.qa-cv-bad td { background: #fdf0ee; }
.qa-cv-table tr.qa-cv-abnrow td { background: #fff9ec; }
.qa-cv-vitals td { white-space: nowrap; }
.qa-cv-abn { color: var(--red); font-weight: 700; }
.qa-cv-scroll { overflow-x: auto; }
.qa-cv-times { display: grid; grid-template-columns: 1fr 260px; gap: 18px; align-items: start; }
@media (max-width: 1250px) { .qa-cv-times { grid-template-columns: 1fr; } }
.qa-cv-intervals { background: var(--bg-soft); border-left: 4px solid var(--yellow); padding: 8px 14px; }
.qa-cv-interval { display: flex; justify-content: space-between; padding: 5px 0; font-size: 14px; color: var(--text-2); border-bottom: 1px dotted var(--line-2); }
.qa-cv-interval:last-child { border: 0; }
.qa-cv-interval b { color: var(--text); font-variant-numeric: tabular-nums; }
.qa-cv-interval.bad b { color: var(--red); }
.qa-cv-flag { display: inline-block; background: #fde2df; color: #b03a2e; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 9px; margin-left: 6px; }
.qa-cv-tag { display: inline-block; background: #e8edf1; color: var(--text-2); font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 9px; margin-left: 6px; }
.qa-cv-none { color: var(--muted); font-style: italic; font-size: 14px; }
.qa-cv-uto, i.qa-cv-uto { color: #8a6d00; font-size: 13px; }
.qa-cv-note { margin-top: 10px; font-size: 13px; color: var(--text-2); }
.qa-cv-hx { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 14px; }
@media (max-width: 1250px) { .qa-cv-hx { grid-template-columns: 1fr; } }
.qa-cv-pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.qa-cv-pill { background: #e8f4fb; color: #0a6aa1; font-size: 12px; padding: 2px 8px; border-radius: 10px; }
.qa-cv-timeline { list-style: none; margin: 0; padding: 0 0 0 4px; }
.qa-cv-tx { display: grid; grid-template-columns: 74px 1fr; gap: 12px; position: relative; padding: 0 0 12px; }
.qa-cv-tx::before { content: ''; position: absolute; left: 82px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px #fff; z-index: 1; }
.qa-cv-tx::after { content: ''; position: absolute; left: 86px; top: 10px; bottom: -6px; width: 2px; background: var(--line); }
.qa-cv-tx:last-child::after { display: none; }
.qa-cv-tx.cat-medication::before { background: #8e44ad; }
.qa-cv-tx.cat-airway::before { background: #16a085; }
.qa-cv-tx.cat-defibcardiopace::before { background: var(--red); }
.qa-cv-tx.cat-ivtherapy::before { background: #e67e22; }
.qa-cv-tx-time { font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; padding-top: 1px; }
.qa-cv-tx-body { padding-left: 24px; font-size: 14px; }
.qa-cv-tx-name { font-weight: 600; }
.qa-cv-tx-detail { color: var(--text); font-size: 13px; margin-top: 2px; }
.qa-cv-tx-meta { color: var(--text-2); font-size: 12px; margin-top: 2px; }
.qa-cv-tx-notes { font-size: 13px; font-style: italic; color: var(--text-2); margin-top: 2px; }
.qa-cv-quick { display: flex; flex-wrap: wrap; gap: 6px; }
.qa-cv-q { font-size: 12px; padding: 3px 9px; border-radius: 10px; }
.qa-cv-q.ok { background: #dcefe3; color: #1e7a45; } .qa-cv-q.abn { background: #fff3cd; color: #8a6d00; }
.qa-cv-narr { border-left: 3px solid var(--line-2); padding: 6px 12px; margin-bottom: 10px; background: #fafbfc; }
.qa-cv-narr-meta { font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
.qa-cv-narr-text { white-space: pre-wrap; font-size: 14px; line-height: 1.55; }
.qa-cv-sigs { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 12px; }
.qa-cv-sig { border: 1px solid var(--line); border-radius: 4px; padding: 8px; font-size: 12px; }
.qa-cv-sig-img { height: 70px; display: flex; align-items: center; justify-content: center; border-bottom: 1px solid var(--line-2); margin-bottom: 6px; background: #fff; }
.qa-cv-sig-img img { max-height: 66px; max-width: 100%; }
.qa-cv-sig-ok { color: var(--green-dark); font-weight: 600; }
.qa-cv-sig-label { font-weight: 700; color: var(--navy); }
.qa-cv-sig-at, .qa-cv-sig-extra { color: var(--text-2); }
