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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background-color: #f5f7fa;
  color: #333;
  line-height: 1.6;
}

.header {
  background: linear-gradient(135deg, #3ac7d4 0%, #2a9da7 100%);
  color: white;
  padding: 30px 20px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.header h1 {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 5px;
}

.header p {
  font-size: 16px;
  opacity: 0.95;
}

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

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
  margin-bottom: 40px;
}

.metric-card {
  background: white;
  padding: 25px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  transition: transform 0.2s, box-shadow 0.2s;
}

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

.metric-card.active {
  border: 2px solid #3ac7d4;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(58, 199, 212, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(58, 199, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(58, 199, 212, 0); }
}

.metric-label {
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.metric-value {
  font-size: 36px;
  font-weight: 700;
  color: #3ac7d4;
  line-height: 1.2;
}

.calls-section h2 {
  font-size: 24px;
  margin-bottom: 20px;
  color: #333;
}

.calls-table {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

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

thead {
  background: #f9fafb;
  border-bottom: 2px solid #e5e7eb;
}

th {
  padding: 16px;
  text-align: left;
  font-weight: 600;
  font-size: 13px;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

td {
  padding: 16px;
  border-bottom: 1px solid #f3f4f6;
  font-size: 14px;
}

tr:hover {
  background-color: #f9fafb;
}

.sentiment-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
}

.sentiment-positive {
  background-color: #d1fae5;
  color: #065f46;
}

.sentiment-negative {
  background-color: #fee2e2;
  color: #991b1b;
}

.sentiment-neutral {
  background-color: #dbeafe;
  color: #1e40af;
}

.status-success {
  color: #059669;
  font-weight: 600;
}

.status-neutral {
  color: #6b7280;
}

.actions button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  padding: 4px 8px;
  transition: transform 0.2s;
}

.actions button:hover {
  transform: scale(1.2);
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modal-content {
  background: white;
  padding: 30px;
  border-radius: 12px;
  max-width: 800px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  cursor: pointer;
  color: #666;
}

.modal-close:hover {
  color: #333;
}

#transcript-content {
  margin-top: 20px;
  white-space: pre-wrap;
  font-family: monospace;
  background: #f9fafb;
  padding: 20px;
  border-radius: 8px;
  line-height: 1.8;
}

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

  .metric-value {
    font-size: 28px;
  }

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

  table {
    min-width: 800px;
  }
}
