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

.food-page {
  flex: 1;
  min-height: 0;
}

.food-main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 32px;
}

.food-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.food-title p {
  margin: 4px 0 0;
  max-width: 560px;
  color: #41484c;
  font-size: 16px;
  line-height: 24px;
}

.food-hub-description {
  margin: 8px 0 0;
  max-width: 560px;
  color: #49606d;
  font-size: 15px;
  line-height: 22px;
}

.food-hub-description a {
  color: #00658f;
  font-weight: 600;
  text-decoration: none;
}

.food-hub-description a:hover {
  text-decoration: underline;
}

.food-hub-workspace__search[hidden],
.food-hub-section-banner[hidden] {
  display: none !important;
}

.food-toolbar__actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.food-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 16px;
}

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

.food-btn--primary {
  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;
}

.food-btn--primary:hover {
  background: #005577;
}

.food-notice {
  margin: 0;
  padding: 12px 16px;
  border-radius: 12px;
  background: #e8f5e9;
  color: #1b5e20;
  font-size: 14px;
  font-weight: 600;
}

.food-notice.is-error {
  background: #fef2f2;
  color: #b91c1c;
}

.food-notice.is-info {
  background: #eff6ff;
  color: #1d4ed8;
}

.food-notice[hidden] {
  display: none !important;
}

.food-stats {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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

.food-stat-card__title {
  color: #41484c;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.7px;
  line-height: 20px;
}

.food-stat-card strong {
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
}

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

.food-table-card.food-hub-workspace {
  overflow: visible;
}


.food-table-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  border-bottom: 1px solid #c0c7cc;
}

.food-table-card__title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.food-table-card__head h2 {
  margin: 0;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 28px;
}

.food-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 40px;
  padding: 8px 16px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #00658f;
  font-size: 16px;
  font-weight: 600;
  line-height: 24px;
  cursor: pointer;
  white-space: nowrap;
  box-sizing: border-box;
}

.food-refresh img,
.food-refresh svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.food-refresh:hover:not(:disabled) {
  border-color: #00658f;
  background: #f5fbff;
}

.food-refresh:disabled {
  opacity: 0.6;
  cursor: wait;
}

.food-hub-collapse-groups {
  padding: 6px 8px;
}

.food-hub-collapse-groups svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.food-table-wrap {
  overflow-x: auto;
}

.food-table-wrap.is-refreshing {
  opacity: 0.55;
  pointer-events: none;
}

.food-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  table-layout: auto;
}

.food-table th,
.food-table td {
  padding: 14px 16px;
  text-align: left;
  font-size: 14px;
  line-height: 20px;
  border-bottom: 1px solid #eceef1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.food-table th.is-wrap,
.food-table td.is-wrap {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  min-width: 140px;
}

.food-table th {
  color: #41484c;
  font-weight: 600;
  background: #fafbfc;
}

.food-table td {
  color: #191c1d;
}

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

.food-table__empty td {
  padding: 32px 20px;
  color: #71787d;
  text-align: center;
  white-space: normal;
}

.food-table th.is-actions,
.food-table td.is-actions {
  width: 132px;
  min-width: 132px;
  text-align: center;
  vertical-align: top;
}

.food-table td.is-actions {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.food-table__actions-stack {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
}

.food-table__actions-stack .food-btn,
.food-table__actions-stack .edit-btn,
.food-table__actions-stack .add-btn,
.food-table__actions-stack .save-btn {
  width: 100%;
  justify-content: center;
}

.food-table__meal-row .is-actions,
.food-table__meal-group .is-actions {
  vertical-align: middle;
}

.food-badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  line-height: 16px;
  white-space: nowrap;
}

.food-badge.is-yes {
  background: #e8f5e9;
  color: #2e7d32;
}

.food-badge.is-no {
  background: #f1f5f9;
  color: #64748b;
}

.food-hub-section+.food-hub-section {
  margin-top: 0;
}

.food-hub-section .food-table-card__head {
  flex-wrap: wrap;
}

.food-hub-section__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-table tbody tr.is-selected {
  background: #e8f4fc;
  box-shadow: inset 3px 0 0 #00658f;
}

.food-table tbody tr.is-selected td {
  border-bottom-color: #c5e4f3;
}

.food-table tbody tr[data-food-hub-row] {
  cursor: pointer;
}

.food-table tbody tr[data-food-hub-row]:hover {
  background: #f3f9fc;
}

.food-table tbody tr[data-food-hub-row].is-selected:hover {
  background: #e8f4fc;
}

.food-hub-page .food-main {
  gap: 24px;
}

.food-table-footer {
  display: flex;
  min-height: 65px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 16px 24px;
  border-top: 1px solid #c0c7cc;
  background: #f3f3f5;
}

.food-table-footer p {
  margin: 0;
  color: #41484c;
  font-size: 12px;
  font-weight: 500;
  line-height: 16px;
}

.food-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.food-modal[hidden] {
  display: none !important;
}

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

.food-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(680px, 100%);
  max-height: calc(100vh - 48px);
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #ffffff;
  box-shadow: 0 24px 48px rgba(25, 28, 29, 0.18);
}

.food-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 24px 0;
  flex-shrink: 0;
}

.food-modal__header h2 {
  margin: 0;
  color: #191c1d;
  font-size: 20px;
  font-weight: 700;
}

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

.food-modal__form {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  overflow: hidden;
}

.food-modal__body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow-y: auto !important;
  flex-direction: column;
  gap: 10px;
  padding: 16px 24px 16px;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.food-modal__body::-webkit-scrollbar {
  display: block;
  width: 6px;
}

.food-modal__body::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 3px;
}

.food-modal__fields {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-modal__body label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: visible;
}

.food-modal__fields .beugem-date-picker {
  width: 100%;
}

.food-modal__fields .beugem-date-picker__trigger {
  min-height: 40px;
  border-color: #c0c7cc;
  border-radius: 8px;
  color: #71787d;
  font-size: 14px;
  font-weight: 500;
}

.food-modal__fields .beugem-date-picker.has-value .beugem-date-picker__trigger {
  color: #191c1d;
  font-weight: 600;
}

.food-modal__fields .beugem-date-picker__trigger:hover,
.food-modal__fields .beugem-date-picker__trigger:focus-visible,
.food-modal__fields .beugem-date-picker.is-open .beugem-date-picker__trigger {
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.12);
}

.food-modal__body label span {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.food-modal__field--select,
.food-modal__field--date {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.food-modal__field--select .food-modal__field-label,
.food-modal__field--date .food-modal__field-label {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.food-modal__fields .custom-select,
.food-modal__fields .security-date-picker {
  width: 100%;
}

.food-modal__fields .security-date-picker__trigger {
  width: 100%;
  box-sizing: border-box;
}

.food-modal__fields .custom-select .custom-select__button {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid #c0c7cc;
  font-size: 14px;
  box-sizing: border-box;
  width: 100%;
}

.food-modal__fields .custom-select .custom-select__button [data-custom-select-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select.custom-select--food-modal-program .custom-select__button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.food-modal__fields .food-multi-select {
  z-index: 1;
}

.food-modal__fields .food-multi-select.is-open {
  z-index: 40;
}

.food-modal__fields .food-multi-select__menu {
  max-height: 420px;
  padding: 4px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(25, 28, 29, 0.12);
  overflow-y: auto;
}

.food-modal__fields .food-multi-select.is-open-up .food-multi-select__menu {
  top: auto;
  bottom: calc(100% + 4px);
}

.food-modal__fields .food-multi-select__menu .food-allergen-checklist__item {
  min-height: 40px;
  margin: 0;
  padding: 8px 10px;
  border-radius: 6px;
}

.food-modal__fields .food-multi-select__menu .food-allergen-checklist__item input {
  margin-top: 0;
}

.food-modal__fields .food-multi-select__menu .food-allergen-checklist__item:hover {
  background: rgba(0, 101, 143, 0.08);
}

.food-modal__fields .food-multi-select__menu .food-allergen-checklist__item.is-pending {
  opacity: 0.9;
}

.food-modal__fields .food-multi-select__menu .food-allergen-checklist__item.is-pending .food-modal__hint {
  margin-left: auto;
  color: #667085;
  font-size: 11px;
}

.food-modal__field--ingredient-table {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.food-modal__field-label {
  font-size: 14px;
  font-weight: 600;
  color: #191c1d;
}

.food-ingredient-picker {
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  overflow: hidden;
}

.food-ingredient-picker__toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid #e4e7ec;
  background: #f8fafc;
}

.food-ingredient-picker__search {
  flex: 1 1 auto;
  min-width: 0;
  min-height: 36px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  padding: 6px 10px;
  font: inherit;
}

.food-ingredient-picker__count {
  flex: 0 0 auto;
  color: #667085;
  font-size: 12px;
  white-space: nowrap;
}

.food-ingredient-picker__table-wrap {
  max-height: 280px;
  overflow: auto;
}

.food-ingredient-picker__table {
  width: 100%;
  border-collapse: collapse;
}

.food-ingredient-picker__table th,
.food-ingredient-picker__table td {
  padding: 8px 12px;
  border-bottom: 1px solid #eef2f6;
  text-align: left;
  vertical-align: middle;
  font-size: 14px;
}

.food-ingredient-picker__table th:first-child,
.food-ingredient-picker__table td:first-child {
  width: 44px;
  text-align: center;
}

.food-ingredient-picker__table tbody tr:hover {
  background: rgba(0, 101, 143, 0.06);
}

.food-ingredient-picker__table tbody tr.is-pending {
  opacity: 0.92;
}

.food-ingredient-picker__label-cell {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.food-ingredient-picker__name {
  font-weight: 500;
}

.food-ingredient-picker__hint {
  margin: 0;
  white-space: nowrap;
}

.food-ingredient-picker__footer {
  padding: 8px 12px;
  border-top: 1px solid #e4e7ec;
  background: #f8fafc;
  color: #667085;
  font-size: 12px;
}

.food-item-name {
  display: inline;
}

.food-item-ingredients {
  display: inline;
  margin-left: 8px;
  color: #667085;
  font-size: 12px;
}

.food-item-ingredients::before {
  content: '· ';
}

.food-meal-detail__name .food-item-ingredients {
  display: block;
  margin-left: 0;
  margin-top: 2px;
}

.food-meal-detail__name .food-item-ingredients::before {
  content: 'Malzemeler: ';
  color: #98a2b3;
}

.food-modal__body input[type="text"],
.food-modal__body input[type="number"],
.food-modal__body input[type="date"],
.food-modal__body select,
.food-modal__body textarea {
  min-height: 40px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #191c1d;
  font-family: inherit;
  font-size: 14px;
  line-height: 20px;
  padding: 8px 12px;
}

.food-modal__body textarea {
  min-height: 72px;
  resize: vertical;
}

.food-modal__body input[type="checkbox"]:not(.toggle-switch__input) {
  width: 18px;
  height: 18px;
  margin-top: 4px;
}

.food-allergen-fields {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: 16px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
}

.food-allergen-fields legend { padding: 0 6px; font-weight: 600; }
.food-allergen-fields__help { margin: 8px 0; color: #64748b; font-size: 0.875em; }
.food-allergen-fields__list { max-height: 220px; overflow-y: auto; margin: 12px 0; }
.food-allergen-fields input[type="search"] {
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #fff;
  color: #191c1d;
  font: inherit;
}
.food-modal__body .food-allergen-fields__option {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  padding: 6px 0;
  overflow-wrap: anywhere;
}
.food-modal__body .food-allergen-fields__option[hidden] { display: none; }
.food-modal__body .food-allergen-fields__option input[type="checkbox"] {
  flex: 0 0 18px;
  width: 18px;
  min-width: 18px;
  height: 18px;
  min-height: 18px;
  padding: 0;
  margin: 2px 0 0;
  accent-color: #00658f;
}
.food-allergen-fields__review { border-top: 1px solid #e2e8f0; }

.food-review-details {
  margin: 0 0 24px;
  padding: 12px 16px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  background: #fff;
}
.food-review-details[hidden] { display: none; }
.food-review-details summary { cursor: pointer; font-weight: 600; }
.food-review-details ul { margin: 12px 0 0; padding: 0; list-style: none; }
.food-review-details li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 10px 0; }
.food-review-details li + li { border-top: 1px solid #e2e8f0; }
.food-review-details li span { min-width: 0; overflow-wrap: anywhere; }
.food-review-details li button { flex-shrink: 0; }
@media (max-width: 600px) {
  .food-review-details li { align-items: flex-start; flex-direction: column; gap: 8px; }
}

.food-modal__field--checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 10px !important;
}

.food-modal__field--toggle {
  display: flex;
  align-items: center;
}

.food-modal__field--toggle .toggle-switch {
  padding: 2px 0;
  margin: 0;
}

.food-modal__hint {
  color: #667085;
  font-size: 12px;
  line-height: 1.4;
}

.food-modal__translations {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-modal__translations-title {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.food-modal__translation-row span {
  color: #41484c;
  font-size: 13px;
  font-weight: 500;
}

.food-modal__error {
  margin: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 600;
}

.food-modal__error[hidden] {
  display: none !important;
}

.food-modal__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 24px 24px;
  flex-shrink: 0;
}

.food-modal__footer-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.food-modal__btn {
  min-height: 40px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 16px;
}

.food-modal__btn--ghost {
  background: #f3f4f6;
  color: #41484c;
}

.food-modal__btn--primary {
  background: #00658f;
  color: #ffffff;
}

.food-modal__btn--danger {
  background: #fee2e2;
  color: #b91c1c;
}

.food-modal--confirm .food-modal__panel {
  width: min(480px, 100%);
}

.food-modal__confirm-body {
  padding: 12px 24px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-modal__confirm-text {
  margin: 0;
  color: #191c1d;
  font-size: 15px;
  line-height: 22px;
}

.food-modal__confirm-name {
  margin: 0;
  color: #00658f;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 26px;
  word-break: break-word;
}

.food-modal__confirm-hint {
  margin: 0;
  color: #71787d;
  font-size: 13px;
  line-height: 18px;
}

.food-modal__footer--confirm {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  padding: 16px 24px 24px;
}

.food-translate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  border: 1px solid #c0c7cc;
  background: #f8fafc;
  color: #00658f;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.food-translate-btn:hover {
  background: #f0f7fb;
  border-color: #00658f;
  color: #004d6d;
}

.food-translate-btn:active {
  transform: scale(0.95);
}

.food-translate-btn img,
.food-translate-btn svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.food-translate-btn.is-translating {
  opacity: 0.65;
  pointer-events: none;
}

.food-translate-btn.is-translating img,
.food-translate-btn.is-translating svg {
  animation: food-spin 0.8s linear infinite;
}

@keyframes food-spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 1100px) {
  .food-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .food-main {
    padding: 20px 16px;
  }

  .food-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .food-toolbar__actions {
    justify-content: flex-start;
  }

  .food-hub-page .food-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin-top: 12px;
  }

  .food-hub-page .food-stat-card {
    padding: 14px 12px;
    gap: 4px;
  }

  .food-hub-page .food-stat-card:nth-child(1) {
    background: #f8fafc;
  }

  .food-hub-page .food-stat-card:nth-child(2) {
    background: #ecfdf5;
    border-color: #bbf7d0;
  }

  .food-hub-page .food-stat-card:nth-child(3) {
    background: #fef2f2;
    border-color: #fecaca;
  }

  .food-hub-page .food-stat-card__title {
    font-size: 11px;
    letter-spacing: 0.02em;
    line-height: 14px;
  }

  .food-hub-page .food-stat-card strong {
    font-size: 20px;
    line-height: 26px;
  }

  .food-table-footer {
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px 28px;
  }

  .food-table-footer .table-pagination-footer__controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    margin-left: auto;
  }


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

  .food-modal .food-modal__panel {
    width: 100%;
    max-height: calc(100vh - 64px);
    max-height: min(82dvh, calc(100dvh - 64px));
    border-radius: 20px;
  }

  .food-modal .food-modal__header {
    padding: 16px 16px 0;
  }

  .food-modal .food-modal__body {
    padding: 16px;
  }

  .food-modal .food-modal__footer {
    padding: 12px 16px 16px;
  }
}



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

@media (max-width: 1024px) {

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

@media (max-width: 600px) {

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

.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", -apple-system, BlinkMacSystemFont, Arial, 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;
  flex-shrink: 0;
}

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

.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;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

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

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

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

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

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


.food-panel,
.health-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  animation: healthPanelIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

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

@keyframes healthPanelIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

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

.food-filter-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #ffffff;
  padding: 16px 20px;
  border: 1px solid #c0c7cc;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.food-stat-clickable {
  cursor: pointer;
}

.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;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.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.3px;
  line-height: 20px;
  padding: 6px 16px;
  white-space: nowrap;
  cursor: pointer;
  transition: background 150ms ease, color 150ms ease;
}

.health-type-filter button:hover {
  background: rgba(0, 101, 143, 0.08);
  color: #00658f;
}

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

.food-sub-header {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.food-sub-header .food-sub-nav {
  margin: 0;
}

.food-sub-header .food-hub-workspace__search {
  display: flex;
  width: 220px;
  max-width: 100%;
}

.food-sub-header .food-hub-workspace__search[hidden] {
  display: none !important;
}

.food-sub-header .food-hub-search__input {
  height: 42px;
  max-width: 100%;
}

.food-sub-header__filter-group {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.food-sub-header__filter-group[hidden] {
  display: none !important;
}

.food-sub-header .security-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
}

.food-sub-header .security-date-picker__trigger,
.food-sub-header .security-date-clear {
  height: 42px;
}

.food-subview {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: healthPanelIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.food-subview[hidden] {
  display: none !important;
}

.food-filters {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  background: #ffffff;
  padding: 14px 18px;
  border: 1px solid #e1e4e8;
  border-radius: 10px;
  flex-wrap: nowrap;
  overflow: visible;
}

.food-filter-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.food-hub-workspace__search {
  display: flex;
  width: 190px;
  flex-shrink: 0;
}

.food-filter-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  flex-shrink: 0;
}

.food-hub-search__input {
  width: 100%;
  max-width: 190px;
  height: 40px;
  padding: 0 12px 0 34px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2371787d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E") no-repeat left 10px center;
  font-size: 13px;
  color: #191c1d;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.food-hub-search__input:focus {
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.12);
}

.food-filters .custom-select.custom-select--food-plan,
.custom-select.custom-select--food-plan {
  width: 220px !important;
  max-width: 220px !important;
  flex: 0 0 220px !important;
}

.custom-select.custom-select--food-plan .custom-select__button {
  height: 40px;
  min-height: 40px;
  padding: 0 12px;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid #c0c7cc;
  font-size: 13px;
  font-weight: 600;
  box-sizing: border-box;
}

.custom-select.custom-select--food-plan .custom-select__button [data-custom-select-label] {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.custom-select.custom-select--food-plan .custom-select__button svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.custom-select.custom-select--food-plan .custom-select__menu {
  min-width: 220px;
  width: max-content;
}

.food-recipe-pill {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #e6f4fa;
  color: #1a6d8f;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
  margin: 2px;
}

.food-badge-cal {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #ffedd5;
  color: #c2410c;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}

.food-badge-meal {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 9999px;
  background: #e3f5eb;
  color: #2d7a52;
  font-size: 12px;
  font-weight: 600;
  line-height: 18px;
  white-space: nowrap;
}


.security-date-filter {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.security-date-clear {
  height: 40px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #41484c;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  font-size: 12px;
  font-weight: 600;
  line-height: 20px;
  padding: 0 10px;
  white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
  flex-shrink: 0;
}

.security-date-clear:hover:not(:disabled) {
  border-color: #00658f;
  background: #f5fbff;
  color: #00658f;
}

.security-date-clear:disabled {
  cursor: default;
  opacity: 0.45;
}

.security-date-picker {
  position: relative;
  display: inline-flex;
  flex-shrink: 0;
}

.security-date-picker.is-open {
  z-index: 1050;
}

.security-date-picker__trigger {
  display: inline-flex;
  min-width: 135px;
  height: 40px;
  align-items: center;
  gap: 8px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 4px 12px rgba(12, 174, 242, 0.05);
  color: #71787d;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 20px;
  padding: 0 10px;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.security-date-picker__trigger:hover,
.security-date-picker__trigger:focus-visible {
  border-color: #00658f;
  box-shadow: 0 0 0 2px rgba(0, 101, 143, 0.12);
  outline: none;
}

.security-date-picker.has-value .security-date-picker__trigger {
  color: #191c1d;
}

.security-date-picker__trigger img {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  pointer-events: none;
}

.security-date-picker__label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.security-calendar {
  position: absolute;
  top: calc(100% + 8px);
  bottom: auto;
  left: 0;
  right: auto;
  z-index: 99999 !important;
  width: min(320px, calc(100vw - 32px));
  padding: 16px;
  border: 1px solid #e2e8ec;
  border-radius: 14px;
  background: #ffffff;
  box-shadow:
    0 4px 6px rgba(25, 28, 29, 0.04),
    0 16px 40px rgba(25, 28, 29, 0.12);
}


[data-food-menu-item-modal] .food-modal__panel,
[data-food-menu-item-modal] .food-modal__form,
[data-food-menu-item-modal] .food-modal__body {
  overflow: visible !important;
}

[data-food-menu-item-modal] .security-calendar {
  top: calc(100% + 8px) !important;
  bottom: auto !important;
  z-index: 99999 !important;
}


[data-food-plan-modal] .security-calendar {
  top: auto !important;
  bottom: calc(100% + 8px) !important;
  z-index: 99999 !important;
}

[data-food-plan-modal] .security-date-picker[data-food-modal-date-picker="plan-end"] .security-calendar {
  left: auto !important;
  right: 0 !important;
}

.security-calendar[hidden] {
  display: none !important;
}

.security-calendar__header {
  display: grid;
  grid-template-columns: 36px 1fr 36px;
  align-items: center;
  gap: 4px;
  margin-bottom: 14px;
}

.security-calendar__title {
  margin: 0;
  color: #191c1d;
  font-family: "Plus Jakarta Sans", Arial, Helvetica, sans-serif;
  font-size: 15px;
  font-weight: 600;
  line-height: 22px;
  text-align: center;
}

.security-calendar__nav {
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: #f3f3f5;
  color: #41484c;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.security-calendar__nav:hover {
  background: #e8f4fa;
  color: #00658f;
}

.security-calendar__nav svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.security-calendar__weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 6px;
}

.security-calendar__weekdays span {
  color: #71787d;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 16px;
  text-align: center;
  text-transform: uppercase;
}

.security-calendar__days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
}

.security-calendar__day {
  display: inline-flex;
  width: 100%;
  aspect-ratio: 1;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #191c1d;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  padding: 0;
  transition: background 0.12s ease, color 0.12s ease;
}

.security-calendar__day:hover:not(:disabled) {
  background: #f0f8fc;
  color: #00658f;
}

.security-calendar__day.is-outside {
  color: #a8b0b6;
}

.security-calendar__day.is-today {
  box-shadow: inset 0 0 0 2px #85cfff;
  font-weight: 700;
}

.security-calendar__day.is-selected {
  background: #00658f;
  box-shadow: none;
  color: #ffffff;
  font-weight: 600;
}

.security-calendar__day.is-selected:hover {
  background: #004d6d;
  color: #ffffff;
}

.security-calendar__day:disabled {
  cursor: default;
  opacity: 0.35;
}

.security-calendar__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid #eef1f3;
}

.security-calendar__action {
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #00658f;
  cursor: pointer;
  font-family: "Be Vietnam Pro", Arial, Helvetica, sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 20px;
  padding: 8px 12px;
  transition: background 0.15s ease;
}

.security-calendar__action:hover {
  background: #f0f8fc;
}

.security-calendar__action--primary {
  background: #00658f;
  color: #ffffff;
}

.security-calendar__action--primary:hover {
  background: #004d6d;
}


.food-allergy-alert-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: #fff8f7;
  border: 1px solid #fecdd3;
  border-radius: 16px;
  padding: 16px 20px;
  box-shadow: 0 2px 10px rgba(186, 26, 26, 0.04);
  box-sizing: border-box;
  animation: healthPanelIn 200ms cubic-bezier(0.16, 1, 0.3, 1);
}

.food-allergy-alert-card[hidden] {
  display: none !important;
}

.food-allergy-alert-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(186, 26, 26, 0.16);
}

.food-allergy-alert-card__tag {
  display: block;
  color: #ba1a1a;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.8px;
  line-height: 1.3;
  text-transform: uppercase;
}

.food-allergy-alert-card__title {
  margin: 3px 0 0 0;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.35;
  color: #191c1d;
}

.food-allergy-alert-card__badge {
  flex-shrink: 0;
  padding: 5px 11px;
  border-radius: 999px;
  background: #fdeeee;
  color: #ba1a1a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
}

.food-allergy-alert-card__classes {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.food-allergy-class-card {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  background: #ffffff;
  border: 1px solid rgba(186, 26, 26, 0.15);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.food-allergy-class-card__title {
  font-size: 14px;
  font-weight: 700;
  color: #41484c;
  line-height: 1.3;
}

.food-allergy-risk-row {
  box-sizing: border-box;
  width: 100%;
  padding: 10px 12px;
  background: #fff3f1;
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  color: #41484c;
}

.food-allergy-risk-row strong {
  color: #191c1d;
  font-weight: 700;
}

.food-allergy-risk-row .food-allergy-dish {
  color: #ba1a1a;
  font-weight: 700;
}

.food-allergy-risk-row .food-allergy-reason {
  color: #ba1a1a;
  font-weight: 600;
}

.food-subtext {
  color: #64748b;
  font-size: 12px;
  font-weight: 400;
  margin-top: 2px;
}

.food-input-select {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border: 1px solid #c0c7cc;
  border-radius: 8px;
  background: #ffffff;
  color: #191c1d;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  box-sizing: border-box;
}

.food-input-select:focus {
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.12);
}

.food-action-btns {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.food-delete-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #fecdd3;
  background: #fff5f5;
  color: #ba1a1a;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.food-delete-btn svg,
.food-delete-btn img {
  width: 14px;
  height: 14px;
}

.food-delete-btn:hover {
  background: #fee2e2;
  border-color: #f87171;
  color: #991b1b;
}

.food-ingredients-checklist label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: #334155;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 6px;
  user-select: none;
  transition: background-color 0.15s ease;
}

.food-ingredients-checklist input[type="checkbox"] {
  accent-color: #00658f;
}

.food-ingredients-checklist label:hover {
  background: #f1f5f9;
}


.food-ing-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 12px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  transition: all 0.15s ease;
  grid-column: span 1;
}

.food-ing-row--selected {
  background: #f0f7ff;
  border-color: #00658f;
}

.food-ing-row:hover {
  border-color: #cbd5e1;
}

.food-ing-amount-input {
  width: 85px;
  padding: 5px 8px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  outline: none;
  transition: all 0.15s ease;
  -webkit-appearance: textfield;
  -moz-appearance: textfield;
  appearance: textfield;
  text-align: right;
}

.food-ing-amount-input::-webkit-outer-spin-button, .food-ing-amount-input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.food-ing-amount-input:focus {
  border-color: #00658f;
  box-shadow: 0 0 0 3px rgba(0, 101, 143, 0.15);
}

.food-ing-label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 500;
  color: #334155;
  cursor: pointer;
  flex: 1;
  margin: 0;
  user-select: none;
}

.food-ing-label input {
  accent-color: #00658f;
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.food-ing-empty {
  color: #64748b;
  font-size: 13px;
  grid-column: span 2;
  margin: 4px 0;
}

.food-ing-amount-wrap[hidden] {
  display: none;
}
