body {
    margin: 0;
    min-height: 100vh;
    position: relative;

    /* Отключаем автоматическое масштабирование */
    transform-origin: top left;
}

/* Стили для компонентов фильтрации и поиска */

.filter_search_container {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin: 0 auto;
}

.filter_search_container_content_left_side {
    display: flex;
    gap: 10px;
    flex: 1;
    max-width: 600px;
}

/* Правая часть */
.filter_search_container_content_right_side {
    display: flex;
    gap: 20px;
    align-items: center;
}

.Amount_counted, .contracts_counted {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
   
}

.Amount_counted_main_icon {
    font-size: 45px;
    font-weight: bold;
    color: #282D3B;
}

.contracts_counted_main_icon {
    display: flex;
    align-items: center;
}

.Amount_counted_amount, .contracts_counted_amount {
    font-size: 14px;
    color: #282D3B;
 
}

.Amount_counted_value, .contracts_counted_value {
    font-size: 24px;
    font-weight: bold;
    color: #282D3B;
}

/* Стили для адаптивности */
@media screen and (max-width: 768px) {
    .filter_search_container {
        flex-direction: column;
        gap: 20px;
    }

    .filter_search_container_content_left_side {
        width: 100%;
    }

    .filter_search_container_content_right_side {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
}

@media screen and (max-width: 470px) {
    .filter_search_container {
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
    }

    .filter_search_container_content_left_side {
        flex-direction: row;
        width: 100%;
        max-width: 100%;
        gap: 10px;
    }

    .search_form {
        max-width: 100%;
        width: 100%;
    }

    .search_input {
        width: 100%;
    }

    .filter_search_container_content_right_side {
        width: 100%;
        margin-top: 10px;
        margin-left: 0;
        margin-right: 0;
        padding-left: 0;
        padding-right: 0;
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 0;
    }
    
    .Amount_counted {
        margin-right: 0;
        margin-left: 0;
    }
    
    .contracts_counted {
        margin-left: 0;
        margin-right: 0;
    }
}

/* .Amount_counted_amount {

    
}

.contracts_counted_amount {

}

*/

.Amount_counted_text_digits, .contracts_counted_text_digits {
    display: flex;
    flex-direction: column;
    color: #282D3B;
}

/* Navigation menu styles moved to navigation_components.css */


/* Посты */

.social_feed {
    background: #e8fae8;
    border-radius: 15px;
    padding: 20px;
    max-width: 600px;
    margin: 0;
    /* убираем margin: 20px auto; */
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Стили для time slot feed перенесены в timeslot_feed.css */



.social_feed_user_name_image {
    display: flex;
    transform: scale(0.9);
}

/* Overflow Menu стили */
.social_feed_overflow_menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 120px;
    z-index: 1001;
    display: none;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, visibility 0.2s ease, transform 0.2s ease;
}

.social_feed_overflow_menu.show {
    display: block;
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.social_feed_overflow_menu_item.remove {
    color: #dc3545;
}

.social_feed_overflow_menu_item.edit {
    color: #007bff;
}

.social_feed_overflow_menu_item.share {
    color: #28a745;
}

.social_feed_image_gallery_1 {
    display: flex;
    flex-direction: row;
    padding: 15px;
    background: #ffffff;
    border-radius: 10px;
    overflow-x: auto;

    scrollbar-width: thin;
    /* для Firefox */
    scrollbar-color: rgba(173, 118, 118, 0.5) transparent;
    /* для Firefox */
}

/* Стили для Webkit (Chrome, Safari, newer Edge) */
.social_feed_image_gallery_1::-webkit-scrollbar {
    height: 6px;
}

.social_feed_image_gallery_1::-webkit-scrollbar-track {
    background: transparent;
}

.social_feed_image_gallery_1::-webkit-scrollbar-thumb {
    background-color: rgba(173, 118, 118, 0.5);
    border-radius: 3px;
}

.social_feed_image_gallery_1::-webkit-scrollbar-thumb:hover {
    background-color: rgba(173, 118, 118, 0.8);
}

.social_feed_image_gallery_1 img {
    width: 150px;
    height: 150px;
    object-fit: cover;
    border-radius: 8px;
    margin-right: -75px;
    /* Отрицательный отступ для наслоения */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid white;
}

.social_feed_image_gallery_1 img:last-child {
    margin-right: 0;
}

.social_feed_image_gallery_1 img:hover {
    transform: scale(1.1) translateY(-10px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    position: relative;
    z-index: 1;
}

/* Новый шаблон — только для карточки с датами и меню сверху */
.post_info_top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    padding: 0 0 12px 0;
    position: relative;
}

/* Fixed circle menu styles moved to navigation_components.css */

/* Левое меню */

.lefside_menu {
    width: 320px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin: 0 15px 0 20px;
}

@media (max-width: 700px) {
    .lefside_menu {
        width: 100%;
        margin: 0 0 20px 0;
    }
}

/* Новые стили для социальных откликов */

.social_responses_container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
}

/* Центрирование всех постов внутри social_feeds */
.social_feeds>.social_feed {
    width: 100%;
    max-width: 600px;
}

/* Стили для time slot feed перенесены в timeslot_feed.css */

.social_feeds>.social_feed2 {
    width: 100%;
    max-width: 600px;
    padding: 20px;
}

/* Адаптивность: ниже 900px — столбец */
@media (max-width: 900px) {
    .social_responses_container {
        flex-direction: column;
        align-items: stretch;
    }

    .social_feeds {
        align-items: stretch;
    }
}

/* Nav arrow SVG styles moved to navigation_components.css */

@media (max-width: 600px) {
    .post_info {
        flex-direction: column;
        align-items: stretch;
    }

}

/* Специальные стили для job_search_feed */
.social_feed2 .post_info_dates {
    margin-top: 12px;
}

.social_feed_details_label,
.social_feed_details_grid_client,
.social_feed_details_grid_date_start,
.social_feed_details_grid_date_end,
.social_feed_details_grid_documents,
.social_feed_details_grid_project_private,
.social_feed_details_grid_customer_name,
.social_feed_details_grid_stakeholders,
.social_feed_details_grid_status,
.social_feed_details_task_number {
    
    margin-top: 8px;
}

.social_feed_hide_icon {
    position: absolute;
    left: 50%;
    /* Используем top вместо bottom для фиксации позиции */
    top: calc(100% - 17.5px); /* Позиционируем от верхней границы с учетом высоты иконки */
    width: 35px;
    height: 35px;
    margin-left: -17.5px;
    z-index: 85;
    cursor: pointer;
    /* Фиксируем позицию чтобы не смещалась при разворачивании */
    transform: translateZ(0);

}

/* Стили для time slot feed перенесены в timeslot_feed.css */
/* Медиа-запросы для time slot feed перенесены в timeslot_feed.css */

/* Стили для фотографий в деталях поста */
.social_feed_details_photos {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    align-items: center;
}

.social_feed_details_photos a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #6f6868;
    border-radius: 17px;
    margin-right: 4px;
    text-decoration: none;
    color: white;
    text-align: center;
    line-height: 40px;
    font-size: 12px;
}

.social_feed_details_photos img {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    margin-right: 4px;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.social_feed_details_photos a:hover img {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Стили для ссылки "Link" - исключаем из галереи */
.social_feed_details_photos a.photo-link-exclude {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: #6f6868;
    border-radius: 17px;
    margin-right: 4px;
    text-decoration: none;
    color: white;
    text-align: center;
    line-height: 40px;
    font-size: 12px;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.social_feed_details_photos a.photo-link-exclude:hover {
    background: #8a8383;
    transform: none;
    box-shadow: none;
}

/* Стили для элементов галереи */
.social_feed_details_photos a.photo-gallery-item {
    display: inline-block;
    text-decoration: none;
}

/* Стили для иконки заметок */
.notes-icon {
    cursor: pointer;
    transition: transform 0.2s ease;
}

.notes-icon:hover {
    transform: scale(1.1);
}

/* Дополнительные стили для notes popup */
.notes-popup {
    /* Дополнительные стили для попапа, если нужны */
}

.notes-form {
    /* Стили для формы notes */
}

.notes-textarea {
    /* Стили для textarea notes */
    min-height: 200px;
    resize: vertical;
}

.notes-save-btn {
    /* Стили для кнопки Save */
}

.notes-cancel-btn {
    /* Стили для кнопки Cancel */
}

.notes-close-btn {
    /* Стили для кнопки закрытия */
}

.notes-popup-title {
    /* Стили для заголовка popup */
    margin: 0;
    color: #ffc83d;
}

/* Стили для попапа с блокнотом */
.notes-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    backdrop-filter: blur(5px);
}

.notes-popup-content {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow: hidden;
    animation: popupSlideIn 0.3s ease-out;
}

@keyframes popupSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notes-popup-header {
    background: #282d3b;
    color: white;
    padding: 20px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notes-popup-header h3 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
}

.notes-popup-close {
    background: none;
    border: none;
    color: white;
    font-size: 28px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.notes-popup-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.notes-popup-body {
    padding: 25px;
    max-height: 70vh;
    overflow-y: auto;
}

.notes-popup-body .form-group {
    margin-bottom: 20px;
}

.notes-popup-body label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #282d3b;
    font-size: 1.1em;
}

.notes-popup-body .form-control {
    width: 100%;
    min-height: 300px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.2s;
}

.notes-popup-body .form-control:focus {
    outline: none;
    border-color: #282d3b;
    box-shadow: 0 0 0 3px rgba(40, 45, 59, 0.1);
}

.notes-popup-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.notes-popup-actions .btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.notes-popup-actions .btn-primary {
    background: #282d3b;
    color: white;
}

.notes-popup-actions .btn-primary:hover {
    background: #3a3f4f;
    transform: translateY(-1px);
}

.notes-popup-actions .btn-secondary {
    background: #f0f0f0;
    color: #666;
}

.notes-popup-actions .btn-secondary:hover {
    background: #e0e0e0;
    transform: translateY(-1px);
}

/* Стили для CKEditor внутри попапа */
.notes-popup-body .ck-editor__editable {
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
}

.notes-popup-body .ck.ck-editor__main > .ck-editor__editable {
    border: 2px solid #e0e0e0;

    padding: 15px;
}

.notes-popup-body .ck.ck-editor__main > .ck-editor__editable:focus {
    border-color: #282d3b;
    box-shadow: 0 0 0 3px rgba(40, 45, 59, 0.1);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .notes-popup-content {
        width: 95%;
        margin: 10px;
    }
    
    .notes-popup-header {
        padding: 15px 20px;
    }
    
    .notes-popup-header h3 {
        font-size: 1.2em;
    }
    
    .notes-popup-body {
        padding: 20px;
    }
    
    .notes-popup-actions {
        flex-direction: column;
    }
    
    .notes-popup-actions .btn {
        width: 100%;
    }
}

/* Стили для модального окна выбора типа публикации */
.type-selection-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.type-option {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.type-option:hover {
    background: #e9ecef;
    border-color: #007bff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.2);
}

.type-option h3 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 18px;
}

.type-option p {
    margin: 0;
    color: #6c757d;
    font-size: 14px;
}

/* Адаптивность для модального окна выбора типа */
@media (max-width: 768px) {
    .type-selection-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .type-option {
        padding: 15px;
    }
}

/* Специальные стили для модального окна выбора типа */
.modal-overlay .type-selection-grid {
    z-index: 9999;
}

/* Принудительное скрытие модального окна выбора типа */
.modal-overlay[style*="display: none"] {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Скрытие модальных окон */
.modal-overlay[style*="display: none"] {
    display: none;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

/* Стили для кнопки Save */
.btn.btn-secondary {
    transition: opacity 0.3s ease;
}

.btn.btn-secondary:disabled {
    cursor: not-allowed;
}

/* Стили для спиннера */
.btn.btn-secondary[style*="opacity: 0.7"] {
    position: relative;
}

.btn.btn-secondary[style*="opacity: 0.7"]::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid transparent;
    border-top: 2px solid currentColor;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}