#alert-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9999;
}

.input-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.input-group input[type="text"] {
    width: 200px;
    margin-right: 10px;
}

.input-group button[type="submit"] {
    width: 150px;
}

.card-title {
    font-size: 16px;
    font-weight: bold;
    margin-top: 2px;
    /* расстояние между заголовком и основным текстом */
}

.subtitle {
    font-size: 12px;
    margin-bottom: 2px;
    /* расстояние между заголовком и основным текстом */
}

.card {
    border: none;
    padding: 4px 8px;
    /* отступы с верху и по бокам карточки */
}

.card-header {
    border-bottom: none;
    padding: 4px 8px 0;
    /* отступы с верху и по бокам заголовка карточки */
}

.short-text {
    position: relative;
    max-height: 4.4em;
    /* Настройте эту высоту как вам нужно */
    overflow: hidden;
    padding-right: 1rem;
    /* Учтите отступ для кнопки "Показать больше..." */
}

.table {
    background-color: #fff;
}

.table .sticky-col {
    position: sticky;
    left: 0;
    z-index: 2;
    background-color: #fff !important;
}


th {
    position: relative;
    z-index: 1;
}

.vertical-center {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
}

@media (max-width: 992px) {
    #weightChartContainer {
        height: 300px;
    }
}

@media (min-width: 992px) {
    #weightChartContainer {
        height: 500px;
    }
}

.nounderline {
    text-decoration: none !important
}

/* Стили для десктопных экранов и планшетов */
.custom-card {
    flex: 0 0 calc(14.28%);
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .custom-card {
        flex: 0 0 100%;
        /* Карточка будет занимать 100% ширины экрана */
        margin-bottom: 15px;
        /* Добавить небольшой отступ между карточками */
    }
}

/* Стилизация для Markdown */
.markdown {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.markdown code {
    background-color: #f0f0f0;
    padding: 2px 4px;
    border-radius: 4px;
    font-family: 'Courier New', Courier, monospace;
    display: inline-block;
}

.markdown pre {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 6px;
    font-family: 'Courier New', Courier, monospace;
    overflow-x: auto;
    line-height: 1.6;
}

.markdown a {
    color: #3490dc;
    text-decoration: underline;
}

.markdown a:hover {
    color: #1d72b8;
}

/* Основные цвета для заголовков */
.breakfast>td {
    background-color: rgba(220, 53, 69, 0.15);

}

.lunch>td {
    background-color: rgba(25, 135, 84, 0.15);

}

.dinner>td {
    background-color: rgba(255, 193, 7, 0.15);

}

.other>td {
    background-color: rgba(13, 110, 253, 0.15);

}


/* Светлые варианты для строк продуктов */
.breakfast-light {
    background-color: rgba(220, 53, 69, 0.06);
}

.lunch-light {
    background-color: rgba(25, 135, 84, 0.06);
}

.dinner-light {
    background-color: rgba(255, 193, 7, 0.06);
}

.other-light {
    background-color: rgba(13, 110, 253, 0.06);
}

.chat-container {
    display: flex;
    height: 100vh;
}

.chat-list {
    width: 30%;
    border-right: 1px solid #ddd;
    padding: 10px;
}

.chat-item {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    cursor: pointer;
}

.unread-badge {
    background-color: red;
    color: white;
    padding: 2px 5px;
    border-radius: 50%;
}

.chat-window {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
}

.messages-container {
    flex-grow: 1;
    overflow: hidden;
}

.message {
    padding: 10px;
    border-radius: 10px;
    margin: 5px 0;
}

.message-sent {
    background-color: #007bff;
    color: white;
    text-align: right;
}

.message-received {
    background-color: #f1f1f1;
    text-align: left;
}

.chat-input {
    display: flex;
    padding: 10px;
}

.chat-input textarea {
    flex-grow: 1;
    resize: none;
}

/* Добавляем эти стили в блок style */
.text-truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message-user {
    background: #e3f2fd;
    border: 2px solid #007bff;
    border-radius: 15px 15px 0 15px;
    margin-left: auto;
    max-width: 80%;
    min-width: 120px;
    width: fit-content;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-sizing: border-box;
}

.message-participant {
    background: rgba(18, 183, 106, 0.3);
    border: 2px solid #43b70f;
    border-radius: 15px 15px 15px 0;
    max-width: 80%;
    min-width: 120px;
    width: fit-content;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.message-time {
    font-size: 0.75rem;
    color: #666;
    margin-top: 4px;
    padding: 0 8px;
}


.message-user .message-time {
    color: #007bff;
}

.message-participant .message-time {
    color: #666;
}

.message-user,
.message-participant {
    transition: transform 0.2s ease,
        box-shadow 0.2s ease,
        opacity 0.2s ease;
}

.message-user:active,
.message-participant:active {
    border-width: 2px;
    transform: translateY(0);
}

.message-new {
    animation: message-scale 0.3s ease-out;
}

@keyframes message-appear {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

@keyframes message-scale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.markdown {
    padding: 8px 12px;
    line-height: 1.4;
}

.message-user .markdown {
    border-left: 2px solid #007bff20;
    margin-left: -2px;
}

.message-participant .markdown {
    border-left: 2px solid #e0e0e020;
    margin-left: -2px;
}


.avatar {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.dropdown-menu {
    min-width: 240px;
    padding: 8px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.dropdown-item {
    border-radius: 6px;
    transition: all 0.2s;
}

/* Mobile-friendly navbar dropdown and links */
@media (max-width: 768px) {
    .navbar .dropdown-menu {
        position: static !important;
        float: none;
        width: 100%;
        min-width: 100% !important;
        margin-top: 0.25rem;
        box-shadow: none;
        border-radius: 0.5rem;
    }

    .navbar .dropdown-menu .dropdown-item {
        padding: 14px 16px;
        font-size: 1rem;
    }

    .navbar .nav-link {
        padding: 16px 16px !important;
        font-size: 1.05rem;
    }

    .navbar .nav-link .bi,
    .navbar .navbar-toggler-icon {
        font-size: 1.25rem;
    }

    .navbar .navbar-nav .nav-item+.nav-item {
        margin-top: 0.25rem;
    }
}

.progress {
    border-radius: 100px;
    background-color: #f0f0f0;
}

.badge {
    padding: 8px 12px;
    border-radius: 8px;
}

.badge-beta {
    font-size: 0.75em;
    line-height: 1.2;
    vertical-align: middle;
}

.btn {
    transition: all 0.2s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

.btn-primary-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
}

.btn-warning-gradient {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.btn-purple-gradient {
    background: linear-gradient(135deg, #8b5cf6 0%, #6d28d9 100%);
    color: white;
}

.btn-info-gradient {
    background: linear-gradient(135deg, #06b6d4 0%, #0891b2 100%);
    color: white;
}

.btn-success-gradient {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.btn:active {
    transform: translateY(0);
    opacity: 0.9;
}

.btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(45deg);
    transition: all 0.5s ease;
    pointer-events: none;
}

.btn:hover::after {
    left: 50%;
    top: 50%;
}

:root {
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    --success-gradient: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --danger-gradient: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    --warning-gradient: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.hover-scale {
    transition: transform 0.2s ease;
}

.hover-scale:hover {
    transform: translateY(-3px);
}

.text-danger-gradient {
    background: var(--danger-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.btn-action {
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    background: var(--primary-gradient);
    color: white;
    transition: all 0.2s ease;
}

.table-hover tbody tr {
    transition: background-color 0.2s ease;
}

.pagination-separated .page-item {
    margin: 0 0.25rem;
}

.pagination-separated .page-link {
    border-radius: 0.5rem !important;
    min-width: 40px;
    text-align: center;
}

.modal-content {
    border-radius: 1rem;
}

.bg-primary-gradient {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
}

.hover-scale {
    transition: all 0.2s ease;
}

.hover-scale:hover {
    transform: translateY(-2px);
    opacity: 0.9;
}

.nav-link {
    border-radius: 0.5rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: rgba(255, 255, 255, 0.5);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.dropdown-menu {
    border-radius: 0.75rem;
    margin-top: 0.5rem;
}

.modal-content {
    border-radius: 1rem;
}

#searchResults .list-group-item {
    border-radius: 0.5rem;
    margin: 0.25rem 0;
    transition: all 0.2s ease;
}

#searchResults .list-group-item:hover {
    background: #f8f9fa;
    transform: translateX(5px);
}

/* Добавьте это в ваши стили */
.modal-header .form-control:focus {
    box-shadow: none;
    border-color: #dee2e6;
}

.modal-header .input-group-text {
    transition: all 0.3s ease;
}

.modal-header .form-control:focus+.input-group-text {
    color: #0d6efd;
}

.modal {
    --bs-modal-zindex: 2000;
    --bs-backdrop-zindex: 1999;
}


.modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.5);
}

.nav-scroller {
    position: relative;
    z-index: 2;
    overflow-y: hidden;
}

.nav-scroller::-webkit-scrollbar {
    height: 4px;
}

.nav-scroller::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 2px;
}

.nav-link {
    border-radius: 0.75rem 0.75rem 0 0;
    transition: all 0.2s ease;
    border: none !important;
}

.nav-link.active {
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-1px);
}

.nav-link:not(.active):hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.vr {
    width: 1px;
    opacity: 0.5;
    align-self: stretch;
}

.table> :not(caption)>*>* {
    vertical-align: middle;
    /*padding: 1rem 0.75rem;*/
}

.tbody tr:nth-child(odd) {
    background: #f8fafc;
}

.table-responsive {
    /*max-height: 70vh;*/
    overflow-y: auto;
}

.thead {
    position: sticky;
    top: -1px;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.text-truncate-2-lines {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.message:not(.curator-message) {
    opacity: 0.8;
    transition: opacity 0.3s;
}

.message.read {
    opacity: 1;
    background-color: rgba(0, 123, 255, 0.05);
}

.progress {
    background-color: rgb(200, 200, 200);
    border-radius: 50px;
    overflow: hidden;
}

.progress-bar {
    transition: width 0.3s ease, background-color 0.3s ease;
}

/* Основные стили карточек */
.day-card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fff;
    min-height: 160px;
    transition: all 0.2s ease;
    margin: 2px;
    flex: 0 0 calc(14.2857% - 2px);
    max-width: calc(14.2857% - 2px);
    display: flex;
    flex-direction: column;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

/* Шапка карточки */
.day-header {
    padding: 10px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.day-date {
    font-size: 0.95rem;
    font-weight: 600;
    color: #2c3e50;
    white-space: nowrap;
}

.day-weekday {
    font-size: 0.85rem;
    color: #7f8c8d;
    text-transform: capitalize;
}

/* Элементы статусов */
.status-item {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    padding: 8px 10px;
    margin: 2px 0;
    font-size: 0.65rem;
    line-height: 1.4;
    white-space: normal;
    min-height: 32px;
    border-radius: 5px;
    transition: transform 0.2s;
}

.status-item:hover {
    transform: translateX(5px);
    cursor: pointer;
}

.status-label {
    display: none;
    flex: 0 0 40%;
    min-width: 40px;
    padding-right: 8px;
    font-weight: 500;
    color: #34495e;
}

.status-value {
    flex: 1;
    color: #2c3e50;
    word-break: break-word;
}

/* Специфичные стили */
.calories-item .status-value {
    white-space: nowrap;
}



/*.status-value small {*/
/*    display: block;*/
/*    font-size: 1.0em;*/
/*    line-height: 1.2;*/
/*    margin-top: 2px;*/
/*}*/

/* Цветовые стили */
.weight-ok,
.calories-ok,
.report-2 {
    background: #e8f5e9;
    color: #155724;
}

.weight-missing,
.calories-missing,
.report-0 {
    background: #ffe3e6;
    color: #721c24;
}

.report-1 {
    background: #fff8dd;
    color: #856404;
}

.report-3 {
    background: #e0f0ff;
    color: #004085;
}

.green-bg {
    background: #e8f5e9;
    /*border-left: 3px solid #155724;*/
}

.yellow-bg {
    background: #fff3cd;
    /*border-left: 3px solid #ffc107;*/
}

.red-bg {
    background: #f8d7da;
    /*border-left: 3px solid #dc3545;*/
}

.calories-item.green-bg {
    border-left-color: #28a745;
}

.calories-item.yellow-bg {
    border-left-color: #ffc107;
}

.calories-item.red-bg {
    border-left-color: #dc3545;
}

/* Стили отчетов */
.report-excellent {
    background: #e8f5e9 !important;
    /*border-left: 3px solid #28a745 !important;*/
}

.report-normal {
    background: #fff3cd !important;
    /*border-left: 3px solid #ffc107 !important;*/
}

.report-bad {
    background: #f8d7da !important;
    /*border-left: 3px solid #dc3545 !important;*/
}

.report-late {
    background: #f8f9fa !important;
    border-left: 3px solid #6c757d !important;
    color: #6c757d !important;
}

.report-none {
    background: #ffffff !important;

    color: #6c757d !important;
}

.report-comment {
    white-space: normal !important;
    word-wrap: break-word;
    min-height: 40px;
    line-height: 1.4;
    padding: 10px !important;
    background: #ffffff !important;
    border-radius: 0 0 8px 8px !important;
}

.report-comment .status-value {
    white-space: pre-wrap;
    text-align: left !important;
    font-size: 0.8rem;
}

/* Адаптивная верстка */
@media (max-width: 767px) {
    .day-card {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        margin: 0 0 16px 0;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .day-header {
        border-bottom-width: 2px;
        padding: 12px;
    }

    .day-date {
        font-size: 1rem;
    }

    .day-weekday {
        font-size: 0.9rem;
    }

    .status-item {
        padding: 12px 12px;
        font-size: 0.8rem;
    }


    .missing-data .status-value {
        color: #6c757d !important;
        font-style: italic;
    }

    .has-data .status-value:before {
        background: #28a745;
    }

    .status-label {
        display: flex;
        /* Включаем отображение */
        flex-basis: 30%;
    }

    .status-value {
        flex-basis: 70%;
        font-size: 0.9rem;
        text-align: right !important;
    }
}

@media (min-width: 768px) {
    .day-card {
        flex: 0 0 calc(14.2857% - 4px);
        max-width: calc(14.2857% - 4px);
    }
}

/* Модальное окно */
@media (max-width: 576px) {
    #foodEntriesModal .modal-dialog {
        margin: 0;
    }

    #foodEntriesModal .modal-content {
        height: 100vh;
        border-radius: 0;
    }

    #foodEntriesModal .table-responsive {
        display: none;
    }

    #foodEntriesModal .cards-wrapper {
        display: block !important;
    }
}

.comment-text {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    /* Ограничиваем количество строк до 2 */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: normal;
}