/* Encounter-only layout; schedule and phone surfaces retain their own frame. */
.spine.is-encounter #patient-rule,
.spine.is-encounter #patient-name,
.spine.is-encounter #patient-mrn,
.spine.is-encounter #patient-sub,
.spine.is-encounter #allergy,
.spine.is-encounter #studies,
.spine.is-encounter #patient-card { display: none !important; }
.deskenc { grid-template-rows: auto minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas: "patient patient patient" "tl centre tr" "bl centre br"; }
.deskenc > .dk-side-rail { grid-row: 2 / -1; }
.dk-patientbar { grid-area: patient; border: 1px solid var(--rule); border-radius: 10px;
  background: var(--panel); overflow: hidden; min-width: 0; }
.dk-patientbar.is-new { border-color: var(--amber); }
/* LE-58's info bar, as the header's second line: the header box already has
   the border and the ground, so the strip gives up its own and takes a rule
   across the top instead of drawing a box inside a box. */
.dk-patientbar .dk-ibar { border: 0; border-top: 1px solid var(--rule); border-radius: 0;
  background: transparent; padding: 6px 12px 10px; }  /* 10px below: the pills' 44px hit area, which this box clips */
.dk-patient-identity { display: flex; align-items: center; gap: 10px; padding: 8px 12px; flex-wrap: wrap; }
.dk-patient-kind { color: var(--teal); font: 600 10px var(--mono); letter-spacing: .07em; }
.is-new .dk-patient-kind { color: var(--amber-ink); }
.dk-patient-identity strong { font-size: 14px; }
.dk-patient-detail { color: var(--dim); font: 11px var(--mono); }
.dk-patient-allergy { padding: 4px 8px; border: 1px solid var(--hush); border-radius: 6px;
  font: 11px var(--mono); color: var(--dim); }
.dk-patient-allergy.is-known { color: var(--red-ink); border-color: var(--red-ink); }
/* The registration number, coloured as the waiting room colours it (24 Sept):
   yellow a new case, green a follow-up, plain when the type says neither. */
.dk-patient-reg { font-weight: 700; font-size: 15px; }
.dk-patient-reg.wr-visit { padding: 2px 8px; border-radius: 5px; color: #10181a; }
/* Language and payor marks: small outlined chips, the words on the title. */
.dk-patient-mark { display: inline-flex; align-items: center; justify-content: center;
  min-width: 24px; height: 22px; padding: 0 6px; border-radius: 11px; border: 1px solid var(--hush);
  font: 600 12px var(--mono); }
.dk-payor-private { border-color: var(--dim); }
.dk-payor-shield { border-color: var(--map-numb); color: var(--map-numb); }
.dk-payor-corporate { border-color: var(--amber); color: var(--amber); }
.dk-payor-managed { border-color: var(--teal); color: var(--teal); }
.dk-patient-state { margin-left: auto; font-size: 11px; color: var(--dim); }
.dk-patient-close { border: 1px solid var(--hush); border-radius: 6px; color: var(--ink);
  background: transparent; width: 30px; height: 30px; cursor: pointer; font: 20px var(--display); }
.dk-patient-tabs { display: flex; flex-wrap: wrap; border-top: 1px solid var(--hush); gap: 4px; padding: 4px 10px; }
.dk-patient-tab { border: 0; border-radius: 5px; background: transparent; color: var(--dim);
  padding: 6px 10px; font: 12px var(--display); cursor: pointer; }
.dk-patient-tab.is-on, .dk-patient-tab:hover { color: var(--teal); background: var(--line); }
.dk-patient-tab:focus-visible, .dk-patient-close:focus-visible { outline: 2px solid var(--teal); outline-offset: 1px; }
.deskenc .dk-centre { gap: 7px; }
.deskenc .dk-areas { flex-wrap: nowrap; gap: 4px; overflow-x: auto; flex: 0 0 auto; padding: 4px 2px; }  /* 4px: the tabs' 44px hit area, which this box clips */
.deskenc .dk-tab { flex: 1 0 auto; justify-content: center; border-radius: 7px; padding: 7px 8px; font-size: 11px; min-height: 36px; }
.deskenc .dk-tab.is-on { background: var(--teal); color: #041716; border-color: var(--teal); }
.deskenc .dk-tab.is-on .dk-tab-n { color: #123f3b; }
/* The day teal is dark (#0b7266), so the dark ink above read at 3.2:1 on the
   selected tab in day view. Light ink on it instead. */
[data-theme="day"] .deskenc .dk-tab.is-on { color: #ffffff; }
[data-theme="day"] .deskenc .dk-tab.is-on .dk-tab-n { color: #ffffff; }
.deskenc .dk-enc-stage.area-open .dk-enc-main { display: none; }
.deskenc .dk-enc-stage.fields-open .dk-enc-main { display: flex; flex-basis: 42%; }
.deskenc .dk-enc-stage.fields-open .dk-area { flex-basis: 58%; }
.deskenc .dk-enc-stage.fields-open .col-note { display: block; }
.deskenc .dk-enc-stage.fields-open .dk-enc-main main { display: flex; flex-direction: column; overflow: auto; }
.deskenc .dk-enc-stage.fields-open .col-fields { flex: 0 0 auto; overflow: visible; }
.deskenc .dk-enc-stage.fields-open .col-note { flex: 0 0 auto; overflow: visible; }
.deskenc .dk-area { border-radius: 9px; }
/* FULL VIEW (24 September): the area in full view -- true fullscreen or
   panelchrome's full-viewport overlay (.pc-overlay, app.css) -- gives its
   body and the imaging frame every pixel. */
.dk-area.is-fullview .dk-area-b { flex: 1 1 auto; min-height: 0; }
.dk-area.is-fullview .dk-img-frame { min-height: 0; flex: 1 1 auto; }
.deskenc .dk-enc-more { margin-left: auto; align-self: center; min-height: 36px;
  padding: 6px 12px; border-radius: 7px; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--ink-2); font: inherit; font-size: 12px; cursor: pointer; }
.deskenc .dk-enc-more:hover { border-color: var(--teal-2); }
.deskenc .dk-enc-more:focus-visible { outline: 2px solid var(--teal); outline-offset: 2px; }
.deskenc .dk-area-h { justify-content: flex-end; padding: 5px 8px; }
.deskenc .dk-area-b { padding: 12px; }
.deskenc .dk-act { min-height: 43px; border-radius: 7px; padding: 6px 9px; }
.deskenc .dk-act:disabled { opacity: .7; cursor: default; }   /* its sub-line says why it is off */
.deskenc .dk-act-l { font-size: 12px; }
.deskenc .dk-tools .dk-action { min-height: 42px; }
.dk-section-heading { font-size: 17px; margin: 0 0 12px; }
.dk-panel-hint { color: var(--dim); font-size: 12px; line-height: 1.5; }
.dk-patient-bio { display: grid; grid-template-columns: 180px minmax(0,1fr); gap: 12px; font-size: 13px; }
.dk-patient-bio dt { color: var(--dim); } .dk-patient-bio dd { margin: 0; }
@media (max-width: 1366px) {
  .deskenc { --dk-side-width: minmax(220px, 18%); --dk-rail-width: 44px; gap: 7px; padding: 7px; }
  .deskenc .dk-act-s { font-size: 9px; }
  .deskenc .dk-area-b { padding: 9px; }
}
@media (max-height: 780px) {
  .dk-patient-identity { padding-top: 5px; padding-bottom: 5px; }
  .dk-patient-tabs { padding-top: 2px; padding-bottom: 2px; }
  .deskenc .dk-act-s { display: none; }
  .deskenc .dk-act { min-height: 34px; }
}
