.dashboard-container {
  padding: 0;
  background: transparent;
  min-height: auto;
}

.dashboard-selection {
  background: white;
  border-radius: 12px;
  padding: 30px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.selection-header {
  text-align: center;
  margin-bottom: 30px;
}

.selection-header i {
  font-size: 48px;
  color: #B31B1F;
  margin-bottom: 15px;
}

.selection-header h2 {
  color: #2c3e50;
  margin: 15px 0 10px;
  font-size: 24px;
  font-weight: 600;
}

.selection-header p {
  color: #7f8c8d;
  font-size: 14px;
}

.vehicle-selection-panel {
  display: grid;
  grid-template-columns: 300px 1fr;
  gap: 30px;
  margin-top: 30px;
}

.group-filter {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 20px;
}

.group-filter label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: #2c3e50;
  margin-bottom: 15px;
  font-size: 14px;
}

.group-search input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
}

.groups-list {
  margin-top: 15px;
  max-height: 500px;
  overflow-y: auto;
}

.group-item {
  width: 100%;
  padding: 12px 15px;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 6px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  text-align: left;
}

.group-item i {
  color: #7f8c8d;
}

.group-item:hover {
  background: #ecf0f1;
  border-color: #B31B1F;
}

.group-item.selected {
  background: #B31B1F;
  color: white;
  border-color: #B31B1F;
}

.group-item.selected i {
  color: white;
}

.group-item .vehicle-count {
  margin-left: auto;
  background: rgba(0,0,0,0.1);
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
}

.vehicles-filter {
  background: white;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  overflow: hidden;
}

.vehicle-actions {
  padding: 20px;
  border-bottom: 1px solid #e1e8ed;
}

.vehicle-actions input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 14px;
}

.action-buttons {
  display: flex;
  gap: 10px;
}

.action-buttons button {
  flex: 1;
  padding: 8px 15px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-select-all {
  background: #27ae60;
  color: white;
}

.btn-select-all:hover {
  background: #229954;
}

.btn-deselect-all {
  background: #e74c3c;
  color: white;
}

.btn-deselect-all:hover {
  background: #c0392b;
}

.vehicles-list {
  max-height: 400px;
  overflow-y: auto;
  padding: 10px 20px;
}

.vehicle-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 2px solid #ecf0f1;
  border-radius: 8px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.2s;
}

.vehicle-item:hover {
  background: #f8f9fa;
  border-color: #B31B1F;
}

.vehicle-item.selected {
  background: #fce4e5;
  border-color: #B31B1F;
}

.vehicle-checkbox {
  width: 20px;
  height: 20px;
  border: 2px solid #bdc3c7;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.vehicle-item.selected .vehicle-checkbox {
  background: #B31B1F;
  border-color: #B31B1F;
  color: white;
}

.vehicle-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.vehicle-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.vehicle-id {
  font-size: 12px;
  color: #7f8c8d;
}

.selection-footer {
  padding: 20px;
  border-top: 1px solid #e1e8ed;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8f9fa;
}

.selection-count {
  color: #2c3e50;
  margin: 0;
}

.btn-generate-dashboard {
  padding: 12px 24px;
  background: #B31B1F;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s;
}

.btn-generate-dashboard:hover {
  background: #8e1519;
}

.btn-generate-dashboard:disabled {
  background: #bdc3c7;
  cursor: not-allowed;
}

.dashboard-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.loading-spinner {
  text-align: center;
}

.loading-spinner i {
  font-size: 48px;
  color: #B31B1F;
  margin-bottom: 20px;
}

.loading-spinner p {
  color: #7f8c8d;
  font-size: 16px;
}

.dashboard-stats {
  animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/*.dashboard-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}*/

.dashboard-header h2 {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #2c3e50;
  margin: 0;
  font-size: 24px;
  font-weight: 600;
}

.dashboard-header h2 i {
  color: #B31B1F;
}

.btn-change-selection {
  padding: 10px 20px;
  background: #95a5a6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  transition: all 0.2s;
}

.btn-change-selection:hover {
  background: #7f8c8d;
}

.kpi-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.kpi-card {
  background: white;
  border-radius: 12px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  transition: transform 0.2s;
}

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

.kpi-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  flex-shrink: 0;
}

.kpi-vehicles .kpi-icon {
  background: #fce4e5;
  color: #B31B1F;
}

.kpi-pannes .kpi-icon {
  background: #fff3e0;
  color: #ff9800;
}

.kpi-reparations .kpi-icon {
  background: #f3e5f5;
  color: #9c27b0;
}

.kpi-maintenance .kpi-icon {
  background: #ffebee;
  color: #f44336;
}

.kpi-cout .kpi-icon {
  background: #e8f5e9;
  color: #4caf50;
}

.kpi-content {
  flex: 1;
}

.kpi-content h3 {
  margin: 0 0 8px;
  font-size: 14px;
  color: #7f8c8d;
  font-weight: 500;
}

.kpi-value {
  margin: 0 0 4px;
  font-size: 28px;
  font-weight: 700;
  color: #2c3e50;
}

.kpi-label {
  font-size: 12px;
  color: #95a5a6;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: 20px;
}

.dashboard-section {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.chart-section {
  grid-column: span 2;
}

@media (max-width: 1400px) {
  .chart-section {
    grid-column: span 1;
  }
}

/*.section-header {
  padding: 20px;
  border-bottom: 1px solid #e1e8ed;
  background: #f8f9fa;
}*/

.section-header h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header h3 i {
  color: #B31B1F;
}

.section-content {
  padding: 20px;
}

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #95a5a6;
}

.pannes-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panne-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #B31B1F;
}

.panne-status {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.status-info {
  background: #e3f2fd;
  color: #2196f3;
}

.status-warning {
  background: #fff3e0;
  color: #ff9800;
}

.status-success {
  background: #e8f5e9;
  color: #4caf50;
}

.panne-details {
  flex: 1;
}

.panne-details strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 4px;
  font-size: 14px;
}

.panne-details p {
  margin: 0 0 4px;
  color: #7f8c8d;
  font-size: 13px;
}

.panne-date {
  font-size: 12px;
  color: #95a5a6;
}

.top-vehicles-list {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.vehicle-stat {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.vehicle-name {
  font-weight: 600;
  color: #2c3e50;
  font-size: 14px;
}

.vehicle-count-bar {
  position: relative;
  height: 32px;
  background: #ecf0f1;
  border-radius: 6px;
  overflow: hidden;
}

.count-bar {
  height: 100%;
  background: linear-gradient(90deg, #B31B1F 0%, #8e1519 100%);
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  padding: 0 10px;
}

.count-label {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  color: #2c3e50;
  font-weight: 600;
  font-size: 13px;
}

.pieces-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.piece-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #e74c3c;
}

.piece-icon {
  width: 32px;
  height: 32px;
  background: #ffebee;
  color: #e74c3c;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.piece-details {
  flex: 1;
}

.piece-details strong {
  display: block;
  color: #2c3e50;
  margin-bottom: 4px;
  font-size: 14px;
}

.piece-details p {
  margin: 0 0 4px;
  color: #7f8c8d;
  font-size: 13px;
}

.stock-warning {
  display: inline-block;
  padding: 3px 8px;
  background: #ffebee;
  color: #e74c3c;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
}

.chart-canvas {
  width: 100%;
  max-height: 300px;
}

@media (max-width: 1024px) {
  .vehicle-selection-panel {
    grid-template-columns: 1fr;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .chart-section {
    grid-column: span 1;
  }
}

@media (max-width: 768px) {
  .kpi-cards {
    grid-template-columns: 1fr;
  }

  .dashboard-header {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }
}

.filter-controls {
  margin-bottom: 24px;
  display: flex;
  justify-content: flex-start;
}

.btn-edit-selection {
  padding: 12px 24px;
  background: #B31B1F;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(179, 27, 31, 0.2);
}

.btn-edit-selection:hover {
  background: #9a1619;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(179, 27, 31, 0.3);
}

.btn-edit-selection i {
  font-size: 16px;
}

.filters-container {
  background: white;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 24px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid #e1e8ed;
}

.btn-cancel {
  padding: 10px 24px;
  background: white;
  color: #7f8c8d;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
}

.btn-cancel:hover {
  background: #f8f9fa;
  border-color: #7f8c8d;
  color: #2c3e50;
}

.btn-apply {
  padding: 10px 24px;
  background: #27ae60;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 2px 4px rgba(39, 174, 96, 0.2);
}

.btn-apply:hover {
  background: #229954;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(39, 174, 96, 0.3);
}

.btn-apply:disabled {
  background: #95a5a6;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.btn-apply i,
.btn-cancel i {
  font-size: 14px;
}

.period-selection {
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid #e1e8ed;
}

.period-selection .section-header {
  margin-bottom: 16px;
}

.period-selection .section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
}

.period-selection .section-title i {
  color: #B31B1F;
  font-size: 18px;
}

.period-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.date-range-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #f8f9fa;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  transition: all 0.2s;
}

.date-range-wrapper:hover {
  border-color: #B31B1F;
  background: white;
}

.date-range-wrapper i {
  color: #B31B1F;
  font-size: 16px;
}

.date-range-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 14px;
  font-weight: 500;
  color: #2c3e50;
  cursor: pointer;
  padding: 0;
}

.date-range-input:focus {
  outline: none;
  box-shadow: none;
}

.period-info {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px;
  background: #e8f4fd;
  border-radius: 6px;
  border-left: 3px solid #3498db;
}

.period-info i {
  color: #3498db;
  font-size: 14px;
  flex-shrink: 0;
}

.period-info span {
  font-size: 13px;
  color: #2c3e50;
  line-height: 1.4;
}

.period-selection-global {
  margin-bottom: 20px;
  background: white;
  border: 1px solid #e1e8ed;
  border-radius: 12px;
  padding: 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.period-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.period-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  font-weight: 600;
  color: #2c3e50;
  margin: 0;
  white-space: nowrap;
}

.period-title i {
  color: #B31B1F;
  font-size: 18px;
}

.period-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  justify-content: flex-end;
}

.date-range-wrapper-global {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f8f9fa;
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid #e1e8ed;
  transition: all 0.2s;
  min-width: 280px;
}

.date-range-wrapper-global:hover {
  border-color: #B31B1F;
  background: white;
}

.date-range-wrapper-global i {
  color: #B31B1F;
  font-size: 16px;
}

.btn-apply-period {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: linear-gradient(135deg, #B31B1F 0%, #8B1519 100%);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s;
  white-space: nowrap;
}

.btn-apply-period:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(179, 27, 31, 0.3);
}

.btn-apply-period:active {
  transform: translateY(0);
}

.btn-apply-period i {
  font-size: 14px;
}

@media (max-width: 768px) {
  .period-header {
    flex-direction: column;
    align-items: stretch;
  }

  .period-actions {
    flex-direction: column;
    width: 100%;
  }

  .date-range-wrapper-global {
    width: 100%;
    min-width: 0;
  }

  .btn-apply-period {
    width: 100%;
    justify-content: center;
  }
}
