/* Общие стили */
body {
    background-color: #f8f9fa;
}

/* Стили для навигации */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    position: sticky;
    top: 0;
    z-index: 1100;
}

/* Стили для аватара */
.nav-link img.rounded-circle {
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,.2);
}

.dropdown-toggle::after {
    margin-left: 0.5rem;
}

#userDropdown {
    cursor: pointer;
}

#userDropdown .dropdown-menu {
    min-width: 200px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
}

#userDropdown .dropdown-item {
    padding: 0.5rem 1rem;
}

#userDropdown .dropdown-item:hover {
    background-color: #f8f9fa;
}

#userDropdown .dropdown-divider {
    margin: 0.5rem 0;
}

/* Стили для форм */
.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

/* Стили для карточек */
.card {
    box-shadow: 0 2px 4px rgba(0,0,0,.1);
    border: none;
}

/* Стили для списков */
.list-group-item {
    border: 1px solid rgba(0,0,0,.125);
    margin-bottom: 0.5rem;
    border-radius: 0.25rem;
}

/* Стили для кнопок */
.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Стили для toast-уведомлений */
.toast-container {
    z-index: 1060;
}

.toast {
    min-width: 300px;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.15);
    margin: 0.5rem;
    opacity: 1;
    transition: all 0.3s ease;
}

.toast.success {
    border-left: 4px solid #198754;
}

.toast.error {
    border-left: 4px solid #dc3545;
}

.toast.warning {
    border-left: 4px solid #ffc107;
}

.toast.info {
    border-left: 4px solid #0dcaf0;
}

.toast .toast-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    padding: 0.75rem 1rem;
}

.toast .toast-body {
    padding: 0.75rem 1rem;
    color: #212529;
}

.toast .btn-close {
    padding: 0.5rem;
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.8;
    transition: opacity 0.15s ease;
}

.toast .btn-close:hover {
    opacity: 1;
}

/* Анимация для тостов */
@keyframes toast-in-right {
    from {
        transform: translateX(100%);
    }
    to {
        transform: translateX(0);
    }
}

.toast.showing {
    animation: toast-in-right 0.3s ease-in-out;
}

.toast.hide {
    animation: toast-in-right 0.3s ease-in-out reverse;
}

/* Стили для таблиц */
.table {
    background-color: #fff;
    border-radius: 0.5rem;
    overflow: hidden;
}

.table th {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
    padding: 0.5rem;
}

.table td {
    padding: 0.5rem;
    vertical-align: middle;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

/* Стили для модальных окон */
.modal-content {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    padding: 1rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    padding: 1rem;
}

.modal.show .modal-dialog {
    margin-top: 4.5rem;
}

@media (max-width: 576px) {
    .modal.show .modal-dialog {
        margin-top: 4rem;
    }
}

/* Адаптивные стили */
@media (max-width: 768px) {
    .container {
        padding: 1rem;
    }
    
    .table-responsive {
        border-radius: 0.5rem;
    }
    
    .modal-dialog {
        margin: 0.5rem;
    }
    
    .toast {
        min-width: auto;
        width: calc(100vw - 2rem);
    }
}

/* Стили для доступности */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 2px solid #0d6efd;
    outline-offset: 2px;
}

/* Стили для раскрывающейся формы поиска */
.card-header[onclick] {
    cursor: pointer;
    transition: background-color 0.2s;
}

.card-header[onclick]:hover {
    background-color: rgba(0, 0, 0, 0.03);
}

#searchFormIcon {
    transition: transform 0.3s;
}

/* Стили для кликабельных телефонов */
a[href^="tel:"] {
    color: #0d6efd;
    text-decoration: none;
}

a[href^="tel:"]:hover {
    text-decoration: underline;
}

/* Стили для комментариев */
.comment-section {
    margin-top: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.comment-text {
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    background-color: white;
    border-radius: 0.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Стили для графиков в отчетах */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Стили для детальной статистики */
.detailed-stats th {
    background-color: #f8f9fa;
}

.detailed-stats td {
    vertical-align: middle;
}

/* Стили для валидации Terminal ID */
input[name="terminalId"]:invalid {
    border-color: #dc3545;
}

input[name="terminalId"]:valid {
    border-color: #198754;
}

/* Стили для интерфейса супервайзера */
.supervisor-actions {
    display: flex;
    gap: 0.5rem;
}

/* Стили для фильтров */
.filter-section {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.25rem;
}

.filter-section .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

/* Стили для таблиц */
.table-responsive {
    margin-bottom: 1rem;
}

.table th {
    font-weight: 600;
    background-color: #f8f9fa;
}

/* Стили для карточек */
.card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
}

/* Стили для навигации */
.nav-tabs .nav-link {
    color: #6c757d;
}

.nav-tabs .nav-link.active {
    color: #0d6efd;
    font-weight: 500;
}

.nav-pills .nav-link {
    color: #6c757d;
}

.nav-pills .nav-link.active {
    background-color: #0d6efd;
    color: white;
}

/* Стили для аватаров */
.avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    object-fit: cover;
}

/* Стили для иконок */
.icon-button {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
    line-height: 1.5;
    border-radius: 0.2rem;
}

.icon-button i {
    margin-right: 0.25rem;
}

/* Стили для уведомлений */
.alert {
    margin-bottom: 1rem;
    border: none;
    border-radius: 0.25rem;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

.alert-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    color: #055160;
}

/* Стили для загрузчиков */
.spinner-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
}

/* Стили для карт */
.map-container {
    height: 300px;
    width: 100%;
    border-radius: 0.25rem;
    overflow: hidden;
}

/* Стили для sidebar */
.wrapper {
    min-height: calc(100vh - 56px);
    position: relative;
}

.sidebar {
    width: 250px;
    min-height: calc(100vh - 56px);
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    position: fixed;
    top: 56px;
    left: 0;
    z-index: 1000;
    transition: transform 0.3s ease, width 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
}

#sidebarCollapseBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
}

.sidebar-title {
    font-weight: 600;
    color: #343a40;
}

.sidebar-nav {
    padding: 1rem 0;
}

.sidebar-nav .nav-link {
    padding: 0.75rem 1.5rem;
    color: #495057;
    text-decoration: none;
    display: flex;
    align-items: center;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-nav .nav-link:hover {
    background-color: #e9ecef;
    color: #0d6efd;
    border-left-color: #0d6efd;
}

.sidebar-nav .nav-link.active {
    background-color: #e7f1ff;
    color: #0d6efd;
    border-left-color: #0d6efd;
    font-weight: 500;
}

.sidebar-nav .nav-link i {
    width: 20px;
    margin-right: 0.75rem;
    text-align: center;
}

.main-content {
    margin-left: 0;
    padding: 1.5rem;
    transition: margin-left 0.3s ease;
}

.main-content.sidebar-open {
    margin-left: 250px;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
}

/* Адаптивность для sidebar */
@media (max-width: 991.98px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.show {
        transform: translateX(0);
    }

    .main-content {
        margin-left: 0 !important;
    }
}

@media (min-width: 992px) {
    .sidebar {
        transform: translateX(0);
    }

    .sidebar.collapsed {
        width: 80px;
    }

    .sidebar.collapsed .sidebar-header {
        justify-content: center;
       /* padding: 1rem; */
    }

    .sidebar.collapsed .sidebar-title {
        display: none;
    }

    .sidebar.collapsed .nav-link {
        padding: 0.75rem;
        justify-content: center;
    }

    .sidebar.collapsed .nav-link span {
        display: none;
    }

    .sidebar.collapsed .nav-link i {
        margin-right: 0;
    }

    .main-content {
        margin-left: 250px;
    }

    .main-content.sidebar-collapsed {
        margin-left: 80px;
    }
}

/* Стили для мобильных устройств */
@media (max-width: 768px) {
    .action-buttons {
        flex-direction: column;
    }

    .chart-container {
        height: 200px;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .main-content {
        padding: 1rem;
    }
} 

.table .missing-coordinates {
    --bs-table-bg: rgba(220, 53, 69, 0.2);
    --bs-table-striped-bg: rgba(220, 53, 69, 0.25);
    --bs-table-hover-bg: rgba(220, 53, 69, 0.3);
} 