
.order-analytics-dashboard {
  padding: 20px;
}

a.canvasjs-chart-credit {
  display: none !important;
}

.dashboard-header {
  margin-bottom: 30px;
}

.dashboard-header h2 {
  margin: 0;
  color: #333;
}

.deadline {
  color: #666;
  margin-top: 5px;
}

.timeline-container {
  margin-bottom: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.display-controls {
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

/* Toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked+.slider {
  background-color: #2196F3;
}

input:focus+.slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked+.slider:before {
  transform: translateX(26px);
}

.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

.toggle-label {
  color: #666;
  font-size: 14px;
}

.charts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

.chart-box {
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.chart-box h3 {
  margin-top: 0;
  margin-bottom: 15px;
  color: #333;
}

.chart-container {
  min-height: 200px;
  position: relative;
}

.lloading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: #666;
}

/* Timeline styles */
.timeline {
  position: relative;
  height: 40px;
  background: #f5f5f5;
  border-radius: 4px;
  margin-top: 15px;
  margin-bottom: 40px;
}

.timeline-progress {
  position: absolute;
  height: 100%;
  background: #4CAF50;
  border-radius: 4px;
  transition: width 0.3s ease;
}

.timeline-marker {
  position: absolute;
  top: -10px;
  width: 2px;
  height: 60px;
  background: #666;
}

.timeline-marker.start {
  left: 0;
}

.timeline-marker.current {
  background: #FF9800;
}

.timeline-marker.deadline {
  background: #F44336;
  right: 0;
}

.timeline-label {
  position: absolute;
  bottom: -25px;
  transform: translateX(-50%);
  font-size: 12px;
  color: #666;
  white-space: nowrap;
}

/* Statistics styles */
.statistics-container {
  margin-bottom: 40px;
  background: #fff;
  padding: 20px;
  border-radius: 4px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

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

.stat-box {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 4px;
  text-align: center;
}

.stat-title {
  font-size: 16px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.stat-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.stat-number {
  font-size: 24px;
  font-weight: bold;
  color: #2196F3;
}

.stat-label {
  font-size: 12px;
  color: #666;
}

/* Enhanced Statistics Section Styles */
.statistics-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: #fff;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  display: flex;
  align-items: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
  /* transform: translateY(-5px); */
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.stat-icon {
  font-size: 2.5rem;
  margin-right: 20px;
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #f8f9fa;
  color: #0d6efd;
}

.stat-content {
  flex-grow: 1;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 300;
  margin: 0.5rem 0;
}

.stat-label {
  color: #6c757d;
  font-size: 0.9rem;
  font-weight: 500;
}

.card .card-content .center-align i.medium {
  font-size: 3rem;
  margin-bottom: 0.5rem;
}

.card .card-content {
  padding: 24px;
  transition: all 0.3s ease;
}


/* Unique colors for different stats */
#unique-marks-container .stat-icon i {
  color: #0d6efd;
}

#total-marks-container .stat-icon i {
  color: #198754;
}

#unique-details-container .stat-icon i {
  color: #dc3545;
}

#total-details-container .stat-icon i {
  color: #6610f2;
}

.production-stage-card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  transition: all 0.2s ease;
  height: 100%;
  margin: 8px 0;
  border-radius: 12px;
  background: #fff;
}

.production-stage-card.loading {
  position: relative;
  opacity: 0.6;
}

.production-stage-card.loading::after {
  content: 'Загрузка...';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  font-weight: 600;
  color: #555;
  border-radius: 12px;
  z-index: 5;
}

.production-stage-card:hover {
  /* transform: translateY(-2px); */
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.production-stage-card .card-content {
  padding: 16px;
}

.stage-header {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
}
#main-screen-activity-log td{
  padding: 2px 5px !important;
}
#main-screen-daily-summary td{
  padding: 2px 5px !important;
}
.stage-header i {
  font-size: 1.6rem;
  margin-right: 12px;
  width: 32px;
  text-align: center;
}

.stage-header .card-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 500;
  line-height: 1.2;
}

html body .progress-section {
  margin: 12px 0;
  position: relative;
}

html body .progress {
  background-color: #eef2f5;
  height: 12px;
  border-radius: 6px;
  overflow: hidden;
  margin: 0;
}
html body.path-batch .progress {
    overflow: visible;
}
html body .main-screen-orders-table .progress{
  height: 3px;
}

html body .progress .determinate {
  transition: width 0.5s ease;
  border-radius: 6px;
}

html body .progress-text {
  position: absolute;
  right: 0;
  top: -18px;
  font-size: 0.9rem;
  font-weight: 600;
}

.stage-stats {
  margin-top: 12px;
}

.dashboard-container {
  padding: 20px;
}

.card {
  margin: 0.5rem 0;
}

.card .card-title {
  font-size: 1.2rem;
  margin-bottom: 15px;
}

html body .progress {
  margin: 10px 0;
}

.stage-stats {
  margin-top: 15px;
}

.stat-row {
  margin: 5px 0;
  font-size: 0.9rem;
  display: bloc;
  justify-content: space-between;
  align-items: center;
}

.stat-label {
  color: #666;
  margin-right: 10px;
}

.percentage {
  color: #999;
  margin-left: 5px;
}

.timeline-dates {
  margin: 20px 0;
}

.date-label {
  color: #666;
  font-size: 0.9rem;
}

.timeline-stats {
  margin: 20px 0;
}

.stat-block {
  padding: 10px;
  border-radius: 4px;
  background-color: #f5f5f5;
  margin: 5px 0;
}

.statistics-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.stat-item {
  margin: 10px;
}

.stat-card {
  background-color: #f5f5f5;
  padding: 15px;
  border-radius: 4px;
  display: flex;
  align-items: center;
}

.stat-icon {
  font-size: 2rem;
  margin-right: 10px;
}

.stat-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.stat-value {
  font-size: 1.5rem;
  font-weight: bold;
  margin-bottom: 5px;
}

.stat-label {
  font-size: 0.9rem;
  color: #666;
}

#timeline-chart {
  margin-top: 20px;
}

.btn i {
  vertical-align: middle;
}

.production-stage-card {
  margin: 0.5rem 0;
}

.stage-header {
  display: flex;
  align-items: center;
  margin-bottom: 15px;
}

.stage-header i {
  font-size: 1.5rem;
  margin-right: 10px;
}

html body .progress-section {
  margin-bottom: 15px;
}

html body .progress-text {
  font-size: 0.9rem;
  color: #666;
  margin-left: 10px;
}

.stat-item {
  margin: 5px 0;
  font-size: 0.9rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.stat-item .stat-label {
  color: #666;
  margin-right: 10px;
}

.stat-item .stat-value {
  font-size: 0.9rem;
  font-weight: bold;
}


.stat-item {
  background: #f8fafc;
  padding: 8px 12px;
  border-radius: 6px;
}

.stat-label {
  color: #64748b;
  font-size: 0.8rem;
  display: block;
  margin-bottom: 2px;
}

.stat-value {
  font-weight: 600;
  font-size: 0.95rem;
}

/* Цвета для прогресс-баров */
#cutting-progress.determinate {
  background: linear-gradient(90deg, #2196F3, #64b5f6);
}

#assembly-progress.determinate {
  background: linear-gradient(90deg, #4CAF50, #81c784);
}

#welding-progress.determinate {
  background: linear-gradient(90deg, #FF9800, #ffb74d);
}

#painting-progress.determinate {
  background: linear-gradient(90deg, #9C27B0, #ba68c8);
}

#shipping-progress.determinate {
  background: linear-gradient(90deg, #F44336, #e57373);
}

/* Цвета для значений в карточках */
.production-stage-card:nth-child(1) .stat-value {
  color: #1976D2;
}

.production-stage-card:nth-child(2) .stat-value {
  color: #388E3C;
}

.production-stage-card:nth-child(3) .stat-value {
  color: #F57C00;
}

.production-stage-card:nth-child(4) .stat-value {
  color: #7B1FA2;
}

.production-stage-card:nth-child(5) .stat-value {
  color: #D32F2F;
}

/* Адаптивность */
@media (max-width: 992px) {
  .production-stage-card .card-content {
    padding: 12px;
  }

  .stage-header i {
    font-size: 1.4rem;
  }

  .stage-header .card-title {
    font-size: 1.1rem;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .charts-grid {
    grid-template-columns: 1fr;
  }

  .chart-box {
    margin-bottom: 20px;
  }

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