/**
 * Call Center Application - Styles
 * Clean, professional design for call center UI
 */

/* === Reset & Base === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  color: #333;
  line-height: 1.6;
}

/* === Container & Cards === */
.container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.card {
  background: white;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  padding: 40px;
  margin-bottom: 20px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 2px solid #f0f0f0;
}

/* === Typography === */
h1 {
  color: #2d3748;
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 10px;
}

h2 {
  color: #2d3748;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 15px;
}

h3 {
  color: #4a5568;
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 8px;
}

.subtitle {
  color: #718096;
  font-size: 16px;
  margin-bottom: 30px;
}

/* === Buttons === */
.btn {
  display: inline-block;
  padding: 12px 24px;
  border: none;
  border-radius: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  text-align: center;
  width: 100%;
  margin-top: 10px;
}

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

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: #667eea;
  color: white;
}

.btn-primary:hover {
  background: #5568d3;
}

.btn-secondary {
  background: #718096;
  color: white;
}

.btn-secondary:hover {
  background: #4a5568;
}

.btn-success {
  background: #48bb78;
  color: white;
}

.btn-success:hover {
  background: #38a169;
}

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

.btn-danger:hover {
  background: #e53e3e;
}

.btn-large {
  padding: 16px 32px;
  font-size: 18px;
  margin-top: 20px;
}

.btn-small {
  padding: 8px 16px;
  font-size: 14px;
  width: auto;
  margin-top: 0;
}

/* === Forms === */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  color: #4a5568;
  font-size: 14px;
}

input[type="text"],
input[type="password"],
input[type="tel"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e2e8f0;
  border-radius: 6px;
  font-size: 16px;
  transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus {
  outline: none;
  border-color: #667eea;
}

/* === Messages === */
.error-message {
  background: #fff5f5;
  border-left: 4px solid #f56565;
  color: #c53030;
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 15px;
  font-size: 14px;
}

.success-message {
  background: #f0fff4;
  border-left: 4px solid #48bb78;
  color: #22543d;
  padding: 12px 16px;
  border-radius: 4px;
  margin-top: 15px;
  font-size: 14px;
}

.info-message {
  background: #ebf8ff;
  border-left: 4px solid #4299e1;
  color: #2c5282;
  padding: 12px 16px;
  border-radius: 4px;
  margin: 15px 0;
  font-size: 14px;
}

.success-box {
  background: #f0fff4;
  border: 2px solid #48bb78;
  border-radius: 8px;
  padding: 24px;
  margin-top: 20px;
  text-align: center;
}

.success-box h3 {
  color: #22543d;
  margin-bottom: 12px;
}

/* === Badges === */
.username-badge {
  background: #667eea;
  color: white;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* === Instructions Page === */
.instructions-content {
  margin-bottom: 30px;
}

.step {
  display: flex;
  align-items: flex-start;
  margin-bottom: 25px;
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
}

.step-number {
  background: #667eea;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;
  margin-right: 16px;
  flex-shrink: 0;
}

.step-content {
  flex: 1;
}

.step-content h3 {
  margin-bottom: 6px;
}

.step-content p {
  color: #4a5568;
  margin: 0;
}

.step-content a {
  color: #667eea;
  text-decoration: none;
  font-weight: 600;
}

.step-content a:hover {
  text-decoration: underline;
}

.info-box {
  background: #ebf8ff;
  border-left: 4px solid #4299e1;
  padding: 16px;
  border-radius: 4px;
  margin-top: 20px;
}

/* === Dialer Page === */
.dialer-content {
  max-width: 500px;
  margin: 0 auto;
}

.status-box {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: #f7fafc;
  border-radius: 8px;
  margin-bottom: 20px;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin-right: 10px;
  animation: pulse 2s infinite;
}

.status-idle {
  background: #718096;
}

.status-dialing {
  background: #ed8936;
}

.status-connected {
  background: #48bb78;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

#statusText {
  font-weight: 600;
  color: #2d3748;
  font-size: 16px;
}

#dialSection,
#dtmfSection,
#doneSection,
#hangupSection {
  margin-top: 20px;
}

/* === Admin Page === */
.admin-section {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 2px solid #f0f0f0;
}

.admin-section:last-child {
  border-bottom: none;
}

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

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px;
  border-radius: 8px;
  text-align: center;
}

.stat-value {
  font-size: 36px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  opacity: 0.9;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.call-list {
  list-style: none;
  padding: 0;
}

.call-list li {
  padding: 12px;
  background: #f7fafc;
  border-radius: 4px;
  margin-bottom: 8px;
  font-size: 14px;
}

/* === Submit Page === */
.submit-content {
  max-width: 500px;
  margin: 0 auto;
}

.instructions {
  color: #4a5568;
  margin-bottom: 30px;
  font-size: 16px;
}

#submissionDetails {
  background: white;
  padding: 16px;
  border-radius: 6px;
  margin: 16px 0;
  text-align: left;
}

#submissionDetails p {
  margin-bottom: 8px;
  color: #2d3748;
}

/* === Responsive === */
@media (max-width: 768px) {
  .card {
    padding: 24px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .username-badge {
    margin-top: 10px;
  }

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

  .step {
    flex-direction: column;
  }

  .step-number {
    margin-bottom: 12px;
  }
}
