.cx-schedule-panel{margin-top:1.3rem}.cx-schedule-panel[hidden]{display:none!important}
.cx-schedule-top{display:flex;justify-content:space-between;align-items:flex-start;gap:1.25rem;flex-wrap:wrap}
.cx-schedule-top h2{margin:.15rem 0 .45rem;font-size:1.55rem}.cx-schedule-muted{color:var(--muted,#67717f);font-size:.88rem;line-height:1.5}
.cx-schedule-label{font-size:.66rem;font-weight:700;letter-spacing:.08em;color:var(--accent,#238e99);border:1px solid currentColor;padding:.35rem .65rem;border-radius:999px}
.cx-schedule-toolbar{display:flex;gap:1rem;align-items:end;flex-wrap:wrap;margin:1rem 0}.cx-schedule-stats{font-size:.85rem;opacity:.8}
.cx-schedule-field{display:flex;flex-direction:column;gap:.35rem;font-size:.82rem;font-weight:600;min-width:150px}
.cx-schedule-field input,.cx-schedule-field select{width:100%;max-width:100%;border:1px solid #a5adb555;border-radius:.65rem;padding:.65rem;background:var(--surface,#fff);color:inherit;font:inherit}
.cx-schedule-list{display:grid;gap:.65rem}.cx-schedule-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:.85rem 1rem;border:1px solid #8899aa33;border-radius:.8rem;flex-wrap:wrap}
.cx-schedule-item-main{display:flex;gap:1rem;align-items:baseline;flex-wrap:wrap}.cx-schedule-item-main strong{white-space:nowrap}.cx-schedule-item-main p{margin:.35rem 0 0;font-size:.79rem;opacity:.75}
.cx-schedule-actions{display:flex;flex-wrap:wrap;gap:.5rem}.cx-schedule-actions button{cursor:pointer}.cx-schedule-actions button:disabled{cursor:not-allowed;opacity:.45}
.cx-schedule-book{border-top:1px solid #8899aa33;margin-top:1.3rem;padding-top:1rem}.cx-schedule-book h3{margin-top:0}
.cx-schedule-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.85rem;margin-bottom:1rem}
.cx-schedule-notice{min-height:1.4em;font-size:.85rem}.cx-schedule-error{color:#a52a2a}

/* Dense, native flowboard: stage cards reflect real appointment and linked visit states. */
.cx-schedule-board{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:.75rem;align-items:start}
.cx-schedule-lane{min-width:0;background:var(--surface,#fff);border:1px solid #8899aa33;border-radius:.85rem;padding:.65rem;min-height:7rem}
.cx-schedule-lane-heading{display:flex;gap:.5rem;align-items:center;justify-content:space-between;font-size:.92rem;margin:.2rem .2rem .75rem}
.cx-schedule-count{font-variant-numeric:tabular-nums;font-size:.75rem;border:1px solid #8899aa55;border-radius:999px;min-width:1.4rem;text-align:center;padding:.1rem .25rem}
.cx-schedule-lane .cx-schedule-item{display:block;padding:.75rem;margin-top:.55rem}
.cx-schedule-lane .cx-schedule-item-main{display:block;overflow-wrap:anywhere}
.cx-schedule-lane .cx-schedule-item-main strong{display:block;margin-bottom:.35rem}
.cx-schedule-lane .cx-schedule-actions{margin-top:.75rem}
.cx-schedule-lane .cx-schedule-actions button{font-size:.78rem;padding:.45rem .6rem}
@media(max-width:1100px){.cx-schedule-board{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:650px){.cx-schedule-board{grid-template-columns:1fr}}

/* Clinic Day visual alignment (Oct 2026): match Canigenix Vet's dark native theme.
   The original schedule CSS used --surface with a WHITE fallback, but the clinic
   theme does not define --surface. On the dark app this caused near-white text
   on white lanes and form controls. These overrides are fully scoped to Clinic Day. */
#cgxSchedulePanel {
  --cgx-day-bg: #102b37;
  --cgx-day-lane: #0d2430;
  --cgx-day-control: #091f2b;
  --cgx-day-border: #3a6571;
  --cgx-day-text: #e5f6f2;
  --cgx-day-muted: #b5d0d2;
  --cgx-day-accent: #82dfc9;
  position: relative;
  overflow: hidden;
  margin-top: 20px;
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid #365e6b;
  border-radius: 17px;
  color: var(--cgx-day-text);
  background: linear-gradient(156deg, #153440 0%, #102b37 55%, #0d2430 100%);
  box-shadow: inset 0 1px rgba(255,255,255,.045), 0 12px 25px rgba(0,10,16,.13);
  color-scheme: dark;
}
#cgxSchedulePanel::before {
  content: '';
  position: absolute;
  inset: 0 22px auto 22px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, #70dfc8, #3b9cc0 72%, transparent);
  pointer-events: none;
}
#cgxSchedulePanel .cx-schedule-top {
  align-items: center;
  margin-bottom: 4px;
}
#cgxSchedulePanel .overline {
  color: #90dfd0;
  font-weight: 800;
  letter-spacing: .14em;
}
#cgxSchedulePanel .cx-schedule-top h2 {
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  font-weight: 800;
  letter-spacing: -.035em;
  color: #f2fffa;
  margin: 5px 0 8px;
}
#cgxSchedulePanel .cx-schedule-muted {
  color: var(--cgx-day-muted);
  opacity: 1;
  font-size: .86rem;
  line-height: 1.55;
}
#cgxSchedulePanel .cx-schedule-label {
  border-color: #548c85;
  color: #caf6e9;
  background: #173c43;
  white-space: nowrap;
  font-size: .65rem;
  letter-spacing: .11em;
}
#cgxSchedulePanel .cx-schedule-toolbar {
  margin: 19px 0 20px;
  gap: 12px;
}
#cgxSchedulePanel .cx-schedule-stats {
  padding: 9px 12px;
  background: #173540;
  border: 1px solid #345765;
  border-radius: 9px;
  color: #c5e8e0;
  font-size: .81rem;
  font-variant-numeric: tabular-nums;
  opacity: 1;
}
#cgxSchedulePanel .cx-schedule-field {
  color: #bedbdc;
  font-size: .79rem;
  font-weight: 650;
  min-width: 0;
  gap: 7px;
}
#cgxSchedulePanel .cx-schedule-field > span {
  color: #d5ebe7;
}
#cgxSchedulePanel .cx-schedule-field input,
#cgxSchedulePanel .cx-schedule-field select {
  display: block;
  width: 100%;
  min-width: 0;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid #4b6e77;
  border-radius: 9px;
  outline: none;
  background: var(--cgx-day-control);
  color: #f3fbf8;
  opacity: 1;
  font-size: .87rem;
  font-weight: 500;
  box-shadow: inset 0 1px rgba(255,255,255,.025);
  color-scheme: dark;
}
#cgxSchedulePanel .cx-schedule-field input::placeholder {
  color: #a4c2c6;
  opacity: 1;
}
#cgxSchedulePanel .cx-schedule-field select option {
  background: #0d2631;
  color: #eef8f5;
}
#cgxSchedulePanel .cx-schedule-field :is(input,select):focus-visible {
  outline: 2px solid #9ee8d4;
  outline-offset: 2px;
  border-color: #8adfc9;
}
#cgxSchedulePanel .cx-schedule-field :is(input,select):disabled {
  color: #b4c8c7;
  opacity: .62;
  cursor: not-allowed;
}
#cgxSchedulePanel .cx-schedule-board {
  gap: 12px;
  align-items: stretch;
}
#cgxSchedulePanel .cx-schedule-lane {
  background: linear-gradient(180deg, #112b36 0%, var(--cgx-day-lane) 100%);
  border: 1px solid #385965;
  border-top: 3px solid #648e95;
  border-radius: 12px;
  min-height: 150px;
  padding: 14px;
  color: var(--cgx-day-text);
  min-width: 0;
}
#cgxSchedulePanel .cx-schedule-lane:nth-child(2) { border-top-color: #64c7bb; }
#cgxSchedulePanel .cx-schedule-lane:nth-child(3) { border-top-color: #66acc8; }
#cgxSchedulePanel .cx-schedule-lane:nth-child(4) { border-top-color: #8a9fa8; }
#cgxSchedulePanel .cx-schedule-lane-heading {
  margin: 0 0 12px;
  display: flex;
  gap: 8px;
  align-items: center;
  color: #e7f8f3;
  font-size: .92rem;
  font-weight: 750;
  line-height: 1.3;
}
#cgxSchedulePanel .cx-schedule-count {
  border: 1px solid #4e777d;
  background: #1c3e47;
  color: #a9eddc;
  border-radius: 999px;
  padding: 3px 8px;
  min-width: 28px;
  font-size: .76rem;
  font-weight: 800;
  text-align: center;
}
#cgxSchedulePanel .cx-schedule-lane > p.cx-schedule-muted {
  margin: 12px 0 0;
  padding: 16px 12px;
  border: 1px dashed #3c5b65;
  border-radius: 9px;
  background: #0a222c;
  color: #a9c9ca;
  text-align: center;
  font-size: .79rem;
}
#cgxSchedulePanel .cx-schedule-list > p.cx-schedule-muted {
  margin: 0 0 13px;
  color: #b6d7d4;
}
#cgxSchedulePanel .cx-schedule-item {
  border: 1px solid #3c6770;
  background: #112f39;
  color: var(--cgx-day-text);
  border-radius: 10px;
  padding: 13px;
  min-width: 0;
}
#cgxSchedulePanel .cx-schedule-item-main strong {
  color: #c7f5e8;
  font-size: .89rem;
  font-weight: 750;
  white-space: normal;
}
#cgxSchedulePanel .cx-schedule-item-main > div { color: #e7f4f1; line-height: 1.45; }
#cgxSchedulePanel .cx-schedule-item-main > div p { color: #abc7cc; opacity: 1; }
#cgxSchedulePanel .cx-schedule-book {
  margin-top: 24px;
  padding: 21px 0 0;
  border-top: 1px solid #365965;
}
#cgxSchedulePanel .cx-schedule-book h3 {
  color: #eafaf4;
  font-size: 1.06rem;
  margin: 0 0 16px;
  letter-spacing: -.015em;
}
#cgxSchedulePanel .cx-schedule-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 13px;
  margin-bottom: 16px;
}
#cgxSchedulePanel .cx-schedule-grid > :nth-child(1),
#cgxSchedulePanel .cx-schedule-grid > :nth-child(2),
#cgxSchedulePanel .cx-schedule-grid > :nth-child(3),
#cgxSchedulePanel .cx-schedule-grid > :nth-child(4) { grid-column: span 3; }
#cgxSchedulePanel .cx-schedule-grid > :nth-child(5) { grid-column: 1 / -1; }
#cgxSchedulePanel .cx-schedule-actions { gap: 8px; }
#cgxSchedulePanel button.primary {
  background: #73d5bd;
  color: #092c2e;
  border: 1px solid #73d5bd;
  border-radius: 9px;
  font-weight: 750;
}
#cgxSchedulePanel button.primary:hover:not(:disabled) {
  background: #a4efdc;
  border-color: #a4efdc;
}
#cgxSchedulePanel button.outline {
  background: #13333e;
  color: #d1f4e9;
  border: 1px solid #568a89;
  border-radius: 9px;
  font-weight: 650;
}
#cgxSchedulePanel button.outline:hover:not(:disabled) {
  background: #20505a;
  border-color: #94e3d1;
}
#cgxSchedulePanel button:focus-visible {
  outline: 2px solid #e9fad8;
  outline-offset: 3px;
}
#cgxSchedulePanel .cx-schedule-notice {
  color: #a9e8d6;
  min-height: 22px;
}
#cgxSchedulePanel .cx-schedule-error { color: #ffb0a7; }
#cgxSchedulePanel .cx-schedule-book > p.cx-schedule-muted {
  margin: 15px 0 0;
  font-size: .76rem;
}
@media (max-width: 1150px) {
  #cgxSchedulePanel .cx-schedule-board { grid-template-columns: repeat(2,minmax(0,1fr)); }
  #cgxSchedulePanel .cx-schedule-grid > :nth-child(-n+4) { grid-column: span 6; }
}
@media (max-width: 650px) {
  #cgxSchedulePanel .cx-schedule-board { grid-template-columns: 1fr; }
  #cgxSchedulePanel .cx-schedule-grid > :nth-child(n) { grid-column: 1 / -1; }
  #cgxSchedulePanel .cx-schedule-label { display: none; }
  #cgxSchedulePanel .cx-schedule-toolbar > .cx-schedule-field { width: 100%; }
  #cgxSchedulePanel .cx-schedule-toolbar > .cx-schedule-field input { width: 100%; }
}

/* v142: action-aware queue is embedded in existing Clinic Day, not a new tab. */
#cgxSchedulePanel .cx-queue-tools{display:flex;gap:10px;align-items:center;justify-content:space-between;flex-wrap:wrap;margin:-6px 0 16px}
#cgxSchedulePanel .cx-queue-filters{display:flex;gap:7px;flex-wrap:wrap}
#cgxSchedulePanel .cx-queue-filter{border:1px solid #527681;background:#143744;color:#d0e7e5;padding:8px 11px;border-radius:9px;cursor:pointer;font-size:.79rem}
#cgxSchedulePanel .cx-queue-filter.is-active{border-color:#85dfcb;background:#24584f;color:#f2fffb;font-weight:700}
#cgxSchedulePanel .cx-queue-filter:focus-visible{outline:2px solid #85dfcb;outline-offset:2px}
#cgxSchedulePanel .cx-queue-tools .cx-schedule-muted{margin:0;font-size:.75rem}
#cgxSchedulePanel .cx-schedule-next{opacity:1!important;color:#b9e9dc;font-size:.8rem!important;margin:9px 0 0!important;padding:7px 9px;border-left:2px solid #68c1ad;background:#143944;border-radius:3px}
#cgxSchedulePanel .cx-schedule-next strong{display:inline!important;white-space:normal;color:#e6fff6}
#cgxSchedulePanel .cx-schedule-next[data-queue-stage="manual_completion_review"],
#cgxSchedulePanel .cx-schedule-next[data-queue-stage="record_review"]{border-left-color:#e1b772;background:#45382b;color:#ffebc7}

/* v143 shared Clinic Day refresh feedback and stale-editor protection. */
#cgxSchedulePanel .cx-schedule-sync{margin:-2px 0 14px;color:#a4d9d0;font-size:.77rem}
#cgxSchedulePanel .cx-schedule-sync.cx-schedule-error{color:#ffd0a5;font-weight:650}
#cgxSchedulePanel #cgxScheduleSubmit:disabled{opacity:.55;cursor:not-allowed}
