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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  background: #f8f9fa;
  min-height: 100vh;
  padding: 20px;
  margin: 0 auto;
  max-width: 1024px;
}

.container {
  max-width: none;
  margin: 0;
  background: transparent;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

h1 {
  text-align: left;
  font-size: 1.8em;
  margin-bottom: 30px;
  color: #2d3748;
  font-weight: 600;
}

.instructions {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  margin-bottom: 24px;
  font-size: 0.9em;
  line-height: 1.6;
  color: #4a5568;
}

.instructions p {
  margin: 0 0 8px 0;
}

.instructions p:last-child {
  margin-bottom: 0;
}

.instructions ul {
  margin: 8px 0;
  padding-left: 20px;
}

.instructions li {
  margin: 4px 0;
  line-height: 1.5;
}

.top-controls {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 20px;
}

label {
  display: block;
  font-weight: 600;
  font-size: 0.9em;
  margin-bottom: 4px;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select, input[type="date"] {
  width: 300px;
  padding: 8px 12px;
  font-size: 0.9em;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  margin-bottom: 15px;
  background: white;
  transition: border-color 0.2s;
}

select:focus, input[type="date"]:focus {
  outline: none;
  border-color: #4299e1;
}

.date-range {
  display: flex;
  align-items: end;
  gap: 10px;
  margin-bottom: 15px;
}

.date-range input {
  width: 150px;
}

.date-range span {
  font-size: 0.9em;
  font-weight: 600;
  color: #6b7280;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding-bottom: 8px;
}

.date-range-label {
  font-weight: 600;
  font-size: 0.9em;
  margin-bottom: 4px;
  color: #4a5568;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.date-options {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 15px;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  padding: 4px 0;
}

.radio-option input[type="radio"] {
  width: auto;
  margin: 0;
  padding: 0;
}

.radio-label {
  font-size: 0.9em;
  color: #374151;
  font-weight: 500;
}

.or-divider {
  text-align: left;
  font-size: 0.9em;
  font-weight: 600;
  color: #6b7280;
  margin: 20px 0;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.compile-btn {
  width: auto;
  padding: 10px 20px;
  font-size: 1em;
  font-weight: 600;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  margin: 20px 0;
  transition: background-color 0.2s;
}

.compile-btn:hover {
  background: #1d4ed8;
}

.compile-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.button-group {
  display: flex;
  gap: 15px;
  margin: 30px 0;
}

.button-group .compile-btn {
  width: 100%;
  margin: 0;
}

.reset-btn {
  padding: 6px 12px;
  font-size: 0.8em;
  font-weight: 600;
  background: #6b7280;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.reset-btn:hover {
  background: #4b5563;
}

.transcripts-section {
  margin-top: 30px;
  border-top: 1px solid #d1d5db;
  padding-top: 20px;
}

.transcripts-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  padding: 8px 0;
  background: transparent;
  border-radius: 0;
  margin-bottom: 10px;
}

.transcripts-header h2 {
  font-size: 1.2em;
  color: #2d3748;
  font-weight: 600;
}

.transcripts-content {
  background: white;
  padding: 15px;
  border-radius: 4px;
  white-space: pre-wrap;
  font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
  font-size: 0.85em;
  max-height: 600px;
  overflow-y: auto;
  line-height: 1.5;
  border: 1px solid #d1d5db;
}

.transcripts-content .agent-line {
  color: #3182ce;
  font-weight: 600;
}

.transcripts-content .customer-line {
  color: #2d3748;
}

.action-buttons {
  display: flex;
  gap: 10px;
  margin-top: 10px;
  margin-bottom: 20px;
}

.action-btn {
  padding: 8px 16px;
  font-size: 0.85em;
  font-weight: 600;
  background: white;
  color: #374151;
  border: 1px solid #d1d5db;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.2s;
}

.action-btn:hover {
  background: #f9fafb;
  border-color: #9ca3af;
}

.error {
  background: #fed7d7;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 8px;
  margin: 15px 0;
  border: 1px solid #feb2b2;
}

.hidden {
  display: none;
}

.loading {
  text-align: center;
  padding: 40px;
  color: #718096;
}

/* Hairline HR styling */
hr {
  border: none;
  height: 1px;
  background-color: #e2e8f0;
  margin: 20px 0;
}

/* Subtle footer text */
hr + p {
  color: #a0aec0;
  font-size: 0.85em;
  margin: 10px 0;
  opacity: 1;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  .container {
    padding: 15px;
    margin: 0;
    max-width: none;
  }
  
  h1 {
    font-size: 1.4em;
    margin-bottom: 20px;
  }
  
  .top-controls {
    justify-content: flex-start;
    margin-bottom: 15px;
  }
  
  .date-range {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 15px;
  }
  
  .date-range input {
    width: 200px;
  }
  
  .date-range span {
    padding: 0;
    font-size: 0.8em;
    order: 2;
  }
  
  .date-options {
    gap: 6px;
  }
  
  .radio-option {
    padding: 2px 0;
  }
  
  .radio-label {
    font-size: 0.85em;
  }
  
  .date-range input:first-child {
    order: 1;
  }
  
  .date-range input:last-child {
    order: 3;
  }
  
  .button-group {
    margin: 15px 0;
  }
  
  .action-buttons {
    flex-direction: column;
    gap: 8px;
  }
  
  .action-btn {
    width: auto;
  }
  
  label {
    font-size: 0.8em;
    margin-bottom: 3px;
  }
  
  select, input[type="date"] {
    padding: 6px 10px;
    margin-bottom: 12px;
    width: 250px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 10px;
    margin: 0;
    max-width: none;
  }
  
  h1 {
    font-size: 1.2em;
    margin-bottom: 15px;
  }
  
  select, input[type="date"] {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 8px 10px;
    width: 200px;
  }
  
  .date-range input {
    width: 180px;
  }
  
  .reset-btn {
    padding: 5px 10px;
    font-size: 0.75em;
  }
}

/* Data Population Section Styles */
.data-population-section {
  background-color: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 24px;
  margin: 24px 0;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.data-population-section h2 {
  color: #2d3748;
  font-size: 1.4em;
  margin-bottom: 20px;
  font-weight: 600;
}

.population-controls {
  display: grid;
  gap: 16px;
}

.control-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.control-group label {
  font-weight: 500;
  color: #4a5568;
  font-size: 0.9em;
}

.control-group select,
.control-group input[type="number"] {
  padding: 8px 12px;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  font-size: 0.9em;
  background-color: #ffffff;
  transition: border-color 0.2s ease;
}

.control-group select:focus,
.control-group input[type="number"]:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.1);
}

.control-group input[type="checkbox"] {
  margin-right: 8px;
  transform: scale(1.1);
}

.status-message {
  padding: 12px 16px;
  border-radius: 6px;
  margin-top: 16px;
  font-weight: 500;
}

.status-message.success {
  background-color: #f0fff4;
  border: 1px solid #9ae6b4;
  color: #22543d;
}

.status-message.error {
  background-color: #fed7d7;
  border: 1px solid #feb2b2;
  color: #742a2a;
}

.status-message.info {
  background-color: #ebf8ff;
  border: 1px solid #90cdf4;
  color: #2a4365;
}

.stats-display {
  background-color: #f7fafc;
  border: 1px solid #e2e8f0;
  border-radius: 6px;
  padding: 16px;
  margin-top: 16px;
}

.stats-display h3 {
  color: #2d3748;
  font-size: 1.1em;
  margin-bottom: 12px;
  font-weight: 600;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.stat-item {
  background-color: #ffffff;
  padding: 12px;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.stat-number {
  font-size: 1.5em;
  font-weight: 700;
  color: #3182ce;
  display: block;
}

.stat-label {
  font-size: 0.8em;
  color: #718096;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.action-btn.danger {
  background-color: #e53e3e;
  color: white;
}

.action-btn.danger:hover {
  background-color: #c53030;
}

.action-btn.danger:disabled {
  background-color: #fed7d7;
  color: #742a2a;
  cursor: not-allowed;
}
