/* Tra cứu CLS — UI mới, dữ liệu VNPT */
.pk304-tracuu-page {
  margin: 0;
  background: #f4f6fb;
  color: #1f1d52;
  font-family: "Be Vietnam Pro", "Segoe UI", system-ui, sans-serif;
  min-height: 100vh;
}

.pk304-tracuu-topbar {
  background: #2b286b;
  color: #fff;
  padding: 10px 16px;
  font-size: 0.82rem;
}

.pk304-tracuu-topbar__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
}

.pk304-tracuu-topbar__addr,
.pk304-tracuu-topbar__meta {
  margin: 0;
  opacity: 0.95;
}

.pk304-tracuu-nav {
  background: #fff;
  border-bottom: 1px solid #e2e8f0;
  padding: 12px 16px;
}

.pk304-tracuu-nav__inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 16px;
}

.pk304-tracuu-nav__brand {
  margin-right: auto;
}

.pk304-tracuu-nav__brand img {
  height: 44px;
  width: auto;
  display: block;
}

.pk304-tracuu-nav__home {
  color: #1f1d52;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
}

.pk304-tracuu-nav__cta {
  position: relative;
  z-index: 5;
  background: #7fc241;
  color: #1f1d52 !important;
  text-decoration: none !important;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 0.85rem;
  pointer-events: auto;
  cursor: pointer;
}

.pk304-tracuu-nav__cta:hover {
  background: #6fb336;
  color: #fff !important;
}

.pk304-tracuu-main {
  padding: 28px 16px 40px;
}

.pk304-tracuu-wrap {
  max-width: 1100px;
  margin: 0 auto;
}

.pk304-tracuu__head {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 20px;
}

.pk304-tracuu__head--noqr {
  display: block;
}

.pk304-tracuu__head--noqr .pk304-tracuu__qr-card {
  display: none !important;
}

.pk304-tracuu__eyebrow {
  margin: 0 0 6px;
  color: #7fc241;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.pk304-tracuu__title {
  margin: 0 0 8px;
  font-size: clamp(1.45rem, 2.6vw, 1.9rem);
  color: #2b286b;
  letter-spacing: -0.02em;
}

.pk304-tracuu__lead {
  margin: 0;
  color: #64748b;
  max-width: 40rem;
  line-height: 1.55;
}

.pk304-tracuu__ai-note {
  display: block;
  margin-top: 8px;
  font-size: 0.88rem;
  color: #2b286b;
  opacity: 0.9;
}

.pk304-tracuu__qr-card {
  flex: 0 0 auto;
  text-align: center;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 4px 18px rgba(43, 40, 107, 0.06);
}

.pk304-tracuu__qr {
  width: 140px;
  height: 140px;
  display: block;
  margin: 0 auto 8px;
}

.pk304-tracuu__qr-card p {
  margin: 0;
  font-size: 0.78rem;
  color: #64748b;
  max-width: 140px;
}

.pk304-tracuu__ct-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 16px 12px;
  margin: 0 0 18px;
  box-shadow: 0 4px 18px rgba(43, 40, 107, 0.05);
}
.pk304-tracuu__ct-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #1e1b4b;
  font-weight: 800;
}
.pk304-tracuu__ct-lead {
  margin: 0 0 12px;
  font-size: 0.9rem;
  color: #64748b;
  line-height: 1.45;
}
.pk304-tracuu__search--ct {
  margin-bottom: 8px;
  box-shadow: none;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}
.pk304-tracuu__submit--ct {
  background: #0f766e;
}
.pk304-tracuu__submit--ct:hover {
  filter: brightness(1.05);
}

.pk304-tracuu__pacs-hint {
  margin: -4px 0 16px;
  font-size: 0.9rem;
  color: #475569;
  line-height: 1.45;
}
.pk304-tracuu__pacs-hint a {
  font-weight: 800;
  color: #2b286b;
  text-decoration: none;
}
.pk304-tracuu__pacs-hint a:hover {
  text-decoration: underline;
}
.pk304-tracuu__pacs-hint code {
  font-size: 0.85em;
  background: #f1f5f9;
  padding: 1px 6px;
  border-radius: 4px;
}

.pk304-tracuu__search {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 14px;
  box-shadow: 0 4px 18px rgba(43, 40, 107, 0.05);
  margin-bottom: 16px;
}

.pk304-tracuu__search--login {
  flex-direction: column;
  max-width: 520px;
}

.pk304-tracuu__search--login .pk304-tracuu__input {
  flex: 1 1 auto;
  width: 100%;
}

.pk304-tracuu__search--login .pk304-tracuu__submit {
  width: 100%;
}

.pk304-tracuu__input {
  flex: 1 1 280px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  padding: 14px 16px;
  font-size: 16px;
  font-family: inherit;
}

.pk304-tracuu__input:focus {
  outline: none;
  border-color: #2b286b;
  box-shadow: 0 0 0 3px rgba(43, 40, 107, 0.14);
}

.pk304-tracuu__submit {
  border: none;
  border-radius: 10px;
  background: #2b286b;
  color: #fff;
  font-weight: 700;
  padding: 14px 22px;
  cursor: pointer;
  font-family: inherit;
}

.pk304-tracuu__submit:hover {
  background: #7fc241;
  color: #1f1d52;
}

.pk304-tracuu__submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.pk304-tracuu__status {
  margin-bottom: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #eef0f8;
  font-weight: 600;
}

.pk304-tracuu__status.is-error {
  background: #fef2f2;
  color: #991b1b;
}

.pk304-tracuu__patient-box {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 14px;
}

.pk304-tracuu__patient-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 28px;
}

.pk304-tracuu__patient-grid span {
  display: block;
  font-size: 0.78rem;
  color: #64748b;
  margin-bottom: 2px;
}

.pk304-tracuu__patient-grid strong {
  font-size: 0.95rem;
  color: #1f1d52;
  font-weight: 700;
}

.pk304-tracuu__action--pacs{
  background:linear-gradient(90deg,#2B286B,#7FC241)!important;
  color:#fff!important;
  border:0!important;
  text-decoration:none;
  display:inline-flex;
  align-items:center;
}
.pk304-tracuu__pacs-box{
  margin:14px 0 22px;
  border:1px solid rgba(43,40,107,.16);
  border-radius:16px;
  overflow:hidden;
  background:#0b1220;
  box-shadow:0 12px 32px rgba(43,40,107,.12);
}
.pk304-tracuu__pacs-bar{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  padding:10px 14px;
  background:linear-gradient(90deg,#2B286B,#1a1748);
  color:#fff;
  font-size:.86rem;
}
.pk304-tracuu__pacs-bar a{color:#c8f59a;font-weight:700;text-decoration:none}
.pk304-tracuu__pacs-frame{
  width:100%;
  height:min(78vh,820px);
  border:0;
  display:block;
  background:#000;
}
.pk304-tracuu__actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.pk304-ai-assist {
  margin: 0 0 18px;
  padding: 14px 16px;
  border: 1px solid rgba(43, 40, 107, 0.14);
  border-radius: 14px;
  background: #f8fafc;
}
.pk304-ai-assist__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 12px;
  margin-bottom: 8px;
}
.pk304-ai-assist__head strong {
  color: #2b286b;
  font-size: 0.95rem;
}
.pk304-ai-assist__phase {
  font-size: 0.78rem;
  color: #64748b;
}
.pk304-ai-assist__body {
  font-size: 0.88rem;
  line-height: 1.5;
  color: #334155;
}
.pk304-ai-assist__body .ai-block {
  margin-top: 8px;
}
.pk304-ai-assist__body .ai-warn {
  color: #b45309;
  font-weight: 600;
}
.pk304-ai-assist__body ul {
  margin: 4px 0 0;
  padding-left: 1.2em;
}

.pk304-tracuu__action {
  border: none;
  border-radius: 10px;
  background: #2b286b;
  color: #fff;
  font-weight: 700;
  padding: 12px 16px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.88rem;
}

.pk304-tracuu__action:hover,
.pk304-tracuu__action.is-active {
  background: #7fc241;
  color: #1f1d52;
}

.pk304-tracuu__print {
  display: inline-flex;
  align-items: center;
  border-radius: 10px;
  background: #1f1d52;
  color: #fff !important;
  text-decoration: none !important;
  font-weight: 700;
  padding: 12px 16px;
  font-size: 0.88rem;
}

/* Nút hành động CĐHA / PACS (Xem ảnh · Tải PDF · Tải DICOM) */
.pk304-cdha-card__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}

.pk304-tracuu__btn,
a.pk304-tracuu__btn,
button.pk304-tracuu__btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-sizing: border-box;
  margin: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 11px 16px;
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none !important;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

a.pk304-tracuu__btn:hover,
a.pk304-tracuu__btn:focus,
button.pk304-tracuu__btn:hover,
button.pk304-tracuu__btn:focus {
  text-decoration: none !important;
  outline: none;
}

.pk304-tracuu__btn--primary,
a.pk304-tracuu__btn--primary {
  background: linear-gradient(135deg, #0b63b8 0%, #1f8f6e 100%);
  border-color: transparent;
  color: #fff !important;
  box-shadow: 0 4px 12px rgba(11, 99, 184, 0.28);
}

.pk304-tracuu__btn--primary:hover,
a.pk304-tracuu__btn--primary:hover {
  background: linear-gradient(135deg, #0956a0 0%, #187a5d 100%);
  color: #fff !important;
  box-shadow: 0 6px 16px rgba(11, 99, 184, 0.35);
}

.pk304-tracuu__btn--ghost,
button.pk304-tracuu__btn--ghost,
a.pk304-tracuu__btn--ghost {
  background: #fff;
  border-color: #c5d4e8;
  color: #1f1d52 !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.pk304-tracuu__btn--ghost:hover,
button.pk304-tracuu__btn--ghost:hover,
a.pk304-tracuu__btn--ghost:hover {
  background: #f0f7ff;
  border-color: #0b63b8;
  color: #0b63b8 !important;
}

/* Fallback nút không có modifier */
.pk304-tracuu__btn:not(.pk304-tracuu__btn--primary):not(.pk304-tracuu__btn--ghost) {
  background: #fff;
  border-color: #c5d4e8;
  color: #1f1d52 !important;
}

.pk304-tracuu__sections {
  display: grid;
  gap: 14px;
}

.pk304-tracuu__section {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  padding: 16px 18px;
}

.pk304-tracuu__section h2 {
  margin: 0 0 12px;
  font-size: 1.05rem;
  color: #2b286b;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.pk304-tracuu__section--cdha h2 {
  margin: 0;
  padding: 0;
  border: 0;
}

.pk304-tracuu__cdha-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}

.pk304-tracuu__cdha-head h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
  font-size: 1.05rem;
  color: #2b286b;
}

/* Tab SA / XQ / CT / NS = thanh xanh giống xét nghiệm */
.pk304-cdha-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.pk304-cdha-tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 120px;
  max-width: 280px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(90deg, #3d3a8a 0%, #2b286b 100%);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  line-height: 1.25;
  letter-spacing: 0.02em;
  opacity: 0.72;
  white-space: nowrap;
  text-align: left;
  box-shadow: none;
}

.pk304-cdha-tab span {
  font-weight: 500;
  opacity: 0.9;
  font-size: 0.82rem;
}

.pk304-cdha-tab:hover {
  opacity: 0.9;
  filter: brightness(1.05);
  border-color: transparent;
  color: #fff;
}

.pk304-cdha-tab.is-active {
  opacity: 1;
  background: linear-gradient(90deg, #2b286b 0%, #3d3a8a 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 0 0 2px #7fc241 inset;
  z-index: 1;
}

.pk304-cdha-panels {
  min-height: 80px;
  border: 1px solid #e2e8f0;
  border-radius: 0 12px 12px 12px;
  background: #fff;
  overflow: hidden;
}

.pk304-cdha-panel {
  display: block;
  padding: 0;
}

.pk304-cdha-panel[hidden],
.pk304-cdha-panel[aria-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.pk304-cdha-panel.is-active {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

.pk304-cdha-panel > .pk304-tracuu__empty {
  margin: 0;
  padding: 18px 16px;
}

.pk304-tracuu__empty {
  color: #94a3b8;
  margin: 0;
}

/* Tab nhóm XN — cùng kiểu tab Siêu âm / XQ / CT / NS */
.pk304-tracuu__xn-head {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  margin-bottom: 12px;
  padding-bottom: 0;
  border-bottom: 0;
}

.pk304-tracuu__xn-head h2 {
  margin: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid #e2e8f0;
}

/* Tab nhóm XN = thanh xanh giống tiêu đề phiếu (không pill) */
.pk304-xn-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 2px;
  scrollbar-width: thin;
}

.pk304-xn-tabs[hidden] {
  display: none !important;
}

.pk304-xn-tab {
  appearance: none;
  flex: 1 1 0;
  min-width: 140px;
  max-width: 280px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(90deg, #3d3a8a 0%, #2b286b 100%);
  color: #fff;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 11px 14px;
  cursor: pointer;
  line-height: 1.25;
  letter-spacing: 0.02em;
  opacity: 0.72;
  white-space: nowrap;
  text-align: left;
  box-shadow: none;
}

.pk304-xn-tab span {
  font-weight: 500;
  opacity: 0.9;
  font-size: 0.82rem;
}

.pk304-xn-tab:hover {
  opacity: 0.9;
  filter: brightness(1.05);
}

.pk304-xn-tab.is-active {
  opacity: 1;
  background: linear-gradient(90deg, #2b286b 0%, #3d3a8a 100%);
  box-shadow: 0 0 0 2px #7fc241 inset;
  z-index: 1;
}

.pk304-xn-panels {
  min-height: 80px;
  display: block;
}

.pk304-xn-panel {
  display: block;
}

.pk304-xn-panel[hidden],
.pk304-xn-panel[aria-hidden="true"] {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.pk304-xn-panel.is-active {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
}

.pk304-xn-group {
  margin-bottom: 0;
  border: 1px solid #e2e8f0;
  border-radius: 0 12px 12px 12px;
  overflow: hidden;
  background: #fff;
}

.pk304-xn-group__title {
  margin: 0;
  padding: 11px 14px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(90deg, #2b286b 0%, #3d3a8a 100%);
  letter-spacing: 0.02em;
}

.pk304-xn-group__title span {
  font-weight: 500;
  opacity: 0.85;
  font-size: 0.82rem;
}

.pk304-xn-table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pk304-xn-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
  min-width: 520px;
}

.pk304-xn-table th,
.pk304-xn-table td {
  border-bottom: 1px solid #eef2f7;
  padding: 10px 12px;
  text-align: left;
  vertical-align: top;
}

.pk304-xn-table th {
  color: #64748b;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  background: #f8fafc;
  font-weight: 700;
  white-space: nowrap;
}

.pk304-xn-table tbody tr:nth-child(even) {
  background: #fafbfd;
}

.pk304-xn-table tbody tr:hover {
  background: #f0f7e8;
}

.pk304-xn-table td:nth-child(2) {
  font-weight: 600;
  white-space: nowrap;
}

.pk304-xn-table td:nth-child(3),
.pk304-xn-table td:nth-child(4) {
  color: #64748b;
  white-space: nowrap;
}

.pk304-xn-table .kq-lower { color: #2563eb; font-weight: 700; }
.pk304-xn-table .kq-higher { color: #dc2626; font-weight: 700; }

.pk304-xn-table tr.is-panel-name td:first-child {
  font-weight: 700;
  color: #2b286b;
}

.pk304-cdha-card {
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  overflow: hidden;
  margin-bottom: 16px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(43, 40, 107, 0.06);
}

.pk304-cdha-card:last-child {
  margin-bottom: 0;
}

.pk304-cdha-panels .pk304-cdha-card {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin-bottom: 0;
  border-bottom: 1px solid #e2e8f0;
}

.pk304-cdha-panels .pk304-cdha-card:last-child {
  border-bottom: 0;
}

.pk304-cdha-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(120deg, #2b286b 0%, #3a3780 55%, #2f6b3a 140%);
  color: #fff;
}

.pk304-cdha-card__head-main {
  min-width: 0;
}

.pk304-cdha-card__badge {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: rgba(127, 194, 65, 0.95);
  color: #1f1d52;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 8px;
}

.pk304-cdha-card__title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.35;
  font-weight: 700;
}

.pk304-cdha-card__head-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  flex-shrink: 0;
}

.pk304-cdha-card__viewer {
  appearance: none;
  border: 0;
  cursor: pointer;
  background: linear-gradient(90deg, #2b286b, #7fc241);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
  padding: 8px 12px;
  border-radius: 999px;
}

.pk304-cdha-card__viewer:hover {
  filter: brightness(1.05);
}

.pk304-cdha-card__print {
  flex-shrink: 0;
  align-self: center;
  background: #fff;
  color: #2b286b !important;
  text-decoration: none !important;
  font-weight: 700;
  font-size: 0.82rem;
  padding: 9px 14px;
  border-radius: 999px;
  white-space: nowrap;
}

.pk304-cdha-card__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  padding: 14px 16px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.pk304-cdha-card__meta span {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #64748b;
  margin-bottom: 2px;
}

.pk304-cdha-card__meta strong {
  font-size: 0.92rem;
  color: #1f1d52;
  font-weight: 600;
}

.pk304-cdha-card__dx,
.pk304-cdha-card__block,
.pk304-cdha-card__gallery {
  padding: 14px 16px;
  border-bottom: 1px solid #eef2f7;
}

.pk304-cdha-card__gallery {
  border-bottom: 0;
}

/* SA/NS: ảnh phiếu nằm cạnh cột Mô tả/Kết quả */
.pk304-cdha-card__report-row {
  display: block;
}

.pk304-cdha-card__report-row.is-side {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  border-bottom: 1px solid #eef2f7;
}

.pk304-cdha-card__report-row.is-side.has-images {
  grid-template-columns: minmax(0, 1.05fr) minmax(280px, 0.95fr);
}

.pk304-cdha-card__report-text {
  min-width: 0;
}

.pk304-cdha-card__report-text .pk304-cdha-card__block {
  border-bottom: 1px solid #eef2f7;
}

.pk304-cdha-card__report-text .pk304-cdha-card__block:last-child {
  border-bottom: 0;
}

.pk304-cdha-card__report-row.is-side > .pk304-cdha-card__gallery {
  border-bottom: 0;
  background: #f8fafc;
}

.pk304-cdha-card__report-row.is-side.has-images > .pk304-cdha-card__gallery {
  border-left: 1px solid #eef2f7;
  position: sticky;
  top: 8px;
  align-self: start;
  max-height: min(92vh, 980px);
  overflow: auto;
}

.pk304-cdha-card__report-row.is-side.has-images .pk304-cdha-card__imgs {
  grid-template-columns: 1fr;
  gap: 10px;
}

.pk304-cdha-card__report-row.is-side.has-images .pk304-cdha-card__photo {
  min-height: 150px;
  aspect-ratio: 4 / 3;
}

@media (max-width: 900px) {
  .pk304-cdha-card__report-row.is-side.has-images {
    grid-template-columns: 1fr;
  }
  .pk304-cdha-card__report-row.is-side.has-images > .pk304-cdha-card__gallery {
    border-left: 0;
    border-top: 1px solid #eef2f7;
    position: static;
    max-height: none;
  }
}

.pk304-cdha-card__dx h4,
.pk304-cdha-card__block h4,
.pk304-cdha-card__gallery h4 {
  margin: 0 0 10px;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #2b286b;
}

.pk304-cdha-card__dx p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
  font-size: 0.92rem;
}

.pk304-cdha-card__ketluan {
  background: linear-gradient(180deg, #f4faf0 0%, #fff 100%);
}

.pk304-cdha-card__ketluan-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 10px;
}

.pk304-cdha-study-tabs {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  padding: 10px 16px 0;
  margin: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.pk304-cdha-study-tabs[hidden] {
  display: none !important;
}

.pk304-cdha-study-tabs .pk304-cdha-ket-tab {
  flex: 1 1 0;
  min-width: 140px;
  max-width: 280px;
  border: 0;
  border-radius: 10px 10px 0 0;
  background: linear-gradient(90deg, #3d3a8a 0%, #2b286b 100%);
  color: #fff;
  padding: 11px 14px;
  font-size: 0.88rem;
  opacity: 0.72;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pk304-cdha-study-tabs .pk304-cdha-ket-tab:hover {
  opacity: 0.9;
}

.pk304-cdha-study-tabs .pk304-cdha-ket-tab.is-on {
  opacity: 1;
  background: linear-gradient(90deg, #2b286b 0%, #3d3a8a 100%);
  box-shadow: 0 0 0 2px #7fc241 inset;
  color: #fff;
  border-color: transparent;
}

.pk304-cdha-ket-tab {
  appearance: none;
  border: 1px solid #c5d4e8;
  background: #fff;
  color: #334155;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pk304-cdha-ket-tab.is-on {
  background: #0b63b8;
  border-color: #0b63b8;
  color: #fff;
}

/* Chặn theme/Flatsome ghi đè — chỉ 1 pane hiện */
.pk304-cdha-ket-stack {
  display: block;
  position: relative;
}

.pk304-cdha-ket-pane,
.pk304-cdha-card__ketluan .pk304-cdha-ket-pane,
.pk304-cdha-ket-stack > .pk304-cdha-ket-pane {
  display: none !important;
  visibility: hidden !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
}

.pk304-cdha-ket-pane.is-on,
.pk304-cdha-card__ketluan .pk304-cdha-ket-pane.is-on,
.pk304-cdha-ket-stack > .pk304-cdha-ket-pane.is-on {
  display: block !important;
  visibility: visible !important;
  height: auto !important;
  overflow: visible !important;
  margin: 0 !important;
  padding: 10px 12px !important;
  border: 1px solid #e2e8f0 !important;
  border-radius: 10px;
  background: #f8fafc;
}

.pk304-cdha-ket-pane[hidden],
.pk304-cdha-ket-stack > .pk304-cdha-ket-pane[hidden] {
  display: none !important;
}

.pk304-cdha-ket-pane__title {
  margin: 0 0 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: #0b63b8;
}

.pk304-cdha-card__ketluan .pk304-cdha-card__rich {
  font-weight: 600;
  color: #1f1d52;
  font-size: 1rem;
}

.pk304-cdha-card__rich {
  color: #334155;
  line-height: 1.65;
  font-size: 0.94rem;
}

.pk304-cdha-card__rich p {
  margin: 0 0 0.55em;
}

.pk304-cdha-card__rich p:last-child {
  margin-bottom: 0;
}

.pk304-cdha-card__rich div {
  margin-bottom: 0.2em;
}

.pk304-cdha-card__imgs-status {
  color: #94a3b8;
  font-size: 0.88rem;
  margin: 0 0 8px;
}

.pk304-cdha-card__imgs-status.is-error {
  color: #b45309;
}

.pk304-cdha-card__pdf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 12px;
}

.pk304-cdha-card__pdf-btn,
.pk304-cdha-card__pdf-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none !important;
}

.pk304-cdha-card__pdf-btn {
  background: #2b286b;
  color: #fff !important;
}

.pk304-cdha-card__pdf-link {
  background: #f1f5f9;
  color: #2b286b !important;
}

.pk304-cdha-card__pdf {
  width: 100%;
  min-height: 520px;
  height: 70vh;
  max-height: 900px;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
}

.pk304-cdha-card__imgs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}

.pk304-cdha-card__photo {
  appearance: none;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0;
  margin: 0;
  background: #0f172a;
  overflow: hidden;
  cursor: zoom-in;
  aspect-ratio: 4 / 3;
  min-height: 180px;
}

.pk304-cdha-card__photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.25s ease;
}

.pk304-cdha-card__photo:hover img {
  transform: scale(1.03);
}

.pk304-lightbox {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: rgba(15, 23, 42, 0.88);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.pk304-lightbox img {
  max-width: min(960px, 100%);
  max-height: 90vh;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.pk304-lightbox__close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: #fff;
  color: #1f1d52;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
}

.pk304-cdha-card__date {
  display: none;
}

.pk304-tracuu__support {
  margin: 18px 0 0;
  color: #64748b;
  font-size: 0.9rem;
}

.pk304-tracuu__support a {
  color: #2b286b;
  font-weight: 700;
  text-decoration: none;
}

.pk304-privacy {
  margin: 20px 0 8px;
  padding: 14px 16px;
  border-left: 3px solid #2b286b;
  background: rgba(43, 40, 107, 0.05);
  color: #475569;
  font-size: 0.82rem;
  line-height: 1.5;
}

.pk304-privacy__title {
  margin: 0 0 6px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #2b286b;
}

.pk304-privacy__text {
  margin: 0;
}

.pk304-privacy--viewer {
  margin-top: 18px;
  text-align: left;
  border-left-color: #7fc241;
  background: rgba(127, 194, 65, 0.08);
  color: #93a0b8;
}

.pk304-privacy--viewer .pk304-privacy__title {
  color: #7fc241;
}

.pk304-tracuu-foot {
  text-align: center;
  padding: 12px 16px 32px;
  color: #64748b;
  font-size: 0.85rem;
}

.pk304-tracuu-foot p { margin: 4px 0; }

.pk304-appbar {
  display: none;
}

/* —— Mobile app chrome (desktop unchanged) —— */
@media (max-width: 760px) {
  .pk304-tracuu-page {
    background: #f0f3f8;
  }

  .pk304-tracuu-topbar {
    display: none;
  }

  .pk304-appbar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: sticky;
    top: 0;
    z-index: 200;
    min-height: 48px;
    padding: 0 12px;
    background: #0b63b8;
    color: #fff;
    box-shadow: 0 2px 10px rgba(11, 99, 184, 0.28);
  }

  .pk304-appbar__back {
    color: #fff;
    text-decoration: none;
    font-size: 1.35rem;
    line-height: 1;
    padding: 6px 4px;
    font-weight: 700;
  }

  .pk304-appbar__title {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
    margin-right: 28px;
  }

  .pk304-tracuu-nav {
    display: none;
  }

  .pk304-tracuu-main {
    padding: 0 0 28px;
  }

  .pk304-tracuu-wrap {
    max-width: none;
  }

  .pk304-tracuu {
    padding: 0 0 8px;
  }

  .pk304-tracuu__head {
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 14px 14px 8px;
    background: #fff;
    border-bottom: 1px solid #e2e8f0;
  }

  .pk304-tracuu__eyebrow {
    display: none;
  }

  .pk304-tracuu__title {
    font-size: 1.15rem;
    margin: 0 0 4px;
    color: #0b63b8;
  }

  .pk304-tracuu__lead {
    font-size: 0.82rem;
    color: #64748b;
    line-height: 1.4;
  }

  .pk304-tracuu__lead b {
    color: #0f172a;
  }

  .pk304-tracuu__ai-note {
    display: none;
  }

  .pk304-tracuu__qr-card {
    display: none;
  }

  .pk304-tracuu__search {
    margin: 10px 12px;
    padding: 10px;
    border-radius: 12px;
    gap: 8px;
    box-shadow: 0 2px 10px rgba(15, 23, 42, 0.04);
  }

  .pk304-tracuu__input {
    flex: 1 1 100%;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 16px;
  }

  .pk304-tracuu__submit {
    width: 100%;
    border-radius: 10px;
    padding: 12px 16px;
    background: #0b63b8;
  }

  .pk304-tracuu__submit:hover {
    background: #0952a0;
    color: #fff;
  }

  .pk304-tracuu__ct-box {
    margin: 0 12px 10px;
    padding: 12px;
    border-radius: 12px;
  }

  .pk304-tracuu__ct-title {
    font-size: 1rem;
  }

  .pk304-tracuu__ct-lead {
    font-size: 0.8rem;
  }

  .pk304-tracuu__status {
    margin: 0 12px 10px;
    font-size: 0.88rem;
  }

  /* Patient + QR like health-record ID row */
  .pk304-tracuu__patient-box {
    margin: 0 12px 10px;
    padding: 12px;
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(15, 23, 42, 0.05);
  }

  .pk304-tracuu__patient-box.is-ready {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 12px;
    align-items: start;
  }

  .pk304-tracuu__patient-qr {
    display: none;
  }

  .pk304-tracuu__patient-box.is-ready .pk304-tracuu__patient-qr {
    display: block;
    width: 88px;
    height: 88px;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    background: #fff;
    object-fit: contain;
  }

  .pk304-tracuu__patient-grid {
    grid-template-columns: 1fr;
    gap: 8px 0;
  }

  .pk304-tracuu__patient-grid > div {
    display: none;
  }

  .pk304-tracuu__patient-grid > div:nth-child(3),
  .pk304-tracuu__patient-grid > div:nth-child(1),
  .pk304-tracuu__patient-grid > div:nth-child(6) {
    display: block;
  }

  .pk304-tracuu__patient-grid > div:nth-child(3) strong {
    font-size: 1.02rem;
    color: #0b63b8;
  }

  .pk304-tracuu__patient-grid span {
    font-size: 0.7rem;
  }

  /* Chip tabs — horizontal scroll */
  .pk304-tracuu__actions-row {
    display: flex;
    flex-wrap: nowrap;
    gap: 8px;
    margin: 0 0 12px;
    padding: 4px 12px 10px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    background: #fff;
    border-bottom: 1px solid #e8edf4;
  }

  .pk304-tracuu__actions-row::-webkit-scrollbar {
    display: none;
  }

  .pk304-tracuu__action,
  .pk304-tracuu__action--pacs {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 9px 14px;
    font-size: 0.8rem;
    background: #eef3f9;
    color: #334155 !important;
    border: 1px solid #dbe4f0 !important;
    white-space: nowrap;
  }

  .pk304-tracuu__action.is-active,
  .pk304-tracuu__action:hover {
    background: #0b63b8;
    color: #fff !important;
    border-color: #0b63b8 !important;
  }

  .pk304-tracuu__action--pacs {
    background: linear-gradient(90deg, #0b63b8, #2b286b) !important;
    color: #fff !important;
    border: 0 !important;
  }

  .pk304-tracuu__sections {
    gap: 10px;
    padding: 0 12px;
  }

  .pk304-tracuu__section {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
  }

  .pk304-tracuu__section h2 {
    margin: 8px 2px 10px;
    padding: 0;
    border: 0;
    font-size: 0.92rem;
    color: #64748b;
    font-weight: 700;
  }

  .pk304-tracuu__section[hidden] {
    display: none !important;
  }

  /* Visit-style result cards */
  .pk304-cdha-card {
    display: grid;
    grid-template-columns: 64px 1fr;
    grid-template-areas:
      "date head"
      "date meta"
      "body body"
      "report report";
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    background: #fff;
    margin-bottom: 10px;
    overflow: hidden;
  }

  .pk304-cdha-card__report-row,
  .pk304-cdha-card__report-row.is-side,
  .pk304-cdha-card__report-row.is-side.has-images {
    grid-area: report;
    grid-column: 1 / -1;
    display: block;
    grid-template-columns: 1fr;
  }

  .pk304-cdha-card__report-row.is-side.has-images > .pk304-cdha-card__gallery {
    border-left: 0;
    border-top: 1px solid #eef2f7;
    position: static;
    max-height: none;
  }

  .pk304-cdha-card__date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    grid-area: date;
    padding: 14px 6px 12px;
    border-right: 1px solid #eef2f7;
    background: #f8fafc;
  }

  .pk304-cdha-card__date-day {
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
    color: #0b63b8;
  }

  .pk304-cdha-card__date-month {
    margin-top: 4px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #64748b;
    text-align: center;
  }

  .pk304-cdha-card__head {
    grid-area: head;
    flex-direction: column;
    align-items: stretch;
    gap: 8px;
    padding: 12px 12px 8px;
    background: #fff;
    color: #0f172a;
  }

  .pk304-cdha-card__badge {
    background: #e8f1fb;
    color: #0b63b8;
    margin-bottom: 4px;
  }

  .pk304-cdha-card__title {
    font-size: 0.95rem;
    color: #0f172a;
    font-weight: 700;
  }

  .pk304-cdha-card__head-actions {
    align-self: stretch;
  }

  .pk304-cdha-card__viewer,
  .pk304-cdha-card__print {
    border-radius: 8px;
    font-size: 0.75rem;
    padding: 8px 10px;
  }

  .pk304-cdha-card__viewer {
    background: #0b63b8;
  }

  .pk304-cdha-card__print {
    background: #f1f5f9;
    color: #0b63b8 !important;
  }

  .pk304-cdha-card__meta {
    grid-area: meta;
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 12px 12px;
    background: #fff;
    border: 0;
  }

  .pk304-cdha-card__meta span {
    text-transform: none;
    font-size: 0.68rem;
  }

  .pk304-cdha-card__meta strong {
    font-size: 0.84rem;
  }

  .pk304-cdha-card__dx,
  .pk304-cdha-card__block {
    grid-column: 1 / -1;
    padding: 10px 12px;
  }

  .pk304-cdha-card__gallery {
    grid-column: 1 / -1;
    padding: 10px 12px 12px;
  }

  .pk304-cdha-card__head-actions,
  .pk304-cdha-card__print {
    align-self: flex-start;
  }

  .pk304-cdha-card__imgs {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .pk304-cdha-card__photo {
    min-height: 120px;
    border-radius: 10px;
  }

  .pk304-tracuu__pacs-box {
    margin: 0 12px 14px;
    border-radius: 12px;
  }

  .pk304-tracuu__pacs-frame {
    height: 62vh;
  }

  .pk304-xn-group {
    border-radius: 12px;
  }

  .pk304-xn-table {
    min-width: 480px;
    font-size: 0.82rem;
  }

  .pk304-tracuu__support {
    padding: 0 14px;
    font-size: 0.82rem;
  }

  .pk304-ai-assist {
    margin: 0 12px 14px;
    border-radius: 12px;
  }

  .pk304-tracuu-foot {
    padding: 8px 14px 40px;
    font-size: 0.78rem;
  }

  .pk304-tracuu-nav__cta {
    display: none;
  }
}
