/* Facility owner Testing (testing.js), from Daniel's four Testing mockups 2026-10-21.
   Layout, KPIs, tables, panel and dialogs come from coaches.css (.cp-*) and facility-ui.css; these are Testing's own pieces. */
.ts-crumb { display: flex; align-items: center; gap: 6px; margin: 0 0 2px; font-size: 13px; color: #6b7280; }
.ts-crumb span { color: #9ca3af; }
.ts-crumb .cp-link { font-size: 13px; }
.cw-main .cp-btn.blue-o { border-color: #bfdbfe; color: #2563eb; }
.cw-main .cp-btn.blue-o .ic { color: #2563eb; }
.cw-main .cp-btn.sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.cw-main .cp-btn:disabled { opacity: .5; cursor: default; }
.cp-kpi-ic.amber { background: #fffbeb; color: #d97706; }
.cp-kpi-ic.red { background: #fef2f2; color: #dc2626; }
.ts-kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ts div.cp-kpi { cursor: default; }

/* Tabs: boxed pills, active blue (mockup) */
.ts-tabs { display: flex; gap: 10px; margin-bottom: 12px; }
.ts-tabs button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 18px; border: 1px solid #e8eaee; border-radius: 10px; background: #fff; font: inherit; font-size: 14px; font-weight: 600; color: #1f2937; cursor: pointer; }
.ts-tabs button.on { background: #2563eb; border-color: #2563eb; color: #fff; }
.ts-tabs em { padding: 1px 7px; border-radius: 999px; background: #fef3c7; color: #b45309; font-style: normal; font-size: 12px; }
.ts-tabs button.on em { background: rgba(255,255,255,.2); color: #fff; }
.ts-body { padding-top: 0; }
.ts-card { background: #fff; border: 1px solid #e8eaee; border-radius: 14px; padding: 18px 20px; min-width: 0; }
.ts-card h3 { font-family: var(--body); font-size: 16px; font-weight: 700; text-transform: none; letter-spacing: 0; color: #0b0f17; margin: 0 0 4px; }
.ts-grow { flex: 1; }

/* Labels: Unverified / C-Verified / GD1-Verified, and statuses */
.ts-lab { display: inline-flex; padding: 3px 10px; border-radius: 8px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.ts-lab.u { background: #fffbeb; color: #b45309; border: 1px solid #fde68a; }
.ts-lab.c { background: #ecfdf5; color: #15803d; border: 1px solid #bbf7d0; }
.ts-lab.g { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
.ts-st { display: inline-flex; padding: 3px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.ts-st.review { background: #fef3c7; color: #a16207; }
.ts-st.imported { background: #ecfdf5; color: #15803d; }
.ts-st.errors { background: #fef2f2; color: #dc2626; }
.ts-pb { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #ecfdf5; color: #15803d; font-style: normal; font-size: 11px; font-weight: 700; }
.ts-pb.p { background: #f3f4f6; color: #6b7280; }

/* Results */
.ts-rr { grid-template-columns: 34px minmax(150px, 1.3fr) minmax(120px, 1.1fr) minmax(110px, .9fr) minmax(100px, .9fr) 100px 104px; }
.ts-val { display: flex; align-items: center; flex-wrap: wrap; }
.ts-dl { display: grid; margin: 0; }
.ts-dl > div { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: 10px; padding: 8px 0; border-top: 1px solid #f1f2f4; font-size: 13.5px; }
.ts-dl > div:first-child { border-top: 0; }
.ts-dl dt { color: #6b7280; }
.ts-dl dd { margin: 0; color: #0b0f17; min-width: 0; }
.ts-hist { display: grid; gap: 6px; }
.ts-hist > div { display: grid; grid-template-columns: 1fr auto auto; gap: 10px; align-items: center; font-size: 13px; color: #374151; }

/* Sessions */
.ts-sr { grid-template-columns: minmax(200px, 1.6fr) 110px minmax(110px, 1fr) minmax(160px, 1.3fr) 70px 100px 104px; }
.ts-sr > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-mchips { display: flex; flex-wrap: wrap; gap: 4px; }

/* Log Testing Results */
.ts-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; padding: 14px 18px; margin-bottom: 14px; background: #fff; border: 1px solid #e8eaee; border-radius: 14px; }
.ts-steps button { display: flex; align-items: center; gap: 12px; border: 0; background: none; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ts-steps b { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 50%; background: #f3f4f6; color: #374151; font-size: 14px; }
.ts-steps b .ic { width: 16px; height: 16px; }
.ts-steps .on b { background: #2563eb; color: #fff; }
.ts-steps .done b { background: #ecfdf5; color: #16a34a; }
.ts-steps span { display: grid; min-width: 0; }
.ts-steps strong { font-size: 13.5px; color: #0b0f17; }
.ts-steps small { font-size: 12px; color: #6b7280; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-logc { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.ts-f5 { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr; gap: 12px; }
.ts-f5 label, .ts-pf { display: grid; gap: 6px; font-size: 12.5px; font-weight: 600; color: #374151; }
.ts-f5 input, .ts-f5 select, .ts-pf select, .ts-pf textarea { min-height: 38px; padding: 0 10px; border: 1px solid #d9dde3; border-radius: 9px; font: inherit; font-size: 13.5px; font-weight: 400; color: #0b0f17; background: #fff; min-width: 0; }
.ts-pf textarea { padding: 8px 10px; resize: vertical; }
.ts-mh h3 em { margin-left: 8px; padding: 2px 8px; border-radius: 999px; background: #ecfdf5; color: #15803d; font-style: normal; font-size: 12px; }
.ts-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; }
.ts-mcard { position: relative; display: flex; align-items: center; gap: 10px; padding: 10px 30px 10px 10px; border: 1px solid #e8eaee; border-radius: 12px; background: #fff; font: inherit; text-align: left; cursor: pointer; min-width: 0; }
.ts-mcard.on { border-color: #93c5fd; background: #f8fbff; }
.ts-mcard > span:not(.ts-mic) { display: grid; min-width: 0; }
.ts-mcard b { font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ts-mcard small { font-size: 12px; color: #6b7280; }
.ts-mcard i { position: absolute; top: 6px; right: 6px; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; color: #6b7280; }
.ts-mcard i:hover { background: #f3f4f6; color: #0b0f17; }
.ts-mcard i .ic { width: 13px; height: 13px; }
.ts-mcard.add { border-style: dashed; color: #2563eb; cursor: default; }
.ts-mcard.add b { color: #2563eb; }
.ts-mcard.add select { border: 0; padding: 0; font: inherit; font-size: 12px; color: #6b7280; background: none; cursor: pointer; }
.ts-mic { display: grid; place-items: center; width: 38px; height: 38px; flex-shrink: 0; border-radius: 10px; }
.ts-mic .ic { width: 19px; height: 19px; }
.ts-mic.t-violet { background: #f5f3ff; color: #7c3aed; }
.ts-mic.t-blue { background: #eff6ff; color: #2563eb; }
.ts-mic.t-red { background: #fef2f2; color: #dc2626; }
.ts-mic.t-green { background: #ecfdf5; color: #16a34a; }
.ts-mic.t-amber { background: #fffbeb; color: #d97706; }
.ts-gridw { flex: 1 1 auto; min-height: 0; overflow: auto; border: 1px solid #eef0f3; border-radius: 10px; }
.ts-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-grid th { position: sticky; top: 0; z-index: 1; background: #fafbfc; padding: 6px 4px; font-size: 11.5px; font-weight: 600; color: #6b7280; text-align: center; border-bottom: 1px solid #eef0f3; white-space: nowrap; }
.ts-grid thead tr:nth-child(2) th { top: 27px; }
.ts-grid th.l, .ts-grid td.l { text-align: left; }
.ts-grid th.mh { color: #0b0f17; font-size: 12.5px; border-left: 1px solid #eef0f3; }
.ts-grid td { padding: 4px 3px; border-bottom: 1px solid #f3f4f6; text-align: center; white-space: nowrap; }
.ts-grid td.n { color: #6b7280; }
.ts-grid .cp-who { gap: 8px; }
.ts-in { width: 54px; height: 32px; border: 1px solid #e5e7eb; border-radius: 7px; text-align: center; font: inherit; font-size: 13px; color: #0b0f17; }
.ts-in:focus { outline: 2px solid #2563eb; outline-offset: -1px; border-color: transparent; }
.ts-best { display: inline-grid; place-items: center; min-width: 54px; height: 32px; border-radius: 7px; background: #f9fafb; color: #9ca3af; font-weight: 600; }
.ts-best.on { background: #f3f4f6; color: #0b0f17; }
.ts-best.pb { background: #dcfce7; color: #15803d; }
.ts-gfoot { display: flex; align-items: center; gap: 14px; }
.ts-gfoot .ms-pg { margin-left: auto; }
.ts-rev { display: grid; gap: 6px; overflow-y: auto; min-height: 0; }
.ts-revr { display: grid; grid-template-columns: 200px repeat(3, minmax(0, 1fr)); gap: 12px; align-items: center; padding: 8px 0; border-bottom: 1px solid #f3f4f6; font-size: 13px; }
.ts-done { display: grid; justify-items: center; gap: 8px; padding: 40px 0; text-align: center; }
.ts-done > .ic { width: 44px; height: 44px; padding: 10px; border-radius: 50%; background: #ecfdf5; color: #16a34a; }
.ts-mi { display: flex; align-items: center; gap: 12px; padding: 6px 0 14px; }
.ts-mi span:last-child { display: grid; }
.ts-mi small { color: #6b7280; font-size: 12.5px; }
.ts-mpanel .cp-p-body { display: grid; gap: 14px; align-content: start; }
.ts-tg { display: flex; gap: 12px; align-items: flex-start; cursor: pointer; }
.ts-tg input { width: 18px; height: 18px; margin-top: 2px; accent-color: #2563eb; flex-shrink: 0; }
.ts-tg span { display: grid; gap: 2px; font-size: 13.5px; }
.ts-tg small { color: #6b7280; font-size: 12.5px; }

/* Import & Sync */
.ts-imp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 16px; min-height: 0; flex: 1 1 auto; }
.ts-col { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; min-height: 0; }
.ts-up { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 16px; }
.ts-drop { display: grid; justify-items: center; align-content: center; gap: 6px; padding: 18px 14px; border: 1.5px dashed #93c5fd; border-radius: 12px; background: #f8fbff; text-align: center; cursor: pointer; }
.ts-drop.over { background: #eff6ff; border-color: #2563eb; }
.ts-drop > .ic { width: 28px; height: 28px; color: #2563eb; }
.ts-drop b { font-size: 14.5px; }
.ts-drop small { font-size: 12px; color: #374151; }
.ts-drop .cp-btn { margin-top: 6px; }
.ts-types { display: grid; gap: 10px; align-content: start; font-size: 13px; }
.ts-types > span { display: flex; gap: 10px; align-items: center; }
.ts-types > span > .ic { width: 30px; height: 30px; padding: 6px; border-radius: 8px; background: #ecfdf5; color: #16a34a; flex-shrink: 0; }
.ts-types span span { display: grid; }
.ts-types small { color: #6b7280; font-size: 12px; }
.ts-types .cp-link { font-size: 13px; justify-self: start; }
.ts-recent { display: grid; overflow-y: auto; min-height: 0; }
.ts-recent > div { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 40px minmax(0, 1fr) 84px; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid #f3f4f6; font-size: 12.5px; }
.ts-recent > div > span:nth-child(4) { display: grid; justify-items: start; gap: 2px; }
.ts-logo { display: inline-grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border-radius: 8px; border: 1px solid #e5e7eb; background: #f3f4f6; font-size: 13px; font-weight: 800; letter-spacing: -.02em; }
.ts-logo .ic { width: 18px; height: 18px; }
.ts-logo.sm { width: 30px; height: 30px; font-size: 12px; }
.ts-logo.lg { width: 48px; height: 48px; font-size: 18px; border-radius: 11px; }
.ts-prev { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.ts-src { display: inline-flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border: 1px solid #e8eaee; border-radius: 10px; font-size: 12.5px; }
.ts-file { display: flex; gap: 10px; align-items: center; margin: 0; }
.ts-file > .ic { width: 28px; height: 28px; color: #2563eb; }
.ts-file span { display: grid; }
.ts-file small { color: #6b7280; font-size: 12px; }
.ts-wf { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; padding: 6px 0; }
.ts-wf span { position: relative; display: grid; justify-items: center; gap: 6px; font-size: 12.5px; color: #6b7280; }
.ts-wf span::before { content: ""; position: absolute; top: 13px; left: -50%; width: 100%; height: 2px; background: #e5e7eb; z-index: 0; }
.ts-wf span:first-child::before { display: none; }
.ts-wf span.done::before, .ts-wf span.on::before { background: #22c55e; }
.ts-wf b { position: relative; z-index: 1; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #f3f4f6; color: #374151; font-size: 12px; }
.ts-wf b .ic { width: 14px; height: 14px; }
.ts-wf .done b { background: #22c55e; color: #fff; }
.ts-wf .on b { background: #2563eb; color: #fff; }
.ts-wf .on { color: #0b0f17; font-weight: 600; }
.ts-ptabs { display: flex; gap: 18px; border-bottom: 1px solid #e8eaee; }
.ts-ptabs button { position: relative; padding: 9px 0; border: 0; background: none; font: inherit; font-size: 13.5px; color: #6b7280; cursor: pointer; }
.ts-ptabs button.on { color: #2563eb; font-weight: 600; }
.ts-ptabs button.on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: #2563eb; }
.ts-ptable { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.ts-t { width: 100%; border-collapse: collapse; font-size: 13px; }
.ts-t th { position: sticky; top: 0; z-index: 1; background: #fafbfc; padding: 9px 8px; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: #6b7280; text-align: left; border-bottom: 1px solid #eef0f3; }
.ts-t td { padding: 8px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.ts-t tr.nm td { background: #fffbeb; }
.ts-t tr.dup td { background: #fef2f2; }
.ts-t tr.sel td { box-shadow: inset 0 0 0 9999px rgba(37,99,235,.05); }
.ts-t.rv tbody tr { cursor: pointer; }
.ts-t td.up { color: #16a34a; }
.ts-t input[type="checkbox"] { width: 17px; height: 17px; accent-color: #2563eb; }
.ts-t .cp-who small { color: #6b7280; }
.cp-av.xs { width: 28px; height: 28px; font-size: 11px; }
.ts-mt { display: flex; align-items: center; gap: 8px; }
.ts-mt span { display: grid; }
.ts-mt small.ok { color: #16a34a; font-size: 11px; font-weight: 600; }
.ts-msel { display: block; margin-top: 4px; min-height: 32px; max-width: 190px; padding: 0 8px; border: 1px solid #d9dde3; border-radius: 8px; font: inherit; font-size: 12.5px; background: #fff; }
.ts-pfoot { display: flex; align-items: center; gap: 12px; font-size: 13px; }
.ts-errs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ts-errs li { display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13px; }
.ts-errs .ic { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.ts-empty { display: grid; justify-items: center; align-content: center; gap: 8px; padding: 30px 20px; text-align: center; flex: 1; }
.ts-empty > .ic { width: 34px; height: 34px; color: #93c5fd; }
.ts-empty .ts-wf { width: 100%; margin-top: 10px; }

/* Review Imported Results */
.ts-rvh { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; margin-bottom: 12px; }
.ts-rvh .ts-logo { width: 44px; height: 44px; font-size: 17px; }
.ts-rvh .cp-who b { font-size: 15px; }
.ts-csv { margin-left: 6px; padding: 1px 7px; border-radius: 6px; background: #ecfdf5; color: #15803d; font-style: normal; font-size: 11px; }
.ts-rvs { display: flex; flex-wrap: wrap; gap: 12px 28px; }
.ts-rvs span { display: grid; gap: 2px; }
.ts-rvs small { color: #6b7280; font-size: 12px; }
.ts-rvs b { font-size: 14px; }
.ts-rvs b.ok { color: #16a34a; font-size: 18px; }
.ts-rvs b.warn { color: #d97706; font-size: 18px; }
.ts-rvs b.bad { color: #dc2626; font-size: 18px; }
.ts-note { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 10px 12px; border-radius: 10px; background: #eff6ff; font-size: 13px; }
.ts-note > .ic { width: 18px; height: 18px; flex-shrink: 0; color: #2563eb; margin-top: 1px; }
.ts-note span { display: grid; gap: 2px; }
.ts-note small { color: #374151; font-size: 12.5px; }
.ts .cp-p-head .ts-st { margin-top: 4px; }
.ts .cp-p-head > div { display: grid; justify-items: start; }

/* Integrations */

/* Desktop: one screen; each list or grid scrolls inside its own card */
@media (min-width: 1201px) and (min-height: 640px) {
  .ts > .cp-left { height: 100%; align-self: stretch; }
  .ts .cp-body, .ts-logc { flex: 1 1 0; min-height: 0; }
  .ts .cp-table { flex: 1 1 0; min-height: 0; }
  .ts .cp-rows { flex: 1 1 0; }
}
@container (max-width: 860px) { .ts-up { grid-template-columns: minmax(0, 1fr); } }
@container (max-width: 560px) { .ts-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) {
  .ts-imp { grid-template-columns: minmax(0, 1fr); }
  .ts-f5 { grid-template-columns: 1fr 1fr; }
  .ts-steps { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .ts-kpis { grid-template-columns: minmax(0, 1fr); }
  .ts-tabs { overflow-x: auto; }
  .ts-rr { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .ts-rr > span:nth-child(3), .ts-rr > span:nth-child(5), .ts-rr > span:nth-child(6) { display: none; }
  .ts-sr { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-sr > span:not(:first-child) { display: none; }
  .ts-recent > div { grid-template-columns: minmax(0, 1fr) auto; }
  .ts-recent > div > span:nth-child(2), .ts-recent > div > span:nth-child(3), .ts-recent > div > span:nth-child(4) { display: none; }
}
