:root { --gb-blue: var(--gb-brand-surgery); --gb-blue-2: var(--gb-brand-jade); --gb-blue-light: #ffffff; --gb-contrast: #173f36; --gb-focus: #008579; --gb-surface: #f3f8f9; --gb-line: #b7dacf; --gb-brand-surgery: #075f74; --gb-brand-jade: #008579; --gb-brand-bank: #006b3c; }
html, body { scroll-behavior: auto !important; }
@keyframes shake { 
  0% { transform: translateX(0px); }
  25% { transform: translateX(-2px); }
  50% { transform: translateX(2px); }
  75% { transform: translateX(-2px); }
  100% { transform: translateX(0px); }
}
@keyframes gbDialogShow { 
  0% { transform: translateY(10px) scale(0.96); opacity: 0; }
  100% { transform: none; opacity: 1; }
}
.gb-list-header h3 { margin: 0px; }
#gb-report-app > h2 { text-align: center; text-transform: uppercase; color: var(--gb-blue); font-weight: 800; font-size: 30px; letter-spacing: 1.2px; margin: 0px 0px 16px; position: relative; padding-bottom: 10px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; }
#gb-report-app { width: min(96vw, 1600px); margin: 0px auto; padding: 0px 16px; box-sizing: border-box; color: rgb(23, 63, 54); }
#gb-report-app > h2::after { content: ""; display: block; width: 180px; height: 2px; background: var(--gb-blue); margin: 8px auto 0px; }
#gb-report-app .gb-report-list-title, #gb-report-app h3 { text-transform: uppercase; color: var(--gb-blue); font-weight: 800; letter-spacing: 0.8px; margin-bottom: 12px; }
.gb-list-header { display: grid; grid-template-columns: 1fr 300px; align-items: center; padding: 0px 4px; gap: 12px; margin-bottom: 12px; }
.gb-list-title h3 { margin: 0px; text-transform: uppercase; color: var(--gb-blue); font-weight: 800; letter-spacing: 0.5px; }
.gb-list-action { width: 300px; display: flex; justify-content: center; align-items: center; }
.gb-row { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.gb-row label { flex: 1 1 0%; min-width: 150px; }
.gb-datepicker { border: 1px solid rgb(183, 218, 207); border-radius: 4px; background: rgb(244, 248, 249); }
.gb-calendar-icon { font-size: 22px; }
.gb-row input, .gb-row select, .gb-row textarea { width: 100%; padding: 8px; background: rgb(251, 253, 254); border: 1px solid var(--gb-line); border-radius: 8px; color: rgb(23, 63, 54); box-shadow: rgba(17, 68, 63, 0.06) 0px 1px 2px inset; transition: border-color 0.18s, background 0.18s, box-shadow 0.18s; }
.gb-row input:focus, .gb-row select:focus, .gb-row textarea:focus { background: rgb(255, 255, 255); border-color: var(--gb-focus); box-shadow: rgba(11, 127, 120, 0.2) 0px 0px 0px 3px, rgba(9, 101, 92, 0.1) 0px 2px 8px; outline: none; }
textarea.highlight-field { background: rgb(251, 253, 254); border: 1px solid var(--gb-line); color: rgb(23, 63, 54); border-radius: 8px; box-shadow: rgba(17, 68, 63, 0.06) 0px 1px 2px inset; transition: border-color 0.18s, box-shadow 0.18s; width: 100%; padding: 8px; resize: vertical; overflow-y: auto; font-family: inherit; line-height: 1.45; box-sizing: border-box; }
textarea.field-kham { height: 160px; }
textarea.field-diagnosis { height: 60px; }
textarea[name="kham_lam_sang"] { min-height: 140px; }
textarea.highlight-field:focus { background: rgb(255, 255, 255); border-color: var(--gb-focus); box-shadow: rgba(11, 127, 120, 0.2) 0px 0px 0px 3px, rgba(9, 101, 92, 0.1) 0px 2px 8px; outline: none; }
textarea.gb-auto-resize { max-height: 320px; overflow-y: hidden; resize: vertical; min-height: 85px !important; }
.gb-editor-two-cols textarea { width: 100%; box-sizing: border-box; }
.gb-editor-short-two-cols textarea { min-height: 70px; height: 70px; }
.gb-upload-btn input { display: none; }
.gb-report-table input { width: 100%; text-align: center; }
.gb-patient { border-radius: 5px; padding: 8px; margin-bottom: 8px; box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 3px; }
#gb-report-form #gb-patients .gb-patient { transition: background 0.2s, border-color 0.2s, box-shadow 0.2s; background: rgb(245, 251, 248); border: 1px solid rgb(183, 218, 207); border-radius: 6px; box-shadow: rgba(16, 62, 57, 0.1) 0px 3px 10px; }
#gb-report-form #gb-patients .gb-patient.open { background: rgb(255, 255, 255); border-color: rgb(0, 133, 121); box-shadow: rgba(6, 96, 87, 0.16) 0px 7px 20px; }
.gb-patient-top { display: grid; grid-template-columns: 64px minmax(210px, 260px) minmax(220px, 300px) minmax(110px, 140px) 125px 90px 95px; gap: 8px; align-items: end; }
@media (max-width: 1100px) {
  .gb-patient-top { grid-template-columns: auto minmax(210px, 1fr) minmax(220px, 1fr); }
}
@media (max-width: 700px) {
  .gb-patient-top { grid-template-columns: 1fr; }
}
.gb-patient input[type="number"] { width: 100%; padding: 8px 10px; background: rgb(255, 255, 255); border: 1px solid var(--gb-line); border-radius: 8px; color: rgb(23, 63, 54); box-shadow: rgba(17, 68, 63, 0.06) 0px 1px 2px inset; transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s; }
.gb-patient input[type="number"]:focus { background: rgb(255, 255, 255); border-color: var(--gb-focus); box-shadow: rgba(11, 127, 120, 0.2) 0px 0px 0px 3px; outline: none; }
.gb-patient-top > .gb-remove-patient { align-self: end; }
.gb-patient-top > label { min-width: 0px; flex: 0 0 auto; }
.gb-patient-top input, .gb-patient-top select { width: 100%; }
.bn-stt { font-size: 14px; color: red; font-weight: bold; }
.bn-stt-input { width: 100px; text-align: center; font-weight: bold; border: 1px solid rgb(117, 184, 166); border-radius: 4px; margin-left: 4px; height: 22px; padding: 0px 4px; font-size: 12px; }
.gb-patient-card .pc-header { padding: 6px 10px; border-radius: 4px; font-weight: 600; }
.gb-patient select[name="loai"] { font-weight: 700; border: 2px solid rgb(13, 202, 123) !important; }
.gb-patient select { border: 1px solid var(--gb-line); border-radius: 8px; padding: 8px 10px; appearance: none; box-shadow: none; outline: none; background-color: rgb(251, 253, 254) !important; color: rgb(23, 63, 54) !important; }
.gb-patient select:focus { box-shadow: rgba(11, 127, 120, 0.2) 0px 0px 0px 3px; outline: none; background-color: rgb(255, 255, 255) !important; color: rgb(23, 63, 54) !important; border-color: var(--gb-focus) !important; }
.gb-patient input { border: 1px solid var(--gb-line); border-radius: 8px; padding: 8px 10px; box-shadow: rgba(17, 68, 63, 0.06) 0px 1px 2px inset; outline: none; transition: border-color 0.18s, box-shadow 0.18s, background-color 0.18s; background-color: rgb(251, 253, 254) !important; color: rgb(23, 63, 54) !important; }
.gb-patient input:focus { box-shadow: rgba(11, 127, 120, 0.2) 0px 0px 0px 3px; outline: none; background-color: rgb(255, 255, 255) !important; border-color: var(--gb-focus) !important; }
.label-bao-cao { color: rgb(29, 103, 72); font-weight: 800; }
.label-ho-ten { color: rgb(0, 107, 60); font-weight: 800; }
.label-title { font-weight: 800; color: rgb(0, 107, 60); }
.loai-row { display: flex; align-items: center; gap: 6px; }
.loai-row select { flex: 1 1 0%; }
.gb-patient.layout-locmau textarea { min-height: 50px !important; height: 50px !important; }
.gb-patient.layout-locmau textarea[name="thuoc"] { min-height: 180px !important; height: 180px !important; }
.gb-patient.layout-locmau .gb-row { margin-bottom: 6px; }
.gb-patient.layout-locmau .gb-editor-col textarea { min-height: 50px !important; }
.gb-patient.layout-note textarea { min-height: 80px !important; height: 80px !important; }
.gb-patient.layout-note textarea[name="kham_lam_sang"] { min-height: 220px !important; height: 220px !important; }
#gb-report-form #gb-patients .gb-patient-head { min-height: 26px; padding: 6px 8px; border-radius: 4px; color: rgb(23, 63, 54); border: 1px solid transparent; display: flex; align-items: center; gap: 8px; font-weight: 600; box-shadow: rgba(11, 66, 60, 0.08) 0px -1px 0px inset; }
.gb-patient-body { display: none; padding-top: 4px; }
.gb-patient.open .gb-patient-body { display: block; }
.gb-patient.gb-awaiting-report-type.open .gb-patient-body > :not(.gb-patient-top) { display: none; }
.gb-patient.gb-awaiting-report-type .gb-patient-top > label:not(.label-bao-cao) { display: none; }
.gb-report-type-warning { display: none; }
.gb-patient.gb-awaiting-report-type .gb-patient-top { box-shadow: rgba(13, 201, 123, 0.15) 0px 0px 0px 3px; background: rgb(199, 251, 229) !important; border: 2px solid rgb(12, 190, 116) !important; }
.gb-patient.gb-awaiting-report-type .label-bao-cao { font-weight: 800; color: rgb(14, 107, 68) !important; }
.gb-patient.gb-awaiting-report-type .gb-report-type-label { display: none; }
.gb-patient.gb-awaiting-report-type .gb-report-type-warning { display: block; margin-bottom: 5px; color: rgb(176, 0, 32); font-weight: 900; letter-spacing: 0.25px; text-shadow: rgb(255, 255, 255) 0px 1px 0px; }
.gb-patient.gb-awaiting-report-type select[name="loai"] { border: 2px solid rgb(7, 108, 66) !important; background: rgb(247, 254, 251) !important; }
.gb-patient.gb-awaiting-report-type select[name="loai"]:focus { outline: rgba(7, 108, 66, 0.22) solid 3px; outline-offset: 2px; }
.gb-patient:not(.open) .summary-loai { color: rgb(53, 93, 76); font-weight: 800; white-space: nowrap; }
.gb-patient:not(.open) .summary-sep { opacity: 0.35; margin: 0px 6px; }
.summary-bc { color: rgb(23, 63, 54); font-weight: 800; margin-right: 6px; }
.summary-ten { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gb-patient:not(.open) .summary-ten { color: rgb(0, 133, 121); font-weight: 800; text-transform: uppercase; letter-spacing: 0.08em; }
.gb-summary-fields { display: grid; width: 100%; gap: 4px; flex: 0 0 100%; }
.gb-summary-fields label { min-width: 0px; flex: 0 0 auto; }
.gb-summary-line { margin: 6px 0px; }
.gb-patient:not(.open) .gb-summary-line { display: flex; align-items: center; gap: 6px; margin-left: 6px; }
.gb-patient.open .gb-summary-line { display: block; position: absolute; top: 2px; right: 8px; margin: 0px; }
.gb-patient-head { position: relative; min-height: 28px; background: rgb(242, 245, 245); padding: 3px 5px; border-radius: 6px; cursor: pointer; display: flex; align-items: center; justify-content: flex-start; gap: 6px; flex-wrap: wrap; }
.gb-patient.open .bn-stt { display: none; color: rgb(23, 63, 54); }
.gb-patient.open .summary-bc, .gb-patient.open .summary-loai, .gb-patient.open .summary-ten, .gb-patient.open .summary-sep { display: none; }
.gb-patient.open .gb-patient-head { min-height: 0px; padding: 0px; background: transparent; }
.gb-patient:not(.open) .gb-remove-patient, .gb-patient:not(.open) .bn-stt { color: transparent; }
.gb-patient:not(.open) .bn-stt input { color: rgb(23, 63, 54); }
.gb-save-summary { width: 100%; border-collapse: collapse; table-layout: fixed; }
.gb-save-summary tr { border-bottom: 1px solid rgb(230, 244, 238); }
.gb-save-summary tr:last-child { border-bottom-width: medium; border-bottom-style: none; border-bottom-color: currentcolor; }
.gb-save-summary td { padding: 8px 10px; vertical-align: middle; }
.gb-save-summary .label { width: 34%; font-weight: 600; color: rgb(0, 107, 60); white-space: nowrap; }
.gb-save-summary .value { width: 16%; text-align: center; font-weight: 700; font-size: 17px; color: rgb(0, 107, 60); }
.gb-multi-sep { width: 100%; height: 40px; margin: 30px 0px; border-radius: 5px; text-align: center; color: red; font-size: 50px; font-weight: 700; background: var(--gb-blue) !important; }
.gb-multi-sep.custom-footer-wrap { position: relative; width: 100vw; margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); display: flex; align-items: center; justify-content: center; }
.gb-multi-sep .custom-footer-credit { position: relative; z-index: 2; padding: 2px 10px; background: rgba(255, 255, 255, 0.85); border-radius: 6px; font-size: 10px; font-weight: 500; }
.gb-editor-two-cols { display: flex; gap: 8px; flex-wrap: nowrap; width: 100%; }
.gb-editor-two-cols > .gb-editor-col { flex: 1 1 50%; min-width: 0px; }
.gb-editor-short-two-cols { display: flex; gap: 12px; }
.gb-editor-short-two-cols .gb-editor-col { flex: 1 1 0%; }
.button { background: var(--gb-blue); color: rgb(255, 255, 255); padding: 8px 12px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; border-radius: 8px; cursor: pointer; margin-right: 6px; font-weight: 700; box-shadow: rgba(14, 63, 58, 0.18) 0px 2px 6px; transition: transform 0.15s, box-shadow 0.15s, filter 0.15s; }
.button:hover { opacity: 1; filter: brightness(1.06); transform: translateY(-1px); box-shadow: rgba(15, 65, 60, 0.24) 0px 4px 10px; }
.gb-action-row { display: flex; justify-content: space-between; align-items: center; margin: 16px 0px 24px; gap: 12px; }
.gb-action-row .button { padding: 10px 18px; font-size: 15px; border-radius: 6px; }
.btn-add { background: rgb(230, 244, 238); border: 1px solid rgb(0, 133, 121); color: rgb(23, 63, 54); }
.btn-save { background: var(--gb-brand-bank); color: rgb(255, 255, 255); font-weight: 600; }
.gb-action-buttons { white-space: normal; }
.gb-action-buttons .button { margin-right: 4px; margin-top: 2px; margin-bottom: 2px; padding: 4px 8px; font-size: 13px; min-height: auto; line-height: 1.2; border-radius: 6px; }
.gb-remove-patient { background-color: rgb(180, 66, 76); color: rgb(255, 228, 92); border-width: medium; border-style: none; border-color: currentcolor; border-image: none; width: 64px; min-width: 64px; height: 34px; padding: 0px 8px; margin: 0px; border-radius: 6px; cursor: pointer; font-size: 14px; font-weight: 700; line-height: 1; white-space: nowrap; transition: background-color 0.2s; }
.gb-remove-patient:hover { background-color: rgb(148, 52, 61); color: rgb(255, 242, 122); }
.gb-remove-patient:active { animation: 0.2s linear 0s 1 normal none running shake; }
.gb-delete-report.button { background-color: rgb(180, 66, 76); color: rgb(255, 255, 255); border-width: medium; border-style: none; border-color: currentcolor; border-image: none; padding: 6px 12px; border-radius: 4px; cursor: pointer; transition: 0.2s; }
.gb-delete-report.button:hover { background-color: rgb(148, 52, 61); }
.gb-delete-report.button:active { transform: scale(0.96); }
.gb-btn-new { font-weight: 600; padding: 6px 14px; width: 90%; margin: 0px; }
#gb-new-report { position: relative; }
#gb-new-report::after { content: "NEW ⚡"; position: absolute; top: -8px; right: -10px; background: rgb(80, 201, 151); color: rgb(22, 80, 56); font-size: 11px; font-weight: 700; padding: 2px 6px; border-radius: 10px; line-height: 1; box-shadow: rgba(0, 0, 0, 0.15) 0px 2px 6px; pointer-events: none; }
.gb-cls-toolbar button { width: 16px; height: 16px; padding: 0px; margin: 0px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; border-radius: 2px; background: rgb(255, 255, 255); color: rgb(0, 107, 60); font-size: 11px; line-height: 20px; cursor: pointer; }
.gb-cls-toolbar button:hover { background: rgb(0, 107, 60); }
.gb-remove-cls { background: rgb(173, 65, 75) !important; }
.gb-remove-cls:hover { background: rgb(145, 54, 64) !important; }
.gb-dialog-footer button { min-width: 90px; height: 38px; border-radius: 8px; border-width: medium; border-style: none; border-color: currentcolor; border-image: none; cursor: pointer; font-size: 14px; font-weight: 600; transition: 0.15s; }
.gb-dialog-footer button:hover { transform: translateY(-1px); }
.gb-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.gb-filter-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 1px solid rgb(183, 218, 207); border-radius: 999px; background: rgb(255, 255, 255); color: rgb(0, 107, 60); font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.15s; }
.gb-filter-chip:hover { background: rgb(245, 245, 245); border-color: rgb(117, 184, 166); color: rgb(9, 146, 89); }
.gb-filter-chip:focus { outline: none; }
.gb-table th, .gb-table td { border: 1px solid rgb(230, 244, 238); padding: 10px; text-align: left; }
.gb-table th { background: var(--gb-surface); color: var(--gb-contrast); }
.gb-table tbody tr { transition: background 0.15s; }
.gb-table tbody tr:nth-child(2n) { background: rgb(247, 250, 251); }
.gb-table tbody tr:hover { background: rgb(230, 244, 238) !important; }
.gb-table tbody tr:hover td { color: rgb(23, 63, 54); }
.gb-table tbody td { border-bottom: 1px solid rgb(230, 244, 238); }
.gb-table th:last-child, .gb-table td:last-child { white-space: nowrap; text-align: center; width: 420px; min-width: 420px; }
.gb-table td:last-child { padding-left: 12px; }
.col-updated { font-size: 12px; color: rgb(0, 133, 121); white-space: nowrap; }
.gb-report-table-box { margin: 18px 0px; }
#gb-report-tables { display: grid; grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 18px; align-items: start; }
#gb-report-tables .gb-report-table-box { margin: 0px; min-width: 0px; }
#gb-report-tables .gb-report-table-wide { grid-column: 1 / -1; }
@media (max-width: 900px) {
  #gb-report-tables { grid-template-columns: 1fr; }
  #gb-report-tables .gb-report-table-box { grid-column: 1; }
}
.gb-report-table { width: 100%; border-collapse: collapse; }
.gb-report-table th { background: rgb(0, 107, 60); color: rgb(255, 255, 255); padding: 8px; border: 1px solid rgb(183, 218, 207); }
.gb-report-table td { border: 1px solid rgb(183, 218, 207); padding: 6px; }
.gb-report-table td:first-child { font-weight: 600; width: auto; }
.gb-report-table-actions { margin: 10px 0px 0px; text-align: left; display: flex; align-items: center; gap: 8px; }
.gb-custom-row-label-wrap { display: flex; align-items: center; gap: 6px; }
.gb-custom-row-label-wrap .gb-row-label-input { flex: 1 1 0%; min-width: 0px; }
.gb-remove-editor-table-row { flex: 0 0 auto; width: 28px; height: 28px; padding: 0px; border: 1px solid rgb(199, 208, 212); border-radius: 50%; background: rgb(255, 255, 255); color: rgb(161, 38, 38); cursor: pointer; }
.gb-cls-gallery { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.gb-cls-thumb { width: 60px; display: flex; flex-direction: column; align-items: center; gap: 5px; position: relative; }
.gb-cls-thumb img { width: 60px; height: 60px; object-fit: cover; border: 1px solid rgb(183, 218, 207); border-radius: 6px; display: block; cursor: zoom-in; }
#gb-report-form .gb-cls-thumb.gb-cls-thumb-expanded { width: 100%; flex-basis: 100%; }
#gb-report-form .gb-cls-thumb.gb-cls-thumb-expanded img { width: auto; max-width: 100%; height: 50vh; object-fit: contain; cursor: zoom-out; background: rgb(244, 247, 248); }
.gb-cls-toolbar { position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%); display: flex; gap: 4px; padding: 2px 3px; border-radius: 6px; background: rgba(0, 0, 0, 0.65); opacity: 0; visibility: hidden; transition: 0.15s; }
.gb-cls-thumb:hover .gb-cls-toolbar { opacity: 1; visibility: visible; }
.gb-image-header { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gb-image-title { font-size: 15px; font-weight: 700; color: rgb(34, 87, 65); margin-bottom: 6px; }
.gb-upload-cls { margin: 0px; width: 220px !important; }
.gb-upload-btn { display: inline-flex; align-items: center; justify-content: center; width: 34px; height: 34px; border: 1px solid rgb(183, 218, 207); border-radius: 6px; background: rgb(255, 255, 255); color: rgb(0, 107, 60); font-size: 22px; cursor: pointer; position: relative; overflow: hidden; }
.gb-image-block { border: 1px solid rgb(183, 218, 207); border-radius: 6px; padding: 10px; background: rgb(255, 255, 255); margin-bottom: 12px; }
.gb-upload-btn.uploading { pointer-events: none; opacity: 0.7; color: transparent; }
.gb-upload-btn.uploading::after { content: "⏳"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); color: rgb(0, 107, 60); font-size: 18px; }
#gb-dialog { position: fixed; inset: 0px; display: none; justify-content: center; align-items: center; background: rgba(0, 0, 0, 0.45); z-index: 999999; opacity: 0; pointer-events: none; transition: 0.18s; }
#gb-dialog.show { display: flex; opacity: 1; pointer-events: auto; }
.gb-dialog-box { width: 650px; max-width: 90vw; max-height: 80vh; overflow: auto; background: rgb(255, 255, 255); border-radius: 10px; padding: 20px; border: 1px solid rgb(117, 184, 166); box-shadow: rgba(15, 65, 60, 0.3) 0px 18px 50px; }
.gb-dialog-title { font-size: 22px; font-weight: bold; margin-bottom: 15px; }
.gb-dialog-body { white-space: pre-line; line-height: 1.6; margin-bottom: 20px; }
.gb-dialog-footer { display: flex; justify-content: flex-end; gap: 10px; }
#gb-dialog .gb-dialog-box { border-radius: 14px; overflow: hidden; animation: 0.18s ease 0s 1 normal none running gbDialogShow; }
.gb-dialog-ok { background: rgb(0, 107, 60); color: rgb(255, 255, 255); }
.button.gb-dialog-cancel { background: rgb(197, 43, 60); border: 1px solid rgb(197, 43, 60); color: rgb(255, 255, 255); }
#gb-dialog.success .gb-dialog-ok { background: rgb(40, 116, 86); }
#gb-dialog.warning .gb-dialog-ok { background: rgb(166, 117, 40); }
#gb-dialog.danger .gb-dialog-ok { background: rgb(159, 61, 70); }
#gb-dialog.info .gb-dialog-ok { background: rgb(0, 107, 60); }
.gb-table-scroll { width: 100%; overflow: auto visible; }
.gb-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 8px 12px; margin-bottom: 12px; }
.gb-filters label { display: grid; gap: 4px; min-width: 170px; }
.gb-filters label:has(#gb-filter-search) { flex: 1 1 260px; }
.gb-filters input { width: 100%; min-height: 36px; padding: 7px 10px; border: 1px solid rgb(183, 218, 207); border-radius: 8px; background: rgb(255, 255, 255); color: rgb(23, 63, 54); box-shadow: none; appearance: auto; }
#gb-filter-from, #gb-filter-to, #gb-filter-search { height: 38px; border-radius: 8px; }
.gb-patient:not(.open) .bn-stt-input { position: relative; z-index: 2; pointer-events: auto; cursor: text; }
.gb-filters .gb-filter-chip { min-height: 36px; }
.gb-sticky-savebar { position: sticky; bottom: 0; z-index: 100; padding: 8px 10px; background: #fff; border-top: 1px solid #d8e2e0; box-shadow: 0 -2px 8px rgba(0,0,0,.05); flex-wrap: wrap; box-sizing: border-box; }
.gb-save-status { flex: 1 1 180px; color: rgb(0, 133, 121); font-size: 12px; text-align: right; }
.gb-save-status[data-state="dirty"], .gb-save-status[data-state="draft-saving"] { color: rgb(138, 90, 19); }
.gb-save-status[data-state="draft-saved"], .gb-save-status[data-state="saved"] { color: rgb(23, 107, 77); }
.gb-save-status[data-state="error"] { color: rgb(161, 47, 60); }
.gb-patient-head:focus-visible, #gb-report-app button:focus-visible { outline: 2px solid var(--gb-focus); outline-offset: 2px; }
@media (max-width: 760px) {
  .gb-list-header { grid-template-columns: 1fr; }
  .gb-list-action, .gb-btn-new { width: 100%; }
  .gb-filters { align-items: stretch; }
  .gb-filters label, .gb-filters label:has(#gb-filter-search) { flex: 1 1 100%; min-width: 100%; }
  .gb-filters .gb-filter-chip { flex: 1 1 100%; }
  .gb-table { min-width: 760px; }
  .gb-save-status { order: 3; flex-basis: 100%; text-align: left; }
}
@media (prefers-reduced-motion: reduce) {
  #gb-report-app *, #gb-dialog * { animation-duration: 0.01ms; animation-iteration-count: 1; transition-duration: 0.01ms; }
}
#gb-report-form #gb-patients .gb-patient[data-loai="vao"] { --gb-type-color: #34706a; --gb-type-soft: #f1f7f7; }
#gb-report-form #gb-patients .gb-patient[data-loai="cc_trong_gio"] { --gb-type-color: #3f7a62; --gb-type-soft: #f2f7f4; }
#gb-report-form #gb-patients .gb-patient[data-loai="cc_ngoai_gio"] { --gb-type-color: #4faf8f; --gb-type-soft: #e9f8f2; }
#gb-report-form #gb-patients .gb-patient[data-loai="chuyen_den"] { --gb-type-color: #2b8962; --gb-type-soft: #dbfdef; }
#gb-report-form #gb-patients .gb-patient[data-loai="chuyen_hstc_cd"], #gb-report-form #gb-patients .gb-patient[data-loai="chuyen_hstc_cc"] { --gb-type-color: #3f6958; --gb-type-soft: #f6f3f8; }
#gb-report-form #gb-patients .gb-patient[data-loai="chuyen_khoa"] { --gb-type-color: #486d69; --gb-type-soft: #f3f4f8; }
#gb-report-form #gb-patients .gb-patient[data-loai="vao_va_chuyen_khoa"] { --gb-type-color: #406d69; --gb-type-soft: #f2f5f6; }
#gb-report-form #gb-patients .gb-patient[data-loai="chuyen_vien"] { --gb-type-color: #337c74; --gb-type-soft: #f1f6f8; }
#gb-report-form #gb-patients .gb-patient[data-loai="theo_doi"] { --gb-type-color: #8f7135; --gb-type-soft: #faf7ef; }
#gb-report-form #gb-patients .gb-patient[data-loai="xin_ve"] { --gb-type-color: #a64b5b; --gb-type-soft: #faf2f4; }
#gb-report-form #gb-patients .gb-patient[data-loai="vao_va_xin_ve"] { --gb-type-color: #6e5d67; --gb-type-soft: #f6f4f5; }
#gb-report-form #gb-patients .gb-patient[data-loai="vao_va_chuyen_vien"] { --gb-type-color: #36756f; --gb-type-soft: #f1f6f6; }
#gb-report-form #gb-patients .gb-patient[data-loai="tu_vong"] { --gb-type-color: #66747a; --gb-type-soft: #f4f6f6; }
#gb-report-form #gb-patients .gb-patient[data-loai="vao_va_tu_vong"] { --gb-type-color: #755e80; --gb-type-soft: #f6f3f7; }
#gb-report-form #gb-patients .gb-patient[data-loai="loc_mau"] { --gb-type-color: #2a625d; --gb-type-soft: #f0f5f7; }
#gb-report-form #gb-patients .gb-patient[data-loai="loc_mau_cap"] { --gb-type-color: #385a4c; --gb-type-soft: #f7f1f5; }
#gb-report-form #gb-patients .gb-patient[data-loai="can_thiep"] { --gb-type-color: #406d5a; --gb-type-soft: #f8f2f5; }
#gb-report-form #gb-patients .gb-patient[data-loai="can_thiep_hoi_suc"] { --gb-type-color: #2f8f83; --gb-type-soft: #eaf7f5; }
#gb-report-form #gb-patients .gb-patient[data-loai="truc_hanh_chinh"] { --gb-type-color: #3d785f; --gb-type-soft: #f8f4f0; }
#gb-report-form #gb-patients .gb-patient[data-loai="khac"] { --gb-type-color: #3e5f5b; --gb-type-soft: #f2f6f6; }
#gb-report-form #gb-patients .gb-patient[data-loai="ca_cdha"] { --gb-type-color: #19665e; --gb-type-soft: #e5f9f7; }
.gb-cdha-editor { width: 100%; }
.gb-cdha-editor-section { margin: 16px 0px; padding: 16px; border: 1px solid rgb(183, 218, 207); border-radius: 12px; background: rgb(255, 255, 255); }
.gb-cdha-editor-section h5 { margin: 0px 0px 14px; color: rgb(0, 107, 60); font-size: 16px; }
.gb-cdha-info-grid { grid-template-columns: repeat(2, minmax(0px, 1fr)); gap: 12px; display: grid !important; }
.gb-cdha-info-grid label { display: flex; flex-direction: column; gap: 6px; }
.gb-cdha-editor-section > label { display: block; margin-top: 12px; }
.gb-cdha-editor-section textarea { width: 100%; min-height: 96px; }
.gb-cdha-image-block { margin: 10px 0px 12px; }
@media (max-width: 760px) {
  .gb-cdha-info-grid { grid-template-columns: 1fr; }
}
#gb-report-form #gb-patients .gb-patient[data-loai]:not([data-loai=""]) { background: var(--gb-type-soft, #ffffff); border-color: var(--gb-type-color, var(--gb-line)); }
#gb-report-form #gb-patients .gb-patient[data-loai]:not([data-loai=""]) .gb-patient-head { background: var(--gb-type-color, var(--gb-blue)); border-color: var(--gb-type-color, var(--gb-blue)); color: rgb(255, 255, 255); }
#gb-report-form #gb-patients .gb-patient[data-loai]:not([data-loai=""]) :is(.label-title, .label-ho-ten, .label-bao-cao, .gb-report-type-label, .gb-image-title) { color: var(--gb-type-color, var(--gb-blue)); }
#gb-report-form #gb-patients .gb-patient[data-loai]:not([data-loai=""]) .gb-patient-body label { color: var(--gb-type-color, var(--gb-blue)); }
#gb-report-form #gb-patients .gb-patient[data-loai]:not([data-loai=""]):not(.open) :is(.summary-bc, .summary-loai, .summary-ten, .bn-stt) { color: rgb(255, 255, 255); }
#gb-report-form .gb-external-patient { border-style: dashed; }
#gb-report-form .gb-external-patient :is(input, select, textarea):disabled { opacity: 0.82; cursor: not-allowed; background: rgb(245, 246, 247); }
#gb-report-form .gb-external-additional { margin-top: 14px; padding-top: 12px; border-top: 1px dashed rgb(183, 218, 207); }
#gb-report-form .gb-additional-editor { display: none; margin-top: 12px; }
#gb-report-form .gb-external-additional.open .gb-additional-editor { display: block; }
#gb-report-form .gb-external-additional textarea[name="additional_info"] { min-height: 110px; width: 100%; }
#gb-report-form .gb-external-patient .summary-bc { font-weight: 700; }
#gb-report-form .gb-image-block[tabindex="0"] { outline: none; transition: border-color 0.16s, box-shadow 0.16s, background 0.16s; }
#gb-report-form .gb-image-drop-hint { display: flex; align-items: center; justify-content: center; min-height: 34px; margin: 2px 0px 8px; padding: 6px 10px; border: 1px dashed rgb(183, 218, 207); border-radius: 6px; background: rgb(248, 251, 252); color: rgb(0, 133, 121); font-size: 13px; line-height: 1.35; text-align: center; cursor: copy; user-select: none; }
#gb-report-form .gb-image-block.gb-image-block-active .gb-image-drop-hint { border-color: rgb(0, 133, 121); background: rgb(245, 251, 248); color: rgb(0, 107, 60); }
#gb-report-form .gb-image-block.gb-drag-over { border-color: rgb(0, 133, 121); box-shadow: rgba(36, 132, 123, 0.14) 0px 0px 0px 3px; background: rgb(245, 251, 248); }
#gb-report-form .gb-image-block.gb-drag-over .gb-image-drop-hint { border-color: rgb(0, 133, 121); background: rgb(245, 251, 248); color: rgb(0, 107, 60); font-weight: 700; }
#gb-report-form .gb-image-block.gb-drag-over .gb-image-drop-hint::before { content: "⬇ "; }
#gb-report-form .gb-image-block.gb-image-uploading .gb-image-drop-hint { opacity: 0.72; }
#gb-report-form .gb-external-patient .gb-image-block:not(.gb-additional-image-block) .gb-image-drop-hint { display: none; }
@media (max-width: 700px) {
  #gb-report-form .gb-image-drop-hint { font-size: 12px; min-height: 32px; padding: 6px 8px; }
}
#gb-report-form .gb-schema-datetime > label { flex: 0 1 280px; width: 280px; max-width: 100%; min-width: 0px; }
#gb-report-form .gb-schema-datetime input[type="datetime-local"] { box-sizing: border-box; width: 100%; min-width: 0px; max-width: 280px; }
#gb-report-form .gb-schema-datetime input[type="datetime-local"]::-webkit-calendar-picker-indicator { opacity: 1; cursor: pointer; padding: 4px; }

.gb-treatment-tools { margin-top: 4px; padding: 0; border: 0; background: transparent; }
.gb-treatment-status { display: block; margin-top: 3px; color: #52635f; font-size: 11px; line-height: 1.4; }
.gb-treatment-undo[hidden], .layout-locmau .gb-treatment-tools { display: none !important; }

.gb-clinical-paste-tools small { display:block; color:#52635f; margin:3px 0; font-size:11px; line-height:1.4; }

/* Compact editor controls; keep the sticky bar neutral and buttons distinct. */
#gb-report-app .gb-sticky-savebar { gap: 8px; background-image: none; }
#gb-report-app .gb-sticky-savebar .button { flex: 0 0 auto; margin: 0; padding: 8px 12px; min-height: 36px; height: auto; line-height: 1.3; font-size: 13px; box-shadow: none; transform: none; white-space: normal; }
#gb-report-app #gb-save-draft { background: #087b61; color: #fff; border: 1px solid #087b61; }
#gb-report-app #gb-add-patient { background: #fff; color: #24564b; border: 1px solid #9dbdb4; }
#gb-report-app .gb-treatment-tools .button,
#gb-report-app .gb-clinical-paste-tools .button { display: inline-block; width: auto; min-width: 0; min-height: 26px; height: auto; margin: 2px 4px 0 0; padding: 3px 7px; border: 1px solid #cbd5d1; border-radius: 4px; background: #fff; color: #40584f; font-size: 11px; font-weight: 500; line-height: 1.4; box-shadow: none; text-transform: none; letter-spacing: normal; }
#gb-report-app .gb-treatment-tools .button:hover,
#gb-report-app .gb-clinical-paste-tools .button:hover { background: #f1f5f3; transform: none; filter: none; box-shadow: none; }
#gb-report-app .gb-sticky-savebar .button:focus-visible,
#gb-report-app .gb-treatment-tools .button:focus-visible,
#gb-report-app .gb-clinical-paste-tools .button:focus-visible { outline: 2px solid #087b61; outline-offset: 2px; }
.gb-clinical-paste-tools[hidden] { display: none !important; }
@media (max-width: 480px) {
 #gb-report-app .gb-sticky-savebar { padding: 6px; gap: 6px; }
 #gb-report-app .gb-sticky-savebar .button { flex: 1 1 auto; font-size: 12px; padding: 7px 8px; }
}
