/* FuturIntrosWebApp/Front/MainPage/Modules/HealsAndFood/Food/Food.css */
.FoodContentArea {
    --food-accent: #38bdf8;
    --food-accent-strong: #0ea5e9;
    --food-accent-soft: rgba(56, 189, 248, 0.16);
    --food-card-bg: linear-gradient(160deg, rgba(15, 23, 42, 0.78), rgba(30, 41, 59, 0.6));
    --food-card-bg-soft: rgba(2, 6, 23, 0.42);
    --food-card-border: rgba(148, 163, 184, 0.2);
    --food-card-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    --food-field-bg: rgba(15, 23, 42, 0.68);
    --food-muted: rgba(226, 232, 240, 0.72);
    width: 100%;
    height: 100%;
    min-height: 0;
    display: flex;
    color: var(--text-color);
    background:
        radial-gradient(circle at top left, rgba(86, 166, 250, 0.08), transparent 55%), radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.08), transparent 45%), var(--mainPageContent-bg-color);
    overflow: hidden;
}

.FoodApp {
    flex: 1;
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 18px;
    padding: 22px;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
    overflow: hidden;
}

.FoodApp--collaboration {
    max-width: none;
    width: 100%;
    padding: 16px 22px 22px;
}

.FoodSidebar,
.FoodPanel,
.FoodWidget {
    border: 1px solid var(--food-card-border);
    border-radius: 18px;
    background: var(--food-card-bg);
    box-shadow: var(--food-card-shadow);
    backdrop-filter: blur(12px);
}

.FoodSidebar {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: fit-content;
    position: sticky;
    top: 14px;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.72), rgba(30, 41, 59, 0.84));
}

.FoodBrand {
    margin: 4px 4px 10px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(226, 232, 240, 0.7);
}

.FoodTabButton {
    border: 1px solid rgba(148, 163, 184, 0.46);
    background: rgba(15, 23, 42, 0.92);
    color: #e2e8f0;
    border-radius: 999px;
    padding: 11px 14px;
    text-align: left;
    font-weight: 600;
    cursor: pointer;
    transition:
        filter 0.16s ease,
        transform 0.16s ease,
        border-color 0.16s ease,
        box-shadow 0.16s ease;
    box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.35);
}

.FoodTabButton:hover {
    filter: none;
    border-color: rgba(56, 189, 248, 0.52);
    box-shadow:
        inset 0 0 0 1px rgba(2, 6, 23, 0.35),
        0 8px 18px rgba(14, 165, 233, 0.16);
}

.FoodTabButton.is-active {
    border-color: rgba(56, 189, 248, 0.8);
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.82), rgba(59, 130, 246, 0.82));
    color: #0f172a;
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.28);
}

.FoodMain {
    min-width: 0;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

.FoodPanel {
    padding: 20px;
    margin-bottom: 14px;
}

.FoodPanelTitle {
    margin: 0 0 8px;
    font-size: 26px;
    letter-spacing: 0.01em;
    color: #f8fafc;
}

.FoodPanelSubtitle {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--food-muted);
}

.FoodCollabHero {
    background: radial-gradient(circle at 10% 20%, rgba(56, 189, 248, 0.16), transparent 42%), radial-gradient(circle at 85% 15%, rgba(34, 197, 94, 0.14), transparent 45%), var(--bg-color);
}

.FoodToolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
    margin-top: 14px;
}

.FoodToolbar label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 8px 10px;
    background: rgba(2, 6, 23, 0.32);
}

.FoodToolbar input,
.FoodToolbar select,
.FoodToolbar button,
.FoodForm input,
.FoodForm select,
.FoodForm textarea,
.FoodButton {
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: var(--food-field-bg);
    color: inherit;
    padding: 9px 11px;
    box-sizing: border-box;
    box-shadow: inset 0 0 0 1px rgba(2, 6, 23, 0.12);
}

.FoodToolbar select,
.FoodForm select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    padding-right: 34px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-color) 50%), linear-gradient(135deg, var(--text-color) 50%, transparent 50%);
    background-position:
        calc(100% - 16px) calc(50% - 1px),
        calc(100% - 11px) calc(50% - 1px);
    background-size:
        6px 6px,
        6px 6px;
    background-repeat: no-repeat;
}

.FoodToolbar select option,
.FoodForm select option {
    background: var(--bg-color);
    color: var(--text-color);
}

.FoodToolbar select option:checked,
.FoodForm select option:checked {
    background: rgba(56, 189, 248, 0.22);
    color: var(--text-color);
}

.FoodButton,
.FoodToolbar button {
    background: rgba(148, 163, 184, 0.12);
    color: #e2e8f0;
    border-color: rgba(148, 163, 184, 0.26);
    font-weight: 600;
}

.FoodCustomSelect {
    position: relative;
}

.FoodCustomSelect input[type='hidden'] {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.FoodCustomSelectTrigger {
    width: 100%;
    border-radius: 10px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: var(--food-field-bg);
    color: inherit;
    padding: 9px 34px 9px 11px;
    text-align: left;
    cursor: pointer;
    box-sizing: border-box;
    position: relative;
}

.FoodCustomSelectTrigger::before,
.FoodCustomSelectTrigger::after {
    content: '';
    position: absolute;
    right: 12px;
    width: 6px;
    height: 6px;
    border-top: 1.5px solid var(--text-color);
    border-right: 1.5px solid var(--text-color);
    transform-origin: center;
    top: 50%;
    margin-top: -3px;
}

.FoodCustomSelectTrigger::before {
    transform: translateX(-2px) rotate(135deg);
}

.FoodCustomSelectTrigger::after {
    transform: translateX(2px) rotate(135deg);
}

.FoodCustomSelectMenu {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 4px);
    z-index: 28;
    display: grid;
    gap: 2px;
    max-height: 280px;
    overflow-y: auto;
    touch-action: pan-y;
    border-radius: 10px;
    border: 1px solid rgba(56, 189, 248, 0.38);
    background: #0b1324;
    box-shadow:
        0 16px 32px rgba(2, 6, 23, 0.82),
        0 0 0 1px rgba(56, 189, 248, 0.14);
    padding: 4px;
}

.FoodCustomSelectMenu[hidden] {
    display: none !important;
}

.FoodCustomSelectOption {
    width: 100%;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--text-color);
    padding: 7px 8px;
    text-align: left;
    cursor: pointer;
    font: inherit;
    line-height: 1.2;
}

.FoodCustomSelectOption:hover,
.FoodCustomSelectOption:focus-visible {
    outline: none;
    background: rgba(56, 189, 248, 0.22);
}

.FoodCustomSelectOption.is-active {
    background: rgba(56, 189, 248, 0.28);
}

html.dark-theme .FoodToolbar select,
html.dark-theme .FoodForm select {
    color-scheme: dark;
}

html.light-theme .FoodToolbar select,
html.light-theme .FoodForm select {
    color-scheme: light;
}

.FoodButton,
.FoodToolbar button {
    cursor: pointer;
    background: rgba(148, 163, 184, 0.12);
}

.FoodButton:hover,
.FoodToolbar button:hover {
    filter: none;
    border-color: rgba(56, 189, 248, 0.54);
    background: rgba(56, 189, 248, 0.16);
}

.FoodToolbar input::placeholder,
.FoodForm input::placeholder,
.FoodForm textarea::placeholder {
    color: var(--PlaceHolder-color);
}

.FoodForm label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.FoodForm label input,
.FoodForm label select,
.FoodForm label textarea {
    width: 100%;
}

.FoodForm label input[type='checkbox'],
.FoodForm label input[type='radio'] {
    width: auto;
}

.FoodWidgetsGrid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
}

.FoodCollabGrid {
    grid-template-columns: repeat(24, minmax(0, 1fr));
    gap: 16px;
}

.FoodWidget {
    padding: 16px;
    min-width: 0;
    grid-column: span 12;
}

.FoodCollabGrid .FoodWidget {
    grid-column: span 8;
}

.FoodCollabWorkspaceWidget {
    grid-column: 1 / -1 !important;
    min-height: 60vh;
    background: linear-gradient(160deg, color-mix(in srgb, var(--bg-color) 82%, rgba(56, 189, 248, 0.1)), color-mix(in srgb, var(--bg-color) 90%, rgba(15, 23, 42, 0.12)));
}

.FoodWidget h3 {
    margin: 0 0 10px;
    font-size: 16px;
    letter-spacing: 0.01em;
    color: #f8fafc;
}

.FoodWidgetConsumed {
    grid-column: span 12;
    resize: vertical;
    overflow: visible;
    min-height: 340px;
}

.FoodWidgetThird {
    grid-column: span 6;
}

.FoodForm {
    display: grid;
    gap: 10px;
}

.FoodFormGrid {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 8px;
}

.FoodAutocomplete {
    position: relative;
}

.FoodAutocomplete:focus-within {
    z-index: 48;
}

.FoodAutocompleteInput {
    width: 100%;
}

.FoodSuggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 20;
    max-height: 340px;
    overflow-y: auto;
    touch-action: pan-y;
    border: 1px solid rgba(56, 189, 248, 0.34);
    border-radius: 10px;
    background: #0b1324;
    box-shadow:
        0 12px 24px rgba(0, 0, 0, 0.22),
        0 0 0 1px rgba(56, 189, 248, 0.12);
}

.FoodSuggestions[hidden] {
    display: none !important;
    pointer-events: none !important;
}

.FoodSuggestionItem {
    width: 100%;
    display: block;
    text-align: left;
    border: 0;
    border-bottom: 1px solid var(--border-color);
    background: transparent;
    color: inherit;
    padding: 8px 10px;
    cursor: pointer;
}

.FoodSuggestionItem:last-child {
    border-bottom: 0;
}

.FoodSuggestionItem:hover,
.FoodSuggestionItem:focus,
.FoodSuggestionItem.is-active {
    background: rgba(56, 189, 248, 0.2);
    outline: none;
}

.FoodSuggestionItemRich {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.FoodSuggestionTitle {
    font-weight: 600;
}

.FoodSuggestionPreview {
    position: absolute;
    top: 0;
    left: calc(100% + 8px);
    width: 320px;
    max-width: min(320px, 72vw);
    z-index: 35;
}

.FoodSuggestionPreviewCard {
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(11, 19, 36, 0.98), rgba(15, 23, 42, 0.92));
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
    padding: 10px;
}

.FoodSuggestionPreviewTop {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 8px;
    align-items: start;
}

.FoodSuggestionPreviewImage {
    width: 70px;
    height: 70px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--border-color);
    background: var(--mainPageContent-bg-color);
}

.FoodSuggestionPreviewHeadings {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.FoodSuggestionPreviewMeta {
    display: grid;
    gap: 2px;
    margin-top: 6px;
}

.FoodSuggestionPreviewGrid {
    display: grid;
    gap: 4px;
    margin-top: 8px;
}

.FoodSuggestionPreviewRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 6px;
    background: var(--mainPageContent-bg-color);
}

#FoodAddConsumedForm .FoodFormGrid > * {
    position: relative;
    z-index: 4;
    pointer-events: auto;
}

#FoodAddConsumedForm .FoodAutocomplete {
    z-index: 24;
}

#FoodAddConsumedForm .FoodSuggestions {
    z-index: 52;
}

@media (max-width: 1100px) {
    .FoodSuggestionPreview {
        position: static;
        left: auto;
        top: auto;
        width: 100%;
        max-width: 100%;
        margin-top: 8px;
    }
}

.FoodCol4 {
    grid-column: span 4;
}

.FoodCol5 {
    grid-column: span 5;
}

.FoodCol3 {
    grid-column: span 3;
}

.FoodCol2 {
    grid-column: span 2;
}

.FoodCol6 {
    grid-column: span 6;
}

.FoodCol8 {
    grid-column: span 8;
}

.FoodCol12 {
    grid-column: span 12;
}

.FoodTableWrap {
    overflow: auto;
    max-height: clamp(280px, 48vh, 560px);
    touch-action: pan-x pan-y;
    -webkit-overflow-scrolling: touch;
    margin-top: 12px;
    border-radius: 12px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(2, 6, 23, 0.34);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.FoodTableWrap.FoodTableWrap--consumed {
    height: 100vh;
    max-height: 100vh;
}

.FoodTable {
    width: 100%;
    border-collapse: collapse;
    min-width: 900px;
}

.FoodTable th,
.FoodTable td {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 9px;
    text-align: left;
    vertical-align: top;
}

.FoodTable th {
    background: rgba(15, 23, 42, 0.82);
    background-clip: padding-box;
    box-shadow: inset 0 -1px 0 rgba(148, 163, 184, 0.2);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(226, 232, 240, 0.78);
    position: sticky;
    top: 0;
    z-index: 4;
}

.FoodTable--consumed thead th {
    position: sticky;
    top: 0;
    z-index: 14;
    background: rgba(11, 19, 36, 0.96);
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        0 6px 12px rgba(15, 23, 42, 0.12);
}

.FoodTableWrap--shared {
    position: relative;
    isolation: isolate;
}

.FoodTable--shared {
    border-collapse: separate;
    border-spacing: 0;
}

.FoodTable--shared thead th {
    position: sticky;
    top: 0;
    z-index: 12;
    background: rgba(11, 19, 36, 0.96);
    box-shadow:
        inset 0 -1px 0 var(--border-color),
        0 6px 12px rgba(15, 23, 42, 0.12);
}

.FoodTable--consumed .FoodConsumedRow--auto {
    --food-slot-accent: rgba(120, 133, 160, 0.68);
    --food-slot-fill: rgba(120, 133, 160, 0.14);
}

.FoodTable--consumed .FoodConsumedRow--auto td {
    background: color-mix(in srgb, var(--mainPageContent-bg-color) 82%, var(--food-slot-fill));
}

.FoodTable--consumed .FoodConsumedRow--auto td:first-child {
    box-shadow: inset 4px 0 0 var(--food-slot-accent);
}

.FoodTable--consumed .FoodConsumedRow--auto:hover td {
    background: color-mix(in srgb, var(--mainPageContent-bg-color) 72%, var(--food-slot-fill));
}

.FoodTable--consumed .FoodConsumedRow--slot-breakfast {
    --food-slot-accent: rgba(210, 106, 214, 0.88);
    --food-slot-fill: rgba(171, 106, 214, 0.14);
}

.FoodTable--consumed .FoodConsumedRow--slot-snack_morning {
    --food-slot-accent: rgba(6, 182, 212, 0.9);
    --food-slot-fill: rgba(6, 182, 212, 0.18);
}

.FoodTable--consumed .FoodConsumedRow--slot-lunch {
    --food-slot-accent: rgba(34, 197, 94, 0.9);
    --food-slot-fill: rgba(34, 197, 94, 0.17);
}

.FoodTable--consumed .FoodConsumedRow--slot-snack_afternoon {
    --food-slot-accent: rgba(249, 115, 22, 0.92);
    --food-slot-fill: rgba(249, 115, 22, 0.2);
}

.FoodTable--consumed .FoodConsumedRow--slot-dinner {
    --food-slot-accent: rgba(99, 102, 241, 0.92);
    --food-slot-fill: rgba(99, 102, 241, 0.2);
}

.FoodCustomRow {
    cursor: pointer;
}

.FoodCustomRow:hover td {
    background: color-mix(in srgb, var(--button-bg-color) 35%, transparent);
}

.FoodDayDividerRow td {
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.14), transparent);
    border-top: 2px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    padding: 10px 8px;
}

.FoodDayDividerLabel {
    display: inline-block;
    font-weight: 700;
    text-transform: capitalize;
}

.FoodTotalsRow td {
    background: color-mix(in srgb, var(--button-bg-color) 30%, transparent);
    border-top: 1px solid var(--border-color);
}

.FoodTotalsRow--day td {
    background: color-mix(in srgb, var(--button-bg-color) 22%, transparent);
}

.FoodTotalsRow--global td {
    background: color-mix(in srgb, var(--button-bg-color) 42%, transparent);
    border-top-width: 2px;
}

.FoodMuted {
    color: var(--food-muted);
}

.FoodTruncate {
    display: inline-block;
    max-width: 240px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

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

.FoodStatCard {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 12px;
    background: rgba(2, 6, 23, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}

.FoodCollabGlobalWidget {
    margin-bottom: 0;
    background: radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.14), transparent 38%), linear-gradient(145deg, rgba(15, 23, 42, 0.8), rgba(30, 41, 59, 0.62));
}

.FoodCollabGlobalGrid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.FoodCollabGlobalCard {
    background: linear-gradient(135deg, rgba(2, 132, 199, 0.12), rgba(15, 23, 42, 0.58));
}

.FoodSharedWorkspace {
    display: grid;
    gap: 14px;
    margin-top: 12px;
}

.FoodSharedRow {
    display: grid;
    gap: 14px;
}

.FoodSharedRowTop {
    grid-template-columns: minmax(320px, 1.2fr) minmax(260px, 0.8fr);
}

.FoodSharedRowMiddle {
    grid-template-columns: 1fr;
}

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

.FoodSharedPanel {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 14px;
    padding: 14px;
    background: rgba(2, 6, 23, 0.38);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
    min-width: 0;
}

.FoodSharedPanel h4 {
    margin: 0 0 10px;
    font-size: 15px;
    letter-spacing: 0.01em;
}

.FoodSharedPanelWide .FoodTableWrap {
    max-height: clamp(320px, 54vh, 760px);
}

.FoodStatCard.is-alert {
    border-color: rgba(220, 38, 38, 0.72);
    background: rgba(220, 38, 38, 0.12);
}

.FoodStatLabel {
    font-size: 12px;
    color: var(--food-muted);
    line-height: 1.35;
}

.FoodStatValue {
    margin-top: 6px;
    font-size: 18px;
    font-weight: 700;
}

.FoodList {
    display: grid;
    gap: 10px;
}

.FoodListItem {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    padding: 12px;
    background: rgba(15, 23, 42, 0.45);
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.FoodListItemHeader {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
}

.FoodListItem .FoodButton,
.FoodListItem button {
    position: relative;
    z-index: 3;
    pointer-events: auto !important;
}

.FoodModelSlotLine {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) 110px 90px auto;
    gap: 8px;
    align-items: center;
}

.FoodModelLineCheckWrap.is-hidden {
    display: none;
}

.FoodModelQtyInput.is-hidden,
.FoodModelQtyType.is-hidden {
    display: none;
}

.FoodModelQtyInput::-webkit-outer-spin-button,
.FoodModelQtyInput::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.FoodModelQtyInput {
    -moz-appearance: textfield;
    appearance: textfield;
}

.FoodModelRemoveBtn.is-hidden {
    display: none;
}

.FoodUnitCalcCard {
    margin-top: 12px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: 10px;
    background: rgba(2, 6, 23, 0.4);
    position: relative;
    z-index: 2;
    pointer-events: auto;
}

.FoodUnitCalcCard h4 {
    margin: 0 0 6px;
    font-size: 14px;
}

.FoodUnitCalcResult {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.58);
}

.FoodUnitCalcGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.FoodUnitCalcRow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 8px 10px;
    background: rgba(15, 23, 42, 0.58);
}

.FoodUnitCalcCard input,
.FoodUnitCalcCard label,
.FoodUnitCalcCard strong,
.FoodUnitCalcCard span,
.FoodUnitCalcCard div {
    pointer-events: auto;
}

.FoodBarsWrap {
    display: grid;
    gap: 12px;
}

.FoodBarRow {
    display: grid;
    gap: 6px;
}

.FoodBarRowHead {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 12px;
    opacity: 0.9;
    line-height: 1.35;
}

.FoodBarTrack {
    position: relative;
    height: 10px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.5);
    overflow: hidden;
}

.FoodBarFill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(14, 165, 233, 0.95));
}

.FoodBarFill.is-alt {
    background: linear-gradient(90deg, rgba(34, 197, 94, 0.9), rgba(132, 204, 22, 0.9));
}

.FoodBarTrack.is-stacked {
    height: 9px;
    background: color-mix(in srgb, var(--mainPageContent-bg-color) 70%, transparent);
}

.FoodBarLayer {
    position: absolute;
    left: 0;
    height: 9px;
    border-radius: 999px;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.12);
    pointer-events: none;
}

.FoodBarFill.is-soft {
    background: linear-gradient(90deg, rgba(148, 163, 184, 0.95), rgba(100, 116, 139, 0.95));
}

.FoodChartWrap {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 12px;
    background: rgba(2, 6, 23, 0.42);
    padding: 10px;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
}

.FoodChartCanvas {
    min-width: 800px;
}

.FoodChartWrap--interactive {
    position: relative;
}

.FoodChartHoverTooltip {
    position: absolute;
    left: 0;
    top: 0;
    max-width: min(520px, calc(100% - 20px));
    padding: 7px 10px;
    border-radius: 8px;
    border: 1px solid rgba(56, 189, 248, 0.24);
    background: rgba(10, 15, 28, 0.96);
    color: #e5e7eb;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
    pointer-events: none;
    z-index: 18;
    white-space: pre-line;
    overflow: visible;
    text-overflow: clip;
    overflow-wrap: anywhere;
}

.FoodChartSvg {
    width: 100%;
    min-width: 0;
    height: auto;
    display: block;
}

.FoodDynamicChart {
    display: grid;
    gap: 8px;
}

.FoodDynamicHeader,
.FoodDynamicRow {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 120px 120px 120px;
    align-items: center;
    gap: 8px;
}

.FoodDynamicHeader {
    color: var(--food-muted);
    font-size: 12px;
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
    padding: 0 0 6px;
}

.FoodDynamicRow {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.45);
}

.FoodDynamicLabel {
    font-weight: 600;
}

.FoodDynamicBarCell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
}

.FoodDynamicBarTrack {
    height: 9px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(2, 6, 23, 0.58);
    overflow: hidden;
}

.FoodDynamicBarFill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(56, 189, 248, 0.95), rgba(14, 165, 233, 0.95));
}

.FoodDynamicValue,
.FoodDynamicMacro {
    white-space: nowrap;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.FoodComboLegend {
    margin-top: 8px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    color: var(--food-muted);
    font-size: 12px;
}

.FoodComboLegend span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.FoodComboSwatch {
    display: inline-block;
    width: 14px;
    height: 4px;
    border-radius: 999px;
}

.FoodComboSwatch.is-bar {
    width: 10px;
    height: 10px;
    border-radius: 2px;
    background: rgba(59, 130, 246, 0.75);
}

.FoodComboSwatch.is-protein {
    background: #22c55e;
}

.FoodComboSwatch.is-carbs {
    background: #f59e0b;
}

.FoodComboSwatch.is-fat {
    background: #ef4444;
}

.FoodNutrientContribGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.FoodNutrientContribCard {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 10px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.45);
}

.FoodNutrientContribHead {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
}

.FoodNutrientContribCard h4 {
    margin: 0;
    font-size: 13px;
}

.FoodNutrientContribTotal {
    white-space: nowrap;
}

.FoodChartGridLine {
    stroke: rgba(148, 163, 184, 0.35);
    stroke-width: 1;
}

.FoodChartTickLabel {
    fill: rgba(148, 163, 184, 0.85);
    font-size: 10px;
}

.FoodChartArea {
    fill: rgba(14, 165, 233, 0.16);
}

.FoodChartLine {
    fill: none;
    stroke: rgba(14, 165, 233, 0.95);
    stroke-width: 2.5;
    stroke-linejoin: round;
    stroke-linecap: round;
}

.FoodChartDot {
    fill: rgba(14, 165, 233, 1);
}

.FoodMacroChartWrap {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
}

.FoodMacroChartWrap--interactive {
    position: relative;
}

.FoodDonutSvg {
    width: 100%;
    max-width: 240px;
    height: auto;
}

.FoodDonutBg {
    fill: none;
    stroke: rgba(148, 163, 184, 0.2);
    stroke-width: 16;
}

.FoodDonutHole {
    fill: rgba(11, 19, 36, 0.98);
}

.FoodDonutCenterValue {
    fill: var(--text-color);
    font-size: 18px;
    font-weight: 700;
}

.FoodDonutCenterLabel {
    fill: rgba(148, 163, 184, 0.9);
    font-size: 11px;
}

.FoodMacroLegend {
    display: grid;
    gap: 8px;
}

.FoodMacroLegendRow {
    display: grid;
    grid-template-columns: 12px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 6px 8px;
    background: rgba(15, 23, 42, 0.45);
}

.FoodMacroSwatch {
    width: 10px;
    height: 10px;
    border-radius: 999px;
}

#FoodCustomFoodForm,
#FoodCustomFoodForm .FoodFormGrid,
#FoodCustomFoodForm input,
#FoodCustomFoodForm button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

#FoodModelForm,
#FoodModelForm .FoodFormGrid,
#FoodModelForm input,
#FoodModelForm textarea,
#FoodModelForm select,
#FoodModelForm label,
#FoodModelForm button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

#FoodTargetsForm,
#FoodTargetsForm .FoodFormGrid,
#FoodTargetsForm input,
#FoodTargetsForm textarea,
#FoodTargetsForm select,
#FoodTargetsForm label,
#FoodTargetsForm button,
#FoodProfileForm,
#FoodProfileForm .FoodFormGrid,
#FoodProfileForm input,
#FoodProfileForm textarea,
#FoodProfileForm select,
#FoodProfileForm label,
#FoodProfileForm button,
#FoodApplyPatientTrainingNomenclatureForm,
#FoodApplyPatientTrainingNomenclatureForm .FoodFormGrid,
#FoodApplyPatientTrainingNomenclatureForm input,
#FoodApplyPatientTrainingNomenclatureForm textarea,
#FoodApplyPatientTrainingNomenclatureForm select,
#FoodApplyPatientTrainingNomenclatureForm label,
#FoodApplyPatientTrainingNomenclatureForm button {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

#FoodCollabRequestForm,
#FoodCollabRequestForm .FoodFormGrid,
#FoodCollabRequestForm input,
#FoodCollabRequestForm button,
#FoodCollabRequestForm label,
#FoodCollabRequestForm select,
[data-approval-form],
[data-approval-form] .FoodFormGrid,
[data-approval-form] input,
[data-approval-form] button,
[data-approval-form] label {
    position: relative;
    z-index: 3;
    pointer-events: auto;
}

.FoodRichText {
    margin-top: 8px;
    white-space: normal;
    line-height: 1.5;
}

.FoodJournalThread {
    display: grid;
    gap: 8px;
}

.FoodJournalActions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.FoodJournalReplies {
    display: grid;
    gap: 8px;
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px dashed var(--border-color);
}

.FoodJournalReply {
    border: 1px solid rgba(148, 163, 184, 0.18);
    border-radius: 8px;
    padding: 8px;
    background: rgba(15, 23, 42, 0.48);
    display: grid;
    gap: 6px;
}

.FoodJournalReplyForm {
    margin-top: 4px;
    padding-top: 8px;
    border-top: 1px dashed var(--border-color);
}

.FoodJournalToolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.FoodJournalToolbar input[type='color'] {
    width: 42px;
    height: 32px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    background: transparent;
    padding: 2px;
}

.FoodJournalMentions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.FoodJournalMentionSuggestions {
    position: static;
    max-height: 220px;
}

.FoodJournalMentionSuggestions .FoodSuggestionItem.is-active {
    background: var(--button-bg-color);
}

.FoodMention {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid rgba(56, 189, 248, 0.35);
    background: rgba(56, 189, 248, 0.14);
    color: var(--text-color);
    padding: 2px 8px;
    font-size: 12px;
}

.FoodDanger {
    border-color: rgba(244, 63, 94, 0.5);
    color: #fecdd3;
    background: rgba(159, 18, 57, 0.18);
}

.FoodButton:focus-visible,
.FoodTabButton:focus-visible,
.FoodToolbar button:focus-visible,
.FoodToolbar input:focus-visible,
.FoodToolbar select:focus-visible,
.FoodCustomSelectTrigger:focus-visible,
.FoodForm input:focus-visible,
.FoodForm select:focus-visible,
.FoodForm textarea:focus-visible,
.FoodSuggestionItem:focus-visible {
    outline: 2px solid rgba(56, 189, 248, 0.58);
    outline-offset: 1px;
}

@media (min-width: 1920px) {
    .FoodApp {
        max-width: none;
        grid-template-columns: 1fr;
        grid-template-rows: auto minmax(0, 1fr);
        padding: 22px 24px;
    }

    .FoodSidebar {
        position: static;
        top: auto;
        display: grid;
        grid-template-columns: auto repeat(4, minmax(150px, 1fr));
        align-items: center;
        gap: 10px;
        padding: 10px 12px;
    }

    .FoodBrand {
        margin: 0 8px 0 2px;
        white-space: nowrap;
    }

    .FoodSidebar .FoodTabButton {
        text-align: center;
        min-height: 42px;
    }

    .FoodMain {
        padding-right: 4px;
    }

    .FoodWidgetsGrid {
        grid-template-columns: repeat(24, minmax(0, 1fr));
        gap: 16px;
    }

    .FoodWidget {
        grid-column: span 12;
    }

    .FoodWidgetConsumed {
        grid-column: 1 / -1;
    }

    .FoodWidgetThird {
        grid-column: span 8;
    }

    .FoodTableWrap {
        max-height: clamp(320px, 52vh, 680px);
    }
}

@media (max-width: 1200px) {
    .FoodApp {
        grid-template-columns: 1fr;
    }
    .FoodSidebar {
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .FoodBrand {
        width: 100%;
        margin-bottom: 2px;
    }
    .FoodWidgetThird {
        grid-column: span 12;
    }
    .FoodCollabGrid {
        grid-template-columns: repeat(12, minmax(0, 1fr));
    }
    .FoodCollabGrid .FoodWidget {
        grid-column: span 12;
    }
    .FoodSharedRowTop,
    .FoodSharedRowBottom {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .FoodApp {
        gap: 12px;
        padding: 12px;
    }
    .FoodApp--collaboration {
        padding: 12px;
    }
    .FoodSidebar {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        padding: 10px;
        border-radius: 16px;
    }
    .FoodBrand {
        grid-column: 1 / -1;
        margin: 0 2px 4px;
        font-size: 10px;
        letter-spacing: 0.16em;
    }
    .FoodTabButton {
        width: 100%;
        min-height: 42px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px 12px;
        text-align: center;
        line-height: 1.2;
        white-space: normal;
    }
    .FoodMain {
        padding-bottom: 18px;
    }
    .FoodPanel,
    .FoodWidget,
    .FoodSharedPanel {
        padding: 14px;
    }
    .FoodPanelTitle {
        font-size: 22px;
        line-height: 1.15;
    }
    .FoodPanelSubtitle {
        font-size: 13px;
    }
    .FoodWidgetsGrid,
    .FoodCollabGrid,
    .FoodFormGrid {
        gap: 10px;
    }
    .FoodCol5,
    .FoodCol4,
    .FoodCol3,
    .FoodCol2,
    .FoodCol6,
    .FoodCol8 {
        grid-column: span 12;
    }
    .FoodStats {
        grid-template-columns: 1fr;
    }
    .FoodCollabGlobalGrid {
        grid-template-columns: 1fr;
    }
    .FoodToolbar {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
    }
    .FoodToolbar label {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        gap: 6px;
        padding: 10px;
    }
    .FoodToolbar input,
    .FoodToolbar select,
    .FoodToolbar button,
    .FoodForm input,
    .FoodForm select,
    .FoodForm textarea,
    .FoodButton,
    .FoodCustomSelectTrigger {
        width: 100%;
        min-height: 42px;
    }
    .FoodCustomSelectMenu,
    .FoodSuggestions {
        max-height: min(42vh, 280px);
    }
    .FoodTableWrap,
    .FoodSharedPanelWide .FoodTableWrap {
        margin-top: 10px;
        max-height: min(52vh, 420px);
    }
    .FoodTable {
        min-width: 620px;
    }
    .FoodTableWrap.FoodTableWrap--consumed {
        height: auto;
        max-height: min(56vh, 460px);
    }
    .FoodSharedWorkspace {
        gap: 10px;
    }
    .FoodSharedRow {
        gap: 10px;
    }
    .FoodSharedPanel {
        padding: 12px;
    }
    .FoodUnitCalcGrid {
        grid-template-columns: 1fr;
    }
    .FoodMacroChartWrap {
        grid-template-columns: 1fr;
    }
    .FoodDynamicHeader,
    .FoodDynamicRow {
        grid-template-columns: 1fr;
    }
    .FoodDynamicHeader {
        display: none;
    }
    .FoodDynamicRow {
        gap: 6px;
    }
    .FoodDynamicMacro,
    .FoodDynamicValue {
        text-align: left;
    }
    .FoodNutrientContribGrid {
        grid-template-columns: 1fr;
    }
    .FoodModelSlotLine {
        grid-template-columns: minmax(0, 1fr) 88px 88px;
        grid-template-areas:
            'food food food'
            'check qty type'
            'remove remove remove';
        align-items: stretch;
    }
    .FoodModelSlotLine > * {
        min-width: 0;
    }
    .FoodModelSlotLine [data-model-line-food] {
        grid-area: food;
        width: 100%;
    }
    .FoodModelLineCheckWrap {
        grid-area: check;
        display: flex;
        align-items: center;
        gap: 8px;
        min-width: 0;
        line-height: 1.2;
    }
    .FoodModelLineCheckWrap input[type='checkbox'] {
        flex: 0 0 auto;
    }
    .FoodModelQtyInput {
        grid-area: qty;
        width: 100%;
    }
    .FoodModelQtyType {
        grid-area: type;
        width: 100%;
    }
    .FoodModelRemoveBtn {
        grid-area: remove;
        width: 100%;
        min-height: 42px;
    }
}

html.light-theme .FoodContentArea {
    --food-card-bg: linear-gradient(160deg, rgba(255, 255, 255, 0.96), rgba(242, 247, 252, 0.92));
    --food-card-bg-soft: rgba(255, 255, 255, 0.86);
    --food-card-border: rgba(48, 69, 96, 0.14);
    --food-card-shadow: 0 12px 30px rgba(48, 69, 96, 0.12);
    --food-field-bg: rgba(255, 255, 255, 0.88);
    --food-muted: rgba(48, 69, 96, 0.72);
    --food-strong: #20344c;
    --food-toolbar-surface: rgba(255, 255, 255, 0.82);
    --food-surface-soft: rgba(246, 249, 252, 0.92);
    --food-surface-strong: rgba(239, 244, 249, 0.96);
    --food-popover-bg: rgba(255, 255, 255, 0.98);
    --food-popover-shadow: 0 18px 40px rgba(48, 69, 96, 0.16);
    --food-tab-bg: rgba(255, 255, 255, 0.88);
    --food-tab-border: rgba(48, 69, 96, 0.18);
    --food-tab-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.36);
    --food-danger-border: rgba(220, 38, 38, 0.3);
    --food-danger-bg: rgba(220, 38, 38, 0.1);
    --food-danger-text: #b91c1c;
    background:
        radial-gradient(circle at top left, rgba(86, 166, 250, 0.12), transparent 55%), radial-gradient(circle at 20% 80%, rgba(245, 158, 11, 0.1), transparent 45%), var(--mainPageContent-bg-color);
}

html.light-theme .FoodSidebar {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(240, 245, 251, 0.92));
}

html.light-theme .FoodBrand {
    color: rgba(48, 69, 96, 0.64);
}

html.light-theme .FoodTabButton {
    border-color: var(--food-tab-border);
    background: var(--food-tab-bg);
    color: var(--text-color);
    box-shadow: var(--food-tab-shadow);
}

html.light-theme .FoodPanelTitle,
html.light-theme .FoodWidget h3 {
    color: var(--food-strong);
}

html.light-theme .FoodToolbar label {
    border-color: var(--food-card-border);
    background: var(--food-toolbar-surface);
}

html.light-theme .FoodToolbar input,
html.light-theme .FoodToolbar select,
html.light-theme .FoodForm input,
html.light-theme .FoodForm select,
html.light-theme .FoodForm textarea,
html.light-theme .FoodCustomSelectTrigger {
    border-color: var(--food-card-border);
    background: var(--food-field-bg);
    box-shadow: inset 0 0 0 1px rgba(48, 69, 96, 0.04);
}

html.light-theme .FoodButton,
html.light-theme .FoodToolbar button {
    border-color: rgba(48, 69, 96, 0.18);
    background: rgba(48, 69, 96, 0.08);
    color: var(--text-color);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
}

html.light-theme .FoodButton:hover,
html.light-theme .FoodToolbar button:hover {
    background: rgba(56, 189, 248, 0.12);
}

html.light-theme .FoodCustomSelectMenu,
html.light-theme .FoodSuggestions,
html.light-theme .FoodSuggestionPreviewCard {
    border-color: rgba(56, 189, 248, 0.28);
    background: var(--food-popover-bg);
    box-shadow: var(--food-popover-shadow);
}

html.light-theme .FoodTableWrap,
html.light-theme .FoodStatCard,
html.light-theme .FoodSharedPanel,
html.light-theme .FoodListItem,
html.light-theme .FoodUnitCalcCard,
html.light-theme .FoodUnitCalcResult,
html.light-theme .FoodUnitCalcRow,
html.light-theme .FoodBarTrack,
html.light-theme .FoodChartWrap,
html.light-theme .FoodDynamicRow,
html.light-theme .FoodDynamicBarTrack,
html.light-theme .FoodNutrientContribCard,
html.light-theme .FoodMacroLegendRow,
html.light-theme .FoodJournalReply {
    border-color: var(--food-card-border);
    background: var(--food-surface-soft);
    box-shadow: inset 0 0 0 1px rgba(48, 69, 96, 0.03);
}

html.light-theme .FoodCollabGlobalWidget {
    background: radial-gradient(circle at 12% 18%, rgba(56, 189, 248, 0.12), transparent 38%), linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(237, 243, 249, 0.92));
}

html.light-theme .FoodCollabGlobalCard {
    background: linear-gradient(135deg, rgba(56, 189, 248, 0.12), rgba(255, 255, 255, 0.72));
}

html.light-theme .FoodTable th {
    background: var(--food-surface-strong);
    box-shadow: inset 0 -1px 0 rgba(48, 69, 96, 0.12);
    color: rgba(48, 69, 96, 0.78);
}

html.light-theme .FoodTable--consumed thead th,
html.light-theme .FoodTable--shared thead th {
    background: rgba(248, 250, 253, 0.98);
    box-shadow:
        inset 0 -1px 0 rgba(48, 69, 96, 0.12),
        0 6px 12px rgba(48, 69, 96, 0.08);
}

html.light-theme .FoodSuggestionPreviewRow {
    background: rgba(248, 250, 253, 0.96);
}

html.light-theme .FoodChartHoverTooltip {
    border-color: rgba(56, 189, 248, 0.24);
    background: rgba(255, 255, 255, 0.98);
    color: #1f2937;
    box-shadow: 0 10px 24px rgba(48, 69, 96, 0.18);
}

html.light-theme .FoodChartGridLine {
    stroke: rgba(48, 69, 96, 0.18);
}

html.light-theme .FoodChartTickLabel,
html.light-theme .FoodDonutCenterLabel {
    fill: rgba(48, 69, 96, 0.7);
}

html.light-theme .FoodDonutHole {
    fill: rgba(255, 255, 255, 0.98);
}

html.light-theme .FoodMention {
    border-color: rgba(56, 189, 248, 0.28);
    background: rgba(56, 189, 248, 0.12);
    color: var(--text-color);
}

html.light-theme .FoodDanger {
    border-color: var(--food-danger-border);
    background: var(--food-danger-bg);
    color: var(--food-danger-text);
}
