/* ---------- Admin → Lists & Customization (.cz-) + "Recommended" validation severity ---------- */
.cz { --cz-amber: #f0a500; --cz-amber-bg: #fff6df; --cz-amber-text: #7a5300; }
.cz-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.cz-tab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line-2); background: #fff; border-radius: 3px; padding: 8px 14px; cursor: pointer; font-weight: 600; font-size: 14px; color: var(--text-2); }
.cz-tab:hover { color: var(--navy); background: var(--bg-soft); }
.cz-tab.active { background: var(--navy); border-color: var(--navy); color: #fff; }
.cz-tab-n { background: var(--blue); color: #fff; border-radius: 10px; font-size: 11px; padding: 1px 7px; }
.cz-muted { color: var(--text-2); }
.cz-pad { padding: 16px; }
.cz-mt { margin-top: 12px; }
.cz-note { display: flex; gap: 10px; align-items: flex-start; background: #eef7fc; border-left: 4px solid var(--blue); padding: 10px 14px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.45; }
.cz-note > .ico { color: var(--blue); margin-top: 1px; }
.cz-note.warn { background: var(--cz-amber-bg, #fff6df); border-left-color: #f0a500; }
.cz-note.warn > .ico { color: #c98a00; }
.cz-tag { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 10px; padding: 2px 8px; background: #e8edf1; color: var(--text-2); white-space: nowrap; text-transform: uppercase; letter-spacing: .3px; }
.cz-tag.added { background: #e2f6ea; color: #1e7a45; }
.cz-tag.custom { background: #e3f2fb; color: #0a5f8c; }
.cz-tag.muted { background: #eef1f3; color: var(--muted); }
.cz-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 12px 0; }
.cz-add { min-width: 260px; flex: 1; max-width: 520px; }
.cz-filter { max-width: 240px; }
.cz-check { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); cursor: pointer; user-select: none; }
.cz-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; }
.cz-subhead { font-weight: 700; color: var(--navy); margin: 4px 0 8px; font-size: 14px; }
.cz-bulk { width: 100%; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 13px; }
.cz-json { width: 100%; }
.cz-danger .panel-head { color: #a12b1e; }

/* segmented control */
.cz-seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 3px; overflow: hidden; }
.cz-seg-btn { border: 0; border-right: 1px solid var(--line-2); background: #fff; padding: 6px 12px; font-size: 13px; font-weight: 600; cursor: pointer; color: var(--text-2); }
.cz-seg-btn:last-child { border-right: 0; }
.cz-seg-btn:hover:not(:disabled) { background: var(--bg-soft); }
.cz-seg-btn:disabled { opacity: .35; cursor: not-allowed; }
.cz-seg-btn.on { background: var(--navy); color: #fff; }
.cz-seg-btn.on.req { background: var(--red); }
.cz-seg-btn.on.rec { background: #f0a500; color: #3b2a00; }
.cz-seg-btn.on.off { background: #6b7884; }

/* dropdown lists: index + editor */
.cz-lists { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .cz-lists { grid-template-columns: 1fr; } .cz-index-list { max-height: 260px; } }
.cz-index { position: sticky; top: 8px; }
.cz-index-head { padding: 10px; border-bottom: 1px solid var(--line); }
.cz-index-search { width: 100%; }
.cz-index-list { max-height: calc(100vh - 260px); overflow-y: auto; }
.cz-index-group { background: var(--bg-soft); font-size: 11px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--text-2); padding: 6px 12px; border-bottom: 1px solid var(--line); }
.cz-index-item { display: flex; width: 100%; align-items: center; gap: 8px; border: 0; border-bottom: 1px solid #eef1f3; background: #fff; padding: 8px 12px; text-align: left; cursor: pointer; font-size: 14px; }
.cz-index-item:hover { background: #f6f9fb; }
.cz-index-item.active { background: #e3f2fb; box-shadow: inset 3px 0 0 var(--blue); }
.cz-index-label { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cz-index-n { color: var(--muted); font-size: 12px; }
.cz-index-lock { color: var(--muted); display: inline-flex; }
.cz-index-lock .ico { width: 14px; height: 14px; }
.cz-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--blue); flex: none; }
.cz-ed-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.cz-ed-title { margin: 0 0 4px; font-size: 20px; }
.cz-ed-sub { font-size: 13px; color: var(--text-2); }
.cz-ed-sub code, .cz-id, .cz-v-table code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 12px; background: var(--bg-soft); padding: 1px 5px; border-radius: 3px; }
.cz-mode { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.cz-mode-label { font-weight: 700; font-size: 13px; color: var(--text-2); }
.cz-mode-hint { font-size: 12.5px; flex: 1; min-width: 220px; }
.cz-ed-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 18px; align-items: start; }
@media (max-width: 1100px) { .cz-ed-grid { grid-template-columns: 1fr; } }
.cz-rows-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.cz-count { font-weight: 700; color: var(--navy); font-size: 14px; }
.cz-rows { border: 1px solid var(--line); border-radius: 4px; max-height: 520px; overflow-y: auto; }
.cz-row { display: flex; align-items: center; gap: 10px; padding: 5px 8px; border-bottom: 1px solid #eef1f3; min-height: 44px; }
.cz-row:last-child { border-bottom: 0; }
.cz-row:hover { background: #fafcfd; }
.cz-row-idx { width: 28px; text-align: right; color: var(--muted); font-size: 12px; flex: none; }
.cz-row-val { flex: 1; min-width: 0; word-break: break-word; }
.cz-row-input { flex: 1; min-width: 0; }
.cz-row-actions { display: inline-flex; flex: none; }
.cz-row.is-hidden .cz-row-val { color: var(--muted); text-decoration: line-through; }
.cz-unhide { color: var(--green-dark); }
.cz-preview { border: 1px solid var(--line); border-radius: 4px; padding: 12px; background: var(--bg-soft); display: flex; flex-direction: column; gap: 8px; position: sticky; top: 8px; }
.cz-preview-label { font-weight: 700; font-size: 13px; color: var(--navy); }
.cz-preview select { width: 100%; }
.cz-ro-table td { font-size: 14px; }

/* medications */
.cz-med-add { display: grid; grid-template-columns: minmax(180px, 2fr) 110px minmax(90px, 1fr) minmax(140px, 1.5fr) auto; gap: 8px; align-items: center; margin-bottom: 6px; }
@media (max-width: 900px) { .cz-med-add { grid-template-columns: 1fr 1fr; } }
.cz-dose { width: 100px; }
.cz-med-name { font-weight: 600; }
.cz-med-table tr.is-hidden td, .cz-m-table tr.is-hidden td, .cz-v-table tr.is-hidden td { color: var(--muted); }
.cz-med-table tr.is-hidden .cz-med-name { text-decoration: line-through; }

/* treatments */
.cz-cats { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 4px; }
.cz-cat { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line-2); background: #fff; border-radius: 3px; padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.cz-cat.active { background: var(--tile); border-color: var(--tile); color: #fff; }
.cz-cat-n { font-size: 12px; opacity: .7; }
.cz-cat-mark { font-size: 11px; background: #e8edf1; color: var(--text-2); border-radius: 8px; padding: 0 6px; }
.cz-cat-mark.added { background: #e2f6ea; color: #1e7a45; }
.cz-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px; }
.cz-tile { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-left: 4px solid var(--tile); border-radius: 3px; padding: 6px 6px 6px 10px; background: #fff; min-height: 46px; }
.cz-tile.is-added { border-left-color: var(--green); }
.cz-tile.is-hidden { border-left-color: var(--line-2); background: var(--bg-soft); }
.cz-tile.is-hidden .cz-tile-name { color: var(--muted); text-decoration: line-through; }
.cz-tile-name { flex: 1; min-width: 0; font-size: 14px; }

/* measures + validation tables */
.cz-group-row td { background: var(--bg-soft); font-weight: 700; font-size: 12px; letter-spacing: .4px; text-transform: uppercase; color: var(--text-2); }
.cz-m-name { font-weight: 600; }
.cz-dir { font-size: 12px; font-weight: 600; color: var(--text-2); }
.cz-target-wrap { display: inline-flex; align-items: center; gap: 6px; }
.cz-target-op { font-weight: 700; color: var(--navy); }
.cz-target { width: 90px; }
.cz-target-unit { color: var(--text-2); font-size: 13px; min-width: 24px; }
.cz-locked { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 13px; color: var(--text-2); }
.cz-v-summary { display: inline-flex; gap: 6px; flex-wrap: wrap; }
.cz-v-pill { font-size: 12px; font-weight: 700; border-radius: 10px; padding: 2px 9px; background: #e8edf1; }
.cz-v-pill.req { background: #fde3e0; color: #a12b1e; }
.cz-v-pill.rec { background: #fff1c9; color: #7a5300; }
.cz-sum td { padding: 8px 10px; }

/* "Recommended" (optional) validation issues — PCR Validation Summary + QA review */
.val-badge.rec { background: #f0a500; color: #3b2a00; }
.val-rec-count { margin-top: 8px; font-size: 12px; font-weight: 700; color: #a06d00; }
.val-group.val-group-rec { background: #fff6df; color: #7a5300; }
.val-recs { padding-bottom: 0; }
.qa-issue-type.rec { background: #f0a500; color: #3b2a00; }
.cz-v-table td, .cz-m-table td, .cz-med-table td { vertical-align: middle; }
.cz-med-table td .input { min-width: 0; }
.cz-tabs .cz-tab .ico { width: 16px; height: 16px; }
@media (max-width: 640px) {
  .cz-tab { padding: 7px 10px; font-size: 13px; }
  .cz-ed-head { flex-direction: column; }
  .cz-add { min-width: 0; max-width: none; width: 100%; }
  .cz-filter { max-width: none; flex: 1; }
  .cz-row-actions .adm-icon-btn { width: 30px; height: 30px; margin-left: 2px; }
}
.cz-id { flex: none; width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: center; }
