/* =========================
CSS (JSFiddle CSS panel)
========================= */
:root {
  --bg: #0b1220;
  --panel: #0f1a2f;
  --panel2: #0e1730;
  --text: #e8eefc;
  --muted: #9fb0d0;
  --line: #243458;
  --primary: #4f8cff;
  --primary2: #2e6fff;
  --ghost: rgba(255, 255, 255, 0.06);
  --danger: #ff5b5b;
  --ok: #3ddc97;

  --selectBg: rgba(0, 0, 0, 0.26);
  --selectBorder: rgba(255, 255, 255, 0.14);
  --selectText: #e8eefc;
  --selectPlaceholder: rgba(159, 176, 208, 0.85);
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}

body {
  margin: 0;
  background: linear-gradient(180deg, #071023 0%, #070b14 100%);
  background-attachment: fixed;
  background-repeat: no-repeat;
  background-size: cover;
  color: var(--text);
  font:
    14px/1.35 system-ui,
    -apple-system,
    Segoe UI,
    Roboto,
    Arial,
    sans-serif;
}

.app {
  max-width: 1200px;
  margin: 0 auto;
  padding: 18px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px;
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.04),
    rgba(255, 255, 255, 0.02)
  );
  border-radius: 14px;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
}
.dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    #fff 0%,
    var(--primary) 30%,
    #1a3f9e 70%
  );
  box-shadow: 0 0 22px rgba(79, 140, 255, 0.5);
}
.title {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.subtitle {
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.actions {
  display: flex;
  gap: 8px;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 14px;
  margin-top: 14px;
}

.panel {
  border: 1px solid var(--line);
  background: linear-gradient(
    180deg,
    rgba(255, 255, 255, 0.03),
    rgba(255, 255, 255, 0.015)
  );
  border-radius: 14px;
  overflow: hidden;
}

.panel-header {
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(36, 52, 88, 0.7);
  background: rgba(0, 0, 0, 0.15);
}

.panel-header h2 {
  margin: 0 0 6px;
  font-size: 14px;
  letter-spacing: 0.2px;
}

.hint {
  color: var(--muted);
  font-size: 12px;
}
.muted {
  color: var(--muted);
}

.line2 {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.chip {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}

.sel {
  appearance: none;
  border-radius: 10px;
  border: 1px solid var(--selectBorder);
  background: var(--selectBg);
  color: var(--selectText);
  padding: 8px 10px;
  outline: none;
}
.sel:focus {
  border-color: rgba(79, 140, 255, 0.7);
}
.sel option {
  background: #0b1220;
  color: #e8eefc;
}
.sel.is-placeholder {
  color: var(--selectPlaceholder);
}

.inlineInput {
  flex: 1;
  min-width: 220px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}
.inlineInput:focus {
  border-color: rgba(79, 140, 255, 0.7);
}

.uidInput {
  width: 100%;
  min-height: 140px;
  resize: vertical;
  padding: 12px 12px;
  border: 0;
  outline: none;
  color: var(--text);
  background: rgba(0, 0, 0, 0.18);
  border-bottom: 1px solid rgba(36, 52, 88, 0.6);
}

.row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
}
.row-tight {
  padding-top: 10px;
  padding-bottom: 10px;
}
.spacer {
  flex: 1;
}

.btn {
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 10px 12px;
  color: var(--text);
  cursor: pointer;
  background: var(--ghost);
  transition: 0.15s ease;
  user-select: none;
}
.btn:hover {
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: linear-gradient(180deg, var(--primary), var(--primary2));
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 10px 24px rgba(79, 140, 255, 0.18);
}
.btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.06);
}

.worklist-header {
  display: flex;
  justify-content: space-between;
  padding: 10px 14px;
  border-top: 1px solid rgba(36, 52, 88, 0.6);
  border-bottom: 1px solid rgba(36, 52, 88, 0.6);
  background: rgba(0, 0, 0, 0.12);
}

.kpi {
  display: flex;
  gap: 8px;
  align-items: baseline;
}
.kpi-label {
  color: var(--muted);
  font-size: 12px;
}
.kpi-value {
  font-weight: 700;
  font-size: 14px;
}

.worklist {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 420px;
  overflow: auto;
}

.card {
  border: 1px solid rgba(36, 52, 88, 0.7);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  padding: 10px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.card.selected {
  border-color: rgba(79, 140, 255, 0.7);
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.15) inset;
}
.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
}
.badge.ok {
  color: #bff5df;
  border-color: rgba(61, 220, 151, 0.35);
  background: rgba(61, 220, 151, 0.1);
}
.badge.missing {
  color: #ffd0d0;
  border-color: rgba(255, 91, 91, 0.35);
  background: rgba(255, 91, 91, 0.1);
}

.card-main {
  flex: 1;
  min-width: 0;
}
.card-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 6px;
}
.uid {
  font-weight: 700;
  letter-spacing: 0.2px;
}
.meta {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.smallbtn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.smallbtn:hover {
  transform: translateY(-1px);
}
.smallbtn.danger {
  border-color: rgba(255, 91, 91, 0.35);
  background: rgba(255, 91, 91, 0.1);
}

.editor {
  padding: 14px;
}
.lbl {
  display: block;
  margin: 12px 0 6px;
  color: var(--muted);
  font-size: 12px;
}
.textbox {
  width: 100%;
  min-height: 130px;
  resize: vertical;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(36, 52, 88, 0.7);
  outline: none;
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
}
.textbox:focus {
  border-color: rgba(79, 140, 255, 0.7);
}

.divider {
  margin: 12px 0;
  border-top: 1px dashed rgba(36, 52, 88, 0.8);
}

.details summary {
  cursor: pointer;
  color: var(--muted);
}
.pre {
  margin: 10px 0 0;
  padding: 10px;
  border-radius: 12px;
  border: 1px solid rgba(36, 52, 88, 0.7);
  background: rgba(0, 0, 0, 0.18);
  overflow: auto;
  max-height: 220px;
}

.toast {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  display: none;
}
.toast.show {
  display: block;
}
.toast.ok {
  color: #c9f7e6;
  border-color: rgba(61, 220, 151, 0.35);
  background: rgba(61, 220, 151, 0.1);
}
.toast.bad {
  color: #ffd0d0;
  border-color: rgba(255, 91, 91, 0.35);
  background: rgba(255, 91, 91, 0.1);
}

/* Add-ons multiselect UI */
.multiWrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  flex: 1;
}
.multiPills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  font-size: 12px;
}
.pillX {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
  line-height: 16px;
  text-align: center;
  padding: 0;
}
.multiBtn {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}

/* Add-ons popover */
.pop {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}
.pop.show {
  display: flex;
}
.popCard {
  width: min(620px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(18, 28, 52, 0.98),
    rgba(12, 18, 32, 0.98)
  );
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  padding: 14px;
}
.popTitle {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.popList {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-height: 320px;
  overflow: auto;
  padding-right: 4px;
}
.chkRow {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
}
.chkRow input {
  margin-top: 2px;
}
.chkRow .chkText {
  font-size: 13px;
}
.popRow {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

/* Screenshots */
.shotHeader {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}
.shotTitle {
  font-weight: 700;
  letter-spacing: 0.2px;
}

.shotDrop {
  margin-top: 10px;
  border-radius: 14px;
  border: 1px dashed rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.14);
  padding: 12px;
  outline: none;
}
.shotDrop:focus {
  border-color: rgba(79, 140, 255, 0.7);
}
.shotDropInner {
  display: flex;
  gap: 12px;
  align-items: center;
}
.shotIcon {
  font-size: 18px;
  opacity: 0.9;
}
.shotDropText {
  font-weight: 650;
}

.shotList {
  margin-top: 10px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.shotCard {
  border: 1px solid rgba(36, 52, 88, 0.7);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  overflow: hidden;
}
.shotCard.dragging {
  opacity: 0.65;
  outline: 2px solid rgba(79, 140, 255, 0.35);
  outline-offset: 2px;
}
.shotTop {
  padding: 10px 10px 8px;
  display: flex;
  justify-content: space-between;
  gap: 8px;
  align-items: center;
}
.shotName {
  font-weight: 700;
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.shotBtn {
  padding: 6px 9px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  cursor: pointer;
}
.shotBtn.danger {
  border-color: rgba(255, 91, 91, 0.35);
  background: rgba(255, 91, 91, 0.1);
}
.shotImg {
  width: 100%;
  display: block;
  border-top: 1px solid rgba(36, 52, 88, 0.6);
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.55);
}
.modal.show {
  display: flex;
}
.modalCard {
  width: min(560px, 100%);
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: linear-gradient(
    180deg,
    rgba(18, 28, 52, 0.98),
    rgba(12, 18, 32, 0.98)
  );
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  padding: 14px;
}
.modalTitle {
  font-weight: 800;
  letter-spacing: 0.2px;
}
.modalBody {
  margin-top: 10px;
}
.modalInput {
  width: 100%;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 10px 12px;
  outline: none;
}
.modalInput:focus {
  border-color: rgba(79, 140, 255, 0.7);
}

/* NEW: dropdown in modal - prevents “cut off” */
.modalSelect {
  width: 100%;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--selectBorder);
  background: var(--selectBg);
  color: var(--selectText);
  padding: 8px 10px;
  outline: none;
  appearance: none;
}
.modalSelect:focus {
  border-color: rgba(79, 140, 255, 0.7);
}
.modalSelect option {
  background: #0b1220;
  color: #e8eefc;
}
.modalCard {
  width: min(820px, 100%);
}

.modalRow {
  margin-top: 12px;
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

@media (max-width: 980px) {
  .shotList {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .shotImg {
    max-height: 250px;
    object-fit: contain;
  }
  .shotCard {
    border-radius: 12px;
  }
  .shotTop {
    padding: 8px;
  }
}

/* ===== Top-right: tabs next to Clear/Load ===== */
.topActions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tabs--top {
  display: flex;
  gap: 8px;
  margin: 0;
  padding: 0;
}

.tab {
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  border-radius: 10px;
  padding: 10px 12px;
  cursor: pointer;
  transition: 0.15s ease;
  user-select: none;
}
.tab:hover {
  transform: translateY(-1px);
}
.tab:active {
  transform: translateY(0);
}
.tab.active {
  box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.2) inset;
  border-color: rgba(79, 140, 255, 0.35);
}

/* Signed-in row under header */
.userbarRow {
  margin-top: 10px;
  display: flex;
  justify-content: flex-start;
}
.userbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

/* ===== Colons + consistent label styling ===== */
.lbl2 {
  color: var(--muted);
  font-size: 12px;
  display: block;
  margin: 10px 0 6px;
}
.lbl2::after {
  content: ':';
  margin-left: 2px;
}

.lbl2 {
  letter-spacing: 0.1px;
}
.lbl2 .req {
  color: var(--danger);
  font-weight: 800;
}
.lbl2:has(*) {
}
.lbl2::after {
  content: ':';
}
.intakeHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.btn-mini {
  padding: 8px 10px;
  border-radius: 10px;
}

/* ===== Finalize button green ===== */
.btn-final,
#btnFinalize {
  background: linear-gradient(
    180deg,
    rgba(61, 220, 151, 0.95),
    rgba(26, 171, 117, 0.95)
  );
  border-color: rgba(61, 220, 151, 0.35);
  color: #062016;
  font-weight: 800;
  box-shadow: 0 10px 24px rgba(61, 220, 151, 0.14);
}
.btn-final:hover,
#btnFinalize:hover {
  transform: translateY(-1px);
}
.req {
  color: var(--danger);
  font-weight: 900;
}
.panel-header--collapsible {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.btn-mini {
  padding: 8px 10px;
  border-radius: 10px;
}
#addCaseModal .modalCard {
  max-height: 86vh;
  overflow: auto;
}
#addCaseModal .lbl2 {
  margin-top: 12px;
}
main.grid {
  padding-left: 20px;
  padding-right: 20px;
}
main.grid {
  column-gap: 20px;
}
.panel-header h2 {
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: 0.2px;
}
.panel-header {
  padding: 14px 14px 10px;
  position: relative;
  z-index: 0;
  border-bottom: 0;
  background: transparent;
}
.panel-header::before {
  content: '';
  position: absolute;
  left: -14px;
  right: -14px;
  top: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.15);
  z-index: -1;
  pointer-events: none;
}
.panel-header::after {
  content: '';
  position: absolute;
  left: -14px;
  right: -14px;
  bottom: 0;
  height: 1px;
  background: rgba(36, 52, 88, 0.7);
  pointer-events: none;
}
#worklistPanel,
#reportPanel {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#worklist {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#worklistPanel {
  max-height: calc(100vh - 220px);
}
.worklist {
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: auto;
  max-height: none;
}
@media (max-width: 980px) {
  .grid {
    grid-template-columns: 1fr;
  }
  #worklistPanel {
    max-height: 22.25vh;
  }
  #worklist {
    overflow: auto;
  }
}
.worklist-tools {
  padding: 0 14px;
}
/* Tighten report top block spacing */
.reportTop .row {
  margin: 10px 0;
  gap: 12px;
}
.reportTop .lbl-inline {
  min-width: 120px;
}

/* FOV line */
.fovText {
  padding: 10px 0;
  color: rgba(255, 255, 255, 0.75);
  white-space: nowrap;
}

/* Make note area smaller + 2/3 width */
.reportTop .row.col textarea#txtRefNote {
  min-height: 90px;
  width: 66%;
  max-width: 720px;
}

/* On small screens, let it go full width */
@media (max-width: 900px) {
  .reportTop .row.col textarea#txtRefNote {
    width: 100%;
  }
}

/* Optional: slightly smaller pills row spacing */
.pillWrap {
  gap: 8px;
}
/* Kill any accidental lines from labels/textarea shadows */
.lbl {
  border: 0 !important;
  box-shadow: none !important;
  background: transparent !important;
}

.textbox {
  box-shadow: none !important; /* if your textbox uses inset shadow */
}
/* ===== RIGHT REPORT: restore card/bounding boxes ===== */

.reportTop {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.editor {
  margin-top: 12px;
  padding: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.18);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* ===== Remove the unwanted horizontal line near Dictation ===== */

/* common source: autosave row is drawing a bottom border */
.editor .row-tight {
  border-bottom: none !important;
}

/* if you have any of these in your CSS, this neutralizes them */
#reportPane .editor::before,
#reportPane .editor::after {
  content: none !important;
  display: none !important;
}
/* =========================
   Report card + tight spacing (PASTE AT END)
   ========================= */

#reportPane {
  padding: 0;
}

.reportCard {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 18px;
  padding: 18px 18px 16px;
  background: rgba(0, 0, 0, 0.12);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

/* tighter vertical rhythm */
.reportTop .row {
  margin: 8px 0;
}
.reportTop .row.col {
  margin-top: 10px;
}

.lbl-inline {
  width: 120px;
}
.inlineInput {
  height: 40px;
}

.fovText {
  opacity: 0.85;
  padding: 0 6px 0 0;
  white-space: nowrap;
}

/* make “Note from referring doctor” smaller (about ~2/3 feel) */
#txtRefNote.textbox-sm {
  min-height: 90px;
  max-height: 140px;
}

/* Autosave row separation without the “mystery full-width line” */
.reportMetaRow {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* This is the usual culprit for that “weird line” above Dictation:
   some global styles add borders to .lbl or textareas.
   Force labels to NOT draw borders/lines here. */
.editor .lbl {
  border: 0 !important;
  box-shadow: none !important;
}

/* If any global rule adds a top border to the dictation textarea, kill it */
#txtDictation {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}
/* ===== Report layout fixes (paste at end) ===== */

.reportHeader {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.reportHeaderRight {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.reportPane {
  padding: 14px;
}

/* ONE big bounding card like your original */
.reportCard {
  border: 1px solid rgba(36, 52, 88, 0.7);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.18);
  padding: 14px;
}

/* Kill the extra “double boxes” you accidentally added */
.reportTop {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

#reportPanel .editor {
  margin-top: 12px;
  padding: 0; /* editor already has good spacing via labels/inputs */
  border: 0; /* don’t create a second bounding box */
  background: transparent;
  box-shadow: none;
}

/* Keep autosave separation subtle (NOT a giant page-wide line) */
.reportMetaRow {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(36, 52, 88, 0.6);
}

/* Referring note = smaller and ~2/3 feel */
#txtRefNote {
  min-height: 90px;
  max-height: 140px;
  width: 66%;
}
@media (max-width: 900px) {
  #txtRefNote {
    width: 100%;
  }
}

/* This removes the “random line near Dictation” if it was coming from header pseudo elements */
#reportPanel .panel-header::before,
#reportPanel .panel-header::after {
  left: 0;
  right: 0;
}

/* Don’t add any special top borders to dictation */
#txtDictation {
  border-top: 1px solid rgba(36, 52, 88, 0.7);
}
/* === REPORT: remove the “second rounded box” look === */
.reportCard {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important; /* lets the panel padding be the padding */
}

/* Make the report panel body match the worklist vibe */
#reportPane {
  padding: 14px !important;
  background: rgba(0, 0, 0, 0); /* same feel as other sections */
}
/* === Report top: tighter rows === */
.reportTop .row {
  padding: 2px 14px !important; /* was 12px */
  gap: 10px !important;
}
.reportTop {
  padding: 12px 14px !important; /* slightly tighter */
}
/* Dictation label row w/ AI Sort on same line */
.lblRow {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 6px;
}
.lblRow .lbl {
  margin: 0 !important;
}

/* Yellow AI button */
.btn-ai {
  background: linear-gradient(
    180deg,
    rgba(255, 214, 102, 0.95),
    rgba(235, 178, 45, 0.95)
  );
  border-color: rgba(255, 214, 102, 0.35);
  color: #1b1400;
  font-weight: 800;
  box-shadow: 0 10px 22px rgba(255, 214, 102, 0.12);
}
.btn-ai[disabled] {
  opacity: 0.45;
}
/* Auto-growing single-line-by-default textarea */
.inlineTA {
  flex: 1;
  min-width: 220px;
  width: 100%;
  resize: none; /* user can’t drag; it auto-grows */
  overflow: hidden; /* prevents scrollbars while we autosize */
  white-space: pre-wrap; /* keep new lines + wrap */
  word-break: break-word;

  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.18);
  color: var(--text);
  padding: 8px 10px;
  outline: none;
  line-height: 1.35;

  min-height: 40px; /* matches your inputs */
}
.inlineTA:focus {
  border-color: rgba(79, 140, 255, 0.7);
}
.wlSearch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: 12px;
}

.wlSearchLabel {
  font-weight: 600;
  opacity: 0.9;
  white-space: nowrap;
}

.wlSearchInput {
  width: 240px;
  max-width: 42vw;
  padding: 8px 12px;

  background: rgba(255, 255, 255, 0.08);   /* soft glass look */
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #e6edf7;

  border-radius: 12px;
  outline: none;
  transition: all 0.15s ease;
}

.wlSearchInput::placeholder {
  color: rgba(230, 237, 247, 0.45);
}

.wlSearchInput:focus {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.35);
}

.wlSearchClear {
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(230, 237, 247, 0.6);

  border-radius: 12px;
  padding: 6px 10px;
  cursor: pointer;
  line-height: 1;

  transition: all 0.15s ease;
}

.wlSearchClear:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}
/* ===== Fix FOV row overflow ===== */

/* Keep the FOV row on one line */
.fovRow {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
}

/* Combo box wrapper */
.combo {
  position: relative;
  width: 260px;        /* shorter */
  flex: 0 0 260px;     /* prevent stretching */
  display: inline-flex;
  align-items: center;

  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  padding: 6px 8px;
}

/* Input inside combo */
.comboInput {
  width: 100%;
  background: transparent;
  border: 0;
  outline: none;
  color: #e6edf7;
  padding: 6px 6px;
  font: inherit;
}

.comboInput::placeholder {
  color: rgba(230, 237, 247, 0.45);
}

/* Dropdown button */
.comboBtn {
  border: 0;
  background: transparent;
  color: rgba(230, 237, 247, 0.7);
  cursor: pointer;
  padding: 6px 8px;
  border-radius: 10px;
}

.comboBtn:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

/* Menu */
.comboMenu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 9999;

  display: none;
  max-height: 240px;
  overflow: auto;

  background: rgba(10, 14, 22, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 12px;
  padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.45);
}

.comboMenu.show { display: block; }

.comboItem {
  padding: 10px 10px;
  border-radius: 10px;
  cursor: pointer;
  color: rgba(230, 237, 247, 0.92);
}

.comboItem:hover {
  background: rgba(255, 255, 255, 0.08);
}
/* Slightly wider combo inside modal */
.comboModal {
  width: 100%;
  flex: 1 1 auto;
}
/* =========================
   Worklist priority border colors
   (PASTE AT VERY END OF CSS)
   ========================= */

/* Base priority (not selected) */
.card.priority-rush {
  border-color: rgba(255, 196, 61, 0.65) !important; /* yellow/orange */
  box-shadow: 0 0 0 1px rgba(255, 196, 61, 0.10) inset;
}

.card.priority-stat {
  border-color: rgba(255, 91, 91, 0.75) !important; /* red */
  box-shadow: 0 0 0 1px rgba(255, 91, 91, 0.12) inset;
}

/* ===== Worklist priority styling (FORCE VISIBLE) ===== */

/* RUSH */
.card.priority-rush {
  border: 1px solid rgba(255, 196, 61, 0.95) !important;
  outline: 2px solid rgba(255, 196, 61, 0.35);
  outline-offset: 0px;
}

/* STAT */
.card.priority-stat {
  border: 1px solid rgba(255, 91, 91, 0.95) !important;
  outline: 2px solid rgba(255, 91, 91, 0.35);
  outline-offset: 0px;
}

/* If selected, still keep priority visible */
.card.selected.priority-rush {
  border: 1px solid rgba(255, 196, 61, 1) !important;
  outline: 2px solid rgba(255, 196, 61, 0.55);
}

.card.selected.priority-stat {
  border: 1px solid rgba(255, 91, 91, 1) !important;
  outline: 2px solid rgba(255, 91, 91, 0.55);
}
input[type="date"] {
  appearance: none;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.1);
  background: rgba(0,0,0,.18);
  color: var(--text);
  padding: 8px 10px;
}
/* Worklist header row: keep single line, search shrinks first */
#worklistPanel .panel-header > div {
  display: flex;
  align-items: center;          /* override flex-start so it lines up */
  justify-content: space-between;
  gap: 12px;
  flex-wrap: nowrap;
}

/* Left title block should not grow */
#worklistPanel .panel-header > div > div:first-child {
  flex: 0 0 auto;
}

/* Search takes remaining space and is allowed to shrink */
#worklistPanel .wlSearch {
  flex: 1 1 auto;
  min-width: 0;                 /* CRITICAL: allows flex shrink */
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Input must be allowed to shrink inside flex */
#worklistPanel .wlSearchInput {
  flex: 1 1 auto;
  min-width: 0;                 /* CRITICAL */
  width: 100%;
}

/* Keep Add Case visible, no wrapping */
#worklistPanel #btnOpenAddCase {
  flex: 0 0 auto;
  white-space: nowrap;
}

/* Optional: slightly compact at smaller widths (still one line) */
@media (max-width: 980px) {
  #worklistPanel #btnOpenAddCase {
    padding: 8px 10px;
    font-size: 0.92em;
  }
  #worklistPanel .wlSearchLabel {
    display: none;              /* hides "Search:" label to save space */
  }
}

#comboStudyDetails {
  flex: 0 0 180px !important;
  width: 180px !important;
  max-width: 180px !important;
  min-width: 0 !important;
}
#comboFrom {
  flex: 0 0 260px !important;
  width: 260px !important;
  max-width: 260px !important;
  min-width: 0 !important;
}
#comboTo {
  flex: 0 0 260px !important;
  width: 260px !important;
  max-width: 260px !important;
  min-width: 0 !important;
}
/* ===== FOV: make From/To combos truly shrink when zoomed ===== */

/* 1) Ensure the FOV row is a flex row that can shrink children */
.row.fovRow {
  display: flex !important;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;      /* keep on one line until it truly can't */
  min-width: 0;           /* allow shrink within parent */
}

/* 2) Let BOTH combos shrink (override any min-width/flex rules) */
.row.fovRow #comboFrom,
.row.fovRow #comboTo {
  flex: 1 1 220px !important;  /* preferred size, but can shrink */
  min-width: 0 !important;     /* CRITICAL */
  max-width: 100% !important;
}

/* 3) Inputs inside must also be allowed to shrink */
.row.fovRow #comboFrom .comboInput,
.row.fovRow #comboTo .comboInput {
  width: 100% !important;
  min-width: 0 !important;     /* CRITICAL */
}

/* 4) Don’t let the label + pill force overflow */
.row.fovRow .fovText,
.row.fovRow .pill {
  flex: 0 0 auto;
  white-space: nowrap;
}
/* ===== Study Details: allow dropdown to shrink when zoomed ===== */
#comboStudyDetails {
  flex: 1 1 240px !important;  /* prefers 240px, can shrink */
  min-width: 0 !important;     /* CRITICAL */
  max-width: 100% !important;
}

#comboStudyDetails .comboInput {
  width: 100% !important;
  min-width: 0 !important;     /* CRITICAL */
}
/* If space is tight, let the FOV label truncate instead of clipping */
.row.fovRow .fovText {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.panel-header > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.wlSearch {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
/* Keep buttons from getting pushed down by a long subhead */
.reportSubhead {
  max-width: 350px;          /* tweak: 420–650 depending on your header width */
  white-space: nowrap;       /* keep it on one line */
  overflow: hidden;
  text-overflow: ellipsis;
}
.reportHeaderRight {
  flex: 0 0 auto;
}
.reportHeaderLeft {
  min-width: 0;
}
