:root {
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
  color: #273e35;
  background: #f5f7f4;
  font-synthesis: none;
  --green: #167b65;
  --line: #e1e7df;
  --sidebar: 218px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible {
  outline: 3px solid #86b9a6;
  outline-offset: 3px;
}
.icon,
.investigation-glyph {
  flex-shrink: 0;
  vertical-align: middle;
}
.icon {
  width: 20px;
  height: 20px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.boot {
  min-height: 100vh;
  display: grid;
  place-items: center;
}
.app-shell {
  --sidebar: 218px;
  min-height: 100vh;
}
.app-shell.sidebar-collapsed {
  --sidebar: 76px;
}
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  width: var(--sidebar);
  padding: 24px 14px;
  background: #fcfdfb;
  border-right: 1px solid var(--line);
  transition: width 0.18s;
  overflow: hidden;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 4px;
  min-height: 46px;
  white-space: nowrap;
}
.brand-mark {
  width: 39px;
  height: 42px;
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  border-radius: 12px;
}
.brand-mark .icon {
  width: 23px;
  height: 23px;
}
.brand-name {
  font-size: 15px;
  line-height: 1.35;
  font-weight: 650;
  letter-spacing: -0.3px;
}
.sidebar nav {
  display: grid;
  gap: 7px;
  margin-top: 42px;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 45px;
  border: 0;
  background: none;
  padding: 11px 14px;
  border-radius: 9px;
  text-align: start;
  color: #798675;
  white-space: nowrap;
  font-size: 13px;
}
.nav-item:hover {
  background: #f0f5ed;
}
.nav-item.active {
  background: #e9f3e8;
  color: var(--green);
  font-weight: 600;
}
.sidebar-bottom {
  display: grid;
  gap: 4px;
  margin-top: auto;
}
.sidebar-collapsed .brand-name,
.sidebar-collapsed .nav-item span {
  display: none;
}
.sidebar-collapsed .brand {
  padding: 0 3px;
}
.sidebar-collapsed .nav-item {
  justify-content: center;
  padding-inline: 0;
}
.main-shell {
  margin-left: var(--sidebar);
  min-height: 100vh;
  transition: margin-left 0.18s;
}
.topbar {
  height: 68px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 0 34px;
  border-bottom: 1px solid var(--line);
  background: #fcfdfa;
}
.center-name {
  font-size: 13px;
  color: #52664a;
}
.saving-status {
  display: flex;
  margin-left: auto;
  color: #8aa27d;
}
.saving-status .icon {
  width: 17px;
  height: 17px;
}
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #8a9a7e;
  padding: 5px;
  flex-shrink: 0;
}
.icon-button:hover {
  background: #edf3e8;
  color: var(--green);
}
.icon-button .icon {
  width: 17px;
  height: 17px;
}
.sidebar-toggle {
  color: #6c8160;
}
.workspace {
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px 34px 24px;
}
.page-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
h1 {
  font-size: 27px;
  letter-spacing: -0.7px;
  font-weight: 600;
  line-height: 1.3;
  margin: 0;
}
h2 {
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  margin: 0;
}
h3 {
  font-size: 14px;
  font-weight: 600;
}
.desk-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 304px;
  gap: 28px;
  align-items: start;
}
.request-column {
  min-width: 0;
}
.card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 13px;
}
.patient-card {
  padding: 23px;
  margin-bottom: 20px;
}
.patient-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 110px;
  gap: 18px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
}
label,
legend {
  font-size: 12px;
  font-weight: 500;
  color: #52654a;
}
.optional {
  font-size: 10px;
  font-weight: 400;
  color: #98a28f;
  margin-left: 4px;
}
input:not([type="checkbox"]):not([type="radio"]),
select {
  width: 100%;
  height: 43px;
  border: 1px solid #dce5d6;
  background: #fff;
  border-radius: 8px;
  padding: 9px 12px;
  color: #334d38;
  font-size: 14px;
}
input:focus,
select:focus {
  outline: none;
  border-color: #6da587;
  box-shadow: 0 0 0 3px #e9f3e4;
}
input::placeholder {
  color: #a6b29a;
}
input[type="number"] {
  appearance: textfield;
}
input::-webkit-inner-spin-button {
  opacity: 0;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--green);
}
.input-icon {
  position: relative;
}
.input-icon > .icon {
  position: absolute;
  left: 12px;
  top: 13px;
  width: 17px;
  height: 17px;
  color: #a4b197;
  pointer-events: none;
}
.input-icon input {
  padding-left: 38px !important;
}
.suggestions {
  position: absolute;
  left: 0;
  right: 0;
  top: 71px;
  z-index: 30;
  padding: 5px;
  background: white;
  border: 1px solid #d7e4ce;
  border-radius: 9px;
  box-shadow: 0 12px 30px #2f4a3220;
}
.suggestions button {
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: start;
  border: 0;
  background: none;
  width: 100%;
  padding: 10px;
  border-radius: 6px;
}
.suggestions button:hover,
.suggestions button[aria-selected="true"] {
  background: #edf5e7;
}
.suggestions button > span:nth-child(2) {
  flex: 1;
}
.suggestions strong {
  display: block;
  font-size: 13px;
  font-weight: 550;
}
.suggestions small {
  font-size: 10px;
  color: #92a082;
}
.suggestion-avatar {
  display: grid;
  place-items: center;
  color: #8fa57c;
}
.suggestions button > .icon {
  width: 14px;
  color: #9baa8b;
}
.investigation-card {
  padding: 22px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 18px;
}
.section-heading h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}
.count-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 500;
  color: #769364;
  background: #edf4e7;
  border-radius: 5px;
  padding: 2px 6px;
  min-width: 20px;
  text-align: center;
}
.preset-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-bottom: 20px;
  margin-bottom: 18px;
  border-bottom: 1px solid #edf0e6;
}
.preset {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid #e1e8d8;
  border-radius: 7px;
  background: #fcfdf9;
  color: #708561;
  font-size: 11px;
}
.preset .icon {
  width: 14px;
  height: 14px;
  color: #90a47f;
}
.preset:hover,
.preset.active {
  border-color: #a0be8f;
  color: #337349;
  background: #edf6e6;
}
.investigation-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}
.category-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}
.category-tab {
  border: 0;
  background: none;
  color: #8c9a7c;
  padding: 6px 8px;
  border-radius: 5px;
  font-size: 10px;
}
.category-tab.active {
  background: #edf4e6;
  color: #678453;
}
.search-input {
  position: relative;
  width: 148px;
  flex-shrink: 0;
}
.search-input > .icon {
  width: 14px;
  height: 14px;
  position: absolute;
  left: 10px;
  top: 10px;
  color: #a6b298;
}
.search-input input {
  height: 34px !important;
  font-size: 11px !important;
  padding: 7px 10px 7px 31px !important;
}
.investigation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}
.investigation-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 11px 12px;
  border: 1px solid #e5eadf;
  border-radius: 8px;
  cursor: pointer;
  position: relative;
  font-size: 12px;
  color: #4d6541;
}
.investigation-item:hover {
  border-color: #b5caa3;
  background: #fdfefa;
}
.investigation-item.selected {
  background: #f0f7e9;
  border-color: #a4bf90;
}
.investigation-item input {
  position: absolute;
  opacity: 0;
  width: 20px;
  height: 20px;
}
.investigation-item:focus-within {
  outline: 2px solid #74aa7c;
  outline-offset: 2px;
}
.custom-checkbox {
  width: 16px;
  height: 16px;
  border: 1px solid #d2dfc8;
  border-radius: 4px;
  display: grid;
  place-items: center;
  background: white;
  flex-shrink: 0;
}
.custom-checkbox .icon {
  width: 12px;
  height: 12px;
  opacity: 0;
  color: white;
  stroke-width: 2;
}
.selected .custom-checkbox {
  background: #739965;
  border-color: #739965;
}
.selected .custom-checkbox .icon {
  opacity: 1;
}
.investigation-text {
  min-width: 0;
  overflow-wrap: anywhere;
}
.investigation-item > .investigation-glyph {
  width: 20px;
  height: 20px;
  color: #839d70;
}
.request-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  position: sticky;
  bottom: 0;
  z-index: 10;
  padding: 18px 0 8px;
  background: #f5f7f4f5;
  backdrop-filter: blur(8px);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 41px;
  padding: 10px 16px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
}
.button .icon {
  width: 17px;
  height: 17px;
}
.primary {
  background: var(--green);
  border-color: var(--green);
  color: white;
}
.primary:hover:not(:disabled) {
  background: #11634f;
}
.secondary {
  background: white;
  border-color: #dce5d4;
  color: #7b8e6c;
}
.secondary:hover {
  background: #f0f6e8;
}
.subtle {
  background: #f1f6e9;
  color: #789565;
  font-size: 11px;
  padding: 7px 10px;
  min-height: 32px;
}
.print-button {
  min-width: 135px;
}
.preview-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0 0 13px;
}
.preview-heading h2 {
  font-size: 13px;
  color: #819073;
}
.preview-heading > span {
  font-size: 10px;
  color: #9ca88c;
}
.preview-stage {
  padding: 22px 22px 10px;
  border: 1px solid #e3e9d9;
  border-radius: 12px;
  background: #eaf0e2;
}
#receipt-preview {
  background: #fffefa;
  filter: drop-shadow(0 4px 6px #53613a10);
  position: relative;
}
#receipt-preview:after {
  content: "";
  height: 7px;
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  background:
    linear-gradient(135deg, #fffefa 25%, transparent 25%) -5px 0,
    linear-gradient(225deg, #fffefa 25%, transparent 25%) -5px 0;
  background-size: 10px 10px;
}
.receipt {
  width: 100%;
  padding: 20px 18px;
  color: #46513e;
  background: #fffefa;
  overflow-wrap: anywhere;
}
.receipt-header {
  text-align: center;
  border-bottom: 1px solid #a5af97;
  padding-bottom: 13px;
}
.receipt h2 {
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}
.receipt-patient {
  padding: 14px 0;
  border-bottom: 1px dashed #c2cbb5;
}
.receipt-patient strong {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.6;
}
.receipt-age {
  font-size: 10px;
  margin: 4px 0 0;
  color: #8c987d;
}
.receipt-tests {
  padding-top: 10px;
}
.receipt h3 {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid #b6c5a5;
  border-radius: 6px;
  padding: 13px 9px;
  margin: 9px 0 0;
  font-size: 12px;
  line-height: 1.6;
  text-align: center;
  font-weight: 550;
}
.receipt h3 span {
  min-width: 0;
}
.receipt h3 svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}
.receipt-signature {
  height: 78px;
}
.receipt footer {
  border-top: 1px dashed #c2cbb5;
  padding-top: 13px;
}
.receipt-datetime {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 9px;
  color: #859574;
}
.placeholder .receipt-patient strong,
.placeholder .receipt h3 {
  color: #b5bfa8;
}
.placeholder .receipt h3 {
  border-style: dashed;
  font-weight: 400;
}
.preview-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding-top: 14px;
  color: #96a484;
  font-size: 10px;
}
.preview-pagination .icon-button {
  width: 25px;
  height: 25px;
}
.preview-pagination .icon {
  width: 13px;
  height: 13px;
}
.rotate {
  transform: rotate(180deg);
}
.print-options {
  margin-top: 15px;
}
.segmented {
  display: flex;
  gap: 4px;
  border: 1px solid #e1e8d7;
  background: #eef3e7;
  border-radius: 8px;
  padding: 4px;
}
.segmented button {
  flex: 1;
  border: 0;
  background: none;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 6px;
  font-size: 11px;
  color: #8b9d79;
}
.segmented button.active {
  background: white;
  color: #5b8150;
  box-shadow: 0 1px 3px #4661330d;
}
.segmented .icon {
  width: 14px;
  height: 14px;
}
.switch-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  font-size: 12px;
  color: #72885f;
}
.switch-label > span {
  display: flex;
  align-items: center;
  gap: 8px;
}
.switch-label .icon {
  width: 15px;
  height: 15px;
}
.direct-option {
  padding: 17px 4px 0;
}
.switch {
  appearance: none;
  width: 32px;
  height: 18px;
  background: #dce5d1;
  border: 0;
  border-radius: 20px;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  margin: 0;
}
.switch:after {
  content: "";
  width: 12px;
  height: 12px;
  position: absolute;
  top: 3px;
  left: 3px;
  background: white;
  border-radius: 50%;
  transition: transform 0.15s;
}
.switch:checked {
  background: var(--green);
}
.switch:checked:after {
  transform: translateX(14px);
}
.switch:disabled {
  opacity: 0.45;
}
.switch:focus-visible {
  outline: 3px solid #8dbb7e;
  outline-offset: 3px;
}
.settings-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  padding-bottom: 15px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}
.settings-tabs button {
  display: flex;
  align-items: center;
  gap: 7px;
  border: 0;
  border-radius: 7px;
  background: none;
  color: #879a75;
  padding: 9px 12px;
  font-size: 12px;
}
.settings-tabs button.active {
  background: #e9f3e1;
  color: #578349;
}
.settings-tabs .icon {
  width: 17px;
  height: 17px;
}
.settings-card {
  max-width: 1000px;
}
.settings-section {
  padding: 26px;
}
.settings-fields {
  display: grid;
  gap: 24px;
  max-width: 620px;
}
.two-columns {
  grid-template-columns: 1fr 1fr;
  max-width: none;
}
.settings-toggle {
  padding: 18px 0;
}
.settings-divider {
  height: 1px;
  background: var(--line);
  margin: 28px 0;
}
.muted {
  font-size: 11px;
  color: #8b9e7b;
  margin: 22px 0 0;
}
.editor-list {
  border: 1px solid #e7ecdf;
  border-radius: 9px;
  overflow: hidden;
}
.editor-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 15px;
  border-bottom: 1px solid #e7ecdf;
}
.editor-row:last-child {
  border: 0;
}
.editor-row > .investigation-glyph {
  color: #8ba774;
  width: 23px;
  height: 23px;
}
.editor-row > div {
  flex: 1;
  min-width: 0;
}
.editor-row strong {
  font-size: 13px;
  font-weight: 550;
  display: block;
}
.editor-row small {
  font-size: 10px;
  color: #a0ad92;
}
.danger:hover {
  background: #fbf0ea;
  color: #ae6558;
}
.preset-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
}
.preset-editor-card {
  border: 1px solid #e5ecdc;
  border-radius: 11px;
  padding: 18px;
}
.preset-editor-card h3 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 7px;
}
.preset-editor-card h3 .icon {
  width: 17px;
  height: 17px;
  color: #8aa373;
}
.preset-editor-card p {
  font-size: 11px;
  line-height: 1.8;
  color: #90a07e;
  min-height: 60px;
}
.preset-editor-card > div {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}
.companion-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 20px;
}
.history-card {
  overflow: hidden;
}
.history-table {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  text-align: start;
}
th,
td {
  text-align: start;
  padding: 17px 20px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
}
th {
  font-size: 11px;
  font-weight: 500;
  background: #fafcf7;
  color: #96a485;
}
td {
  max-width: 330px;
}
td strong {
  font-weight: 550;
}
td small {
  display: block;
  font-size: 10px;
  color: #98a88a;
  margin-top: 5px;
}
.empty-state {
  padding: 70px 25px;
  text-align: center;
  color: #93a97d;
}
.empty-state > .icon {
  width: 30px;
  height: 30px;
  margin-bottom: 15px;
}
.empty-state h2 {
  margin-bottom: 20px;
}
.empty-small {
  text-align: center;
  color: #9cae8b;
  padding: 36px;
  font-size: 12px;
}
dialog {
  width: min(500px, calc(100% - 28px));
  border: 1px solid #dce7d0;
  border-radius: 15px;
  padding: 26px;
  color: #425a36;
  box-shadow: 0 25px 70px #23372930;
}
dialog::backdrop {
  background: #273c3360;
  backdrop-filter: blur(2px);
}
.dialog-heading {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 15px;
  margin-bottom: 24px;
}
.dialog-heading h2 {
  font-size: 20px;
}
dialog .field {
  margin: 19px 0;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
}
.preset-checkboxes {
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  max-height: 300px;
  overflow: auto;
  margin-top: 18px;
}
.preset-checkboxes label {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  font-size: 12px;
  cursor: pointer;
}
.icon-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  border: 1px solid #e2ebd7;
  border-radius: 10px;
  padding: 13px;
  margin: 23px 0 0;
}
.icon-picker legend {
  padding: 0 5px;
}
.icon-choice {
  cursor: pointer;
  position: relative;
}
.icon-choice input {
  position: absolute;
  opacity: 0;
  width: 38px;
  height: 38px;
  margin: 0;
}
.icon-choice > span {
  width: 44px;
  height: 44px;
  border: 1px solid #e3eadb;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #91a77e;
}
.icon-choice input:checked + span {
  color: #377e52;
  border-color: #89b777;
  background: #eef7e6;
}
.icon-choice input:focus-visible + span {
  outline: 3px solid #98bd86;
  outline-offset: 2px;
}
.form-error {
  color: #b56657;
  font-size: 11px;
  margin: 12px 0 0;
}
.form-error:empty {
  margin: 0;
}
#toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translate(-50%, 12px);
  opacity: 0;
  pointer-events: none;
  z-index: 100;
  background: #2c5a43;
  color: white;
  padding: 12px 18px;
  border-radius: 9px;
  box-shadow: 0 8px 28px #24382c22;
  font-size: 12px;
  max-width: calc(100% - 28px);
  text-align: center;
  transition:
    opacity 0.15s,
    transform 0.15s;
}
#toast.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}
#toast.error {
  background: #9c5549;
}
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(ellipse at 40% 30%, #eaf2e1, transparent 65%), #f7f9f3;
}
.login-card {
  width: min(380px, 100%);
  background: white;
  border: 1px solid #e1e9d8;
  border-radius: 18px;
  padding: 34px;
  box-shadow: 0 14px 50px #45653406;
}
.login-card h1 {
  font-size: 24px;
  margin: 22px 0 30px;
}
.login-card form > label {
  display: block;
  margin-bottom: 9px;
}
.password-field {
  position: relative;
}
.password-field input {
  padding-right: 45px !important;
}
.password-field .icon-button {
  position: absolute;
  right: 6px;
  top: 6px;
}
.login-submit {
  width: 100%;
  margin-top: 22px;
}
@media (max-width: 1150px) {
  .desk-grid {
    grid-template-columns: minmax(0, 1fr) 270px;
    gap: 22px;
  }
  .investigation-grid {
    grid-template-columns: 1fr;
  }
  .investigation-toolbar {
    flex-wrap: wrap;
  }
  .search-input {
    width: 100%;
  }
  .workspace {
    padding-inline: 26px;
  }
  .topbar {
    padding-inline: 26px;
  }
}
@media (max-width: 900px) {
  .app-shell {
    --sidebar: 76px;
  }
  .brand-name,
  .nav-item span {
    display: none;
  }
  .brand {
    padding-inline: 3px;
  }
  .nav-item {
    justify-content: center;
    padding-inline: 0;
  }
  .patient-fields {
    grid-template-columns: minmax(0, 1fr) 82px;
    gap: 12px;
  }
  .patient-card,
  .investigation-card {
    padding: 18px;
  }
  .optional {
    font-size: 9px;
  }
  .two-columns {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .app-shell,
  .app-shell.sidebar-collapsed {
    --sidebar: 0px;
  }
  .sidebar {
    width: 218px;
    transform: translateX(-100%);
    box-shadow: 12px 0 40px #31452f14;
    transition: transform 0.18s;
  }
  .app-shell:not(.sidebar-collapsed) .sidebar {
    transform: translateX(0);
  }
  .app-shell:not(.sidebar-collapsed) .main-shell {
    margin-left: 218px;
    min-width: 320px;
  }
  .brand-name,
  .nav-item span {
    display: block;
  }
  .nav-item {
    padding: 11px 14px;
    justify-content: flex-start;
  }
  .sidebar-collapsed .brand-name,
  .sidebar-collapsed .nav-item span {
    display: block;
  }
  .workspace {
    padding: 22px 18px;
  }
  .topbar {
    height: 59px;
    padding-inline: 16px;
    gap: 12px;
  }
  .desk-grid {
    grid-template-columns: 1fr;
  }
  .page-heading {
    margin-bottom: 20px;
  }
  h1 {
    font-size: 25px;
  }
  .preview-column {
    width: min(320px, 100%);
    margin-inline: auto;
  }
  .print-button {
    flex: 1;
  }
  .request-actions {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  .settings-tabs {
    gap: 3px;
  }
  .settings-tabs button {
    font-size: 11px;
    padding: 7px 8px;
  }
  .settings-tabs .icon {
    width: 15px;
  }
  .settings-section {
    padding: 18px;
  }
  .center-name {
    font-size: 12px;
  }
  .saving-status {
    display: none;
  }
  .page-heading .button {
    padding-inline: 12px;
  }
}
@media print {
  body > * {
    display: none !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
  }
}
[hidden] {
  display: none !important;
}
.sidebar-close {
  display: none;
}
@media (max-width: 700px) {
  .app-shell:not(.sidebar-collapsed) .main-shell {
    margin-left: 0;
    min-width: 0;
  }
  .sidebar-close {
    display: grid;
    position: absolute;
    top: 28px;
    right: 8px;
    width: 25px;
    height: 25px;
  }
  .sidebar .brand-name {
    font-size: 14px;
  }
}
.custom-checkbox {
  pointer-events: none;
}
/* Density and navigation are local display preferences. Receipt documents keep
   their own print CSS, so compact mode never changes the printed dimensions. */
.brand {
  border: 0;
  background: none;
  text-align: left;
  color: inherit;
}
.app-shell:not(.sidebar-collapsed) .brand-name,
.app-shell:not(.sidebar-collapsed) .nav-item span {
  display: block;
}
.app-shell:not(.sidebar-collapsed) {
  --sidebar: 218px;
}
.app-shell:not(.sidebar-collapsed) .nav-item {
  justify-content: flex-start;
}
.sidebar-scrim,
.preview-scrim,
.preview-close {
  display: none;
}
.preview-hidden .preview-column {
  display: none;
}
.preview-hidden .desk-grid {
  grid-template-columns: minmax(0, 1fr);
}
.density-toggle[aria-pressed="true"] {
  color: var(--green);
  background: #edf4e7;
}
.preview-toggle {
  color: #819873;
}
.compact-layout:not(.sidebar-collapsed) {
  --sidebar: 184px;
}
.compact-layout.sidebar-collapsed {
  --sidebar: 60px;
}
.compact-layout .sidebar {
  padding: 14px 9px;
}
.compact-layout .brand {
  min-height: 38px;
  padding: 0 2px;
  gap: 9px;
}
.compact-layout .brand-mark {
  width: 36px;
  height: 38px;
  border-radius: 10px;
}
.compact-layout .brand-name {
  font-size: 13px;
}
.compact-layout .sidebar nav {
  margin-top: 22px;
  gap: 4px;
}
.compact-layout .nav-item {
  min-height: 38px;
  padding: 8px 10px;
}
.compact-layout.sidebar-collapsed .nav-item {
  padding-inline: 0;
}
.compact-layout .workspace {
  max-width: 1500px;
  padding: 14px 18px;
}
.compact-layout .desk-workspace {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.compact-layout .page-heading {
  margin-bottom: 10px;
  gap: 10px;
  flex-shrink: 0;
}
.compact-layout h1 {
  font-size: 21px;
}
.compact-layout h2 {
  font-size: 13px;
}
.compact-layout .desk-grid {
  grid-template-columns: minmax(0, 1fr) 250px;
  gap: 16px;
  flex: 1;
  min-height: 0;
  align-items: stretch;
}
.compact-layout.preview-hidden .desk-grid {
  grid-template-columns: minmax(0, 1fr);
}
.compact-layout .request-column {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.compact-layout .patient-card {
  padding: 12px 14px;
  margin-bottom: 10px;
  flex-shrink: 0;
  border-radius: 10px;
}
.compact-layout .patient-fields {
  grid-template-columns: minmax(0, 1fr) 92px;
  gap: 14px;
}
.compact-layout .field {
  gap: 5px;
}
.compact-layout input:not([type="checkbox"]):not([type="radio"]),
.compact-layout select {
  height: 35px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 6px;
}
.compact-layout .input-icon > .icon {
  top: 10px;
  width: 15px;
  height: 15px;
}
.compact-layout .suggestions {
  top: 61px;
}
.compact-layout .investigation-card {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 12px 14px;
  border-radius: 10px;
  flex: 0 1 auto;
}
.compact-layout .section-heading {
  margin-bottom: 8px;
  gap: 8px;
  flex-shrink: 0;
}
.compact-layout .section-heading .icon-button {
  width: 25px;
  height: 25px;
}
.compact-layout .preset-list {
  padding-bottom: 9px;
  margin-bottom: 9px;
  gap: 6px;
  flex-shrink: 0;
}
.compact-layout .preset {
  min-height: 29px;
  padding: 4px 8px;
  font-size: 10px;
  gap: 5px;
}
.compact-layout .preset .icon {
  width: 13px;
  height: 13px;
}
.compact-layout .preset-list > .icon-button {
  width: 27px;
  height: 27px;
}
.compact-layout .investigation-toolbar {
  flex-wrap: nowrap;
  margin-bottom: 9px;
  gap: 8px;
  flex-shrink: 0;
}
.compact-layout .category-tabs {
  gap: 2px;
}
.compact-layout .category-tab {
  padding: 5px 7px;
  font-size: 10px;
}
.compact-layout .search-input {
  width: 140px;
}
.compact-layout .search-input input {
  height: 30px !important;
  padding-block: 5px !important;
}
.compact-layout .search-input > .icon {
  top: 8px;
}
.compact-layout #investigation-list {
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.compact-layout .investigation-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  align-content: start;
}
.compact-layout .investigation-item {
  min-height: 40px;
  padding: 7px 9px;
  gap: 8px;
  font-size: 12px;
  border-radius: 6px;
  line-height: 1.4;
}
.compact-layout .investigation-item > .investigation-glyph {
  width: 18px;
  height: 18px;
}
.compact-layout .request-actions {
  position: static;
  flex-shrink: 0;
  padding: 10px 0 0;
  gap: 8px;
}
.compact-layout .button {
  min-height: 35px;
  padding: 7px 12px;
  font-size: 12px;
  border-radius: 6px;
}
.compact-layout .print-button {
  min-width: 120px;
}
.compact-layout .preview-column {
  min-height: 0;
  align-self: start;
}
.compact-layout .preview-heading {
  margin-bottom: 9px;
}
.compact-layout .preview-stage {
  padding: 14px 14px 8px;
  border-radius: 10px;
  max-height: calc(100dvh - 220px);
  overflow-y: auto;
  scrollbar-width: thin;
}
.compact-layout .receipt {
  padding: 14px 13px;
}
.compact-layout .receipt-header {
  padding-bottom: 9px;
}
.compact-layout .receipt h2 {
  font-size: 13px;
}
.compact-layout .receipt-patient {
  padding: 10px 0;
}
.compact-layout .receipt-patient strong {
  font-size: 13px;
}
.compact-layout .receipt-tests {
  padding-top: 5px;
}
.compact-layout .receipt h3 {
  padding: 9px 7px;
  margin-top: 6px;
  font-size: 11px;
}
.compact-layout .receipt h3 svg {
  width: 21px;
  height: 21px;
}
.compact-layout .receipt-signature {
  height: 52px;
}
.compact-layout .receipt footer {
  padding-top: 9px;
}
.compact-layout .receipt-datetime {
  font-size: 8px;
}
.compact-layout .preview-pagination {
  padding-top: 9px;
}
.compact-layout .print-options {
  margin-top: 10px;
}
.compact-layout .segmented button {
  padding: 7px 4px;
  font-size: 10px;
}
.compact-layout .direct-option {
  padding-top: 12px;
  font-size: 11px;
}
.compact-layout .settings-section {
  padding: 18px;
}
.compact-layout .settings-fields {
  gap: 16px;
}
.compact-layout .settings-toggle {
  padding: 12px 0;
}
.compact-layout .settings-tabs {
  margin-bottom: 14px;
  padding-bottom: 10px;
}
.compact-layout .settings-tabs button {
  padding: 6px 9px;
}
.compact-layout .editor-row {
  padding: 10px 12px;
}
.compact-layout .preset-editor-card {
  padding: 14px;
}
.compact-layout .preset-editor-card p {
  min-height: 40px;
}
@media (min-width: 1280px) {
  .compact-layout .investigation-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 760px) and (max-width: 1000px) {
  .compact-layout .workspace {
    padding-inline: 14px;
  }
  .compact-layout .desk-grid {
    grid-template-columns: minmax(0, 1fr) 226px;
    gap: 12px;
  }
  .compact-layout .investigation-toolbar {
    flex-wrap: wrap;
  }
  .compact-layout .search-input {
    width: 100%;
  }
}
@media (max-width: 759px) {
  .app-shell,
  .app-shell.sidebar-collapsed,
  .compact-layout,
  .compact-layout.sidebar-collapsed {
    --sidebar: 56px;
  }
  .app-shell:not(.sidebar-collapsed) {
    --sidebar: 192px;
  }
  .sidebar {
    width: var(--sidebar);
    transform: none;
    padding: 14px 8px;
    box-shadow: none;
  }
  .app-shell:not(.sidebar-collapsed) .sidebar {
    transform: none;
    box-shadow: 10px 0 35px #253c2d18;
  }
  .app-shell .main-shell,
  .app-shell:not(.sidebar-collapsed) .main-shell {
    margin-left: 56px;
    min-width: 0;
  }
  .sidebar .brand {
    padding: 0 1px;
  }
  .sidebar .brand-mark {
    width: 36px;
    height: 38px;
  }
  .sidebar-collapsed .brand-name,
  .sidebar-collapsed .nav-item span {
    display: none;
  }
  .app-shell.sidebar-collapsed .nav-item {
    padding-inline: 0;
  }
  .app-shell:not(.sidebar-collapsed) .sidebar-scrim {
    display: block;
    position: fixed;
    inset: 0 0 0 192px;
    background: #28482e0a;
    border: 0;
    z-index: 19;
  }
  .preview-column {
    display: none;
  }
  .app-shell:not(.preview-hidden) .preview-column {
    display: block;
    position: fixed;
    z-index: 31;
    inset: 28px 14px auto 70px;
    max-height: calc(100dvh - 56px);
    width: auto;
    max-width: 340px;
    margin-inline: auto;
    background: #f7f9f3;
    border: 1px solid #dce7d2;
    border-radius: 12px;
    padding: 14px;
    overflow-y: auto;
  }
  .app-shell:not(.preview-hidden) .preview-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 30;
    background: #24452d40;
    border: 0;
  }
  .preview-close {
    display: inline-grid;
    margin-left: 8px;
  }
  .preview-heading h2 {
    margin-right: auto;
  }
  .preview-stage {
    max-height: calc(100dvh - 240px);
    overflow-y: auto;
  }
  .compact-layout .desk-grid,
  .compact-layout.preview-hidden .desk-grid {
    grid-template-columns: minmax(0, 1fr);
  }
  .compact-layout .workspace {
    padding: 12px 10px;
  }
  .compact-layout h1 {
    font-size: 20px;
  }
  .compact-layout .patient-card,
  .compact-layout .investigation-card {
    padding: 10px;
  }
  .compact-layout .patient-fields {
    grid-template-columns: minmax(0, 1fr) 70px;
    gap: 10px;
  }
  .compact-layout .age-field .optional {
    display: none;
  }
  .compact-layout .investigation-toolbar {
    flex-wrap: wrap;
  }
  .compact-layout .search-input {
    width: 100%;
  }
  .compact-layout .investigation-grid {
    grid-template-columns: 1fr;
  }
  .compact-layout .investigation-item {
    min-height: 38px;
  }
  .compact-layout .preset {
    font-size: 9px;
    padding-inline: 6px;
  }
  .compact-layout .preset-list {
    gap: 4px;
  }
  .compact-layout .request-actions .print-button {
    flex: 1;
  }
}
