:root {
  --bg: #eef6f0;
  --surface: #ffffff;
  --surface-soft: #f7fbf8;
  --line: #d9e6dd;
  --line-strong: #b9cfc0;
  --text: #14221a;
  --muted: #64746a;
  --green-900: #123d24;
  --green-800: #1c5a35;
  --green-700: #277545;
  --green-100: #e1f0e5;
  --teal: #0f6771;
  --gold: #d99d12;
  --danger: #a7392f;
  --shadow: 0 18px 45px rgba(18, 61, 36, 0.10);
  --radius: 8px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

body {
  margin: 0;
  color: var(--text);
  background: linear-gradient(135deg, #d9eadc 0%, #e7f2e9 48%, #cfe3d4 100%);
  min-height: 100vh;
}

body.demo-unlocked .demo-lock {
  display: none;
}

body:not(.demo-unlocked) .app-shell {
  visibility: hidden;
}

.staging-banner {
  position: fixed;
  z-index: 10000;
  top: 0;
  left: 0;
  right: 0;
  background: #c2410c;
  border-bottom: 2px solid #9a3412;
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 7px 12px;
  text-align: center;
}

body:has(.staging-banner:not([hidden])) .demo-lock,
body:has(.staging-banner:not([hidden])) .app-shell {
  padding-top: 32px;
}

.portal-working-overlay {
  position: fixed;
  inset: 0;
  z-index: 1400;
  display: none;
  place-items: center;
  background: rgba(17, 38, 24, .24);
  pointer-events: all;
}

body.portal-working .portal-working-overlay {
  display: grid;
}

.portal-working-overlay > div {
  min-width: 180px;
  display: grid;
  justify-items: center;
  gap: 10px;
  padding: 20px 24px;
  border: 2px solid var(--green-800);
  border-radius: 10px;
  background: rgba(255, 255, 255, .96);
  box-shadow: 0 20px 55px rgba(18, 61, 36, .25);
}

.portal-working-overlay span {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 7px solid #dcefdc;
  border-top-color: var(--green-800);
  animation: portal-spin 850ms linear infinite;
}

.portal-working-overlay b {
  color: var(--green-900);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .04em;
}

.portal-toast {
  position: fixed;
  left: 50%;
  top: 50%;
  z-index: 2500;
  width: max-content;
  max-width: min(520px, calc(100vw - 40px));
  padding: 18px 52px 18px 22px;
  border: 2px solid #2c7a42;
  border-radius: 8px;
  background: linear-gradient(135deg, #f2fbf4, #dff2e4);
  color: #103d24;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 24px 70px rgba(18, 61, 36, .26), 0 0 0 9999px rgba(12, 31, 19, .18);
  opacity: 0;
  transform: translate(-50%, calc(-50% + 10px));
  transition: opacity 180ms ease, transform 180ms ease;
}

.portal-toast-message {
  display: block;
}

.portal-toast-close {
  position: absolute;
  top: 9px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .6);
  color: inherit;
  cursor: pointer;
  font: 900 14px/28px var(--font);
  padding: 0;
  text-align: center;
}

.portal-toast-close:hover,
.portal-toast-close:focus-visible {
  background: rgba(255, 255, 255, .9);
  outline: 2px solid rgba(44, 122, 66, .32);
  outline-offset: 2px;
}

.portal-toast.visible {
  opacity: 1;
  transform: translate(-50%, -50%);
}

.portal-toast.subtle {
  left: auto;
  right: 22px;
  top: 82px;
  max-width: min(340px, calc(100vw - 44px));
  padding: 11px 40px 11px 15px;
  border: 1px solid #9dbba4;
  border-radius: 7px;
  background: #f7fbf8;
  color: #31513a;
  font-weight: 700;
  text-align: left;
  box-shadow: 0 8px 22px rgba(18, 61, 36, .14);
  transform: translateY(-8px);
}

.portal-toast.subtle.visible {
  transform: translateY(0);
}

.portal-toast.subtle .portal-toast-close {
  top: 5px;
  right: 6px;
  width: 26px;
  height: 26px;
  font-size: 12px;
  line-height: 26px;
}

.portal-toast.danger {
  border-color: #b94036;
  background: linear-gradient(135deg, #fff6f5, #ffe1de);
  color: #8f241b;
}

@keyframes portal-spin {
  to { transform: rotate(360deg); }
}

.demo-lock {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background-color: #173823;
  background-image:
    linear-gradient(135deg, rgba(14, 43, 25, .88), rgba(36, 83, 48, .72)),
    url("./assets/portal-login-background.png");
  background-position: center, center;
  background-size: cover, cover;
  background-repeat: no-repeat, no-repeat;
}

.demo-login {
  width: min(360px, 100%);
  display: grid;
  gap: 12px;
  padding: 20px;
  border: 1px solid rgba(28, 90, 53, .22);
  border-radius: 10px;
  background: linear-gradient(180deg, rgba(250,253,251,.94), rgba(231,243,234,.92));
  box-shadow: 0 20px 60px rgba(18, 61, 36, .16);
}

.demo-brand {
  padding: 0 0 14px;
}

.demo-version {
  min-height: 16px;
  color: #5b755f;
  font-size: 11px;
  font-weight: 750;
  text-align: right;
}

.demo-error {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
  text-align: center;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.powered-by {
  margin-top: 28px;
  display: grid;
  justify-items: center;
  gap: 7px;
}

.powered-by span {
  color: #9fb1a4;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.powered-by a {
  display: block;
  border-radius: 8px;
}

.powered-by a:focus-visible {
  outline: 2px solid rgba(255, 255, 255, .86);
  outline-offset: 4px;
}

.powered-by img {
  display: block;
  width: 190px;
  max-width: 50vw;
  border-radius: 8px;
  box-shadow: 0 10px 26px rgba(18, 61, 36, .12);
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app-shell {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 13px;
  background: #d4e8d8;
  border-right: 1px solid #a8c4b1;
  backdrop-filter: blur(10px);
}

.brand-block {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 7px 8px 16px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 38px;
  height: 38px;
  border: 1px solid #bcd7c6;
  border-radius: 8px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: end;
  gap: 3px;
  padding: 8px;
  background: linear-gradient(160deg, #f7fff9, #dcefe3);
}

.brand-mark span {
  border-radius: 2px 2px 0 0;
  background: var(--green-700);
}

.brand-mark span:nth-child(1) { height: 38%; }
.brand-mark span:nth-child(2) { height: 68%; background: var(--gold); }
.brand-mark span:nth-child(3) { height: 88%; background: var(--teal); }

.brand-title {
  font-size: 16px;
  font-weight: 800;
  letter-spacing: 0;
  color: var(--green-900);
}

.brand-subtitle {
  color: #496253;
  font-size: 12px;
  font-weight: 650;
  margin-top: 1px;
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 14px 0;
}

.nav-item {
  position: relative;
  border: 0;
  background: transparent;
  text-align: left;
  color: #31523d;
  padding: 8px 11px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}

.nav-item:hover {
  background: #edf7f0;
}

.nav-item.active {
  background: var(--green-800);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(28, 90, 53, 0.14);
}

.nav-item.has-support-unread::after {
  content: attr(data-unread-count);
  position: absolute;
  top: 5px;
  right: 8px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(124, 20, 20, .22);
}

#support-admin.has-support-unread {
  position: relative;
  min-width: 188px;
  padding-right: 48px;
}

#support-admin.has-support-unread::after {
  content: attr(data-unread-count);
  position: absolute;
  top: 50%;
  right: 10px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border: 2px solid #ffffff;
  border-radius: 999px;
  background: #dc2626;
  color: #ffffff;
  font-size: 11px;
  font-weight: 900;
  line-height: 16px;
  text-align: center;
  transform: translateY(-50%);
  box-shadow: 0 2px 6px rgba(124, 20, 20, .22);
}

.sidebar-footer {
  margin-top: auto;
  display: grid;
  gap: 8px;
  padding: 12px 4px 0;
}

.guide-link,
.logout-btn,
.secondary-btn,
.primary-btn,
.icon-btn {
  border-radius: 6px;
  border: 1px solid var(--line-strong);
  min-height: 32px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
}

.guide-link,
.secondary-btn,
.icon-btn {
  background: linear-gradient(180deg, #f6fbf7, #e8f3eb);
  color: var(--green-900);
}

.logout-btn {
  background: #fff7f5;
  border-color: #e5b7b0;
  color: var(--danger);
}

.primary-btn {
  background: var(--green-800);
  color: #ffffff;
  border-color: var(--green-800);
}

.primary-btn.strong {
  background: #2f7c43;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--green-800);
  font-weight: 800;
  text-decoration: underline;
  padding: 0;
  min-height: 0;
}

.mock-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(20, 34, 26, .42);
}

.mock-modal {
  width: min(920px, 96vw);
  max-height: 86vh;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.mock-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-soft);
}

.mock-modal-head h2 {
  margin: 0;
  color: var(--green-900);
}

.mock-modal-body {
  max-height: calc(86vh - 66px);
  overflow: auto;
  padding: 14px 16px;
}

.mock-modal-body > div:not(.report-preview-frame):not(.patient-search-controls):not(.patient-search-results):not(.batch-search-controls):not(.batch-search-results):not(.specimen-search-controls):not(.specimen-search-results):not(.specimen-detail-card):not(.admin-user-form):not(.admin-reset-form):not(.admin-security-form):not(.session-expired-modal):not(.portal-notice-card):not(.profile-card):not(.order-entry-print-snapshot) {
  display: grid;
  grid-template-columns: minmax(150px, 240px) minmax(0, 1fr);
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.mock-modal-body span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.modal-table {
  width: 100%;
  border-collapse: collapse;
}

.modal-table th,
.modal-table td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.modal-table td:last-child {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.main {
  padding: 18px 24px 30px;
  min-width: 0;
  background: #e4f0e7;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.eyebrow {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .06em;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 2px;
  font-size: 24px;
  color: var(--green-900);
}

h2 {
  font-size: 16px;
  color: var(--green-900);
}

h3 {
  font-size: 13px;
}

p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.42;
  margin-top: 4px;
}

.topbar-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.location-chip,
.user-chip {
  display: grid;
  gap: 1px;
  min-width: 92px;
  border: 1px solid #c2d6c8;
  background: rgba(249, 252, 250, .92);
  border-radius: 7px;
  padding: 5px 10px 6px;
  box-shadow: 0 8px 18px rgba(18, 61, 36, .06);
}

.location-chip {
  min-width: 170px;
}

.location-chip span,
.user-chip span {
  color: #66766c;
  font-size: 9px;
  font-weight: 750;
  letter-spacing: .08em;
  line-height: 1;
  text-transform: uppercase;
}

.location-chip b,
.user-chip b {
  color: var(--green-900);
  font-size: 13px;
  font-weight: 760;
  line-height: 1.25;
}

.location-chip select {
  min-width: 210px;
  max-width: 320px;
  min-height: 28px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #ffffff;
  color: var(--green-900);
  font-size: 13px;
  font-weight: 800;
}

.inline-location-control {
  width: min(360px, 100%);
  margin-top: 10px;
}

.inline-location-control select {
  width: 100%;
}

.view {
  display: none;
}

.view.active {
  display: block;
}

.hero-panel,
.panel {
  background: #f3faf5;
  border: 1px solid #c4dacb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 16px;
}

.main-welcome-panel {
  margin-bottom: 12px;
  padding: 18px 20px;
  background: linear-gradient(180deg, #fbfefc, #eef8f1);
  border-color: #b8d5c0;
}

.main-welcome-panel h2 {
  margin: 0 0 10px;
  color: var(--green-900);
  font-size: 24px;
  letter-spacing: 0;
}

.main-welcome-panel .main-tabs {
  margin: 0 0 10px;
  padding-top: 10px;
  border-top: 1px solid #cfe3d4;
  color: var(--green-800);
  font-weight: 850;
}

.main-welcome-panel p {
  margin: 5px 0;
  color: #33443a;
  font-size: 15px;
}

.panel {
  padding: 15px;
}

.order-section-panel {
  padding: 0;
  overflow: hidden;
}

.order-section-panel > .form-grid,
.order-section-panel > .med-selector,
.order-section-panel > .field-hint,
.order-section-panel > .order-additional-meds,
.order-section-panel > .test-choice-section,
.order-section-panel > .attestation,
.order-section-panel > .order-summary,
.order-section-panel > .order-footer-actions,
.order-section-panel > label:not(.attestation) {
  margin-left: 15px;
  margin-right: 15px;
}

.order-section-panel > .section-band + .form-grid,
.order-section-panel > .section-band + .med-selector,
.order-section-panel > .section-band + .test-choice-section,
.order-section-panel > .section-band + label {
  margin-top: 14px;
}

.order-section-panel > :last-child {
  margin-bottom: 15px;
}


.panel::before,
.hero-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.panel,
.hero-panel {
  position: relative;
  overflow: hidden;
}

.panel > *,
.hero-panel > * {
  position: relative;
  z-index: 1;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 12px;
}

.main-welcome-panel {
  padding: 21px 24px;
}

.main-welcome-content {
  display: grid;
  grid-template-columns: minmax(360px, .9fr) minmax(500px, 1.1fr);
  align-items: center;
  gap: 34px;
}

.main-welcome-copy {
  min-width: 0;
}

.main-welcome-copy h2 {
  margin-bottom: 10px;
}

.main-welcome-logo {
  min-height: 126px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 30px;
  border: 1px solid #d7e8dc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .76), 0 6px 16px rgba(28, 86, 47, .08);
}

.main-welcome-logo img {
  display: block;
  width: min(100%, 660px);
  max-height: 112px;
  object-fit: contain;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.metric-card {
  background: #f8fcf9;
  border: 1px solid #c5ddcc;
  border-radius: 8px;
  padding: 13px 15px;
}

.metric-card-link {
  cursor: pointer;
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.metric-card-link:hover,
.metric-card-link:focus-visible {
  border-color: var(--green-700);
  box-shadow: 0 6px 14px rgba(45, 91, 49, 0.14);
  outline: none;
  transform: translateY(-1px);
}

.metric-label,
.metric-note {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.metric-card strong {
  display: block;
  font-size: 28px;
  color: var(--green-800);
  margin: 4px 0;
}

.split-grid,
.order-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.requisition-frame {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 12px;
  padding: 12px 14px;
  border: 1px solid #b9d5c0;
  border-left: 5px solid var(--green-700);
  border-radius: 7px;
  background: linear-gradient(180deg, #ffffff, #f5fbf6);
}

.requisition-frame h2 {
  margin: 2px 0 0;
  color: var(--green-900);
  font-size: 20px;
  letter-spacing: 0;
  text-transform: uppercase;
}

.requisition-kicker {
  color: #667768;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.requisition-frame address {
  display: grid;
  gap: 2px;
  min-width: min(390px, 42%);
  margin: 0;
  padding-left: 14px;
  border-left: 1px solid var(--line);
  color: #26382c;
  font-style: normal;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.3;
}

.requisition-frame address b {
  color: var(--green-900);
  font-size: 14px;
}

.order-print-logo {
  display: none;
}

.science-card {
  min-height: 112px;
  background: #f8fcf9;
}

.timeline {
  display: grid;
  gap: 4px;
  max-height: 360px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.timeline div {
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 8px;
  padding: 5px 8px;
  border: 1px solid #c4dacb;
  border-radius: 6px;
  background: #fbfdfb;
  font-size: 13px;
  line-height: 1.25;
}

.timeline b {
  color: var(--green-800);
  white-space: nowrap;
}

.timeline span {
  min-width: 0;
}

.timeline time {
  justify-self: end;
  color: #627268;
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}

@media (max-width: 720px) {
  .timeline div {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .timeline time {
    grid-column: 2;
  }
}

.page-layout {
  max-width: 1180px;
}

.form-panel {
  max-width: 980px;
}

.tab-row {
  display: flex;
  gap: 7px;
  margin: 4px 0 13px;
  border-bottom: 1px solid var(--line);
}

.tab-btn {
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 6px 6px 0 0;
  background: #edf7f0;
  color: var(--green-900);
  min-height: 32px;
  padding: 6px 13px;
  font-weight: 850;
}

.tab-btn.active {
  background: #ffffff;
  box-shadow: inset 0 3px 0 var(--green-700);
}

.patient-tab {
  display: none;
}

.patient-tab.active {
  display: block;
}

.insurance-note {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fcf9;
  color: var(--muted);
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 13px;
  font-weight: 650;
}

.form-grid {
  display: grid;
  gap: 11px;
}

.form-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.form-grid.compact {
  gap: 9px;
}

.wide {
  grid-column: span 2;
}

.full-row {
  grid-column: 1 / -1;
}

.field-hint {
  margin: -2px 0 0;
  color: #5f7165;
  font-size: 11.5px;
  font-weight: 650;
  line-height: 1.35;
}

.required-legend {
  margin: 3px 0 10px;
  color: #7b2f2f;
  font-size: 12px;
  font-weight: 800;
}

.required-field {
  display: block;
}

.required-field::before {
  content: "* ";
  color: var(--danger);
  font-weight: 900;
}

.validation-box {
  margin: 0 0 10px;
  padding: 10px 12px;
  border: 1px solid #d59a9a;
  border-radius: 7px;
  background: #fff6f6;
  color: #7b2f2f;
  font-size: 13px;
  font-weight: 700;
}

.validation-box ul {
  margin: 6px 0 0 18px;
  padding: 0;
}

label {
  display: block;
  color: #385341;
  font-size: 12px;
  font-weight: 750;
}

label input,
label select,
label textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
}

.inline-check {
  display: flex;
  align-items: center;
  align-self: end;
  gap: 8px;
  min-height: 34px;
  padding: 7px 0;
  color: #385341;
}

.inline-check input[type="checkbox"] {
  width: 15px;
  height: 15px;
  min-height: 15px;
  margin: 0;
  accent-color: var(--green-800);
}

.patient-active-check,
.order-new-patient-check {
  justify-content: flex-start;
}

input,
select,
textarea {
  width: 100%;
  min-height: 34px;
  border: 1px solid #b9cfc0;
  border-radius: 6px;
  padding: 7px 9px;
  background: linear-gradient(180deg, #ffffff, #f7fbf8);
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(39, 117, 69, .18);
  border-color: var(--green-700);
}

.button-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.button-row.tight {
  margin-top: 0;
}

.order-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  gap: 8px;
  padding: 12px;
  margin-bottom: 12px;
  background: #edf7f0;
  border: 1px solid #c4dacb;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.order-toolbar label {
  width: 210px;
}

.order-patient-tools {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  align-self: end;
}

.order-patient-tools button {
  min-height: 34px;
  padding-left: 8px;
  padding-right: 8px;
}

.med-selector {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) 78px minmax(0, .95fr);
  gap: 8px;
  align-items: stretch;
}

.med-search {
  grid-column: 1;
  width: 100%;
}

.no-meds-check {
  grid-column: 3;
  grid-row: 1;
  align-self: center;
  justify-self: start;
  min-height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfb;
  color: var(--green-900);
  font-weight: 750;
}

.no-meds-check input {
  margin-right: 7px;
}

.list-box,
.selected-meds {
  height: 154px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fbfdfb;
  overflow: auto;
}

.list-box {
  grid-column: 1;
  grid-row: 2;
}

.list-box div {
  padding: 5px 9px;
  border-bottom: 1px solid #edf2ee;
  font-size: 12.5px;
  line-height: 1.25;
  cursor: pointer;
}

.list-box div:nth-child(even) {
  background: #f4faf6;
}

.list-box div:hover,
.list-box div.selected,
.selected-meds span.selected {
  background: #e3f1e7;
  color: var(--green-900);
}

.med-actions {
  grid-column: 2;
  grid-row: 2;
  display: grid;
  align-content: center;
  gap: 6px;
}

.med-actions button,
.transfer-actions button {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #f8fbf9;
  color: var(--green-900);
  min-height: 32px;
  font-weight: 750;
}

.med-prior-hint {
  margin: 8px 0 0;
  max-width: 620px;
}

.selected-meds {
  grid-column: 3;
  grid-row: 2;
  padding: 7px;
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-content: start;
}

.selected-meds span,
.status {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-800);
  font-size: 12px;
  font-weight: 750;
  cursor: pointer;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.test-choice-section {
  display: grid;
  gap: 8px;
}

.test-choice-section + .test-choice-section {
  margin-top: 14px;
  padding-top: 13px;
  border-top: 1px solid #c9dfd0;
}

.test-choice-subhead {
  color: #164f2c;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .06em;
  text-transform: uppercase;
}


.choice {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff, #eff7f1);
  padding: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
}

.choice span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.choice b {
  color: var(--green-900);
}

.choice small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.25;
}

.choice em {
  display: -webkit-box;
  max-height: 58px;
  overflow: hidden;
  color: #486457;
  font-size: 11px;
  font-style: normal;
  font-weight: 600;
  line-height: 1.28;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  white-space: pre-line;
}

.choice.selected {
  border-color: #87b796;
  background: linear-gradient(180deg, #edf7f0, #dcefe3);
}

.choice.disabled,
.confirmation-panel.disabled {
  opacity: .56;
}

.choice.disabled {
  cursor: not-allowed;
}

.choice.disabled input,
.confirmation-panel.disabled input {
  cursor: not-allowed;
}

.test-panel {
  align-self: start;
}

.confirmation-panel {
  grid-column: 1 / -1;
  padding: 0;
  overflow: hidden;
  background: #f3faf5;
}

.confirm-tools {
  display: grid;
  grid-template-columns: minmax(240px, 360px) minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 16px 0;
  background: #f8fcf9;
}

.confirm-tools p {
  margin: 0;
  color: #5f7165;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
}

.confirm-search {
  min-height: 34px;
}

.section-band {
  min-height: 32px;
  display: grid;
  place-items: center;
  background:
    linear-gradient(90deg, rgba(255,255,255,.08), transparent 18%, rgba(255,255,255,.08) 82%, transparent),
    linear-gradient(180deg, #1d6670, #123d42);
  color: #ffffff;
  font-size: 13px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.confirmation-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
  padding: 12px 16px 16px;
  background: #f8fcf9;
}

.confirm-column {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 2px 8px 4px;
  border-radius: 6px;
}

.confirm-group {
  break-inside: avoid;
  padding: 1px 0;
}

.confirm-group h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: #0f6771;
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
  user-select: none;
}

.confirm-ungrouped {
  padding-top: 1px;
}

.confirm-continuation {
  margin-top: -2px;
}

.confirm-group label {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 20px;
  padding-left: 21px;
  color: #245460;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
}

.confirm-ungrouped label {
  padding-left: 0;
}

.confirm-continuation label {
  padding-left: 22px;
}

.confirm-group input,
.choice input,
.reporting input[type="checkbox"] {
  width: 13px;
  height: 13px;
  min-height: 13px;
  accent-color: var(--green-800);
  flex: 0 0 auto;
}

.order-footer-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 10px;
}

.attestation {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--green-900);
  font-size: 13px;
}

.attestation input {
  width: 14px;
  height: 14px;
  min-height: 14px;
  accent-color: var(--green-800);
  flex: 0 0 auto;
}

.order-summary {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
  min-height: 18px;
}

.order-footer-actions {
  justify-content: flex-end;
  margin-top: 4px;
}

.top-controls {
  max-width: 780px;
  margin-bottom: 14px;
}

.transfer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 90px minmax(0, 1fr);
  gap: 14px;
}

.transfer-list {
  border: 1px solid #c4dacb;
  border-radius: 8px;
  overflow: hidden;
  background: #fbfdfb;
  min-height: 236px;
}

.transfer-list h3 {
  display: flex;
  justify-content: space-between;
  background: linear-gradient(180deg, #1d5c68, #103f49);
  color: #ffffff;
  padding: 10px 12px;
  border-bottom: 1px solid #0b333b;
}

.transfer-list h3 span {
  color: #ffffff;
}

.transfer-row {
  padding: 10px 12px;
  border-bottom: 1px solid #edf2ee;
  font-size: 13px;
}

.transfer-row.selected {
  background: #e6f2ea;
  color: var(--green-900);
  font-weight: 750;
}

.transfer-actions {
  display: grid;
  align-content: center;
  gap: 9px;
}

.narrow-task {
  max-width: 640px;
}

.search-row {
  display: grid;
  grid-template-columns: minmax(180px, 300px) minmax(190px, 1fr) 112px 150px;
  gap: 9px;
  align-items: end;
  margin-top: 18px;
}

.selection-hint {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef7f1;
  color: var(--green-900);
  font-size: 13px;
  font-weight: 700;
  padding: 8px 10px;
}

.filter-bar {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 9px;
  padding: 12px;
  border: 1px solid var(--line);
  background: var(--surface-soft);
  border-radius: 8px;
  margin-bottom: 12px;
}

.compact-filter {
  grid-template-columns: 220px;
}

.inline-filter {
  width: 220px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid #c4dacb;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: #f8fcf9;
  min-width: 860px;
}

th,
td {
  border-bottom: 1px solid #e4eee7;
  padding: 7px 9px;
  text-align: left;
  font-size: 12.5px;
  vertical-align: middle;
}

th {
  position: sticky;
  top: 0;
  background: linear-gradient(180deg, #2f6d3a, #174c26);
  color: #ffffff;
  font-size: 12px;
  font-weight: 850;
  z-index: 1;
}

.table-control-head {
  min-width: 112px;
  vertical-align: top;
}

.table-sort {
  width: 100%;
  min-height: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  background: transparent;
  color: inherit;
  padding: 0;
  text-align: left;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: none;
}

.table-sort:disabled {
  cursor: default;
  opacity: .78;
}

tbody tr:nth-child(even) td {
  background: #edf6ef;
}

tbody tr:nth-child(odd) td {
  background: #fbfdfb;
}

tbody tr:hover td {
  background: #dfeee4;
}

tbody tr.support-unread-row td,
tbody tr.support-unread-row:nth-child(even) td,
tbody tr.support-unread-row:nth-child(odd) td {
  background: #fff7cc;
  font-weight: 850;
}

tbody tr.support-unread-row:hover td {
  background: #ffef9e;
}

#inquiry .table-wrap,
#reporting .table-wrap,
#pending .table-wrap {
  max-height: 590px;
  overflow: auto;
}

.table-pager {
  position: sticky;
  left: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 9px 0 0;
  color: #31523a;
  font-size: 12px;
  font-weight: 750;
}

.table-pager .secondary-btn {
  min-height: 30px;
  padding: 6px 11px;
  font-size: 12px;
}

.col-sel {
  width: 42px;
  min-width: 42px;
  max-width: 42px;
  text-align: center;
}

.col-location,
.col-puid,
.col-dob {
  width: 86px;
  min-width: 76px;
  white-space: nowrap;
}

.col-lab,
.col-req {
  width: 112px;
  white-space: nowrap;
}

.col-report {
  min-width: 190px;
  white-space: nowrap;
}

#reporting .button-row .secondary-btn,
#reporting .button-row .primary-btn {
  min-height: 28px;
  padding: 4px 9px;
  font-size: 12px;
}

#reporting .table-wrap input[type="checkbox"] {
  width: 14px;
  height: 14px;
  min-height: 14px;
}

#reporting th:first-child,
#reporting td:first-child {
  width: 42px;
  text-align: center;
  padding-left: 6px;
  padding-right: 6px;
}

td a {
  color: var(--green-800);
  font-weight: 800;
  text-decoration: none;
}

.status.pending {
  color: #8a5c00;
  background: #fff4d8;
}

.status.ready {
  color: #0f6771;
  background: #dff3f4;
}

.mock-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(15, 35, 22, .42);
}

.mock-modal {
  width: min(1120px, 94vw);
  max-height: 88vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: #f8fcf9;
  border: 1px solid #a6c7ad;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(14, 35, 22, .28);
}

.mock-modal-head,
.mock-modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
}

.mock-modal-head h2 {
  color: var(--green-900);
  font-size: 18px;
}

.mock-modal-actions {
  justify-content: flex-end;
  border-top: 1px solid var(--line);
  border-bottom: 0;
}

.mock-modal-body {
  overflow: auto;
  padding: 16px;
}

.mock-modal-body > div:not(.choice-list):not(.report-action-card):not(.report-preview-frame):not(.support-edit-grid):not(.policy-notice):not(.patient-search-controls):not(.patient-search-results):not(.batch-search-controls):not(.batch-search-results):not(.specimen-search-controls):not(.specimen-search-results):not(.specimen-detail-card):not(.admin-user-form):not(.admin-reset-form):not(.admin-security-form):not(.session-expired-modal):not(.portal-notice-card):not(.profile-card):not(.order-entry-print-snapshot) {
  display: grid;
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0;
  border-bottom: 1px solid #e4eee7;
}

.mock-modal-body span {
  overflow-wrap: anywhere;
}

.choice-list {
  display: grid;
  gap: 7px;
}

.choice-row {
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr) 120px;
  gap: 12px;
  min-height: 38px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
}

.choice-row:hover {
  background: #e8f3eb;
}

.report-action-card,
.support-edit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
}

.policy-notice {
  display: flex !important;
  align-items: center;
  justify-content: center;
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #edf7f0);
  padding: 22px 26px;
  max-width: 560px;
  margin: 6px auto 8px;
  text-align: center;
}

.policy-notice p {
  max-width: 500px;
  margin: 0 auto;
  color: #274733;
  font-size: 17px;
  line-height: 1.55;
  text-align: center;
}

.mock-modal:has(.policy-notice) {
  width: min(620px, 92vw);
}

.portal-message-modal {
  width: min(620px, 92vw);
}

.mock-modal:has(.policy-notice) .mock-modal-body {
  padding: 16px;
}

.portal-message-modal .mock-modal-body {
  padding: 18px 22px;
}

.portal-message-modal .mock-modal-actions {
  justify-content: center;
  padding: 14px 22px 20px;
}

.portal-notice-modal {
  width: min(500px, calc(100vw - 48px));
  border-color: #91bcb0;
  background: #fbfdfb;
}

.portal-notice-modal .mock-modal-head {
  padding: 14px 18px;
  border-bottom: 0;
  background: linear-gradient(135deg, #0f5f59, #237343);
  color: #ffffff;
}

.portal-notice-modal .mock-modal-head h2 {
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 0;
}

.portal-notice-modal .mock-modal-head button {
  border-color: rgba(255, 255, 255, .58);
  background: rgba(255, 255, 255, .14);
  color: #ffffff;
}

.portal-notice-modal .mock-modal-head button:hover {
  background: rgba(255, 255, 255, .22);
}

.portal-notice-modal .mock-modal-body {
  padding: 24px 26px 18px;
}

.portal-notice-modal .mock-modal-actions {
  justify-content: center;
  padding: 14px 26px 24px;
  border-top: 1px solid #d9e8df;
  background: #f7fbf8;
}

.portal-notice-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 15px;
  padding: 18px 20px;
  border: 1px solid #c8ded0;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 14px 30px rgba(15, 95, 89, .08);
}

.portal-notice-icon {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid #247345;
  border-radius: 50%;
  background: #edf8f0;
  color: #145c35;
  font-size: 23px;
  font-weight: 950;
  font-family: Georgia, serif;
  line-height: 1;
}

.portal-notice-copy {
  min-width: 0;
}

.portal-notice-copy h3 {
  margin: 0 0 5px;
  color: #113f27;
  font-size: 18px;
  font-weight: 950;
  letter-spacing: 0;
}

.portal-notice-copy p {
  margin: 0;
  color: #31473a;
  font-size: 15px;
  line-height: 1.45;
}

.portal-notice-ok {
  min-width: 126px;
}

.report-action-card > div,
.ticket-readonly {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  padding: 9px 10px;
}

.mock-modal-body > .report-preview-frame,
.report-preview-frame {
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding: 0;
  border-bottom: 0;
  margin-top: 10px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  overflow: hidden;
  background: #f3f4f6;
  min-height: 0;
}

.report-preview-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #ffffff;
}

.mock-modal:has(.report-preview-frame) {
  width: min(1060px, 94vw);
  height: 96vh;
  max-height: 96vh;
}

.mock-modal:has(.report-preview-frame) .mock-modal-body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  overflow: hidden;
  padding: 12px 16px;
}

.report-action-card b,
.ticket-readonly b {
  display: block;
  color: var(--green-900);
  font-size: 11px;
  text-transform: uppercase;
}

.support-chat > span {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.support-chat-message {
  display: block;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #f8fafc;
  padding: 8px;
}

.support-chat-message.admin {
  border-color: #86efac;
  background: #ecfdf5;
}

.modal-table {
  width: 100%;
  min-width: 760px;
}

.patient-search-controls,
.batch-search-controls,
.specimen-search-controls {
  display: grid;
  grid-template-columns: 190px minmax(220px, 1fr) minmax(220px, max-content) auto;
  gap: 10px;
  align-items: end;
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.specimen-search-controls {
  grid-template-columns: minmax(170px, 240px) minmax(220px, 1fr) minmax(220px, max-content) 112px;
}

.specimen-search-controls.has-location {
  grid-template-columns: minmax(150px, 210px) minmax(150px, 210px) minmax(190px, 1fr) minmax(220px, max-content) 112px;
}

.specimen-search-controls #specimen-search-run {
  width: 112px;
  min-width: 112px;
  padding-left: 12px;
  padding-right: 12px;
}

.patient-search-controls label,
.batch-search-controls label,
.specimen-search-controls label {
  display: grid;
  gap: 4px;
  color: var(--green-900);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.patient-search-controls .inline-check,
.batch-search-controls .inline-check,
.specimen-search-controls .inline-check {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  color: var(--text);
  font-size: 13px;
  font-weight: 850;
  text-transform: none;
}

.patient-search-controls .search-mode-group,
.batch-search-controls .search-mode-group,
.specimen-search-controls .search-mode-group {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  min-height: 38px;
  width: max-content;
  min-width: 220px;
  box-sizing: border-box;
  padding: 4px 10px;
  border: 1px solid #b6c9bb;
  border-radius: 6px;
  background: linear-gradient(180deg, #ffffff 0%, #f6fbf7 100%);
}

.patient-search-controls input,
.patient-search-controls select,
.batch-search-controls input,
.batch-search-controls select,
.specimen-search-controls input,
.specimen-search-controls select {
  width: 100%;
  border: 1px solid #b6c9bb;
  border-radius: 6px;
  padding: 9px 10px;
  background: #fff;
}

.patient-search-controls input[type="radio"],
.batch-search-controls input[type="radio"],
.specimen-search-controls input[type="radio"] {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
  margin: 0;
  accent-color: var(--green-800);
}

@media (max-width: 900px) {
  .patient-search-controls,
  .batch-search-controls,
  .specimen-search-controls,
  .specimen-search-controls.has-location {
    grid-template-columns: 1fr;
  }

  .patient-search-controls .search-mode-group,
  .batch-search-controls .search-mode-group,
  .specimen-search-controls .search-mode-group {
    width: 100%;
  }
}

.patient-search-table thead th {
  background: linear-gradient(180deg, #1d5c68, #103f49);
  color: #ffffff;
  border-color: #0b333b;
}

.patient-search-sort {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-weight: 900;
  text-align: left;
  cursor: pointer;
  padding: 0;
}

.patient-search-sort:hover {
  text-decoration: underline;
}

.patient-search-results,
.batch-search-results,
.specimen-search-results {
  max-height: 430px;
  overflow: auto;
  padding-top: 12px;
}

.specimen-search-results {
  min-height: 430px;
}

.specimen-search-loading {
  min-height: 390px;
  display: grid;
  align-items: center;
}

.specimen-search-pager {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  padding: 0 0 8px;
}

.specimen-search-pager span {
  color: var(--muted);
  font-weight: 800;
  margin-right: auto;
}

.specimen-search-pager button {
  min-width: 82px;
  padding: 7px 10px;
}

.specimen-search-table {
  min-width: 1040px;
}

.specimen-search-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: var(--green-800);
}

.specimen-search-table th:last-child,
.specimen-search-table td:last-child {
  min-width: 240px;
  width: 30%;
}

.link-btn {
  border: 0;
  background: transparent;
  color: var(--green-900);
  font-weight: 800;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.admin-support-tools {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 12px;
}

.admin-support-tools label {
  width: 240px;
}

.admin-support-table {
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-dashboard {
  display: grid;
  gap: 12px;
}

.admin-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.admin-metrics div {
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: #f8fcf9;
  padding: 10px 12px;
}

.admin-metrics b {
  display: block;
  color: var(--green-800);
  font-size: 24px;
  line-height: 1.1;
}

.admin-metrics span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.admin-card {
  min-width: 0;
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: #fbfdfb;
  overflow: hidden;
}

.admin-card.wide-card {
  grid-column: 1 / -1;
}

.admin-card h3 {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #eef7f1;
  color: var(--green-900);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: .03em;
}

.admin-table-wrap {
  max-height: 260px;
  overflow: auto;
}

.admin-table-wrap.tall {
  max-height: 380px;
}

.admin-table-wrap table {
  min-width: 720px;
  background: #ffffff;
}

.admin-table-wrap th,
.admin-table-wrap td {
  font-size: 12px;
  line-height: 1.3;
}

.admin-table-wrap td:nth-child(4) {
  max-width: 520px;
  overflow-wrap: anywhere;
}

.admin-users-panel .panel-head {
  align-items: center;
}

.admin-users-table-wrap {
  max-height: 560px;
  overflow: auto;
}

.admin-users-table-wrap table {
  min-width: 980px;
}

.admin-users-table-wrap th,
.admin-users-table-wrap td {
  font-size: 12px;
  line-height: 1.25;
  vertical-align: middle;
}

.admin-diagnosis-section {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 2px solid var(--line);
}

.admin-subhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.admin-subhead h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 17px;
}

.admin-subhead p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.admin-diagnosis-table-wrap {
  max-height: 360px;
  overflow: auto;
}

.admin-diagnosis-table-wrap table {
  min-width: 860px;
}

.admin-diagnosis-table-wrap th,
.admin-diagnosis-table-wrap td {
  font-size: 12px;
  line-height: 1.3;
  vertical-align: middle;
}

.admin-diagnosis-form {
  display: grid;
  grid-template-columns: minmax(150px, .75fr) minmax(280px, 1.5fr);
  gap: 14px;
  align-items: end;
}

.admin-diagnosis-form .wide {
  grid-column: 1 / -1;
}

.admin-diagnosis-form .checkbox-line {
  min-height: 38px;
}

.admin-email-cell {
  min-width: 220px;
  overflow-wrap: anywhere;
}

.admin-user-actions {
  white-space: nowrap;
}

.compact-btn {
  padding: 6px 10px;
  min-height: 30px;
  font-size: 11px;
  letter-spacing: .02em;
}

.admin-user-form,
.admin-reset-form,
.admin-security-form {
  display: grid;
  gap: 12px;
}

.mock-modal .mock-modal-body > .admin-user-form,
.mock-modal .mock-modal-body > .admin-reset-form,
.mock-modal .mock-modal-body > .admin-security-form {
  display: grid !important;
  grid-template-columns: 1fr !important;
  padding: 14px 0 0;
  border-bottom: 0;
}

.admin-user-fields {
  display: grid;
  grid-template-columns: minmax(140px, .8fr) minmax(260px, 1.45fr) minmax(150px, .85fr);
  gap: 12px;
  align-items: end;
}

.admin-user-fields label {
  min-width: 0;
}

.admin-user-fields input,
.admin-user-fields select {
  width: 100%;
}

.admin-user-email-field {
  grid-column: span 1;
}

.admin-user-form .form-grid.compact,
.admin-reset-form.form-grid.compact {
  gap: 10px;
}

.admin-welcome {
  align-self: end;
  min-height: 38px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #23482d;
  font-size: 12px;
  font-weight: 800;
}

.checkbox-line input[type="checkbox"] {
  width: 14px;
  height: 14px;
  accent-color: var(--green-800);
}

.admin-locations-block {
  display: grid;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfdfb;
}

.admin-locations-block > b {
  color: var(--green-900);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.admin-location-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(240px, 1fr));
  gap: 10px 18px;
}

.form-note {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.mock-modal:has(.admin-user-form) {
  max-width: min(1120px, calc(100vw - 64px));
}

.mock-modal:has(.admin-reset-form) {
  max-width: min(820px, calc(100vw - 64px));
}

.mock-modal:has(.admin-security-form) {
  max-width: min(860px, calc(100vw - 64px));
}

.security-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 1fr));
  gap: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdfb;
  padding: 12px;
  color: var(--text);
  font-size: 13px;
}

.security-summary b {
  color: var(--green-900);
}

.danger-text {
  color: #9f1239 !important;
}

.security-device-list {
  display: grid;
  gap: 8px;
}

.security-device-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #d4e5d5;
  border-radius: 8px;
  background: #ffffff;
  padding: 10px 12px;
}

.security-device-row > div:first-child {
  display: grid;
  gap: 2px;
  font-size: 12px;
  color: var(--muted);
}

.security-device-row b {
  color: var(--green-900);
  font-size: 13px;
}

.security-device-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}

.security-pending-note {
  color: #92400e;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.danger-btn {
  border: 1px solid #b91c1c;
  background: #b91c1c;
  color: #ffffff;
  border-radius: 6px;
  font-weight: 900;
  cursor: pointer;
}

.user-guide-view {
  min-height: calc(100vh - 96px);
}

.user-guide-view iframe {
  width: 100%;
  height: min(980px, calc(100vh - 190px));
  min-height: 620px;
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: #ffffff;
}

.mock-modal:has(.session-expired-modal) {
  max-width: min(520px, calc(100vw - 48px));
  overflow: hidden;
  border-color: #8bb9b4;
}

.mock-modal:has(.session-expired-modal) .mock-modal-head {
  background: linear-gradient(135deg, #0f5f59, #1f6f4a);
  border-bottom: 0;
  color: #ffffff;
  padding: 16px 18px;
}

.mock-modal:has(.session-expired-modal) .mock-modal-head h2 {
  color: #ffffff;
  font-size: 18px;
  letter-spacing: 0;
}

.mock-modal:has(.session-expired-modal) .mock-modal-head button {
  border-color: rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.14);
  color: #ffffff;
}

.mock-modal:has(.session-expired-modal) .mock-modal-head button:hover {
  background: rgba(255, 255, 255, 0.22);
}

.mock-modal:has(.session-expired-modal) .mock-modal-body {
  padding: 26px 28px 18px;
}

.mock-modal:has(.session-expired-modal) .mock-modal-actions {
  justify-content: center;
  border-top: 1px solid #d7e7dd;
  background: #f7fbf8;
  padding: 16px 28px 24px;
}

.session-expired-modal {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  border: 1px solid #c7ddd1;
  border-radius: 8px;
  background: #ffffff;
  padding: 22px 24px;
  text-align: left;
  box-shadow: 0 14px 30px rgba(15, 95, 89, 0.08);
}

.session-expired-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid #c58a1d;
  background: #fff8e8;
  color: #8a5a00;
  font-size: 24px;
  font-weight: 900;
}

.session-expired-copy {
  min-width: 0;
}

.session-expired-modal h3 {
  margin: 0;
  color: var(--green-900);
  font-size: 20px;
  line-height: 1.25;
}

.session-expired-modal p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.5;
}

.session-refresh-btn {
  min-width: 164px;
}

.empty-state {
  max-width: 620px;
  text-align: center;
  padding: 42px 32px;
}

.empty-icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 12px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #edf7f0;
  color: var(--green-800);
  font-size: 26px;
}

@media (max-width: 980px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  .nav-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .main {
    padding: 18px;
  }

  .main-welcome-content {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .main-welcome-logo {
    min-height: 100px;
    justify-content: flex-start;
    padding: 10px 18px;
  }

  .main-welcome-logo img {
    width: min(100%, 440px);
    max-height: 84px;
  }

  .dashboard-grid,
  .split-grid,
  .order-grid,
  .form-grid.two,
  .form-grid.three,
  .filter-bar,
  .transfer-grid,
  .search-row,
  .confirm-tools {
    grid-template-columns: 1fr;
  }

  .requisition-frame {
    display: grid;
  }

  .requisition-frame address {
    min-width: 0;
    padding-left: 0;
    padding-top: 10px;
    border-left: 0;
    border-top: 1px solid var(--line);
  }

  .wide,
  .full-row {
    grid-column: auto;
  }

  .admin-subhead {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-diagnosis-form {
    grid-template-columns: 1fr;
  }

  .admin-diagnosis-form .wide {
    grid-column: auto;
  }
}

.label-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 650;
}

.auto-id-input,
input[readonly].auto-id-input {
  color: #6d7a70;
  background: #eef4f0;
}

.client-status {
  border-radius: 5px;
}

.user-chip-button {
  cursor: pointer;
  text-align: left;
}

.user-chip-button:hover,
.user-chip-button:focus-visible {
  border-color: var(--green-700);
  box-shadow: 0 6px 14px rgba(45, 91, 49, 0.14);
  outline: none;
}

.specimen-detail-card {
  display: grid;
  gap: 14px;
}

.specimen-detail-status {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, #edf7f0);
  padding: 12px 14px;
}

.specimen-detail-status strong {
  color: var(--green-900);
  font-size: 20px;
}

.specimen-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.specimen-detail-grid > div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #ffffff;
  padding: 9px 10px;
}

.specimen-detail-grid b {
  display: block;
  color: #516154;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.specimen-detail-grid span {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 14px;
  overflow-wrap: anywhere;
}

.specimen-detail-wide {
  grid-column: 1 / -1;
}


.specimen-detail-modal .mock-modal-head {
  background: linear-gradient(180deg, #2f6d3a, #174c26);
  border-bottom-color: #123b1e;
}

.specimen-detail-modal .mock-modal-head h2,
.specimen-detail-modal .mock-modal-head button {
  color: #ffffff;
}

.specimen-detail-modal .mock-modal-head button {
  border-color: rgba(255, 255, 255, .55);
  background: rgba(255, 255, 255, .12);
}

.specimen-detail-modal .mock-modal-body {
  padding: 14px 16px 16px;
}

.specimen-detail-modal .specimen-detail-card {
  display: block;
  grid-template-columns: none;
  gap: 0;
  padding: 0;
  border-bottom: 0;
}

.specimen-detail-status-cell,
.specimen-detail-policy-cell {
  align-self: stretch;
}

.specimen-detail-status-cell span {
  display: inline-flex;
  width: fit-content;
  border-radius: 5px;
  background: #e5f3e8;
  color: #1d6031;
  font-weight: 850;
  padding: 4px 8px;
}

.specimen-detail-policy-cell {
  grid-column: span 2;
}

.profile-card {
  display: grid;
  gap: 12px;
}

.profile-summary-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: #c4dacb;
}

.profile-readonly {
  min-height: 52px;
  background: #fbfdfb;
  padding: 8px 10px;
}

.profile-readonly b {
  display: block;
  color: #435b48;
  font-size: 9.5px;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.profile-readonly span {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 13px;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.profile-wide {
  grid-column: span 2;
}

.profile-edit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding-top: 4px;
  border-top: 1px solid var(--line);
}

.profile-edit-grid label {
  display: grid;
  gap: 4px;
  color: #35533b;
  font-size: 12px;
  font-weight: 800;
}

.sort-arrow {
  min-width: 1.1em;
  display: inline-block;
  text-align: center;
  font-size: 11px;
  line-height: 1;
}

.print-card {
  display: grid;
  gap: 10px;
}

.compact-print-head {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 18px;
  margin-bottom: 2px;
}

.print-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 28px;
  align-items: flex-start;
  margin-bottom: 8px;
}

.print-field {
  display: flex;
  align-items: baseline;
  gap: 3px;
  white-space: nowrap;
}

.print-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.print-table th,
.print-table td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.print-table th {
  background: var(--green-100);
  color: var(--green-950);
  font-weight: 850;
}

.mock-modal:has(.print-card) {
  width: min(1120px, 92vw);
}

.mock-modal:has(.print-card) .mock-modal-body {
  padding: 14px 16px;
}

.mock-modal:has(.label-preview-modal) {
  width: min(880px, 94vw);
}

.mock-modal-body > div.label-preview-modal {
  display: grid;
  grid-template-columns: minmax(160px, 210px) minmax(0, 1fr);
  align-items: start;
  gap: 14px;
  padding: 7px 0;
  border-bottom: 0;
}

.label-preview-controls {
  display: grid;
  gap: 10px;
  align-content: start;
}

.label-preview-controls label {
  display: grid;
  gap: 6px;
  color: var(--green-900);
  font-size: 12px;
  font-weight: 850;
}

.label-preview-controls input {
  min-height: 34px;
  padding: 8px 10px;
  border: 1px solid #a8c7ad;
  border-radius: 6px;
  background: #fdfefd;
  color: var(--green-950);
  font-weight: 800;
}

.label-preview-cards {
  display: grid;
  gap: 14px;
  justify-content: start;
  min-width: 0;
}

.lims-label-preview {
  width: 5in;
  height: 1.5in;
  box-sizing: border-box;
  padding: .07in .12in;
  overflow: hidden;
  border: 1px dashed #1b5e20;
  border-radius: 0;
  background: #fff;
  color: #111;
  font-family: "Courier New", monospace;
}

.lims-label-specimen {
  font-size: 28px;
  line-height: 30px;
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
}

.lims-label-patient-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content;
  align-items: baseline;
  gap: .16in;
  white-space: nowrap;
  font-size: 18px;
  line-height: 22px;
  font-weight: 800;
}

.lims-label-patient-row span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
}

.lims-label-dob {
  margin-left: .08in;
}

.lims-label-date-row {
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: baseline;
  gap: .35in;
  white-space: nowrap;
  font-size: 16px;
  line-height: 20px;
  font-weight: 800;
}

.lims-label-barcode {
  width: 3.4in;
  height: .36in;
  margin-top: .01in;
}

.lims-barcode-svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 720px) {
  .mock-modal-body > div.label-preview-modal {
    grid-template-columns: 1fr;
  }

  .label-preview-cards {
    overflow-x: auto;
  }
}

.mock-modal:has(.order-entry-print-snapshot) {
  width: min(1840px, 98vw);
  max-height: 92vh;
}

.mock-modal:has(.order-entry-print-snapshot) .mock-modal-body {
  max-height: calc(92vh - 132px);
  padding: 10px 12px;
  background: #f5fbf6;
}

.mock-modal:has(.order-entry-print-snapshot) .mock-modal-actions {
  padding: 10px 14px;
}

.order-entry-print-snapshot {
  display: block !important;
  width: 100%;
  padding: 0 !important;
  border-bottom: 0 !important;
}

.order-entry-print-snapshot .view {
  display: block;
  padding: 0;
}

.order-entry-print-snapshot .order-toolbar {
  display: none;
}

.order-entry-print-snapshot .required-legend {
  display: none !important;
}

.order-entry-print-snapshot .order-print-requisition-frame {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(460px, 46%);
  grid-template-areas:
    "lab lab"
    "title logo"
    "practice logo";
  align-items: center;
  gap: 5px 22px;
  min-height: 144px;
}

.order-entry-print-snapshot .order-print-lab-number {
  grid-area: lab;
  color: #12301b;
  font-size: 24px;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
}

.order-entry-print-snapshot .order-print-requisition-title {
  grid-area: title;
}

.order-entry-print-snapshot .order-print-practice-card {
  grid-area: practice;
  min-width: 0;
  padding-left: 0;
  border-left: 0;
}

.order-entry-print-snapshot .order-print-logo {
  display: block;
  grid-area: logo;
  justify-self: center;
  width: min(430px, 96%);
  max-height: 128px;
  object-fit: contain;
}

.order-entry-print-snapshot .panel {
  box-shadow: none;
}

.order-entry-print-snapshot button,
.order-entry-print-snapshot .order-patient-tools {
  display: none !important;
}

.order-requisition-preview {
  border: 1px solid #c4dacb;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.order-requisition-preview .print-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 3px solid var(--green-700);
  padding-bottom: 10px;
  margin-bottom: 14px;
}

.order-requisition-preview .print-title {
  color: var(--green-900);
  font-size: 20px;
  font-weight: 900;
}

.order-requisition-preview .print-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.order-requisition-preview .print-field {
  display: block;
  min-height: 52px;
  border: 1px solid #c4dacb;
  border-radius: 6px;
  padding: 8px 10px;
  background: #fbfdfb;
  white-space: normal;
}

.order-requisition-preview .print-field b {
  display: block;
  color: #45614c;
  font-size: 11px;
  text-transform: uppercase;
  margin-bottom: 3px;
}

.order-requisition-preview .requisition-print-head {
  align-items: flex-start;
}

.order-requisition-preview .requisition-kicker {
  display: block;
  margin-top: 3px;
}

.order-requisition-preview .requisition-practice {
  min-width: 300px;
  max-width: 44%;
  border-left: 1px solid var(--line);
  padding-left: 14px;
  color: #26382c;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
}

.order-requisition-preview .requisition-practice b {
  display: block;
  color: var(--green-900);
  font-size: 14px;
}

.order-requisition-preview .print-section {
  margin-top: 14px;
}

.order-requisition-preview .print-section h3 {
  margin: 0 0 9px;
  padding: 7px 10px;
  border-radius: 5px 5px 0 0;
  background: linear-gradient(180deg, #2f6b38, #1e542a);
  color: #ffffff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.order-requisition-preview .print-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-requisition-preview .print-check {
  color: var(--green-800);
  font-weight: 900;
  margin-right: 5px;
}


/* Format-only polish pass: tighten spacing and make operational views read consistently. */
.panel,
.hero-panel {
  box-shadow: 0 14px 36px rgba(18, 61, 36, 0.08);
}

.panel-head {
  align-items: flex-start;
  min-height: 34px;
}

.panel-head p {
  max-width: 660px;
  margin-top: 0;
  color: #52665a;
}

.panel-head > div:last-child:not(:first-child) {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.main-welcome-panel {
  padding: 15px 17px;
}

.main-welcome-panel h2 {
  margin-bottom: 0;
  font-size: 22px;
}

.metric-card {
  min-height: 86px;
  display: grid;
  align-content: center;
}

.metric-card strong {
  line-height: 1;
}

.filter-bar {
  align-items: end;
}

#inquiry .filter-bar,
#reporting .filter-bar,
#pending .filter-bar {
  margin-bottom: 10px;
}

#inquiry .filter-bar {
  grid-template-columns: repeat(7, minmax(116px, 1fr));
}

.inquiry-reviewed-check {
  white-space: nowrap;
}

.reviewed-cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #164f25;
  font-weight: 800;
  white-space: nowrap;
}

.reviewed-check {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #e4f3e7;
  color: #1f6b31;
  font-size: 12px;
  line-height: 1;
}

.table-wrap {
  background: #f8fcf9;
}

th,
td {
  line-height: 1.25;
}

.table-control-head {
  min-width: auto;
}

.table-sort {
  min-height: 20px;
}

.status {
  max-width: 180px;
  border-radius: 6px;
  line-height: 1.18;
  white-space: normal;
  cursor: default;
}

.selected-meds span {
  cursor: pointer;
}

#pending .status,
#reporting .status {
  max-width: 160px;
}

input[type="file"] {
  min-height: 34px;
  padding: 4px;
  background: #ffffff;
}

input[type="file"]::file-selector-button {
  min-height: 25px;
  margin-right: 10px;
  border: 1px solid #b9cfc0;
  border-radius: 5px;
  background: linear-gradient(180deg, #f6fbf7, #e8f3eb);
  color: var(--green-900);
  font-weight: 800;
}

#support .support-layout {
  display: grid;
  gap: 12px;
}

#support .form-grid.two.compact {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 10px 12px;
}

#support textarea {
  min-height: 108px;
}

#support .button-row {
  margin-top: 4px;
}

.mock-modal:has(.profile-card) {
  width: min(860px, 94vw);
}

.mock-modal:has(.profile-card) .mock-modal-body {
  padding: 14px 16px 16px;
}

.profile-summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(152px, 1fr));
}

.profile-readonly {
  min-height: 52px;
  overflow: visible;
}

.profile-wide {
  grid-column: span 2;
}

.profile-edit-grid {
  grid-template-columns: minmax(260px, 1.25fr) minmax(170px, 1fr) minmax(170px, 1fr);
  gap: 10px;
}

.profile-edit-grid input {
  min-height: 32px;
}

.narrow-task {
  max-width: 680px;
}

@media (max-width: 980px) {
  .profile-summary-grid,
  .profile-edit-grid,
  #support .form-grid.two.compact {
    grid-template-columns: 1fr;
  }

  .profile-wide {
    grid-column: auto;
  }
}

/* Portal layout polish: support form row, highlighted New Order, balanced batch transfer columns. */
#order-new,
#order-patient-search {
  background: linear-gradient(180deg, #fff7c8, #f3df8d);
  border-color: #d2ad35;
  color: #443205;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
}

#order-new:hover,
#order-new:focus-visible,
#order-patient-search:hover,
#order-patient-search:focus-visible {
  background: linear-gradient(180deg, #fff2a5, #edcf65);
  border-color: #bb9419;
}

#batch .transfer-grid {
  grid-template-columns: minmax(0, 1fr) 92px minmax(0, 1fr);
  align-items: stretch;
  column-gap: 18px;
}

#batch .transfer-list {
  width: 100%;
  min-width: 0;
}

#batch .transfer-actions {
  justify-items: center;
  align-content: center;
}

#batch .transfer-actions button {
  width: 70px;
  min-width: 70px;
}
