/* Patient and practice test-plan setup pages */
.cols { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); }
.cols.wide { grid-template-columns: 1.5fr 1fr; }
.stack { display: grid; gap: 18px; }
.mt { margin-top: 18px; }
.tiny { font-size: 12.5px; color: var(--ink-3); }
.field { display: grid; gap: 5px; margin-bottom: 14px; }
.field > label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); font-weight: 700; }
.field input[type=text], .field input[type=email], .field input[type=tel], .field input[type=number], .field input[type=password], .field input[type=date], .field select, .field textarea {
  font: inherit; padding: 9px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: #fff; width: 100%;
}
.field textarea { min-height: 70px; resize: vertical; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.cond { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--accent);
  border-radius: 999px; padding: 6px 8px 6px 14px; font-size: 13.5px; font-weight: 700; }
.cond button { border: 0; background: rgba(60,83,244,.18); color: var(--accent); width: 20px; height: 20px;
  border-radius: 50%; cursor: pointer; font: inherit; line-height: 1; }
.cond.side { background: var(--paper-2); color: var(--ink-2); }
.suggest { display: flex; gap: 6px; flex-wrap: wrap; }
.suggest button { font: inherit; font-size: 12.5px; border: 1px dashed var(--line-2); background: #fff;
  border-radius: 999px; padding: 5px 11px; cursor: pointer; color: var(--ink-2); }
.suggest button:hover { border-color: var(--ink); color: var(--ink); }
.groupbar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.groupbar button { font: inherit; font-size: 13px; border: 1px solid var(--line); background: #fff;
  border-radius: 999px; padding: 6px 13px; cursor: pointer; }
.groupbar button.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.groupbar button .n { opacity: .6; margin-left: 5px; font-size: 11.5px; }
.tests { display: grid; gap: 1px; }
.trow { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.trow:last-child { border-bottom: 0; }
.trow .nm { font-weight: 700; }
.trow.locked { opacity: .85; }
.trow .spacer { flex: 1; }
.sw { position: relative; width: 42px; height: 24px; flex: none; }
.sw input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.sw span { position: absolute; inset: 0; background: var(--line-2); border-radius: 999px; transition: background .15s; pointer-events: none; }
.sw span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff;
  border-radius: 50%; transition: transform .15s; }
.sw input:checked + span { background: var(--accent); }
.sw input:checked + span::after { transform: translateX(18px); }
.sw input:disabled + span { opacity: .45; }
.plan { display: grid; gap: 1px; }
.prow { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.prow:last-child { border-bottom: 0; }
.sticky { position: sticky; bottom: 0; background: #fff; border-top: 1.5px solid var(--ink);
  padding: 14px 18px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
  border-radius: 0 0 var(--radius) var(--radius); }
.dlg-bg { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 40; }
.dlg { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%);
  background: #fff; border-radius: var(--radius); box-shadow: 0 18px 50px rgba(0,0,0,.25);
  width: min(620px, calc(100vw - 32px)); max-height: calc(100vh - 60px); overflow: auto; padding: 22px; }
.dlg h2 { margin-bottom: 4px; }
.dlg .hits { max-height: 300px; overflow: auto; margin: 12px 0; border: 1px solid var(--line); border-radius: 10px; }
.dlg .hit { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-bottom: 1px solid var(--line); cursor: pointer; }
.dlg .hit:last-child { border-bottom: 0; }
.dlg .hit:hover, .dlg .hit.on { background: var(--accent-soft); }
.done { text-decoration: line-through; color: var(--ink-3); }
.sess { display: grid; gap: 10px; }
.scard { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fff; }
.scard.ok { border-color: var(--good); background: var(--good-soft); }
.scard .row2 { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pill-n { background: var(--ink); color: #fff; border-radius: 999px; padding: 2px 10px; font-size: 12.5px; font-weight: 700; }
pre.json { background: #0d0d0d; color: #e8e8e8; padding: 14px; border-radius: 10px; overflow: auto; font-size: 12.5px; line-height: 1.5; }
@media (max-width: 1000px) { .cols.wide { grid-template-columns: 1fr; } }
