/* CUI JWT Benchmarking - Common Styles */

/* Base Styles */
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8f9fa;
  color: #343a40;
}

/* Layout */
.container {
  max-width: 1400px;
  margin: 0 auto;
  background: white;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
  padding: 30px;
}

/* Typography */
h1 {
  color: #343a40;
  margin-bottom: 10px;
  font-size: 2.5rem;
  font-weight: 300;
}

h2 {
  color: #495057;
  font-size: 1.8rem;
  font-weight: 400;
  margin-bottom: 15px;
}

h3 {
  color: #495057;
  font-size: 1.4rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.subtitle {
  color: #6c757d;
  margin-bottom: 20px;
  font-size: 1.1rem;
}

/* Header & Navigation */
.header {
  margin-bottom: 30px;
  text-align: center;
  padding: 20px;
  background-color: #f8f9fa;
  border-bottom: 1px solid #dee2e6;
  border-radius: 8px 8px 0 0;
  margin: -30px -30px 30px -30px;
}

.navigation {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin: 15px 0;
  flex-wrap: wrap;
}

/* Badges & Buttons */
.badge {
  display: inline-block;
  padding: 6px 12px;
  margin: 3px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
  border: none;
  cursor: pointer;
}

.badge:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.badge-primary {
  background-color: #007bff;
  color: white;
}

.badge-secondary {
  background-color: #6c757d;
  color: white;
}

.badge-success {
  background-color: #28a745;
  color: white;
}

.badge-info {
  background-color: #17a2b8;
  color: white;
}

.badge-warning {
  background-color: #ffc107;
  color: #212529;
}

.badge-current {
  background-color: #343a40;
  color: white;
  cursor: default;
}

/* Form Controls */
.controls {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

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

.control-label {
  font-weight: 500;
  color: #495057;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

select {
  padding: 8px 16px;
  border: 2px solid #dee2e6;
  border-radius: 6px;
  background: white;
  font-size: 1rem;
  min-width: 200px;
  transition: border-color 0.2s;
}

select:focus {
  outline: none;
  border-color: #007bff;
}

/* Cards & Sections */
.metric-card, .stat-card {
  background: white;
  padding: 20px;
  border-radius: 6px;
  text-align: center;
  border-left: 4px solid #007bff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.metric-value, .stat-value {
  font-size: 2rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 5px;
}

.metric-label, .stat-label {
  font-size: 0.8rem;
  color: #6c757d;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-top: 5px;
}

/* Grid Layouts */
.metrics-grid, .summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin: 20px 0;
}

.charts-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-top: 20px;
}

/* Chart Styles */
.chart-section {
  background: #ffffff;
  border: 1px solid #e9ecef;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.chart-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #343a40;
  margin-bottom: 15px;
  text-align: center;
  padding-bottom: 10px;
  border-bottom: 2px solid #f8f9fa;
}

.chart-container {
  position: relative;
  height: 400px;
  width: 100%;
}

/* Content Areas */
.content {
  flex: 1;
  overflow: hidden;
  position: relative;
}

.content iframe {
  width: 100%;
  height: 100%;
  border: none;
  min-height: 600px;
}

/* Info Boxes */
.test-info {
  text-align: center;
  margin-bottom: 20px;
  padding: 15px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border-radius: 8px;
}

.test-timestamp {
  font-size: 0.9rem;
  opacity: 0.9;
}

.step-details {
  margin-top: 20px;
  padding: 15px;
  background: #e3f2fd;
  border-radius: 8px;
  border-left: 4px solid #2196f3;
}

.step-details h4 {
  margin: 0 0 10px 0;
  color: #1976d2;
}

/* Legends */
.percentile-legend {
  display: flex;
  justify-content: center;
  gap: 20px;
  margin-bottom: 15px;
  font-size: 0.9rem;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.legend-color {
  width: 16px;
  height: 16px;
  border-radius: 3px;
}

/* Trend Indicators */
.trend-indicator {
  font-size: 0.9rem;
  margin-top: 5px;
  font-weight: 500;
}

.trend-up { color: #28a745; }
.trend-down { color: #dc3545; }
.trend-stable { color: #6c757d; }

/* Status Messages */
.loading {
  text-align: center;
  padding: 40px;
  color: #6c757d;
}

.error {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
  border-radius: 4px;
  padding: 20px;
  margin: 20px 0;
  text-align: center;
}

.error h3 {
  margin-top: 0;
}

/* Footer */
.footer {
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #dee2e6;
  color: #6c757d;
  font-size: 0.9rem;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    max-width: 95%;
    padding: 20px;
  }
  
  .charts-container {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header {
    padding: 15px;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  .navigation {
    flex-direction: column;
    gap: 8px;
  }
  
  .controls {
    flex-direction: column;
  }
  
  .metrics-grid, .summary-stats {
    grid-template-columns: 1fr;
  }
  
  .badge {
    font-size: 11px;
    padding: 4px 8px;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 15px;
    margin: 10px;
    border-radius: 6px;
  }
  
  .header {
    margin: -15px -15px 20px -15px;
  }
  
  .percentile-legend {
    flex-direction: column;
    gap: 10px;
  }
}