/* everrank Full Lead Funnel Dashboard */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  padding: 2rem;
}

.container {
  max-width: 1400px;
  margin: 0 auto;
}

/* Header */
header {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  margin-bottom: 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

header h1 {
  color: #1a2c4c;
  font-size: 2rem;
}

.last-update {
  color: #666;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.refresh-btn {
  background: #667eea;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 0.5rem 1rem;
  cursor: pointer;
  font-size: 1rem;
  transition: all 0.2s;
}

.refresh-btn:hover {
  background: #5568d3;
  transform: scale(1.05);
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

/* Cards */
.card {
  background: white;
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.card h2 {
  color: #1a2c4c;
  margin-bottom: 1.5rem;
  font-size: 1.3rem;
}

.chart-card {
  grid-column: 1 / -1;
}

/* Stat List */
.stat-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.stat-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #667eea;
}

.stat-item.hot {
  border-left-color: #f07f3c;
  background: #fff5f0;
}

.stat-item.success {
  border-left-color: #10b981;
  background: #f0fdf4;
}

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

.stat-item .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1a2c4c;
}

.stat-item .value.warning {
  color: #dc2626;
}

.stat-item .percentage {
  font-size: 0.9rem;
  color: #10b981;
  margin-left: 0.5rem;
}

/* Activity List */
.activity-list {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.activity-item {
  display: flex;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: #f8f9fa;
  border-radius: 6px;
  font-size: 0.95rem;
}

.activity-item .time {
  color: #666;
  font-size: 0.85rem;
}

/* Table */
.table-controls {
  display: flex;
  gap: 1rem;
  margin-bottom: 1rem;
}

.table-controls select,
.table-controls input {
  padding: 0.75rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  font-size: 0.95rem;
}

.table-controls input {
  flex: 1;
}

.table-wrapper {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th {
  background: #f8f9fa;
  padding: 1rem;
  text-align: left;
  font-weight: 600;
  color: #1a2c4c;
  border-bottom: 2px solid #e5e7eb;
}

td {
  padding: 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

tr:hover {
  background: #f9fafb;
}

/* Stage Badges */
.stage-badge {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  border-radius: 12px;
  font-size: 0.85rem;
  font-weight: 500;
}

.stage-new { background: #dbeafe; color: #1e40af; }
.stage-contacted { background: #fef3c7; color: #92400e; }
.stage-followup { background: #e0e7ff; color: #3730a3; }
.stage-hot { background: #fed7aa; color: #9a3412; }
.stage-transferred { background: #d1fae5; color: #065f46; }

/* Score Badge */
.score-badge {
  font-weight: 700;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
}

.score-cold { color: #6b7280; background: #f3f4f6; }
.score-warm { color: #d97706; background: #fef3c7; }
.score-hot { color: #dc2626; background: #fee2e2; }

/* Responsive */
@media (max-width: 768px) {
  .stats-grid {
    grid-template-columns: 1fr;
  }
  
  header {
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  
  .table-controls {
    flex-direction: column;
  }
}
