@import url("/css/pages/default.css");



.health-page {
  flex: 1;
  min-width: 0;
  min-height: 0;
  overflow-x: clip;
}

.health-main {
  display: flex;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  flex-direction: column;
  gap: 24px;
  padding: 32px 32px 48px;
}



.health-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.health-page-head__title {
  max-width: 600px;
}

.health-page-head__title h1 {
  margin: 0;
}

.health-page-head__title p {
  margin: 4px 0 0;
  color: #41484c;
  font-size: 16px;
  line-height: 24px;
}



.health-status {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-radius: 12px;
  background: #dcfce7;
  color: #166534;
  font-size: 14px;
  font-weight: 500;
}

.health-status.is-error {
  background: #fee2e2;
  color: #b91c1c;
}



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

.health-stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px 24px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.health-stat-card__label {
  display: flex;
  align-items: center;
  gap: 12px;
}

.health-stat-card h2 {
  margin: 0;
  color: #41484c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.35px;
  line-height: 20px;
}

.health-stat-card strong {
  display: block;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 36px;
}

.insight-icon {
  display: inline-flex;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
}

.insight-icon svg,
.insight-icon img {
  width: 20px;
  height: 20px;
}

.insight-icon svg {
  fill: currentColor;
}

.insight-icon img {
  display: block;
}

.insight-icon--blue {
  background: #c7e7ff;
  color: #00658f;
}

.insight-icon--purple {
  background: #dfe0ff;
  color: #4455ba;
}

.insight-icon--orange {
  background: #ffedd5;
  color: #c2410c;
}

.insight-icon--red {
  background: #ffdad6;
  color: #ba1a1a;
}



.health-tabs {
  display: flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #f3f3f5;
  width: fit-content;
}

.health-tab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #41484c;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 20px;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
  white-space: nowrap;
}

.health-tab svg,
.health-tab img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
}

.health-tab svg {
  fill: currentColor;
}

.health-tab img {
  display: block;
}

.health-tab--health-shield img {
  width: 15px;
  height: 15px;
  min-width: 15px;
  object-fit: contain;
}

.health-tab:hover {
  background: rgba(0, 101, 143, 0.07);
  color: #00658f;
}

.health-tab.is-active {
  background: #00658f;
  box-shadow: 0 1px 4px rgba(0, 101, 143, 0.22);
  color: #ffffff;
}

.health-tab.is-active img {
  filter: brightness(0) invert(1);
}



.health-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: healthPanelIn 180ms ease;
}

.health-panel[hidden] {
  display: none !important;
}

@keyframes healthPanelIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}



.health-filters {
  display: flex;
  align-items: center;
  gap: 24px;
}

.health-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-filter > span,
.health-type-filter > span {
  padding: 0 4px;
  color: #41484c;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.health-filter .custom-select {
  position: relative;
  z-index: 1;
  width: 220px;
}

.health-filter .custom-select__button {
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
}

.health-filter .custom-select.is-open {
  z-index: 100;
}

.health-filter .custom-select__menu {
  z-index: 1000;
}

.health-type-filter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-type-filter div {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  height: 42px;
  gap: 0;
  padding: 4px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #f3f3f5;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.health-type-filter button {
  flex: 0 0 auto;
  height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #41484c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  line-height: 20px;
  padding: 6px 14px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.health-type-filter button.is-active {
  background: #00658f;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  color: #ffffff;
}

[data-allergens-view].health-view-swap,
[data-health-medicines-panel].health-view-swap {
  animation: healthTypeViewIn 240ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes healthTypeViewIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  [data-allergens-view].health-view-swap,
  [data-health-medicines-panel].health-view-swap,
  .health-panel,
  .health-medicines-subpanel {
    animation: none !important;
  }
}



.health-table-card {
  overflow: hidden;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

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

.health-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
}

.health-table thead {
  background: #edeeef;
}

.health-table th,
.health-table td {
  border-bottom: 1px solid #c0c7cc;
  color: #41484c;
  font-size: 15px;
  line-height: 22px;
  padding: 14px 20px;
  text-align: left;
  vertical-align: middle;
  background-clip: padding-box;
}

.health-table th {
  color: #41484c;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.6px;
  line-height: 20px;
}

.health-table tbody tr:last-child td {
  border-bottom: 0;
}

.health-table td.health-table__actions {
  display: table-cell;
  vertical-align: middle;
  white-space: nowrap;
  overflow: visible;
}

.health-table td.health-table__actions .edit-btn {
  vertical-align: middle;
}

.health-table td strong {
  display: block;
  color: #191c1d;
  font-size: 14px;
  font-weight: 600;
}

.health-table td small {
  display: block;
  color: #71787d;
  font-size: 12px;
  line-height: 18px;
}

.health-table__empty td {
  padding: 32px 16px;
  color: #71787d;
  text-align: center;
}

.health-table__muted-code {
  color: #71787d;
  font-size: 12px;
  font-style: italic;
}

.health-group-label {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: #f3f4f6;
  color: #41484c;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
}

.health-type-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-type-tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.health-type-tag--food { background: #e3f5eb; color: #2d7a52; }
.health-type-tag--drug { background: #e8ecfc; color: #4455ba; }
.health-type-tag--environmental { background: #e6f4fa; color: #1a6d8f; }
.health-type-tag--contact { background: #faf0dc; color: #8a6518; }
.health-type-tag--physical { background: #f3e8ff; color: #6b4fa8; }
.health-type-tag--none { background: #f3f4f6; color: #71787d; }



.health-bool {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 6px;
}

.health-bool--yes {
  background: #dcfce7;
  color: #15803d;
}

.health-bool--no {
  background: transparent;
  color: #c0c7cc;
}

.health-bool svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.health-bool__dash {
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
}







.health-groups-panel {
  overflow: hidden;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.health-groups-list {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.health-groups-pagination {
  margin-top: 0;
  border: 0;
  border-top: 1px solid #c0c7cc;
  border-radius: 0;
}

.health-group-card {
  border: 0;
  border-bottom: 1px solid #e8eaed;
  border-radius: 0;
  background: #ffffff;
  box-shadow: none;
  overflow: hidden;
}

.health-group-card:last-child {
  border-bottom: 0;
}

.health-group-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 20px;
  background: #f8f9fb;
  border-bottom: 1px solid transparent;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.health-group-card.is-open .health-group-card__header {
  border-bottom-color: #e8eaed;
}

.health-group-card__header:hover {
  background: #eef2ff;
}

.health-group-card__name {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.health-group-card__icon {
  display: inline-flex;
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  background: #dfe0ff;
  color: #4455ba;
}

.health-group-card__icon svg,
.health-group-card__icon img {
  width: 16px;
  height: 16px;
}

.health-group-card__icon svg {
  fill: currentColor;
}

.health-group-card__icon img {
  display: block;
}

.health-group-card__title {
  min-width: 0;
}

.health-group-card__title strong {
  display: block;
  color: #191c1d;
  font-size: 14px;
  font-weight: 700;
  line-height: 20px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.health-group-card__title small {
  display: block;
  color: #71787d;
  font-size: 12px;
  line-height: 16px;
}

.health-group-card__chevron {
  flex-shrink: 0;
  color: #6b7280;
  transition: transform 200ms ease;
}

.health-group-card__chevron svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.health-group-card.is-open .health-group-card__chevron {
  transform: rotate(180deg);
}

.health-group-card__children {
  display: none;
  flex-direction: column;
  gap: 0;
  padding: 8px 0;
}

.health-group-card.is-open .health-group-card__children {
  display: flex;
}

.health-group-card__empty {
  padding: 14px 20px 14px 52px;
  color: #71787d;
  font-size: 13px;
  line-height: 18px;
  background: #fafbfc;
}

.health-group-child {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px 10px 52px;
  border-bottom: 1px solid #f0f1f3;
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
  line-height: 18px;
  transition: background 120ms ease;
}

.health-group-child:last-child {
  border-bottom: 0;
}

.health-group-child:hover {
  background: #f6f7fb;
}

.health-group-child span {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  background: #eff6ff;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 600;
  margin-left: auto;
}



.health-reactions-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.health-reactions-chart-card {
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
  padding: 24px;
}

.health-reactions-chart-card h3 {
  margin: 0 0 20px;
  color: #191c1d;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

#reactions-chart {
  display: block;
  width: 100%;
  height: auto;
  max-width: 280px;
  margin: 0 auto;
}

.health-reactions-legend {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 20px;
}

.health-reactions-legend-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.health-reactions-legend-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  flex-shrink: 0;
}

.health-reactions-legend-item span {
  color: #41484c;
  font-size: 13px;
  line-height: 18px;
}

.health-reactions-list-card {
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
  overflow: hidden;
}

.health-reactions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0;
}

.health-reaction-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid #f0f1f3;
  border-right: 1px solid #f0f1f3;
  color: #191c1d;
  font-size: 14px;
  font-weight: 500;
  line-height: 20px;
  transition: background 120ms ease;
}

.health-reaction-item:hover {
  filter: brightness(0.985);
}

.health-reaction-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(25, 28, 29, 0.08);
}

.health-reaction-dot--skin { background: #ea8544; }
.health-reaction-dot--respiratory { background: #2f94c3; }
.health-reaction-dot--eye { background: #6f74d0; }
.health-reaction-dot--digestive { background: #4eb87a; }
.health-reaction-dot--systemic { background: #d15a56; }
.health-reaction-dot--other { background: #6f7885; }

.health-reaction-item--skin { background: linear-gradient(90deg, rgba(255, 237, 213, 0.55), transparent 52%); }
.health-reaction-item--respiratory { background: linear-gradient(90deg, rgba(199, 231, 255, 0.55), transparent 52%); }
.health-reaction-item--eye { background: linear-gradient(90deg, rgba(223, 224, 255, 0.55), transparent 52%); }
.health-reaction-item--digestive { background: linear-gradient(90deg, rgba(220, 252, 231, 0.45), transparent 52%); }
.health-reaction-item--systemic { background: linear-gradient(90deg, rgba(255, 218, 214, 0.5), transparent 52%); }
.health-reaction-item--other { background: linear-gradient(90deg, rgba(237, 238, 239, 0.8), transparent 52%); }

.health-reaction-id {
  margin-left: auto;
  padding: 2px 8px;
  border-radius: 100px;
  background: #edf5f9;
  color: #00658f;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}



.health-severities-layout {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 20px;
  align-items: start;
}

.health-severities-chart-card {
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
  padding: 24px;
}

.health-severities-chart-card h3 {
  margin: 0 0 24px;
  color: #191c1d;
  font-size: 16px;
  font-weight: 700;
  line-height: 24px;
}

.health-severity-scale {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.health-severity-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.health-severity-bar__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.health-severity-bar__label {
  font-size: 13px;
  font-weight: 700;
  color: #191c1d;
}

.health-severity-bar__code {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.health-severity-bar__track {
  height: 10px;
  border-radius: 9999px;
  background: #e8eaed;
  overflow: hidden;
}

.health-severity-bar__fill {
  height: 100%;
  border-radius: 9999px;
  transition: width 600ms cubic-bezier(0.34, 1.56, 0.64, 1);
}


.severity--unknown .health-severity-bar__fill { background: #a3acb6; }
.severity--unknown .health-severity-bar__code { background: #edeeef; color: #5c6670; }

.severity--mild .health-severity-bar__fill { background: #4eb87a; }
.severity--mild .health-severity-bar__code { background: #e3f5eb; color: #2d7a52; }

.severity--moderate .health-severity-bar__fill { background: #dba948; }
.severity--moderate .health-severity-bar__code { background: #faf0dc; color: #8a6518; }

.severity--severe .health-severity-bar__fill { background: #e8894f; }
.severity--severe .health-severity-bar__code { background: #fdf0e6; color: #a85a28; }

.severity--critical .health-severity-bar__fill { background: #c95555; }
.severity--critical .health-severity-bar__code { background: #fce8e8; color: #a83232; }

.health-severities-table-card {
  overflow: hidden;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.health-severity-level {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  height: 28px;
  padding: 0 8px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
}

.health-severity-level--0 { background: #edeeef; color: #5c6670; }
.health-severity-level--1 { background: #e3f5eb; color: #2d7a52; }
.health-severity-level--2 { background: #faf0dc; color: #8a6518; }
.health-severity-level--3 { background: #fdf0e6; color: #a85a28; }
.health-severity-level--4 { background: #fce8e8; color: #a83232; }


.page-skeleton--health .page-skeleton__insights {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}

.page-skeleton__health-tabs {
  display: flex;
  gap: 4px;
  width: fit-content;
}

.page-skeleton__health-tab {
  width: 120px;
  height: 38px;
  border-radius: 9px;
}

.insight-icon--green {
  background: #d8f3e3;
  color: #1f7a47;
}



.health-medicines-panel {
  margin-top: 4px;
}

.health-subtabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 16px;
  padding: 4px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #f3f3f5;
  width: fit-content;
  max-width: 100%;
}

.health-subtab {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  padding: 0 18px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: #41484c;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.3px;
  line-height: 20px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.health-subtab img {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  display: block;
}

.health-subtab:hover {
  background: rgba(0, 101, 143, 0.07);
  color: #00658f;
}

.health-subtab.is-active {
  background: #00658f;
  box-shadow: 0 1px 4px rgba(0, 101, 143, 0.22);
  color: #ffffff;
}

.health-subtab.is-active img {
  filter: brightness(0) invert(1);
}

.health-medicines-subpanel {
  animation: health-fade-in 0.18s ease;
}

@keyframes health-fade-in {
  from { opacity: 0.6; }
  to { opacity: 1; }
}

.health-filters--medicines {
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.health-med-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.health-med-stat {
  padding: 14px 16px;
  border: 1px solid #e0e4e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 1px 2px rgba(25, 28, 29, 0.04);
}

.health-med-stat__label {
  display: block;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6f7885;
}

.health-med-stat strong {
  font-size: 24px;
  line-height: 1.1;
  color: #191c1d;
}

.health-med-chart-strip {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 16px;
  padding: 16px 20px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
}

.health-med-chart-strip__chart {
  flex: 0 0 180px;
}

#medicines-form-chart {
  display: block;
  width: 180px;
  height: 180px;
}

.health-med-chart-strip__content {
  flex: 1;
  min-width: 0;
}

.health-med-chart-strip__content h3 {
  margin: 0 0 4px;
  color: #191c1d;
  font-size: 15px;
  font-weight: 700;
}

.health-med-chart-strip__hint {
  margin: 0 0 12px;
  font-size: 12px;
  line-height: 1.45;
  color: #71787d;
}

.health-med-chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.health-med-chart-legend__item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border: 1px solid #e0e4e8;
  border-radius: 999px;
  background: #f8f9fb;
  font: inherit;
  font-size: 13px;
  color: #41484c;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, opacity 150ms ease;
}

.health-med-chart-legend__item:hover {
  background: #eef6fb;
  border-color: #b8d9ea;
}

.health-med-chart-legend__item.is-dimmed {
  opacity: 0.38;
}

.health-med-chart-legend__item.is-active {
  background: #fff;
  border-color: var(--legend-color);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--legend-color) 28%, transparent);
  font-weight: 600;
}

.health-med-chart-legend__item.is-active .health-med-chart-legend__label,
.health-med-chart-legend__item.is-active .health-med-chart-legend__count {
  color: var(--legend-color);
}

.health-med-chart-legend__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--legend-color, #2f94c3);
  flex-shrink: 0;
}

.health-med-chart-legend__count {
  font-weight: 700;
  color: #191c1d;
}

.health-med-chart-legend__empty {
  font-size: 13px;
  color: #71787d;
}

.health-table-wrap--medicines {
  overflow-x: visible;
}

.health-table-card--medicines .health-pagination {
  margin-top: 0;
  border-top: 1px solid #c0c7cc;
  border-radius: 0;
}

.health-table.health-table--medicines,
.health-table.health-table--plans {
  min-width: 0;
}

.health-table--medicines {
  width: 100%;
  min-width: 0;
  table-layout: fixed;
}

.health-table--medicines th,
.health-table--medicines td {
  padding: 12px 14px;
  font-size: 14px;
  line-height: 20px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.health-table--medicines .health-table__col-expand {
  width: 44px;
  padding-left: 12px !important;
  padding-right: 6px !important;
}

.health-table--medicines .health-table__col-medicine {
  width: 24%;
}

.health-table--medicines .health-table__col-ingredient {
  width: 18%;
}

.health-table--medicines .health-table__col-strength {
  width: 14%;
}

.health-table--medicines .health-table__col-form-route {
  width: 18%;
}

.health-table--medicines .health-table__col-flags {
  width: 14%;
}

.health-med-table-form-route {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.health-med-table-form-route .health-med-table-pill {
  max-width: 100%;
}

.health-med-expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 1px solid #d8dde2;
  border-radius: 8px;
  background: #fff;
  color: #41484c;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.health-med-expand svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  transition: transform 150ms ease;
}

.health-med-row.is-expanded .health-med-expand svg {
  transform: rotate(180deg);
}

.health-med-expand:hover {
  background: #eef6fb;
  border-color: #2f94c3;
  color: #00658f;
}

.health-med-row {
  cursor: pointer;
  transition: background 150ms ease;
}

.health-med-row:hover {
  background: #f8fbfd;
}

.health-med-row.is-expanded {
  background: #f4f9fc;
}

.health-med-table-name strong {
  margin-bottom: 2px;
}

.health-med-table-pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.health-med-table-pill--form {
  background: #eef4ff;
  color: #3b5ccc;
}

.health-med-table-pill--route {
  background: #fff4e8;
  color: #b86a1f;
}

.health-med-table-flags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-med-table-flag {
  display: inline-flex;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}

.health-med-table-flag--cold {
  background: #e8f6fc;
  color: #1f7aa8;
}

.health-med-table-flag--rx {
  background: #ffdad6;
  color: #ba1a1a;
}

.health-med-detail td {
  padding: 0 !important;
  background: #f4f6f8;
  border-bottom: 1px solid #c0c7cc !important;
}

.health-med-detail__panel {
  padding: 12px 16px 16px 48px;
}

.health-med-detail:not([hidden]) .health-med-detail__panel {
  animation: health-med-detail-in 0.22s ease;
}

@keyframes health-med-detail-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.health-med-detail__card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  padding: 16px 18px;
  border: 1px solid #e0e4e8;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 2px 8px rgba(25, 28, 29, 0.04);
}

.health-med-detail__section {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8f9fb;
}

.health-med-detail__section--usage {
  background: #f4faf6;
  border-left: 3px solid #4eb87a;
}

.health-med-detail__section-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.health-med-detail__section-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex-shrink: 0;
}

.health-med-detail__section-icon svg {
  width: 18px;
  height: 18px;
}

.health-med-detail__section-icon--info {
  background: #eef4ff;
  color: #3b5ccc;
}

.health-med-detail__section-icon--usage {
  background: #e3f5eb;
  color: #2f8f57;
}

.health-med-detail__section h4 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6f7885;
}

.health-med-detail__section--usage h4 {
  color: #2f8f57;
}

.health-med-detail__section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: #191c1d;
}

.health-filter--search {
  flex: 1 1 auto;
  min-width: 200px;
}

.health-search-input {
  width: 100%;
  height: 44px;
  min-height: 44px;
  box-sizing: border-box;
  padding: 0 14px;
  border: 1px solid #c0c7cc;
  border-radius: 10px;
  font: inherit;
  font-size: 14px;
  color: #191c1d;
  background: #fff;
}

.health-search-input:focus {
  outline: 2px solid #2f94c3;
  outline-offset: 1px;
  border-color: #2f94c3;
}


.health-medicine-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.health-medicine-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.health-medicine-badge--form {
  background: #eef4ff;
  color: #3b5ccc;
}

.health-medicine-badge--route {
  background: #fff4e8;
  color: #b86a1f;
}

.health-medicine-badge--cold {
  background: #e8f6fc;
  color: #1f7aa8;
}

.health-medicine-badge--rx {
  background: #fde8e7;
  color: #b33a35;
}

.health-medicine-badge--freq {
  background: #f0f1f3;
  color: #41484c;
}

.health-catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid #e0e4e8;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}

.health-catalog-card {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border-bottom: 1px solid #f0f1f3;
  border-right: 1px solid #f0f1f3;
}

.health-catalog-card__icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: #f0f4f8;
}

.health-catalog-card__icon img {
  width: 20px;
  height: 20px;
  opacity: 0.75;
}

.health-catalog-card__body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: #191c1d;
}

.health-catalog-card__code {
  display: inline-block;
  margin-bottom: 8px;
  font-size: 12px;
  color: #6f7885;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.health-catalog-card__body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #41484c;
}

.health-catalog-card__muted {
  color: #9aa0a6 !important;
  font-style: italic;
}

.health-table--plans .health-plan-medicine-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6f7885;
}

.health-plan-student-meta {
  margin-top: 4px;
  font-size: 12px;
  color: #6f7885;
}

.health-table--plans thead .health-plans-th-actions {
  width: 52px;
  padding: 10px 8px 10px 12px !important;
  text-align: center;
  vertical-align: middle;
}

.health-table--plans thead .health-plans-th-student {
  padding-left: 4px !important;
}

.health-plans-collapse-all {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #fff;
  color: #00658f;
  cursor: pointer;
  transition: background 150ms ease, border-color 150ms ease;
}

.health-plans-collapse-all[hidden] {
  display: none !important;
}

.health-plans-collapse-all:hover {
  background: #eef6fb;
  border-color: #2f94c3;
}

.health-plans-collapse-all svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.health-table--plans .health-table__col-expand {
  width: 44px;
  padding-left: 12px !important;
  padding-right: 6px !important;
}

.health-plan-row.has-detail {
  cursor: default;
}

.health-plan-row.is-expanded {
  background: #f8fbfd;
}

.health-plan-row.is-expanded + .health-plan-detail-row .health-plan-detail__inner {
  border-top-color: #d8ebde;
}

.health-plan-detail-row > td {
  padding: 0 !important;
  border-top: 0 !important;
  background: #f8faf9;
}

.health-plan-detail__panel {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.45s cubic-bezier(0.4, 0, 0.2, 1);
}

.health-plan-detail-row.is-collapsed .health-plan-detail__panel {
  grid-template-rows: 0fr;
}

.health-plan-detail__panel-inner {
  min-height: 0;
  overflow: hidden;
}

.health-plan-detail__inner {
  padding: 12px 18px 16px;
  border-top: 1px dashed #d8ebde;
}

.health-plan-detail__section + .health-plan-detail__section {
  margin-top: 12px;
}

.health-plan-detail__inner strong {
  display: block;
  margin-bottom: 4px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #2f8f57;
}

.health-plan-detail__inner p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
  color: #41484c;
}

.health-plan-row.is-expanded .health-plan-expand svg {
  transform: rotate(180deg);
}



@media (max-width: 720px) {
  .health-subtabs {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  .health-subtab {
    justify-content: center;
    height: auto;
    min-height: 40px;
    padding: 8px 10px;
    white-space: normal;
    text-align: center;
    line-height: 1.25;
    font-size: 12px;
  }

  .health-subtab img {
    width: 14px;
    height: 14px;
  }

  .health-med-chart-strip {
    padding: 14px 16px;
  }

  .health-med-chart-strip__content h3 {
    font-size: 14px;
  }

  .health-med-chart-legend__item {
    font-size: 12px;
    padding: 5px 10px;
  }

  #medicines-form-chart {
    width: 160px;
    height: 160px;
  }

  .health-med-chart-strip__chart {
    flex-basis: 160px;
  }

  .health-filters--medicines {
    margin-bottom: 8px;
    gap: 12px;
  }

  .health-filters--medicines .health-filter {
    width: 100%;
    flex: 0 0 auto;
  }

  .health-filters--medicines .health-filter--search {
    flex: 0 0 auto;
    min-width: 0;
    margin-bottom: 0;
  }

  .health-filters--medicines .custom-select {
    width: 100%;
  }

  .health-table-card--medicines {
    margin-top: 0;
  }

  .health-table--medicines,
  .health-table--plans {
    display: block;
    min-width: 0 !important;
    width: 100%;
    height: auto;
    table-layout: auto;
  }

  .health-table-wrap--medicines,
  .health-table-card--medicines .health-table-wrap {
    overflow-x: visible;
    min-height: 0;
    height: auto;
  }

  .health-table--medicines thead {
    display: none !important;
    height: 0;
    max-height: 0;
    overflow: hidden;
    visibility: collapse;
    border: 0;
    margin: 0;
    padding: 0;
  }

  .health-table--plans thead {
    display: block !important;
    height: auto;
    max-height: none;
    overflow: visible;
    visibility: visible;
  }

  .health-table--plans thead th {
    display: none;
  }

  .health-table--plans thead tr {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: #edeeef;
    border-bottom: 1px solid #c0c7cc;
  }

  .health-table--plans thead th.health-plans-th-actions,
  .health-table--plans thead th.health-plans-th-student {
    display: block !important;
    width: auto;
    height: auto;
    padding: 0 !important;
    margin: 0;
    border: 0;
    background: transparent;
    line-height: 20px;
    font-size: 13px;
  }

  .health-table--plans thead th.health-plans-th-actions {
    flex: 0 0 32px;
  }

  .health-table--plans thead th.health-plans-th-student {
    flex: 1;
    min-width: 0;
  }

  .health-table--medicines thead tr,
  .health-table--medicines thead th {
    display: none !important;
    height: 0;
    padding: 0;
    margin: 0;
    border: 0;
    line-height: 0;
    font-size: 0;
  }

  .health-catalog-grid {
    grid-template-columns: 1fr;
  }

  .health-catalog-card {
    border-right: 0;
  }

  .health-table--medicines tbody,
  .health-table--plans tbody {
    display: block;
    margin: 0;
    padding: 0;
  }

  .health-table--medicines tbody tr,
  .health-table--plans tbody tr {
    display: block;
    margin: 0;
  }

  .health-table--medicines .health-med-row > td,
  .health-table--plans .health-plan-row > td {
    border-bottom: 0;
  }

  .health-table--medicines .health-med-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 0 8px;
    padding: 12px 14px 14px;
    border-bottom: 1px solid #e0e4e8;
    background: #fff;
  }

  .health-table--plans .health-plan-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 32px;
    gap: 0 8px;
    padding: 12px 14px 14px;
    border-bottom: 1px solid #e0e4e8;
    background: #fff;
  }

  .health-table--plans .health-plan-row__expand {
    grid-column: 2;
    grid-row: 1;
    position: static;
    width: 32px;
    padding: 0 !important;
    margin: 0 0 8px !important;
    align-self: start;
    justify-self: end;
  }

  .health-table--plans .health-plan-row__title {
    grid-column: 1;
    grid-row: 1;
  }

  .health-table--plans .health-plan-row > td:not(.health-plan-row__title):not(.health-plan-row__expand) {
    grid-column: 1 / -1;
  }

  .health-table--medicines .health-med-row.is-expanded {
    background: #f8fbfd;
    border-bottom-color: transparent;
  }

  .health-table--medicines .health-med-row__title {
    grid-column: 1;
    grid-row: 1;
    display: block;
    padding: 0 0 10px !important;
    margin: 0 0 8px !important;
    border-bottom: 1px solid #eef1f4;
    font-size: 15px;
    line-height: 1.35;
  }

  .health-table--medicines .health-med-row__expand {
    grid-column: 2;
    grid-row: 1;
    position: static;
    top: auto;
    right: auto;
    left: auto;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    width: 32px;
    height: auto;
    padding: 0 !important;
    margin: 0 0 8px !important;
    border: 0;
    align-self: start;
    justify-self: end;
  }

  .health-table--medicines .health-med-row__expand::before,
  .health-table--medicines .health-med-row__title::before,
  .health-table--plans .health-plan-row__title::before {
    display: none;
  }

  .health-table--medicines .health-med-row__title strong,
  .health-table--plans .health-plan-row__title strong {
    font-size: 15px;
    line-height: 1.35;
  }

  .health-table--medicines .health-med-expand {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
  }

  .health-table--medicines .health-med-row td:not(.health-med-row__title):not(.health-med-row__expand) {
    grid-column: 1 / -1;
  }

  .health-table--medicines .health-med-row td:not(.health-med-row__title):not(.health-med-row__expand),
  .health-table--plans .health-plan-row td:not(.health-plan-row__title):not(.health-plan-row__expand) {
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    align-items: start;
    gap: 8px 10px;
    width: 100%;
    padding: 4px 0 !important;
    border: none;
    text-align: left;
  }

  .health-table--plans .health-plan-row__title {
    display: block;
    padding: 0 0 10px !important;
    margin: 0 0 8px !important;
    border-bottom: 1px solid #eef1f4;
    font-size: 15px;
    line-height: 1.35;
    grid-column: 1;
    grid-row: 1;
  }

  .health-table--medicines .health-med-row td:not(.health-med-row__title):not(.health-med-row__expand)::before,
  .health-table--plans .health-plan-row td:not(.health-plan-row__title):not(.health-plan-row__expand)::before {
    content: attr(data-label);
    display: block;
    padding-top: 2px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #6f7885;
  }

  .health-table--medicines .health-med-table-form-route {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
  }

  .health-table--medicines .health-med-table-pill {
    font-size: 11px;
    padding: 3px 8px;
  }

  .health-table--medicines .health-med-table-flags {
    gap: 4px;
  }

  .health-table--medicines .health-med-detail {
    display: block;
    border-bottom: 1px solid #e0e4e8;
    background: #f4f9fc;
  }

  .health-table--medicines .health-med-detail[hidden] {
    display: none !important;
  }

  .health-table--medicines .health-med-detail td {
    display: block;
    padding: 0 14px 14px !important;
  }

  .health-table--medicines .health-med-detail td::before {
    display: none;
  }

  .health-table--medicines .health-med-detail__panel {
    padding-left: 0;
  }

  .health-table--medicines .health-table__empty,
  .health-table--plans .health-table__empty {
    display: block;
  }

  .health-table--medicines .health-table__empty td,
  .health-table--plans .health-table__empty td {
    display: block;
    padding: 24px 16px !important;
    text-align: center;
  }

  .health-table--medicines .health-table__empty td::before,
  .health-table--plans .health-table__empty td::before {
    display: none;
  }

  .health-table--plans .health-plan-detail-row > td {
    display: block;
    padding: 0 !important;
  }

  .health-table--plans .health-plan-detail-row > td::before {
    display: none;
  }

  .health-table-card--medicines .health-pagination,
  .health-table-card .health-pagination {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px 24px;
  }

  .health-table-card--medicines .table-pagination-footer__controls,
  .health-table-card .table-pagination-footer__controls {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
  }

  .health-table-card--medicines .table-pagination-footer__page,
  .health-table-card .table-pagination-footer__page {
    text-align: left;
  }
}



@media (max-width: 1100px) {
  .health-main {
    padding: 24px 20px;
  }

  .health-page-head {
    flex-direction: column;
    align-items: stretch;
  }

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

  .health-tabs {
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  .health-filters {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
  }

  .health-filter--search {
    flex: 0 0 auto;
    min-width: 0;
    width: 100%;
  }

  .health-filter .custom-select,
  .health-type-filter {
    width: 100%;
    max-width: 100%;
  }

  .health-type-filter div {
    width: 100%;
    max-width: 100%;
  }

  .health-filters--account-allergies {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .health-filters--account-allergies .health-filter,
  .health-filters--account-allergies .health-filter--search {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .health-filters--account-allergies .health-filter .custom-select {
    width: 100%;
  }

  .health-account-allergies-actions {
    margin-left: 0;
    width: 100%;
  }

  .health-account-allergies-actions .add-btn {
    width: 100%;
    justify-content: center;
  }

  .health-reactions-layout,
  .health-severities-layout {
    grid-template-columns: 1fr;
  }

  .health-med-chart-strip {
    flex-direction: column;
    align-items: stretch;
  }

  .health-med-chart-strip__chart {
    display: flex;
    justify-content: center;
  }

  .health-med-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .health-med-detail__card {
    grid-template-columns: 1fr;
  }

  .health-med-detail__panel {
    padding-left: 20px;
  }

  .health-groups-list {
    gap: 0;
  }
}

@media (max-width: 768px) {
  .health-insights {
    grid-template-columns: 1fr 1fr;
  }

  .health-tab {
    font-size: 13px;
    padding: 0 12px;
  }
}

@media (max-width: 560px) {
  .health-insights,
  .health-med-summary {
    grid-template-columns: 1fr;
  }
}

.health-account-allergies-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.health-filters--account-allergies {
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 16px;
}

.health-filters--account-allergies .health-filter {
  flex: 0 0 auto;
}

.health-filters--account-allergies .health-filter--search {
  flex: 1 1 220px;
  max-width: 420px;
}

.health-account-allergies-actions {
  margin-left: auto;
  flex: 0 0 auto;
}

.health-account-allergies-panel .health-table {
  min-width: 980px;
  border-collapse: collapse;
  border-spacing: 0;
}

.health-account-allergies-panel .health-table th,
.health-account-allergies-panel .health-table td {
  border-bottom: none !important;
  box-shadow: none !important;
  background-color: #ffffff;
}

.health-account-allergies-panel .health-table thead th {
  background-color: #edeeef;
  border-bottom: 1px solid #c0c7cc !important;
}

.health-account-allergies-panel .health-table tbody tr {
  border-bottom: 1px solid #c0c7cc;
}

.health-account-allergies-panel .health-table tbody tr:last-child {
  border-bottom: none;
}

.health-account-allergies-panel .health-table td.health-table__actions {
  display: table-cell;
  vertical-align: middle;
}

.health-account-allergies-panel .health-table td.health-table__actions .edit-btn {
  box-shadow: none;
}

.health-account-allergy-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid #c0c7cc;
  border-radius: 10px;
  background: #ffffff;
  color: #00658f;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  cursor: pointer;
}

.health-account-allergy-btn svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

.health-account-allergy-btn:hover:not(:disabled) {
  background: rgba(0, 101, 143, 0.06);
  border-color: #00658f;
}

.health-account-allergy-btn--primary {
  border-color: #00658f;
  background: #00658f;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
  color: #ffffff;
}

.health-account-allergy-btn--primary:hover:not(:disabled) {
  background: #005577;
}

.health-account-allergy-btn--ghost {
  border-color: #c0c7cc;
  background: #f3f4f6;
  color: #41484c;
}

.health-account-allergy-btn--ghost:hover:not(:disabled) {
  background: #e8edf1;
  border-color: #aeb4ba;
}

.health-account-allergy-btn--danger {
  min-width: 120px;
  border-color: #ba1a1a;
  background: #ffffff;
  color: #ba1a1a;
  box-shadow: none;
}

.health-account-allergy-btn--danger:hover:not(:disabled) {
  background: rgba(186, 26, 26, 0.06);
  border-color: #93000a;
  color: #93000a;
}

.health-account-allergy-btn--danger-solid {
  min-width: 120px;
  border-color: #ba1a1a;
  background: #ba1a1a;
  color: #ffffff;
}

.health-account-allergy-btn--danger-solid:hover:not(:disabled) {
  border-color: #93000a;
  background: #93000a;
  color: #ffffff;
}

.health-account-allergy-btn--danger:disabled,
.health-account-allergy-btn--danger-solid:disabled {
  opacity: 0.55;
  cursor: wait;
}

.health-table__actions {
  white-space: nowrap;
}

.health-table__actions .edit-btn + .edit-btn,
.health-table__actions .add-btn + .edit-btn,
.health-table__actions .edit-btn + .add-btn {
  margin-left: 8px;
}

.health-medicine-badge--active {
  background: #e8f8ef;
  color: #2f7a4f;
}

.health-medicine-badge--muted {
  background: #f1f3f5;
  color: #6f7885;
}

.health-account-allergy-modal[hidden] {
  display: none !important;
}

.health-account-allergy-modal {
  position: fixed;
  inset: 0;
  z-index: 1200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.health-account-allergy-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(25, 28, 29, 0.45);
}

.health-account-allergy-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(900px, 100%);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  margin: 0;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 24px 48px rgba(25, 28, 29, 0.18);
  overflow: hidden;
}

.health-account-allergy-modal__panel--confirm {
  width: min(420px, 100%);
  max-height: none;
  overflow: visible;
}

.health-account-allergy-confirm-dialog {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 28px 24px 24px;
  text-align: center;
}

.health-account-allergy-confirm-dialog__icon svg {
  width: 48px;
  height: 48px;
}

.health-account-allergy-confirm-dialog__title {
  margin: 0;
  color: #191c1d;
  font-size: 20px;
  font-weight: 700;
  line-height: 28px;
}

.health-account-allergy-confirm-dialog__message {
  margin: 0;
  color: #41484c;
  font-size: 14px;
  line-height: 20px;
}

.health-account-allergy-confirm-dialog__actions {
  display: flex;
  width: 100%;
  justify-content: center;
  gap: 10px;
}

.health-account-allergy-modal__header,
.health-account-allergy-modal__body,
.health-account-allergy-modal__footer {
  padding: 20px 24px;
}

.health-account-allergy-modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e8edf1;
  flex-shrink: 0;
}

.health-account-allergy-modal__header h2 {
  margin: 0;
  font-size: 20px;
  color: #191c1d;
}

.health-account-allergy-modal__subtitle {
  margin: 4px 0 0;
  color: #71787d;
  font-size: 13px;
}

.health-account-allergy-modal__close {
  border: 0;
  background: transparent;
  color: #71787d;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.health-account-allergy-modal__body {
  flex: 1;
  min-height: 0;
  overflow: visible;
  overflow-anchor: none;
  -webkit-overflow-scrolling: touch;
}

.health-account-allergy-modal__fields {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.health-account-allergy-modal__row {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  overflow: visible;
}

.health-account-allergy-modal__row--compact {
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  align-items: end;
}

.health-account-allergy-modal__row label,
.health-account-allergy-modal__fields > .health-account-allergy-checkbox {
  min-width: 0;
}

.health-account-allergy-modal__row .health-filter .custom-select {
  width: 100%;
}

.custom-select--menu-5 .custom-select__menu,
.custom-select__menu.is-floating.custom-select__menu--max-5 {
  z-index: 99999;
  max-height: calc(5 * 40px + 8px);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.health-account-allergy-modal__body .health-filter span {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.health-account-allergy-modal__body .custom-select.is-open {
  z-index: 5;
}

.health-account-allergy-modal__body .custom-select__menu {
  z-index: 50;
}

.health-account-allergy-modal .health-account-allergy-date {
  position: relative;
  min-width: 220px;
  width: 220px;
  z-index: 10;
}

.health-account-allergy-modal .health-account-allergy-date:has(.beugem-date-picker.is-open),
.health-account-allergy-modal .health-account-allergy-date:focus-within {
  z-index: 999999;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-date-picker {
  display: block;
  width: 100%;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-date-picker.is-open {
  z-index: 999999;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-date-picker__trigger {
  width: 100%;
  min-width: 0;
  min-height: 42px;
  height: 42px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #f3f3f5;
  box-shadow: none;
  color: #71787d;
  font-size: 15px;
  font-weight: 500;
  padding: 8px 12px 8px 16px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-date-picker.has-value .beugem-date-picker__trigger {
  color: #191c1d;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-date-picker.is-open .beugem-date-picker__trigger {
  border-color: #00658f;
  box-shadow: 0 0 0 2px rgba(0, 101, 143, 0.12);
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar,
.health-account-allergy-modal .health-account-allergy-date .beugem-calendar.is-floating {
  z-index: 999999 !important;
  width: min(300px, calc(100vw - 32px));
  padding: 10px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__header {
  grid-template-columns: 28px 1fr 28px;
  gap: 2px;
  margin-bottom: 8px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__title {
  font-size: 13px;
  line-height: 18px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__nav {
  width: 28px;
  height: 28px;
  border-radius: 8px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__nav svg {
  width: 16px;
  height: 16px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__weekdays {
  gap: 1px;
  margin-bottom: 4px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__weekdays span {
  font-size: 10px;
  line-height: 14px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__days {
  gap: 2px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__day {
  height: 32px;
  aspect-ratio: auto;
  font-size: 12px;
  border-radius: 7px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__footer {
  margin-top: 8px;
  padding-top: 8px;
}

.health-account-allergy-modal .health-account-allergy-date .beugem-calendar__action {
  font-size: 12px;
  line-height: 18px;
  padding: 6px 10px;
}

.health-account-allergy-modal__body .health-filter--note .health-search-input {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px 8px 16px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #f3f3f5;
  color: #191c1d;
  font-size: 15px;
  font-weight: 500;
  line-height: 24px;
}

.health-account-allergy-modal__body .health-filter--note .health-search-input:focus {
  outline: none;
  border-color: #00658f;
  box-shadow: 0 0 0 2px rgba(0, 101, 143, 0.12);
}

.health-account-allergy-modal__error {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdeeee;
  color: #b42318;
  font-size: 13px;
}

.health-account-allergy-modal__footer {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
  border-top: 1px solid #e8edf1;
  flex-shrink: 0;
  background: #ffffff;
}

.health-account-allergy-modal__footer--edit {
  justify-content: space-between;
}

.health-account-allergy-modal__footer-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.health-account-allergy-modal__footer .delete-btn[hidden] {
  display: none !important;
}

.health-account-allergy-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: #41484c;
}

body.health-modal-open {
  overflow: hidden;
}

@media (max-width: 768px) {
  .health-account-allergy-modal__row,
  .health-account-allergy-modal__row--compact {
    grid-template-columns: 1fr;
  }

  .health-account-allergy-modal .health-account-allergy-date {
    width: 100%;
    min-width: 0;
  }

  .health-account-allergy-modal {
    align-items: center;
    justify-content: center;
    padding: max(16px, env(safe-area-inset-top, 0px)) 12px max(16px, env(safe-area-inset-bottom, 0px));
  }

  .health-account-allergy-modal__panel {
    width: 100%;
    max-height: min(82dvh, calc(100dvh - 32px));
  }

  .health-account-allergy-modal__header,
  .health-account-allergy-modal__body,
  .health-account-allergy-modal__footer {
    padding: 16px;
  }

  .health-filters--account-allergies {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
  }

  .health-filters--account-allergies .health-filter,
  .health-filters--account-allergies .health-filter--search {
    width: 100%;
    max-width: none;
    flex: 0 0 auto;
  }

  .health-filters--account-allergies .health-filter .custom-select {
    width: 100%;
  }

  .health-account-allergies-actions {
    margin-left: 0;
    width: 100%;
  }

  .health-account-allergies-actions .add-btn {
    width: 100%;
    justify-content: center;
  }

  .health-account-allergies-panel {
    gap: 12px;
  }

  .health-account-allergies-panel .health-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .health-account-allergies-panel .health-table {
    min-width: 980px;
  }
}
