/* Operational HMS styles are confined to the additive workspace. */
.hms{--hms-ink:#123443;--hms-muted:#607583;--hms-teal:#087e83;color:var(--hms-ink);max-width:1400px;margin:0 auto;padding:8px;min-width:0}
.hms *{box-sizing:border-box}.hms h1{font-size:clamp(26px,3vw,38px);line-height:1.15;letter-spacing:-1px;margin:12px 0}.hms h2{font-size:21px;margin:0 0 12px}.hms h3{font-size:17px;margin:0 0 8px}.hms p{line-height:1.6;color:var(--hms-muted);margin:8px 0}.hms small{color:var(--hms-muted);line-height:1.5}.hms-kicker{font-size:11px;font-weight:750;letter-spacing:1.6px;color:var(--hms-teal);text-transform:uppercase}.hms-header{display:flex;justify-content:space-between;gap:20px;align-items:center;margin:6px 0 26px}.hms-header p{max-width:680px}.hms-panel{background:#fff;border:1px solid #e0eaed;border-radius:22px;padding:26px;margin:18px 0;box-shadow:0 8px 30px #12344305;min-width:0}.hms-panel.accent{background:linear-gradient(125deg,#eaf7f5,#f4fafc);border-color:#cce4e2}.hms-actions{display:flex;flex-wrap:wrap;gap:10px;align-items:center}.hms button,.hms-btn{appearance:none;border:1px solid #cfdee3;border-radius:11px;min-height:44px;padding:11px 17px;background:#fff;color:#174454;font:inherit;font-size:13px;font-weight:650;cursor:pointer}.hms button.primary{background:#087e83;color:white;border-color:#087e83;box-shadow:0 5px 12px #087e8315}.hms button:disabled{opacity:.5;cursor:wait}.hms button:hover:not(:disabled){filter:brightness(.96)}.hms :is(button,input,select,textarea):focus-visible{outline:3px solid #57b9cf;outline-offset:3px}.hms label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:650;color:#284b5a;min-width:0}.hms input,.hms textarea,.hms select{width:100%;min-width:0;min-height:46px;border:1px solid #cbdae0;border-radius:10px;background:#fcfefe;color:#123443;padding:12px;font:inherit;font-size:14px}.hms textarea{min-height:100px;resize:vertical}.hms-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.hms-grid .wide{grid-column:1/-1}.hms-form-footer{margin-top:22px;display:flex;gap:12px;align-items:center;flex-wrap:wrap}.hms-metrics{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.hms-metric{padding:20px;background:#f5f9fa;border-radius:15px;min-width:0}.hms-metric strong{font-size:30px;display:block;line-height:1.3;font-variant-numeric:tabular-nums}.hms-metric span{font-size:12px;color:#536b79}.hms-badge{display:inline-flex;padding:5px 10px;border-radius:20px;background:#e8f3f4;color:#246473;font-size:11px;font-weight:700;white-space:normal;line-height:1.4}.hms-badge.done{background:#e5f4ec;color:#26744c}.hms-badge.wait{background:#fff3da;color:#89611d}.hms-empty{padding:42px 18px;text-align:center;border:1px dashed #cbdde1;border-radius:17px;background:#f9fcfc}.hms-empty-symbol{font-size:28px;color:#3c8b92;display:block;margin:0 0 15px}.hms-record{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:20px 0;border-bottom:1px solid #edf1f3}.hms-record:last-child{border-bottom:0}.hms-record strong{display:block;font-size:16px;margin-bottom:6px}.hms-record small{display:block;overflow-wrap:anywhere}.hms-record-main{min-width:0;flex:1}.hms-error{padding:14px 18px;background:#fff0ec;color:#a03d29;border-radius:12px;margin:14px 0;line-height:1.6}.hms-success{padding:14px 18px;background:#e8f6ee;color:#246343;border-radius:12px;margin:14px 0}.hms-detail{display:grid;grid-template-columns:160px minmax(0,1fr);gap:24px;align-items:center}.hms-qr{width:160px;background:white;border:1px solid #dde8ea;padding:8px;border-radius:12px}.hms-qr svg{width:100%;display:block}.hms-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:18px 0}.hms-tabs button[aria-pressed=true]{background:#123f51;color:white;border-color:#123f51}.hms-timeline{list-style:none;padding:0;margin:0}.hms-timeline li{position:relative;margin-left:8px;padding:0 0 26px 25px;border-left:2px solid #d7e8e8}.hms-timeline li:before{content:'';width:10px;height:10px;background:#14858b;border:3px solid #e5f5f3;border-radius:100%;position:absolute;left:-6px;top:4px;box-sizing:content-box}.hms-timeline details{margin-top:8px}.hms-timeline summary{cursor:pointer;font-size:13px;color:#087e83}.hms-timeline dl{font-size:13px;display:grid;grid-template-columns:minmax(90px,1fr) 3fr;gap:8px;margin-top:12px}.hms-timeline dt{color:#607583}.hms-timeline dd{margin:0;white-space:pre-wrap;overflow-wrap:anywhere}.hms-rx-item{background:#f6fafb;border-radius:14px;padding:16px;margin:12px 0}.hms-rx-item .hms-grid{grid-template-columns:2fr 1fr}.hms-notice{font-size:12px;color:#647d88;margin-top:18px}.hms-summary{margin:24px 0}.hms-progress{height:4px;border-radius:2px;background:#d9edef;margin:14px 0}.hms-print-sheet{display:none}
@media(max-width:1024px){.hms-metrics{grid-template-columns:repeat(2,minmax(0,1fr))}.hms-panel{padding:22px}}
@media(max-width:600px){.hms{padding:0}.hms-header{display:block;margin-bottom:20px}.hms-header .hms-actions{margin-top:15px}.hms-grid{grid-template-columns:minmax(0,1fr)}.hms-grid .wide{grid-column:auto}.hms-panel{padding:18px;border-radius:17px}.hms-record{align-items:flex-start;flex-direction:column;gap:14px}.hms-record .hms-actions{width:100%}.hms-metric{padding:14px}.hms-metric strong{font-size:26px}.hms-detail{grid-template-columns:minmax(0,1fr)}.hms-qr{width:150px}.hms-rx-item .hms-grid{grid-template-columns:minmax(0,1fr)}.hms-timeline dl{grid-template-columns:1fr}.hms-empty{padding:30px 12px}}
@media print{body.hms-printing>*{display:none!important}body.hms-printing>.hms-print-sheet{display:block!important;color:#111;padding:24px;font-family:Arial,sans-serif}.hms-print-sheet svg{width:180px;height:180px}.hms-print-sheet h1{font-size:24px}.hms-print-sheet dl{display:grid;grid-template-columns:180px 1fr;gap:12px}.hms-print-sheet dd{margin:0;white-space:pre-wrap}.hms-print-sheet small{display:block;margin-top:20px}}


/* ==========================================================
   DOCTOR WORKSPACE V2
   ========================================================== */

.hms-patient-banner {
  position: sticky;
  top: 10px;
  z-index: 8;
}

.hms-patient-context {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 8px;
}

.hms-context-chip,
.hms-department-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  font-size: 12px;
}

.hms-department-pill {
  font-weight: 700;
  white-space: nowrap;
}

.hms-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.hms-section-heading.compact {
  margin-bottom: 10px;
}

.hms-section-heading h2,
.hms-section-heading h3 {
  margin-bottom: 4px;
}

.hms-section-heading p,
.hms-section-heading small {
  margin: 0;
}

.hms-clinical-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.hms-clinical-wide {
  margin-top: 16px;
}

.hms-clinical-field {
  min-width: 0;
}

.hms-clinical-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 7px;
}

.hms-clinical-label label {
  margin: 0;
  font-weight: 700;
}

.hms-clinical-field textarea {
  width: 100%;
  min-height: 112px;
  resize: vertical;
}

.hms-voice-actions {
  display: inline-flex;
  gap: 6px;
}

.hms-icon-button {
  display: inline-grid;
  place-items: center;
  width: 36px;
  min-width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  font-size: 16px;
}

.hms-icon-button.is-listening {
  animation: hmsVoicePulse 1s ease-in-out infinite;
}

@keyframes hmsVoicePulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.hms-vitals-panel {
  margin: 18px 0;
  padding: 16px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 16px;
  background: rgba(248,251,252,.76);
}

.hms-vitals-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(100px, 1fr));
  gap: 10px;
}

.hms-vital > span {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
}

.hms-vital > div {
  display: flex;
  align-items: center;
  gap: 6px;
}

.hms-vital input {
  min-width: 0;
  width: 100%;
}

.hms-vital small {
  white-space: nowrap;
}

.hms-doctor-order-grid {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 18px;
  align-items: start;
}

.hms-order-fields {
  display: grid;
  grid-template-columns: minmax(150px, .7fr) minmax(0, 1.3fr);
  gap: 12px;
}

.hms-source-note {
  margin: 12px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: .75;
}

.hms-rx-item {
  padding: 14px;
  margin-bottom: 10px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 14px;
  background: rgba(248,251,252,.65);
}

.hms-rx-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1.3fr) minmax(90px, .45fr) minmax(180px, 1.25fr);
  gap: 10px;
}

.hms-rx-directions {
  min-width: 0;
}

.hms-outcome-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.hms-outcome-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 14px;
  cursor: pointer;
}

.hms-outcome-option input {
  margin-top: 4px;
}

.hms-outcome-option span {
  display: grid;
  gap: 3px;
}

.hms-outcome-option small {
  opacity: .72;
}

@media (max-width: 1180px) {
  .hms-vitals-grid {
    grid-template-columns: repeat(3, minmax(120px, 1fr));
  }

  .hms-doctor-order-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .hms-clinical-grid,
  .hms-order-fields,
  .hms-rx-grid,
  .hms-outcome-row {
    grid-template-columns: 1fr;
  }

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

  .hms-section-heading {
    flex-direction: column;
    gap: 8px;
  }

  .hms-patient-banner {
    position: static;
  }
}

@media (max-width: 430px) {
  .hms-vitals-grid {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   LABORATORY WORKSPACE V2
   ========================================================== */

.hms-lab-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.hms-tab-count {
  display: inline-grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  border-radius: 999px;
  background: rgba(15, 95, 104, .08);
  font-size: 11px;
  font-weight: 800;
}

.hms-lab-list {
  display: grid;
  gap: 12px;
}

.hms-lab-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 16px 18px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 16px;
  background: rgba(255,255,255,.78);
}

.hms-lab-card-main {
  min-width: 0;
  flex: 1;
}

.hms-lab-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.hms-lab-card-title > div {
  display: grid;
  gap: 2px;
}

.hms-lab-card-title strong {
  font-size: 16px;
}

.hms-lab-card h3 {
  margin: 12px 0 8px;
}

.hms-lab-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  font-size: 12px;
}

.hms-lab-sample-line {
  margin: 10px 0 0;
  font-size: 12px;
  opacity: .76;
}

.hms-lab-patient-meta,
.hms-lab-order-meta,
.hms-lab-information-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 16px;
}

.hms-lab-patient-meta > div,
.hms-lab-order-meta > div,
.hms-lab-information-grid > div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 12px;
  background: rgba(255,255,255,.65);
}

.hms-lab-patient-meta span,
.hms-lab-order-meta span,
.hms-lab-information-grid span {
  font-size: 11px;
  opacity: .7;
}

.hms-result-entry-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(250px, .6fr);
  gap: 16px;
}

.hms-result-text textarea {
  min-height: 220px;
}

.hms-result-side {
  display: grid;
  align-content: start;
  gap: 12px;
}

.hms-lab-report-preview {
  overflow: hidden;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 16px;
  background: rgba(255,255,255,.75);
}

.hms-report-row {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(0, 1fr);
  gap: 18px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--portal-border, #e5ecef);
}

.hms-report-row:last-child {
  border-bottom: 0;
}

.hms-report-row span {
  font-size: 12px;
  opacity: .7;
}

.hms-report-row strong {
  min-width: 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hms-result-value {
  font-size: 14px;
  line-height: 1.55;
}

.hms-verification-box {
  margin-top: 16px;
  padding: 14px 16px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 14px;
  background: rgba(248,251,252,.78);
}

.hms-verification-box p {
  margin-bottom: 0;
}

@media (max-width: 1000px) {
  .hms-lab-patient-meta,
  .hms-lab-order-meta,
  .hms-lab-information-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hms-result-entry-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .hms-lab-card {
    align-items: stretch;
    flex-direction: column;
  }

  .hms-lab-card-title {
    flex-direction: column;
  }

  .hms-lab-patient-meta,
  .hms-lab-order-meta,
  .hms-lab-information-grid,
  .hms-report-row {
    grid-template-columns: 1fr;
  }
}


/* ==========================================================
   PREMIUM LABORATORY V3
   Structured Operational HMS laboratory workflow
   ========================================================== */

.hms-lab-workflow {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin: 18px 0 4px;
}

.hms-lab-workflow-step {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 12px;
  background: rgba(248,251,252,.72);
}

.hms-lab-workflow-step > span {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 1px solid var(--portal-border, #d9e3e8);
  background: #fff;
  font-size: 11px;
  font-weight: 800;
}

.hms-lab-workflow-step strong {
  min-width: 0;
  font-size: 11px;
  line-height: 1.25;
}

.hms-lab-workflow-step.complete {
  border-color: rgba(15,95,104,.22);
  background: rgba(15,95,104,.055);
}

.hms-lab-workflow-step.complete > span {
  border-color: rgba(15,95,104,.34);
}

.hms-lab-workflow-step.current {
  border-color: rgba(15,95,104,.38);
  background: rgba(15,95,104,.09);
  box-shadow: 0 8px 22px rgba(15,95,104,.07);
}

.hms-lab-workflow-step.current > span {
  border-color: rgba(15,95,104,.45);
  font-weight: 900;
}

.hms-lab-workflow-step.upcoming {
  opacity: .62;
}

.hms-lab-entry-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.hms-lab-entry-heading h3 {
  margin: 3px 0 4px;
}

.hms-lab-entry-heading p {
  margin: 0;
  opacity: .72;
}

#hms-lab-result-items {
  display: grid;
  gap: 10px;
}

.hms-lab-result-item {
  display: grid;
  grid-template-columns:
    minmax(170px, 1.1fr)
    minmax(130px, .8fr)
    minmax(110px, .55fr)
    minmax(170px, 1fr)
    auto;
  gap: 10px;
  align-items: end;
  padding: 14px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 14px;
  background: rgba(255,255,255,.76);
}

.hms-lab-result-item label {
  min-width: 0;
  margin: 0;
}

.hms-lab-result-item input {
  width: 100%;
}

.hms-lab-remove-item {
  min-height: 42px;
  align-self: end;
  white-space: nowrap;
}

.hms-lab-summary-field {
  display: grid;
  gap: 7px;
  margin-top: 16px;
}

.hms-lab-summary-field textarea,
.hms-imaging-result-entry textarea {
  min-height: 145px;
}

.hms-imaging-result-entry {
  padding: 18px;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 16px;
  background: rgba(255,255,255,.72);
}

.hms-imaging-result-entry label {
  display: grid;
  gap: 7px;
}

.hms-lab-result-table-wrap {
  margin: 16px 0;
  overflow-x: auto;
  border: 1px solid var(--portal-border, #d9e3e8);
  border-radius: 16px;
  background: rgba(255,255,255,.82);
}

.hms-lab-result-table {
  width: 100%;
  min-width: 680px;
  border-collapse: collapse;
}

.hms-lab-result-table th,
.hms-lab-result-table td {
  padding: 13px 15px;
  border-bottom: 1px solid var(--portal-border, #e5ecef);
  text-align: left;
  vertical-align: top;
}

.hms-lab-result-table th {
  background: rgba(248,251,252,.92);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}

.hms-lab-result-table td {
  font-size: 13px;
}

.hms-lab-result-table tbody tr:last-child td {
  border-bottom: 0;
}

.hms-lab-result-table td:nth-child(2) strong {
  font-size: 14px;
}

.hms-result-entry-panel,
.hms-result-review-panel,
.hms-verified-report-panel {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .hms-lab-workflow {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hms-lab-result-item {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hms-lab-remove-item {
    justify-self: start;
  }
}

@media (max-width: 650px) {
  .hms-lab-workflow {
    grid-template-columns: 1fr;
  }

  .hms-lab-result-item {
    grid-template-columns: 1fr;
  }

  .hms-lab-entry-heading {
    flex-direction: column;
  }

  .hms-lab-entry-heading button {
    width: 100%;
  }

  .hms-lab-remove-item {
    width: 100%;
  }
}

@media print {
  .hms-print-result-table {
    width: 100%;
    margin: 18px 0;
    border-collapse: collapse;
    font-size: 11px;
  }

  .hms-print-result-table th,
  .hms-print-result-table td {
    padding: 8px 9px;
    border: 1px solid #cfd8dc;
    text-align: left;
    vertical-align: top;
  }

  .hms-print-result-table th {
    font-weight: 700;
  }
}


/* PREMIUM_LAB_DASHBOARD_V4
   Presentation-only laboratory workbench.
   Counts are rendered exclusively from the existing Operational HMS lab queue.
   ========================================================== */

.hms-lab-command {
  position: relative;
  overflow: hidden;
  padding: 24px;
  margin: 18px 0 14px;
  border: 1px solid #d8e8ea;
  border-radius: 22px;
  background:
    radial-gradient(circle at 100% 0%, rgba(8,126,131,.09), transparent 34%),
    linear-gradient(135deg, #ffffff 0%, #f7fbfb 58%, #eef8f7 100%);
  box-shadow: 0 14px 36px rgba(18,52,67,.055);
}

.hms-lab-command-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 20px;
}

.hms-lab-command-heading h2 {
  margin: 4px 0 4px;
  font-size: 23px;
}

.hms-lab-command-heading p {
  max-width: 760px;
  margin: 0;
  font-size: 13px;
}

.hms-lab-command-source {
  display: grid;
  gap: 3px;
  min-width: 220px;
  padding: 11px 14px;
  border: 1px solid rgba(8,126,131,.16);
  border-radius: 13px;
  background: rgba(255,255,255,.72);
}

.hms-lab-command-source span {
  color: var(--hms-teal);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hms-lab-command-source strong {
  font-size: 13px;
}

.hms-lab-kpis {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 11px;
}

.hms-lab-kpi {
  min-width: 0;
  padding: 17px;
  border: 1px solid #dce8eb;
  border-radius: 16px;
  background: rgba(255,255,255,.88);
  box-shadow: 0 5px 18px rgba(18,52,67,.035);
}

.hms-lab-kpi-total {
  border-color: rgba(8,126,131,.23);
  background: rgba(238,249,248,.92);
}

.hms-lab-kpi > span {
  display: block;
  min-height: 30px;
  color: #536f7b;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.hms-lab-kpi strong {
  display: block;
  margin: 5px 0 2px;
  color: #123443;
  font-size: 29px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.hms-lab-kpi small {
  display: block;
  margin-top: 7px;
  font-size: 10px;
}

.hms-lab-filter-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 13px 16px;
  margin: 14px 0 18px;
  border: 1px solid #dce8eb;
  border-radius: 16px;
  background: rgba(255,255,255,.82);
}

.hms-lab-filter-label {
  display: grid;
  flex: 0 0 auto;
  gap: 2px;
}

.hms-lab-filter-label > span {
  font-size: 12px;
  font-weight: 800;
}

.hms-lab-filter-label small {
  font-size: 10px;
}

.hms-lab-filter-shell .hms-lab-tabs {
  justify-content: flex-end;
  margin: 0;
}

.hms-lab-filter-shell .hms-lab-tabs button {
  min-height: 38px;
  padding: 8px 11px;
  border-radius: 10px;
  font-size: 11px;
}

.hms-lab-queue-panel {
  padding: 0;
  overflow: hidden;
}

.hms-lab-queue-panel > .hms-section-heading {
  padding: 24px 24px 18px;
  margin: 0;
}

.hms-lab-queue-panel > .hms-section-heading p {
  margin-top: 3px;
  font-size: 12px;
}

.hms-lab-queue-table-wrap {
  overflow-x: auto;
  border-top: 1px solid #e5edef;
}

.hms-lab-queue-head,
.hms-lab-queue-row {
  display: grid;
  grid-template-columns:
    minmax(180px, 1.25fr)
    minmax(180px, 1.35fr)
    minmax(145px, .9fr)
    minmax(145px, .9fr)
    minmax(135px, .75fr)
    minmax(130px, .7fr);
  gap: 16px;
  align-items: center;
  min-width: 1050px;
}

.hms-lab-queue-head {
  padding: 11px 20px;
  background: #f6fafb;
  color: #607583;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.hms-lab-queue-row {
  padding: 17px 20px;
  border-top: 1px solid #edf2f3;
  background: #fff;
  transition: background .15s ease;
}

.hms-lab-queue-row:first-child {
  border-top: 0;
}

.hms-lab-queue-row:hover {
  background: #fbfdfd;
}

.hms-lab-queue-row > div {
  min-width: 0;
}

.hms-lab-queue-row strong {
  display: block;
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.4;
}

.hms-lab-queue-row small {
  display: block;
  margin-top: 3px;
  overflow-wrap: anywhere;
  font-size: 10px;
  line-height: 1.4;
}

.hms-lab-queue-patient > strong {
  font-size: 14px;
}

.hms-lab-queue-investigation > strong {
  color: #174454;
}

.hms-lab-queue-sample > strong {
  font-variant-numeric: tabular-nums;
}

.hms-lab-queue-action {
  display: flex;
  justify-content: flex-end;
}

.hms-lab-queue-action button {
  width: 100%;
  max-width: 150px;
  min-height: 39px;
  padding: 8px 11px;
  font-size: 11px;
}

.hms-lab-queue-note {
  padding: 0 24px 20px;
  margin-top: 16px;
}

@media (max-width: 1180px) {
  .hms-lab-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .hms-lab-filter-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .hms-lab-filter-shell .hms-lab-tabs {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .hms-lab-command {
    padding: 18px;
    border-radius: 18px;
  }

  .hms-lab-command-heading {
    flex-direction: column;
  }

  .hms-lab-command-source {
    width: 100%;
    min-width: 0;
  }

  .hms-lab-kpis {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hms-lab-queue-panel {
    padding: 0;
  }

  .hms-lab-queue-table-wrap {
    padding: 0 14px 14px;
    overflow: visible;
    border-top: 1px solid #e5edef;
  }

  .hms-lab-queue-head {
    display: none;
  }

  .hms-lab-queue-row {
    display: grid;
    min-width: 0;
    grid-template-columns: 1fr;
    gap: 12px;
    margin: 14px 0 0;
    padding: 16px;
    border: 1px solid #dce8eb;
    border-radius: 15px;
  }

  .hms-lab-queue-row > div {
    display: grid;
    grid-template-columns: minmax(100px, .4fr) minmax(0, 1fr);
    gap: 10px;
    align-items: start;
  }

  .hms-lab-queue-row > div::before {
    content: attr(data-label);
    color: #607583;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .hms-lab-queue-row > div > strong,
  .hms-lab-queue-row > div > small,
  .hms-lab-queue-row > div > .hms-badge,
  .hms-lab-queue-row > div > button {
    grid-column: 2;
  }

  .hms-lab-queue-row > div > small {
    margin-top: -5px;
  }

  .hms-lab-queue-action {
    justify-content: stretch;
  }

  .hms-lab-queue-action button {
    width: 100%;
    max-width: none;
  }
}

@media (max-width: 460px) {
  .hms-lab-kpis {
    grid-template-columns: 1fr;
  }

  .hms-lab-kpi > span {
    min-height: 0;
  }

  .hms-lab-filter-shell {
    padding: 12px;
  }

  .hms-lab-filter-shell .hms-lab-tabs {
    width: 100%;
  }

  .hms-lab-filter-shell .hms-lab-tabs button {
    flex: 1 1 calc(50% - 8px);
  }

  .hms-lab-queue-row > div {
    grid-template-columns: 1fr;
  }

  .hms-lab-queue-row > div::before,
  .hms-lab-queue-row > div > strong,
  .hms-lab-queue-row > div > small,
  .hms-lab-queue-row > div > .hms-badge,
  .hms-lab-queue-row > div > button {
    grid-column: 1;
  }

  .hms-lab-queue-row > div > small {
    margin-top: 0;
  }
}
