:root {
  --ink: #20202c;
  --muted: #686878;
  --brand: #cf397b;
  --brand-dark: #9d1d55;
  --brand-soft: #fff3f8;
  --teal: #157f78;
  --line: #f2dce6;
  --surface: #fff;
  --bg: #f8fafc;
  --white: #fff;
  --danger: #d32f2f;
  --shadow: 0 20px 55px rgba(20,33,61,.09);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { color-scheme: light; scroll-padding-top: 86px; }
#loginView[hidden],
.login-layout[hidden],
#resultsView[hidden],
.results-view[hidden],
.results-top-bar[hidden],
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  background: radial-gradient(circle at 15% 15%, #ffe2f0 0, transparent 32%),
              radial-gradient(circle at 85% 75%, #daf5f1 0, transparent 32%),
              linear-gradient(135deg, #fff 0%, #fbf7fa 100%);
  color: var(--ink);
  font-family: "Segoe UI", "Noto Sans Arabic", Tahoma, Arial, sans-serif;
  line-height: 1.7;
}

/* Header */
.portal-header {
  height: 78px;
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(207,57,123,.1);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  position: sticky;
  top: 0;
  z-index: 1000;
}

.portal-header-inner {
  width: min(1160px, calc(100% - 36px));
  height: 78px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px;
}

.portal-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  color: var(--ink);
  text-decoration: none;
}

.brand-logo-img {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  object-fit: contain;
  box-shadow: 0 6px 18px rgba(207,57,123,.12);
}

.portal-brand strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.portal-brand small {
  display: block;
  color: var(--muted);
  font-size: .68rem;
}

.portal-desktop-nav { display: flex; align-items: center; gap: 3px; }
.portal-desktop-nav a { padding: 10px 11px; border-radius: 12px; color: #20202c; font-size: .88rem; font-weight: 600; text-decoration: none; transition: .2s; white-space: nowrap; }
.portal-desktop-nav a:hover, .portal-desktop-nav a:focus-visible { color: var(--brand); background: var(--brand-soft); }
.portal-desktop-nav .portal-results-link { padding: 11px 17px; background: var(--brand); color: #fff; box-shadow: 0 7px 20px rgba(207,57,123,.22); }
.portal-desktop-nav .portal-results-link:hover, .portal-desktop-nav .portal-results-link:focus-visible { background: var(--brand-dark); color: #fff; }

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

.portal-menu-button { display: none; width: 46px; height: 46px; border: 0; border-radius: 14px; background: var(--brand-soft); color: var(--brand-dark); font-family: inherit; font-size: 1.3rem; font-weight: 700; line-height: 1; cursor: pointer; }
.portal-menu-overlay { position: fixed; inset: 0; z-index: 1100; background: rgba(25,17,23,.52); backdrop-filter: blur(3px); opacity: 0; visibility: hidden; transition: .25s; }
.portal-menu-overlay.active { opacity: 1; visibility: visible; }
.portal-mobile-menu { position: fixed; z-index: 1101; top: 0; right: 0; width: min(88vw,360px); height: 100vh; height: 100dvh; background: #fff; transform: translateX(105%); transition: transform .28s ease; box-shadow: -20px 0 60px rgba(0,0,0,.16); display: flex; flex-direction: column; }
.portal-mobile-menu.open { transform: none; }
.portal-mobile-head { padding: 25px 22px; background: linear-gradient(140deg,var(--brand-dark),var(--brand)); color: #fff; display: flex; align-items: center; position: relative; }
.portal-mobile-brand { display: flex; align-items: center; gap: 13px; }
.portal-mobile-brand img { width: 58px; height: 58px; object-fit: contain; background: #fff; border-radius: 17px; }
.portal-mobile-brand strong,.portal-mobile-brand small { display: block; }.portal-mobile-brand small { font-size: .72rem; opacity: .8; }
.portal-mobile-head>button { position: absolute; left: 16px; top: 16px; width: 38px; height: 38px; border: 0; border-radius: 12px; background: rgba(255,255,255,.16); color: #fff; font-size: 1.6rem; cursor: pointer; }
.portal-mobile-menu nav { padding: 16px; overflow: auto; flex: 1; }
.portal-mobile-menu nav a { display: flex; align-items: center; gap: 13px; padding: 13px 14px; border-radius: 13px; color: #20202c; font-weight: 600; text-decoration: none; }
.portal-mobile-menu nav a span { width: 23px; color: var(--brand); text-align: center; }
.portal-mobile-menu nav a:hover,.portal-mobile-menu nav a:focus-visible,.portal-mobile-menu nav a[aria-current=page] { background: var(--brand-soft); color: var(--brand-dark); }
.portal-mobile-menu nav .portal-mobile-result { font-weight: 800; }
.portal-mobile-footer { padding: 17px 22px; background: #fff8fb; border-top: 1px solid var(--line); color: var(--muted); }
.portal-mobile-footer p { margin: 2px 0; font-size: .75rem; }
body.portal-menu-open { overflow: hidden; }

.logout-button, .back-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 12px;
  padding: 9px 18px;
  font: inherit;
  font-weight: 700;
  font-size: .9rem;
  cursor: pointer;
  transition: all .2s;
}

.logout-button:hover, .back-button:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-soft);
}

.portal-shell {
  max-width: 1140px;
  margin: auto;
  padding: 45px 22px 70px;
}

/* Login View */
.login-layout {
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  align-items: stretch;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: var(--shadow);
  background: #fff;
  border: 1px solid var(--line);
}

.welcome-copy {
  position: relative;
  overflow: hidden;
  padding: 68px 55px;
  background: linear-gradient(145deg, #b73773, #d94f91);
  color: #fff;
}

.welcome-copy::before, .welcome-copy::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%;
}
.welcome-copy::before { width: 440px; height: 440px; left: -220px; top: -140px; }
.welcome-copy::after { width: 320px; height: 320px; right: -160px; bottom: -140px; }

.welcome-mark {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: rgba(255,255,255,.18);
  font-size: 24px;
  margin-bottom: 35px;
}

.eyebrow {
  margin: 0 0 10px;
  letter-spacing: 1.1px;
  font-size: 11px;
  font-weight: 800;
}

.welcome-copy .eyebrow {
  color: #ffd8ec;
}

.welcome-copy h1 {
  font-size: 2.55rem;
  line-height: 1.35;
  margin: 0 0 16px;
  font-weight: 800;
}

.welcome-copy > p:not(.eyebrow) {
  color: #fcebf4;
  line-height: 1.8;
  max-width: 420px;
  font-size: 1.02rem;
}

.welcome-copy ul {
  list-style: none;
  padding: 0;
  margin: 38px 0 0;
  display: grid;
  gap: 15px;
  color: #fff;
}

.welcome-copy li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: .95rem;
  font-weight: 600;
}

.welcome-copy li span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #dff5f2;
  color: var(--teal);
  font-size: 13px;
  font-weight: 800;
}

.login-card {
  padding: 68px 55px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.brand-badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 22px;
}

.login-logo-img {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 8px 24px rgba(217,79,145,.2);
}

.login-card .eyebrow {
  color: var(--brand);
  background: var(--brand-soft);
  padding: 5px 14px;
  border-radius: 20px;
  display: inline-block;
  margin: 0;
}

.login-card h2 {
  font-size: 1.85rem;
  margin: 0 0 10px;
  font-weight: 800;
  color: var(--ink);
}

.login-hint {
  color: var(--muted);
  line-height: 1.7;
  margin: 0 0 28px;
  font-size: .98rem;
}

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

.login-card label {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
}

.phone-field {
  direction: ltr;
  height: 58px;
  border: 1.5px solid var(--line);
  border-radius: 14px;
  display: flex;
  align-items: center;
  background: #fff;
  overflow: hidden;
  transition: .2s;
}

.phone-field:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(217,79,145,.12);
}

.phone-field span {
  height: 100%;
  display: grid;
  place-items: center;
  padding: 0 16px;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  background: #fafbfd;
}

.phone-field input {
  direction: ltr;
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 0 18px;
  font: 17px "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  font-weight: 600;
}

.phone-field input::placeholder {
  font-size: 13.5px;
  font-weight: 600;
  color: #969ba8;
}

@media (max-width: 480px) {
  .phone-field input {
    padding: 0 12px;
  }
  .phone-field input::placeholder {
    font-size: 12px;
  }
}

.login-card form > button {
  border: 0;
  border-radius: 14px;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff;
  padding: 16px 22px;
  font: 800 15px "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
  box-shadow: 0 12px 28px rgba(217,79,145,.26);
  margin-top: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  transition: transform .2s, box-shadow .2s;
}

.login-card form > button:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 32px rgba(217,79,145,.35);
}

.login-card button:disabled {
  opacity: .6;
  cursor: wait;
  transform: none;
}

.form-message {
  min-height: 22px;
  margin-top: 14px;
  color: var(--danger);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.6;
}

.privacy-note {
  font-size: 11px;
  color: var(--muted);
  text-align: center;
  margin: 24px 0 0;
}

.privacy-note span {
  color: var(--brand);
}

/* Dashboard View */
.dashboard-view, .results-view {
  min-height: 600px;
}

/* Patient Profile Card (Ø§Ù„Ù…Ù„Ù Ø§Ù„Ø´Ø®ØµÙŠ Ù„Ù„Ù…Ø±ÙŠØ¶) */
.patient-profile-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 34px 38px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.patient-profile-card::before {
  content: "";
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--brand), var(--teal));
}

.profile-header {
  display: flex;
  align-items: center;
  gap: 22px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.profile-avatar {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  background: var(--brand-soft);
  color: var(--brand);
  display: grid;
  place-items: center;
  font-size: 32px;
  box-shadow: 0 8px 20px rgba(217,79,145,.14);
  flex-shrink: 0;
}

.profile-main-info {
  flex: 1;
}

.profile-badge {
  display: inline-block;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 6px;
  border: 1px solid #ffd8ec;
}

.profile-name {
  font-size: 1.85rem;
  font-weight: 800;
  margin: 0 0 6px;
  color: var(--ink);
}

.profile-desc {
  margin: 0;
  color: var(--muted);
  font-size: .92rem;
}

.profile-details-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 24px;
}

.profile-detail-item {
  background: #fafbfd;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.detail-label {
  font-size: 12px;
  color: var(--muted);
  font-weight: 700;
}

.detail-value {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
}

.phone-value {
  direction: ltr;
  text-align: right;
  letter-spacing: .5px;
  color: var(--teal);
}

.text-success {
  color: var(--teal);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 40px 0 20px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1.6rem;
  font-weight: 800;
}

.count-badge {
  background: var(--brand-soft);
  color: var(--brand);
  border-radius: 20px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid #ffd8ec;
}

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

/* ── Request Card ── */
.request-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px 22px 18px;
  box-shadow: 0 8px 24px rgba(20,33,61,.05);
  transition: transform .22s, box-shadow .22s, border-color .22s;
  position: relative;
  overflow: hidden;
}

/* Colored right accent bar based on status */
.request-card::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 5px;
  height: 100%;
  background: var(--line);
  border-radius: 0 20px 20px 0;
  transition: background .22s;
}
.request-card.status-available::before {
  background: linear-gradient(180deg, var(--teal), #0d9e96);
}
.request-card.status-pending::before {
  background: linear-gradient(180deg, #f0c040, #e5a200);
}

.request-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 20px 48px rgba(20,33,61,.10);
}
.request-card.status-available:hover {
  border-color: #b0deda;
}
.request-card.status-pending:hover {
  border-color: #f5d889;
}

.request-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.request-card-head small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 3px;
}

.request-card-head strong {
  display: block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--ink);
}

.status {
  border-radius: 20px;
  padding: 5px 13px;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
  letter-spacing: .3px;
  flex-shrink: 0;
}

.status.available {
  background: linear-gradient(135deg, #dff5f2, #c5ecea);
  color: #0f6b64;
  border: 1px solid #b0deda;
}

.status.pending {
  background: linear-gradient(135deg, #fff3dd, #feeac0);
  color: #8b5c00;
  border: 1px solid #fdd98a;
}

.pending-notice-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, #fff9ec 0%, #fff3dd 100%);
  border: 1.5px solid #fdd98a;
  border-radius: 12px;
  padding: 12px 16px;
  color: #8b5c00;
  text-align: right;
  direction: rtl;
  margin-top: 10px;
}
.pending-notice-card .pending-icon {
  font-size: 22px;
  flex-shrink: 0;
}
.pending-notice-card strong {
  display: block;
  font-size: 13.5px;
  font-weight: 800;
  color: #784c00;
  margin-bottom: 2px;
}
.pending-notice-card p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.5;
  color: #9c6c10;
}

.request-meta {
  display: flex;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.request-meta div {
  display: grid;
  gap: 4px;
}

/* Empty / pending result state */
.empty-requests {
  text-align: center;
  padding: 52px 24px;
  background: #fafbfd;
  border: 1.5px dashed var(--line);
  border-radius: 20px;
  grid-column: 1 / -1;
}

.pending-result-card {
  direction: rtl;
  max-width: 620px;
  margin: 12px auto;
  background: #fff;
  box-shadow: 0 12px 34px rgba(48, 29, 39, 0.07);
}

.pending-result-meta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
  padding: 6px 14px;
  border-radius: 999px;
  background: #fff4f8;
  border: 1px solid rgba(207, 57, 123, 0.2);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 700;
}

.empty-requests .empty-icon {
  font-size: 2.8rem;
  display: block;
  margin-bottom: 14px;
}

.empty-requests strong {
  display: block;
  font-size: 1.1rem;
  color: var(--ink);
  margin-bottom: 8px;
  font-weight: 800;
}

.empty-requests p {
  color: var(--muted);
  margin: 0 auto;
  font-size: .9rem;
  line-height: 1.7;
  max-width: 360px;
}

.request-meta small {
  color: var(--muted);
  font-size: 11px;
}

.request-meta strong {
  font-size: 13px;
  font-weight: 700;
}

.request-card button {
  width: 100%;
  border: 0;
  border-radius: 12px;
  margin-top: 16px;
  padding: 13px 18px;
  background: linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: #fff;
  font: 800 13px "Segoe UI", Tahoma, sans-serif;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 6px 16px rgba(207,57,123,.2);
}

.request-card button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(207,57,123,.32);
}

.request-card button:disabled {
  background: #f1f4f8;
  color: #a4b0c0;
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
}

/* Results View */
.results-view {
  direction: rtl !important;
  width: 100% !important;
}

.results-top-bar {
  direction: rtl !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  align-items: center !important;
  margin-bottom: 20px !important;
  gap: 12px !important;
  flex-wrap: wrap !important;
  width: min(100%, 794px) !important;
  margin-inline: auto !important;
}

.results-report-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--color-ink, #20131a);
  background: #fdf2f7;
  border: 1px solid rgba(207, 57, 123, 0.2);
  padding: 8px 16px;
  border-radius: 12px;
}

.results-report-badge svg {
  color: var(--color-brand, #cf397b);
}

.button-spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: portalBtnSpin 0.65s linear infinite;
  vertical-align: middle;
  margin-inline-end: 6px;
}

@keyframes portalBtnSpin {
  to { transform: rotate(360deg); }
}

.results-pages-container {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  overflow-x: auto !important;
  overflow-y: visible !important;
  -webkit-overflow-scrolling: touch !important;
  touch-action: pan-x pan-y pinch-zoom !important;
  direction: ltr !important;
  padding: 10px 0 30px !important;
  margin-inline: auto !important;
  box-sizing: border-box !important;
}

.results-pages-container::-webkit-scrollbar {
  height: 6px;
}
.results-pages-container::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.04);
  border-radius: 10px;
}
.results-pages-container::-webkit-scrollbar-thumb {
  background: rgba(207, 57, 123, 0.4);
  border-radius: 10px;
}

.sheet-scale-wrapper {
  direction: ltr !important;
  margin: 0 auto 20px !important;
  display: block !important;
  max-width: none !important;
  box-sizing: border-box !important;
}

.portal-zoom-toolbar {
  display: inline-flex !important;
  align-items: center !important;
  background: #ffffff !important;
  border: 1.5px solid rgba(207, 57, 123, 0.25) !important;
  border-radius: 12px !important;
  padding: 3px 6px !important;
  gap: 4px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
}

.zoom-btn {
  background: transparent !important;
  border: 0 !important;
  color: var(--color-brand, #cf397b) !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 8px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  transition: all 0.2s ease !important;
}

.zoom-btn:hover {
  background: var(--color-soft, #fff4f8) !important;
  color: var(--color-dark, #8c1749) !important;
}

.zoom-btn.fit-btn {
  width: auto !important;
  padding: 0 10px !important;
  gap: 6px !important;
  font-size: 0.78rem !important;
  font-weight: 700 !important;
  border-left: 1px solid #f2dbe6 !important;
  border-radius: 0 8px 8px 0 !important;
}

.zoom-indicator {
  font-size: 0.82rem !important;
  font-weight: 800 !important;
  color: var(--color-ink, #20131a) !important;
  min-width: 44px !important;
  text-align: center !important;
  cursor: pointer !important;
  user-select: none !important;
}

.portal-nav-back-btn {
  background: #ffffff !important;
  border: 1.5px solid var(--line, #edd5e0) !important;
  color: #334155 !important;
  padding: 8px 14px !important;
  border-radius: 12px !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 6px !important;
  cursor: pointer !important;
  transition: 0.2s !important;
}
.portal-nav-back-btn:hover {
  border-color: var(--color-brand, #cf397b) !important;
  color: var(--color-brand, #cf397b) !important;
  background: var(--color-soft, #fff4f8) !important;
}

.doc-sheet,
.page-sheet {
  margin-inline: auto !important;
}

.results-top-bar-actions {
  direction: rtl !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: space-between !important;
  width: 100% !important;
  gap: 10px !important;
  align-items: center !important;
  flex-wrap: wrap !important;
}

.download-button, .print-button {
  border: 1px solid var(--teal);
  background: var(--teal);
  color: #fff;
  font-weight: 800;
  border-radius: 12px;
  padding: 10px 22px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-family: "Segoe UI", Tahoma, sans-serif;
  transition: all .2s;
  box-shadow: 0 4px 14px rgba(21,127,120,.22);
}

.download-button:hover, .print-button:hover {
  background: #0d5f5a;
  border-color: #0d5f5a;
  color: #fff;
  box-shadow: 0 6px 18px rgba(21,127,120,.32);
  transform: translateY(-1px);
}

.print-button {
  background: #fff;
  color: var(--teal);
}

.print-button:hover {
  background: #edf7f6;
  color: #0d5f5a;
}


/* High-Fidelity Report Sheet Design (Matching Real Lab Report) */
.doc-sheet {
  background: #fff;
  border: 1px solid #d4dbe4;
  border-radius: 12px;
  padding: 24px 28px 16px;
  box-shadow: 0 15px 45px rgba(0,0,0,.08);
  max-width: 860px;
  margin: 0 auto;
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  color: #000;
}

/* Header Banner matching Real Lab Orchid Pink banner */
.doc-header-banner {
  display: flex !important;
  flex-direction: row !important;
  direction: ltr !important;
  justify-content: space-between !important;
  align-items: center !important;
  background: #edb0cc !important;
  padding: 12px 20px;
  border-radius: 4px;
  border-bottom: none !important;
  margin: -24px -28px 16px;
  box-sizing: border-box !important;
}

.doc-header-en {
  text-align: left !important;
  direction: ltr !important;
  flex: 1 1 0 !important;
}

.doc-header-en h2 {
  font-size: 1.85rem;
  font-weight: 900;
  color: #6f2f7d !important;
  margin: 0;
  font-family: Arial, "Helvetica Neue", sans-serif;
  letter-spacing: -0.3px;
  text-align: left !important;
  line-height: 1.2;
}

.doc-header-en p {
  margin: 2px 0 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: #6f2f7d !important;
  text-align: left !important;
  line-height: 1.3;
}

.doc-header-logo {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

.doc-logo-img {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: contain;
  background: #ffffff;
}

.doc-header-ar {
  text-align: center !important;
  direction: rtl !important;
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}

.doc-header-ar h2 {
  font-size: 2.1rem;
  font-weight: 900;
  color: #6f2f7d !important;
  margin: 0;
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  text-align: center !important;
  line-height: 1.2;
}

.doc-header-ar p {
  margin: 2px 0 0;
  font-size: 1.25rem;
  font-weight: 900;
  color: #6f2f7d !important;
  text-align: center !important;
  line-height: 1.3;
}

/* Patient Metadata Box matching report 3-row layout */
.doc-meta-box {
  display: flex;
  flex-direction: column;
  border-top: 2px solid #222;
  border-bottom: 2px solid #222;
  border-left: none;
  border-right: none;
  padding: 5px 0;
  margin-bottom: 16px;
  font-size: 11.5px;
  direction: ltr;
  gap: 4px;
}

.meta-row {
  display: grid;
  grid-template-columns: 105px 1.4fr 95px 1.25fr;
  align-items: center;
  gap: 6px;
}

.label-cell {
  font-weight: 700;
  color: #000;
  font-size: 11.5px;
  padding-left: 2px;
}

.val-cell {
  border: 1px solid #777;
  border-radius: 2px;
  background: #fff;
  padding: 3px 6px;
  font-size: 11.5px;
  font-weight: 700;
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #111;
}

.meta-bidi-line {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  direction: rtl;
  unicode-bidi: isolate;
  line-height: 1.25;
  max-width: 100%;
}

.meta-bidi-prefix,
.meta-bidi-rest {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 3.5px;
}

.meta-bidi-slash {
  display: inline-block;
  direction: ltr;
  margin-left: 4px;
  margin-right: 0.5px;
}

.meta-bidi-word {
  display: inline-block;
  direction: rtl;
  white-space: nowrap;
}

.meta-bidi-latin {
  display: inline-block;
  direction: ltr;
  white-space: nowrap;
}

.val-cell.bold {
  font-weight: 800;
}

.code-cell {
  font-weight: 700;
  font-family: Arial, monospace;
}

.barcode-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1px 5px;
  gap: 1px;
}

.meta-barcode-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
}

.meta-barcode-svg {
  height: 20px;
  width: 120px;
  display: block;
}

.bc-container {
  display: inline-flex;
  align-items: stretch;
  height: 20px;
  background: #ffffff;
  padding: 0 1px;
  box-sizing: border-box;
  overflow: hidden;
  user-select: none;
}

.bc-bar {
  display: inline-block;
  height: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.bc-bar.bc-b {
  background: #000000;
}

.bc-bar.bc-w {
  background: #ffffff;
}

.meta-barcode-text {
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.5px;
  color: #000;
  font-family: Arial, Helvetica, sans-serif;
}

/* Report Title */
.doc-report-title {
  text-align: center;
  margin: 16px 0 12px;
}

.doc-report-title h3 {
  display: inline-block;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: 1px;
  text-decoration: underline;
  text-underline-offset: 3px;
  color: #000;
  margin: 0;
  font-family: "Times New Roman", Times, Georgia, serif;
}

.doc-panel-title {
  margin: 2px 6px 4px;
  direction: ltr;
  text-align: left;
  color: #000;
  font: 800 1rem/1.25 "Times New Roman", Times, Georgia, serif;
  text-underline-offset: 3px;
}

/* Tests Table */
.doc-table-container {
  margin-top: 8px;
  direction: ltr;
}

.doc-tests-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
  font-weight: 700;
}

.section-subhead-row,
.test-row,
.comment-row {
  break-inside: avoid;
  page-break-inside: avoid;
}

.section-subhead-row th {
  padding: 6px 6px 10px;
  border: none;
}

.section-subhead-row th.col-ref,
.doc-tests-table th.col-ref {
  text-align: left !important;
  direction: ltr !important;
  font-family: "Times New Roman", Times, Georgia, serif !important;
  font-size: 1rem !important;
  font-weight: 800 !important;
  color: #000 !important;
  padding-left: 2px !important;
}

.subhead-text {
  font-size: 1rem;
  font-weight: 800;
  color: #000;
  font-family: "Times New Roman", Times, Georgia, serif;
}

.subhead-text u {
  text-underline-offset: 3px;
}

.test-row td {
  padding: 7px 6px;
  vertical-align: middle;
  border: none;
}

.comment-row td,
.comment-cell {
  padding: 6px 6px 8px;
  vertical-align: top;
  border: none;
  font-size: 11px;
  color: #111;
  text-align: left;
  direction: ltr;
  line-height: 1.4;
  font-family: Arial, "Helvetica Neue", sans-serif;
}

.comment-cell strong {
  color: #000;
  font-weight: 700;
  margin-right: 4px;
}

/* Dedicated Clinical Comment Section (Matching Image 2) */
.doc-comment-section {
  margin: 16px 14px 10px;
  padding: 10px 14px;
  background-color: #faf7f9;
  border-left: 3.5px solid #7b205a;
  border-radius: 4px;
  direction: ltr;
  text-align: left;
  font-family: Arial, "Helvetica Neue", sans-serif;
  break-inside: avoid;
  page-break-inside: avoid;
}

.doc-comment-label {
  font-weight: 700;
  font-size: 11.5px;
  color: #7b205a;
  margin-right: 6px;
  text-decoration: underline;
}

.doc-comment-text {
  font-size: 11.5px;
  color: #111;
  line-height: 1.45;
}

.doc-comment-entry {
  margin-top: 4px;
  line-height: 1.45;
}

.doc-comment-entry:first-child {
  margin-top: 0;
}

/* CBC Differential rows indentation */
.test-row.differential-row .col-test {
  padding-left: 28px !important;
}

.diff-bullet {
  font-size: 7.5px !important;
  color: #555 !important;
  vertical-align: middle;
}

.col-test {
  width: 44%;
  text-align: left;
}

.test-bullet {
  font-size: 9px;
  margin-right: 5px;
  color: #000;
  vertical-align: 1px;
}

.col-test {
  width: 36%;
  text-align: left;
}

.test-name-text {
  font-size: 12px;
  font-weight: 700;
  color: #000;
  font-family: Arial, "Helvetica Neue", sans-serif;
}

.col-sep {
  width: 2%;
  font-weight: 900;
  text-align: center;
  color: #000;
}

.col-val {
  width: 20%;
  text-align: left;
  font-size: 12.5px;
  white-space: nowrap;
}

.result-num {
  font-weight: 800;
  font-size: 13px;
  color: #000;
  font-family: Arial, sans-serif;
  white-space: nowrap;
}

/* Document Highlighter style for abnormal/highlighted values (no aggressive red) */
.result-num.val-abnormal,
.val-highlight {
  background: #fef9c3 !important;
  border: 1px solid #fde047 !important;
  color: #1e293b !important;
  padding: 1px 5px !important;
  border-radius: 3px !important;
  font-weight: 800 !important;
  display: inline-block !important;
  white-space: nowrap !important;
  line-height: 1.25 !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

/* Pending indicator styling */
.val-pending {
  background: #f8fafc !important;
  border: 1px solid #e2e8f0 !important;
  color: #64748b !important;
  font-style: italic !important;
  padding: 1px 5px !important;
  border-radius: 3px !important;
  display: inline-block !important;
}

/* Professional indicator badge for flags */
.flag-badge,
.val-abnormal-flag {
  display: inline-block !important;
  padding: 1px 6px !important;
  border-radius: 3px !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  white-space: nowrap !important;
  line-height: 1.2 !important;
  vertical-align: middle !important;
  margin-left: 4px;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.flag-badge.flag-high, .flag-badge.high, .flag-badge.h,
.flag-badge.flag-abnormal, .flag-badge.abnormal,
.val-abnormal-flag.high, .val-abnormal-flag.abnormal, .val-abnormal-flag.h {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fde68a !important;
}

.flag-badge.flag-low, .flag-badge.low, .flag-badge.l,
.val-abnormal-flag.low, .val-abnormal-flag.l {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #bae6fd !important;
}

/* Compound sub-items (Undigested food, multi-part tests) */
.test-row.compound-sub-row td {
  padding-top: 1px !important;
  padding-bottom: 2px !important;
}

.sub-item-name {
  padding-left: 14px !important;
}

.sub-sep {
  color: #000;
  margin-right: 4px;
  font-weight: 800;
}

.sub-test-label {
  font-size: 12px;
  font-weight: 700;
  color: #000;
}

.compound-val-wrap {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.compound-sub-name {
  font-size: 12px;
  font-weight: 700;
  color: #000;
}

.col-unit {
  width: 14%;
  font-weight: 700;
  font-size: 12px;
  color: #111;
  font-family: Arial, sans-serif;
}

.col-ref {
  width: 28%;
  text-align: left !important;
  direction: ltr !important;
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.doc-comment-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-weight: 700;
  font-size: 12px;
  color: #000;
  font-family: Arial, "Helvetica Neue", sans-serif;
  white-space: pre-line;
  line-height: 1.35;
  padding-left: 2px !important;
}

/* Signature & Thanks */
.doc-signature-section {
  display: flex;
  justify-content: flex-end;
  margin: 30px 25px 18px;
  direction: ltr;
}

.signature-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 150px;
  text-align: center;
}

.sig-title {
  font-size: 12px !important;
  color: #1e293b !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-weight: 700 !important;
}

.sig-name {
  font-family: "Dancing Script", "Caveat", "Brush Script MT", "Segoe Script", "Lucida Calligraphy", cursive !important;
  font-size: 1.4rem !important;
  font-weight: 700 !important;
  color: #050b14 !important;
  line-height: 1.15 !important;
  margin: 2px 0 1px !important;
  letter-spacing: 0.8px !important;
  display: inline-block !important;
  transform: rotate(-2.5deg) !important;
  text-shadow: 0 0 0.5px #050b14;
}

.sig-thanks {
  font-size: 12px;
  color: #222;
  font-family: Arial, sans-serif;
  font-weight: 700;
}

/* Footer Banner matching Real Lab Orchid Pink banner - Pinned to bottom of sheet */
.doc-footer-banner {
  background: #edb0cc !important;
  padding: 8px 14px;
  text-align: center;
  border-radius: 0 0 4px 4px;
  margin-top: auto !important;
  margin-bottom: 0 !important;
  margin-left: -28px !important;
  margin-right: -28px !important;
  width: calc(100% + 56px) !important;
  box-sizing: border-box !important;
  color: #6f2f7d !important;
  font-size: 11px;
  font-weight: 800;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  position: relative !important;
}

.footer-content-wrap {
  flex: 1 1 auto;
  text-align: center;
}

.footer-page-badge {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  font-weight: 800;
  color: #6f2f7d !important;
  background: rgba(255, 255, 255, 0.88);
  padding: 2px 7px;
  border-radius: 4px;
  border: 1px solid rgba(111, 47, 125, 0.28);
  white-space: nowrap;
  font-family: Arial, "Helvetica Neue", sans-serif;
  line-height: 1.2;
}

.doc-footer-banner p {
  margin: 2px 0;
  color: #6f2f7d !important;
}

.footer-address {
  font-family: Arial, "Segoe UI", Tahoma, sans-serif;
  color: #6f2f7d !important;
}

.footer-phones {
  font-size: 12.5px;
  font-weight: 900;
  letter-spacing: 0.5px;
  direction: ltr;
  color: #6f2f7d !important;
}

footer {
  max-width: 1140px;
  margin: auto;
  padding: 28px 22px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  display: flex;
  justify-content: space-between;
}

/* Mobile Swipe Indicator */
.mobile-swipe-guide {
  display: none;
  text-align: center;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--teal);
  background: #edf7f6;
  border: 1px dashed #97cfca;
  padding: 6px 12px;
  border-radius: 8px;
  margin: 10px 0;
}

/* Exact A4 Layout for File Download */
.doc-sheet.doc-sheet-export-mode,
.doc-sheet-export-mode .page-sheet,
.page-sheet.doc-sheet-export-mode {
  width: 794px !important;
  max-width: 794px !important;
  min-width: 794px !important;
  min-height: 1120px !important;
  height: auto !important;
  transform: none !important;
  transform-origin: top left !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  padding: 22px 28px 16px !important;
  margin: 0 !important;
  left: 0 !important;
  right: auto !important;
  box-shadow: none !important;
  background: #ffffff !important;
  box-sizing: border-box !important;
  direction: ltr !important;
  text-align: left !important;
  -webkit-font-smoothing: antialiased !important;
  -moz-osx-font-smoothing: grayscale !important;
  text-rendering: optimizeLegibility !important;
  page-break-inside: avoid !important;
  break-inside: avoid !important;
}

.doc-sheet.doc-sheet-export-mode .doc-header-banner {
  margin: -22px -28px 14px !important;
  padding: 10px 18px !important;
  display: flex !important;
  justify-content: space-between !important;
  align-items: center !important;
  flex-direction: row !important;
  direction: ltr !important;
  background: #edb0cc !important;
  border-radius: 4px !important;
  border-bottom: none !important;
  flex-shrink: 0 !important;
  box-sizing: border-box !important;
}

.doc-sheet.doc-sheet-export-mode .doc-header-en { 
  text-align: left !important; 
  direction: ltr !important;
  flex: 1 1 0 !important;
}
.doc-sheet.doc-sheet-export-mode .doc-header-en h2 { 
  font-size: 1.85rem !important; 
  font-weight: 900 !important;
  color: #6f2f7d !important;
  margin: 0 !important; 
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  text-align: left !important;
  line-height: 1.2 !important;
}
.doc-sheet.doc-sheet-export-mode .doc-header-en p { 
  font-size: 1.15rem !important; 
  font-weight: 900 !important;
  color: #6f2f7d !important;
  margin: 2px 0 0 !important; 
  text-align: left !important;
  line-height: 1.3 !important;
}

.doc-sheet.doc-sheet-export-mode .doc-header-logo {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  flex: 0 0 auto !important;
}

.doc-sheet.doc-sheet-export-mode .doc-header-ar { 
  text-align: center !important; 
  direction: rtl !important;
  flex: 1 1 0 !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
}
.doc-sheet.doc-sheet-export-mode .doc-header-ar h2 { 
  font-size: 2.1rem !important; 
  font-weight: 900 !important;
  color: #6f2f7d !important;
  margin: 0 !important; 
  font-family: Arial, "Segoe UI", Tahoma, sans-serif !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
.doc-sheet.doc-sheet-export-mode .doc-header-ar p { 
  font-size: 1.25rem !important; 
  font-weight: 900 !important;
  color: #6f2f7d !important;
  margin: 2px 0 0 !important; 
  text-align: center !important;
  line-height: 1.3 !important;
}

.doc-sheet.doc-sheet-export-mode .doc-logo-img { 
  width: 92px !important; 
  height: 92px !important; 
  border-radius: 50% !important;
  object-fit: contain !important;
  background: #ffffff !important;
}

.doc-sheet.doc-sheet-export-mode .doc-meta-box {
  display: flex !important;
  flex-direction: column !important;
  gap: 3px !important;
  border-top: 2px solid #222 !important;
  border-bottom: 2px solid #222 !important;
  border-left: none !important;
  border-right: none !important;
  padding: 5px 0 !important;
  margin-bottom: 12px !important;
  direction: ltr !important;
  flex-shrink: 0 !important;
}

.doc-sheet.doc-sheet-export-mode .meta-row {
  display: grid !important;
  grid-template-columns: 100px 1.4fr 90px 1.25fr !important;
  align-items: center !important;
  gap: 5px !important;
  margin-bottom: 0 !important;
}

.doc-sheet.doc-sheet-export-mode .label-cell { 
  font-size: 11px !important; 
  font-weight: 700 !important;
  color: #000 !important;
  padding-left: 2px !important;
}
.doc-sheet.doc-sheet-export-mode .val-cell { 
  font-size: 11px !important; 
  font-weight: 700 !important;
  border: 1px solid #777 !important;
  border-radius: 2px !important;
  background: #fff !important;
  padding: 3px 5px !important;
  min-height: 23px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  color: #111 !important;
}
.doc-sheet.doc-sheet-export-mode .val-cell.bold { 
  font-weight: 800 !important; 
}
.doc-sheet.doc-sheet-export-mode .barcode-col {
  padding: 1px 4px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
}
.doc-sheet.doc-sheet-export-mode .meta-barcode-svg { 
  height: 19px !important; 
  width: 115px !important; 
}
.doc-sheet.doc-sheet-export-mode .bc-container { 
  height: 19px !important; 
  background: #ffffff !important; 
  display: inline-flex !important;
  align-items: stretch !important;
  padding: 0 1px !important;
  box-sizing: border-box !important;
  overflow: hidden !important;
}
.doc-sheet.doc-sheet-export-mode .bc-bar.bc-b { 
  background: #000000 !important; 
}
.doc-sheet.doc-sheet-export-mode .bc-bar.bc-w { 
  background: #ffffff !important; 
}
.doc-sheet.doc-sheet-export-mode .meta-barcode-text { 
  font-size: 9.5px !important; 
  font-weight: 800 !important; 
  letter-spacing: 0.5px !important; 
  color: #000 !important;
  font-family: Arial, Helvetica, sans-serif !important;
}

.doc-sheet.doc-sheet-export-mode .doc-report-title {
  text-align: center !important;
  margin: 12px 0 10px !important;
  flex-shrink: 0 !important;
}
.doc-sheet.doc-sheet-export-mode .doc-report-title h3 { 
  font-size: 1.18rem !important; 
  font-weight: 800 !important;
  letter-spacing: 1px !important;
  text-decoration: underline !important;
  text-underline-offset: 3px !important;
  color: #000 !important;
  margin: 0 !important; 
  font-family: "Times New Roman", Times, Georgia, serif !important;
}

.doc-sheet.doc-sheet-export-mode .doc-table-container {
  overflow-x: visible !important;
  margin-top: 8px !important;
  padding: 0 !important;
  direction: ltr !important;
  flex: 1 1 auto !important;
}

.doc-sheet.doc-sheet-export-mode .doc-tests-table {
  width: 100% !important;
  min-width: 100% !important;
  border-collapse: collapse !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}

.doc-sheet.doc-sheet-export-mode .subhead-text {
  white-space: nowrap !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #000 !important;
  font-family: "Times New Roman", Times, Georgia, serif !important;
}
.doc-sheet.doc-sheet-export-mode .subhead-text u {
  text-underline-offset: 3px !important;
}

.doc-sheet.doc-sheet-export-mode th.col-ref {
  text-align: left !important;
  direction: ltr !important;
  font-family: "Times New Roman", Times, Georgia, serif !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  color: #000 !important;
  padding: 4px 4px 8px 2px !important;
}

.doc-sheet.doc-sheet-export-mode .col-test { 
  width: 40% !important; 
  text-align: left !important;
}
.doc-sheet.doc-sheet-export-mode .test-bullet { 
  font-size: 9px !important; 
  margin-right: 5px !important; 
}
.doc-sheet.doc-sheet-export-mode .test-name-text { 
  font-weight: 700 !important; 
  font-size: 11.5px !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
}
.doc-sheet.doc-sheet-export-mode .col-sep { 
  width: 3% !important; 
  text-align: center !important;
  font-weight: 900 !important;
}
.doc-sheet.doc-sheet-export-mode .col-val { 
  width: 14% !important; 
  text-align: left !important;
  font-size: 12px !important;
}
.doc-sheet.doc-sheet-export-mode .result-num { 
  font-weight: 800 !important; 
  font-size: 12.5px !important;
  font-family: Arial, sans-serif !important;
}
.doc-sheet.doc-sheet-export-mode .col-unit { 
  width: 13% !important; 
  font-weight: 700 !important;
  font-size: 11.5px !important;
  font-family: Arial, sans-serif !important;
}
.doc-sheet.doc-sheet-export-mode .col-ref { 
  width: 30% !important; 
  text-align: left !important;
  direction: ltr !important;
  font-weight: 700 !important;
  font-size: 11.5px !important;
  color: #000 !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  white-space: pre-line !important;
  line-height: 1.3 !important;
  padding-left: 2px !important;
}

.doc-sheet.doc-sheet-export-mode .comment-cell {
  padding: 6px 4px 8px !important;
  font-size: 11px !important;
  line-height: 1.35 !important;
  color: #111 !important;
  text-align: left !important;
  direction: ltr !important;
}

.doc-sheet.doc-sheet-export-mode .doc-comment-section {
  margin: 10px 8px 6px !important;
  padding: 8px 12px !important;
  background-color: #faf7f9 !important;
  border-left: 3.5px solid #7b205a !important;
  direction: ltr !important;
  text-align: left !important;
}

.doc-sheet.doc-sheet-export-mode .doc-comment-label {
  font-size: 11px !important;
}

.doc-sheet.doc-sheet-export-mode .doc-comment-text {
  font-size: 11px !important;
}

.doc-sheet.doc-sheet-export-mode .test-row.differential-row .col-test {
  padding-left: 24px !important;
}

.doc-sheet.doc-sheet-export-mode .mobile-swipe-guide {
  display: none !important;
}

.doc-sheet.doc-sheet-export-mode .doc-signature-section {
  display: flex !important;
  justify-content: flex-end !important;
  margin: 20px 25px 12px !important;
  direction: ltr !important;
  flex-shrink: 0 !important;
}
.doc-sheet.doc-sheet-export-mode .sig-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}
.doc-sheet.doc-sheet-export-mode .sig-name {
  font-family: "Dancing Script", "Caveat", "Brush Script MT", "Segoe Script", "Lucida Calligraphy", cursive !important;
  font-size: 1.35rem !important;
  font-weight: 700 !important;
  font-style: normal !important;
  text-shadow: none !important;
}
.doc-sheet.doc-sheet-export-mode .sig-thanks {
  font-size: 11px !important;
}

.doc-sheet.doc-sheet-export-mode .doc-footer-banner {
  margin: auto -28px -16px !important;
  margin-top: auto !important;
  padding: 8px 12px !important;
  font-size: 10.5px !important;
  font-weight: 800 !important;
  background: #edb0cc !important;
  color: #6f2f7d !important;
  text-align: center !important;
  border-radius: 4px !important;
  flex-shrink: 0 !important;
}

.doc-sheet.doc-sheet-export-mode .doc-footer-banner p,
.doc-sheet.doc-sheet-export-mode .footer-address {
  color: #6f2f7d !important;
}

.doc-sheet.doc-sheet-export-mode .footer-phones {
  font-size: 11.5px !important;
  font-weight: 900 !important;
  direction: ltr !important;
  color: #6f2f7d !important;
}

/* Print Styles */
@media print {
  @page {
    size: A4 portrait;
    margin: 0 !important;
  }
  *, *:before, *:after {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
    box-sizing: border-box !important;
  }
  html, body {
    background: #fff !important;
    color: #000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 210mm !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }
  .header,
  .overlay,
  .mobile-menu,
  .desktop-nav,
  .portal-header,
  .portal-mobile-menu,
  .portal-menu-overlay,
  .portal-desktop-nav,
  .header-actions,
  footer,
  .results-top-bar,
  .results-top-bar-actions,
  .download-button,
  .print-button,
  .back-button,
  #logoutButton,
  .patient-profile-card,
  .section-heading,
  .requests-grid,
  #loginView,
  #resultsMessage,
  .mobile-swipe-guide,
  .page-divider,
  .html2pdf__page-break {
    display: none !important;
    visibility: hidden !important;
  }
  .portal-shell,
  .results-view {
    padding: 0 !important;
    margin: 0 !important;
    width: 210mm !important;
    max-width: 210mm !important;
    display: block !important;
    overflow: visible !important;
  }
  .results-pages-container {
  width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  overflow-x: auto !important;
  -webkit-overflow-scrolling: touch !important;
  }

  .portal-mobile-menu nav a {
    width: 100% !important;
    min-height: 49px !important;
    margin: 0 0 5px !important;
    padding: 8px 10px !important;
    opacity: 1 !important;
    visibility: visible !important;
    color: var(--ink) !important;
  }

  .portal-mobile-menu nav a[aria-current="page"] { color: var(--brand-dark) !important; }
  .portal-mobile-footer { width: 100% !important; flex: 0 0 auto !important; }
}

@media screen and (max-width: 650px) {
  body { min-height: 100dvh; display: flex; flex-direction: column; }
  .portal-header { flex: 0 0 68px; height: 68px !important; }
  .portal-header-inner { height: 68px !important; }
  .portal-shell { width: 100% !important; max-width: 100% !important; flex: 1 0 auto; padding: 16px 12px 36px !important; }

  .login-layout {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 0 !important;
    gap: 14px !important;
  }

  .login-card,
  .welcome-copy {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    margin: 0 !important;
  }

  .login-card { padding: 22px 17px !important; border-radius: 20px !important; }
  .brand-badge-row { align-items: center; }
  .login-card h2 { font-size: 1.32rem !important; margin-bottom: 8px; }
  .login-hint { font-size: .86rem !important; line-height: 1.75; }

  .welcome-copy {
    overflow: hidden !important;
    padding: 22px 17px !important;
    border-radius: 20px !important;
    background: linear-gradient(140deg,#9d1d55,#cf397b) !important;
    color: #fff !important;
  }

  .welcome-copy::before { left: -260px !important; top: -210px !important; background: rgba(255,255,255,.08) !important; }
  .welcome-copy::after { right: -150px !important; bottom: -150px !important; background: rgba(255,255,255,.07) !important; }
  .welcome-copy .eyebrow,
  .welcome-copy h1,
  .welcome-copy h1 span,
  .welcome-copy > p:not(.eyebrow),
  .welcome-copy li { color: #fff !important; }
  .welcome-copy h1 { font-size: 1.65rem !important; line-height: 1.45 !important; }
  .welcome-copy ul { gap: 8px !important; }

  .patient-profile-card,
  .request-card { width: 100%; min-width: 0; }
  .profile-details-grid { grid-template-columns: 1fr !important; }
  .requests-grid { grid-template-columns: 1fr !important; }
  .request-meta { grid-template-columns: 1fr 1fr !important; }

  body > footer {
    width: 100% !important;
    min-height: 72px;
    margin: 0 !important;
    padding: 18px 14px !important;
    flex: 0 0 auto;
    background: #2b2330 !important;
  }
}

@media screen and (max-width: 390px) {
  .portal-brand small { display: none !important; }
  .portal-brand strong { font-size: .88rem !important; }
  .header-actions { gap: 5px !important; }
  .logout-button { padding-inline: 8px !important; }
  .request-meta { grid-template-columns: 1fr !important; }
  .portal-mobile-menu { width: calc(100vw - 18px) !important; }
}

/* 2026 mobile experience refresh */
.menu-button-lines {
  width: 20px;
  display: grid;
  gap: 4px;
}

.menu-button-lines i {
  display: block;
  width: 100%;
  height: 2px;
  border-radius: 10px;
  background: currentColor;
  transition: transform .2s ease, opacity .2s ease;
}

.menu-button-label {
  font-size: .76rem;
  font-weight: 800;
}

.portal-menu-button[aria-expanded="true"] .menu-button-lines i:first-child { transform: translateY(6px) rotate(45deg); }
.portal-menu-button[aria-expanded="true"] .menu-button-lines i:nth-child(2) { opacity: 0; }
.portal-menu-button[aria-expanded="true"] .menu-button-lines i:last-child { transform: translateY(-6px) rotate(-45deg); }

@media screen and (max-width: 900px) {
  .portal-header {
    height: 72px;
    box-shadow: 0 8px 28px rgba(45,23,35,.06);
  }

  .portal-header-inner {
    width: min(100% - 28px, 720px);
    height: 72px;
  }

  .portal-menu-button {
    width: auto;
    min-width: 82px;
    height: 44px;
    padding: 0 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid rgba(207,57,123,.14);
    box-shadow: 0 8px 20px rgba(157,29,85,.08);
  }

  .portal-mobile-menu {
    width: min(91vw, 390px);
    border-radius: 28px 0 0 28px;
    overflow: hidden;
    transform: translate3d(105%,0,0);
    transition: transform .32s cubic-bezier(.2,.8,.2,1);
  }

  .portal-mobile-head {
    min-height: 132px;
    padding: max(26px, env(safe-area-inset-top)) 22px 22px;
    background: radial-gradient(circle at 12% 15%, rgba(255,255,255,.2), transparent 32%), linear-gradient(135deg,#8d194d,#cf397b 62%,#dd5b94);
  }

  .portal-mobile-brand { padding-left: 42px; }
  .portal-mobile-brand img { width: 62px; height: 62px; box-shadow: 0 10px 30px rgba(55,5,28,.18); }
  .portal-mobile-brand strong { font-size: 1.06rem; }
  .portal-mobile-brand small { margin-top: 2px; }
  .portal-mobile-head > button { top: max(16px, env(safe-area-inset-top)); min-width: 42px; min-height: 42px; }

  .portal-mobile-menu nav {
    padding: 16px 14px;
    scrollbar-width: thin;
  }

  .portal-mobile-menu nav a {
    min-height: 50px;
    margin-bottom: 4px;
    padding: 11px 13px;
    border: 1px solid transparent;
  }

  .portal-mobile-menu nav a span {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    border-radius: 11px;
    background: var(--brand-soft);
  }

  .portal-mobile-menu nav a[aria-current="page"] {
    border-color: #f2c8dc;
    box-shadow: 0 8px 22px rgba(157,29,85,.08);
  }

  .portal-mobile-menu nav a[aria-current="page"] span { background: var(--brand); color: #fff; }
  .portal-mobile-footer { padding: 16px 20px max(18px, env(safe-area-inset-bottom)); }
}

@media screen and (max-width: 650px) {
  body { background: linear-gradient(180deg,#fff8fb 0,#fff 36%,#f5fbfa 100%); }
  .portal-shell { padding: 18px 12px 44px; }

  .login-layout {
    display: flex;
    flex-direction: column;
    gap: 14px;
    border: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }

  .login-card {
    order: 1;
    padding: 24px 18px;
    border: 1px solid rgba(207,57,123,.13);
    border-radius: 24px;
    background: rgba(255,255,255,.94);
  }

  .welcome-copy {
    order: 2;
    padding: 24px 18px;
    border-radius: 24px;
    text-align: right;
    box-shadow: 0 15px 38px rgba(157,29,85,.14);
  }

  .welcome-mark { margin: 0 0 14px; }
  .welcome-copy h1 { font-size: clamp(1.7rem,8vw,2.2rem); }
  .welcome-copy > p:not(.eyebrow) { margin-inline: 0; }
  .welcome-copy li { background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.12); border-radius: 13px; }

  .login-card form > button,
  .request-card button { min-height: 50px; }

  .phone-field { height: 58px; }
  .patient-profile-card, .request-card { box-shadow: 0 12px 34px rgba(48,29,39,.07); }
  .request-card { border-color: rgba(207,57,123,.14); }
  .results-top-bar { gap: 9px; }
  .results-top-bar > button { width: 100%; min-height: 46px; justify-content: center; }
}

@media screen and (max-width: 520px) {
  .results-top-bar-actions {
    gap: 8px !important;
  }
  .results-top-bar-actions .portal-zoom-toolbar {
    padding: 2px 4px !important;
    gap: 2px !important;
  }
  .results-top-bar-actions .zoom-btn {
    width: 30px !important;
    height: 32px !important;
  }
  .results-top-bar-actions .zoom-btn.fit-btn {
    width: auto !important;
    padding: 0 8px !important;
    font-size: 0.74rem !important;
    gap: 4px !important;
  }
  .results-top-bar-actions .zoom-indicator {
    min-width: 38px !important;
    font-size: 0.76rem !important;
  }
  .results-top-bar-actions .download-button {
    min-height: 38px;
    padding: 8px 14px;
    font-size: 0.82rem;
    white-space: nowrap;
  }
}

@media screen and (max-width: 420px) {
  .portal-header-inner { width: calc(100% - 20px); }
  .portal-brand { gap: 8px; }
  .brand-logo-img { width: 42px; height: 42px; border-radius: 13px; }
  .portal-brand strong { font-size: .94rem; }
  .portal-menu-button { min-width: 46px; width: 46px; padding: 0; }
  .menu-button-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .logout-button { min-width: 44px; min-height: 44px; }
  .portal-mobile-menu { width: calc(100vw - 18px); }
  .profile-header { flex-direction: row; }
  .profile-desc { display: none; }
  .request-meta { grid-template-columns: 1fr; }
  .section-heading { align-items: flex-end; }
}

@media screen and (max-width: 390px) {
  .portal-shell { padding-inline: 10px; }
  .login-card { padding-inline: 15px; }
  .brand-badge-row { gap: 8px; }
  .login-card .eyebrow { font-size: .6rem; }
  .profile-header { flex-direction: column; }
  .section-heading { align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .login-card form > button,
  .request-card,
  .request-card button,
  .download-button,
  .print-button { transition: none !important; }
}

/* Clear medical report presentation — matches the laboratory paper layout */
@media screen {
  .results-view {
    width: 100%;
  }

  .results-top-bar {
    width: min(100%, 794px);
    margin-inline: auto;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: rgba(255,255,255,.92);
    box-shadow: 0 10px 30px rgba(81,28,55,.06);
  }

  .page-sheet:not(.doc-sheet-export-mode) {
    border: 1px solid #c9c9c9;
    border-radius: 4px;
    background: #fff;
    color: #000;
    box-shadow: 0 20px 55px rgba(36,24,31,.13);
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-banner,
  .page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner {
    background: #e7a8c7 !important;
    color: #63236f !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en h2,
  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en p,
  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar h2,
  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar p,
  .page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner p {
    color: #63236f !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-meta-box {
    border-color: #222;
  }

  .page-sheet:not(.doc-sheet-export-mode) .val-cell {
    border-color: #777;
    background: #fff;
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-row td {
    border-bottom: 1px solid rgba(0,0,0,.035);
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-row:last-child td {
    border-bottom: 0;
  }
}

@media screen and (min-width: 651px) {
  .page-sheet:not(.doc-sheet-export-mode) {
    width: min(100%, 794px);
    min-height: 1120px;
    padding: 22px 28px 16px;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-banner {
    min-height: 96px;
    margin: -22px -28px 24px;
    padding: 13px 26px;
    border-radius: 0;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en h2 {
    font-size: 1.55rem;
    line-height: 1.15;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en p {
    font-size: .86rem;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar h2 {
    font-size: 1.65rem;
    line-height: 1.15;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar p {
    font-size: .86rem;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-logo-img {
    width: 72px;
    height: 72px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-meta-box {
    margin-bottom: 18px;
    padding: 6px 0;
    gap: 5px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .meta-row {
    grid-template-columns: 100px minmax(0,1.4fr) 92px minmax(0,1.25fr);
    gap: 6px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .label-cell,
  .page-sheet:not(.doc-sheet-export-mode) .val-cell {
    font-size: 12px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .val-cell {
    min-height: 27px;
    padding: 3px 7px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-report-title {
    margin: 10px 0 8px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-report-title h3 {
    font-size: 1.55rem;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-tests-table {
    font-size: 13px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-row td {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-name-text,
  .page-sheet:not(.doc-sheet-export-mode) .result-num,
  .page-sheet:not(.doc-sheet-export-mode) .col-unit,
  .page-sheet:not(.doc-sheet-export-mode) .col-ref {
    font-size: 12.5px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-signature-section {
    margin-top: 34px;
    margin-bottom: 20px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner {
    min-height: 56px;
    margin: auto -28px -16px;
    padding: 9px 16px;
    border-radius: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .page-sheet:not(.doc-sheet-export-mode) .footer-address {
    font-size: 11px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .footer-phones {
    font-size: 13px;
  }
}

@media screen and (max-width: 650px) {
  .results-top-bar {
    width: 100%;
    padding: 10px;
    border-radius: 14px;
  }

  .page-sheet:not(.doc-sheet-export-mode) {
    width: 794px !important;
    min-width: 794px !important;
    max-width: 794px !important;
    min-height: 1120px !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    box-sizing: border-box !important;
    border-radius: 4px !important;
    padding: 24px 28px 16px !important;
    background: #ffffff !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-banner {
    min-height: 96px !important;
    margin: -24px -28px 16px !important;
    padding: 12px 20px !important;
    border-radius: 4px 4px 0 0 !important;
    flex: 0 0 auto !important;
    width: calc(100% + 56px) !important;
    box-sizing: border-box !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-table-container {
    flex: 1 0 auto !important;
    min-height: 250px !important;
    margin-inline: -2px !important;
    padding-bottom: 5px !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner {
    min-height: 52px !important;
    margin: auto -28px -16px !important;
    margin-top: auto !important;
    width: calc(100% + 56px) !important;
    border-radius: 0 0 4px 4px !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en h2 {
    font-size: 1rem !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-en p {
    font-size: .62rem !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar h2 {
    font-size: 1.08rem !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-header-ar p {
    font-size: .62rem !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-logo-img {
    width: 50px;
    height: 50px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-report-title h3 {
    font-size: 1.22rem !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .mobile-swipe-guide {
    margin: 10px 0 7px;
    padding: 7px 10px;
    font-size: 11px;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-table-container {
    margin-inline: -2px !important;
    padding-bottom: 5px !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-tests-table {
    min-width: 620px !important;
    table-layout: fixed !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-row td {
    padding: 8px 5px !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .test-name-text,
  .page-sheet:not(.doc-sheet-export-mode) .result-num,
  .page-sheet:not(.doc-sheet-export-mode) .col-unit {
    font-size: 12px !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .col-ref {
    font-size: 11px !important;
    line-height: 1.4 !important;
  }

  .page-sheet:not(.doc-sheet-export-mode) .doc-signature-section {
    margin-top: 24px !important;
  }

  .doc-sheet {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.12) !important;
  }
}

/* Final report identity override (must remain after all legacy media rules). */
.doc-header-banner,
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-banner,
.page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .doc-header-banner {
  background: #edb0cc !important;
  border-bottom: none !important;
  border-radius: 4px !important;
}
.doc-logo-img,
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-logo-img,
.page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .doc-logo-img {
  width: 96px !important;
  height: 96px !important;
  border-radius: 50% !important;
  background: #ffffff !important;
  object-fit: contain !important;
}

.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-en h2,
.page-sheet:not(.compact-doc-sheet) .doc-header-en h2 {
  font-size: 1.85rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
}
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-en p,
.page-sheet:not(.compact-doc-sheet) .doc-header-en p {
  font-size: 1.15rem !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
}

.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-ar,
.page-sheet:not(.compact-doc-sheet) .doc-header-ar {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
}

.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-ar h2,
.page-sheet:not(.compact-doc-sheet) .doc-header-ar h2 {
  font-size: 2.1rem !important;
  font-weight: 900 !important;
  line-height: 1.2 !important;
  text-align: center !important;
}
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-ar p,
.page-sheet:not(.compact-doc-sheet) .doc-header-ar p {
  font-size: 1.25rem !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  text-align: center !important;
}

/* Final Footer Banner override for both Screen & Export Mode */
.doc-footer-banner,
.page-sheet .doc-footer-banner,
.doc-sheet .doc-footer-banner,
.doc-sheet.doc-sheet-export-mode .doc-footer-banner,
.page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner {
  background: #edb0cc !important;
  color: #6f2f7d !important;
  border-radius: 0 0 4px 4px !important;
  border: none !important;
  box-sizing: border-box !important;
  width: calc(100% + 56px) !important;
  margin: auto -28px -24px !important;
  margin-top: auto !important;
  padding: 10px 16px !important;
  min-height: 52px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
  z-index: 10 !important;
}

.page-sheet .doc-footer-banner p,
.doc-sheet .doc-footer-banner p,
.page-sheet .footer-address,
.doc-sheet .footer-address,
.doc-sheet.doc-sheet-export-mode .doc-footer-banner p,
.doc-sheet-export-mode .doc-footer-banner p,
.page-sheet.doc-sheet-export-mode .doc-footer-banner p,
.doc-sheet.doc-sheet-export-mode .footer-address,
.doc-sheet-export-mode .footer-address,
.page-sheet.doc-sheet-export-mode .footer-address {
  display: block !important;
  color: #6f2f7d !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  line-height: 1.4 !important;
  margin: 1px 0 !important;
  text-align: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.page-sheet .doc-footer-banner .footer-phones,
.doc-sheet .doc-footer-banner .footer-phones,
.page-sheet .footer-phones,
.doc-sheet .footer-phones,
.doc-sheet.doc-sheet-export-mode .doc-footer-banner .footer-phones,
.doc-sheet-export-mode .doc-footer-banner .footer-phones,
.page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-phones {
  display: block !important;
  font-size: 12px !important;
  font-weight: 900 !important;
  color: #6f2f7d !important;
  direction: ltr !important;
  margin: 2px 0 0 !important;
  text-align: center !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.results-pages-container.doc-sheet-export-mode {
  zoom: 1 !important;
  transform: none !important;
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ========================================================
   Live Sync & Dynamic Status Notifications (Real-Time Portal)
   ======================================================== */
.refresh-status-button {
  border: 1px solid #b0deda;
  background: #f0fbf9;
  color: var(--teal);
  border-radius: 12px;
  padding: 8px 14px;
  font: inherit;
  font-weight: 700;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all .2s ease;
  user-select: none;
}
.refresh-status-button:hover {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  box-shadow: 0 4px 14px rgba(21, 127, 120, 0.2);
}
.refresh-status-button.spinning .refresh-icon {
  display: inline-block;
  animation: spinPortalRefresh 0.8s linear infinite;
}
@keyframes spinPortalRefresh {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Floating Non-Intrusive Live Toast: Never causes layout shifts or screen jitter */
.portal-live-alert {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  width: min(92vw, 540px);
  background: rgba(235, 252, 250, 0.96);
  border: 1.5px solid #7edcd3;
  color: #0b5e56;
  border-radius: 18px;
  padding: 14px 20px;
  font-weight: 700;
  font-size: .95rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  box-shadow: 0 16px 36px rgba(21, 127, 120, 0.2), 0 4px 12px rgba(0,0,0,0.06);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: portalSlideDown 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  box-sizing: border-box;
}
.portal-live-alert.alert-warning {
  background: rgba(255, 248, 230, 0.96);
  border-color: #ffd591;
  color: #873800;
  box-shadow: 0 16px 36px rgba(217, 119, 6, 0.18), 0 4px 12px rgba(0,0,0,0.06);
}
.portal-live-alert .alert-content {
  display: flex;
  align-items: center;
  gap: 10px;
}
.portal-live-alert .alert-close {
  background: transparent;
  border: 0;
  color: inherit;
  font-size: 1.3rem;
  cursor: pointer;
  padding: 0 6px;
  line-height: 1;
  opacity: 0.7;
  transition: opacity .15s;
}
.portal-live-alert .alert-close:hover {
  opacity: 1;
}

@keyframes portalSlideDown {
  from { opacity: 0; transform: translate(-50%, -16px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

/* Gentle Aura Pulse (Pure Lighting - Zero Scale / Zero Layout Shifting) */
@keyframes statusAuraSuccess {
  0% {
    box-shadow: 0 8px 24px rgba(20, 33, 61, 0.05);
    border-color: var(--line);
  }
  35% {
    box-shadow: 0 10px 32px rgba(21, 127, 120, 0.25), 0 0 0 3px rgba(21, 127, 120, 0.18);
    border-color: #48c1b5;
  }
  70% {
    box-shadow: 0 10px 28px rgba(21, 127, 120, 0.18), 0 0 0 2px rgba(21, 127, 120, 0.12);
    border-color: #7edcd3;
  }
  100% {
    box-shadow: 0 8px 24px rgba(20, 33, 61, 0.05);
    border-color: #b0deda;
  }
}

.card-just-approved {
  animation: statusAuraSuccess 2.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-color: #b0deda !important;
}

/* Smooth in-place transitions for card elements */
.request-card {
  transition: border-color 0.4s ease, box-shadow 0.4s ease, background-color 0.4s ease;
}
.status {
  transition: background 0.35s ease, color 0.35s ease, border-color 0.35s ease;
}
.request-action-wrap {
  transition: opacity 0.3s ease;
}
.profile-detail-item strong {
  transition: color 0.3s ease;
}






/* ==========================================================================
   Compact Report Layout for High-Density Tests (Urine Analysis, Stool Examination)
   Ensures all ~25 tests fit comfortably on a single A4 page without clipping.
   ========================================================================== */
.compact-doc-sheet {
  padding-top: 12px !important;
  padding-bottom: 8px !important;
}

.compact-doc-sheet .doc-header-banner {
  min-height: 60px !important;
  margin-bottom: 6px !important;
  padding: 4px 14px !important;
}

.compact-doc-sheet .doc-header-logo .doc-logo-img {
  width: 54px !important;
  height: 54px !important;
}

.compact-doc-sheet .doc-header-en h2,
.compact-doc-sheet .doc-header-ar h2 {
  font-size: 1.45rem !important;
}

.compact-doc-sheet .doc-header-en p,
.compact-doc-sheet .doc-header-ar p {
  font-size: 0.95rem !important;
}

.compact-doc-sheet .doc-meta-box {
  margin-bottom: 6px !important;
}

.compact-doc-sheet .doc-meta-box .meta-cell {
  padding: 2.5px 6px !important;
  font-size: 10.5px !important;
  line-height: 1.2 !important;
}

.compact-doc-sheet .doc-meta-box .meta-barcode-wrap svg,
.compact-doc-sheet .doc-meta-box .bc-container {
  height: 22px !important;
}

.compact-doc-sheet .doc-report-title {
  margin: 2px 0 2px !important;
  padding: 2px 0 !important;
}

.compact-doc-sheet .doc-report-title h3 {
  font-size: 1.1rem !important;
  margin: 0 !important;
}

.compact-doc-sheet .doc-panel-title {
  font-size: 0.95rem !important;
  margin: 1px 0 3px !important;
}

.compact-doc-sheet .section-subhead-row th {
  padding: 2px 4px 1px !important;
  font-size: 0.85rem !important;
  line-height: 1.15 !important;
}

.compact-doc-sheet .test-row td {
  padding: 2px 4px !important;
  line-height: 1.15 !important;
}

.compact-doc-sheet .test-name-text {
  font-size: 12px !important;
}

.compact-doc-sheet .result-num {
  font-size: 13px !important;
}

.compact-doc-sheet .col-unit {
  font-size: 10.5px !important;
}

.compact-doc-sheet .col-ref {
  font-size: 10.5px !important;
  line-height: 1.18 !important;
}

.compact-doc-sheet .doc-comment-section {
  margin: 3px 6px 2px !important;
  padding: 3px 8px !important;
}

.compact-doc-sheet .doc-signature-section {
  margin: 4px 20px 2px !important;
  padding-bottom: 2px !important;
}

.compact-doc-sheet .doc-footer-banner {
  min-height: 34px !important;
  padding: 3px 8px !important;
  margin-top: 3px !important;
}

.compact-doc-sheet .footer-page-badge {
  font-size: 8px !important;
  padding: 1px 4px !important;
  right: 6px !important;
}

.compact-doc-sheet .doc-footer-banner p {
  font-size: 9px !important;
  line-height: 1.15 !important;
  margin: 0 !important;
}

/* Compact Export Mode */
.doc-sheet.doc-sheet-export-mode.compact-doc-sheet {
  padding: 12px 20px 8px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-header-banner {
  margin: -12px -20px 4px !important;
  min-height: 58px !important;
  padding: 4px 12px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-meta-box {
  margin-bottom: 4px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-meta-box .meta-cell {
  padding: 2px 5px !important;
  font-size: 10px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .section-subhead-row th {
  padding: 2px 3px !important;
  font-size: 0.82rem !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .test-row td {
  padding: 1.8px 3px !important;
  line-height: 1.1 !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .test-name-text {
  font-size: 10px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .result-num {
  font-size: 10.5px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .col-unit,
.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .col-ref {
  font-size: 9.5px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-signature-section {
  margin: 4px 15px 1px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-footer-banner {
  margin: 3px -20px -8px !important;
  min-height: 32px !important;
  padding: 3px 6px !important;
}

.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .footer-page-badge {
  font-size: 8px !important;
  padding: 1px 4px !important;
  right: 6px !important;
}

/* Compact Print Media */
@media print {
  .doc-sheet.compact-doc-sheet,
  .page-sheet.compact-doc-sheet {
    padding: 4mm 8mm 3mm !important;
  }

  .compact-doc-sheet .doc-header-banner {
    margin: -4mm -8mm 4px !important;
    min-height: 56px !important;
    padding: 4px 10px !important;
  }

  .compact-doc-sheet .doc-meta-box {
    margin-bottom: 4px !important;
  }

  .compact-doc-sheet .doc-meta-box .meta-cell {
    padding: 2px 4px !important;
    font-size: 9.5px !important;
  }

  .compact-doc-sheet .test-row td {
    padding: 1.6px 3px !important;
    line-height: 1.1 !important;
  }

  .compact-doc-sheet .test-name-text,
  .compact-doc-sheet .result-num {
    font-size: 10px !important;
  }

  .compact-doc-sheet .col-unit,
  .compact-doc-sheet .col-ref {
    font-size: 9.5px !important;
  }

  .compact-doc-sheet .doc-signature-section {
    margin: 3px 12px 1px !important;
  }

  .compact-doc-sheet .doc-footer-banner {
    margin: 3px -8mm -3mm !important;
    padding: 3px 6px !important;
  }

  .compact-doc-sheet .footer-page-badge {
    font-size: 7.5px !important;
    padding: 1px 3px !important;
    right: 4px !important;
  }
}

.doc-comment-section {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
}

.doc-comment-label {
  flex: 0 0 auto;
  margin-right: 0;
}

.doc-comment-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
}

.compound-val-wrap {
  flex-wrap: nowrap;
  gap: 7px;
  min-width: max-content;
}

.compound-sub-name,
.val-highlight {
  white-space: nowrap;
}

.doc-sheet-export-mode .test-row td {
  padding-top: 3px !important;
  padding-bottom: 3px !important;
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }

  html,
  body {
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    background: #fff !important;
  }

  .portal-shell,
  .results-view,
  .results-pages-container {
    display: block !important;
    width: 210mm !important;
    max-width: 210mm !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow: visible !important;
    transform: none !important;
    zoom: 1 !important;
  }

  .page-sheet,
  .result-card.doc-sheet {
    width: 210mm !important;
    max-width: 210mm !important;
    height: 297mm !important;
    min-height: 297mm !important;
    max-height: none !important;
    margin: 0 !important;
    padding: 7mm 10mm 6mm !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    overflow: visible !important;
    box-shadow: none !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    page-break-after: always !important;
    break-after: page !important;
  }

  .page-sheet:last-child,
  .result-card.doc-sheet:last-child {
    page-break-after: auto !important;
    break-after: auto !important;
  }

  .doc-header-banner {
    min-height: 22mm !important;
    margin: -7mm -10mm 3mm !important;
    padding: 4mm 6mm !important;
    border-radius: 0 !important;
    flex: 0 0 auto !important;
  }

  .doc-logo-img {
    width: 20mm !important;
    height: 20mm !important;
  }

  .doc-meta-box {
    margin: 0 0 3mm !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
  }

  .doc-report-title {
    margin: 2mm 0 !important;
    flex: 0 0 auto !important;
  }

  .doc-panel-title {
    margin: 1mm 2mm 2mm !important;
    flex: 0 0 auto !important;
  }

  .doc-table-container {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    overflow: visible !important;
  }

  .doc-tests-table {
    width: 100% !important;
    table-layout: fixed !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .section-subhead-row,
  .test-row,
  .comment-row {
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .section-subhead-row th {
    padding: 3px 4px 5px !important;
    font-size: 11px !important;
  }

  .test-row td,
  .test-row.compound-sub-row td {
    padding: 2px 4px !important;
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  tr.test-row.differential-row td.col-test {
    padding-left: 24px !important;
  }

  .test-name-text,
  .result-num,
  .compound-sub-name,
  .col-unit,
  .col-ref {
    font-size: 10px !important;
    line-height: 1.15 !important;
  }

  .col-val {
    white-space: nowrap !important;
  }

  .doc-comment-section {
    margin: 3mm 2mm 1mm !important;
    padding: 2mm 3mm !important;
    flex: 0 0 auto !important;
  }

  .doc-comment-label,
  .doc-comment-text {
    font-size: 10px !important;
    line-height: 1.2 !important;
  }

  .doc-signature-section {
    margin: 4mm 5mm 2mm !important;
    padding: 0 !important;
    flex: 0 0 auto !important;
  }

  .doc-footer-banner {
    min-height: 14mm !important;
    margin: auto -10mm -6mm !important;
    padding: 2mm 4mm !important;
    border-radius: 0 !important;
    flex: 0 0 auto !important;
  }

  .page-sheet .doc-footer-banner {
    margin-top: auto !important;
  }

  .mobile-swipe-guide,
  .page-divider,
  .html2pdf__page-break {
    display: none !important;
  }
}

.page-sheet:not(.compact-doc-sheet) .doc-header-banner {
  min-height: 116px !important;
  padding: 14px 24px !important;
}

.page-sheet:not(.compact-doc-sheet) .doc-header-logo .doc-logo-img {
  width: 112px !important;
  height: 112px !important;
}

.page-sheet.compact-doc-sheet .doc-header-banner {
  min-height: 82px !important;
  padding: 9px 18px !important;
}

.page-sheet.compact-doc-sheet .doc-header-logo .doc-logo-img {
  width: 74px !important;
  height: 74px !important;
}

.page-sheet.compact-doc-sheet .doc-header-en h2,
.page-sheet.compact-doc-sheet .doc-header-ar h2 {
  font-size: 1.55rem !important;
}

.page-sheet.compact-doc-sheet .test-name-text {
  font-size: 12px !important;
}

.page-sheet.compact-doc-sheet .result-num {
  font-size: 13px !important;
}

.page-sheet.compact-doc-sheet .col-unit,
.page-sheet.compact-doc-sheet .col-ref {
  font-size: 10.5px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-header-banner {
  min-height: 82px !important;
  padding: 9px 18px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-header-logo .doc-logo-img {
  width: 74px !important;
  height: 74px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .test-name-text {
  font-size: 10.75px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .result-num {
  font-size: 11.25px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .col-unit,
.page-sheet.doc-sheet-export-mode.compact-doc-sheet .col-ref {
  font-size: 10px !important;
}

.page-sheet .doc-footer-banner {
  align-self: stretch !important;
  box-sizing: border-box !important;
  border-radius: 0 !important;
  margin-top: auto !important;
}

.page-sheet:not(.doc-sheet-export-mode) .doc-footer-banner {
  width: calc(100% + 56px) !important;
  margin-right: -28px !important;
  margin-bottom: -16px !important;
  margin-left: -28px !important;
  min-height: 52px !important;
}

.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-footer-banner {
  width: calc(100% + 56px) !important;
  margin-right: -28px !important;
  margin-bottom: -16px !important;
  margin-left: -28px !important;
  min-height: 52px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-footer-banner {
  width: calc(100% + 40px) !important;
  margin-right: -20px !important;
  margin-bottom: -8px !important;
  margin-left: -20px !important;
  min-height: 42px !important;
}

@media print {
  .page-sheet:not(.compact-doc-sheet) .doc-header-banner {
    min-height: 30mm !important;
    margin: -7mm -10mm 3mm !important;
    padding: 5mm 7mm !important;
  }

  .page-sheet:not(.compact-doc-sheet) .doc-header-logo .doc-logo-img {
    width: 27mm !important;
    height: 27mm !important;
  }

  .page-sheet.compact-doc-sheet .doc-header-banner {
    min-height: 26mm !important;
    margin: -4mm -8mm 3mm !important;
    padding: 4mm 6mm !important;
  }

  .page-sheet.compact-doc-sheet .doc-header-logo .doc-logo-img {
    width: 23mm !important;
    height: 23mm !important;
  }

  .page-sheet.compact-doc-sheet .test-name-text {
    font-size: 10.5px !important;
  }

  .page-sheet.compact-doc-sheet .result-num {
    font-size: 11px !important;
  }

  .page-sheet.compact-doc-sheet .doc-footer-banner {
    width: calc(100% + 20mm) !important;
    margin-right: -10mm !important;
    margin-bottom: -6mm !important;
    margin-left: -10mm !important;
    min-height: 17mm !important;
  }

  .page-sheet .doc-footer-banner .footer-address {
    font-size: 9.5px !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
  }

  .page-sheet .doc-footer-banner .footer-phones {
    font-size: 11px !important;
  }

  .footer-page-badge {
    display: none !important;
  }
}

.page-sheet :is(.age-sex-label, .referred-by-label) {
  font-size: 12.5px !important;
  font-weight: 900 !important;
}

.page-sheet.doc-sheet-export-mode :is(.age-sex-label, .referred-by-label) {
  font-size: 11.5px !important;
}

.page-sheet .doc-footer-banner {
  padding-top: 14px !important;
  padding-bottom: 8px !important;
  min-height: 58px !important;
}

.page-sheet .footer-content-wrap {
  padding-top: 4px !important;
}

.page-sheet .doc-footer-banner .footer-address {
  font-size: 11.5px !important;
  line-height: 1.3 !important;
}

.page-sheet .doc-footer-banner .footer-phones {
  font-size: 13.5px !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner {
  min-height: 60px !important;
  padding-top: 12px !important;
  padding-bottom: 8px !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-address {
  font-size: 12px !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-phones {
  font-size: 13.5px !important;
}

@media print {
  .page-sheet.doc-sheet-export-mode :is(.age-sex-label, .referred-by-label),
  .page-sheet:not(.doc-sheet-export-mode) :is(.age-sex-label, .referred-by-label) {
    font-size: 12px !important;
  }

  .page-sheet .doc-header-ar {
    transform: translateX(3mm) !important;
  }

  .page-sheet .doc-header-ar h2 {
    font-size: 1.8rem !important;
  }

  .page-sheet.doc-sheet-export-mode .doc-footer-banner {
    min-height: 19mm !important;
    padding-top: 4mm !important;
    padding-bottom: 2mm !important;
  }

  .page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-address {
    font-size: 10.5px !important;
  }

  .page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-phones {
    font-size: 12.5px !important;
  }

  .page-sheet .doc-footer-banner {
    min-height: 19mm !important;
    padding-top: 4mm !important;
    padding-bottom: 2mm !important;
  }

  .page-sheet .doc-footer-banner .footer-content-wrap {
    padding-top: 2mm !important;
  }
}

/* Keep test labels and values legible on screen, in exports, and on paper. */
.doc-sheet:not(.compact-doc-sheet) .test-name-text,
.page-sheet:not(.compact-doc-sheet) .test-name-text,
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .test-name-text,
.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .test-name-text {
  font-size: 14px !important;
}

.doc-sheet:not(.compact-doc-sheet) .result-num,
.page-sheet:not(.compact-doc-sheet) .result-num,
.doc-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .result-num,
.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .result-num {
  font-size: 16px !important;
}

.doc-sheet:not(.compact-doc-sheet) .col-val,
.page-sheet:not(.compact-doc-sheet) .col-val {
  font-size: 14px !important;
}

.doc-sheet:not(.compact-doc-sheet) .val-highlight,
.page-sheet:not(.compact-doc-sheet) .val-highlight,
.doc-sheet:not(.compact-doc-sheet) .val-pending,
.page-sheet:not(.compact-doc-sheet) .val-pending {
  font-size: 15px !important;
}

.doc-sheet:not(.compact-doc-sheet) .subhead-text,
.page-sheet:not(.compact-doc-sheet) .subhead-text {
  font-size: 1.08rem !important;
}

.doc-sheet.compact-doc-sheet .test-name-text,
.page-sheet.compact-doc-sheet .test-name-text,
.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .test-name-text,
.page-sheet.doc-sheet-export-mode.compact-doc-sheet .test-name-text {
  font-size: 12.5px !important;
}

.doc-sheet.compact-doc-sheet .result-num,
.page-sheet.compact-doc-sheet .result-num,
.doc-sheet.doc-sheet-export-mode.compact-doc-sheet .result-num,
.page-sheet.doc-sheet-export-mode.compact-doc-sheet .result-num {
  font-size: 14px !important;
}

.doc-sheet.compact-doc-sheet .col-val,
.page-sheet.compact-doc-sheet .col-val,
.doc-sheet.compact-doc-sheet .val-highlight,
.page-sheet.compact-doc-sheet .val-highlight,
.doc-sheet.compact-doc-sheet .val-pending,
.page-sheet.compact-doc-sheet .val-pending {
  font-size: 13px !important;
}

.doc-sheet.compact-doc-sheet .subhead-text,
.page-sheet.compact-doc-sheet .subhead-text {
  font-size: 1rem !important;
}

.page-sheet .result-num.result-multiline-value,
.page-sheet.doc-sheet-export-mode .result-num.result-multiline-value,
.page-sheet.compact-doc-sheet .result-num.result-multiline-value,
.doc-sheet .result-num.result-multiline-value {
  display: inline-block !important;
  white-space: normal !important;
  line-height: 1.35 !important;
  overflow-wrap: anywhere !important;
  vertical-align: middle;
}

/* Match direct PDF downloads to the A4 browser print layout. */
.results-pages-container.doc-sheet-export-mode {
  width: 210mm !important;
  min-width: 210mm !important;
  max-width: 210mm !important;
  gap: 0 !important;
  align-items: flex-start !important;
  background: #fff !important;
  margin: 0 !important;
  padding: 0 !important;
}

.doc-sheet.doc-sheet-export-mode,
.doc-sheet-export-mode .page-sheet,
.page-sheet.doc-sheet-export-mode {
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  height: auto !important;
  min-height: 1123px !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 22px 28px 16px !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-start !important;
  overflow: visible !important;
  page-break-after: always !important;
  break-after: page !important;
  box-sizing: border-box !important;
  background: #ffffff !important;
}

.doc-sheet-export-mode .sheet-scale-wrapper {
  width: 794px !important;
  min-width: 794px !important;
  max-width: 794px !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
}

.doc-sheet-export-mode .page-divider {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
}

.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-banner {
  width: calc(100% + 56px) !important;
  min-height: 112px !important;
  margin: -22px -28px 12px !important;
  padding: 14px 24px !important;
  border-radius: 0 !important;
  background: #edb0cc !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
}

.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-header-logo .doc-logo-img {
  width: 96px !important;
  height: 96px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet {
  padding: 16px 26px 14px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-header-banner {
  width: calc(100% + 52px) !important;
  min-height: 98px !important;
  margin: -16px -26px 10px !important;
  padding: 12px 22px !important;
  border-radius: 0 !important;
  background: #edb0cc !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-header-logo .doc-logo-img {
  width: 84px !important;
  height: 84px !important;
}

.page-sheet.doc-sheet-export-mode .doc-meta-box {
  margin: 0 0 3mm !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

.page-sheet.doc-sheet-export-mode .meta-row {
  grid-template-columns: 105px minmax(0, 1.4fr) 95px minmax(0, 1.25fr) !important;
  gap: 6px !important;
  margin-bottom: 0 !important;
}

.page-sheet.doc-sheet-export-mode .label-cell,
.page-sheet.doc-sheet-export-mode .val-cell {
  font-size: 11.5px !important;
}

.page-sheet.doc-sheet-export-mode .doc-report-title {
  margin: 2mm 0 !important;
  flex: 0 0 auto !important;
}

.page-sheet.doc-sheet-export-mode .doc-panel-title {
  margin: 1mm 2mm 2mm !important;
  flex: 0 0 auto !important;
}

.page-sheet.doc-sheet-export-mode .doc-table-container {
  margin: 0 !important;
  overflow: visible !important;
}

.page-sheet.doc-sheet-export-mode .doc-tests-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.page-sheet.doc-sheet-export-mode .col-test { width: 36% !important; }
.page-sheet.doc-sheet-export-mode .col-sep { width: 2% !important; }
.page-sheet.doc-sheet-export-mode .col-val { width: 20% !important; }
.page-sheet.doc-sheet-export-mode .col-unit { width: 14% !important; white-space: nowrap !important; }
.page-sheet.doc-sheet-export-mode .col-ref { width: 28% !important; }

.page-sheet.doc-sheet-export-mode .section-subhead-row th {
  padding: 3px 4px 5px !important;
}

.page-sheet.doc-sheet-export-mode .test-row td,
.page-sheet.doc-sheet-export-mode .test-row.compound-sub-row td {
  padding: 2px 4px !important;
  font-size: 10px !important;
  line-height: 1.15 !important;
}

.page-sheet.doc-sheet-export-mode .test-name-text,
.page-sheet.doc-sheet-export-mode .result-num,
.page-sheet.doc-sheet-export-mode .compound-sub-name,
.page-sheet.doc-sheet-export-mode .col-unit,
.page-sheet.doc-sheet-export-mode .col-ref {
  line-height: 1.15 !important;
}

.page-sheet.doc-sheet-export-mode .flag-badge {
  font-size: 10px !important;
  line-height: 1.15 !important;
  padding: 1px 4px !important;
  white-space: nowrap !important;
}

.page-sheet.doc-sheet-export-mode .doc-comment-section {
  margin: 3mm 2mm 1mm !important;
  padding: 2mm 3mm !important;
  flex: 0 0 auto !important;
}

.page-sheet.doc-sheet-export-mode .doc-comment-label,
.page-sheet.doc-sheet-export-mode .doc-comment-text {
  font-size: 10px !important;
  line-height: 1.2 !important;
}

.page-sheet.doc-sheet-export-mode .doc-signature-section {
  margin: 12px 18px 8px !important;
  padding: 0 !important;
  flex: 0 0 auto !important;
}

.page-sheet.doc-sheet-export-mode .sig-title {
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #1e293b !important;
}

.page-sheet.doc-sheet-export-mode .sig-name {
  font-size: 1.35rem !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner {
  min-height: 68px !important;
  border-radius: 0 !important;
  background: #edb0cc !important;
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-address {
  font-size: 11px !important;
  line-height: 1.25 !important;
  color: #6f2f7d !important;
}

.page-sheet.doc-sheet-export-mode .doc-footer-banner .footer-phones {
  font-size: 13px !important;
  color: #6f2f7d !important;
}

.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet) .doc-footer-banner {
  width: calc(100% + 56px) !important;
  min-height: 70px !important;
  margin: auto -28px -16px !important;
  margin-top: auto !important;
  padding: 12px 16px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-footer-banner {
  width: calc(100% + 52px) !important;
  min-height: 68px !important;
  margin: auto -26px -14px !important;
  margin-top: auto !important;
  padding: 10px 16px !important;
}


/* ==========================================================================
   Design Standardization 2026:
   - Test Name: Bold (700)
   - Result Value: Normal (400)
   - Reference Range: Bold (800)
   - Section Subhead Result & Reference Range columns aligned
   ========================================================================== */
.test-name-text,
.doc-sheet .test-name-text,
.page-sheet .test-name-text,
.doc-sheet-export-mode .test-name-text,
.doc-tests-table .test-name-text {
  font-weight: 700 !important;
}

.result-num,
.doc-sheet .result-num,
.page-sheet .result-num,
.doc-sheet-export-mode .result-num,
.doc-tests-table .result-num {
  font-weight: 800 !important;
  font-size: 14px !important;
  color: #0f172a !important;
}

.col-ref,
.doc-sheet .col-ref,
.page-sheet .col-ref,
.doc-sheet-export-mode .col-ref,
.doc-tests-table td.col-ref,
.doc-tests-table .ref-text {
  font-weight: 700 !important;
  font-size: 12.5px !important;
  color: #334155 !important;
}

.test-name-text,
.doc-sheet .test-name-text,
.page-sheet .test-name-text,
.doc-sheet-export-mode .test-name-text,
.doc-tests-table .test-name-text {
  font-weight: 800 !important;
  font-size: 13.5px !important;
  color: #0f172a !important;
}

.section-subhead-row th.col-val,
.section-subhead-row th.col-ref {
  text-align: left !important;
  direction: ltr !important;
  font-family: "Times New Roman", Times, Georgia, serif !important;
  font-weight: 700 !important;
}


/* ==========================================================================
   2026 Enhanced Medical Result Presentation (High Readability & Visual Polish)
   ========================================================================== */
.zoom-toggle-button {
  border: 1px solid #0284c7 !important;
  background: linear-gradient(135deg, #0284c7, #0369a1) !important;
  color: #ffffff !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  padding: 10px 18px !important;
  cursor: pointer !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 7px !important;
  font-size: 13.5px !important;
  transition: all 0.2s ease !important;
  box-shadow: 0 2px 8px rgba(2, 132, 199, 0.25) !important;
  font-family: inherit !important;
}

.zoom-toggle-button:hover,
.zoom-toggle-button:active {
  background: linear-gradient(135deg, #0369a1, #075985) !important;
  transform: translateY(-1px) !important;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35) !important;
}

.zoom-toggle-button.is-zoomed {
  background: linear-gradient(135deg, #475569, #334155) !important;
  border-color: #334155 !important;
}

/* Subtle row borders for test results */
.doc-tests-table tr.test-row td {
  padding-inline: 6px !important;
  border-bottom: 1px solid #f1f5f9 !important;
}

.doc-tests-table tr.test-row:hover td {
  background-color: #f8fafc !important;
}

/* Enhanced abnormal result highlighter */
.result-num.val-abnormal,
.val-highlight {
  background: #fef08a !important;
  border: 1.5px solid #eab308 !important;
  color: #713f12 !important;
  padding: 2px 7px !important;
  border-radius: 4px !important;
  font-weight: 900 !important;
  font-size: 14px !important;
  display: inline-block !important;
  white-space: nowrap !important;
  box-shadow: 0 1px 3px rgba(234, 179, 8, 0.25) !important;
}

/* Distinctive Flag Badges */
.flag-badge {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 1.5px 6.5px !important;
  border-radius: 4px !important;
  font-size: 11px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  vertical-align: middle !important;
  margin-left: 6px !important;
  text-transform: uppercase !important;
  letter-spacing: 0.3px !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

.flag-badge.flag-l,
.flag-badge.l,
.flag-badge.flag-low,
.flag-badge.low {
  background: #e0f2fe !important;
  color: #0369a1 !important;
  border: 1px solid #7dd3fc !important;
}

.flag-badge.flag-h,
.flag-badge.h,
.flag-badge.flag-high,
.flag-badge.high {
  background: #fee2e2 !important;
  color: #b91c1c !important;
  border: 1px solid #fca5a5 !important;
}

.flag-badge.flag-abnormal,
.flag-badge.abnormal {
  background: #fef3c7 !important;
  color: #92400e !important;
  border: 1px solid #fcd34d !important;
}

/* Modern, high-end comment note box */
.comment-box {
  background: #fdf2f8 !important;
  border: 1px solid #fbcfe8 !important;
  border-left: 4px solid #cf397b !important;
  border-radius: 6px !important;
  padding: 11px 16px !important;
  margin: 8px 0 !important;
  font-size: 13px !important;
  line-height: 1.6 !important;
  color: #1e293b !important;
  direction: ltr !important;
  text-align: left !important;
}

.comment-title {
  color: #cf397b !important;
  font-weight: 800 !important;
  margin-bottom: 4px !important;
  font-size: 13.5px !important;
}

.comment-text {
  font-size: 13px !important;
  color: #334155 !important;
  line-height: 1.6 !important;
}

/* Modern Section Subhead typography */
.section-subhead-row th {
  padding: 10px 6px 8px !important;
  border-bottom: 1.5px solid #cbd5e1 !important;
}

.subhead-text,
.section-subhead-row th.subhead-text,
.section-subhead-row th.col-ref,
.doc-tests-table th.col-ref {
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-size: 13.5px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
}

.col-unit {
  font-size: 12.5px !important;
  font-weight: 700 !important;
  color: #475569 !important;
}


/* ==========================================================================
   Culture and Sensitivity (Microbiology) Layout Styles
   ========================================================================== */
.culture-report-layout {
  padding: 4px 6px 14px 6px;
  direction: ltr;
  text-align: left;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: #0f172a;
}

.culture-subhead-banner {
  display: grid !important;
  grid-template-columns: 160px 20px 1fr 200px !important;
  align-items: flex-end !important;
  margin-bottom: 8px !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
}

.culture-subhead-title {
  grid-column: 1 / 4 !important;
  font-size: 15px !important;
  font-weight: 800 !important;
  color: #000 !important;
  text-decoration: none !important;
}

.culture-subhead-ref {
  grid-column: 4 !important;
  font-size: 14.5px !important;
  font-weight: 800 !important;
  color: #000 !important;
  text-decoration: none !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.culture-subhead-title u,
.culture-subhead-ref u {
  text-decoration: none !important;
  display: inline-block !important;
  padding-bottom: 2px !important;
  border-bottom: 1.5px solid currentColor !important;
  line-height: 1.2 !important;
}

.culture-exam-rows, .culture-detail-rows {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  margin-bottom: 12px !important;
}

.culture-exam-row {
  display: grid !important;
  grid-template-columns: 160px 20px 1fr 200px !important;
  align-items: center !important;
  font-size: 13.5px !important;
}

.culture-detail-row {
  display: grid !important;
  grid-template-columns: 160px 20px 1fr !important;
  align-items: baseline !important;
  font-size: 13.5px !important;
}

.culture-row-label {
  font-weight: 700 !important;
  color: #111 !important;
  display: flex !important;
  align-items: center !important;
  gap: 6px !important;
}

.cult-triangle {
  font-size: 8.5px !important;
  color: #000 !important;
  display: inline-block !important;
  vertical-align: middle !important;
}

.culture-row-sep {
  font-weight: 800 !important;
  text-align: center !important;
}

.culture-val-box {
  display: inline-block !important;
  background: #e2e8f0 !important;
  border: 1px solid #cbd5e1 !important;
  border-radius: 3px !important;
  padding: 3px 14px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  min-width: 85px !important;
  text-align: center !important;
  font-size: 13px !important;
}

.culture-val-plain {
  display: inline-block !important;
  border: 1px solid transparent !important;
  padding: 2px 0 !important;
  font-weight: 700 !important;
  color: #0f172a !important;
  font-size: 12px !important;
  line-height: 1.35 !important;
}

.culture-row-ref {
  font-weight: 700 !important;
  color: #334155 !important;
  font-size: 13px !important;
  padding-left: 0 !important;
}

.culture-detail-val {
  font-weight: 600;
  color: #111;
  font-size: 13.5px;
  min-width: 0;
  overflow-wrap: anywhere;
  line-height: 1.35;
}

.culture-comments-wrap {
  margin-top: 10px;
}

.sensitivity-tier-box {
  margin-top: 8px;
  margin-bottom: 10px;
  break-inside: avoid;
}

.sensitivity-tier-banner {
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 800;
  font-size: 13px;
  padding: 4px 8px;
  border-radius: 3px;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sensitivity-items-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 14px;
}

.sensitivity-item {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  line-height: 1.25;
}

.sens-idx {
  min-width: 14px;
  font-weight: 700;
  color: #475569;
  font-size: 11px;
}

.sens-name {
  color: #0f172a;
}

.doc-page-counter-row {
  display: flex !important;
  justify-content: flex-end !important;
  padding: 2px 24px 6px !important;
  font-size: 12px !important;
  font-weight: 700 !important;
  color: #334155 !important;
  direction: ltr !important;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

.culture-subhead-banner--spaced {
  margin-top: 14px;
}

/* ==========================================================================
   MOLECULAR BIOLOGY / PCR QUANTITATIVE REPORT LAYOUT
   ========================================================================== */
.molecular-report-layout {
  padding: 4px 12px 6px 12px;
  direction: ltr;
  text-align: left;
  font-family: Arial, "Helvetica Neue", sans-serif;
  color: #000;
}

.molecular-subhead-banner {
  margin-top: 6px;
  margin-bottom: 22px;
}

.molecular-subhead-title {
  font-size: 13.5px;
  font-weight: 700;
  color: #000;
  letter-spacing: -0.1px;
}

.molecular-subhead-title u {
  text-decoration: none !important;
  display: inline-block !important;
  padding-bottom: 2px !important;
  border-bottom: 1.5px solid currentColor !important;
}

.molecular-result-row {
  display: flex;
  align-items: center;
  margin-bottom: 26px;
}

.molecular-result-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 170px;
}

.molecular-triangle {
  font-size: 10px;
  color: #000;
  line-height: 1;
}

.molecular-label-text {
  font-size: 13.5px;
  font-weight: 700;
  color: #000;
}

.molecular-result-val-wrap {
  width: 210px;
  margin-left: 20px;
}

.molecular-val-box {
  border: 1px solid #777;
  border-radius: 2px;
  background: #fff;
  padding: 4px 16px;
  text-align: center;
  font-size: 12.5px;
  font-weight: 700;
  color: #000;
  min-height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.molecular-result-unit {
  margin-left: 14px;
  font-size: 12.5px;
  color: #111;
  font-weight: 500;
}

.molecular-criteria-section {
  margin-bottom: 22px;
}

.molecular-criteria-title {
  font-size: 13px;
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
}

.molecular-criteria-title u {
  text-decoration: none !important;
  display: inline-block !important;
  padding-bottom: 2px !important;
  border-bottom: 1.5px solid currentColor !important;
}

.molecular-criteria-content {
  padding-left: 20px;
  font-size: 11.5px;
  line-height: 1.55;
  color: #000;
  font-weight: 500;
}

.molecular-criteria-line {
  margin-bottom: 2px;
}

.molecular-criteria-spacer {
  height: 8px;
}

.molecular-diagram-wrap {
  text-align: center;
  margin: 24px auto 16px auto;
  max-width: 440px;
}

.molecular-diagram-img {
  width: 100%;
  max-width: 423px;
  height: auto;
  display: inline-block;
  background: #fff;
}

.molecular-comments-wrap {
  margin-top: 14px;
  padding: 8px 12px;
  background: #f8fafc;
  border-left: 3px solid #cf397b;
  border-radius: 4px;
}

.molecular-comment-box {
  font-size: 11.5px;
  line-height: 1.5;
  color: #1e293b;
}

.molecular-comment-label {
  font-weight: 700;
  color: #000;
  margin-right: 6px;
}

/* Final cascade overrides so dense PDF pages fit cleanly within 794x1123 A4 */
.page-sheet.doc-sheet-export-mode.compact-doc-sheet .section-subhead-row th {
  padding: 4px 4px 3px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-table-container {
  margin-top: 2px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-report-title {
  margin: 4px 0 3px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-panel-title {
  margin: 1px 4px 3px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .doc-signature-section {
  margin: 8px 18px 5px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .culture-subhead-banner--spaced {
  margin-top: 10px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .culture-exam-rows,
.page-sheet.doc-sheet-export-mode.compact-doc-sheet .culture-detail-rows {
  gap: 3px !important;
  margin-bottom: 4px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .sensitivity-tier-box {
  margin-top: 3px !important;
  margin-bottom: 4px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .sensitivity-tier-banner {
  padding: 2.5px 6px !important;
  margin-bottom: 2px !important;
}

.page-sheet.doc-sheet-export-mode.compact-doc-sheet .sensitivity-item {
  line-height: 1.18 !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit {
  padding: 12px 26px 10px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-header-banner {
  width: calc(100% + 52px) !important;
  min-height: 82px !important;
  margin: -12px -26px 6px !important;
  padding: 8px 20px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-header-logo .doc-logo-img {
  width: 72px !important;
  height: 72px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-meta-box {
  margin: 0 0 6px !important;
  padding: 3px 0 !important;
  gap: 2px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .meta-row .val-cell {
  min-height: 20px !important;
  padding: 2px 5px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-report-title {
  margin: 2px 0 !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-panel-title {
  margin: 0 4px 2px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .section-subhead-row th {
  padding: 2px 4px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .test-row td,
.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .test-row.compound-sub-row td {
  padding: 1.5px 4px !important;
  line-height: 1.12 !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .culture-subhead-banner {
  margin-bottom: 3px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .culture-subhead-banner--spaced {
  margin-top: 6px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .culture-exam-rows,
.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .culture-detail-rows {
  gap: 2px !important;
  margin-bottom: 3px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .culture-val-box {
  padding: 1px 8px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .sensitivity-tier-box {
  margin-top: 2px !important;
  margin-bottom: 3px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .sensitivity-tier-banner {
  padding: 2px 6px !important;
  font-size: 11px !important;
  margin-bottom: 2px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .sensitivity-items-list {
  gap: 1.5px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .sensitivity-item {
  font-size: 11px !important;
  line-height: 1.12 !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-signature-section {
  margin: 4px 18px 3px !important;
}

.doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit .doc-footer-banner {
  width: calc(100% + 52px) !important;
  min-height: 54px !important;
  margin: auto -26px -10px !important;
  margin-top: auto !important;
  padding: 7px 14px !important;
}

/* CBC Differential rows indentation (wins over all density/export/print td padding rules; physical padding-left keeps LTR alignment inside RTL pages) */
:is(.doc-tests-table, .page-sheet .doc-tests-table) tr.test-row.differential-row td.col-test {
  padding-left: 28px !important;
}

@media screen and (max-width: 650px) {
  .page-sheet:not(.doc-sheet-export-mode) .doc-tests-table tr.test-row.differential-row td.col-test {
    padding-left: 26px !important;
  }
}

:is(.compact-doc-sheet, .doc-sheet-export-mode, .page-sheet.doc-sheet-export-mode, .doc-sheet.doc-sheet-export-mode.compact-doc-sheet, .doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit) .doc-tests-table tr.test-row.differential-row td.col-test {
  padding-left: 24px !important;
}

@media print {
  :is(.doc-sheet, .page-sheet, .compact-doc-sheet, .doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit) .doc-tests-table tr.test-row.differential-row td.col-test {
    padding-left: 24px !important;
  }
}

/* ==========================================================================
   FINAL REPORT SPACING & PATIENT METADATA BOLD OVERRIDES
   - Generous vertical spacing between test rows (HB/HGB/RBCs, etc.)
   - Bold patient metadata labels (incl. "Patient ID.") & values (:not barcode)
   ========================================================================== */
:is(.doc-sheet, .page-sheet) .doc-meta-box :is(.label-cell, .val-cell:not(.barcode-col)) {
  font-weight: 900 !important;
  color: #0f172a !important;
}

@media screen and (min-width: 651px) {
  .page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .meta-row {
    grid-template-columns: 108px minmax(0, 1.35fr) 104px minmax(0, 1.25fr) !important;
  }

  .page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .doc-meta-box .label-cell {
    font-size: 12.5px !important;
    white-space: nowrap !important;
  }
}

.page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
  padding-block: 15px !important;
  padding-inline: 6px !important;
}

.page-sheet.compact-doc-sheet:not(.doc-sheet-export-mode) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
  padding-block: 5px !important;
  padding-inline: 4px !important;
}

.page-sheet.doc-sheet-export-mode:not(.compact-doc-sheet):not(.doc-sheet-dense-fit) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
  padding-block: 6px !important;
  padding-inline: 4px !important;
}

@media print {
  .page-sheet:not(.compact-doc-sheet) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
    padding-block: 5px !important;
    padding-inline: 4px !important;
  }
}

/* Preserve WBC differential indentation after table padding overrides */
.page-sheet:not(.doc-sheet-export-mode):not(.compact-doc-sheet) .doc-tests-table tr.test-row.differential-row td.col-test {
  padding-left: 28px !important;
}

:is(.compact-doc-sheet, .doc-sheet-export-mode, .page-sheet.doc-sheet-export-mode, .doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit) .doc-tests-table tr.test-row.differential-row td.col-test {
  padding-left: 24px !important;
}

@media print {
  :is(.doc-sheet, .page-sheet, .compact-doc-sheet, .doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit) .doc-tests-table tr.test-row.differential-row td.col-test {
    padding-left: 24px !important;
  }
}

/* Column header labels ("Result :", "Unit :", "Reference Range :") slightly smaller than section title */
:is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th.subhead-col-label {
  text-align: left !important;
  direction: ltr !important;
  font-family: Arial, "Helvetica Neue", sans-serif !important;
  font-size: 12px !important;
  font-weight: 800 !important;
  color: #0f172a !important;
  white-space: nowrap !important;
}

:is(.compact-doc-sheet, .doc-sheet-export-mode, .page-sheet.doc-sheet-export-mode, .doc-sheet.page-sheet.doc-sheet-export-mode.doc-sheet-dense-fit) .doc-tests-table .section-subhead-row th.subhead-col-label {
  font-size: 11px !important;
}

@media print {
  :is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th.subhead-col-label {
    font-size: 11px !important;
  }
}

/* ==========================================================================
   PATIENT-FACING REPORT REFINEMENT
   Compact one-line result rows shared by the doctor and patient views.
   ========================================================================== */
:is(.doc-sheet, .page-sheet) .doc-header-banner {
  min-height: 72px !important;
  padding: 6px 16px !important;
  margin-bottom: 6px !important;
}

:is(.doc-sheet, .page-sheet) .doc-header-logo .doc-logo-img {
  width: 60px !important;
  height: 60px !important;
}

:is(.doc-sheet, .page-sheet) :is(.doc-header-en, .doc-header-ar) h2 {
  margin: 0 !important;
  font-size: 1.3rem !important;
  line-height: 1.1 !important;
}

:is(.doc-sheet, .page-sheet) :is(.doc-header-en, .doc-header-ar) p {
  margin-top: 1px !important;
  font-size: 0.74rem !important;
  line-height: 1.15 !important;
  font-weight: 500 !important;
}

:is(.doc-sheet, .page-sheet) .doc-meta-box {
  gap: 2px !important;
  padding-block: 3px !important;
  margin-bottom: 6px !important;
}

:is(.doc-sheet, .page-sheet) .meta-row {
  gap: 4px !important;
}

:is(.doc-sheet, .page-sheet) .doc-meta-box :is(.label-cell, .val-cell) {
  min-height: 20px !important;
  padding: 2px 4px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  font-weight: 400 !important;
}

:is(.doc-sheet, .page-sheet) .doc-meta-box .val-cell.bold {
  font-weight: 800 !important;
}

/* Export-safe high-specificity overrides for every generated A4 sheet. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td,
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row.compound-sub-row td {
  padding-block: 3px !important;
  padding-inline: 3px !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td .test-name-text {
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .label-cell,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell:not(.bold) {
  font-weight: 400 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell.bold {
  font-weight: 800 !important;
}


:is(.doc-sheet, .page-sheet) .doc-meta-box :is(.meta-barcode-text, .code-cell) {
  font-weight: 400 !important;
}

:is(.doc-sheet, .page-sheet) .doc-report-title {
  margin: 3px 0 2px !important;
  padding: 0 !important;
}

:is(.doc-sheet, .page-sheet) .doc-report-title h3 {
  font-size: 1rem !important;
  line-height: 1.15 !important;
  letter-spacing: 0.35px !important;
}

:is(.doc-sheet, .page-sheet) .doc-panel-title {
  margin: 1px 4px 2px !important;
  font-size: 0.88rem !important;
  line-height: 1.1 !important;
}

:is(.doc-sheet, .page-sheet) .doc-table-container {
  margin-top: 2px !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table {
  width: 100% !important;
  min-width: 100% !important;
  table-layout: fixed !important;
  border-spacing: 0 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .col-test { width: 39% !important; }
:is(.doc-sheet, .page-sheet) .doc-tests-table .col-sep { width: 2% !important; }
:is(.doc-sheet, .page-sheet) .doc-tests-table .col-val { width: 24% !important; }
:is(.doc-sheet, .page-sheet) .doc-tests-table .col-unit { width: 12% !important; }
:is(.doc-sheet, .page-sheet) .doc-tests-table .col-ref { width: 23% !important; }

:is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th {
  padding: 2px 3px !important;
  font-size: 11px !important;
  line-height: 1.1 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th.subhead-col-label {
  font-size: 10px !important;
  line-height: 1.1 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
  padding-block: 3px !important;
  padding-inline: 3px !important;
  font-size: 10.5px !important;
  line-height: 1.1 !important;
  vertical-align: middle !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td * {
  font-weight: 400 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .test-name-text {
  display: inline-block !important;
  max-width: none !important;
  white-space: nowrap !important;
  font-size: 11.25px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending) {
  display: inline-block !important;
  max-width: none !important;
  white-space: nowrap !important;
  overflow-wrap: normal !important;
  font-size: 11.25px !important;
  line-height: 1.05 !important;
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row :is(.col-test, .col-val, .col-unit, .col-ref) {
  white-space: nowrap !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-unit,
:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-unit * {
  font-size: 11.25px !important;
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-ref {
  font-size: 10px !important;
  font-weight: 400 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row.differential-row td.col-test {
  padding-left: 14px !important;
}

:is(.doc-sheet, .page-sheet) :is(.culture-exam-row, .culture-detail-row) {
  column-gap: 4px !important;
  padding-block: 3px !important;
  line-height: 1.1 !important;
}

:is(.doc-sheet, .page-sheet) :is(.culture-row-label, .cult-label-text, .sens-name) {
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) :is(.culture-row-val-wrap, .culture-detail-val, .culture-row-ref, .culture-val-plain, .culture-val-box) {
  white-space: nowrap !important;
  font-weight: 400 !important;
}

@media print {
  :is(.doc-sheet, .page-sheet) .doc-tests-table :is(tr.test-row td, tr.test-row.compound-sub-row td) {
    padding-block: 2.5px !important;
    padding-inline: 3px !important;
  }
}

/* Make all report metadata easy to read; Reference Range stays prominent below. */
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td .test-name-text {
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) .doc-meta-box .label-cell,
:is(.doc-sheet, .page-sheet) .doc-meta-box .val-cell,
:is(.doc-sheet, .page-sheet) .doc-meta-box .val-cell * {
  font-weight: 800 !important;
}

/* Adaptive vertical rhythm: use the free A4 space without risking crowded reports. */
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-header-banner {
  min-height: 82px !important;
  padding-block: 8px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-header-logo .doc-logo-img {
  width: 66px !important;
  height: 66px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] :is(.doc-header-en, .doc-header-ar) h2 {
  font-size: 1.44rem !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-meta-box :is(.label-cell, .val-cell) {
  min-height: 22px !important;
  padding: 3px 5px !important;
  font-size: 11.25px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-name-text {
  font-size: 12.5px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending) {
  font-size: 12.5px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-row .col-unit,
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-row .col-unit * {
  font-size: 12.5px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: 10px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-meta-box :is(.label-cell, .val-cell) {
  font-size: 10.75px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-name-text {
  font-size: 11.75px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending) {
  font-size: 11.75px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-row .col-unit,
article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-row .col-unit * {
  font-size: 11.75px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: 8px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-comfortable[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: 6px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-balanced[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: 4.5px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-dense[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: 3px !important;
}

/* Readability pass: make result data prominent and use verified free A4 space. */
:is(.doc-sheet, .page-sheet) .doc-meta-box :is(.label-cell, .val-cell),
:is(.doc-sheet, .page-sheet) .doc-meta-box .val-cell * {
  font-size: 11.5px !important;
  font-weight: 800 !important;
}

:is(.doc-sheet, .page-sheet) .doc-tests-table .test-name-text,
:is(.doc-sheet, .page-sheet) .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending),
:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-unit,
:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-unit * {
  font-size: 12.75px !important;
  font-weight: 800 !important;
}

/* Reference ranges should remain prominent in both the on-screen report and PDF. */
:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-ref,
:is(.doc-sheet, .page-sheet) .doc-tests-table .test-row .col-ref * {
  font-size: 11px !important;
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-meta-box :is(.label-cell, .val-cell),
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-meta-box .val-cell * {
  font-size: 12.25px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-name-text,
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending),
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-row .col-unit,
article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table .test-row .col-unit * {
  font-size: 14.25px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-meta-box :is(.label-cell, .val-cell),
article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-meta-box .val-cell * {
  font-size: 12px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-name-text,
article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending),
article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-row .col-unit,
article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table .test-row .col-unit * {
  font-size: 13.5px !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-spacious[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: calc(10px + var(--report-row-extra-space, 0px)) !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-roomy[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: calc(8px + var(--report-row-extra-space, 0px)) !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-comfortable[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: calc(6px + var(--report-row-extra-space, 0px)) !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-balanced[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: calc(4.5px + var(--report-row-extra-space, 0px)) !important;
}

article.doc-sheet.page-sheet.result-card.report-spacing-dense[data-page] .doc-tests-table tbody tr.test-row td {
  padding-block: calc(3px + var(--report-row-extra-space, 0px)) !important;
}

/* Let the table area occupy unused page height before row spacing is distributed. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-table-container {
  flex: 1 1 auto !important;
  min-height: 0 !important;
}

/* Match the export selectors' specificity so bold result data is not overridden. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .label-cell,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell * {
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell:not(.bold),
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .val-cell:not(.bold) * {
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td :is(.result-num, .result-multiline-value, .compound-val-wrap, .compound-part, .compound-sub-name, .val-highlight, .val-pending) {
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td.col-ref,
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td.col-ref * {
  font-weight: 800 !important;
}

/* Culture and sensitivity reports follow the same readability rule. */
article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout :is(.culture-row-label, .cult-label-text, .culture-row-sep, .culture-row-val-wrap, .culture-val-plain, .culture-val-box, .culture-detail-val, .sensitivity-item, .sensitivity-item *, .sens-name) {
  font-size: 12.75px !important;
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout .culture-row-ref,
article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout .culture-row-ref * {
  font-size: 11px !important;
  font-weight: 800 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout :is(.culture-exam-row, .culture-detail-row, .sensitivity-item) {
  padding-block: calc(3px + var(--report-culture-row-extra-space, 0px)) !important;
}

/* Intentional multiline exception for the linked stool microscopy components. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table .stacked-digestive-value {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  gap: 3px !important;
  max-width: 100% !important;
  white-space: normal !important;
  line-height: 1.25 !important;
  text-align: left !important;
  transform: none !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table .stacked-digestive-value > span {
  display: block !important;
  white-space: nowrap !important;
}

/* Long reference ranges may wrap vertically; all other result columns stay one line. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tbody tr.test-row td.col-ref {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.32 !important;
  vertical-align: middle !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table .reference-range-value {
  display: block !important;
  max-width: 100% !important;
  white-space: normal !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table .reference-range-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

/* Culture and urine direct-examination ranges follow the same rule. */
article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout .culture-row-ref {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  word-break: normal !important;
  line-height: 1.32 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .culture-report-layout .reference-range-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 2px !important;
}

/* Dense reports need a compact, balanced identity header rather than a
   shrunken version of the regular one.  This applies only when the renderer
   marks a sheet as compact (many tests, urine, stool, or culture). */
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-banner {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 54px minmax(0, 1fr) !important;
  align-items: center !important;
  column-gap: 12px !important;
  min-height: 64px !important;
  padding: 5px 14px !important;
  margin-bottom: 5px !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-en,
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-ar {
  min-width: 0 !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-en {
  text-align: left !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-ar {
  align-items: flex-end !important;
  text-align: right !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-logo .doc-logo-img {
  width: 54px !important;
  height: 54px !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-en h2 {
  font-size: 18px !important;
  line-height: 1.08 !important;
  letter-spacing: -0.2px !important;
  text-align: left !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-ar h2 {
  font-size: 20px !important;
  line-height: 1.08 !important;
  text-align: right !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] :is(.doc-header-en, .doc-header-ar) p {
  margin-top: 2px !important;
  font-size: 9.5px !important;
  line-height: 1.15 !important;
  white-space: nowrap !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-meta-box {
  gap: 1px !important;
  padding-block: 2px !important;
  margin-bottom: 5px !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-meta-box .meta-cell {
  min-height: 19px !important;
  padding: 2px 4px !important;
  font-size: 10.4px !important;
  line-height: 1.1 !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-meta-box .meta-barcode-wrap svg {
  height: 19px !important;
}

/* Keep compact portal sheets inside their A4 height before optional spacing is added. */
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] {
  padding-bottom: 16px !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-footer-banner {
  min-height: 36px !important;
  padding-block: 4px !important;
}

/* Reserve more A4 height for compact result rows without reducing readability. */
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-banner {
  min-height: 66px !important;
  padding: 5px 14px !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-logo .doc-logo-img {
  width: 56px !important;
  height: 56px !important;
}

/* Final visual polish for the compact report identity. */
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-banner {
  background: linear-gradient(100deg, #f2b8d1 0%, #edb0cc 50%, #e9a9c8 100%) !important;
  border: 1px solid rgba(111, 47, 125, 0.18) !important;
  box-shadow: inset 0 1px rgba(255, 255, 255, 0.38), inset 0 -1px rgba(111, 47, 125, 0.12) !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-logo .doc-logo-img {
  border: 2px solid rgba(111, 47, 125, 0.35) !important;
  box-shadow: 0 2px 5px rgba(91, 34, 105, 0.16) !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] :is(.doc-header-en, .doc-header-ar) h2 {
  color: #642470 !important;
  font-weight: 900 !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] :is(.doc-header-en, .doc-header-ar) p {
  color: #6f2f7d !important;
  font-weight: 700 !important;
  opacity: 0.92 !important;
}

/* Keep compact sheet print geometry non-clipping (matching Doctor print contract). */
@media print {
  article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] {
    height: auto !important;
    min-height: 297mm !important;
  }

  article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-footer-banner {
    min-height: 14mm !important;
    margin: auto -10mm -5mm !important;
    margin-top: auto !important;
    padding: 2.5mm 5mm !important;
  }

  .sheet-scale-wrapper:last-child,
  .sheet-scale-wrapper:last-child .page-sheet {
    page-break-after: auto !important;
    break-after: auto !important;
  }
}

/* Final print pagination guard: break before following sheets only, never
   after the final sheet, so a one-page report cannot create a blank page. */
@media print {
  html,
  body {
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
  }

  #resultsPagesContainer > .sheet-scale-wrapper {
    break-after: auto !important;
    page-break-after: auto !important;
    overflow: hidden !important;
  }

  #resultsPagesContainer > .sheet-scale-wrapper + .sheet-scale-wrapper {
    break-before: page !important;
    page-break-before: always !important;
  }

  #resultsPagesContainer > .sheet-scale-wrapper:first-child {
    break-before: auto !important;
    page-break-before: auto !important;
  }

  #resultsPagesContainer > .sheet-scale-wrapper .doc-sheet,
  #resultsPagesContainer > .sheet-scale-wrapper .page-sheet {
    break-after: auto !important;
    page-break-after: auto !important;
  }
}

/* Keep report metadata compact and horizontal on phone screens. */
@media screen and (max-width: 650px) {
  :is(.doc-sheet, .page-sheet) .doc-meta-box {
    gap: 1px !important;
    padding-block: 2px !important;
    margin-bottom: 4px !important;
  }

  :is(.doc-sheet, .page-sheet) .meta-row {
    grid-template-columns: 82px minmax(0, 1.45fr) 76px minmax(0, 1.25fr) !important;
    gap: 3px !important;
  }

  :is(.doc-sheet, .page-sheet) .meta-row > .label-cell,
  :is(.doc-sheet, .page-sheet) .meta-row > .val-cell {
    min-width: 0 !important;
    min-height: 18px !important;
    padding: 1px 3px !important;
    font-size: 9.4px !important;
    line-height: 1.05 !important;
    white-space: nowrap !important;
  }

  :is(.doc-sheet, .page-sheet) .meta-row > .val-cell {
    overflow: hidden !important;
    text-overflow: ellipsis !important;
  }
}

/* Keep the compact-page signature together at the lower right in screen and PDF. */
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-signature-section {
  width: max-content !important;
  margin: 6px 20px 4px auto !important;
  padding: 0 !important;
  align-self: flex-end !important;
  text-align: center !important;
}

article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .signature-block {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  white-space: nowrap !important;
}

/* Use the supplied laboratory artwork as the report header and footer. */
.doc-sheet.page-sheet .doc-header-banner.report-brand-header,
.doc-sheet.page-sheet .doc-footer-banner.report-brand-footer {
  display: block !important;
  padding: 0 !important;
  background: #e9a8c3 !important;
  border: 0 !important;
  border-radius: 0 !important;
  overflow: hidden !important;
  box-sizing: border-box !important;
}

.doc-sheet.page-sheet .doc-header-banner.report-brand-header {
  min-height: 0 !important;
  height: auto !important;
  margin-bottom: 8px !important;
}

.doc-sheet.page-sheet .doc-footer-banner.report-brand-footer {
  min-height: 0 !important;
  height: auto !important;
}

.report-brand-header > :not(.report-brand-header-image),
.report-brand-footer > :not(.report-brand-footer-image) {
  display: none !important;
}

.report-brand-header-image,
.report-brand-footer-image {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  max-width: none !important;
  object-fit: fill !important;
}

/* Beat legacy export-mode rules so no part of the old text banner is rendered. */
article.doc-sheet.page-sheet.report-brand-header .doc-header-en,
article.doc-sheet.page-sheet.report-brand-header .doc-header-logo,
article.doc-sheet.page-sheet.report-brand-header .doc-header-ar,
article.doc-sheet.page-sheet.report-brand-footer .footer-content-wrap {
  display: none !important;
}

/* Lock the supplied artwork dimensions on every report page, including Urine/compact pages. */
article.doc-sheet.page-sheet .doc-header-banner.report-brand-header {
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  flex: 0 0 140px !important;
}

article.doc-sheet.page-sheet .doc-footer-banner.report-brand-footer {
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  flex: 0 0 56px !important;
}

article.doc-sheet.page-sheet .report-brand-header-image {
  width: 100% !important;
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  object-fit: fill !important;
  flex: 0 0 140px !important;
}

article.doc-sheet.page-sheet .report-brand-footer-image {
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  object-fit: fill !important;
  flex: 0 0 56px !important;
}

/* Extra emphasis for the patient name in the patient portal report. */
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .patient-name-value,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .patient-name-value * {
  font-family: 'Cairo', Tahoma, sans-serif !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  line-height: 1.3 !important;
  letter-spacing: 0 !important;
  -webkit-text-stroke: 0.28px currentColor;
  font-synthesis: weight;
}

/* Result flags: keep the measured value clean; color only H/High or L/Low. */
.result-num.val-abnormal,
.val-highlight {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  color: inherit !important;
  padding: 0 !important;
  border-radius: 0 !important;
}

.flag-badge,
/* Abnormal result values: subtle calm neutral shading (no flashy colors) with darker hover */
/* Abnormal result values: subtle calm neutral shading (no flashy colors) with darker hover */
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table :is(.result-num.val-abnormal, .val-highlight),
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight),
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) :is(.result-num.val-abnormal, .val-highlight),
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table :is(.result-num.val-abnormal, .val-highlight),
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight),
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight),
:is(.doc-sheet, .page-sheet) .result-num.val-abnormal,
:is(.doc-sheet, .page-sheet) .val-highlight,
.result-num.val-abnormal,
.val-highlight {
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  color: #0f172a !important;
  padding: 1px 6px !important;
  border-radius: 4px !important;
  font-weight: 900 !important;
  display: inline-block !important;
  line-height: 1.25 !important;
  white-space: nowrap !important;
  transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table :is(.result-num.val-abnormal, .val-highlight):hover,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight):hover,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) tr.test-row:hover :is(.result-num.val-abnormal, .val-highlight),
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table :is(.result-num.val-abnormal, .val-highlight):hover,
article.doc-sheet.page-sheet.result-card[data-page] .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight):hover,
tr.test-row:hover .result-num.val-abnormal,
tr.test-row:hover .val-highlight,
.result-num.val-abnormal:hover,
.val-highlight:hover,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight):hover,
:is(.doc-sheet, .page-sheet) .result-num.val-abnormal:hover,
:is(.doc-sheet, .page-sheet) .val-highlight:hover {
  background: #cbd5e1 !important;
  border-color: #94a3b8 !important;
  color: #000000 !important;
}

/* Flag badges (LOW, HIGH, L, H): pure bold 900 text, no background box */
.flag-badge,
.val-abnormal-flag,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td .flag-badge,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td .val-abnormal-flag,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag),
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .flag-badge,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .val-abnormal-flag,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td .flag-badge,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td .val-abnormal-flag,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag),
:is(.doc-sheet, .page-sheet) .flag-badge,
:is(.doc-sheet, .page-sheet) .val-abnormal-flag {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  padding: 0 3px !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  display: inline-block !important;
  vertical-align: baseline !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag):is(.flag-high, .high, .h, .flag-h, .flag-hh, .hh),
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) :is(.flag-badge, .val-abnormal-flag):is(.flag-high, .high, .h, .flag-h, .flag-hh, .hh),
.flag-badge.flag-high,
.flag-badge.high,
.flag-badge.h,
.flag-badge.flag-h,
.flag-badge.flag-hh,
.flag-badge.hh,
.flag-badge.flag-abnormal,
.flag-badge.abnormal,
.val-abnormal-flag.high,
.val-abnormal-flag.abnormal,
.val-abnormal-flag.h,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag):is(.flag-high, .high, .h, .flag-h, .flag-hh, .hh),
:is(.doc-sheet, .page-sheet) :is(.flag-badge, .val-abnormal-flag):is(.flag-high, .high, .h, .flag-h, .flag-hh, .hh) {
  color: #dc2626 !important;
  font-weight: 900 !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag):is(.flag-low, .low, .l, .flag-l, .flag-ll, .ll),
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) :is(.flag-badge, .val-abnormal-flag):is(.flag-low, .low, .l, .flag-l, .flag-ll, .ll),
.flag-badge.flag-low,
.flag-badge.low,
.flag-badge.l,
.flag-badge.flag-l,
.flag-badge.flag-ll,
.flag-badge.ll,
.val-abnormal-flag.low,
.val-abnormal-flag.l,
:is(.doc-sheet, .page-sheet) .doc-tests-table tr.test-row td :is(.flag-badge, .val-abnormal-flag):is(.flag-low, .low, .l, .flag-l, .flag-ll, .ll),
:is(.doc-sheet, .page-sheet) :is(.flag-badge, .val-abnormal-flag):is(.flag-low, .low, .l, .flag-l, .flag-ll, .ll) {
  color: #2563eb !important;
  font-weight: 900 !important;
}

/* Referred By doctor name: bold 900 */
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-meta-box .meta-cell.referred-by-value,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-meta-box .meta-cell.referred-by-value *,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-meta-box .referred-by-label + .val-cell,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-meta-box .referred-by-label + .val-cell *,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .referred-by-value,
:is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .referred-by-value *,
.meta-cell.referred-by-value,
.referred-by-value,
.referred-by-label + .val-cell,
:is(.doc-sheet, .page-sheet) .meta-row > .referred-by-value,
:is(.doc-sheet, .page-sheet) .referred-by-label + .val-cell {
  font-weight: 900 !important;
  color: #000000 !important;
}

.meta-cell.referred-by-value *,
.referred-by-value *,
.referred-by-label + .val-cell * {
  font-weight: 900 !important;
}

/* Keep report headings visibly underlined without drawing the line through
   the letters, and make H/L flags strongly readable. */
.culture-subhead-banner,
.culture-subhead-title,
.culture-subhead-ref {
  text-decoration: none !important;
  border: 0 !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doc-sheet-export-mode) u,
.culture-subhead-title u,
.culture-subhead-ref u,
.doc-report-title h3,
.doc-panel-title u,
.subhead-text u,
.subhead-col-label u,
.section-subhead-row th u {
  text-decoration: none !important;
  display: inline-block !important;
  padding-bottom: 2px !important;
  border-bottom: 1.5px solid currentColor !important;
  line-height: 1.15 !important;
}

/* ==========================================================================
   UNIFIED LABORATORY BRANDING: HEADER (140px) & FOOTER (56px) LOCKED FOR ALL ANALYSES
   Guarantees header and footer remain identical ("زي ما هما") across every test.
   ========================================================================== */
:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .doc-header-banner,
:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .doc-header-banner.report-brand-header,
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-header-banner,
.compact-doc-sheet .doc-header-banner {
  display: block !important;
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  flex: 0 0 140px !important;
  padding: 0 !important;
  margin: -24px -28px 8px !important;
  width: calc(100% + 56px) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  grid-template-columns: none !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .report-brand-header-image,
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .report-brand-header-image,
.compact-doc-sheet .report-brand-header-image {
  display: block !important;
  width: 100% !important;
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  object-fit: fill !important;
  flex: 0 0 140px !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .doc-footer-banner,
:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .doc-footer-banner.report-brand-footer,
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .doc-footer-banner,
.compact-doc-sheet .doc-footer-banner {
  display: block !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  flex: 0 0 56px !important;
  padding: 0 !important;
  margin: auto -28px 0 !important;
  width: calc(100% + 56px) !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, .compact-doc-sheet) .report-brand-footer-image,
article.doc-sheet.page-sheet.result-card.compact-doc-sheet[data-page] .report-brand-footer-image,
.compact-doc-sheet .report-brand-footer-image {
  display: block !important;
  width: 100% !important;
  height: 56px !important;
  min-height: 56px !important;
  max-height: 56px !important;
  object-fit: fill !important;
  flex: 0 0 56px !important;
}

/* ==========================================================================
   REFERRED BY DOCTOR NAME: BOLD 900
   ========================================================================== */
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .meta-cell.referred-by-value,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .meta-cell.referred-by-value *,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .referred-by-label + .val-cell,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .referred-by-label + .val-cell *,
:is(.doc-sheet, .page-sheet, article.result-card) .doc-meta-box .referred-by-value,
:is(.doc-sheet, .page-sheet, article.result-card) .doc-meta-box .referred-by-value *,
:is(.doc-sheet, .page-sheet, article.result-card) .doc-meta-box .referred-by-label + .val-cell,
:is(.doc-sheet, .page-sheet, article.result-card) .doc-meta-box .referred-by-label + .val-cell * {
  font-weight: 900 !important;
  color: #000000 !important;
}

/* ==========================================================================
   DOCTOR VISUAL PARITY OVERRIDES (Subheads, Patient Name Lift, Molecular Reset, Comments)
   ========================================================================== */
.comment-row {
  break-inside: avoid !important;
  page-break-inside: avoid !important;
}

.doc-comment-section {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 4px 4px;
  padding: 4px 8px;
}

.doc-comment-label {
  flex: 0 0 auto;
}

.doc-comment-text {
  flex: 1 1 auto;
  min-width: 0;
  white-space: normal;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .patient-name-value,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .patient-name-value * {
  font-weight: 900 !important;
  -webkit-text-stroke: 0.28px currentColor;
  font-synthesis: weight;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box .patient-name-value .meta-bidi-line {
  display: inline-block !important;
  position: relative !important;
  top: -1.5px !important;
  line-height: 1.15 !important;
}

article.doc-sheet.page-sheet.result-card[data-page] .doc-report-title {
  margin-top: 2px !important;
  margin-bottom: 5px !important;
}

/* Make section titles and their Result/Unit/Reference Range labels match Doctor */
:is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th,
:is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th.subhead-col-label {
  font-size: 14px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
}

:is(.compact-doc-sheet, .doc-sheet-export-mode) .doc-tests-table .section-subhead-row th,
:is(.compact-doc-sheet, .doc-sheet-export-mode) .doc-tests-table .section-subhead-row th.subhead-col-label {
  font-size: 12.5px !important;
  line-height: 1.15 !important;
  font-weight: 900 !important;
}

@media print {
  :is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th,
  :is(.doc-sheet, .page-sheet) .doc-tests-table .section-subhead-row th.subhead-col-label {
    font-size: 12.5px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
  }
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doc-sheet-export-mode) .molecular-subhead-title,
:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doc-sheet-export-mode) .molecular-criteria-title,
.molecular-subhead-title,
.molecular-criteria-title {
  text-decoration: none !important;
  border: 0 !important;
}

@media print {
  :is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) .doc-tests-table tr.test-row td :is(.result-num.val-abnormal, .val-highlight),
  :is(.doc-sheet, .page-sheet, article.result-card, .doc-sheet-export-mode) :is(.result-num.val-abnormal, .val-highlight),
  tr.test-row:hover .result-num.val-abnormal,
  tr.test-row:hover .val-highlight,
  .result-num.val-abnormal:hover,
  .val-highlight:hover,
  .result-num.val-abnormal,
  .val-highlight {
    background: #f1f5f9 !important;
    border: 1px solid #cbd5e1 !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    transition: none !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .flag-badge,
  .val-abnormal-flag {
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    font-weight: 900 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  .flag-badge.flag-high,
  .flag-badge.high,
  .flag-badge.h,
  .flag-badge.flag-h,
  .flag-badge.flag-hh,
  .flag-badge.hh,
  .flag-badge.flag-abnormal,
  .flag-badge.abnormal,
  .val-abnormal-flag.high,
  .val-abnormal-flag.abnormal,
  .val-abnormal-flag.h {
    color: #dc2626 !important;
    font-weight: 900 !important;
  }

  .flag-badge.flag-low,
  .flag-badge.low,
  .flag-badge.l,
  .flag-badge.flag-l,
  .flag-badge.flag-ll,
  .flag-badge.ll,
  .val-abnormal-flag.low,
  .val-abnormal-flag.l {
    color: #2563eb !important;
    font-weight: 900 !important;
  }

  .meta-cell.referred-by-value,
  .referred-by-value,
  .referred-by-label + .val-cell,
  .meta-cell.referred-by-value *,
  .referred-by-value *,
  .referred-by-label + .val-cell * {
    font-weight: 900 !important;
    color: #000000 !important;
  }
}

/* ==========================================================================
   BOLD HEADINGS & TITLES (Report Title, Panel Titles e.g. Urine Examination :,
   Section Subheads, Column Labels, Culture & Molecular Headings)
   ========================================================================== */
:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) :is(
  .doc-report-title,
  .doc-report-title h3,
  .doc-report-title h3 *,
  .doc-panel-title,
  .doc-panel-title *,
  .section-subhead-row th,
  .section-subhead-row th *,
  .subhead-text,
  .subhead-text *,
  .subhead-col-label,
  .subhead-col-label *,
  .culture-subhead-title,
  .culture-subhead-title *,
  .culture-subhead-ref,
  .culture-subhead-ref *,
  .molecular-subhead-title,
  .molecular-subhead-title *,
  .molecular-criteria-title,
  .molecular-criteria-title *
) {
  font-weight: 900 !important;
  color: #000000 !important;
  font-synthesis: weight;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) :is(
  .doc-report-title h3,
  .doc-panel-title,
  .doc-panel-title u,
  .section-subhead-row th,
  .section-subhead-row th.subhead-col-label,
  .subhead-text,
  .subhead-text u
) {
  font-family: "Times New Roman", Times, Georgia, serif !important;
}

@media print {
  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) :is(
    .doc-report-title,
    .doc-report-title h3,
    .doc-report-title h3 *,
    .doc-panel-title,
    .doc-panel-title *,
    .section-subhead-row th,
    .section-subhead-row th *,
    .subhead-text,
    .subhead-text *,
    .subhead-col-label,
    .subhead-col-label *,
    .culture-subhead-title,
    .culture-subhead-title *,
    .culture-subhead-ref,
    .culture-subhead-ref *,
    .molecular-subhead-title,
    .molecular-subhead-title *,
    .molecular-criteria-title,
    .molecular-criteria-title *
  ) {
    font-weight: 900 !important;
    color: #000000 !important;
    font-synthesis: weight;
  }

  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .culture-detail-val .culture-val-box.culture-val-box--organism,
  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .molecular-val-box.molecular-val-box--abnormal {
    background: #f1f5f9 !important;
    border-color: #94a3b8 !important;
    color: #0f172a !important;
    font-weight: 900 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .culture-detail-val .culture-val-box.culture-val-box--organism {
  display: inline-block !important;
  white-space: normal !important;
  text-align: left !important;
  padding: 2px 10px !important;
  min-width: 0 !important;
  border-radius: 4px !important;
  background: #f1f5f9 !important;
  border: 1px solid #cbd5e1 !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04) !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .molecular-val-box.molecular-val-box--abnormal {
  background: #f1f5f9 !important;
  border: 1px solid #94a3b8 !important;
  color: #0f172a !important;
  font-weight: 900 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05) !important;
  -webkit-print-color-adjust: exact !important;
  print-color-adjust: exact !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-tests-table :is(.stacked-digestive-value.val-abnormal, .result-multiline-value.val-abnormal) {
  display: inline-flex !important;
  flex-direction: column !important;
  align-items: center !important;
  gap: 2px !important;
  white-space: normal !important;
  text-align: center !important;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-tests-table :is(.stacked-digestive-value, .result-multiline-value) .val-highlight {
  display: inline-block !important;
  white-space: normal !important;
  text-align: center !important;
}

/* ==========================================================================
   REFERRED BY DOCTOR NAME & AGE / SEX: BOLD 900 & LARGER FOR CLEAR READABILITY
   ========================================================================== */
:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.age-sex-label, .referred-by-label),
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box :is(.age-sex-label, .referred-by-label) {
  font-weight: 900 !important;
  color: #000000 !important;
  font-synthesis: weight;
}

:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell),
:is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell) *,
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell),
article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell) * {
  font-family: 'Cairo', Tahoma, sans-serif !important;
  font-size: 15px !important;
  font-weight: 900 !important;
  line-height: 1.25 !important;
  letter-spacing: 0 !important;
  color: #000000 !important;
  -webkit-text-stroke: 0.28px currentColor;
  font-synthesis: weight;
}

:is(.compact-doc-sheet, .doc-sheet-dense-fit) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell),
:is(.compact-doc-sheet, .doc-sheet-dense-fit) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell) * {
  font-size: 13.5px !important;
}

@media print {
  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.age-sex-label, .referred-by-label),
  article.doc-sheet.page-sheet.result-card[data-page] .doc-meta-box :is(.age-sex-label, .referred-by-label) {
    font-weight: 900 !important;
    color: #000000 !important;
    font-synthesis: weight;
  }

  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell),
  :is(.doc-sheet, .page-sheet, article.result-card, #doctorPdfExportContainer, .doctor-pdf-export-mode, .doc-sheet-export-mode) .doc-meta-box :is(.meta-cell.referred-by-value, .referred-by-label + .val-cell, .meta-cell.age-sex-value, .age-sex-label + .val-cell) * {
    font-family: 'Cairo', Tahoma, sans-serif !important;
    font-size: 13.5px !important;
    font-weight: 900 !important;
    line-height: 1.2 !important;
    color: #000000 !important;
    -webkit-text-stroke: 0.25px currentColor;
    font-synthesis: weight;
  }
}



