:root {
    /* Цвета статусов заявка */
    --status-new: #f4d867;
    --status-work: #d1b3ff;
    --status-done: #88c9ed;
    --status-cancel: #f64747;
    --status-default: #e9ecef;

    /* Общие статусы */
    --color-black: #212529;
    --color-white: white;
    --color-red: #a00c0c;
    --color-grey: rgba(255, 255, 255, 0.25);

    /* Цвета списков */
    --bg-blue: #7ca1cc;
    --bg-dark-blue: #5276b5fb;

    /* Цвета статусов транспорта */
    --status-active: #d1b3ff;
    --status-maintenance: #909091;
    --status-out_of_service: #ff9696;

    /* Цвета статусов назначения */
    --status-assigned: #57c78a;
    --status-under_review: #ffffff;
    --status-no_show: #f64747;

    --proect-gradient: linear-gradient(135deg, #8E3798, #574CA1, #4DA4CB);
    --proect-light-gradient: linear-gradient(135deg, #a87ab5, #8a85c9, #7bc9e0);

    --proect-gradient-two: linear-gradient(135deg, #8a85c9, #7ca1cc, #574CA1);
    --proect-gradient-three: linear-gradient(135deg, #8a85c9, #7bc9e0, #57c78a);

    --status-is-active: #7cbe9d;
    --status-not-is-active: #909091;
}

.status-indicator.active {
    background-color: var(--status-is-active);
}

.status-indicator.inactive {
    background-color: var(--status-not-is-active);
}

.inactive {
    background-color: var(--status-not-is-active);
}

.status-indicator {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 8px;
    vertical-align: middle;
    filter: blur(2px);
}

/* Внутреннее меню (можно упростить) */
#sidebarMenu {
    height: 100%;
    display: flex;
    flex-direction: column;
    width: 100%;
}

body {
    padding-top: 56px;
    margin: 0;
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1040;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    flex-shrink: 0;
    height: 56px;
}

/* иконки по центру вертикально */
.icon-link {
    align-items: center;
    justify-content: center;
}

/* Для скроллбара */
.menu-scroll-container {
    min-height: 200px;
    display: none;
}

/* Шапка меню */
.sidebar-header {
    background: var(--proect-gradient);
    color: white;
    padding: 1.25rem;
    text-align: center;
    flex-shrink: 0;
    position: relative;
    padding-top: 1.2rem;
}

.sidebar-header .email {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.sidebar-header .full-name {
    font-weight: 600;
    font-size: 1.1rem;
    margin: 0.25rem 0;
}

.sidebar-header .role {
    font-size: 0.85rem;
    opacity: 0.9;
}

.sidebar-nav {
    overflow-y: auto !important;
    padding: 0.75rem 1rem !important;
    margin: 0 -1rem;
    flex-basis: 0;
}

/* Ссылки меню */
.sidebar-nav .nav-link {
    color: #495057;
    border-radius: 6px;
    margin-bottom: 0.35rem;
    padding: 0.65rem 1rem;
    transition: all 0.2s;
}

.sidebar-nav .nav-link:hover {
    background-color: #f8f9fa;
    color: #574CA1;
}

.sidebar-nav .nav-link svg {
    width: 1.25rem;
    text-align: center;
}

/* Скроллбар */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #574CA1;
    border-radius: 3px;
}

.sidebar-footer {
    flex-shrink: 0;
    /* Фиксированная высота подвала */
}

/* Кнопки внизу */
.sidebar-footer .btn {
    border-radius: 6px;
    padding: 0.5rem 1rem;
    font-weight: 500;
    transition: all 0.2s;
}

.sidebar-footer .btn-outline-primary:hover {
    background: #f0f4ff;
    border-color: #574CA1;
    color: #574CA1;
}

.sidebar-footer .btn-outline-danger:hover {
    background: #fff0f0;
    border-color: #dc3545;
    color: #dc3545;
}

#sidebarToggle {
    background: transparent !important;
    border: none !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    transition: background 0.2s;
}

#sidebarToggle:hover {
    background: rgba(255, 255, 255, 0.1) !important;
}

/* Тень и анимация */
.sidebar-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: 1049;
    display: none;
}

#sidebarContainer {
    position: fixed;
    top: 56px;
    left: -280px;
    width: 280px;
    height: calc(100vh - 56px);
    transition: left 0.3s ease;
    z-index: 1050;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#sidebarContainer.show {
    left: 0;
}


.bg-gradient-primary {
    color: var(--color-white);
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

/* Стили скроллбара для Chrome/Safari */
.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: #e9ecef;
    border-radius: 3px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: #574CA1;
    border-radius: 3px;
}

/* Активная кнопка */
.sidebar-nav .nav-link.active {
    background-color: #eef2ff;
    color: #574CA1;
}

/* МОДАЛЬНОЕ ОКНО КОПИРОВАНИЯ СМС */
#sendMessagesModal .customer-phone,
#sendMessagesModal .responsible-phone,
#sendMessagesModal .driver-phone,
#sendMessagesModal h6 {
    font-size: calc(0.4rem + 0.5vw) !important;
}

#sendMessagesModal .message-full-text {
    font-size: calc(0.4rem + 0.45vw) !important;
}

#sendMessagesModal .mb-0 .fw-bold {
    font-size: calc(0.5rem + .4vw);
}

/* === МОДАЛЬНОЕ ОКНО ПОДТВЕРЖДЕНИЯ === */
#confirmActionModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

#confirmActionModal .modal-header {
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

#confirmActionModal .modal-title {
    font-weight: 600;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

#confirmActionModal .btn-close {
    filter: brightness(0) invert(1);
    opacity: 1;
}

#confirmActionModal .modal-body {
    padding: 1.5rem;
    font-size: 1rem;
    line-height: 1.6;
    color: #2c3e50;
}

#confirmActionModal .modal-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0 0 12px 12px;
    gap: 0.5rem;
}

#confirmActionModal .modal-footer .btn {
    padding: 0.5rem 1.25rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
}

#confirmActionModal .modal-footer .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

#confirmActionModal .modal-footer .btn-secondary {
    background: #6c757d;
    border-color: #6c757d;
    color: white;
}

#confirmActionModal .modal-footer .btn-secondary:hover {
    background: #5a6268;
    border-color: #545b62;
}

#confirmActionModal .modal-footer .btn-danger {
    background: #dc3545;
    border-color: #dc3545;
    color: white;
}

#confirmActionModal .modal-footer .btn-danger:hover {
    background: #c82333;
    border-color: #bd2130;
}

/* Анимация появления */
#confirmActionModal .modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

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

/* Компактный хедер на мобильных */
@media (max-width: 768px) {
    .sidebar-header {
        padding: 0.75rem 0.5rem !important;
    }

    .sidebar-header .email,
    .sidebar-header .role {
        font-size: 0.75rem !important;
        margin: 0 !important;
        opacity: 0.8;
    }

    .sidebar-header .full-name {
        font-size: 0.95rem !important;
        font-weight: 600;
        margin: 0.15rem 0 !important;
    }

    /* Компактные ссылки */
    .sidebar-nav .nav-link {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.9rem;
    }

    .sidebar-nav .nav-link svg {
        width: 1rem !important;
        font-size: 0.9rem;
    }

    /* Компактный подвал */
    .sidebar-footer {
        padding: 0.5rem !important;
    }

    .sidebar-footer .btn {
        padding: 0.4rem 0.6rem !important;
        font-size: 0.8rem !important;
        margin-bottom: 0.25rem;
    }

    /* Бургер-кнопка меньше */
    #sidebarToggle {
        padding: 8px 12px !important;
        top: 25% !important;
        font-size: 0.9rem;
    }
}

/* Sticky подвал на мобильных (чтобы кнопки всегда были видны) */
@media (max-width: 768px) {
    .sidebar-footer {
        position: sticky;
        bottom: 0;
        background: white;
        border-top: 1px solid #e9ecef;
        z-index: 10;
    }
}