/* ============================================
   سامانه نظارت تردد رجبی - Dashboard Styles
   ============================================ */

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

/* Stat Card */
.stat-card {
  background: var(--white);
  border-radius: var(--border-radius-sm);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: var(--transition);
  border-right: 3px solid var(--gray-400);
  position: relative;
  overflow: hidden;
}

.stat-card:hover {
  box-shadow: var(--shadow);
}

.stat-card.primary {
  border-right-color: var(--primary);
}

.stat-card.success {
  border-right-color: var(--success);
}

.stat-card.warning {
  border-right-color: var(--warning);
}

.stat-card.danger {
  border-right-color: var(--danger);
}

.stat-card.info {
  border-right-color: var(--info);
}

/* Stat Icon */
.stat-icon {
  width: 34px;
  height: 34px;
  border-radius: var(--border-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.stat-card.primary .stat-icon {
  background: #e8eaf6;
  color: var(--primary);
}

.stat-card.success .stat-icon {
  background: #e8f5e9;
  color: var(--success);
}

.stat-card.warning .stat-icon {
  background: #fff8e1;
  color: var(--warning);
}

.stat-card.danger .stat-icon {
  background: #ffebee;
  color: var(--danger);
}

.stat-card.info .stat-icon {
  background: #e1f5fe;
  color: var(--info);
}

/* Stat Value */
.stat-value {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--gray-900);
  line-height: 1.2;
}

/* Stat Label */
.stat-label {
  font-size: 0.7rem;
  color: var(--gray-500);
  margin-top: 2px;
}

/* Stat Info Wrapper */
.stat-info {
  display: flex;
  flex-direction: column;
}

/* Recent Activity */
.activity-list {
  background: var(--white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-200);
  overflow: hidden;
}

.activity-list .activity-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--gray-200);
}

.activity-list .activity-header h3 {
  font-size: 1rem;
  font-weight: 700;
}

.activity-item {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--gray-100);
  transition: var(--transition);
}

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

.activity-item:hover {
  background: var(--gray-50);
}

.activity-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 6px;
  flex-shrink: 0;
}

.activity-dot.success { background: var(--success); }
.activity-dot.danger { background: var(--danger); }
.activity-dot.warning { background: var(--warning); }
.activity-dot.info { background: var(--info); }
.activity-dot.primary { background: var(--primary); }

.activity-text {
  flex: 1;
}

.activity-text p {
  font-size: 0.875rem;
  color: var(--gray-700);
  margin-bottom: 2px;
}

.activity-time {
  font-size: 0.75rem;
  color: var(--gray-400);
  white-space: nowrap;
}

/* Dashboard Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .stat-card {
    padding: 10px 12px;
  }

  .stat-icon {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }

  .stat-value {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .dashboard-grid {
    gap: 8px;
  }

  .stat-card {
    padding: 9px 8px;
    gap: 8px;
  }

  .stat-icon {
    width: 32px;
    height: 32px;
    font-size: 0.9rem;
  }

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

  .stat-label {
    font-size: 0.68rem;
  }
}
