/* Исправление ширины и z-index для селектов в шапке диаграммы */
#gantt-section .section-actions select {
  min-width: 220px;
}

/* Модалка поверх всего */
#ganttModal.modal {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#ganttModal .modal-content { background: #fff; border-radius: 8px; }

/* Повышаем z-index внутренних выпадающих списков, чтобы не перекрывались канвой */
.gantt_cal_light, .gantt_combo, .gantt_select, .select2-container { z-index: 1100 !important; }
/* Стили для дашборда службы строительного контроля */

/* Основные переменные */
:root {
  --primary-color: #007bff;
  --secondary-color: #6c757d;
  --success-color: #28a745;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #17a2b8;
  --light-color: #f8f9fa;
  --dark-color: #343a40;
  
  --sidebar-width: 250px;
  --header-height: 60px;
  --border-radius: 8px;
  --box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  --transition: all 0.3s ease;
}

/* Общие стили */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  background-color: var(--light-color);
  color: var(--dark-color);
  line-height: 1.6;
}

/* Заголовок */
.dashboard-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: white;
  border-bottom: 1px solid #dee2e6;
  z-index: 1000;
  box-shadow: var(--box-shadow);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 100%;
  padding: 0 20px;
}

.header-left h1 {
  font-size: 1.5rem;
  color: var(--primary-color);
  margin-bottom: 4px;
}

/* Улучшение мобильной типографики и переносов */
@media (max-width: 420px) {
  .header-left h1 {
    font-size: 1.125rem;
    line-height: 1.2;
    word-break: break-word;
  }
  .section-header h2 {
    font-size: 1.125rem;
    line-height: 1.2;
    word-break: break-word;
  }
  .stat-card .stat-number {
    font-size: 1.75rem;
  }
  .stat-card .stat-label {
    font-size: 0.9rem;
    line-height: 1.2;
    word-break: break-word;
  }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
}

.role-badge {
  background: var(--primary-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
}

.header-right {
  display: flex;
  gap: 10px;
}

#backToObjectsBtn {
  background: var(--secondary-color);
  color: white;
  border: none;
  padding: 8px 12px;
  border-radius: var(--border-radius);
  cursor: pointer;
  font-size: 1rem;
  transition: var(--transition);
}

#backToObjectsBtn:hover {
  background: #545b62;
  transform: translateY(-1px);
}

/* Основной контент */
.dashboard-main {
  display: flex;
  margin-top: var(--header-height);
  min-height: calc(100vh - var(--header-height));
}

/* Боковая панель */
.dashboard-sidebar {
  width: var(--sidebar-width);
  background: white;
  border-right: 1px solid #dee2e6;
  position: fixed;
  height: calc(100vh - var(--header-height));
  overflow-y: auto;
}

.sidebar-nav ul {
  list-style: none;
  padding: 20px 0;
}

.sidebar-nav li {
  margin: 0;
}

.nav-link {
  display: block;
  padding: 12px 20px;
  color: var(--dark-color);
  text-decoration: none;
  transition: var(--transition);
  border-left: 3px solid transparent;
}

.nav-link:hover {
  background-color: var(--light-color);
  border-left-color: var(--primary-color);
}

.nav-link.active {
  background-color: var(--primary-color);
  color: white;
  border-left-color: var(--primary-color);
}

/* Контентная область */
.dashboard-content {
  flex: 1;
  margin-left: var(--sidebar-width);
  padding: 20px;
  overflow-y: auto;
}

.content-section {
  display: none;
}

.content-section.active {
  display: block;
}

/* Заголовки секций */
.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--primary-color);
}

.section-header h2 {
  color: var(--primary-color);
  font-size: 1.8rem;
}

.section-actions {
  display: flex;
  gap: 10px;
}

/* Статистические карточки */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  display: flex;
  align-items: center;
  gap: 15px;
  transition: var(--transition);
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.stat-icon {
  font-size: 2.5rem;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-color);
  border-radius: 50%;
}

.stat-content {
  flex: 1;
}

.stat-number {
  font-size: 2rem;
  font-weight: bold;
  color: var(--primary-color);
  margin-bottom: 5px;
}

.stat-label {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* Быстрые действия */
.quick-actions {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  margin-bottom: 30px;
}

.quick-actions h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.actions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
}

.action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 15px;
  background: var(--light-color);
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  cursor: pointer;
  transition: var(--transition);
  text-align: left;
}

.action-btn:hover {
  background: var(--primary-color);
  color: white;
  transform: translateY(-2px);
}

.action-icon {
  font-size: 1.5rem;
}

.action-text {
  font-weight: 500;
}

/* Последние активности */
.recent-activities {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.recent-activities h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.activities-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px;
  background: var(--light-color);
  border-radius: var(--border-radius);
}

.activity-icon {
  font-size: 1.2rem;
}

.activity-text {
  flex: 1;
}

.activity-time {
  color: var(--secondary-color);
  font-size: 0.9rem;
}

/* Фильтры */
.filters {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.filters select,
.filters input {
  padding: 8px 12px;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
}

.filters input {
  flex: 1;
  min-width: 200px;
}

/* Списки */
.objects-list,
.violations-list,
.works-list {
  display: grid;
  gap: 15px;
}

/* Карточки объектов */
.object-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

/* Сетка карточек объектов: 3 в ряд на десктопе */
.objects-list { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
.violations-list { grid-template-columns: repeat(3, minmax(280px, 1fr)); }
.works-list { grid-template-columns: repeat(3, minmax(280px, 1fr)); }

@media (max-width: 1200px) {
  .objects-list { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .violations-list { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
  .works-list { grid-template-columns: repeat(2, minmax(260px, 1fr)); }
}

@media (max-width: 700px) {
  .objects-list { grid-template-columns: 1fr; }
  .violations-list { grid-template-columns: 1fr; }
  .works-list { grid-template-columns: 1fr; }
}

.object-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.object-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 15px;
}

.object-title {
  font-size: 1.2rem;
  font-weight: bold;
  color: var(--primary-color);
}

.object-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.object-status.planned { background: var(--warning-color); color: white; }
.object-status.active { background: var(--success-color); color: white; }
.object-status.completed { background: var(--secondary-color); color: white; }
.object-status.paused { background: var(--info-color); color: white; }

.object-progress {
  margin-bottom: 15px;
}

.progress-bar {
  width: 100%;
  height: 8px;
  background: #e9ecef;
  border-radius: 4px;
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  background: var(--primary-color);
  transition: width 0.3s ease;
}

.progress-text {
  font-size: 0.9rem;
  color: var(--secondary-color);
  margin-top: 5px;
}

.object-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.object-actions {
  display: flex;
  gap: 10px;
}

/* Карточки нарушений */
.violation-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  border-left: 4px solid var(--warning-color);
  transition: var(--transition);
}

/* Окантовка по статусу для обогащенных карточек */
.violation-card.enriched.status-resolved {
  border-left: 4px solid var(--success-color) !important;
  border-right: 4px solid #28a745 !important;
}

.violation-card.enriched.status-open {
  border-left: 4px solid var(--warning-color) !important;
  border-right: 4px solid #ffc107 !important;
}

.violation-card.enriched.status-overdue {
  border-left: 4px solid var(--danger-color) !important;
  border-right: 4px solid #dc3545 !important;
}

.violation-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.violation-card.critical { border-left-color: var(--danger-color); }
.violation-card.high { border-left-color: var(--warning-color); }
.violation-card.medium { border-left-color: var(--info-color); }
.violation-card.low { border-left-color: var(--success-color); }

.violation-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.violation-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--dark-color);
}

.violation-severity {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.violation-severity.critical { background: var(--danger-color); color: white; }
.violation-severity.high { background: var(--warning-color); color: white; }
.violation-severity.medium { background: var(--info-color); color: white; }
.violation-severity.low { background: var(--success-color); color: white; }

.violation-description {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.violation-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.violation-actions {
  display: flex;
  gap: 10px;
}

/* Карточки работ */
.work-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
  transition: var(--transition);
}

.work-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.work-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 10px;
}

.work-title {
  font-size: 1.1rem;
  font-weight: bold;
  color: var(--primary-color);
}

.work-status {
  padding: 4px 8px;
  border-radius: 12px;
  font-size: 0.8rem;
  font-weight: 500;
}

.work-status.completed { background: var(--success-color); color: white; }
.work-status.pending { background: var(--warning-color); color: white; }
.work-status.verified { background: var(--info-color); color: white; }
.work-status.rejected { background: var(--danger-color); color: white; }

.work-description {
  color: var(--secondary-color);
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.work-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.work-actions {
  display: flex;
  gap: 10px;
}

/* Карта */
.map-container {
  height: 500px;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--box-shadow);
}

/* Отчеты */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 20px;
}

.report-card {
  background: white;
  padding: 20px;
  border-radius: var(--border-radius);
  box-shadow: var(--box-shadow);
}

.report-card h3 {
  margin-bottom: 15px;
  color: var(--primary-color);
}

.chart-container {
  height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--light-color);
  border-radius: var(--border-radius);
  color: var(--secondary-color);
}

/* Модальные окна */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  align-items: center;
  justify-content: center;
}

.modal-content {
  background: white;
  border-radius: var(--border-radius);
  max-width: 720px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
}

.modal-header h2 {
  color: var(--primary-color);
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  color: var(--secondary-color);
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.close-btn:hover {
  color: var(--danger-color);
}

.modal-body {
  padding: 20px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 20px;
  border-top: 1px solid #dee2e6;
}

/* Формы */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #dee2e6;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

/* Кнопки */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: var(--border-radius);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.btn-primary {
  background: var(--primary-color);
  color: white;
}

.btn-primary:hover {
  background: #0056b3;
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--secondary-color);
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
  transform: translateY(-1px);
}

.btn-success {
  background: var(--success-color);
  color: white;
}

.btn-success:hover {
  background: #1e7e34;
  transform: translateY(-1px);
}

.btn-danger {
  background: var(--danger-color);
  color: white;
}

.btn-danger:hover {
  background: #c82333;
  transform: translateY(-1px);
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

/* Уведомления */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: var(--border-radius);
  color: white;
  font-weight: bold;
  z-index: 3000;
  animation: slideIn 0.3s ease-out;
}

.notification-success { background: var(--success-color); }
.notification-error { background: var(--danger-color); }
.notification-warning { background: var(--warning-color); }
.notification-info { background: var(--info-color); }

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

/* Адаптивность */
@media (max-width: 768px) {
  .dashboard-sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
  }
  
  .dashboard-sidebar.open {
    transform: translateX(0);
  }
  
  .dashboard-content {
    margin-left: 0;
  }
  
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  .actions-grid {
    grid-template-columns: 1fr;
  }
  
  .filters {
    flex-direction: column;
  }
  
  .modal-content {
    width: 95%;
    margin: 20px;
  }
}

/* Темная тема */
[data-theme="dark"] {
  --light-color: #2d3748;
  --dark-color: #e2e8f0;
  --secondary-color: #a0aec0;
}

[data-theme="dark"] body {
  background-color: #1a202c;
  color: var(--dark-color);
}

[data-theme="dark"] .dashboard-header,
[data-theme="dark"] .dashboard-sidebar,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .quick-actions,
[data-theme="dark"] .recent-activities,
[data-theme="dark"] .object-card,
[data-theme="dark"] .violation-card,
[data-theme="dark"] .work-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .modal-content {
  background: var(--light-color);
  color: var(--dark-color);
}

[data-theme="dark"] .filters {
  background: var(--light-color);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group select,
[data-theme="dark"] .form-group textarea {
  background: #4a5568;
  border-color: #718096;
  color: var(--dark-color);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group select:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: var(--primary-color);
}

/* Стили для обогащенных карточек нарушений */
.violation-card.enriched {
  position: relative;
  border-left-width: 6px;
}

.violation-card.enriched .violation-object-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e9ecef;
}

.violation-card.enriched .violation-type-badge {
  display: inline-block;
  background: var(--info-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-right: 8px;
}

.violation-card.enriched .violation-category {
  display: inline-block;
  background: var(--warning-color);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: 4px;
}

.violation-card.enriched .violation-work-info {
  background: #f8f9fa;
  padding: 12px;
  border-radius: 6px;
  margin: 10px 0;
  border-left: 3px solid var(--primary-color);
}

.violation-card.enriched .work-name,
.violation-card.enriched .work-type {
  margin: 4px 0;
  font-size: 0.9rem;
}

.violation-card.enriched .violation-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 12px 0;
}

.violation-card.enriched .meta-item {
  font-size: 0.85rem;
  padding: 4px 0;
}

.violation-card.enriched .meta-item.time-info.overdue {
  color: var(--danger-color);
  font-weight: bold;
}

.violation-card.enriched .meta-item.location-info {
  grid-column: 1 / -1;
  font-size: 0.8rem;
  color: var(--secondary-color);
}

/* Отключаем старые индикаторы приоритета - теперь используем стили статуса */
.violation-card.enriched .violation-priority-indicator {
  display: none;
}

/* Стили для модального окна работ объекта */
.modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0,0,0,0.5);
}

.modal-content {
  background-color: white;
  margin: 5% auto;
  padding: 0;
  border-radius: var(--border-radius);
  width: 80%;
  max-width: 600px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.modal-header {
  padding: 20px;
  border-bottom: 1px solid #dee2e6;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-header h3 {
  margin: 0;
  color: var(--dark-color);
}

.modal-header .close {
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  color: var(--secondary-color);
}

.modal-header .close:hover {
  color: var(--dark-color);
}

.modal-body {
  padding: 20px;
}

/* Темная тема для обогащенных карточек */
[data-theme="dark"] .violation-card.enriched .violation-work-info {
  background: #2d3748;
  border-left-color: #4299e1;
}

[data-theme="dark"] .violation-card.enriched .violation-object-title {
  color: #4299e1;
  border-bottom-color: #4a5568;
}

/* Темная тема для окантовки по статусу */
[data-theme="dark"] .violation-card.enriched.status-resolved {
  border-left-color: #48bb78 !important;
  border-right-color: #38a169 !important;
}

/* ChatModal стили */
.chat-modal-header {
  background: #1f2937;
  color: #fff;
}

.chat-modal-body {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 16px;
}

.chat-tabs {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-tab {
  padding: 12px;
  border-radius: 8px;
  background: var(--primary-color);
  color: #fff;
  border: none;
  cursor: pointer;
}

.chat-tab.active {
  background: #0b5ed7;
}

.chat-messages {
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 12px;
  height: 360px;
  overflow-y: auto;
}

.chat-empty {
  color: var(--secondary-color);
}

.chat-message {
  padding: 8px 10px;
  border-bottom: 1px solid #f1f5f9;
}

.chat-message .meta {
  font-size: 12px;
  color: var(--secondary-color);
  margin-bottom: 4px;
}

.chat-message .text {
  font-size: 14px;
}

.chat-compose {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
}

.chat-input {
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  padding: 10px 12px;
}

@media (max-width: 768px) {
  .chat-modal-body {
    grid-template-columns: 1fr;
  }
}

[data-theme="dark"] .violation-card.enriched.status-open {
  border-left-color: #f6e05e !important;
  border-right-color: #d69e2e !important;
}

[data-theme="dark"] .violation-card.enriched.status-overdue {
  border-left-color: #f56565 !important;
  border-right-color: #e53e3e !important;
}

[data-theme="dark"] .modal-content {
  background: var(--dark-color);
  color: var(--light-color);
}

[data-theme="dark"] .modal-header {
  border-bottom-color: #4a5568;
}

/* Стили для модального окна редактирования нарушения */
.edit-violation-modal {
  max-width: 600px;
  width: 90%;
}

.violation-info-section,
.edit-fields-section,
.geolocation-section {
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--primary-color);
}

.violation-info-section h4,
.edit-fields-section h4,
.geolocation-section h4 {
  margin: 0 0 15px 0;
  color: var(--primary-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.info-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 8px 0;
  border-bottom: 1px solid #e0e0e0;
}

.info-item:last-child {
  border-bottom: none;
}

.info-item label {
  font-weight: 500;
  color: var(--secondary-color);
  margin-right: 15px;
}

.info-value {
  font-weight: 600;
  color: var(--dark-color);
  text-align: right;
  flex: 1;
}

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

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 500;
  color: var(--dark-color);
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 10px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 0.95rem;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 80px;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  cursor: pointer;
  font-weight: 500;
  line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin-right: 10px;
  margin-top: 2px;
}

.geolocation-info {
  margin-top: 8px;
  padding: 8px 12px;
  background: #e3f2fd;
  border-radius: 4px;
  border-left: 3px solid var(--info-color);
}

.geolocation-info small {
  color: var(--info-color);
  font-weight: 500;
}

.current-location {
  margin-top: 15px;
  padding: 12px;
  background: #e8f5e8;
  border-radius: 6px;
  border-left: 3px solid var(--success-color);
}

.current-location label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: var(--success-color);
}

.location-coords {
  font-family: 'Courier New', monospace;
  font-size: 0.9rem;
  color: var(--dark-color);
  font-weight: 600;
}

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

.modal-actions .btn {
  min-width: 120px;
}

/* Темная тема для модального окна редактирования */
[data-theme="dark"] .violation-info-section,
[data-theme="dark"] .edit-fields-section,
[data-theme="dark"] .geolocation-section {
  background: #2d3748;
  border-left-color: #4299e1;
}

[data-theme="dark"] .info-item {
  border-bottom-color: #4a5568;
}

[data-theme="dark"] .info-item label {
  color: #a0aec0;
}

[data-theme="dark"] .info-value {
  color: var(--light-color);
}

[data-theme="dark"] .form-group label {
  color: var(--light-color);
}

[data-theme="dark"] .form-group input,
[data-theme="dark"] .form-group textarea {
  background: #4a5568;
  border-color: #4a5568;
  color: var(--light-color);
}

[data-theme="dark"] .form-group input:focus,
[data-theme="dark"] .form-group textarea:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

[data-theme="dark"] .geolocation-info {
  background: #2a4365;
  border-left-color: #3182ce;
}

[data-theme="dark"] .geolocation-info small {
  color: #90cdf4;
}

[data-theme="dark"] .current-location {
  background: #2f855a;
  border-left-color: #38a169;
}

[data-theme="dark"] .current-location label {
  color: #68d391;
}

[data-theme="dark"] .location-coords {
  color: var(--light-color);
}

[data-theme="dark"] .modal-actions {
  border-top-color: #4a5568;
}

/* Стили для выпадающего списка статусов */
.status-dropdown {
  display: inline-block;
  margin-left: 8px;
}

.status-select {
  padding: 6px 12px;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  background: white;
  color: var(--dark-color);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 180px;
}

.status-select:hover {
  border-color: var(--primary-color);
}

.status-select:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

.status-select option {
  padding: 8px 12px;
  background: white;
  color: var(--dark-color);
}

.status-select option:disabled {
  color: #999;
  background: #f5f5f5;
}

/* Темная тема для выпадающего списка */
[data-theme="dark"] .status-select {
  background: #4a5568;
  border-color: #4a5568;
  color: var(--light-color);
}

[data-theme="dark"] .status-select:hover {
  border-color: #4299e1;
}

[data-theme="dark"] .status-select:focus {
  border-color: #4299e1;
  box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.1);
}

[data-theme="dark"] .status-select option {
  background: #4a5568;
  color: var(--light-color);
}

[data-theme="dark"] .status-select option:disabled {
  color: #666;
  background: #2d3748;
}

/* Стили для модального окна изменения статуса */
.status-change-modal {
  max-width: 500px;
  width: 90%;
}

.status-selection-section {
  margin-bottom: 25px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid var(--success-color);
}

.status-selection-section h4 {
  margin: 0 0 15px 0;
  color: var(--success-color);
  font-size: 1.1rem;
  font-weight: 600;
}

.status-current {
  font-weight: bold;
  color: var(--primary-color);
  text-transform: uppercase;
}

/* Темная тема для модального окна изменения статуса */
[data-theme="dark"] .status-selection-section {
  background: #2d3748;
  border-left-color: #38a169;
}

[data-theme="dark"] .status-selection-section h4 {
  color: #68d391;
}

[data-theme="dark"] .status-current {
  color: #4299e1;
}

/* Стили для ролей пользователей в чате */
.user-role {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 3px;
  font-size: 11px;
  font-weight: bold;
  margin-left: 8px;
  text-transform: uppercase;
}

.user-role.system {
  background: #6c757d;
  color: white;
}

.user-role.admin {
  background: #dc3545;
  color: white;
}

.user-role.customer_control {
  background: #007bff;
  color: white;
}

.user-role.foreman {
  background: #28a745;
  color: white;
}

.user-role.control_inspector {
  background: #ffc107;
  color: #212529;
}

.user-role.user {
  background: #e9ecef;
  color: #495057;
}

/* Темная тема для ролей пользователей */
[data-theme="dark"] .user-role.system {
  background: #6c757d;
  color: white;
}

[data-theme="dark"] .user-role.admin {
  background: #dc3545;
  color: white;
}

[data-theme="dark"] .user-role.customer_control {
  background: #007bff;
  color: white;
}

[data-theme="dark"] .user-role.foreman {
  background: #28a745;
  color: white;
}

[data-theme="dark"] .user-role.control_inspector {
  background: #ffc107;
  color: #212529;
}

[data-theme="dark"] .user-role.user {
  background: #495057;
  color: #e9ecef;
}

